Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ripple-binary-codec

Package Overview
Dependencies
Maintainers
3
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripple-binary-codec - npm Package Compare versions

Comparing version 0.1.5 to 0.1.8

test/fixtures/escrow-cancel-binary.json

59

distrib/npm/enums/definitions.json

@@ -33,6 +33,7 @@ {

"FeeSettings": 115,
"SuspendedPayment": 117,
"Escrow": 117,
"DirectoryNode": 100,
"GeneratorMap": 103,
"Contract": 99,
"PayChannel": 120,
"Invalid": -1

@@ -907,3 +908,3 @@ },

"isSerialized": true,
"isSigningField": true,
"isSigningField": false,
"type": "Blob"

@@ -993,4 +994,14 @@ }

[
"Proof",
"Fulfillment",
{
"nth": 16,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Condition",
{
"nth": 17,

@@ -1432,2 +1443,32 @@ "isVLEncoded": true,

}
],
[
"SettleDelay",
{
"nth": 39,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"Channel",
{
"nth": 22,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Hash256"
}
],
[
"TickSize",
{
"nth": 16,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt8"
}
]

@@ -1527,3 +1568,4 @@ ],

"tecNO_LINE_INSUF_RESERVE": 126,
"terNO_AUTH": -95
"terNO_AUTH": -95,
"temBAD_TICK_SIZE": -270
},

@@ -1544,7 +1586,10 @@ "TRANSACTION_TYPES": {

"Contract": 9,
"SuspendedPaymentCreate": 1,
"SuspendedPaymentFinish": 2,
"SuspendedPaymentCancel": 4,
"EscrowCreate": 1,
"EscrowFinish": 2,
"EscrowCancel": 4,
"PaymentChannelCreate": 13,
"PaymentChannelFund": 14,
"PaymentChannelClaim": 15,
"Invalid": -1
}
}

2

package.json
{
"name": "ripple-binary-codec",
"version": "0.1.5",
"version": "0.1.8",
"description": "ripple binary codec",

@@ -5,0 +5,0 @@ "files": [

@@ -18,2 +18,30 @@ /* eslint-disable func-style */

};
const Escrow = {
create: {
tx: require('./fixtures/escrow-create-tx.json'),
binary: require('./fixtures/escrow-create-binary.json')
},
finish: {
tx: require('./fixtures/escrow-finish-tx.json'),
binary: require('./fixtures/escrow-finish-binary.json')
},
cancel: {
tx: require('./fixtures/escrow-cancel-tx.json'),
binary: require('./fixtures/escrow-cancel-binary.json')
}
}
const PaymentChannel = {
create: {
tx: require('./fixtures/payment-channel-create-tx.json'),
binary: require('./fixtures/payment-channel-create-binary.json')
},
fund: {
tx: require('./fixtures/payment-channel-fund-tx.json'),
binary: require('./fixtures/payment-channel-fund-binary.json')
},
claim: {
tx: require('./fixtures/payment-channel-claim-tx.json'),
binary: require('./fixtures/payment-channel-claim-binary.json')
}
}

@@ -110,2 +138,32 @@ function bytesListTest() {

function EscrowTest() {
it('can serialize EscrowCreate', () => {
assert.strictEqual(encode(Escrow.create.tx),
Escrow.create.binary);
});
it('can serialize EscrowFinish', () => {
assert.strictEqual(encode(Escrow.finish.tx),
Escrow.finish.binary);
});
it('can serialize EscrowCancel', () => {
assert.strictEqual(encode(Escrow.cancel.tx),
Escrow.cancel.binary);
});
}
function PaymentChannelTest() {
it('can serialize PaymentChannelCreate', () => {
assert.strictEqual(encode(PaymentChannel.create.tx),
PaymentChannel.create.binary);
});
it('can serialize PaymentChannelFund', () => {
assert.strictEqual(encode(PaymentChannel.fund.tx),
PaymentChannel.fund.binary);
});
it('can serialize PaymentChannelClaim', () => {
assert.strictEqual(encode(PaymentChannel.claim.tx),
PaymentChannel.claim.binary);
});
}
describe('Binary Serialization', function() {

@@ -118,2 +176,4 @@ describe.skip('parseLedger4320278', parseLedger4320278);

describe('SignerListSet', SignerListSetTest);
describe('Escrow', EscrowTest);
describe('PaymentChannel', PaymentChannelTest);
});

@@ -13,2 +13,8 @@ const _ = require('lodash');

TransactionType: 'Payment',
TxnSignature: '30440220718D264EF05CAED7C781FF6DE298DCAC68D002562C9BF3A07C1' +
'E721B420C0DAB02203A5A4779EF4D2CCC7BC3EF886676D803A9981B928D3B8ACA483B80' +
'ECA3CD7B9B',
Signature: '30440220718D264EF05CAED7C781FF6DE298DCAC68D002562C9BF3A07C1E72' +
'1B420C0DAB02203A5A4779EF4D2CCC7BC3EF886676D803A9981B928D3B8ACA483B80ECA' +
'3CD7B9B',
SigningPubKey:

@@ -15,0 +21,0 @@ 'ED5F5AC8B98974A3CA843326D9B88CEBD0560177B973EE0B149F782CFAA06DC66A'

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc