Replace suspended payments with escrow

This commit is contained in:
wilsonianb
2017-03-22 10:29:49 -07:00
parent 68d7864f93
commit 15a0ededc8
55 changed files with 379 additions and 391 deletions

View File

@@ -266,57 +266,57 @@ describe('RippleAPI', function() {
'prepare'));
});
it('prepareSuspendedPaymentCreation', function() {
it('prepareEscrowCreation', function() {
const localInstructions = _.defaults({
maxFee: '0.000012'
}, instructions);
return this.api.prepareSuspendedPaymentCreation(
address, requests.prepareSuspendedPaymentCreation.normal,
return this.api.prepareEscrowCreation(
address, requests.prepareEscrowCreation.normal,
localInstructions).then(
_.partial(checkResult, responses.prepareSuspendedPaymentCreation.normal,
_.partial(checkResult, responses.prepareEscrowCreation.normal,
'prepare'));
});
it('prepareSuspendedPaymentCreation full', function() {
return this.api.prepareSuspendedPaymentCreation(
address, requests.prepareSuspendedPaymentCreation.full).then(
_.partial(checkResult, responses.prepareSuspendedPaymentCreation.full,
it('prepareEscrowCreation full', function() {
return this.api.prepareEscrowCreation(
address, requests.prepareEscrowCreation.full).then(
_.partial(checkResult, responses.prepareEscrowCreation.full,
'prepare'));
});
it('prepareSuspendedPaymentExecution', function() {
return this.api.prepareSuspendedPaymentExecution(
it('prepareEscrowExecution', function() {
return this.api.prepareEscrowExecution(
address,
requests.prepareSuspendedPaymentExecution.normal, instructions).then(
requests.prepareEscrowExecution.normal, instructions).then(
_.partial(checkResult,
responses.prepareSuspendedPaymentExecution.normal,
responses.prepareEscrowExecution.normal,
'prepare'));
});
it('prepareSuspendedPaymentExecution - simple', function() {
return this.api.prepareSuspendedPaymentExecution(
it('prepareEscrowExecution - simple', function() {
return this.api.prepareEscrowExecution(
address,
requests.prepareSuspendedPaymentExecution.simple).then(
requests.prepareEscrowExecution.simple).then(
_.partial(checkResult,
responses.prepareSuspendedPaymentExecution.simple,
responses.prepareEscrowExecution.simple,
'prepare'));
});
it('prepareSuspendedPaymentCancellation', function() {
return this.api.prepareSuspendedPaymentCancellation(
it('prepareEscrowCancellation', function() {
return this.api.prepareEscrowCancellation(
address,
requests.prepareSuspendedPaymentCancellation.normal, instructions).then(
requests.prepareEscrowCancellation.normal, instructions).then(
_.partial(checkResult,
responses.prepareSuspendedPaymentCancellation.normal,
responses.prepareEscrowCancellation.normal,
'prepare'));
});
it('prepareSuspendedPaymentCancellation with memos', function() {
return this.api.prepareSuspendedPaymentCancellation(
it('prepareEscrowCancellation with memos', function() {
return this.api.prepareEscrowCancellation(
address,
requests.prepareSuspendedPaymentCancellation.memos).then(
requests.prepareEscrowCancellation.memos).then(
_.partial(checkResult,
responses.prepareSuspendedPaymentCancellation.memos,
responses.prepareEscrowCancellation.memos,
'prepare'));
});
@@ -336,10 +336,10 @@ describe('RippleAPI', function() {
}, /txJSON must not contain "TxnSignature" or "Signers" properties/);
});
it('sign - SuspendedPaymentExecution', function() {
it('sign - EscrowExecution', function() {
const secret = 'snoPBrXtMeMyMHUVTgbuqAfg1SUTb';
const result = this.api.sign(requests.sign.suspended.txJSON, secret);
assert.deepEqual(result, responses.sign.suspended);
const result = this.api.sign(requests.sign.escrow.txJSON, secret);
assert.deepEqual(result, responses.sign.escrow);
schemaValidator.schemaValidate('sign', result);
});
@@ -640,34 +640,34 @@ describe('RippleAPI', function() {
});
});
it('getTransaction - SuspendedPaymentCreation', function() {
it('getTransaction - EscrowCreation', function() {
const hash =
'144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE1';
return this.api.getTransaction(hash).then(
_.partial(checkResult,
responses.getTransaction.suspendedPaymentCreation,
responses.getTransaction.escrowCreation,
'getTransaction'));
});
it('getTransaction - SuspendedPaymentCreation iou', function() {
it('getTransaction - EscrowCreation iou', function() {
const hash =
'144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2';
return this.api.getTransaction(hash).then(
_.partial(checkResult,
responses.getTransaction.SuspendedPaymentCreationIOU,
responses.getTransaction.EscrowCreationIOU,
'getTransaction'));
});
it('getTransaction - SuspendedPaymentCancellation', function() {
it('getTransaction - EscrowCancellation', function() {
const hash =
'F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22';
return this.api.getTransaction(hash).then(
_.partial(checkResult,
responses.getTransaction.suspendedPaymentCancellation,
responses.getTransaction.escrowCancellation,
'getTransaction'));
});
it('getTransaction - SuspendedPaymentExecution', function() {
it('getTransaction - EscrowExecution', function() {
const options = {
minLedgerVersion: 10,
maxLedgerVersion: 15
@@ -676,16 +676,16 @@ describe('RippleAPI', function() {
'CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD136993B';
return this.api.getTransaction(hash, options).then(
_.partial(checkResult,
responses.getTransaction.suspendedPaymentExecution,
responses.getTransaction.escrowExecution,
'getTransaction'));
});
it('getTransaction - SuspendedPaymentExecution simple', function() {
it('getTransaction - EscrowExecution simple', function() {
const hash =
'CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931';
return this.api.getTransaction(hash).then(
_.partial(checkResult,
responses.getTransaction.suspendedPaymentExecutionSimple,
responses.getTransaction.escrowExecutionSimple,
'getTransaction'));
});

View File

@@ -24,17 +24,17 @@ module.exports = {
domain: require('./prepare-settings'),
signers: require('./prepare-settings-signers')
},
prepareSuspendedPaymentCreation: {
normal: require('./prepare-suspended-payment-creation'),
full: require('./prepare-suspended-payment-creation-full')
prepareEscrowCreation: {
normal: require('./prepare-escrow-creation'),
full: require('./prepare-escrow-creation-full')
},
prepareSuspendedPaymentExecution: {
normal: require('./prepare-suspended-payment-execution'),
simple: require('./prepare-suspended-payment-execution-simple')
prepareEscrowExecution: {
normal: require('./prepare-escrow-execution'),
simple: require('./prepare-escrow-execution-simple')
},
prepareSuspendedPaymentCancellation: {
normal: require('./prepare-suspended-payment-cancellation'),
memos: require('./prepare-suspended-payment-cancellation-memos')
prepareEscrowCancellation: {
normal: require('./prepare-escrow-cancellation'),
memos: require('./prepare-escrow-cancellation-memos')
},
prepareTrustline: {
simple: require('./prepare-trustline-simple'),
@@ -43,7 +43,7 @@ module.exports = {
},
sign: {
normal: require('./sign'),
suspended: require('./sign-suspended.json'),
escrow: require('./sign-escrow.json'),
signAs: require('./sign-as')
},
getPaths: {

View File

@@ -1,6 +1,6 @@
{
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"suspensionSequence": 1234,
"escrowSequence": 1234,
"memos": [
{
"type": "test",

View File

@@ -1,4 +1,4 @@
{
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"suspensionSequence": 1234
"escrowSequence": 1234
}

View File

@@ -17,7 +17,7 @@
},
"tag": 2
},
"digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"allowExecuteAfter": "2014-09-24T21:21:50.000Z",
"memos": [
{

View File

@@ -1,6 +1,6 @@
{
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"suspensionSequence": 1234,
"escrowSequence": 1234,
"memos": [
{
"type": "test",

View File

@@ -1,7 +1,6 @@
{
"owner": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"suspensionSequence": 1234,
"method": 1,
"digest": "712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D",
"proof": "this must have 32 characters...."
"escrowSequence": 1234,
"condition": "712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D",
"fulfillment": "this must have 32 characters...."
}

View File

@@ -1,5 +1,5 @@
{
"txJSON": "{\"TransactionType\":\"EscrowFinish\",\"Account\":\"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\",\"Owner\":\"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\",\"OfferSequence\":2,\"Method\":1,\"Digest\":\"712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D\",\"Proof\":\"74686973206D757374206861766520333220636861726163746572732E2E2E2E\",\"Flags\":2147483648,\"LastLedgerSequence\":102,\"Fee\":\"12\",\"Sequence\":1}",
"txJSON": "{\"TransactionType\":\"EscrowFinish\",\"Account\":\"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\",\"Owner\":\"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\",\"OfferSequence\":2,\"Condition\":\"712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D\",\"Fulfillment\":\"74686973206D757374206861766520333220636861726163746572732E2E2E2E\",\"Flags\":2147483648,\"LastLedgerSequence\":102,\"Fee\":\"12\",\"Sequence\":1}",
"instructions": {
"fee": "0.000012",
"sequence": 1,

View File

@@ -1,11 +1,11 @@
{
"type": "suspendedPaymentCancellation",
"type": "escrowCancellation",
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"sequence": 9,
"id": "F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22",
"specification": {
"owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"suspensionSequence": 7
"escrowSequence": 7
},
"outcome": {
"result": "tesSUCCESS",

View File

@@ -1,5 +1,5 @@
{
"type": "suspendedPaymentCreation",
"type": "escrowCreation",
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"sequence": 10,
"id": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2",
@@ -28,7 +28,7 @@
"data": "mema data"
}
],
"digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"allowCancelAfter": "2015-11-16T06:53:42.000Z",
"allowExecuteAfter": "2015-11-16T06:47:42.000Z"
},

View File

@@ -1,5 +1,5 @@
{
"type": "suspendedPaymentCreation",
"type": "escrowCreation",
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"sequence": 10,
"id": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE1",
@@ -27,7 +27,7 @@
"data": "mema data"
}
],
"digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"allowCancelAfter": "2015-11-16T06:53:42.000Z",
"allowExecuteAfter": "2015-11-16T06:47:42.000Z"
},

View File

@@ -1,13 +1,12 @@
{
"type": "suspendedPaymentExecution",
"type": "escrowExecution",
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"sequence": 6,
"id": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931",
"specification": {
"owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"suspensionSequence": 5,
"method": 1,
"digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1"
"escrowSequence": 5,
"condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1"
},
"outcome": {
"result": "tesSUCCESS",

View File

@@ -1,14 +1,13 @@
{
"type": "suspendedPaymentExecution",
"type": "escrowExecution",
"address": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"sequence": 6,
"id": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD136993B",
"specification": {
"owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"suspensionSequence": 5,
"method": 1,
"digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"proof": "whateverthis bemusthave 32 chars"
"escrowSequence": 5,
"condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"fulfillment": "whateverthis bemusthave 32 chars"
},
"outcome": {
"result": "tesSUCCESS",

View File

@@ -34,16 +34,16 @@ module.exports = {
trustlineFrozenOff: require('./get-transaction-trust-set-frozen-off.json'),
trustlineNoQuality: require('./get-transaction-trust-no-quality.json'),
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'),
suspendedPaymentExecutionSimple:
require('./get-transaction-suspended-payment-execution-simple.json'),
escrowCreation:
require('./get-transaction-escrow-create.json'),
EscrowCreationIOU:
require('./get-transaction-escrow-create-iou.json'),
escrowCancellation:
require('./get-transaction-escrow-cancellation.json'),
escrowExecution:
require('./get-transaction-escrow-execution.json'),
escrowExecutionSimple:
require('./get-transaction-escrow-execution-simple.json'),
amendment: require('./get-transaction-amendment.json'),
feeUpdate: require('./get-transaction-fee-update.json')
},
@@ -95,17 +95,17 @@ module.exports = {
noMaxLedgerVersion: require('./prepare-settings-no-maxledgerversion.json'),
signers: require('./prepare-settings-signers.json')
},
prepareSuspendedPaymentCreation: {
normal: require('./prepare-suspended-payment-creation'),
full: require('./prepare-suspended-payment-creation-full')
prepareEscrowCreation: {
normal: require('./prepare-escrow-creation'),
full: require('./prepare-escrow-creation-full')
},
prepareSuspendedPaymentExecution: {
normal: require('./prepare-suspended-payment-execution'),
simple: require('./prepare-suspended-payment-execution-simple')
prepareEscrowExecution: {
normal: require('./prepare-escrow-execution'),
simple: require('./prepare-escrow-execution-simple')
},
prepareSuspendedPaymentCancellation: {
normal: require('./prepare-suspended-payment-cancellation'),
memos: require('./prepare-suspended-payment-cancellation-memos')
prepareEscrowCancellation: {
normal: require('./prepare-escrow-cancellation'),
memos: require('./prepare-escrow-cancellation-memos')
},
prepareTrustline: {
simple: require('./prepare-trustline-simple.json'),
@@ -114,7 +114,7 @@ module.exports = {
},
sign: {
normal: require('./sign.json'),
suspended: require('./sign-suspended.json'),
escrow: require('./sign-escrow.json'),
signAs: require('./sign-as')
},
combine: {

View File

@@ -1,5 +1,5 @@
{
"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}",
"txJSON": "{\"TransactionType\":\"EscrowCancel\",\"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,

View File

@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"SuspendedPaymentCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"EscrowCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "0.000012",
"sequence": 23,

View File

@@ -1,5 +1,5 @@
{
"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}",
"txJSON": "{\"TransactionType\":\"EscrowCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\",\"value\":\"0.01\"},\"Condition\":\"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,

View File

@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"SuspendedPaymentCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"CancelAfter\":464908910,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"EscrowCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"CancelAfter\":464908910,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "0.000012",
"sequence": 23,

View File

@@ -1,5 +1,5 @@
{
"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}",
"txJSON": "{\"TransactionType\":\"EscrowFinish\",\"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,

View File

@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"SuspendedPaymentFinish\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"Method\":1,\"Digest\":\"712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D\",\"Proof\":\"74686973206D757374206861766520333220636861726163746572732E2E2E2E\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"EscrowFinish\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Owner\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":1234,\"Condition\":\"712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D\",\"Fulfillment\":\"74686973206D757374206861766520333220636861726163746572732E2E2E2E\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "0.000012",
"sequence": 23,

View File

@@ -1,4 +1,4 @@
{
"signedTransaction": "12000222800000002400000001201900000002201B000000665015712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D68400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100E1DAAD071DC0E556FEC472E0C6CABBAB064901D97FEAD61CA9990DCC17326FFC022051DF3331D340B3E635024D7B9684602EFDEE2D178AAC9E4824722B4DAB6036718114B5F762798A53D543A014CAF8B297CFF8F2F937E88214B5F762798A53D543A014CAF8B297CFF8F2F937E8021001",
"id": "D40E312D9CD2EE8C5940D1D4918E9F5778870CB2FBF1D188061EB21B2E7CF371"
"signedTransaction": "12000222800000002400000001201900000002201B0000006668400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD0207446304402205CDD40611008680E151EF6C5C70A6DFBF7977DE73800E04F1B6F1FE8688BBE3E022075DB3990E6CBF0BCD990D92FA13E3D3F95510CA2CCBAB92BD2CE288FA6F2F34870102074686973206D757374206861766520333220636861726163746572732E2E2E2E701120712C36933822AD3A3D136C5DF97AA863B69F9CE88B2D6CE6BDD11BFDE290C19D8114B5F762798A53D543A014CAF8B297CFF8F2F937E88214B5F762798A53D543A014CAF8B297CFF8F2F937E8",
"id": "E76178CD799A82BAB6EE83A70DE0060F0BDC8BDE29980F0832D791D8D9D5CACC"
}

View File

@@ -64,14 +64,14 @@ module.exports = {
LedgerWithoutTime: require('./tx/ledger-without-time.json'),
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'),
SuspendedPaymentExecutionSimple:
require('./tx/suspended-payment-execution-simple.json'),
EscrowCreation: require('./tx/escrow-creation.json'),
EscrowCreationIOU:
require('./tx/escrow-creation-iou.json'),
EscrowCancellation:
require('./tx/escrow-cancellation.json'),
EscrowExecution: require('./tx/escrow-execution.json'),
EscrowExecutionSimple:
require('./tx/escrow-execution-simple.json'),
Unrecognized: require('./tx/unrecognized.json'),
NoMeta: require('./tx/no-meta.json'),
LedgerZero: require('./tx/ledger-zero.json'),

View File

@@ -9,7 +9,7 @@
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Sequence": 9,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SuspendedPaymentCancel",
"TransactionType": "EscrowCancel",
"TxnSignature": "304502210095453956DB908E99386D12F266F48C225CD48F076773F577A4EF676F265B7A18022041E45BB638E64D92EC7FB9B99BEDE1A0B28C245804999656BDBE6043D97BB4A1",
"date": 500964620,
"hash": "F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22",
@@ -59,7 +59,7 @@
"PreviousTxnLgrSeq": 12,
"SourceTag": 1
},
"LedgerEntryType": "SuspendedPayment",
"LedgerEntryType": "Escrow",
"LedgerIndex": "B366B476EFE3A621C96835A36BFDF83C2A5B0008F0EF4A83D751380F53EFCE71"
}
},

View File

@@ -6,7 +6,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Fee": "12",
"FinishAfter": 500971662,
"Flags": 2147483648,
@@ -23,7 +23,7 @@
"Sequence": 10,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"SourceTag": 1,
"TransactionType": "SuspendedPaymentCreate",
"TransactionType": "EscrowCreate",
"TxnSignature": "3045022100EA1C5433AFA3F0BAAAF7C4146B032B86A0212EB4E2A3551DE9717651A538AE260220228C9E9FC857EC8143F01C2F959A8F134B285B67D8261B49E57BFF8DF76D2255",
"date": 500971380,
"hash": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2",
@@ -33,7 +33,7 @@
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "SuspendedPayment",
"LedgerEntryType": "Escrow",
"LedgerIndex": "0D7629A23BC20F25C48D9423E2485582255A74B76A25F26EDB46766982E4C2C4",
"NewFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
@@ -41,7 +41,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"FinishAfter": 500971662,
"SourceTag": 1
}

View File

@@ -6,7 +6,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Fee": "12",
"FinishAfter": 500971662,
"Flags": 2147483648,
@@ -23,7 +23,7 @@
"Sequence": 10,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"SourceTag": 1,
"TransactionType": "SuspendedPaymentCreate",
"TransactionType": "EscrowCreate",
"TxnSignature": "3045022100EA1C5433AFA3F0BAAAF7C4146B032B86A0212EB4E2A3551DE9717651A538AE260220228C9E9FC857EC8143F01C2F959A8F134B285B67D8261B49E57BFF8DF76D2255",
"date": 500971380,
"hash": "144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE1",
@@ -33,7 +33,7 @@
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "SuspendedPayment",
"LedgerEntryType": "Escrow",
"LedgerIndex": "0D7629A23BC20F25C48D9423E2485582255A74B76A25F26EDB46766982E4C2C4",
"NewFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
@@ -41,7 +41,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"FinishAfter": 500971662,
"SourceTag": 1
}

View File

@@ -2,16 +2,15 @@
"id": 0,
"result": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Fee": "12",
"Flags": 2147483648,
"LastLedgerSequence": 113,
"Method": 1,
"OfferSequence": 5,
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Sequence": 6,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SuspendedPaymentFinish",
"TransactionType": "EscrowFinish",
"TxnSignature": "304402204E981802BA2F4C3677E69B26387CC157284D31886CF95B73A8AB3E717FE6A6490220519CD84CA01BA5D7A49809B041929F12D56F32E76FAE73F0FAFF7B5E7B8B110B",
"date": 501040060,
"hash": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931",
@@ -65,7 +64,7 @@
"CancelAfter": 501079458,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"FinishAfter": 501039918,
"Flags": 0,
"OwnerNode": "0000000000000000",
@@ -73,7 +72,7 @@
"PreviousTxnLgrSeq": 12,
"SourceTag": 1
},
"LedgerEntryType": "SuspendedPayment",
"LedgerEntryType": "Escrow",
"LedgerIndex": "AA7D93BDB975252718205C98792BF8940E3FC6E6972213F451AB5D602E8AD971"
}
},

View File

@@ -2,17 +2,16 @@
"id": 0,
"result": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Fee": "12",
"Flags": 2147483648,
"LastLedgerSequence": 113,
"Method": 1,
"OfferSequence": 5,
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Proof": "7768617465766572746869732062656D75737468617665203332206368617273",
"Fulfillment": "7768617465766572746869732062656D75737468617665203332206368617273",
"Sequence": 6,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SuspendedPaymentFinish",
"TransactionType": "EscrowFinish",
"TxnSignature": "304402204E981802BA2F4C3677E69B26387CC157284D31886CF95B73A8AB3E717FE6A6490220519CD84CA01BA5D7A49809B041929F12D56F32E76FAE73F0FAFF7B5E7B8B110B",
"date": 501040060,
"hash": "CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD136993B",
@@ -66,7 +65,7 @@
"CancelAfter": 501079458,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Digest": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"Condition": "632F2F3E437AE720C397994A985B5D21FE186DE61523A9CA3E8709CC581671A1",
"FinishAfter": 501039918,
"Flags": 0,
"OwnerNode": "0000000000000000",
@@ -74,7 +73,7 @@
"PreviousTxnLgrSeq": 12,
"SourceTag": 1
},
"LedgerEntryType": "SuspendedPayment",
"LedgerEntryType": "Escrow",
"LedgerIndex": "AA7D93BDB975252718205C98792BF8940E3FC6E6972213F451AB5D602E8AD971"
}
},

View File

@@ -273,22 +273,20 @@ module.exports = function createMockRippled(port) {
conn.send(createResponse(request, fixtures.tx.OfferWithExpiration));
} else if (request.transaction ===
'144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE1') {
conn.send(createResponse(request, fixtures.tx.SuspendedPaymentCreation));
conn.send(createResponse(request, fixtures.tx.EscrowCreation));
} else if (request.transaction ===
'144F272380BDB4F1BD92329A2178BABB70C20F59042C495E10BF72EBFB408EE2') {
conn.send(createResponse(request,
fixtures.tx.SuspendedPaymentCreationIOU));
conn.send(createResponse(request, fixtures.tx.EscrowCreationIOU));
} else if (request.transaction ===
'F346E542FFB7A8398C30A87B952668DAB48B7D421094F8B71776DA19775A3B22') {
conn.send(createResponse(request,
fixtures.tx.SuspendedPaymentCancellation));
conn.send(createResponse(request, fixtures.tx.EscrowCancellation));
} else if (request.transaction ===
'CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD136993B') {
conn.send(createResponse(request, fixtures.tx.SuspendedPaymentExecution));
conn.send(createResponse(request, fixtures.tx.EscrowExecution));
} else if (request.transaction ===
'CC5277137B3F25EE8B86259C83CB0EAADE818505E4E9BCBF19B1AC6FD1369931') {
conn.send(createResponse(request,
fixtures.tx.SuspendedPaymentExecutionSimple));
fixtures.tx.EscrowExecutionSimple));
} else if (request.transaction ===
'AFB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA11') {
conn.send(createResponse(request, fixtures.tx.Unrecognized));