From d7464a656d28c163069b4073397a80f88193068c Mon Sep 17 00:00:00 2001 From: phoebe-lew Date: Mon, 11 Mar 2024 14:31:50 -0700 Subject: [PATCH] new vectors with protocol field (#265) --- .../protocol/vectors/parse-close.json | 15 ++++++++------- .../protocol/vectors/parse-offering.json | 11 ++++++----- .../protocol/vectors/parse-order.json | 15 ++++++++------- .../protocol/vectors/parse-orderstatus.json | 15 ++++++++------- .../protocol/vectors/parse-quote.json | 17 +++++++++-------- .../protocol/vectors/parse-rfq.json | 19 ++++++++++--------- 6 files changed, 49 insertions(+), 43 deletions(-) diff --git a/hosted/test-vectors/protocol/vectors/parse-close.json b/hosted/test-vectors/protocol/vectors/parse-close.json index e49307c2..424518cc 100644 --- a/hosted/test-vectors/protocol/vectors/parse-close.json +++ b/hosted/test-vectors/protocol/vectors/parse-close.json @@ -1,19 +1,20 @@ { "description": "Close parses from string", - "input": "{\"metadata\":{\"from\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"to\":\"did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o\",\"exchangeId\":\"rfq_01hqf9etfgf228jgagrpg57024\",\"kind\":\"close\",\"id\":\"close_01hqf9etfhfyt8sdeh67rcgdby\",\"createdAt\":\"2024-02-25T04:48:01.521Z\"},\"data\":{\"reason\":\"The reason for closing the exchange\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..H5Zhi71tbFsEoU8kc_MYBBvDzoGkLi_7R3PKdP0gBfmPMpABreMGim28Km-AAUOYvDQBtDkcfacJexHJzNWuDg\"}", + "input": "{\"metadata\":{\"from\":\"did:dht:ese8j947ro8uth1mqpnhtcr64s39zn1tgq75q34uo6hikf7zzmyy\",\"to\":\"did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y\",\"exchangeId\":\"rfq_01hrqn6pk2ehasa0p9d14hsp8s\",\"protocol\":\"1.0\",\"kind\":\"close\",\"id\":\"close_01hrqn6pk2ehasa0p9d6wtgqkr\",\"createdAt\":\"2024-03-11T21:02:55.586Z\"},\"data\":{\"reason\":\"The reason for closing the exchange\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6ZXNlOGo5NDdybzh1dGgxbXFwbmh0Y3I2NHMzOXpuMXRncTc1cTM0dW82aGlrZjd6em15eSMwIn0..TL3H01A0J0Iz3404lxHviua4SCIIBm4z_7N8N287tr3nZbbXU8djqDS1UPUUPztt-8wvgWTBS-oPOneYCoqLCA\"}", "output": { "metadata": { - "from": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", - "to": "did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o", - "exchangeId": "rfq_01hqf9etfgf228jgagrpg57024", + "from": "did:dht:ese8j947ro8uth1mqpnhtcr64s39zn1tgq75q34uo6hikf7zzmyy", + "to": "did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y", + "exchangeId": "rfq_01hrqn6pk2ehasa0p9d14hsp8s", + "protocol": "1.0", "kind": "close", - "id": "close_01hqf9etfhfyt8sdeh67rcgdby", - "createdAt": "2024-02-25T04:48:01.521Z" + "id": "close_01hrqn6pk2ehasa0p9d6wtgqkr", + "createdAt": "2024-03-11T21:02:55.586Z" }, "data": { "reason": "The reason for closing the exchange" }, - "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..H5Zhi71tbFsEoU8kc_MYBBvDzoGkLi_7R3PKdP0gBfmPMpABreMGim28Km-AAUOYvDQBtDkcfacJexHJzNWuDg" + "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6ZXNlOGo5NDdybzh1dGgxbXFwbmh0Y3I2NHMzOXpuMXRncTc1cTM0dW82aGlrZjd6em15eSMwIn0..TL3H01A0J0Iz3404lxHviua4SCIIBm4z_7N8N287tr3nZbbXU8djqDS1UPUUPztt-8wvgWTBS-oPOneYCoqLCA" }, "error": false } \ No newline at end of file diff --git a/hosted/test-vectors/protocol/vectors/parse-offering.json b/hosted/test-vectors/protocol/vectors/parse-offering.json index 471e1e14..bdf5a2e8 100644 --- a/hosted/test-vectors/protocol/vectors/parse-offering.json +++ b/hosted/test-vectors/protocol/vectors/parse-offering.json @@ -1,12 +1,13 @@ { "description": "Offering parses from string", - "input": "{\"metadata\":{\"from\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"kind\":\"offering\",\"id\":\"offering_01hqf9etf8fc3bx65gcjr8fhcs\",\"createdAt\":\"2024-02-25T04:48:01.513Z\"},\"data\":{\"description\":\"Selling BTC for USD\",\"payinCurrency\":{\"currencyCode\":\"USD\",\"minAmount\":\"0.0\",\"maxAmount\":\"999999.99\"},\"payoutCurrency\":{\"currencyCode\":\"BTC\",\"maxAmount\":\"999526.11\"},\"payoutUnitsPerPayinUnit\":\"0.00003826\",\"payinMethods\":[{\"kind\":\"DEBIT_CARD\",\"requiredPaymentDetails\":{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"cardNumber\":{\"type\":\"string\",\"description\":\"The 16-digit debit card number\",\"minLength\":16,\"maxLength\":16},\"expiryDate\":{\"type\":\"string\",\"description\":\"The expiry date of the card in MM/YY format\",\"pattern\":\"^(0[1-9]|1[0-2])\\\\/([0-9]{2})$\"},\"cardHolderName\":{\"type\":\"string\",\"description\":\"Name of the cardholder as it appears on the card\"},\"cvv\":{\"type\":\"string\",\"description\":\"The 3-digit CVV code\",\"minLength\":3,\"maxLength\":3}},\"required\":[\"cardNumber\",\"expiryDate\",\"cardHolderName\",\"cvv\"],\"additionalProperties\":false}}],\"payoutMethods\":[{\"kind\":\"BTC_ADDRESS\",\"requiredPaymentDetails\":{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"btcAddress\":{\"type\":\"string\",\"description\":\"your Bitcoin wallet address\"}},\"required\":[\"btcAddress\"],\"additionalProperties\":false}}],\"requiredClaims\":{\"id\":\"7ce4004c-3c38-4853-968b-e411bafcd945\",\"input_descriptors\":[{\"id\":\"bbdb9b7c-5754-4f46-b63b-590bada959e0\",\"constraints\":{\"fields\":[{\"path\":[\"$.type\"],\"filter\":{\"type\":\"string\",\"const\":\"YoloCredential\"}}]}}]}},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..p_cI0NFhsdQgWD942b1DzrwpG7pGASTVXYIKHlfrm3s-6EpbypjRqvLWm-gn_-TPakmsPb8p8UKe4iAQGY1pAQ\"}", + "input": "{\"metadata\":{\"from\":\"did:dht:77em1f968c1gzwrrb15cgkzjxg8rft67ebxj6gjkocnz5p8sdniy\",\"protocol\":\"1.0\",\"kind\":\"offering\",\"id\":\"offering_01hrqn6ph3f00asxqvx46capbw\",\"createdAt\":\"2024-03-11T21:02:55.523Z\"},\"data\":{\"description\":\"Selling BTC for USD\",\"payinCurrency\":{\"currencyCode\":\"USD\",\"minAmount\":\"0.0\",\"maxAmount\":\"999999.99\"},\"payoutCurrency\":{\"currencyCode\":\"BTC\",\"maxAmount\":\"999526.11\"},\"payoutUnitsPerPayinUnit\":\"0.00003826\",\"payinMethods\":[{\"kind\":\"DEBIT_CARD\",\"requiredPaymentDetails\":{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"cardNumber\":{\"type\":\"string\",\"description\":\"The 16-digit debit card number\",\"minLength\":16,\"maxLength\":16},\"expiryDate\":{\"type\":\"string\",\"description\":\"The expiry date of the card in MM/YY format\",\"pattern\":\"^(0[1-9]|1[0-2])\\\\/([0-9]{2})$\"},\"cardHolderName\":{\"type\":\"string\",\"description\":\"Name of the cardholder as it appears on the card\"},\"cvv\":{\"type\":\"string\",\"description\":\"The 3-digit CVV code\",\"minLength\":3,\"maxLength\":3}},\"required\":[\"cardNumber\",\"expiryDate\",\"cardHolderName\",\"cvv\"],\"additionalProperties\":false}}],\"payoutMethods\":[{\"kind\":\"BTC_ADDRESS\",\"requiredPaymentDetails\":{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"btcAddress\":{\"type\":\"string\",\"description\":\"your Bitcoin wallet address\"}},\"required\":[\"btcAddress\"],\"additionalProperties\":false}}],\"requiredClaims\":{\"id\":\"7ce4004c-3c38-4853-968b-e411bafcd945\",\"input_descriptors\":[{\"id\":\"bbdb9b7c-5754-4f46-b63b-590bada959e0\",\"constraints\":{\"fields\":[{\"path\":[\"$.type\"],\"filter\":{\"type\":\"string\",\"const\":\"YoloCredential\"}}]}}]}},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6NzdlbTFmOTY4YzFnendycmIxNWNna3pqeGc4cmZ0NjdlYnhqNmdqa29jbno1cDhzZG5peSMwIn0..puQwdTvi4KTfKedA6CXdHHldztoQ8udUrQrGmw1wvWfYW3ilMB8myoD3ATw7NGlt1NuizJ80i4ufZArgGrTiAA\"}", "output": { "metadata": { - "from": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", + "from": "did:dht:77em1f968c1gzwrrb15cgkzjxg8rft67ebxj6gjkocnz5p8sdniy", + "protocol": "1.0", "kind": "offering", - "id": "offering_01hqf9etf8fc3bx65gcjr8fhcs", - "createdAt": "2024-02-25T04:48:01.513Z" + "id": "offering_01hrqn6ph3f00asxqvx46capbw", + "createdAt": "2024-03-11T21:02:55.523Z" }, "data": { "description": "Selling BTC for USD", @@ -100,7 +101,7 @@ ] } }, - "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..p_cI0NFhsdQgWD942b1DzrwpG7pGASTVXYIKHlfrm3s-6EpbypjRqvLWm-gn_-TPakmsPb8p8UKe4iAQGY1pAQ" + "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6NzdlbTFmOTY4YzFnendycmIxNWNna3pqeGc4cmZ0NjdlYnhqNmdqa29jbno1cDhzZG5peSMwIn0..puQwdTvi4KTfKedA6CXdHHldztoQ8udUrQrGmw1wvWfYW3ilMB8myoD3ATw7NGlt1NuizJ80i4ufZArgGrTiAA" }, "error": false } \ No newline at end of file diff --git a/hosted/test-vectors/protocol/vectors/parse-order.json b/hosted/test-vectors/protocol/vectors/parse-order.json index 0c884c50..7092a663 100644 --- a/hosted/test-vectors/protocol/vectors/parse-order.json +++ b/hosted/test-vectors/protocol/vectors/parse-order.json @@ -1,18 +1,19 @@ { "description": "Order parses from string", - "input": "{\"metadata\":{\"from\":\"did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o\",\"to\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"exchangeId\":\"rfq_01hqf9etfnetzv039v0kzhbc59\",\"externalId\":\"ext_1234\",\"kind\":\"order\",\"id\":\"order_01hqf9etfnetzv039v0pjk2rvh\",\"createdAt\":\"2024-02-25T04:48:01.526Z\"},\"data\":{},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyMwIn0..5d_nN_O3WgVvy47LeuJkYekhIwWRTsj6haifd7YVOP4j3eosjkK5ucHSIcrOk0aGxuaYuTREJSa9enLJsGG8AQ\"}", + "input": "{\"metadata\":{\"from\":\"did:dht:139kcr7tex71x9rdn414yymm87bi9d7xbuato74xufrtee7eebiy\",\"to\":\"did:dht:bn4ea1bfu8ijeo8zi1tawau73qs5eopgs3ixj1tkkufjhhwadb8y\",\"exchangeId\":\"rfq_01hrqn6pn3fn7tqn94ftvwf1jn\",\"externalId\":\"ext_1234\",\"protocol\":\"1.0\",\"kind\":\"order\",\"id\":\"order_01hrqn6pn3fn7tqn94fx0d5vch\",\"createdAt\":\"2024-03-11T21:02:55.651Z\"},\"data\":{},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MTM5a2NyN3RleDcxeDlyZG40MTR5eW1tODdiaTlkN3hidWF0bzc0eHVmcnRlZTdlZWJpeSMwIn0..RYe41mMtjWkt6LYVdJIzFLIOptYnf-OVh6PXvqWOo8NvBxY7u4ziAXNgY1Z8Re9TYH4kJsZeftSljJwJ5YI9CQ\"}", "output": { "metadata": { - "from": "did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o", - "to": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", - "exchangeId": "rfq_01hqf9etfnetzv039v0kzhbc59", + "from": "did:dht:139kcr7tex71x9rdn414yymm87bi9d7xbuato74xufrtee7eebiy", + "to": "did:dht:bn4ea1bfu8ijeo8zi1tawau73qs5eopgs3ixj1tkkufjhhwadb8y", + "exchangeId": "rfq_01hrqn6pn3fn7tqn94ftvwf1jn", "externalId": "ext_1234", + "protocol": "1.0", "kind": "order", - "id": "order_01hqf9etfnetzv039v0pjk2rvh", - "createdAt": "2024-02-25T04:48:01.526Z" + "id": "order_01hrqn6pn3fn7tqn94fx0d5vch", + "createdAt": "2024-03-11T21:02:55.651Z" }, "data": {}, - "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyMwIn0..5d_nN_O3WgVvy47LeuJkYekhIwWRTsj6haifd7YVOP4j3eosjkK5ucHSIcrOk0aGxuaYuTREJSa9enLJsGG8AQ" + "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MTM5a2NyN3RleDcxeDlyZG40MTR5eW1tODdiaTlkN3hidWF0bzc0eHVmcnRlZTdlZWJpeSMwIn0..RYe41mMtjWkt6LYVdJIzFLIOptYnf-OVh6PXvqWOo8NvBxY7u4ziAXNgY1Z8Re9TYH4kJsZeftSljJwJ5YI9CQ" }, "error": false } \ No newline at end of file diff --git a/hosted/test-vectors/protocol/vectors/parse-orderstatus.json b/hosted/test-vectors/protocol/vectors/parse-orderstatus.json index 6181b2c3..38dc8b23 100644 --- a/hosted/test-vectors/protocol/vectors/parse-orderstatus.json +++ b/hosted/test-vectors/protocol/vectors/parse-orderstatus.json @@ -1,19 +1,20 @@ { "description": "Order Status parses from string", - "input": "{\"metadata\":{\"from\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"to\":\"did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o\",\"exchangeId\":\"rfq_01hqf9etfqevksmfw5r49s3ex4\",\"kind\":\"orderstatus\",\"id\":\"orderstatus_01hqf9etfqevksmfw5r9c3m7t2\",\"createdAt\":\"2024-02-25T04:48:01.527Z\"},\"data\":{\"orderStatus\":\"wee\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..206MrLHyUOlxWVArN_O-2YrNa2lwiMgG0aCi_11ia4rDAPU_Ww7rTr4twLaDVvCz1Jq3ZczxDvYNq7xXbbccCA\"}", + "input": "{\"metadata\":{\"from\":\"did:dht:geiro75xjbn81snmangwc35wkfsra8mt3awbga8drrjde5z9r9jo\",\"to\":\"did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y\",\"exchangeId\":\"rfq_01hrqn6pp1e48a3meq95dzmkzs\",\"protocol\":\"1.0\",\"kind\":\"orderstatus\",\"id\":\"orderstatus_01hrqn6pp1e48a3meq9b3brgta\",\"createdAt\":\"2024-03-11T21:02:55.681Z\"},\"data\":{\"orderStatus\":\"wee\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6Z2Vpcm83NXhqYm44MXNubWFuZ3djMzV3a2ZzcmE4bXQzYXdiZ2E4ZHJyamRlNXo5cjlqbyMwIn0..aHifNdyzwVZ-bvqyp8H6WHE_K_24y1-sdPIohXPvdBZXIxjqMb2tDaeJLKbtz1mcoYDau_N-_5kVqVSeGtUYCA\"}", "output": { "metadata": { - "from": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", - "to": "did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o", - "exchangeId": "rfq_01hqf9etfqevksmfw5r49s3ex4", + "from": "did:dht:geiro75xjbn81snmangwc35wkfsra8mt3awbga8drrjde5z9r9jo", + "to": "did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y", + "exchangeId": "rfq_01hrqn6pp1e48a3meq95dzmkzs", + "protocol": "1.0", "kind": "orderstatus", - "id": "orderstatus_01hqf9etfqevksmfw5r9c3m7t2", - "createdAt": "2024-02-25T04:48:01.527Z" + "id": "orderstatus_01hrqn6pp1e48a3meq9b3brgta", + "createdAt": "2024-03-11T21:02:55.681Z" }, "data": { "orderStatus": "wee" }, - "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..206MrLHyUOlxWVArN_O-2YrNa2lwiMgG0aCi_11ia4rDAPU_Ww7rTr4twLaDVvCz1Jq3ZczxDvYNq7xXbbccCA" + "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6Z2Vpcm83NXhqYm44MXNubWFuZ3djMzV3a2ZzcmE4bXQzYXdiZ2E4ZHJyamRlNXo5cjlqbyMwIn0..aHifNdyzwVZ-bvqyp8H6WHE_K_24y1-sdPIohXPvdBZXIxjqMb2tDaeJLKbtz1mcoYDau_N-_5kVqVSeGtUYCA" }, "error": false } \ No newline at end of file diff --git a/hosted/test-vectors/protocol/vectors/parse-quote.json b/hosted/test-vectors/protocol/vectors/parse-quote.json index 6af57856..ff7cf2d1 100644 --- a/hosted/test-vectors/protocol/vectors/parse-quote.json +++ b/hosted/test-vectors/protocol/vectors/parse-quote.json @@ -1,17 +1,18 @@ { "description": "Quote parses from string", - "input": "{\"metadata\":{\"exchangeId\":\"rfq_01hqf9etfffp5rv177n4bnkkkz\",\"from\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"to\":\"did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o\",\"kind\":\"quote\",\"id\":\"quote_01hqf9etfffp5rv177n9byadmn\",\"createdAt\":\"2024-02-25T04:48:01.519Z\"},\"data\":{\"expiresAt\":\"2024-02-25T04:48:01.519Z\",\"payin\":{\"currencyCode\":\"BTC\",\"amount\":\"0.01\",\"fee\":\"0.0001\",\"paymentInstruction\":{\"link\":\"tbdex.io/example\",\"instruction\":\"Fake instruction\"}},\"payout\":{\"currencyCode\":\"USD\",\"amount\":\"1000.00\",\"paymentInstruction\":{\"link\":\"tbdex.io/example\",\"instruction\":\"Fake instruction\"}}},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..ORNp3ooqguzpbi7t2kAhQxAu5Ss0J_DuFZ4TL4K5iMkR4wyASiF2Y5kSInkOED8hH3cpZ_2ZWQ47Pd4jUHd6Dw\"}", + "input": "{\"metadata\":{\"exchangeId\":\"rfq_01hrqn6pj7e3k8yt8wb6bvgjq2\",\"from\":\"did:dht:ukqgxyzjmt8h7brwqrrfes8if5f11hun888kbaj899i1gjuz4ogo\",\"to\":\"did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y\",\"protocol\":\"1.0\",\"kind\":\"quote\",\"id\":\"quote_01hrqn6pj7e3k8yt8wb8f6h76n\",\"createdAt\":\"2024-03-11T21:02:55.559Z\"},\"data\":{\"expiresAt\":\"2024-03-11T21:02:55.559Z\",\"payin\":{\"currencyCode\":\"BTC\",\"amount\":\"0.01\",\"fee\":\"0.0001\",\"paymentInstruction\":{\"link\":\"tbdex.io/example\",\"instruction\":\"Fake instruction\"}},\"payout\":{\"currencyCode\":\"USD\",\"amount\":\"1000.00\",\"paymentInstruction\":{\"link\":\"tbdex.io/example\",\"instruction\":\"Fake instruction\"}}},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6dWtxZ3h5emptdDhoN2Jyd3FycmZlczhpZjVmMTFodW44ODhrYmFqODk5aTFnanV6NG9nbyMwIn0..L3HbRNTeyY8bgaAwkWOGEpwXnGxhs0Hk2bzT5GSaZRMoA0mVvj9x27sVxn5B1PMq-1UekKLSdlQWi65uSQ04Dg\"}", "output": { "metadata": { - "exchangeId": "rfq_01hqf9etfffp5rv177n4bnkkkz", - "from": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", - "to": "did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o", + "exchangeId": "rfq_01hrqn6pj7e3k8yt8wb6bvgjq2", + "from": "did:dht:ukqgxyzjmt8h7brwqrrfes8if5f11hun888kbaj899i1gjuz4ogo", + "to": "did:dht:n46hom5afi6xrsxmddx5rjecyyx1faz4ocs4ie43tfkyo4darh9y", + "protocol": "1.0", "kind": "quote", - "id": "quote_01hqf9etfffp5rv177n9byadmn", - "createdAt": "2024-02-25T04:48:01.519Z" + "id": "quote_01hrqn6pj7e3k8yt8wb8f6h76n", + "createdAt": "2024-03-11T21:02:55.559Z" }, "data": { - "expiresAt": "2024-02-25T04:48:01.519Z", + "expiresAt": "2024-03-11T21:02:55.559Z", "payin": { "currencyCode": "BTC", "amount": "0.01", @@ -30,7 +31,7 @@ } } }, - "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6MXVoNmpoenFzcmV1YmF1bmZjcm1hcXV4NW5xNjZoeG0zZm1qOXdwdDR3MXptcG42bXp1eSMwIn0..ORNp3ooqguzpbi7t2kAhQxAu5Ss0J_DuFZ4TL4K5iMkR4wyASiF2Y5kSInkOED8hH3cpZ_2ZWQ47Pd4jUHd6Dw" + "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6dWtxZ3h5emptdDhoN2Jyd3FycmZlczhpZjVmMTFodW44ODhrYmFqODk5aTFnanV6NG9nbyMwIn0..L3HbRNTeyY8bgaAwkWOGEpwXnGxhs0Hk2bzT5GSaZRMoA0mVvj9x27sVxn5B1PMq-1UekKLSdlQWi65uSQ04Dg" }, "error": false } \ No newline at end of file diff --git a/hosted/test-vectors/protocol/vectors/parse-rfq.json b/hosted/test-vectors/protocol/vectors/parse-rfq.json index dbf5531b..e10f3464 100644 --- a/hosted/test-vectors/protocol/vectors/parse-rfq.json +++ b/hosted/test-vectors/protocol/vectors/parse-rfq.json @@ -1,17 +1,18 @@ { "description": "RFQ parses from string", - "input": "{\"metadata\":{\"from\":\"did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o\",\"to\":\"did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy\",\"kind\":\"rfq\",\"id\":\"rfq_01hqf9etfmf148br7jm7av9j49\",\"exchangeId\":\"rfq_01hqf9etfmf148br7jm7av9j49\",\"createdAt\":\"2024-02-25T04:48:01.524Z\"},\"data\":{\"offeringId\":\"offering_01hqf9etfmf148br7jm08zk300\",\"payinMethod\":{\"kind\":\"DEBIT_CARD\",\"paymentDetails\":{\"cardNumber\":\"1234567890123456\",\"expiryDate\":\"12/22\",\"cardHolderName\":\"Ephraim Bartholomew Winthrop\",\"cvv\":\"123\"}},\"payoutMethod\":{\"kind\":\"BTC_ADDRESS\",\"paymentDetails\":{\"btcAddress\":\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"}},\"payinAmount\":\"20000.00\",\"claims\":[\"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyMwIn0.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHV1cHV1Q3JlZGVudGlhbCJdLCJpZCI6InVybjp1dWlkOjc4YjA5MTllLWFjODYtNDY3My1hYjY4LTNhYzNjNDkyZTNmOSIsImlzc3VlciI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyIsImlzc3VhbmNlRGF0ZSI6IjIwMjQtMDItMjVUMDQ6NDg6MDFaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6ZGh0OnFvODMzd2NyeTY4aTRoYnBwNmM1dWVnYXVhbXExYTRtcmM4YnA2ejZkb3Q1cmVvdTh4MW8iLCJiZWVwIjoiYm9vcCJ9fSwiaXNzIjoiZGlkOmRodDpxbzgzM3djcnk2OGk0aGJwcDZjNXVlZ2F1YW1xMWE0bXJjOGJwNno2ZG90NXJlb3U4eDFvIiwic3ViIjoiZGlkOmRodDpxbzgzM3djcnk2OGk0aGJwcDZjNXVlZ2F1YW1xMWE0bXJjOGJwNno2ZG90NXJlb3U4eDFvIn0.Oik7GnePYZgH0p-1En_UivKF4jBFa4KvPLeDTW6jMOigq3ZsLNxfN9-O9sI5RMViSkUx71Z8TpisA3xr2XePAQ\"]},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyMwIn0..fgyl4ftyKlorh1-hIYPF8r1DJDl0ojO9LCtDKrOGjvCZ1IH9GRzjwYaygN3cuJTo2EpB8n2H8Wvpzub3BldQAg\"}", + "input": "{\"metadata\":{\"from\":\"did:dht:qax9m3qk5ur97kar1syg9os5wbzgktqxu7hqzcz97mdbt4tfdqyy\",\"to\":\"did:dht:bn4ea1bfu8ijeo8zi1tawau73qs5eopgs3ixj1tkkufjhhwadb8y\",\"protocol\":\"1.0\",\"kind\":\"rfq\",\"id\":\"rfq_01hrqn6pm5fvmbqkbbdfegt5kc\",\"exchangeId\":\"rfq_01hrqn6pm5fvmbqkbbdfegt5kc\",\"createdAt\":\"2024-03-11T21:02:55.621Z\"},\"data\":{\"offeringId\":\"offering_01hrqn6pm5fvmbqkbbdap8vg4z\",\"payinMethod\":{\"kind\":\"DEBIT_CARD\",\"paymentDetails\":{\"cardNumber\":\"1234567890123456\",\"expiryDate\":\"12/22\",\"cardHolderName\":\"Ephraim Bartholomew Winthrop\",\"cvv\":\"123\"}},\"payoutMethod\":{\"kind\":\"BTC_ADDRESS\",\"paymentDetails\":{\"btcAddress\":\"1A1zP1eP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2J6Z2t0cXh1N2hxemN6OTdtZGJ0NHRmZHF5eSMwIn0..GgAbgD06byZAvWoISYxNaIjuMmM04CZraUlXdka-DQ3FzaLqXxcSdWuvf1m-FYmtEhOKGxIN--5PXtuod3VNCA\"}", "output": { "metadata": { - "from": "did:dht:qo833wcry68i4hbpp6c5uegauamq1a4mrc8bp6z6dot5reou8x1o", - "to": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy", + "from": "did:dht:qax9m3qk5ur97kar1syg9os5wbzgktqxu7hqzcz97mdbt4tfdqyy", + "to": "did:dht:bn4ea1bfu8ijeo8zi1tawau73qs5eopgs3ixj1tkkufjhhwadb8y", + "protocol": "1.0", "kind": "rfq", - "id": "rfq_01hqf9etfmf148br7jm7av9j49", - "exchangeId": "rfq_01hqf9etfmf148br7jm7av9j49", - "createdAt": "2024-02-25T04:48:01.524Z" + "id": "rfq_01hrqn6pm5fvmbqkbbdfegt5kc", + "exchangeId": "rfq_01hrqn6pm5fvmbqkbbdfegt5kc", + "createdAt": "2024-03-11T21:02:55.621Z" }, "data": { - "offeringId": "offering_01hqf9etfmf148br7jm08zk300", + "offeringId": "offering_01hrqn6pm5fvmbqkbbdap8vg4z", "payinMethod": { "kind": "DEBIT_CARD", "paymentDetails": { @@ -29,10 +30,10 @@ }, "payinAmount": "20000.00", "claims": [ - "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6cW84MzN3Y3J5NjhpNGhicHA2YzV1ZWdhdWFtcTFhNG1yYzhicDZ6NmRvdDVyZW91OHgxbyMwIn0.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHV1cHV1Q3JlZGVudGlhbCJdLCJpZCI6InVybjp1dWlkOjc4YjA5MTllLWFjODYtNDY3My1hYjY4L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