doc: update API spec examples

This commit is contained in:
Stjepan Golemac
2023-02-21 16:50:17 +01:00
committed by Mårten Blankfors
parent cdf61b654a
commit e98acce19c
2 changed files with 29 additions and 30 deletions

View File

@@ -1,42 +1,41 @@
{
"peg_in": [
{
"amount": 1337,
"block_height": 218,
"burn_header_hash": "3292a7d2a7e941499b5c0dcff2a5656c159010718450948a60c2be9e1c221dc4",
"memo": "",
"peg_wallet_address": "tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkgkkf5",
"recipient": "S0000000000000000000002AA028H.awesome_contract",
"txid": "d81bec73a0ea0bdcf9bc011f567944eb1eae5889bf002bf7ae641d7096157771",
"vtxindex": 2
}
"peg_in": [
{
"amount": 1337,
"block_height": 218,
"burn_header_hash": "3292a7d2a7e941499b5c0dcff2a5656c159010718450948a60c2be9e1c221dc4",
"memo": "",
"peg_wallet_address": "tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkgkkf5",
"recipient": "S0000000000000000000002AA028H.awesome_contract",
"txid": "d81bec73a0ea0bdcf9bc011f567944eb1eae5889bf002bf7ae641d7096157771",
"vtxindex": 2
}
],
"peg_out_request": [
{
"amount": 1337,
"recipient": "S0000000000000000000002AA028H",
"block_height": 217,
"burn_header_hash": "66b2f18530ccf0e57e82dd054cca9fa41bf5f645f7757171ad9c1546b86387e1",
"peg_wallet_address": "tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkgkkf5",
"txid": "84808f747841fb26e74f171487e56eda1a51373581eb04a8c87a421a77bd46d2",
"vtxindex": 1,
"signature": "f02266aaea02a6855c321b2a45213a5c1bc7b82bfcceaac9d4d76de3be43d513",
"recipient": "1BixGeiRyKT7NTkJAHpWuP197KXUNqhCU9",
"block_height": 218,
"burn_header_hash": "3292a7d2a7e941499b5c0dcff2a5656c159010718450948a60c2be9e1c221dc4",
"peg_wallet_address": "tb1qqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvps3f3cyq",
"txid": "d81bec73a0ea0bdcf9bc011f567944eb1eae5889bf002bf7ae641d7096157771",
"vtxindex": 2,
"signature": "0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d",
"fulfillment_fee": 0,
"memo": "f02266aaea02a6855c321b2a45213a5c1bc7b82bfcceaac9d4d76de3be43d513"
"memo": "00010203"
}
],
"peg_out_fulfill": [
{
"chain_tip": "0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e",
"amount": 1337,
"recipient": "S0000000000000000000002AA028H",
"block_height": 217,
"burn_header_hash": "66b2f18530ccf0e57e82dd054cca9fa41bf5f645f7757171ad9c1546b86387e1",
"peg_wallet_address": "tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkgkkf5",
"txid": "weda1a51373581eb04a8c87a421a77bd46d2",
"vtxindex": 1,
"memo": "f02266aaea02a6855c321b2a45213a5c1bc7b82bfcceaac9d4d76de3be43d513",
"chain_tip": "",
"request_ref": ""
"recipient": "1BixGeiRyKT7NTkJAHpWuP197KXUNqhCU9",
"request_ref": "e81bec73a0ea0bdcf9bc011f567944eb1eae5889bf002bf7ae641d7096157772",
"burn_header_hash": "3292a7d2a7e941499b5c0dcff2a5656c159010718450948a60c2be9e1c221dc4",
"txid": "d81bec73a0ea0bdcf9bc011f567944eb1eae5889bf002bf7ae641d7096157771",
"block_height": 218,
"vtxindex": 2,
"memo": "00010203"
}
]
}

View File

@@ -483,7 +483,7 @@ fn serialization_peg_out_request_in_ops() {
}
#[test]
/// Test the serialization of PegIn operations via
/// Test the serialization of PegOutRequest operations via
/// `blockstack_op_to_json()` using JSON string fixtures
fn serialization_peg_out_request() {
let test_cases = [(
@@ -597,7 +597,7 @@ fn serialization_peg_out_fulfill_in_ops() {
}
#[test]
/// Test the serialization of PegIn operations via
/// Test the serialization of PegOutFulfill operations via
/// `blockstack_op_to_json()` using JSON string fixtures
fn serialization_peg_out_fulfill() {
let test_cases = [(