mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
boost coverage to almost 100%
This commit is contained in:
committed by
Chris Clark
parent
4f86691fb8
commit
995606b1e6
9
test/fixtures/requests/get-orderbook-with-xrp.json
vendored
Normal file
9
test/fixtures/requests/get-orderbook-with-xrp.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"base": {
|
||||
"currency": "USD",
|
||||
"counterparty": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw"
|
||||
},
|
||||
"counter": {
|
||||
"currency": "XRP"
|
||||
}
|
||||
}
|
||||
16
test/fixtures/requests/getpaths/invalid.json
vendored
Normal file
16
test/fixtures/requests/getpaths/invalid.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "rwBYyfufTzk77zUSKEu4MvixfarC35av1J",
|
||||
"amount": {
|
||||
"value": "1000002",
|
||||
"currency": "USD"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"amount": {
|
||||
"value": "1000002",
|
||||
"currency": "USD"
|
||||
}
|
||||
}
|
||||
}
|
||||
16
test/fixtures/requests/getpaths/issuer.json
vendored
Normal file
16
test/fixtures/requests/getpaths/issuer.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "rwBYyfufTzk77zUSKEu4MvixfarC35av1J",
|
||||
"amount": {
|
||||
"value": "1000002",
|
||||
"currency": "USD",
|
||||
"counterparty": "rwBYyfufTzk77zUSKEu4MvixfarC35av1J"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"amount": {
|
||||
"currency": "USD"
|
||||
}
|
||||
}
|
||||
}
|
||||
19
test/fixtures/requests/index.js
vendored
19
test/fixtures/requests/index.js
vendored
@@ -8,18 +8,30 @@ module.exports = {
|
||||
},
|
||||
prepareOrderCancellation: require('./prepare-order-cancellation'),
|
||||
preparePayment: require('./prepare-payment'),
|
||||
preparePaymentMinAmountXRP: require('./prepare-payment-min-xrp'),
|
||||
preparePaymentMinAmount: require('./prepare-payment-min'),
|
||||
preparePaymentWrongAddress: require('./prepare-payment-wrong-address'),
|
||||
preparePaymentWrongAmount: require('./prepare-payment-wrong-amount'),
|
||||
preparePaymentWrongPartial: require('./prepare-payment-wrong-partial'),
|
||||
preparePaymentAllOptions: require('./prepare-payment-all-options'),
|
||||
preparePaymentNoCounterparty: require('./prepare-payment-no-counterparty'),
|
||||
prepareSettings: require('./prepare-settings'),
|
||||
prepareSuspendedPaymentCreation:
|
||||
require('./prepare-suspended-payment-creation'),
|
||||
prepareSuspendedPaymentCreationFull:
|
||||
require('./prepare-suspended-payment-creation-full'),
|
||||
prepareSuspendedPaymentExecution:
|
||||
require('./prepare-suspended-payment-execution'),
|
||||
prepareSuspendedPaymentExecutionSimple:
|
||||
require('./prepare-suspended-payment-execution-simple'),
|
||||
prepareSuspendedPaymentCancellation:
|
||||
require('./prepare-suspended-payment-cancellation'),
|
||||
prepareSuspendedPaymentCancellationMemos:
|
||||
require('./prepare-suspended-payment-cancellation-memos'),
|
||||
prepareTrustline: {
|
||||
simple: require('./prepare-trustline-simple'),
|
||||
complex: require('./prepare-trustline')
|
||||
complex: require('./prepare-trustline'),
|
||||
frozen: require('./prepare-trustline-frozen.json')
|
||||
},
|
||||
sign: require('./sign'),
|
||||
signSuspended: require('./sign-suspended.json'),
|
||||
@@ -31,9 +43,12 @@ module.exports = {
|
||||
NotAcceptCurrency: require('./getpaths/not-accept-currency'),
|
||||
NoPaths: require('./getpaths/no-paths'),
|
||||
NoPathsWithCurrencies: require('./getpaths/no-paths-with-currencies'),
|
||||
sendAll: require('./getpaths/send-all')
|
||||
sendAll: require('./getpaths/send-all'),
|
||||
invalid: require('./getpaths/invalid'),
|
||||
issuer: require('./getpaths/issuer')
|
||||
},
|
||||
getOrderbook: require('./get-orderbook'),
|
||||
getOrderbookWithXRP: require('./get-orderbook-with-xrp'),
|
||||
computeLedgerHash: {
|
||||
header: require('./compute-ledger-hash'),
|
||||
transactions: require('./compute-ledger-hash-transactions')
|
||||
|
||||
3
test/fixtures/requests/prepare-order.json
vendored
3
test/fixtures/requests/prepare-order.json
vendored
@@ -9,5 +9,6 @@
|
||||
"currency": "XRP",
|
||||
"value": "2"
|
||||
},
|
||||
"immediateOrCancel": true
|
||||
"passive": true,
|
||||
"fillOrKill": true
|
||||
}
|
||||
|
||||
17
test/fixtures/requests/prepare-payment-min-xrp.json
vendored
Normal file
17
test/fixtures/requests/prepare-payment-min-xrp.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"amount": {
|
||||
"value": "0.01",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"minAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
test/fixtures/requests/prepare-payment-min.json
vendored
Normal file
17
test/fixtures/requests/prepare-payment-min.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"amount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"minAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
test/fixtures/requests/prepare-payment-wrong-address.json
vendored
Normal file
17
test/fixtures/requests/prepare-payment-wrong-address.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"amount": {
|
||||
"value": "0.01",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"minAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
test/fixtures/requests/prepare-payment-wrong-amount.json
vendored
Normal file
17
test/fixtures/requests/prepare-payment-wrong-amount.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"maxAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"minAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
test/fixtures/requests/prepare-payment-wrong-partial.json
vendored
Normal file
17
test/fixtures/requests/prepare-payment-wrong-partial.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"amount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"minAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "XRP"
|
||||
}
|
||||
},
|
||||
"allowPartialPayment": true
|
||||
}
|
||||
11
test/fixtures/requests/prepare-suspended-payment-cancellation-memos.json
vendored
Normal file
11
test/fixtures/requests/prepare-suspended-payment-cancellation-memos.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"suspensionSequence": 1234,
|
||||
"memos": [
|
||||
{
|
||||
"type": "test",
|
||||
"format": "plain/text",
|
||||
"data": "texted data"
|
||||
}
|
||||
]
|
||||
}
|
||||
28
test/fixtures/requests/prepare-suspended-payment-creation-full.json
vendored
Normal file
28
test/fixtures/requests/prepare-suspended-payment-creation-full.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"maxAmount": {
|
||||
"value": "0.01",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
},
|
||||
"tag": 1
|
||||
},
|
||||
"destination": {
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"amount": {
|
||||
"value": "0.01",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
},
|
||||
"tag": 2
|
||||
},
|
||||
"digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
|
||||
"allowExecuteAfter": "2014-09-24T21:21:50.000Z",
|
||||
"memos": [
|
||||
{
|
||||
"type": "test",
|
||||
"data": "texted data"
|
||||
}
|
||||
]
|
||||
}
|
||||
11
test/fixtures/requests/prepare-suspended-payment-execution-simple.json
vendored
Normal file
11
test/fixtures/requests/prepare-suspended-payment-execution-simple.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"suspensionSequence": 1234,
|
||||
"memos": [
|
||||
{
|
||||
"type": "test",
|
||||
"format": "plain/text",
|
||||
"data": "texted data"
|
||||
}
|
||||
]
|
||||
}
|
||||
8
test/fixtures/requests/prepare-trustline-frozen.json
vendored
Normal file
8
test/fixtures/requests/prepare-trustline-frozen.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"currency": "BTC",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"limit": "0.1",
|
||||
"authorized": true,
|
||||
"ripplingDisabled": false,
|
||||
"frozen": true
|
||||
}
|
||||
2
test/fixtures/requests/sign.json
vendored
2
test/fixtures/requests/sign.json
vendored
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Domain\":\"726970706C652E636F6D\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Domain\":\"726970706C652E636F6D\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23,\"SigningPubKey\":\"02F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D8\"}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
|
||||
@@ -33,5 +33,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"rawTransactions": "[{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Fee\":\"10\",\"Flags\":0,\"Sequence\":6478,\"SigningPubKey\":\"02CAB6F3A798712136DB5F105A98B0DE27C99AEDB68500181706B087CF1B6D0F2D\",\"TransactionType\":\"AccountSet\",\"TxnSignature\":\"304402202144BD33CC30793455B0F90954576EEE80F13C4C73538D2AEE012564C48E522E02207A8A4AD2CF2B4DB549FB2F05D38E065B5DD1EAA386310698E5247F1BB515E99F\",\"hash\":\"FEEFC959B0351156F58A2275F5A6B37B07AA85CCCE2C4AF8A1342A0196A3CD4D\",\"metaData\":{\"AffectedNodes\":[{\"ModifiedNode\":{\"FinalFields\":{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Balance\":\"403657865\",\"Flags\":0,\"OwnerCount\":2,\"Sequence\":6479},\"LedgerEntryType\":\"AccountRoot\",\"LedgerIndex\":\"F64FAA4CAFDB9931DC06890FE30B4E29C32F7AD574FC7C3362B81265682BFAEA\",\"PreviousFields\":{\"Balance\":\"403657875\",\"Sequence\":6478},\"PreviousTxnID\":\"B257B95A637C6C396507AD0AE122161A849C701F065B67009BB939690DB74BC9\",\"PreviousTxnLgrSeq\":4181972}}],\"TransactionIndex\":0,\"TransactionResult\":\"tesSUCCESS\"}}]"
|
||||
"rawTransactions": "[{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Fee\":\"10\",\"ledger_index\":4181996,\"Flags\":0,\"Sequence\":6478,\"SigningPubKey\":\"02CAB6F3A798712136DB5F105A98B0DE27C99AEDB68500181706B087CF1B6D0F2D\",\"TransactionType\":\"AccountSet\",\"TxnSignature\":\"304402202144BD33CC30793455B0F90954576EEE80F13C4C73538D2AEE012564C48E522E02207A8A4AD2CF2B4DB549FB2F05D38E065B5DD1EAA386310698E5247F1BB515E99F\",\"hash\":\"FEEFC959B0351156F58A2275F5A6B37B07AA85CCCE2C4AF8A1342A0196A3CD4D\",\"metaData\":{\"AffectedNodes\":[{\"ModifiedNode\":{\"FinalFields\":{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Balance\":\"403657865\",\"Flags\":0,\"OwnerCount\":2,\"Sequence\":6479},\"LedgerEntryType\":\"AccountRoot\",\"LedgerIndex\":\"F64FAA4CAFDB9931DC06890FE30B4E29C32F7AD574FC7C3362B81265682BFAEA\",\"PreviousFields\":{\"Balance\":\"403657875\",\"Sequence\":6478},\"PreviousTxnID\":\"B257B95A637C6C396507AD0AE122161A849C701F065B67009BB939690DB74BC9\",\"PreviousTxnLgrSeq\":4181972}}],\"TransactionIndex\":0,\"TransactionResult\":\"tesSUCCESS\"}}]"
|
||||
}
|
||||
|
||||
20
test/fixtures/responses/get-ledger-with-state-as-hashes.json
vendored
Normal file
20
test/fixtures/responses/get-ledger-with-state-as-hashes.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"stateHash": "8DBB7FA4036704D96AD32A4573BEE461FDDBDCB1B6F62CB17EDB5182F52AE9F1",
|
||||
"closeTime": "2015-11-18T11:00:30.000Z",
|
||||
"closeTimeResolution": 30,
|
||||
"closeFlags": 0,
|
||||
"ledgerHash": "3D7115EDB5EC72FEF4ADDF46CA5B7770CBDECEAB3A97EA210BCC04E8C54A7CEE",
|
||||
"ledgerVersion": 6,
|
||||
"parentLedgerHash": "6D36AEFD3639EE22A27DDE0FA6C57525D103941F11D7FD6D91AC8D439DE2B3EE",
|
||||
"parentCloseTime": "2015-11-18T07:53:01.000Z",
|
||||
"totalDrops": "99999999999999964",
|
||||
"transactionHash": "B8D716B82BFFF4186BBBE7B7341AE0E1CBD2558952408B96E925EC0A51A6AEC2",
|
||||
"transactionHashes": [
|
||||
"B22E27F35F3F7679F76A474E4FF8E71EFA21B313DF2FC6678037A053A00FD084"
|
||||
],
|
||||
"stateHashes": [
|
||||
"2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
|
||||
"8B24E55376A65D68542C17F3BF446231AC7062CB43BED28817570128A1849819",
|
||||
"B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B"
|
||||
]
|
||||
}
|
||||
44
test/fixtures/responses/get-orderbook-with-xrp.json
vendored
Normal file
44
test/fixtures/responses/get-orderbook-with-xrp.json
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"bids": [
|
||||
{
|
||||
"specification": {
|
||||
"direction": "buy",
|
||||
"quantity": {
|
||||
"currency": "USD",
|
||||
"value": "10.1",
|
||||
"counterparty": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw"
|
||||
},
|
||||
"totalPrice": {
|
||||
"currency": "XRP",
|
||||
"value": "254391353"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"maker": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"sequence": 5,
|
||||
"makerExchangeRate": "3.970260734451929e-8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"asks": [
|
||||
{
|
||||
"specification": {
|
||||
"direction": "sell",
|
||||
"quantity": {
|
||||
"currency": "USD",
|
||||
"value": "10453252347.1",
|
||||
"counterparty": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw"
|
||||
},
|
||||
"totalPrice": {
|
||||
"currency": "XRP",
|
||||
"value": "134"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"maker": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"sequence": 6,
|
||||
"makerExchangeRate": "0.0000780093458738806"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
23
test/fixtures/responses/get-transaction-no-meta.json
vendored
Normal file
23
test/fixtures/responses/get-transaction-no-meta.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "payment",
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"sequence": 4,
|
||||
"id": "AFB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA1B",
|
||||
"specification": {
|
||||
"source": {
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"maxAmount": {
|
||||
"currency": "XRP",
|
||||
"value": "1.112209"
|
||||
}
|
||||
},
|
||||
"destination": {
|
||||
"address": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"amount": {
|
||||
"currency": "USD",
|
||||
"value": "0.001"
|
||||
}
|
||||
},
|
||||
"paths": "[[{\"currency\":\"USD\",\"issuer\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"type\":48,\"type_hex\":\"0000000000000030\"},{\"account\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"currency\":\"USD\",\"issuer\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"type\":49,\"type_hex\":\"0000000000000031\"}]]"
|
||||
}
|
||||
}
|
||||
34
test/fixtures/responses/get-transaction-order-sell.json
vendored
Normal file
34
test/fixtures/responses/get-transaction-order-sell.json
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "order",
|
||||
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"sequence": 2,
|
||||
"id": "458101D51051230B1D56E9ACAFAA34451BF65FA000F95DF6F0FF5B3A62D83FC2",
|
||||
"specification": {
|
||||
"direction": "sell",
|
||||
"quantity": {
|
||||
"currency": "USD",
|
||||
"value": "10.1",
|
||||
"counterparty": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM"
|
||||
},
|
||||
"totalPrice": {
|
||||
"currency": "XRP",
|
||||
"value": "254391353"
|
||||
}
|
||||
},
|
||||
"outcome": {
|
||||
"result": "tecUNFUNDED_OFFER",
|
||||
"timestamp": "2015-11-18T20:56:30.000Z",
|
||||
"fee": "0.000012",
|
||||
"balanceChanges": {
|
||||
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-0.000012"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"ledgerVersion": 6,
|
||||
"indexInLedger": 0
|
||||
}
|
||||
}
|
||||
51
test/fixtures/responses/get-transaction-suspended-payment-create-iou.json
vendored
Normal file
51
test/fixtures/responses/get-transaction-suspended-payment-create-iou.json
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"type": "suspendedPaymentCreation",
|
||||
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"sequence": 10,
|
||||
"id": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2",
|
||||
"specification": {
|
||||
"source": {
|
||||
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"maxAmount": {
|
||||
"currency": "USD",
|
||||
"value": "2"
|
||||
},
|
||||
"tag": 1
|
||||
},
|
||||
"destination": {
|
||||
"address": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"amount": {
|
||||
"currency": "USD",
|
||||
"value": "2",
|
||||
"counterparty": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
|
||||
},
|
||||
"tag": 2
|
||||
},
|
||||
"memos": [
|
||||
{
|
||||
"type": "x2",
|
||||
"format": "text/plain",
|
||||
"data": "mema data"
|
||||
}
|
||||
],
|
||||
"digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
|
||||
"allowCancelAfter": "2015-11-16T06:53:42.000Z",
|
||||
"allowExecuteAfter": "2015-11-16T06:47:42.000Z"
|
||||
},
|
||||
"outcome": {
|
||||
"result": "tesSUCCESS",
|
||||
"timestamp": "2015-11-16T06:43:00.000Z",
|
||||
"fee": "0.000012",
|
||||
"balanceChanges": {
|
||||
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-0.000014"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"ledgerVersion": 15,
|
||||
"indexInLedger": 0
|
||||
}
|
||||
}
|
||||
34
test/fixtures/responses/get-transaction-suspended-payment-execution-simple.json
vendored
Normal file
34
test/fixtures/responses/get-transaction-suspended-payment-execution-simple.json
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "suspendedPaymentExecution",
|
||||
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"sequence": 6,
|
||||
"id": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931",
|
||||
"specification": {
|
||||
"owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"suspensionSequence": 5,
|
||||
"method": 1,
|
||||
"digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1"
|
||||
},
|
||||
"outcome": {
|
||||
"result": "tesSUCCESS",
|
||||
"timestamp": "2015-11-17T01:47:40.000Z",
|
||||
"fee": "0.000012",
|
||||
"balanceChanges": {
|
||||
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-0.000012"
|
||||
}
|
||||
],
|
||||
"rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "10.000043"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"ledgerVersion": 14,
|
||||
"indexInLedger": 0
|
||||
}
|
||||
}
|
||||
27
test/fixtures/responses/get-transactions-one.json
vendored
Normal file
27
test/fixtures/responses/get-transactions-one.json
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"type": "settings",
|
||||
"address": "r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b",
|
||||
"sequence": 491,
|
||||
"id": "D868CFF0DF8C8AAF205404460EA764ACB3B8862527FA414BC8C1CA9A45B1F276",
|
||||
"specification": {
|
||||
"domain": "ripple.com"
|
||||
},
|
||||
"outcome": {
|
||||
"result": "tesSUCCESS",
|
||||
"timestamp": "2015-10-23T02:07:00.000Z",
|
||||
"fee": "0.012",
|
||||
"balanceChanges": {
|
||||
"r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-0.012"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"ledgerVersion": 16635149,
|
||||
"indexInLedger": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
333
test/fixtures/responses/get-trustlines-all.json
vendored
Normal file
333
test/fixtures/responses/get-trustlines-all.json
vendored
Normal file
@@ -0,0 +1,333 @@
|
||||
[
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "ASP",
|
||||
"counterparty": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "10"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "XAU",
|
||||
"counterparty": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"ripplingDisabled": true,
|
||||
"frozen": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "5",
|
||||
"currency": "USD",
|
||||
"counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"ripplingDisabled": true,
|
||||
"frozen": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "2.497605752725159"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "1000",
|
||||
"currency": "MXN",
|
||||
"counterparty": "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "481.992867407479"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "1",
|
||||
"currency": "EUR",
|
||||
"counterparty": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0.793598266778297"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "3",
|
||||
"currency": "CNY",
|
||||
"counterparty": "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "3",
|
||||
"currency": "DYM",
|
||||
"counterparty": "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "1.294889190631542"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "CHF",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0.3488146605801446"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "3",
|
||||
"currency": "BTC",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "2.114103174931847"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "5000",
|
||||
"currency": "USD",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "BTC",
|
||||
"counterparty": "rpgKWEmNqSDAGFhy5WDnsyPqfQxbWxKeVd"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "10"
|
||||
},
|
||||
"state": {
|
||||
"balance": "-0.00111"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "BTC",
|
||||
"counterparty": "rBJ3YjwXi2MGbg7GVLuTXUWQ8DjL7tDXh4"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "10"
|
||||
},
|
||||
"state": {
|
||||
"balance": "-0.1010780000080207"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "1",
|
||||
"currency": "USD",
|
||||
"counterparty": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "100",
|
||||
"currency": "CNY",
|
||||
"counterparty": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "8.07619790068559"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "JPY",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "7.292695098901099"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "AUX",
|
||||
"counterparty": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "1",
|
||||
"currency": "USD",
|
||||
"counterparty": "r9vbV3EHvXWjSkeQ6CAcYVPGeq7TuiXY2X",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "100",
|
||||
"currency": "EUR",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "12.41688780720394"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "500",
|
||||
"currency": "USD",
|
||||
"counterparty": "rfF3PNkwkq1DygW2wum2HK3RGfgkJjdPVD",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "35"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "JOE",
|
||||
"counterparty": "rwUVoVMSURqNyvocPCcvLu3ygJzZyw8qwp"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "50",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"state": {
|
||||
"balance": "-5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "USD",
|
||||
"counterparty": "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "100",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "JOE",
|
||||
"counterparty": "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2"
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "100",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "10.01037626125837",
|
||||
"currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000",
|
||||
"counterparty": "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
|
||||
"ripplingDisabled": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "0"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"specification": {
|
||||
"limit": "0",
|
||||
"currency": "USD",
|
||||
"counterparty": "rEhDDUUNxpXgEHVJtC2cjXAgyx5VCFxdMF",
|
||||
"frozen": true
|
||||
},
|
||||
"counterparty": {
|
||||
"limit": "1"
|
||||
},
|
||||
"state": {
|
||||
"balance": "0"
|
||||
}
|
||||
}
|
||||
]
|
||||
32
test/fixtures/responses/index.js
vendored
32
test/fixtures/responses/index.js
vendored
@@ -6,6 +6,7 @@ module.exports = {
|
||||
getBalances: require('./get-balances.json'),
|
||||
getBalanceSheet: require('./get-balance-sheet.json'),
|
||||
getOrderbook: require('./get-orderbook.json'),
|
||||
getOrderbookWithXRP: require('./get-orderbook-with-xrp.json'),
|
||||
getOrders: require('./get-orders.json'),
|
||||
getPaths: {
|
||||
XrpToUsd: require('./get-paths.json'),
|
||||
@@ -20,6 +21,8 @@ module.exports = {
|
||||
orderWithExpirationCancellation:
|
||||
require('./get-transaction-order-with-expiration-cancellation.json'),
|
||||
order: require('./get-transaction-order.json'),
|
||||
orderSell: require('./get-transaction-order-sell.json'),
|
||||
noMeta: require('./get-transaction-no-meta.json'),
|
||||
payment: require('./get-transaction-payment.json'),
|
||||
settings: require('./get-transaction-settings.json'),
|
||||
trustline: require('./get-transaction-trustline-set.json'),
|
||||
@@ -31,26 +34,37 @@ module.exports = {
|
||||
notValidated: require('./get-transaction-not-validated.json'),
|
||||
suspendedPaymentCreation:
|
||||
require('./get-transaction-suspended-payment-create.json'),
|
||||
SuspendedPaymentCreationIOU:
|
||||
require('./get-transaction-suspended-payment-create-iou.json'),
|
||||
suspendedPaymentCancellation:
|
||||
require('./get-transaction-suspended-payment-cancellation.json'),
|
||||
suspendedPaymentExecution:
|
||||
require('./get-transaction-suspended-payment-execution.json')
|
||||
require('./get-transaction-suspended-payment-execution.json'),
|
||||
suspendedPaymentExecutionSimple:
|
||||
require('./get-transaction-suspended-payment-execution-simple.json')
|
||||
},
|
||||
getTransactions: require('./get-transactions.json'),
|
||||
getTransactionsOne: require('./get-transactions-one.json'),
|
||||
getTrustlines: require('./get-trustlines.json'),
|
||||
getTrustlinesAll: require('./get-trustlines-all.json'),
|
||||
getLedger: {
|
||||
header: require('./get-ledger'),
|
||||
full: require('./get-ledger-full'),
|
||||
withSettingsTx: require('./get-ledger-with-settings-tx')
|
||||
withSettingsTx: require('./get-ledger-with-settings-tx'),
|
||||
withStateAsHashes: require('./get-ledger-with-state-as-hashes')
|
||||
},
|
||||
prepareOrderCancellation: require('./prepare-order-cancellation.json'),
|
||||
prepareOrder: {
|
||||
buy: require('./prepare-order.json'),
|
||||
sell: require('./prepare-order-sell.json'),
|
||||
expiration: require('./prepare-order-expiration')
|
||||
expiration: require('./prepare-order-expiration'),
|
||||
cancellation: require('./prepare-order-cancellation.json'),
|
||||
cancellationNoInstructions:
|
||||
require('./prepare-order-cancellation-no-instructions.json')
|
||||
},
|
||||
preparePayment: {
|
||||
normal: require('./prepare-payment.json'),
|
||||
minAmountXRP: require('./prepare-payment-min-amont-xrp.json'),
|
||||
minAmountXRPXRP: require('./prepare-payment-min-amont-xrp-xrp.json'),
|
||||
allOptions: require('./prepare-payment-all-options.json'),
|
||||
noCounterparty: require('./prepare-payment-no-counterparty.json'),
|
||||
minAmount: require('./prepare-payment-min-amount.json')
|
||||
@@ -62,16 +76,24 @@ module.exports = {
|
||||
flagSet: require('./prepare-settings-flag-set.json'),
|
||||
flagClear: require('./prepare-settings-flag-clear.json'),
|
||||
setTransferRate: require('./prepare-settings-set-transfer-rate.json'),
|
||||
fieldClear: require('./prepare-settings-field-clear.json')
|
||||
fieldClear: require('./prepare-settings-field-clear.json'),
|
||||
noInstructions: require('./prepare-settings-no-instructions.json')
|
||||
},
|
||||
prepareSuspendedPaymentCreation:
|
||||
require('./prepare-suspended-payment-creation'),
|
||||
prepareSuspendedPaymentCreationFull:
|
||||
require('./prepare-suspended-payment-creation-full'),
|
||||
prepareSuspendedPaymentExecution:
|
||||
require('./prepare-suspended-payment-execution'),
|
||||
prepareSuspendedPaymentExecutionSimple:
|
||||
require('./prepare-suspended-payment-execution-simple'),
|
||||
prepareSuspendedPaymentCancellation:
|
||||
require('./prepare-suspended-payment-cancellation'),
|
||||
prepareSuspendedPaymentCancellationMemos:
|
||||
require('./prepare-suspended-payment-cancellation-memos'),
|
||||
prepareTrustline: {
|
||||
simple: require('./prepare-trustline-simple.json'),
|
||||
frozen: require('./prepare-trustline-frozen.json'),
|
||||
complex: require('./prepare-trustline.json')
|
||||
},
|
||||
sign: require('./sign.json'),
|
||||
|
||||
8
test/fixtures/responses/prepare-order-cancellation-no-instructions.json
vendored
Normal file
8
test/fixtures/responses/prepare-order-cancellation-no-instructions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"OfferCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":23,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
4
test/fixtures/responses/prepare-order.json
vendored
4
test/fixtures/responses/prepare-order.json
vendored
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"Flags\":2147614720,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":\"2000000\",\"TakerPays\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"txJSON": "{\"Flags\":2147811328,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":\"2000000\",\"TakerPays\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8820051
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
|
||||
8
test/fixtures/responses/prepare-payment-min-amont-xrp-xrp.json
vendored
Normal file
8
test/fixtures/responses/prepare-payment-min-amont-xrp-xrp.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"10000\",\"Flags\":2147483648,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8820051
|
||||
}
|
||||
}
|
||||
8
test/fixtures/responses/prepare-payment-min-amont-xrp.json
vendored
Normal file
8
test/fixtures/responses/prepare-payment-min-amont-xrp.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"100000000000000000\",\"Flags\":2147614720,\"SendMax\":{\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\",\"value\":\"0.01\"},\"DeliverMin\":\"100000000000000000\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8820051
|
||||
}
|
||||
}
|
||||
1
test/fixtures/responses/prepare-settings-no-instructions.json
vendored
Normal file
1
test/fixtures/responses/prepare-settings-no-instructions.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"txJSON":"{\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Domain\":\"726970706C652E636F6D\",\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}","instructions":{"fee":"0.000012","sequence":23,"maxLedgerVersion":8819954}}
|
||||
8
test/fixtures/responses/prepare-suspended-payment-cancellation-memos.json
vendored
Normal file
8
test/fixtures/responses/prepare-suspended-payment-cancellation-memos.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"SuspendedPaymentCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"Memos\":[{\"Memo\":{\"MemoData\":\"7465787465642064617461\",\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\"}}],\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
8
test/fixtures/responses/prepare-suspended-payment-creation-full.json
vendored
Normal file
8
test/fixtures/responses/prepare-suspended-payment-creation-full.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"SuspendedPaymentCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\",\"value\":\"0.01\"},\"Digest\":\"8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4\",\"FinishAfter\":464908910,\"SourceTag\":1,\"DestinationTag\":2,\"Memos\":[{\"Memo\":{\"MemoData\":\"7465787465642064617461\",\"MemoType\":\"74657374\"}}],\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
8
test/fixtures/responses/prepare-suspended-payment-execution-simple.json
vendored
Normal file
8
test/fixtures/responses/prepare-suspended-payment-execution-simple.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"SuspendedPaymentFinish\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"Memos\":[{\"Memo\":{\"MemoData\":\"7465787465642064617461\",\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\"}}],\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
8
test/fixtures/responses/prepare-trustline-frozen.json
vendored
Normal file
8
test/fixtures/responses/prepare-trustline-frozen.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"txJSON": "{\"TransactionType\":\"TrustSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"LimitAmount\":{\"currency\":\"BTC\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\",\"value\":\"0.1\"},\"Flags\":2148859904,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
|
||||
"instructions": {
|
||||
"fee": "0.000012",
|
||||
"sequence": 23,
|
||||
"maxLedgerVersion": 8819954
|
||||
}
|
||||
}
|
||||
1
test/fixtures/rippled/account-offers.js
vendored
1
test/fixtures/rippled/account-offers.js
vendored
@@ -24,6 +24,7 @@ module.exports = function(request, options = {}) {
|
||||
'issuer': 'rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q',
|
||||
'value': '17.70155237781915'
|
||||
},
|
||||
'quality': '63.44025128030504',
|
||||
'taker_pays': {
|
||||
'currency': 'USD',
|
||||
'issuer': 'rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q',
|
||||
|
||||
31
test/fixtures/rippled/book-offers-1.json
vendored
Normal file
31
test/fixtures/rippled/book-offers-1.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"id": 0,
|
||||
"result": {
|
||||
"ledger_hash": "36783BEDBDEFC0402EB5347B8D9545AC69E70B0F14A95E0879CE2D3C2B4CE748",
|
||||
"ledger_index": 13,
|
||||
"offers": [
|
||||
{
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"BookDirectory": "A118405CF7C2C89AB0CC084417187B86870DC14325C861A0561BB6E89EFF509C",
|
||||
"BookNode": "0000000000000000",
|
||||
"Flags": 131072,
|
||||
"LedgerEntryType": "Offer",
|
||||
"OwnerNode": "0000000000000000",
|
||||
"PreviousTxnID": "CFB5786459E568DFC504E7319C515658DED657A7F4EFB5957B33E5E3BD9A1353",
|
||||
"PreviousTxnLgrSeq": 13,
|
||||
"Sequence": 6,
|
||||
"TakerPays": "134000000",
|
||||
"TakerGets": {
|
||||
"currency": "USD",
|
||||
"issuer": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"value": "10453252347.1"
|
||||
},
|
||||
"index": "C72CDC1BA4DA529B062871F22C6D175A4D97D4F1160D0D7E646E60699278B5B5",
|
||||
"quality": "78.0093458738806"
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
32
test/fixtures/rippled/book-offers-2.json
vendored
Normal file
32
test/fixtures/rippled/book-offers-2.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"id": 3,
|
||||
"result": {
|
||||
"ledger_hash": "36783BEDBDEFC0402EB5347B8D9545AC69E70B0F14A95E0879CE2D3C2B4CE748",
|
||||
"ledger_index": 13,
|
||||
"offers": [
|
||||
{
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"BookDirectory": "A118405CF7C2C89AB0CC084417187B86870DC14325C861A0470E1AEE5CBE20D9",
|
||||
"BookNode": "0000000000000000",
|
||||
"Flags": 0,
|
||||
"LedgerEntryType": "Offer",
|
||||
"OwnerNode": "0000000000000000",
|
||||
"PreviousTxnID": "9DD36CC7338FEB9E501A33EAAA4C00DBE4ED3A692704C62DDBD1848EE1F6E762",
|
||||
"PreviousTxnLgrSeq": 11,
|
||||
"Sequence": 5,
|
||||
"TakerGets": "254391353000000",
|
||||
"TakerPays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"value": "10.1"
|
||||
},
|
||||
"index": "BF656DABDD84E6128A45039F8D557C9477D4DA31F5B00868F2191F0A11FE3798",
|
||||
"owner_funds": "99999998959999928",
|
||||
"quality": "3970260734451929e-29"
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
58
test/fixtures/rippled/get-transactions-one.json
vendored
Normal file
58
test/fixtures/rippled/get-transactions-one.json
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"ledger_index_max": 17207682,
|
||||
"ledger_index_min": 16462279,
|
||||
"limit": 400,
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b",
|
||||
"Balance": "71515076",
|
||||
"Domain": "726970706C652E636F6D",
|
||||
"Flags": 65536,
|
||||
"OwnerCount": 3,
|
||||
"RegularKey": "rsvEdWvfwzqkgvmaSEh9kgbcWiUc6s69ZC",
|
||||
"Sequence": 492
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "4AD70690C6FF8A069F8AE00B09F70E9B732360026E8085050D314432091A59C9",
|
||||
"PreviousFields": {
|
||||
"Balance": "71527076",
|
||||
"Sequence": 491
|
||||
},
|
||||
"PreviousTxnID": "9B093C92C94EC9E492631B21E2DF45A9142C1BC39B60F3E5C4018DBAA164A423",
|
||||
"PreviousTxnLgrSeq": 16318991
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 4,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b",
|
||||
"Domain": "726970706C652E636F6D",
|
||||
"Fee": "12000",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 16635157,
|
||||
"Sequence": 491,
|
||||
"SigningPubKey": "036A749E3B7187E43E8936E3D83A7030989325249E03803F12B7F64BAACABA6025",
|
||||
"TransactionType": "AccountSet",
|
||||
"TxnSignature": "3044022060C8F4CDD6092B539612790705B967E68111BC270B6B80AF23DF7B33E4C77137022059D9A8AA81052B7348F2728B263E2CCBEBE32880C54936D335F8125C6ED2F90E",
|
||||
"date": 498881220,
|
||||
"hash": "D868CFF0DF8C8AAF205404460EA764ACB3B8862527FA414BC8C1CA9A45B1F276",
|
||||
"inLedger": 16635149,
|
||||
"ledger_index": 16635149
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
14
test/fixtures/rippled/index.js
vendored
14
test/fixtures/rippled/index.js
vendored
@@ -9,6 +9,7 @@ module.exports = {
|
||||
ledgerNotFound: require('./ledger-not-found'),
|
||||
ledgerWithoutCloseTime: require('./ledger-without-close-time'),
|
||||
ledgerWithSettingsTx: require('./ledger-with-settings-tx'),
|
||||
ledgerWithStateAsHashes: require('./ledger-with-state-as-hashes'),
|
||||
subscribe: require('./subscribe'),
|
||||
unsubscribe: require('./unsubscribe'),
|
||||
account_info: {
|
||||
@@ -17,8 +18,11 @@ module.exports = {
|
||||
},
|
||||
account_offers: require('./account-offers'),
|
||||
account_tx: require('./account-tx'),
|
||||
account_tx_one: require('./get-transactions-one'),
|
||||
gateway_balances: require('./gateway-balances'),
|
||||
book_offers: require('./book-offers'),
|
||||
book_offers_1: require('./book-offers-1'),
|
||||
book_offers_2: require('./book-offers-2'),
|
||||
server_info: require('./server-info'),
|
||||
server_info_error: require('./server-info-error'),
|
||||
path_find: {
|
||||
@@ -35,6 +39,7 @@ module.exports = {
|
||||
AccountSetTrackingOff: require('./tx/account-set-tracking-off.json'),
|
||||
RegularKey: require('./tx/set-regular-key.json'),
|
||||
OfferCreate: require('./tx/offer-create.json'),
|
||||
OfferCreateSell: require('./tx/offer-create-sell.json'),
|
||||
OfferCancel: require('./tx/offer-cancel.json'),
|
||||
TrustSet: require('./tx/trust-set.json'),
|
||||
TrustSetFrozenOff: require('./tx/trust-set-frozen-off.json'),
|
||||
@@ -46,8 +51,15 @@ module.exports = {
|
||||
NotValidated: require('./tx/not-validated.json'),
|
||||
OfferWithExpiration: require('./tx/order-with-expiration.json'),
|
||||
SuspendedPaymentCreation: require('./tx/suspended-payment-creation.json'),
|
||||
SuspendedPaymentCreationIOU:
|
||||
require('./tx/suspended-payment-creation-iou.json'),
|
||||
SuspendedPaymentCancellation:
|
||||
require('./tx/suspended-payment-cancellation.json'),
|
||||
SuspendedPaymentExecution: require('./tx/suspended-payment-execution.json')
|
||||
SuspendedPaymentExecution: require('./tx/suspended-payment-execution.json'),
|
||||
SuspendedPaymentExecutionSimple:
|
||||
require('./tx/suspended-payment-execution-simple.json'),
|
||||
Unrecognized: require('./tx/unrecognized.json'),
|
||||
NoMeta: require('./tx/no-meta.json'),
|
||||
LedgerZero: require('./tx/ledger-zero.json')
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
{
|
||||
"Account": "rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38",
|
||||
"Fee": "10",
|
||||
"ledger_index": 4181996,
|
||||
"Flags": 0,
|
||||
"Sequence": 6478,
|
||||
"SigningPubKey": "02CAB6F3A798712136DB5F105A98B0DE27C99AEDB68500181706B087CF1B6D0F2D",
|
||||
|
||||
33
test/fixtures/rippled/ledger-with-state-as-hashes.json
vendored
Normal file
33
test/fixtures/rippled/ledger-with-state-as-hashes.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id": 2,
|
||||
"result": {
|
||||
"ledger": {
|
||||
"accepted": true,
|
||||
"accountState": [
|
||||
"2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
|
||||
"8B24E55376A65D68542C17F3BF446231AC7062CB43BED28817570128A1849819",
|
||||
"B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B"
|
||||
],
|
||||
"account_hash": "8DBB7FA4036704D96AD32A4573BEE461FDDBDCB1B6F62CB17EDB5182F52AE9F1",
|
||||
"close_flags": 0,
|
||||
"close_time": 501159630,
|
||||
"close_time_human": "2015-Nov-18 11:00:30",
|
||||
"close_time_resolution": 30,
|
||||
"closed": true,
|
||||
"ledger_hash": "3D7115EDB5EC72FEF4ADDF46CA5B7770CBDECEAB3A97EA210BCC04E8C54A7CEE",
|
||||
"parent_close_time": 501148381,
|
||||
"parent_hash": "6D36AEFD3639EE22A27DDE0FA6C57525D103941F11D7FD6D91AC8D439DE2B3EE",
|
||||
"seqNum": "6",
|
||||
"totalCoins": "99999999999999964",
|
||||
"transaction_hash": "B8D716B82BFFF4186BBBE7B7341AE0E1CBD2558952408B96E925EC0A51A6AEC2",
|
||||
"transactions": [
|
||||
"B22E27F35F3F7679F76A474E4FF8E71EFA21B313DF2FC6678037A053A00FD084"
|
||||
]
|
||||
},
|
||||
"ledger_hash": "3D7115EDB5EC72FEF4ADDF46CA5B7770CBDECEAB3A97EA210BCC04E8C54A7CEE",
|
||||
"ledger_index": 6,
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
46
test/fixtures/rippled/tx/ledger-zero.json
vendored
Normal file
46
test/fixtures/rippled/tx/ledger-zero.json
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"Account": "rLVKsA4F9iJBbA6rX2x4wCmkj6drgtqpQe",
|
||||
"Fee": "10",
|
||||
"Flags": 2147483648,
|
||||
"Sequence": 1,
|
||||
"SetFlag": 2,
|
||||
"SigningPubKey": "03EA3ADCA632F125EC2CC4F7F6A82DE0DCE2B65290CAC1F22242C5163F0DA9652D",
|
||||
"TransactionType": "AccountSet",
|
||||
"TxnSignature": "3045022100DE8B666B1A31EA65011B0F32130AB91A5747E32FA49B3054CEE8E8362DBAB98A022040CF0CF254677A8E5CD04C59CA2ED7F6F15F7E184641BAE169C561650967B226",
|
||||
"date": 460832270,
|
||||
"hash": "4FB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA13",
|
||||
"inLedger": 0,
|
||||
"ledger_index": 0,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLVKsA4F9iJBbA6rX2x4wCmkj6drgtqpQe",
|
||||
"Balance": "29999990",
|
||||
"Flags": 786432,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 2
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "3F5072C4875F32ED770DAF3610A716600ED7C7BB0348FADC7A98E011BB2CD36F",
|
||||
"PreviousFields": {
|
||||
"Balance": "30000000",
|
||||
"Flags": 4194304,
|
||||
"Sequence": 1
|
||||
},
|
||||
"PreviousTxnID": "3FB0350A3742BBCC0D8AA3C5247D1AEC01177D0A24D9C34762BAA2FEA8AD88B3",
|
||||
"PreviousTxnLgrSeq": 8206397
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 5,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
44
test/fixtures/rippled/tx/no-meta.json
vendored
Normal file
44
test/fixtures/rippled/tx/no-meta.json
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Amount": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"value": "0.001"
|
||||
},
|
||||
"Destination": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"Fee": "10",
|
||||
"Flags": 0,
|
||||
"Paths": [
|
||||
[
|
||||
{
|
||||
"currency": "USD",
|
||||
"issuer": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"type": 48,
|
||||
"type_hex": "0000000000000030"
|
||||
},
|
||||
{
|
||||
"account": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"currency": "USD",
|
||||
"issuer": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"type": 49,
|
||||
"type_hex": "0000000000000031"
|
||||
}
|
||||
]
|
||||
],
|
||||
"SendMax": "1112209",
|
||||
"Sequence": 4,
|
||||
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "304502204EE3E9D1B01D8959B08450FCA9E22025AF503DEF310E34A93863A85CAB3C0BC5022100B61F5B567F77026E8DEED89EED0B7CAF0E6C96C228A2A65216F0DC2D04D52083",
|
||||
"date": 416447810,
|
||||
"hash": "AFB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA1B",
|
||||
"inLedger": 348860,
|
||||
"ledger_index": 348860,
|
||||
"validated": true,
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
51
test/fixtures/rippled/tx/offer-create-sell.json
vendored
Normal file
51
test/fixtures/rippled/tx/offer-create-sell.json
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"id": 0,
|
||||
"result": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Fee": "12",
|
||||
"Flags": 2148007936,
|
||||
"LastLedgerSequence": 105,
|
||||
"Sequence": 2,
|
||||
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
|
||||
"TakerGets": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM",
|
||||
"value": "10.1"
|
||||
},
|
||||
"TakerPays": "254391353000000",
|
||||
"TransactionType": "OfferCreate",
|
||||
"TxnSignature": "30440221008C13CA1BD56431B643FD145CDE7BE1805424B48FDF40E0D1A8C2FD53FAACA974021F6393721438C01B9E3138D55469049C8B72B4F6A4508ACA3C0036788C300459",
|
||||
"date": 501195390,
|
||||
"hash": "458101D51051230B1D56E9ACAFAA34451BF65FA000F95DF6F0FF5B3A62D83FC2",
|
||||
"inLedger": 6,
|
||||
"ledger_index": 6,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Balance": "99999999259999976",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 3
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
|
||||
"PreviousFields": {
|
||||
"Balance": "99999999259999988",
|
||||
"Sequence": 2
|
||||
},
|
||||
"PreviousTxnID": "4BF785A253AB67875973EE79B3ED939DF371B435696D09F8BE2FB2DADA1BFAB7",
|
||||
"PreviousTxnLgrSeq": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tecUNFUNDED_OFFER"
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
97
test/fixtures/rippled/tx/suspended-payment-creation-iou.json
vendored
Normal file
97
test/fixtures/rippled/tx/suspended-payment-creation-iou.json
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"id": 0,
|
||||
"result": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Amount": {"value": "2", "issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "currency": "USD"},
|
||||
"CancelAfter": 500972022,
|
||||
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"DestinationTag": 2,
|
||||
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
|
||||
"Fee": "12",
|
||||
"FinishAfter": 500971662,
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 114,
|
||||
"Memos": [
|
||||
{
|
||||
"Memo": {
|
||||
"MemoData": "6D656D612064617461",
|
||||
"MemoFormat": "746578742F706C61696E",
|
||||
"MemoType": "7832"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Sequence": 10,
|
||||
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
|
||||
"SourceTag": 1,
|
||||
"TransactionType": "SuspendedPaymentCreate",
|
||||
"TxnSignature": "3045022100EA1C5433AFA3F0BAAAF7C4146B032B86A0212EB4E2A3551DE9717651A538AE260220228C9E9FC857EC8143F01C2F959A8F134B285B67D8261B49E57BFF8DF76D2255",
|
||||
"date": 500971380,
|
||||
"hash": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2",
|
||||
"inLedger": 15,
|
||||
"ledger_index": 15,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "SuspendedPayment",
|
||||
"LedgerIndex": "0D7629A23BC20F25C48D9423E2485582255A74B76A25F26EDB46766982E4C2C4",
|
||||
"NewFields": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Amount": "2",
|
||||
"CancelAfter": 500972022,
|
||||
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"DestinationTag": 2,
|
||||
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
|
||||
"FinishAfter": 500971662,
|
||||
"SourceTag": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Balance": "99999997964999876",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 3,
|
||||
"Sequence": 11
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
|
||||
"PreviousFields": {
|
||||
"Balance": "99999997964999890",
|
||||
"OwnerCount": 2,
|
||||
"Sequence": 10
|
||||
},
|
||||
"PreviousTxnID": "F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22",
|
||||
"PreviousTxnLgrSeq": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "8B24E55376A65D68542C17F3BF446231AC7062CB43BED28817570128A1849819",
|
||||
"PreviousTxnID": "F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22",
|
||||
"PreviousTxnLgrSeq": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"RootIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
99
test/fixtures/rippled/tx/suspended-payment-execution-simple.json
vendored
Normal file
99
test/fixtures/rippled/tx/suspended-payment-execution-simple.json
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"id": 0,
|
||||
"result": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
|
||||
"Fee": "12",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 113,
|
||||
"Method": 1,
|
||||
"OfferSequence": 5,
|
||||
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Sequence": 6,
|
||||
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
|
||||
"TransactionType": "SuspendedPaymentFinish",
|
||||
"TxnSignature": "304402204E981802BA2F4C3677E69B26387CC157284D31886CF95B73A8AB3E717FE6A6490220519CD84CA01BA5D7A49809B041929F12D56F32E76FAE73F0FAFF7B5E7B8B110B",
|
||||
"date": 501040060,
|
||||
"hash": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931",
|
||||
"inLedger": 14,
|
||||
"ledger_index": 14,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Balance": "99999999239999842",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 7
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
|
||||
"PreviousFields": {
|
||||
"Balance": "99999999239999854",
|
||||
"OwnerCount": 1,
|
||||
"Sequence": 6
|
||||
},
|
||||
"PreviousTxnID": "22E0E87BAD4832CFD2B49409D488E5F92DD38424FD1781602277585914120C1E",
|
||||
"PreviousTxnLgrSeq": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"Balance": "760000086",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 1
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "8B24E55376A65D68542C17F3BF446231AC7062CB43BED28817570128A1849819",
|
||||
"PreviousFields": {
|
||||
"Balance": "750000043"
|
||||
},
|
||||
"PreviousTxnID": "22E0E87BAD4832CFD2B49409D488E5F92DD38424FD1781602277585914120C1E",
|
||||
"PreviousTxnLgrSeq": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"Amount": "10000043",
|
||||
"CancelAfter": 501079458,
|
||||
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
|
||||
"DestinationTag": 2,
|
||||
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
|
||||
"FinishAfter": 501039918,
|
||||
"Flags": 0,
|
||||
"OwnerNode": "0000000000000000",
|
||||
"PreviousTxnID": "22E0E87BAD4832CFD2B49409D488E5F92DD38424FD1781602277585914120C1E",
|
||||
"PreviousTxnLgrSeq": 12,
|
||||
"SourceTag": 1
|
||||
},
|
||||
"LedgerEntryType": "SuspendedPayment",
|
||||
"LedgerIndex": "AA7D93BDB975252718205C98792BF8940E3FC6E6972213F451AB5D602E8AD971"
|
||||
}
|
||||
},
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
|
||||
"RootIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
46
test/fixtures/rippled/tx/unrecognized.json
vendored
Normal file
46
test/fixtures/rippled/tx/unrecognized.json
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"Account": "rLVKsA4F9iJBbA6rX2x4wCmkj6drgtqpQe",
|
||||
"Fee": "10",
|
||||
"Flags": 2147483648,
|
||||
"Sequence": 1,
|
||||
"SetFlag": 2,
|
||||
"SigningPubKey": "03EA3ADCA632F125EC2CC4F7F6A82DE0DCE2B65290CAC1F22242C5163F0DA9652D",
|
||||
"TransactionType": "Unrecognized",
|
||||
"TxnSignature": "3045022100DE8B666B1A31EA65011B0F32130AB91A5747E32FA49B3054CEE8E8362DBAB98A022040CF0CF254677A8E5CD04C59CA2ED7F6F15F7E184641BAE169C561650967B226",
|
||||
"date": 460832270,
|
||||
"hash": "AFB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA11",
|
||||
"inLedger": 8206418,
|
||||
"ledger_index": 8206418,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLVKsA4F9iJBbA6rX2x4wCmkj6drgtqpQe",
|
||||
"Balance": "29999990",
|
||||
"Flags": 786432,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 2
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "3F5072C4875F32ED770DAF3610A716600ED7C7BB0348FADC7A98E011BB2CD36F",
|
||||
"PreviousFields": {
|
||||
"Balance": "30000000",
|
||||
"Flags": 4194304,
|
||||
"Sequence": 1
|
||||
},
|
||||
"PreviousTxnID": "3FB0350A3742BBCC0D8AA3C5247D1AEC01177D0A24D9C34762BAA2FEA8AD88B3",
|
||||
"PreviousTxnLgrSeq": 8206397
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 5,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user