Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Refresh offerings test vector (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
Diane Huxley authored Mar 28, 2024
1 parent 2fed068 commit dd0397a
Showing 1 changed file with 68 additions and 67 deletions.
135 changes: 68 additions & 67 deletions hosted/test-vectors/protocol/vectors/parse-offering.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,85 @@
{
"description": "Offering parses from string",
"input": "{\"metadata\":{\"from\":\"did:dht:otd1sndnrp9kprin9xcyj4pquyqunef465nm98pdniaug3e6mc5o\",\"kind\":\"offering\",\"id\":\"offering_01hsd3rqpvfc099cwt0g5qcyyw\",\"createdAt\":\"2024-03-20T05:01:29.692Z\",\"protocol\":\"1.0\"},\"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\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6b3RkMXNuZG5ycDlrcHJpbjl4Y3lqNHBxdXlxdW5lZjQ2NW5tOThwZG5pYXVnM2U2bWM1byMwIn0..37sOImM0WS5dYeRkoP95U-QSDfyUfL0CKE2GOp5lkQ5mYsOp7Q6d_EgAy3GBddkekNExTsIfq1vLHCRpBJNcCA\"}",
"input": "{\"metadata\":{\"from\":\"did:dht:fsr94cz6r989iixo9cf9dik8zc6hkwgd753r1cwhor5trq9xgfxy\",\"kind\":\"offering\",\"id\":\"offering_01ht3esrwvffgve6dj4jter1g4\",\"createdAt\":\"2024-03-28T21:17:35.516Z\",\"protocol\":\"1.0\"},\"data\":{\"description\":\"Selling BTC for USD\",\"payin\":{\"currencyCode\":\"USD\",\"min\":\"0.0\",\"max\":\"999999.99\",\"methods\":[{\"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}}]},\"payout\":{\"currencyCode\":\"BTC\",\"max\":\"999526.11\",\"methods\":[{\"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},\"estimatedSettlementTime\":10}]},\"payoutUnitsPerPayinUnit\":\"0.00003826\",\"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\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6ZnNyOTRjejZyOTg5aWl4bzljZjlkaWs4emM2aGt3Z2Q3NTNyMWN3aG9yNXRycTl4Z2Z4eSMwIn0..9gLhrop_I90AhpuwjDz-afDB4ouowArbi5K-jEOUwzPy26EGB3jOidNAGtVoMM2sCKmfV4enhe6uofYq4wuVCQ\"}",
"output": {
"metadata": {
"from": "did:dht:otd1sndnrp9kprin9xcyj4pquyqunef465nm98pdniaug3e6mc5o",
"from": "did:dht:fsr94cz6r989iixo9cf9dik8zc6hkwgd753r1cwhor5trq9xgfxy",
"kind": "offering",
"id": "offering_01hsd3rqpvfc099cwt0g5qcyyw",
"createdAt": "2024-03-20T05:01:29.692Z",
"id": "offering_01ht3esrwvffgve6dj4jter1g4",
"createdAt": "2024-03-28T21:17:35.516Z",
"protocol": "1.0"
},
"data": {
"description": "Selling BTC for USD",
"payinCurrency": {
"payin": {
"currencyCode": "USD",
"minAmount": "0.0",
"maxAmount": "999999.99"
"min": "0.0",
"max": "999999.99",
"methods": [
{
"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
}
}
]
},
"payoutCurrency": {
"payout": {
"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"
"max": "999526.11",
"methods": [
{
"kind": "BTC_ADDRESS",
"requiredPaymentDetails": {
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"btcAddress": {
"type": "string",
"description": "your Bitcoin wallet address"
}
},
"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
},
"required": [
"btcAddress"
],
"additionalProperties": false
"estimatedSettlementTime": 10
}
}
],
]
},
"payoutUnitsPerPayinUnit": "0.00003826",
"requiredClaims": {
"id": "7ce4004c-3c38-4853-968b-e411bafcd945",
"input_descriptors": [
Expand All @@ -101,7 +102,7 @@
]
}
},
"signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6b3RkMXNuZG5ycDlrcHJpbjl4Y3lqNHBxdXlxdW5lZjQ2NW5tOThwZG5pYXVnM2U2bWM1byMwIn0..37sOImM0WS5dYeRkoP95U-QSDfyUfL0CKE2GOp5lkQ5mYsOp7Q6d_EgAy3GBddkekNExTsIfq1vLHCRpBJNcCA"
"signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6ZnNyOTRjejZyOTg5aWl4bzljZjlkaWs4emM2aGt3Z2Q3NTNyMWN3aG9yNXRycTl4Z2Z4eSMwIn0..9gLhrop_I90AhpuwjDz-afDB4ouowArbi5K-jEOUwzPy26EGB3jOidNAGtVoMM2sCKmfV4enhe6uofYq4wuVCQ"
},
"error": false
}

0 comments on commit dd0397a

Please sign in to comment.