Socket
Socket
Sign inDemoInstall

ripple-binary-codec

Package Overview
Dependencies
Maintainers
13
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 2.0.0 to 2.1.0

114

dist/enums/src/enums/definitions.json

@@ -26,2 +26,3 @@ {

"XChainBridge": 25,
"Currency": 26,
"Transaction": 10001,

@@ -55,2 +56,3 @@ "LedgerEntry": 10002,

"DID": 73,
"Oracle": 128,
"Any": -3,

@@ -214,2 +216,12 @@ "Child": -2,

[
"Scale",
{
"nth": 4,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt8"
}
],
[
"TickSize",

@@ -505,2 +517,12 @@ {

[
"LastUpdateTime",
{
"nth": 15,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"HighQualityIn",

@@ -836,2 +858,12 @@ {

[
"OracleDocumentID",
{
"nth": 51,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"IndexNext",

@@ -1037,2 +1069,12 @@ {

[
"AssetPrice",
{
"nth": 23,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt64"
}
],
[
"EmailHash",

@@ -1928,2 +1970,22 @@ {

[
"AssetClass",
{
"nth": 28,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Provider",
{
"nth": 29,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Account",

@@ -2139,2 +2201,22 @@ {

[
"BaseAsset",
{
"nth": 1,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Currency"
}
],
[
"QuoteAsset",
{
"nth": 2,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Currency"
}
],
[
"LockingChainIssue",

@@ -2470,2 +2552,12 @@ {

[
"PriceData",
{
"nth": 32,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STObject"
}
],
[
"Signers",

@@ -2641,2 +2733,12 @@ {

[
"PriceDataSeries",
{
"nth": 24,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STArray"
}
],
[
"AuthAccounts",

@@ -2669,2 +2771,3 @@ {

"telNETWORK_ID_MAKES_TX_NON_CANONICAL": -384,
"telENV_RPC_FAILED": -383,

@@ -2717,2 +2820,4 @@ "temMALFORMED": -299,

"temEMPTY_DID": -254,
"temARRAY_EMPTY": -253,
"temARRAY_TOO_LARGE": -252,

@@ -2754,3 +2859,2 @@ "tefFAILURE": -199,

"terNO_AMM": -87,
"terSUBMITTED": -86,

@@ -2831,3 +2935,7 @@ "tesSUCCESS": 0,

"tecXCHAIN_CREATE_ACCOUNT_DISABLED": 186,
"tecEMPTY_DID": 187
"tecEMPTY_DID": 187,
"tecINVALID_UPDATE_TIME": 188,
"tecTOKEN_PAIR_NOT_FOUND": 189,
"tecARRAY_EMPTY": 190,
"tecARRAY_TOO_LARGE": 191
},

@@ -2881,2 +2989,4 @@ "TRANSACTION_TYPES": {

"DIDDelete": 50,
"OracleSet": 51,
"OracleDelete": 52,
"EnableAmendment": 100,

@@ -2883,0 +2993,0 @@ "SetFee": 101,

4

dist/serdes/binary-parser.js

@@ -126,3 +126,3 @@ "use strict";

if (type === 0 || type < 16) {
throw new Error('Cannot read FieldOrdinal, type_code out of range');
throw new Error(`Cannot read FieldOrdinal, type_code ${type} out of range`);
}

@@ -133,3 +133,3 @@ }

if (nth === 0 || nth < 16) {
throw new Error('Cannot read FieldOrdinal, field_code out of range');
throw new Error(`Cannot read FieldOrdinal, field_code ${nth} out of range`);
}

@@ -136,0 +136,0 @@ }

@@ -126,3 +126,3 @@ "use strict";

if (type === 0 || type < 16) {
throw new Error('Cannot read FieldOrdinal, type_code out of range');
throw new Error(`Cannot read FieldOrdinal, type_code ${type} out of range`);
}

@@ -133,3 +133,3 @@ }

if (nth === 0 || nth < 16) {
throw new Error('Cannot read FieldOrdinal, field_code out of range');
throw new Error(`Cannot read FieldOrdinal, field_code ${nth} out of range`);
}

@@ -136,0 +136,0 @@ }

@@ -34,2 +34,5 @@ "use strict";

if (typeof value === 'string') {
if (!/^[A-F0-9]*$/iu.test(value)) {
throw new Error('Cannot construct Blob from a non-hex string');
}
return new Blob((0, utils_1.hexToBytes)(value));

@@ -36,0 +39,0 @@ }

@@ -16,3 +16,6 @@ "use strict";

function isObjects(args) {
return (Array.isArray(args) && (args.length === 0 || typeof args[0] === 'object'));
return (Array.isArray(args) &&
args.every((arg) => typeof arg === 'object' &&
Object.keys(arg).length === 1 &&
typeof Object.values(arg)[0] === 'object'));
}

@@ -19,0 +22,0 @@ /**

@@ -34,2 +34,5 @@ "use strict";

if (typeof value === 'string') {
if (!/^[A-F0-9]*$/iu.test(value)) {
throw new Error('Cannot construct Blob from a non-hex string');
}
return new Blob((0, utils_1.hexToBytes)(value));

@@ -36,0 +39,0 @@ }

@@ -16,3 +16,6 @@ "use strict";

function isObjects(args) {
return (Array.isArray(args) && (args.length === 0 || typeof args[0] === 'object'));
return (Array.isArray(args) &&
args.every((arg) => typeof arg === 'object' &&
Object.keys(arg).length === 1 &&
typeof Object.values(arg)[0] === 'object'));
}

@@ -19,0 +22,0 @@ /**

{
"name": "ripple-binary-codec",
"version": "2.0.0",
"version": "2.1.0",
"description": "XRP Ledger binary codec",

@@ -14,3 +14,3 @@ "files": [

"dependencies": {
"@xrplf/isomorphic": "^1.0.0",
"@xrplf/isomorphic": "^1.0.1",
"bignumber.js": "^9.0.0",

@@ -47,3 +47,3 @@ "ripple-address-codec": "^5.0.0"

},
"gitHead": "a09084289b2ba61eff2363773379573584e084d1"
"gitHead": "92849e57cef5fdd3744af347f2ad051a7735f16e"
}

@@ -26,2 +26,3 @@ {

"XChainBridge": 25,
"Currency": 26,
"Transaction": 10001,

@@ -55,2 +56,3 @@ "LedgerEntry": 10002,

"DID": 73,
"Oracle": 128,
"Any": -3,

@@ -214,2 +216,12 @@ "Child": -2,

[
"Scale",
{
"nth": 4,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt8"
}
],
[
"TickSize",

@@ -505,2 +517,12 @@ {

[
"LastUpdateTime",
{
"nth": 15,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"HighQualityIn",

@@ -836,2 +858,12 @@ {

[
"OracleDocumentID",
{
"nth": 51,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"IndexNext",

@@ -1037,2 +1069,12 @@ {

[
"AssetPrice",
{
"nth": 23,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt64"
}
],
[
"EmailHash",

@@ -1928,2 +1970,22 @@ {

[
"AssetClass",
{
"nth": 28,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Provider",
{
"nth": 29,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Account",

@@ -2139,2 +2201,22 @@ {

[
"BaseAsset",
{
"nth": 1,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Currency"
}
],
[
"QuoteAsset",
{
"nth": 2,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "Currency"
}
],
[
"LockingChainIssue",

@@ -2470,2 +2552,12 @@ {

[
"PriceData",
{
"nth": 32,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STObject"
}
],
[
"Signers",

@@ -2641,2 +2733,12 @@ {

[
"PriceDataSeries",
{
"nth": 24,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STArray"
}
],
[
"AuthAccounts",

@@ -2669,2 +2771,3 @@ {

"telNETWORK_ID_MAKES_TX_NON_CANONICAL": -384,
"telENV_RPC_FAILED": -383,

@@ -2717,2 +2820,4 @@ "temMALFORMED": -299,

"temEMPTY_DID": -254,
"temARRAY_EMPTY": -253,
"temARRAY_TOO_LARGE": -252,

@@ -2754,3 +2859,2 @@ "tefFAILURE": -199,

"terNO_AMM": -87,
"terSUBMITTED": -86,

@@ -2831,3 +2935,7 @@ "tesSUCCESS": 0,

"tecXCHAIN_CREATE_ACCOUNT_DISABLED": 186,
"tecEMPTY_DID": 187
"tecEMPTY_DID": 187,
"tecINVALID_UPDATE_TIME": 188,
"tecTOKEN_PAIR_NOT_FOUND": 189,
"tecARRAY_EMPTY": 190,
"tecARRAY_TOO_LARGE": 191
},

@@ -2881,2 +2989,4 @@ "TRANSACTION_TYPES": {

"DIDDelete": 50,
"OracleSet": 51,
"OracleDelete": 52,
"EnableAmendment": 100,

@@ -2883,0 +2993,0 @@ "SetFee": 101,

@@ -147,3 +147,5 @@ import {

if (type === 0 || type < 16) {
throw new Error('Cannot read FieldOrdinal, type_code out of range')
throw new Error(
`Cannot read FieldOrdinal, type_code ${type} out of range`,
)
}

@@ -155,3 +157,5 @@ }

if (nth === 0 || nth < 16) {
throw new Error('Cannot read FieldOrdinal, field_code out of range')
throw new Error(
`Cannot read FieldOrdinal, field_code ${nth} out of range`,
)
}

@@ -158,0 +162,0 @@ }

@@ -36,2 +36,5 @@ import { SerializedType } from './serialized-type'

if (typeof value === 'string') {
if (!/^[A-F0-9]*$/iu.test(value)) {
throw new Error('Cannot construct Blob from a non-hex string')
}
return new Blob(hexToBytes(value))

@@ -38,0 +41,0 @@ }

@@ -17,3 +17,9 @@ import { DEFAULT_DEFINITIONS, XrplDefinitionsBase } from '../enums'

return (
Array.isArray(args) && (args.length === 0 || typeof args[0] === 'object')
Array.isArray(args) &&
args.every(
(arg) =>
typeof arg === 'object' &&
Object.keys(arg).length === 1 &&
typeof Object.values(arg)[0] === 'object',
)
)

@@ -20,0 +26,0 @@ }

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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