From 158cff2be260a34989d20875fb2e5ecd5910564d Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Wed, 25 May 2022 13:22:03 -0400 Subject: [PATCH] first pass --- .../src/enums/definitions.json | 96 ++++++++++++++++++- .../xrpl/src/utils/hashes/ledgerSpaces.ts | 6 ++ 2 files changed, 99 insertions(+), 3 deletions(-) diff --git a/packages/ripple-binary-codec/src/enums/definitions.json b/packages/ripple-binary-codec/src/enums/definitions.json index 6a82327a..fa251727 100644 --- a/packages/ripple-binary-codec/src/enums/definitions.json +++ b/packages/ripple-binary-codec/src/enums/definitions.json @@ -19,7 +19,9 @@ "NotPresent": 0, "UInt64": 3, "UInt32": 2, - "STArray": 15 + "STArray": 15, + "Sidechain": 24, + "XchainClaimProof": 25 }, "LEDGER_ENTRY_TYPES": { "Any": -3, @@ -31,8 +33,10 @@ "Ticket": 84, "SignerList": 83, "Offer": 111, + "Sidechain": 105, "LedgerHashes": 104, "Amendments": 102, + "CrosschainSequenceNum": 113, "FeeSettings": 115, "Escrow": 117, "PayChannel": 120, @@ -825,6 +829,16 @@ "type": "Amount" } ], + [ + "XChainFee", + { + "nth": 11, + "isVLEncoded": false, + "isSerialized": true, + "isSigningField": true, + "type": "Amount" + } + ], [ "MinimumOffer", { @@ -1175,6 +1189,26 @@ "type": "AccountID" } ], + [ + "ThisChainAccount", + { + "nth": 17, + "isVLEncoded": true, + "isSerialized": true, + "isSigningField": true, + "type": "AccountID" + } + ], + [ + "OtherChainAccount", + { + "nth": 18, + "isVLEncoded": true, + "isSerialized": true, + "isSigningField": true, + "type": "AccountID" + } + ], [ "ObjectEndMarker", { @@ -1435,6 +1469,16 @@ "type": "STArray" } ], + [ + "XChainProofSigs", + { + "nth": 21, + "isVLEncoded": false, + "isSerialized": true, + "isSigningField": true, + "type": "STArray" + } + ], [ "CloseResolution", { @@ -1515,6 +1559,26 @@ "type": "PathSet" } ], + [ + "Sidechain", + { + "nth": 1, + "isVLEncoded": false, + "isSerialized": true, + "isSigningField": true, + "type": "Sidechain" + } + ], + [ + "XChainClaimProof", + { + "nth": 1, + "isVLEncoded": false, + "isSerialized": true, + "isSigningField": true, + "type": "XChainClaimProof" + } + ], [ "Indexes", { @@ -1655,6 +1719,16 @@ "type": "UInt32" } ], + [ + "XChainSequence", + { + "nth": 47, + "isVLEncoded": false, + "isSerialized": true, + "isSigningField": true, + "type": "UInt32" + } + ], [ "Channel", { @@ -1848,6 +1922,9 @@ "temUNKNOWN": -265, "temSEQ_AND_TICKET": -264, "temBAD_NFTOKEN_TRANSFER_FEE": -263, + "temEQUAL_DOOR_ACCOUNTS": -262, + "temBAD_XChain_Proof": -261, + "temSIDECHAIN_BAD_ISSUES": -260, "tefFAILURE": -199, "tefALREADY": -198, @@ -1933,8 +2010,14 @@ "tecINSUFFICIENT_FUNDS": 159, "tecOBJECT_NOT_FOUND": 160, "tecINSUFFICIENT_PAYMENT": 161, - "tecINCORRECT_ASSET": 162, - "tecTOO_MANY": 163 + + "tecBAD_XCHAIN_TRANSFER_ISSUE": 162, + "tecBAD_XCHAIN_TRANSFER_SEQ_NUM": 163, + "tecXCHAIN_PROOF_NO_QUORUM": 164, + "tecXCHAIN_PROOF_UNKNOWN_KEY": 165, + "tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE": 166, + "tecXCHAIN_CLAIM_ACCOUNT_DST_EXISTS": 167, + "tecXCHAIN_CLAIM_WRONG_CHAIN": 168 }, "TRANSACTION_TYPES": { "Invalid": -1, @@ -1966,6 +2049,13 @@ "NFTokenCreateOffer": 27, "NFTokenCancelOffer": 28, "NFTokenAcceptOffer": 29, + "XchainDoorCreate": 30, + "XchainSeqnumCreate": 31, + "XchainTransfer": 32, + "XchainClaim": 33, + "XchainAccountCreate": 34, + "XchainAccountClaim": 35, + "EnableAmendment": 100, "SetFee": 101, "UNLModify": 102 diff --git a/packages/xrpl/src/utils/hashes/ledgerSpaces.ts b/packages/xrpl/src/utils/hashes/ledgerSpaces.ts index e2af0c6a..4b34058f 100644 --- a/packages/xrpl/src/utils/hashes/ledgerSpaces.ts +++ b/packages/xrpl/src/utils/hashes/ledgerSpaces.ts @@ -29,6 +29,12 @@ const ledgerSpaces = { paychan: 'x', check: 'C', depositPreauth: 'p', + negativeUnl: 'N', + nftokenOffer: 'q', + nftokenBuyOffers: 'h', + nftokenSellOffers: 'i', + sidechain: 'H', + xchainSeq: 'Q', } export default ledgerSpaces