-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Bruno collection for interacting with swaps and specifically for …
…NIM-to-CRC swaps
- Loading branch information
Showing
8 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: Assets | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{API_URL}}/fast/v1/assets | ||
body: none | ||
auth: none | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: Cancel Swap | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
delete { | ||
url: {{API_URL}}/fast/v1/swaps/{{swap_id}} | ||
body: none | ||
auth: none | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: Get Swap | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
get { | ||
url: {{API_URL}}/fast/v1/swaps/{{swap_id}} | ||
body: none | ||
auth: none | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
meta { | ||
name: Confirm Swap | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{API_URL}}/fast/v1/swaps/{{swap_id}} | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"confirm": true, | ||
"beneficiary": { | ||
"CRC": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "uV_GMw9cXt9fSwuGq61GNfOejJcljCIDfC5aP_FVyx4" | ||
} | ||
}, | ||
"refund": { | ||
"NIM": "NQ65 KV7F 17QA LBYD V0SA NQ6B FCLX 3MYG XK6C" | ||
} | ||
} | ||
} | ||
|
||
docs { | ||
- Private Key: `47d8e55cda5a42a49b0f908cb916e45c958e663c7095ee8d12c3dd05a96dc435` | ||
- Public Key: `b95fc6330f5c5edf5f4b0b86abad4635f39e8c97258c22037c2e5a3ff155cb1e` | ||
- Address: `NQ65 KV7F 17QA LBYD V0SA NQ6B FCLX 3MYG XK6C` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
meta { | ||
name: Create Swap | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{API_URL}}/fast/v1/swaps | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"from": "NIM", | ||
"to": { | ||
"CRC": 500 | ||
}, | ||
"includedFees": "required" | ||
} | ||
} | ||
|
||
script:post-response { | ||
let data = res.getBody(); | ||
bru.setEnvVar("swap_id",data.id); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "1", | ||
"name": "Fastspot v1", | ||
"type": "collection", | ||
"ignore": [ | ||
"node_modules", | ||
".git" | ||
], | ||
"presets": { | ||
"requestType": "http", | ||
"requestUrl": "{{API_URL}}/fast/v1/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
headers { | ||
X-FAST-ApiKey: {{API_KEY}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vars { | ||
API_URL: https://api.test.fastspot.io | ||
swap_id: empty | ||
} | ||
vars:secret [ | ||
API_KEY | ||
] |