You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ripple-binary-codec

Package Overview
Dependencies
Maintainers
9
Versions
97
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

to
2.3.0-batch.0

src/.DS_Store

17

dist/binary.d.ts

@@ -90,2 +90,17 @@ import { BinaryParser } from './serdes/binary-parser';

}): Uint8Array;
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, };
/**
* Interface describing fields required for a Batch signer
*/
interface BatchObject extends JsonObject {
flags: number;
txIDs: string[];
}
/**
* Serialize a signingClaim
*
* @param batch A Batch object to serialize
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
* @returns the serialized object with appropriate prefix
*/
declare function signingBatchData(batch: BatchObject): Uint8Array;
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, BatchObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, signingBatchData, };
"use strict";
/* eslint-disable func-style */
Object.defineProperty(exports, "__esModule", { value: true });
exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
exports.signingBatchData = exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
const utils_1 = require("@xrplf/isomorphic/utils");

@@ -128,2 +128,29 @@ const types_1 = require("./types");

exports.multiSigningData = multiSigningData;
/**
* Serialize a signingClaim
*
* @param batch A Batch object to serialize
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
* @returns the serialized object with appropriate prefix
*/
function signingBatchData(batch) {
if (batch.flags == null) {
throw Error("No field `flags'");
}
if (batch.txIDs == null) {
throw Error('No field `txIDs`');
}
const prefix = hash_prefixes_1.HashPrefix.batch;
const flags = types_1.coreTypes.UInt32.from(batch.flags).toBytes();
const txIDsLength = types_1.coreTypes.UInt32.from(batch.txIDs.length).toBytes();
const bytesList = new binary_serializer_1.BytesList();
bytesList.put(prefix);
bytesList.put(flags);
bytesList.put(txIDsLength);
batch.txIDs.forEach((txID) => {
bytesList.put(types_1.coreTypes.Hash256.from(txID).toBytes());
});
return bytesList.toBytes();
}
exports.signingBatchData = signingBatchData;
//# sourceMappingURL=binary.js.map

@@ -916,6 +916,6 @@ {

{
"nth": 27,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 27,
"type": "UInt64"

@@ -927,6 +927,6 @@ }

{
"nth": 28,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 28,
"type": "UInt64"

@@ -1256,2 +1256,22 @@ }

[
"DomainID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 34,
"type": "Hash256"
}
],
[
"ParentBatchID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "Hash256"
}
],
[
"hash",

@@ -1839,6 +1859,6 @@ {

{
"nth": 31,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 31,
"type": "Blob"

@@ -2020,6 +2040,6 @@ }

{
"nth": 24,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 24,
"type": "AccountID"

@@ -2029,2 +2049,12 @@ }

[
"Number",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 1,
"type": "Number"
}
],
[
"TransactionMetaData",

@@ -2322,6 +2352,26 @@ {

{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 33,
"type": "STObject"
}
],
[
"RawTransaction",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 34,
"type": "STObject"
}
],
[
"BatchSigner",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "STObject"

@@ -2523,6 +2573,6 @@ }

{
"nth": 26,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 26,
"type": "STArray"

@@ -2534,6 +2584,26 @@ }

{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 27,
"type": "STArray"
}
],
[
"AcceptedCredentials",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 28,
"type": "STArray"
}
],
[
"RawTransactions",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 29,
"type": "STArray"

@@ -2543,2 +2613,12 @@ }

[
"BatchSigners",
{
"isSerialized": true,
"isSigningField": false,
"isVLEncoded": false,
"nth": 30,
"type": "STArray"
}
],
[
"CloseResolution",

@@ -2726,6 +2806,6 @@ {

{
"nth": 5,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 5,
"type": "Vector256"

@@ -2861,2 +2941,3 @@ }

"Check": 67,
"Credential": 129,
"DID": 73,

@@ -2876,4 +2957,4 @@ "DepositPreauth": 112,

"Oracle": 128,
"Credential": 129,
"PayChannel": 120,
"PermissionedDomain": 130,
"RippleState": 114,

@@ -2906,2 +2987,3 @@ "SignerList": 83,

"tecHAS_OBLIGATIONS": 151,
"tecHOOK_REJECTED": 153,
"tecINCOMPLETE": 169,

@@ -2965,2 +3047,3 @@ "tecINSUFFICIENT_FUNDS": 159,

"tecXCHAIN_WRONG_CHAIN": 176,
"tefALREADY": -198,

@@ -2988,2 +3071,3 @@ "tefBAD_ADD_AUTH": -197,

"tefWRONG_PRIOR": -189,
"telBAD_DOMAIN": -398,

@@ -3006,2 +3090,3 @@ "telBAD_PATH_COUNT": -397,

"telWRONG_NETWORK": -386,
"temARRAY_EMPTY": -253,

@@ -3044,2 +3129,3 @@ "temARRAY_TOO_LARGE": -252,

"temINVALID_FLAG": -276,
"temINVALID_INNER_BATCH": -250,
"temMALFORMED": -299,

@@ -3057,2 +3143,3 @@ "temREDUNDANT": -275,

"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,
"terFUNDS_SPENT": -98,

@@ -3071,2 +3158,3 @@ "terINSUF_FEE_B": -97,

"terRETRY": -99,
"tesSUCCESS": 0

@@ -3076,2 +3164,3 @@ },

"AMMBid": 39,
"AMMClawback": 31,
"AMMCreate": 35,

@@ -3084,2 +3173,3 @@ "AMMDelete": 40,

"AccountSet": 3,
"Batch": 64,
"CheckCancel": 18,

@@ -3089,4 +3179,4 @@ "CheckCash": 17,

"Clawback": 30,
"CredentialAccept": 59,
"CredentialCreate": 58,
"CredentialAccept": 59,
"CredentialDelete": 60,

@@ -3111,2 +3201,3 @@ "DIDDelete": 50,

"NFTokenMint": 25,
"NFTokenModify": 61,
"OfferCancel": 8,

@@ -3120,2 +3211,4 @@ "OfferCreate": 7,

"PaymentChannelFund": 14,
"PermissionedDomainDelete": 63,
"PermissionedDomainSet": 62,
"SetFee": 101,

@@ -3150,2 +3243,3 @@ "SetRegularKey": 5,

"NotPresent": 0,
"Number": 9,
"PathSet": 18,

@@ -3152,0 +3246,0 @@ "STArray": 15,

@@ -39,4 +39,6 @@ "use strict";

paymentChannelClaim: bytes(0x434c4d00),
// batch
batch: bytes(0x42434800),
};
exports.HashPrefix = HashPrefix;
//# sourceMappingURL=hash-prefixes.js.map

3

dist/index.d.ts

@@ -50,2 +50,3 @@ import { decodeLedgerData } from './ledger-hashes';

declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
declare function encodeForSigningBatch(json: object): string;
/**

@@ -65,2 +66,2 @@ * Encode a quality value

declare function decodeQuality(value: string): string;
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeForSigningBatch, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForSigningBatch = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
const coretypes_1 = require("./coretypes");

@@ -16,3 +16,3 @@ const ledger_hashes_1 = require("./ledger-hashes");

const utils_1 = require("@xrplf/isomorphic/utils");
const { signingData, signingClaimData, multiSigningData, binaryToJSON, serializeObject, } = coretypes_1.binary;
const { signingData, signingClaimData, multiSigningData, signingBatchData, binaryToJSON, serializeObject, } = coretypes_1.binary;
/**

@@ -98,2 +98,9 @@ * Decode a transaction

exports.encodeForMultisigning = encodeForMultisigning;
function encodeForSigningBatch(json) {
if (typeof json !== 'object') {
throw new Error();
}
return (0, utils_1.bytesToHex)(signingBatchData(json));
}
exports.encodeForSigningBatch = encodeForSigningBatch;
/**

@@ -100,0 +107,0 @@ * Encode a quality value

@@ -90,2 +90,17 @@ import { BinaryParser } from './serdes/binary-parser';

}): Uint8Array;
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, };
/**
* Interface describing fields required for a Batch signer
*/
interface BatchObject extends JsonObject {
flags: number;
txIDs: string[];
}
/**
* Serialize a signingClaim
*
* @param batch A Batch object to serialize
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
* @returns the serialized object with appropriate prefix
*/
declare function signingBatchData(batch: BatchObject): Uint8Array;
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, BatchObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, signingBatchData, };
"use strict";
/* eslint-disable func-style */
Object.defineProperty(exports, "__esModule", { value: true });
exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
exports.signingBatchData = exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
const utils_1 = require("@xrplf/isomorphic/utils");

@@ -128,2 +128,29 @@ const types_1 = require("./types");

exports.multiSigningData = multiSigningData;
/**
* Serialize a signingClaim
*
* @param batch A Batch object to serialize
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
* @returns the serialized object with appropriate prefix
*/
function signingBatchData(batch) {
if (batch.flags == null) {
throw Error("No field `flags'");
}
if (batch.txIDs == null) {
throw Error('No field `txIDs`');
}
const prefix = hash_prefixes_1.HashPrefix.batch;
const flags = types_1.coreTypes.UInt32.from(batch.flags).toBytes();
const txIDsLength = types_1.coreTypes.UInt32.from(batch.txIDs.length).toBytes();
const bytesList = new binary_serializer_1.BytesList();
bytesList.put(prefix);
bytesList.put(flags);
bytesList.put(txIDsLength);
batch.txIDs.forEach((txID) => {
bytesList.put(types_1.coreTypes.Hash256.from(txID).toBytes());
});
return bytesList.toBytes();
}
exports.signingBatchData = signingBatchData;
//# sourceMappingURL=binary.js.map

@@ -39,4 +39,6 @@ "use strict";

paymentChannelClaim: bytes(0x434c4d00),
// batch
batch: bytes(0x42434800),
};
exports.HashPrefix = HashPrefix;
//# sourceMappingURL=hash-prefixes.js.map

@@ -50,2 +50,3 @@ import { decodeLedgerData } from './ledger-hashes';

declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
declare function encodeForSigningBatch(json: object): string;
/**

@@ -65,2 +66,2 @@ * Encode a quality value

declare function decodeQuality(value: string): string;
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeForSigningBatch, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForSigningBatch = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
const coretypes_1 = require("./coretypes");

@@ -16,3 +16,3 @@ const ledger_hashes_1 = require("./ledger-hashes");

const utils_1 = require("@xrplf/isomorphic/utils");
const { signingData, signingClaimData, multiSigningData, binaryToJSON, serializeObject, } = coretypes_1.binary;
const { signingData, signingClaimData, multiSigningData, signingBatchData, binaryToJSON, serializeObject, } = coretypes_1.binary;
/**

@@ -98,2 +98,9 @@ * Decode a transaction

exports.encodeForMultisigning = encodeForMultisigning;
function encodeForSigningBatch(json) {
if (typeof json !== 'object') {
throw new Error();
}
return (0, utils_1.bytesToHex)(signingBatchData(json));
}
exports.encodeForSigningBatch = encodeForSigningBatch;
/**

@@ -100,0 +107,0 @@ * Encode a quality value

{
"name": "ripple-binary-codec",
"version": "2.2.0",
"version": "2.3.0-batch.0",
"description": "XRP Ledger binary codec",

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

},
"gitHead": "11e724253bd87a3fcd15949e66786778adaa4640"
"gitHead": "3c563434d49d4d656f8b62933f035082733af560"
}

@@ -180,2 +180,40 @@ /* eslint-disable func-style */

/**
* Interface describing fields required for a Batch signer
*/
interface BatchObject extends JsonObject {
flags: number
txIDs: string[]
}
/**
* Serialize a signingClaim
*
* @param batch A Batch object to serialize
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
* @returns the serialized object with appropriate prefix
*/
function signingBatchData(batch: BatchObject): Uint8Array {
if (batch.flags == null) {
throw Error("No field `flags'")
}
if (batch.txIDs == null) {
throw Error('No field `txIDs`')
}
const prefix = HashPrefix.batch
const flags = coreTypes.UInt32.from(batch.flags).toBytes()
const txIDsLength = coreTypes.UInt32.from(batch.txIDs.length).toBytes()
const bytesList = new BytesList()
bytesList.put(prefix)
bytesList.put(flags)
bytesList.put(txIDsLength)
batch.txIDs.forEach((txID: string) => {
bytesList.put(coreTypes.Hash256.from(txID).toBytes())
})
return bytesList.toBytes()
}
export {

@@ -186,2 +224,3 @@ BinaryParser,

ClaimObject,
BatchObject,
makeParser,

@@ -196,2 +235,3 @@ serializeObject,

transactionID,
signingBatchData,
}

@@ -916,6 +916,6 @@ {

{
"nth": 27,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 27,
"type": "UInt64"

@@ -927,6 +927,6 @@ }

{
"nth": 28,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 28,
"type": "UInt64"

@@ -1256,2 +1256,22 @@ }

[
"DomainID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 34,
"type": "Hash256"
}
],
[
"ParentBatchID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "Hash256"
}
],
[
"hash",

@@ -1839,6 +1859,6 @@ {

{
"nth": 31,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 31,
"type": "Blob"

@@ -2020,6 +2040,6 @@ }

{
"nth": 24,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 24,
"type": "AccountID"

@@ -2029,2 +2049,12 @@ }

[
"Number",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 1,
"type": "Number"
}
],
[
"TransactionMetaData",

@@ -2322,6 +2352,26 @@ {

{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 33,
"type": "STObject"
}
],
[
"RawTransaction",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 34,
"type": "STObject"
}
],
[
"BatchSigner",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "STObject"

@@ -2523,6 +2573,6 @@ }

{
"nth": 26,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 26,
"type": "STArray"

@@ -2534,6 +2584,26 @@ }

{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 27,
"type": "STArray"
}
],
[
"AcceptedCredentials",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 28,
"type": "STArray"
}
],
[
"RawTransactions",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 29,
"type": "STArray"

@@ -2543,2 +2613,12 @@ }

[
"BatchSigners",
{
"isSerialized": true,
"isSigningField": false,
"isVLEncoded": false,
"nth": 30,
"type": "STArray"
}
],
[
"CloseResolution",

@@ -2726,6 +2806,6 @@ {

{
"nth": 5,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 5,
"type": "Vector256"

@@ -2861,2 +2941,3 @@ }

"Check": 67,
"Credential": 129,
"DID": 73,

@@ -2876,4 +2957,4 @@ "DepositPreauth": 112,

"Oracle": 128,
"Credential": 129,
"PayChannel": 120,
"PermissionedDomain": 130,
"RippleState": 114,

@@ -2906,2 +2987,3 @@ "SignerList": 83,

"tecHAS_OBLIGATIONS": 151,
"tecHOOK_REJECTED": 153,
"tecINCOMPLETE": 169,

@@ -2965,2 +3047,3 @@ "tecINSUFFICIENT_FUNDS": 159,

"tecXCHAIN_WRONG_CHAIN": 176,
"tefALREADY": -198,

@@ -2988,2 +3071,3 @@ "tefBAD_ADD_AUTH": -197,

"tefWRONG_PRIOR": -189,
"telBAD_DOMAIN": -398,

@@ -3006,2 +3090,3 @@ "telBAD_PATH_COUNT": -397,

"telWRONG_NETWORK": -386,
"temARRAY_EMPTY": -253,

@@ -3044,2 +3129,3 @@ "temARRAY_TOO_LARGE": -252,

"temINVALID_FLAG": -276,
"temINVALID_INNER_BATCH": -250,
"temMALFORMED": -299,

@@ -3057,2 +3143,3 @@ "temREDUNDANT": -275,

"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,
"terFUNDS_SPENT": -98,

@@ -3071,2 +3158,3 @@ "terINSUF_FEE_B": -97,

"terRETRY": -99,
"tesSUCCESS": 0

@@ -3076,2 +3164,3 @@ },

"AMMBid": 39,
"AMMClawback": 31,
"AMMCreate": 35,

@@ -3084,2 +3173,3 @@ "AMMDelete": 40,

"AccountSet": 3,
"Batch": 64,
"CheckCancel": 18,

@@ -3089,4 +3179,4 @@ "CheckCash": 17,

"Clawback": 30,
"CredentialAccept": 59,
"CredentialCreate": 58,
"CredentialAccept": 59,
"CredentialDelete": 60,

@@ -3111,2 +3201,3 @@ "DIDDelete": 50,

"NFTokenMint": 25,
"NFTokenModify": 61,
"OfferCancel": 8,

@@ -3120,2 +3211,4 @@ "OfferCreate": 7,

"PaymentChannelFund": 14,
"PermissionedDomainDelete": 63,
"PermissionedDomainSet": 62,
"SetFee": 101,

@@ -3150,2 +3243,3 @@ "SetRegularKey": 5,

"NotPresent": 0,
"Number": 9,
"PathSet": 18,

@@ -3152,0 +3246,0 @@ "STArray": 15,

@@ -38,4 +38,6 @@ import { writeUInt32BE } from './utils'

paymentChannelClaim: bytes(0x434c4d00),
// batch
batch: bytes(0x42434800),
}
export { HashPrefix }
import { quality, binary, HashPrefix } from './coretypes'
import { decodeLedgerData } from './ledger-hashes'
import { ClaimObject } from './binary'
import { ClaimObject, BatchObject } from './binary'
import { JsonObject } from './types/serialized-type'

@@ -18,2 +18,3 @@ import {

multiSigningData,
signingBatchData,
binaryToJSON,

@@ -114,2 +115,9 @@ serializeObject,

function encodeForSigningBatch(json: object): string {
if (typeof json !== 'object') {
throw new Error()
}
return bytesToHex(signingBatchData(json as BatchObject))
}
/**

@@ -147,2 +155,3 @@ * Encode a quality value

encodeForMultisigning,
encodeForSigningBatch,
encodeQuality,

@@ -149,0 +158,0 @@ decodeQuality,

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 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