https://github.com/jeffneff/partybridge
https://github.com/jeffneff/partybridge
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffneff/partybridge
- Owner: JeffNeff
- Created: 2023-09-08T16:37:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-08T16:40:48.000Z (almost 3 years ago)
- Last Synced: 2024-05-29T22:05:35.509Z (about 2 years ago)
- Language: Go
- Size: 171 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## requestBridge
### GRAMS -> OCTA
curl -v "http://192.168.50.23:8080/requestBridge" \
-X POST \
-H "Content-Type: application/json" \
-d '{"currency":"grams","fromChain":"grams", "amount": 10000, "bridgeTo":"octa","shippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'
curl -v "http://0.0.0.0:8080/requestBridge" \
-X POST \
-H "Content-Type: application/json" \
-d '{"currency":"wgrams","fromChain":"octa", "amount": 10000, "bridgeTo":"grams","shippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'
### OCTA -> GRAMS
curl -v "http://0.0.0.0:8080/requestBridge" \
-X POST \
-H "Content-Type: application/json" \
-d '{"currency":"octa","fromChain":"octa", "amount": 10000, "bridgeTo":"grams","shippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'
curl -v "http://0.0.0.0:8080/requestBridge" \
-X POST \
-H "Content-Type: application/json" \
-d '{"currency":"wocta","fromChain":"grams", "amount": 10000, "bridgeTo":"octa","shippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'
### BSCUSDT -> GRAMS
curl -v "http://0.0.0.0:8080/requestBridge" \
-X POST \
-H "Content-Type: application/json" \
-d '{"currency":"grams","fromChain":"bscusdt", "amount": 10000, "bridgeTo":"grams","shippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'
Generate the private key:
use the script located in /tls folder
##
```
@startuml
User -> Bridge : Connect WS
Bridge -> User: {"type":"hello","sid":"27544e25-e188-48f8-9962-6990a96e21cd","fee":12,"minimumAmount":10}
User -> Bridge: {"type": "requestBridge", "data": {"currency":"octa","amount":11000000000000000000,"fromChain":"octa","bridgeTo":"grams","shippingAddress":"0x5eb565b14b39171c187d5a260789685042e85eca"}}
Bridge -> User: {"type":"requestBridgeResponse","amount":23000000000000000000,"address":"0x1bb31C541CeEaA6ce55937BF36542aa079e04DE5"}
User -> Bridge: {"type": "confirmBridge", "tx": "0x1d4aaa350099df1c302639816e18c4163c8fad7ccde485fa8914059f1100787b"}
Bridge -> User: Disconnect WS
@enduml
```