cheng-xrpl 4.4.6 → 4.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/build/xrpl-latest-min.js +1 -1
  2. package/build/xrpl-latest-min.js.map +1 -1
  3. package/build/xrpl-latest.js +677 -180
  4. package/build/xrpl-latest.js.map +1 -1
  5. package/dist/npm/index.d.ts +1 -0
  6. package/dist/npm/index.d.ts.map +1 -1
  7. package/dist/npm/index.js +1 -0
  8. package/dist/npm/index.js.map +1 -1
  9. package/dist/npm/models/common/index.d.ts +7 -7
  10. package/dist/npm/models/common/index.d.ts.map +1 -1
  11. package/dist/npm/models/index.d.ts +1 -0
  12. package/dist/npm/models/index.d.ts.map +1 -1
  13. package/dist/npm/models/index.js +5 -1
  14. package/dist/npm/models/index.js.map +1 -1
  15. package/dist/npm/models/ledger/Vault.d.ts +4 -1
  16. package/dist/npm/models/ledger/Vault.d.ts.map +1 -1
  17. package/dist/npm/models/ledger/Vault.js +5 -0
  18. package/dist/npm/models/ledger/Vault.js.map +1 -1
  19. package/dist/npm/models/ledger/index.d.ts +2 -2
  20. package/dist/npm/models/ledger/index.d.ts.map +1 -1
  21. package/dist/npm/models/ledger/index.js +3 -1
  22. package/dist/npm/models/ledger/index.js.map +1 -1
  23. package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
  24. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js +5 -4
  25. package/dist/npm/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
  26. package/dist/npm/models/transactions/common.d.ts +0 -3
  27. package/dist/npm/models/transactions/common.d.ts.map +1 -1
  28. package/dist/npm/models/transactions/common.js +16 -134
  29. package/dist/npm/models/transactions/common.js.map +1 -1
  30. package/dist/npm/models/transactions/index.d.ts +2 -2
  31. package/dist/npm/models/transactions/index.d.ts.map +1 -1
  32. package/dist/npm/models/transactions/index.js +4 -2
  33. package/dist/npm/models/transactions/index.js.map +1 -1
  34. package/dist/npm/models/transactions/vaultCreate.d.ts.map +1 -1
  35. package/dist/npm/models/transactions/vaultCreate.js +5 -4
  36. package/dist/npm/models/transactions/vaultCreate.js.map +1 -1
  37. package/dist/npm/models/utils/mptokenMetadata.d.ts +7 -0
  38. package/dist/npm/models/utils/mptokenMetadata.d.ts.map +1 -0
  39. package/dist/npm/models/utils/mptokenMetadata.js +377 -0
  40. package/dist/npm/models/utils/mptokenMetadata.js.map +1 -0
  41. package/package.json +3 -2
  42. package/src/index.ts +2 -0
  43. package/src/models/common/index.ts +93 -9
  44. package/src/models/index.ts +5 -0
  45. package/src/models/ledger/Vault.ts +8 -1
  46. package/src/models/ledger/index.ts +2 -1
  47. package/src/models/transactions/MPTokenIssuanceCreate.ts +8 -7
  48. package/src/models/transactions/common.ts +23 -226
  49. package/src/models/transactions/index.ts +7 -2
  50. package/src/models/transactions/vaultCreate.ts +8 -7
  51. package/src/models/utils/mptokenMetadata.ts +529 -0
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see xrpl-latest-min.js.LICENSE.txt */
2
- var xrpl;(()=>{var e={5:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelFund=void 0;const r=n(255),i=n(2794);t.validatePaymentChannelFund=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.Channel)throw new r.ValidationError("PaymentChannelFund: missing Channel");if("string"!=typeof e.Channel)throw new r.ValidationError("PaymentChannelFund: Channel must be a string");if(void 0===e.Amount)throw new r.ValidationError("PaymentChannelFund: missing Amount");if("string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelFund: Amount must be a string");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("PaymentChannelFund: Expiration must be a number")}},24:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash128=void 0;const r=n(3776),i=n(619);class o extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=o.ZERO_128.bytes),super(null!=e?e:o.ZERO_128.bytes)}toHex(){const e=(0,i.bytesToHex)(this.toBytes());return/^0+$/.exec(e)?"":e}}t.Hash128=o,o.width=16,o.ZERO_128=new o(new Uint8Array(o.width))},99:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=t.hasFlag=t.isFlagEnabled=t.onlyHasFields=t.INTEGER_SANITY_CHECK=void 0;const n=/^[0-9A-Fa-f]+$/u;function r(e,t){return(BigInt(t)&BigInt(e))===BigInt(t)}t.INTEGER_SANITY_CHECK=/^[0-9]+$/u,t.onlyHasFields=function(e,t){return Object.keys(e).every(e=>t.includes(e))},t.isFlagEnabled=r,t.hasFlag=function(e,t,n){return null!=e.Flags&&("number"==typeof e.Flags?r(e.Flags,t):!0===e.Flags[n])},t.isHex=function(e){return n.test(e)}},168:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Node=t.NodeType=void 0,function(e){e[e.INNER=1]="INNER",e[e.TRANSACTION_NO_METADATA=2]="TRANSACTION_NO_METADATA",e[e.TRANSACTION_METADATA=3]="TRANSACTION_METADATA",e[e.ACCOUNT_STATE=4]="ACCOUNT_STATE"}(n||(t.NodeType=n={})),t.Node=class{}},248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCash=void 0;const r=n(255),i=n(2794);t.validateCheckCash=function(e){if((0,i.validateBaseTransaction)(e),null==e.Amount&&null==e.DeliverMin)throw new r.ValidationError("CheckCash: must have either Amount or DeliverMin");if(null!=e.Amount&&null!=e.DeliverMin)throw new r.ValidationError("CheckCash: cannot have both Amount and DeliverMin");if(null!=e.Amount&&void 0!==e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("CheckCash: invalid Amount");if(null!=e.DeliverMin&&void 0!==e.DeliverMin&&!(0,i.isAmount)(e.DeliverMin))throw new r.ValidationError("CheckCash: invalid DeliverMin");if(void 0!==e.CheckID&&"string"!=typeof e.CheckID)throw new r.ValidationError("CheckCash: invalid CheckID")}},255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XRPLFaucetError=t.NotFoundError=t.ValidationError=t.ResponseFormatError=t.TimeoutError=t.RippledNotInitializedError=t.DisconnectedError=t.NotConnectedError=t.RippledError=t.ConnectionError=t.UnexpectedError=t.XrplError=void 0;class n extends Error{constructor(e="",t){super(e),this.name=this.constructor.name,this.message=e,this.data=t,null!=Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(){let e=`[${this.name}(${this.message}`;return this.data&&(e+=`, ${JSON.stringify(this.data)}`),e+=")]",e}inspect(){return this.toString()}}t.XrplError=n,t.RippledError=class extends n{},t.UnexpectedError=class extends n{};class r extends n{}t.ConnectionError=r,t.NotConnectedError=class extends r{},t.DisconnectedError=class extends r{},t.RippledNotInitializedError=class extends r{},t.TimeoutError=class extends r{},t.ResponseFormatError=class extends r{},t.ValidationError=class extends n{},t.XRPLFaucetError=class extends n{},t.NotFoundError=class extends n{constructor(e="Not found"){super(e)}}},376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(5442),o=n(2722);t.default=function(e,t,n){const s=(0,r.encodeForSigningClaim)({channel:e,amount:(0,o.xrpToDrops)(t)});return(0,i.sign)(s,n)}},390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialAccept=void 0;const r=n(2794);t.validateCredentialAccept=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Account",r.isString),(0,r.validateRequiredField)(e,"Issuer",r.isString),(0,r.validateCredentialType)(e)}},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(5442),o=n(2722);t.default=function(e,t,n,s){const a=(0,r.encodeForSigningClaim)({channel:e,amount:(0,o.xrpToDrops)(t)});return(0,i.verify)(a,n,s)}},401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt8=void 0;const r=n(3328),i=n(619),o=n(5517);class s extends r.UInt{constructor(e){super(null!=e?e:s.defaultUInt8.bytes)}static fromParser(e){return new s(e.read(s.width))}static from(e){if(e instanceof s)return e;if("number"==typeof e){s.checkUintRange(e,0,255);const t=new Uint8Array(s.width);return(0,o.writeUInt8)(t,e,0),new s(t)}throw new Error("Cannot construct UInt8 from given value")}valueOf(){return parseInt((0,i.bytesToHex)(this.bytes),16)}}t.UInt8=s,s.width=1,s.defaultUInt8=new s(new Uint8Array(s.width))},425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCreateClaimID=void 0;const r=n(2794);t.validateXChainCreateClaimID=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount)}},534:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255),o=r(n(9373)),s=r(n(2530)),a=r(n(5644)),c=n(168),u="0000000000000000000000000000000000000000000000000000000000000000";class l extends c.Node{constructor(e=0){super(),this.leaves={},this.type=c.NodeType.INNER,this.depth=e,this.empty=!0}get hash(){if(this.empty)return u;let e="";for(let t=0;t<=15;t++){const n=this.leaves[t];e+=null==n?u:n.hash}const t=o.default.INNER_NODE.toString(16);return(0,s.default)(t+e)}addItem(e,t){const n=this.getNode(parseInt(e[this.depth],16));if(void 0!==n){if(n instanceof l)n.addItem(e,t);else if(n instanceof a.default){if(n.tag===e)throw new i.XrplError("Tried to add a node to a SHAMap that was already in there.");{const r=new l(this.depth+1);r.addItem(n.tag,n),r.addItem(e,t),this.setNode(parseInt(e[this.depth],16),r)}}}else this.setNode(parseInt(e[this.depth],16),t)}setNode(e,t){if(e<0||e>15)throw new i.XrplError("Invalid slot: slot must be between 0-15.");this.leaves[e]=t,this.empty=!1}getNode(e){if(e<0||e>15)throw new i.XrplError("Invalid slot: slot must be between 0-15.");return this.leaves[e]}}t.default=l},548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceSet=t.MPTokenIssuanceSetFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfMPTLock=1]="tfMPTLock",e[e.tfMPTUnlock=2]="tfMPTUnlock"}(s||(t.MPTokenIssuanceSetFlags=s={})),t.validateMPTokenIssuanceSet=function(e){var t,n,a;(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"MPTokenIssuanceID",o.isString),(0,o.validateOptionalField)(e,"Holder",o.isAccount);const c=null!==(t=e.Flags)&&void 0!==t?t:0,u="number"==typeof c?(0,i.isFlagEnabled)(c,s.tfMPTLock):null!==(n=c.tfMPTLock)&&void 0!==n&&n,l="number"==typeof c?(0,i.isFlagEnabled)(c,s.tfMPTUnlock):null!==(a=c.tfMPTUnlock)&&void 0!==a&&a;if(u&&l)throw new r.ValidationError("MPTokenIssuanceSet: flag conflict")}},602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDepositPreauth=void 0;const r=n(255),i=n(2794);t.validateDepositPreauth=function(e){if((0,i.validateBaseTransaction)(e),function(e){if(1!==["Authorize","Unauthorize","AuthorizeCredentials","UnauthorizeCredentials"].filter(t=>void 0!==e[t]).length)throw new r.ValidationError("DepositPreauth: Requires exactly one field of the following: Authorize, Unauthorize, AuthorizeCredentials, UnauthorizeCredentials.")}(e),void 0!==e.Authorize){if("string"!=typeof e.Authorize)throw new r.ValidationError("DepositPreauth: Authorize must be a string");if(e.Account===e.Authorize)throw new r.ValidationError("DepositPreauth: Account can't preauthorize its own address")}else if(void 0!==e.Unauthorize){if("string"!=typeof e.Unauthorize)throw new r.ValidationError("DepositPreauth: Unauthorize must be a string");if(e.Account===e.Unauthorize)throw new r.ValidationError("DepositPreauth: Account can't unauthorize its own address")}else void 0!==e.AuthorizeCredentials?(0,i.validateCredentialsList)(e.AuthorizeCredentials,e.TransactionType,!1,i.MAX_AUTHORIZED_CREDENTIALS):void 0!==e.UnauthorizeCredentials&&(0,i.validateCredentialsList)(e.UnauthorizeCredentials,e.TransactionType,!1,i.MAX_AUTHORIZED_CREDENTIALS)}},619:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.stringToHex=t.hexToString=t.hexToBytes=t.bytesToHex=void 0;const o=n(5492),s=n(1602);t.bytesToHex=e=>(0,o.bytesToHex)(e instanceof Uint8Array?e:Uint8Array.from(e)).toUpperCase(),t.hexToBytes=e=>{const t=e.length,n=new Uint8Array(t/2);if(!s.HEX_REGEX.test(e))throw new Error("Invalid hex string");for(let t=0;t<n.length;t++){const r=2*t,i=e.slice(r,r+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");n[t]=o}return n},t.hexToString=(e,n="utf8")=>new TextDecoder(n).decode((0,t.hexToBytes)(e)),t.stringToHex=e=>(0,t.bytesToHex)((new TextEncoder).encode(e)),t.randomBytes=o.randomBytes,i(n(1602),t)},667:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDecodedTransaction=t.addressToBigNumber=t.NUM_BITS_IN_HEX=t.compareSigners=void 0;const i=n(619),o=r(n(735)),s=n(6333),a=n(5620);function c(e){const n=(0,i.bytesToHex)((0,s.decodeAccountID)(e));return new o.default(n,t.NUM_BITS_IN_HEX)}t.compareSigners=function(e,t){return c(e.Account).comparedTo(c(t.Account))},t.NUM_BITS_IN_HEX=16,t.addressToBigNumber=c,t.getDecodedTransaction=function(e){return"object"==typeof e?(0,a.decode)((0,a.encode)(e)):(0,a.decode)(e)}},707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCreateBridge=void 0;const r=n(2794);t.validateXChainCreateBridge=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateOptionalField)(e,"MinAccountCreateAmount",r.isAmount)}},714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA384=t.SHA512_256=t.SHA512_224=t.SHA512=void 0;const r=n(1998),i=n(1533),o=n(9987),[s,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends r.HashMD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:h,Hh:g,Hl:p}=this;return[e,t,n,r,i,o,s,a,c,u,l,d,f,h,g,p]}set(e,t,n,r,i,o,s,a,c,u,l,d,f,h,g,p){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|g,this.Hl=0|p}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),o=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),s=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(s,a,19)^i.default.rotrBH(s,a,61)^i.default.shrSH(s,a,6),d=i.default.rotrSL(s,a,19)^i.default.rotrBL(s,a,61)^i.default.shrSL(s,a,6),f=i.default.add4L(o,d,u[e-7],u[e-16]),h=i.default.add4H(f,r,l,c[e-7],c[e-16]);c[e]=0|h,u[e]=0|f}let{Ah:n,Al:r,Bh:o,Bl:l,Ch:d,Cl:f,Dh:h,Dl:g,Eh:p,El:y,Fh:m,Fl:E,Gh:b,Gl:w,Hh:A,Hl:S}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(p,y,14)^i.default.rotrSH(p,y,18)^i.default.rotrBH(p,y,41),v=i.default.rotrSL(p,y,14)^i.default.rotrSL(p,y,18)^i.default.rotrBL(p,y,41),T=p&m^~p&b,O=y&E^~y&w,I=i.default.add5L(S,v,O,a[e],u[e]),B=i.default.add5H(I,A,t,T,s[e],c[e]),_=0|I,N=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),L=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),C=n&o^n&d^o&d,F=r&l^r&f^l&f;A=0|b,S=0|w,b=0|m,w=0|E,m=0|p,E=0|y,({h:p,l:y}=i.default.add(0|h,0|g,0|B,0|_)),h=0|d,g=0|f,d=0|o,f=0|l,o=0|n,l=0|r;const D=i.default.add3L(_,L,F);n=i.default.add3H(D,B,N,C),r=0|D}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:d,l:f}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|f)),({h,l:g}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|g)),({h:p,l:y}=i.default.add(0|this.Eh,0|this.El,0|p,0|y)),({h:m,l:E}=i.default.add(0|this.Fh,0|this.Fl,0|m,0|E)),({h:b,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|b,0|w)),({h:A,l:S}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|S)),this.set(n,r,o,l,d,f,h,g,p,y,m,E,b,w,A,S)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}t.SHA512_224=d;class f extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}t.SHA512_256=f;class h extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.SHA384=h,t.sha512=(0,o.wrapConstructor)(()=>new l),t.sha512_224=(0,o.wrapConstructor)(()=>new d),t.sha512_256=(0,o.wrapConstructor)(()=>new f),t.sha384=(0,o.wrapConstructor)(()=>new h)},735:function(e,t,n){var r;!function(){"use strict";var i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,a=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,d=14,f=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,p=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=d-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function E(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=c==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function b(e,t,n,r){if(e<t||e>n||e!==a(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return y(e.e/d)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}i=function e(t){var n,r,i,v,T,O,I,B,_,N,L=K.prototype={constructor:K,toString:null,valueOf:null},C=new K(1),F=20,D=4,P=-7,M=21,R=-1e7,x=1e7,U=!1,H=1,k=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",z=!0;function K(e,t){var n,s,c,l,h,g,p,y,m=this;if(!(m instanceof K))return new K(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>x?m.c=m.e=null:e.e<R?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((g="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>x?m.c=m.e=null:(m.e=l,m.c=[e]))}y=String(e)}else{if(!o.test(y=String(e)))return i(m,y,g);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(h=y.search(/e/i))>0?(l<0&&(l=h),l+=+y.slice(h+1),y=y.substring(0,h)):l<0&&(l=y.length)}else{if(b(t,2,j.length,"Base"),10==t&&z)return X(m=new K(e),F+m.e+1,D);if(y=String(e),g="number"==typeof e){if(0*e!=0)return i(m,y,g,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,K.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=j.slice(0,t),l=h=0,p=y.length;h<p;h++)if(n.indexOf(s=y.charAt(h))<0){if("."==s){if(h>l){l=p;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,h=-1,l=0;continue}return i(m,String(e),g,t)}g=!1,(l=(y=r(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(h=0;48===y.charCodeAt(h);h++);for(p=y.length;48===y.charCodeAt(--p););if(y=y.slice(h,++p)){if(p-=h,g&&K.DEBUG&&p>15&&(e>f||e!==a(e)))throw Error(u+m.s*e);if((l=l-h-1)>x)m.c=m.e=null;else if(l<R)m.c=[m.e=0];else{if(m.e=l,m.c=[],h=(l+1)%d,l<0&&(h+=d),h<p){for(h&&m.c.push(+y.slice(0,h)),p-=d;h<p;)m.c.push(+y.slice(h,h+=d));h=d-(y=y.slice(h)).length}else h-=p;for(;h--;y+="0");m.c.push(+y)}}else m.c=[m.e=0]}function G(e,t,n,r){var i,o,s,a,c;if(null==n?n=D:b(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=m(e.c),c=1==r||2==r&&(s<=P||s>=M)?A(c,s):S(c,s,"0");else if(o=(e=X(new K(e),t,n)).e,a=(c=m(e.c)).length,1==r||2==r&&(t<=o||o<=P)){for(;a<t;c+="0",a++);c=A(c,o)}else if(t-=s,c=S(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function q(e,t){for(var n,r,i=1,o=new K(e[0]);i<e.length;i++)(!(r=new K(e[i])).s||(n=E(o,r))===t||0===n&&o.s===t)&&(o=r);return o}function W(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*d-1)>x?e.c=e.e=null:n<R?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n,r){var i,o,c,u,f,g,p,y=e.c,m=h;if(y){e:{for(i=1,u=y[0];u>=10;u/=10,i++);if((o=t-i)<0)o+=d,c=t,f=y[g=0],p=a(f/m[i-c-1]%10);else if((g=s((o+1)/d))>=y.length){if(!r)break e;for(;y.length<=g;y.push(0));f=p=0,i=1,c=(o%=d)-d+1}else{for(f=u=y[g],i=1;u>=10;u/=10,i++);p=(c=(o%=d)-d+i)<0?0:a(f/m[i-c-1]%10)}if(r=r||t<0||null!=y[g+1]||(c<0?f:f%m[i-c-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?c>0?f/m[i-c]:0:y[g-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=m[(d-t%d)%d],e.e=-t||0):y[0]=e.e=0,e;if(0==o?(y.length=g,u=1,g--):(y.length=g+1,u=m[d-o],y[g]=c>0?a(f/m[i-c]%m[c])*u:0),r)for(;;){if(0==g){for(o=1,c=y[0];c>=10;c/=10,o++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);o!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[g]+=u,y[g]!=l)break;y[g--]=0,u=1}for(o=y.length;0===y[--o];y.pop());}e.e>x?e.c=e.e=null:e.e<R&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=m(e.c),t=n<=P||n>=M?A(t,n):S(t,n,"0"),e.s<0?"-"+t:t)}return K.clone=e,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,p,t),F=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),D=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-p,0,t),b(n[1],0,p,t),P=n[0],M=n[1]):(b(n,-p,p,t),P=-(M=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-p,-1,t),b(n[1],1,p,t),R=n[0],x=n[1];else{if(b(n,-p,p,t),!n)throw Error(c+t+" cannot be zero: "+n);R=-(x=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),H=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,p,t),k=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);z="0123456789"==n.slice(0,10),j=n}}return{DECIMAL_PLACES:F,ROUNDING_MODE:D,EXPONENTIAL_AT:[P,M],RANGE:[R,x],CRYPTO:U,MODULO_MODE:H,POW_PRECISION:k,FORMAT:V,ALPHABET:j}},K.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!K.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-p&&i<=p&&i===a(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==a(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},K.maximum=K.max=function(){return q(arguments,-1)},K.minimum=K.min=function(){return q(arguments,1)},K.random=(v=9007199254740992,T=Math.random()*v&2097151?function(){return a(Math.random()*v)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,u=0,l=[],f=new K(C);if(null==e?e=F:b(e,0,p),i=s(e/d),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));u<i;)(o=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(o%1e14),u+=2);u=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);u<i;)(o=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(o%1e14),u+=7);u=i/7}if(!U)for(;u<i;)(o=T())<9e15&&(l[u++]=o%1e14);for(i=l[--u],e%=d,i&&e&&(o=h[d-e],l[u]=a(i/o)*o);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=d);for(u=1,o=l[0];o>=10;o/=10,u++);u<d&&(r-=d-u)}return f.e=r,f.c=l,f}),K.sum=function(){for(var e=1,t=arguments,n=new K(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,o,s,a){var c,u,l,d,f,h,g,p,y=r.indexOf("."),E=F,b=D;for(y>=0&&(d=k,k=0,r=r.replace(".",""),h=(p=new K(i)).pow(r.length-y),k=d,p.c=t(S(m(h.c),h.e,"0"),10,o,e),p.e=p.c.length),l=d=(g=t(r,i,o,a?(c=j,e):(c=e,j))).length;0==g[--d];g.pop());if(!g[0])return c.charAt(0);if(y<0?--l:(h.c=g,h.e=l,h.s=s,g=(h=n(h,p,E,b,o)).c,f=h.r,l=h.e),y=g[u=l+E+1],d=o/2,f=f||u<0||null!=g[u+1],f=b<4?(null!=y||f)&&(0==b||b==(h.s<0?3:2)):y>d||y==d&&(4==b||f||6==b&&1&g[u-1]||b==(h.s<0?8:7)),u<1||!g[0])r=f?S(c.charAt(1),-E,c.charAt(0)):c.charAt(0);else{if(g.length=u,f)for(--o;++g[--u]>o;)g[u]=0,u||(++l,g=[1].concat(g));for(d=g.length;!g[--d];);for(y=0,r="";y<=d;r+=c.charAt(g[y++]));r=S(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,s,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%g)+(r=l*o+(s=e[c]/g|0)*u)%g*g+a)/n|0)+(r/g|0)+l*s,e[c]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,s,c){var u,f,h,g,p,m,E,b,w,A,S,v,T,O,I,B,_,N=r.s==i.s?1:-1,L=r.c,C=i.c;if(!(L&&L[0]&&C&&C[0]))return new K(r.s&&i.s&&(L?!C||L[0]!=C[0]:C)?L&&0==L[0]||!C?0*N:N/0:NaN);for(w=(b=new K(N)).c=[],N=o+(f=r.e-i.e)+1,c||(c=l,f=y(r.e/d)-y(i.e/d),N=N/d|0),h=0;C[h]==(L[h]||0);h++);if(C[h]>(L[h]||0)&&f--,N<0)w.push(1),g=!0;else{for(O=L.length,B=C.length,h=0,N+=2,(p=a(c/(C[0]+1)))>1&&(C=e(C,p,c),L=e(L,p,c),B=C.length,O=L.length),T=B,S=(A=L.slice(0,B)).length;S<B;A[S++]=0);_=C.slice(),_=[0].concat(_),I=C[0],C[1]>=c/2&&I++;do{if(p=0,(u=t(C,A,B,S))<0){if(v=A[0],B!=S&&(v=v*c+(A[1]||0)),(p=a(v/I))>1)for(p>=c&&(p=c-1),E=(m=e(C,p,c)).length,S=A.length;1==t(m,A,E,S);)p--,n(m,B<E?_:C,E,c),E=m.length,u=1;else 0==p&&(u=p=1),E=(m=C.slice()).length;if(E<S&&(m=[0].concat(m)),n(A,m,S,c),S=A.length,-1==u)for(;t(C,A,B,S)<1;)p++,n(A,B<S?_:C,S,c),S=A.length}else 0===u&&(p++,A=[0]);w[h++]=p,A[0]?A[S++]=L[T]||0:(A=[L[T]],S=1)}while((T++<O||null!=A[0])&&N--);g=null!=A[0],w[0]||w.splice(0,1)}if(c==l){for(h=1,N=w[0];N>=10;N/=10,h++);X(b,o+(b.e=h+f*d-1)+1,s,g)}else b.e=f,b.r=+g;return b}}(),O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,B=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,o=n?t:t.replace(N,"");if(_.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(O,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(I,"$1").replace(B,"0.$1")),t!=o))return new K(o,i);if(K.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},L.absoluteValue=L.abs=function(){var e=new K(this);return e.s<0&&(e.s=1),e},L.comparedTo=function(e,t){return E(this,new K(e,t))},L.decimalPlaces=L.dp=function(e,t){var n,r,i,o=this;if(null!=e)return b(e,0,p),null==t?t=D:b(t,0,8),X(new K(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-y(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},L.dividedBy=L.div=function(e,t){return n(this,new K(e,t),F,D)},L.dividedToIntegerBy=L.idiv=function(e,t){return n(this,new K(e,t),0,1)},L.exponentiatedBy=L.pow=function(e,t){var n,r,i,o,u,l,f,h,g=this;if((e=new K(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new K(t)),u=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return h=new K(Math.pow(+Y(g),u?e.s*(2-w(e)):+Y(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new K(NaN);(r=!l&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||u&&g.c[1]>=24e7:g.c[0]<8e13||u&&g.c[0]<=9999975e7)))return o=g.s<0&&w(e)?-0:0,g.e>-1&&(o=1/o),new K(l?1/o:o);k&&(o=s(k/d+2))}for(u?(n=new K(.5),l&&(e.s=1),f=w(e)):f=(i=Math.abs(+Y(e)))%2,h=new K(C);;){if(f){if(!(h=h.times(g)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(t))}if(i){if(0===(i=a(i/2)))break;f=i%2}else if(X(e=e.times(n),e.e+1,1),e.e>14)f=w(e);else{if(0===(i=+Y(e)))break;f=i%2}g=g.times(g),o?g.c&&g.c.length>o&&(g.c.length=o):r&&(g=g.mod(t))}return r?h:(l&&(h=C.div(h)),t?h.mod(t):o?X(h,k,D,void 0):h)},L.integerValue=function(e){var t=new K(this);return null==e?e=D:b(e,0,8),X(t,t.e+1,e)},L.isEqualTo=L.eq=function(e,t){return 0===E(this,new K(e,t))},L.isFinite=function(){return!!this.c},L.isGreaterThan=L.gt=function(e,t){return E(this,new K(e,t))>0},L.isGreaterThanOrEqualTo=L.gte=function(e,t){return 1===(t=E(this,new K(e,t)))||0===t},L.isInteger=function(){return!!this.c&&y(this.e/d)>this.c.length-2},L.isLessThan=L.lt=function(e,t){return E(this,new K(e,t))<0},L.isLessThanOrEqualTo=L.lte=function(e,t){return-1===(t=E(this,new K(e,t)))||0===t},L.isNaN=function(){return!this.s},L.isNegative=function(){return this.s<0},L.isPositive=function(){return this.s>0},L.isZero=function(){return!!this.c&&0==this.c[0]},L.minus=function(e,t){var n,r,i,o,s=this,a=s.s;if(t=(e=new K(e,t)).s,!a||!t)return new K(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/d,u=e.e/d,f=s.c,h=e.c;if(!c||!u){if(!f||!h)return f?(e.s=-t,e):new K(h?s:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new K(f[0]?s:3==D?-0:0)}if(c=y(c),u=y(u),f=f.slice(),a=c-u){for((o=a<0)?(a=-a,i=f):(u=c,i=h),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=f.length)<(t=h.length))?a:t,a=t=0;t<r;t++)if(f[t]!=h[t]){o=f[t]<h[t];break}if(o&&(i=f,f=h,h=i,e.s=-e.s),(t=(r=h.length)-(n=f.length))>0)for(;t--;f[n++]=0);for(t=l-1;r>a;){if(f[--r]<h[r]){for(n=r;n&&!f[--n];f[n]=t);--f[n],f[r]+=l}f[r]-=h[r]}for(;0==f[0];f.splice(0,1),--u);return f[0]?W(e,f,u):(e.s=3==D?-1:1,e.c=[e.e=0],e)},L.modulo=L.mod=function(e,t){var r,i,o=this;return e=new K(e,t),!o.c||!e.s||e.c&&!e.c[0]?new K(NaN):!e.c||o.c&&!o.c[0]?new K(o):(9==H?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,H),(e=o.minus(r.times(e))).c[0]||1!=H||(e.s=o.s),e)},L.multipliedBy=L.times=function(e,t){var n,r,i,o,s,a,c,u,f,h,p,m,E,b,w,A=this,S=A.c,v=(e=new K(e,t)).c;if(!(S&&v&&S[0]&&v[0]))return!A.s||!e.s||S&&!S[0]&&!v||v&&!v[0]&&!S?e.c=e.e=e.s=null:(e.s*=A.s,S&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(A.e/d)+y(e.e/d),e.s*=A.s,(c=S.length)<(h=v.length)&&(E=S,S=v,v=E,i=c,c=h,h=i),i=c+h,E=[];i--;E.push(0));for(b=l,w=g,i=h;--i>=0;){for(n=0,p=v[i]%w,m=v[i]/w|0,o=i+(s=c);o>i;)n=((u=p*(u=S[--s]%w)+(a=m*u+(f=S[s]/w|0)*p)%w*w+E[o]+n)/b|0)+(a/w|0)+m*f,E[o--]=u%b;E[o]=n}return n?++r:E.splice(0,1),W(e,E,r)},L.negated=function(){var e=new K(this);return e.s=-e.s||null,e},L.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new K(e,t)).s,!i||!t)return new K(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/d,s=e.e/d,a=r.c,c=e.c;if(!o||!s){if(!a||!c)return new K(i/0);if(!a[0]||!c[0])return c[0]?e:new K(a[0]?r:0*i)}if(o=y(o),s=y(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=c):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=c.length)<0&&(n=c,c=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++s),W(e,a,s)},L.precision=L.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return b(e,1,p),null==t?t=D:b(t,0,8),X(new K(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},L.shiftedBy=function(e){return b(e,-9007199254740991,f),this.times("1e"+e)},L.squareRoot=L.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,c=s.s,u=s.e,l=F+4,d=new K("0.5");if(1!==c||!a||!a[0])return new K(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+Y(s)))||c==1/0?(((t=m(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new K(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new K(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(o=r,r=d.times(o.plus(n(s,o,l,1))),m(o.c).slice(0,c)===(t=m(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(X(r,r.e+F+2,1),e=!r.times(r).eq(s));break}if(!i&&(X(o,o.e+F+2,0),o.times(o).eq(s))){r=o;break}l+=4,c+=4,i=1}return X(r,r.e+F+1,D,e)},L.toExponential=function(e,t){return null!=e&&(b(e,0,p),e++),G(this,e,t,1)},L.toFixed=function(e,t){return null!=e&&(b(e,0,p),e=e+this.e+1),G(this,e,t)},L.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var o,s=r.split("."),a=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",d=s[0],f=s[1],h=i.s<0,g=h?d.slice(1):d,p=g.length;if(u&&(o=a,a=u,u=o,p-=o),a>0&&p>0){for(o=p%a||a,d=g.substr(0,o);o<p;o+=a)d+=l+g.substr(o,a);u>0&&(d+=l+g.slice(o)),h&&(d="-"+d)}r=f?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):d}return(n.prefix||"")+r+(n.suffix||"")},L.toFraction=function(e){var t,r,i,o,s,a,u,l,f,g,p,y,E=this,b=E.c;if(null!=e&&(!(u=new K(e)).isInteger()&&(u.c||1!==u.s)||u.lt(C)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Y(u));if(!b)return new K(E);for(t=new K(C),f=r=new K(C),i=l=new K(C),y=m(b),s=t.e=y.length-E.e-1,t.c[0]=h[(a=s%d)<0?d+a:a],e=!e||u.comparedTo(t)>0?s>0?t:f:u,a=x,x=1/0,u=new K(y),l.c[0]=0;g=n(u,t,0,1),1!=(o=r.plus(g.times(i))).comparedTo(e);)r=i,i=o,f=l.plus(g.times(o=f)),l=o,t=u.minus(g.times(o=t)),u=o;return o=n(e.minus(r),i,0,1),l=l.plus(o.times(f)),r=r.plus(o.times(i)),l.s=f.s=E.s,p=n(f,i,s*=2,D).minus(E).abs().comparedTo(n(l,r,s,D).minus(E).abs())<1?[f,i]:[l,r],x=a,p},L.toNumber=function(){return+Y(this)},L.toPrecision=function(e,t){return null!=e&&b(e,1,p),G(this,e,t,2)},L.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=P||o>=M?A(m(n.c),o):S(m(n.c),o,"0"):10===e&&z?t=S(m((n=X(new K(n),F+o+1,D)).c),n.e,"0"):(b(e,2,j.length,"Base"),t=r(S(m(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},L.valueOf=L.toJSON=function(){return Y(this)},L._isBigNumber=!0,null!=t&&K.set(t),K}(),i.default=i.BigNumber=i,void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=d,t.pow=f,t.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},t.invert=h,t.tonelliShanks=g,t.FpSqrt=p,t.validateField=function(e){const t=y.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=E,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?h(n,e.ORDER):e.inv(n))},t.FpLegendre=b,t.FpIsSquare=function(e){const t=b(e.ORDER);return n=>{const r=t(e,n);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},t.nLength=w,t.Field=function(e,t,n=!1,s={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:a,nByteLength:c}=w(e,t);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const l=Object.freeze({ORDER:e,isLE:n,BITS:a,BYTES:c,MASK:(0,r.bitMask)(a),ZERO:i,ONE:o,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>m(l,e,t),div:(t,n)=>d(t*h(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(t=>(u||(u=p(e)),u(l,t))),invertBatch:e=>E(l,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,s=w(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=A,t.getMinHashLength=S,t.mapHashToField=function(e,t,n=!1){const i=e.length,s=A(t),a=S(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o;return n?(0,r.numberToBytesLE)(c,s):(0,r.numberToBytesBE)(c,s)};const r=n(3449),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function d(e,t){const n=e%t;return n>=i?n:t+n}function f(e,t,n){if(t<i)throw new Error("invalid exponent, negatives unsupported");if(n<=i)throw new Error("invalid modulus");if(n===o)return i;let r=o;for(;t>i;)t&o&&(r=r*e%n),e=e*e%n,t>>=o;return r}function h(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let n=d(e,t),r=t,s=i,a=o,c=o,u=i;for(;n!==i;){const e=r/n,t=r%n,i=s-c*e,o=a-u*e;r=n,n=t,s=c,a=u,c=i,u=o}if(r!==o)throw new Error("invert: does not exist");return d(s,t)}function g(e){const t=(e-o)/s;let n,r,a;for(n=e-o,r=0;n%s===i;n/=s,r++);for(a=s;a<e&&f(a,t,e)!==e-o;a++)if(a>1e3)throw new Error("Cannot find square root: likely non-prime P");if(1===r){const t=(e+o)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const u=(n+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=r,c=e.pow(e.mul(e.ONE,a),n),l=e.pow(i,u),d=e.pow(i,n);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(d);t<s&&!e.eql(n,e.ONE);t++)n=e.sqr(n);const n=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(n),l=e.mul(l,n),d=e.mul(d,c),s=t}return l}}function p(e){if(e%c===a){const t=(e+o)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%l===u){const t=(e-u)/l;return function(e,n){const r=e.mul(n,s),i=e.pow(r,t),o=e.mul(n,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}}return g(e)}t.isNegativeLE=(e,t)=>(d(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,n){if(n<i)throw new Error("invalid exponent, negatives unsupported");if(n===i)return e.ONE;if(n===o)return t;let r=e.ONE,s=t;for(;n>i;)n&o&&(r=e.mul(r,s)),s=e.sqr(s),n>>=o;return r}function E(e,t){const n=new Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n}function b(e){const t=(e-o)/s;return(e,n)=>e.pow(n,t)}function w(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function A(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function S(e){const t=A(e);return t+Math.ceil(t/2)}},811:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.handleStreamPartialPayment=t.handlePartialPayment=void 0;const i=r(n(735)),o=n(5620),s=n(9843),a=n(99);function c(e,t){var n,r;if(null==e||null==t||"Payment"!==e.TransactionType)return!1;let c=t;if("string"==typeof c){if("unavailable"===c)return!1;c=(0,o.decode)(c)}if(!("number"==typeof e.Flags?(0,a.isFlagEnabled)(e.Flags,s.PaymentFlags.tfPartialPayment):null===(n=e.Flags)||void 0===n?void 0:n.tfPartialPayment))return!1;const u=c.delivered_amount,l=null!==(r=e.DeliverMax)&&void 0!==r?r:e.Amount;return void 0!==u&&!function(e,t){if("string"==typeof e&&"string"==typeof t)return e===t;if("string"==typeof e||"string"==typeof t)return!1;if((0,s.isMPTAmount)(e)&&(0,s.isMPTAmount)(t)){const n=new i.default(e.value),r=new i.default(t.value);return e.mpt_issuance_id===t.mpt_issuance_id&&n.isEqualTo(r)}if((0,s.isMPTAmount)(e)||(0,s.isMPTAmount)(t))return!1;const n=new i.default(e.value),r=new i.default(t.value);return e.currency===t.currency&&e.issuer===t.issuer&&n.isEqualTo(r)}(u,l)}t.handlePartialPayment=function(e,t){var n;if(function(e,t){switch(e){case"tx":return function(e){return c(e.result.tx_json,e.result.meta)}(t);case"transaction_entry":return function(e){return c(e.result.tx_json,e.result.metadata)}(t);case"account_tx":return function(e){const{transactions:t}=e.result;return t.some(e=>{if(null!=e.tx_json){const t=e;return c(t.tx_json,t.meta)}const t=e;return c(t.tx,t.meta)})}(t);default:return!1}}(e,t)){const e=null!==(n=t.warnings)&&void 0!==n?n:[],r={id:2001,message:"This response contains a Partial Payment"};e.push(r),t.warnings=e}},t.handleStreamPartialPayment=function(e,t){var n,r;if(c(null!==(n=e.tx_json)&&void 0!==n?n:e.transaction,e.meta)){const n=null!==(r=e.warnings)&&void 0!==r?r:[],i={id:2001,message:"This response contains a Partial Payment"};n.push(i),e.warnings=n,t("Partial payment received",JSON.stringify(e))}}},821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePermissionedDomainSet=void 0;const r=n(2794);t.validatePermissionedDomainSet=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateOptionalField)(e,"DomainID",r.isString),(0,r.validateRequiredField)(e,"AcceptedCredentials",r.isArray),(0,r.validateCredentialsList)(e.AcceptedCredentials,e.TransactionType,!1,10)}},857:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HDKey=t.HARDENED_OFFSET=void 0;const r=n(5827),i=n(9450),o=n(6202),s=n(1026),a=n(4233),c=n(5492),u=n(1616),l=i.secp256k1.ProjectivePoint,d=(0,u.createBase58check)(a.sha256);function f(e){(0,c.abytes)(e);const t=0===e.length?"0":(0,c.bytesToHex)(e);return BigInt("0x"+t)}const h=(0,c.utf8ToBytes)("Bitcoin seed"),g={private:76066276,public:76067358};t.HARDENED_OFFSET=2147483648;const p=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error("invalid number, should be from 0 to 2**32-1, got "+e);const t=new Uint8Array(4);return(0,c.createView)(t).setUint32(0,e,!1),t};class y{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return e=this.pubHash,(0,c.createView)(e).getUint32(0,!1);var e}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const e=this.privateKey;if(!e)throw new Error("No private key");return d.encode(this.serialize(this.versions.private,(0,c.concatBytes)(new Uint8Array([0]),e)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return d.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(e,t=g){if((0,c.abytes)(e),8*e.length<128||8*e.length>512)throw new Error("HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got "+e.length);const n=(0,o.hmac)(a.sha512,h,e);return new y({versions:t,chainCode:n.slice(32),privateKey:n.slice(0,32)})}static fromExtendedKey(e,t=g){const n=d.decode(e),r=(0,c.createView)(n),i=r.getUint32(0,!1),o={versions:t,depth:n[4],parentFingerprint:r.getUint32(5,!1),index:r.getUint32(9,!1),chainCode:n.slice(13,45)},s=n.slice(45),a=0===s[0];if(i!==t[a?"private":"public"])throw new Error("Version mismatch");return new y(a?{...o,privateKey:s.slice(1)}:{...o,publicKey:s})}static fromJSON(e){return y.fromExtendedKey(e.xpriv)}constructor(e){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!e||"object"!=typeof e)throw new Error("HDKey.constructor must not be called directly");if(this.versions=e.versions||g,this.depth=e.depth||0,this.chainCode=e.chainCode||null,this.index=e.index||0,this.parentFingerprint=e.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(e.publicKey&&e.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(e.privateKey){if(!i.secp256k1.utils.isValidPrivateKey(e.privateKey))throw new Error("Invalid private key");this.privKey="bigint"==typeof e.privateKey?e.privateKey:f(e.privateKey),this.privKeyBytes=function(e){if("bigint"!=typeof e)throw new Error("bigint expected");return(0,c.hexToBytes)(e.toString(16).padStart(64,"0"))}(this.privKey),this.pubKey=i.secp256k1.getPublicKey(e.privateKey,!0)}else{if(!e.publicKey)throw new Error("HDKey: no public or private key provided");this.pubKey=l.fromHex(e.publicKey).toRawBytes(!0)}var t;this.pubHash=(t=this.pubKey,(0,s.ripemd160)((0,a.sha256)(t)))}derive(e){if(!/^[mM]'?/.test(e))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(e))return this;const n=e.replace(/^[mM]'?\//,"").split("/");let r=this;for(const e of n){const n=/^(\d+)('?)$/.exec(e),i=n&&n[1];if(!n||3!==n.length||"string"!=typeof i)throw new Error("invalid child index: "+e);let o=+i;if(!Number.isSafeInteger(o)||o>=t.HARDENED_OFFSET)throw new Error("Invalid index");"'"===n[2]&&(o+=t.HARDENED_OFFSET),r=r.deriveChild(o)}return r}deriveChild(e){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=p(e);if(e>=t.HARDENED_OFFSET){const e=this.privateKey;if(!e)throw new Error("Could not derive hardened child key");n=(0,c.concatBytes)(new Uint8Array([0]),e,n)}else n=(0,c.concatBytes)(this.pubKey,n);const s=(0,o.hmac)(a.sha512,this.chainCode,n),u=f(s.slice(0,32)),d=s.slice(32);if(!i.secp256k1.utils.isValidPrivateKey(u))throw new Error("Tweak bigger than curve order");const h={versions:this.versions,chainCode:d,depth:this.depth+1,parentFingerprint:this.fingerprint,index:e};try{if(this.privateKey){const e=(0,r.mod)(this.privKey+u,i.secp256k1.CURVE.n);if(!i.secp256k1.utils.isValidPrivateKey(e))throw new Error("The tweak was out of range or the resulted private key is invalid");h.privateKey=e}else{const e=l.fromHex(this.pubKey).add(l.fromPrivateKey(u));if(e.equals(l.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");h.publicKey=e.toRawBytes(!0)}return new y(h)}catch(t){return this.deriveChild(e+1)}}sign(e){if(!this.privateKey)throw new Error("No privateKey set!");return(0,c.abytes)(e,32),i.secp256k1.sign(e,this.privKey).toCompactRawBytes()}verify(e,t){if((0,c.abytes)(e,32),(0,c.abytes)(t,64),!this.publicKey)throw new Error("No publicKey set!");let n;try{n=i.secp256k1.Signature.fromCompact(t)}catch(e){return!1}return i.secp256k1.verify(n,e,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(e,t){if(!this.chainCode)throw new Error("No chainCode set");return(0,c.abytes)(t,33),(0,c.concatBytes)(p(e),new Uint8Array([this.depth]),p(this.parentFingerprint),p(this.index),this.chainCode,t)}}t.HDKey=y},892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryParser=void 0;const r=n(1141),i=n(619);t.BinaryParser=class{constructor(e,t=r.DEFAULT_DEFINITIONS){this.bytes=(0,i.hexToBytes)(e),this.definitions=t}peek(){if(0===this.bytes.byteLength)throw new Error;return this.bytes[0]}skip(e){if(e>this.bytes.byteLength)throw new Error;this.bytes=this.bytes.slice(e)}read(e){if(e>this.bytes.byteLength)throw new Error;const t=this.bytes.slice(0,e);return this.skip(e),t}readUIntN(e){if(0>=e||e>4)throw new Error("invalid n");return this.read(e).reduce((e,t)=>e<<8|t)>>>0}readUInt8(){return this.readUIntN(1)}readUInt16(){return this.readUIntN(2)}readUInt32(){return this.readUIntN(4)}size(){return this.bytes.byteLength}end(e){const t=this.bytes.byteLength;return 0===t||void 0!==e&&t<=e}readVariableLength(){return this.read(this.readVariableLengthLength())}readVariableLengthLength(){const e=this.readUInt8();if(e<=192)return e;if(e<=240)return 193+256*(e-193)+this.readUInt8();if(e<=254)return 12481+65536*(e-241)+256*this.readUInt8()+this.readUInt8();throw new Error("Invalid variable length indicator")}readFieldOrdinal(){let e=this.readUInt8(),t=15&e;if(e>>=4,0===e&&(e=this.readUInt8(),0===e||e<16))throw new Error(`Cannot read FieldOrdinal, type_code ${e} out of range`);if(0===t&&(t=this.readUInt8(),0===t||t<16))throw new Error(`Cannot read FieldOrdinal, field_code ${t} out of range`);return e<<16|t}readField(){return this.definitions.field.fromString(this.readFieldOrdinal().toString())}readType(e){return e.fromParser(this)}typeForField(e){return e.associatedType}readFieldValue(e){const t=this.typeForField(e);if(!t)throw new Error(`unsupported: (${e.name}, ${e.type.name})`);const n=e.isVariableLengthEncoded?this.readVariableLengthLength():void 0,r=t.fromParser(this,n);if(void 0===r)throw new Error(`fromParser for (${e.name}, ${e.type.name}) -> undefined `);return r}readFieldAndValue(){const e=this.readField();return[e,this.readFieldValue(e)]}}},964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2427);class i extends r.EventEmitter{constructor(e,t,n){super(),this.ws=new WebSocket(e),this.ws.onclose=e=>{let t;e.reason&&(t=(new TextEncoder).encode(e.reason)),this.emit("close",e.code,t)},this.ws.onopen=()=>{this.emit("open")},this.ws.onerror=e=>{this.emit("error",e)},this.ws.onmessage=e=>{this.emit("message",e.data)}}get readyState(){return this.ws.readyState}close(e,t){1===this.readyState&&this.ws.close(e,t)}send(e){this.ws.send(e)}}i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,t.default=i},988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMWithdraw=t.AMMWithdrawFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfLPToken=65536]="tfLPToken",e[e.tfWithdrawAll=131072]="tfWithdrawAll",e[e.tfOneAssetWithdrawAll=262144]="tfOneAssetWithdrawAll",e[e.tfSingleAsset=524288]="tfSingleAsset",e[e.tfTwoAsset=1048576]="tfTwoAsset",e[e.tfOneAssetLPToken=2097152]="tfOneAssetLPToken",e[e.tfLimitLPToken=4194304]="tfLimitLPToken"}(o||(t.AMMWithdrawFlags=o={})),t.validateAMMWithdraw=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMWithdraw: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMWithdraw: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMWithdraw: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMWithdraw: Asset2 must be a Currency");if(null!=e.Amount2&&null==e.Amount)throw new r.ValidationError("AMMWithdraw: must set Amount with Amount2");if(null!=e.EPrice&&null==e.Amount)throw new r.ValidationError("AMMWithdraw: must set Amount with EPrice");if(null!=e.LPTokenIn&&!(0,i.isIssuedCurrencyAmount)(e.LPTokenIn))throw new r.ValidationError("AMMWithdraw: LPTokenIn must be an IssuedCurrencyAmount");if(null!=e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMWithdraw: Amount must be an Amount");if(null!=e.Amount2&&!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMWithdraw: Amount2 must be an Amount");if(null!=e.EPrice&&!(0,i.isAmount)(e.EPrice))throw new r.ValidationError("AMMWithdraw: EPrice must be an Amount")}},1026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;const r=n(6897),i=n(5492),o=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),s=new Uint32Array(80);class a extends r.HashMD{constructor(){super(64,20,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4]}get(){const{A:e,B:t,C:n,D:r,E:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i}process(e,t){for(let n=0;n<16;n++,t+=4)s[n]=e.getUint32(t,!1);for(let e=16;e<80;e++)s[e]=(0,i.rotl)(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let{A:n,B:o,C:a,D:c,E:u}=this;for(let e=0;e<80;e++){let t,l;e<20?(t=(0,r.Chi)(o,a,c),l=1518500249):e<40?(t=o^a^c,l=1859775393):e<60?(t=(0,r.Maj)(o,a,c),l=2400959708):(t=o^a^c,l=3395469782);const d=(0,i.rotl)(n,5)+t+u+l+s[e]|0;u=c,c=a,a=(0,i.rotl)(o,30),o=n,n=d}n=n+this.A|0,o=o+this.B|0,a=a+this.C|0,c=c+this.D|0,u=u+this.E|0,this.set(n,o,a,c,u)}roundClean(){(0,i.clean)(s)}destroy(){this.set(0,0,0,0,0),(0,i.clean)(this.buffer)}}t.SHA1=a,t.sha1=(0,i.createHasher)(()=>new a);const c=Math.pow(2,32),u=Array.from({length:64},(e,t)=>Math.floor(c*Math.abs(Math.sin(t+1)))),l=o.slice(0,4),d=new Uint32Array(16);class f extends r.HashMD{constructor(){super(64,16,8,!0),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3]}get(){const{A:e,B:t,C:n,D:r}=this;return[e,t,n,r]}set(e,t,n,r){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r}process(e,t){for(let n=0;n<16;n++,t+=4)d[n]=e.getUint32(t,!0);let{A:n,B:o,C:s,D:a}=this;for(let e=0;e<64;e++){let t,c,l;e<16?(t=(0,r.Chi)(o,s,a),c=e,l=[7,12,17,22]):e<32?(t=(0,r.Chi)(a,o,s),c=(5*e+1)%16,l=[5,9,14,20]):e<48?(t=o^s^a,c=(3*e+5)%16,l=[4,11,16,23]):(t=s^(o|~a),c=7*e%16,l=[6,10,15,21]),t=t+n+u[e]+d[c],n=a,a=s,s=o,o+=(0,i.rotl)(t,l[e%4])}n=n+this.A|0,o=o+this.B|0,s=s+this.C|0,a=a+this.D|0,this.set(n,o,s,a)}roundClean(){(0,i.clean)(d)}destroy(){this.set(0,0,0,0),(0,i.clean)(this.buffer)}}t.MD5=f,t.md5=(0,i.createHasher)(()=>new f);const h=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),g=(()=>Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)))(),p=(()=>g.map(e=>(9*e+5)%16))(),y=(()=>{const e=[[g],[p]];for(let t=0;t<4;t++)for(let n of e)n.push(n[t].map(e=>h[e]));return e})(),m=(()=>y[0])(),E=(()=>y[1])(),b=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),w=m.map((e,t)=>e.map(e=>b[t][e])),A=E.map((e,t)=>e.map(e=>b[t][e])),S=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),v=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function T(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}const O=new Uint32Array(16);class I extends r.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:r,h4:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|r,this.h4=0|i}process(e,t){for(let n=0;n<16;n++,t+=4)O[n]=e.getUint32(t,!0);let n=0|this.h0,r=n,o=0|this.h1,s=o,a=0|this.h2,c=a,u=0|this.h3,l=u,d=0|this.h4,f=d;for(let e=0;e<5;e++){const t=4-e,h=S[e],g=v[e],p=m[e],y=E[e],b=w[e],I=A[e];for(let t=0;t<16;t++){const r=(0,i.rotl)(n+T(e,o,a,u)+O[p[t]]+h,b[t])+d|0;n=d,d=u,u=0|(0,i.rotl)(a,10),a=o,o=r}for(let e=0;e<16;e++){const n=(0,i.rotl)(r+T(t,s,c,l)+O[y[e]]+g,I[e])+f|0;r=f,f=l,l=0|(0,i.rotl)(c,10),c=s,s=n}}this.set(this.h1+a+l|0,this.h2+u+f|0,this.h3+d+r|0,this.h4+n+s|0,this.h0+o+c|0)}roundClean(){(0,i.clean)(O)}destroy(){this.destroyed=!0,(0,i.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=I,t.ripemd160=(0,i.createHasher)(()=>new I)},1056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=u,t.expand_message_xof=l,t.hash_to_field=d,t.isogenyMap=function(e,t){const n=t.map(e=>Array.from(e).reverse());return(t,r)=>{const[i,o,s,a]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r)));return t=e.div(i,o),r=e.mul(r,e.div(s,a)),{x:t,y:r}}},t.createHasher=function(e,t,n){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,i){const o=d(r,2,{...n,DST:n.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,i){const o=d(r,1,{...n,DST:n.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(const e of n)if("bigint"!=typeof e)throw new Error("mapToCurve: expected array of bigints");const r=e.fromAffine(t(n)).clearCofactor();return r.assertValidity(),r}}};const r=n(802),i=n(3449),o=i.bytesToNumberBE;function s(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e,t,n,r){(0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255&&(t=r((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:u}=r,l=Math.ceil(n/o);if(n>65535||l>255)throw new Error("expand_message_xmd: invalid lenInBytes");const d=(0,i.concatBytes)(t,s(t.length,1)),f=s(0,u),h=s(n,2),g=new Array(l),p=r((0,i.concatBytes)(f,e,h,s(0,1),d));g[0]=r((0,i.concatBytes)(p,s(1,1),d));for(let e=1;e<=l;e++){const t=[a(p,g[e-1]),s(e+1,1),d];g[e]=r((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,n)}function l(e,t,n,r,o){if((0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255){const e=Math.ceil(2*r/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(e).update(s(n,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,n){(0,i.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:d,hash:f,expand:h,DST:g}=n;(0,i.abytes)(e),c(t);const p="string"==typeof g?(0,i.utf8ToBytes)(g):g,y=s.toString(2).length,m=Math.ceil((y+a)/8),E=t*d*m;let b;if("xmd"===h)b=u(e,p,E,f);else if("xof"===h)b=l(e,p,E,a,f);else{if("_internal_pass"!==h)throw new Error('expand must be "xmd" or "xof"');b=e}const w=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let n=0;n<d;n++){const i=m*(n+e*d),a=b.subarray(i,i+m);t[n]=(0,r.mod)(o(a),s)}w[e]=t}return w}},1141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TRANSACTION_TYPES=t.TransactionType=t.TransactionResult=t.LedgerEntryType=t.Type=t.Field=t.DEFAULT_DEFINITIONS=t.XrplDefinitionsBase=t.Bytes=void 0;const i=r(n(8102)),o=n(8816);Object.defineProperty(t,"XrplDefinitionsBase",{enumerable:!0,get:function(){return o.XrplDefinitionsBase}}),Object.defineProperty(t,"Bytes",{enumerable:!0,get:function(){return o.Bytes}});const s=new o.XrplDefinitionsBase(i.default,{});t.DEFAULT_DEFINITIONS=s;const a=s.type;t.Type=a;const c=s.ledgerEntryType;t.LedgerEntryType=c;const u=s.transactionType;t.TransactionType=u;const l=s.transactionResult;t.TransactionResult=l;const d=s.field;t.Field=d;const f=s.transactionNames;t.TRANSACTION_TYPES=f},1218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlist=void 0,t.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")},1275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Comparable=t.SerializedType=void 0;const r=n(7995),i=n(619);class o{constructor(e){this.bytes=new Uint8Array(0),this.bytes=null!=e?e:new Uint8Array(0)}static fromParser(e,t){throw new Error("fromParser not implemented")}static from(e){throw new Error("from not implemented")}toBytesSink(e){e.put(this.bytes)}toHex(){return(0,i.bytesToHex)(this.toBytes())}toBytes(){if(this.bytes)return this.bytes;const e=new r.BytesList;return this.toBytesSink(e),e.toBytes()}toJSON(e,t){return this.toHex()}toString(){return this.toHex()}}t.SerializedType=o,t.Comparable=class extends o{lt(e){return this.compareTo(e)<0}eq(e){return 0===this.compareTo(e)}gt(e){return this.compareTo(e)>0}gte(e){return this.compareTo(e)>-1}lte(e){return this.compareTo(e)<1}compareTo(e){throw new Error(`cannot compare ${this.toString()} and ${e.toString()}`)}}},1279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_API_VERSION=t.RIPPLED_API_V2=t.RIPPLED_API_V1=void 0,t.RIPPLED_API_V1=1,t.RIPPLED_API_V2=2,t.DEFAULT_API_VERSION=t.RIPPLED_API_V2},1300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceDestroy=void 0;const r=n(2794);t.validateMPTokenIssuanceDestroy=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"MPTokenIssuanceID",r.isString)}},1366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt16=void 0;const r=n(3328),i=n(5517);class o extends r.UInt{constructor(e){super(null!=e?e:o.defaultUInt16.bytes)}static fromParser(e){return new o(e.read(o.width))}static from(e){if(e instanceof o)return e;if("number"==typeof e){o.checkUintRange(e,0,65535);const t=new Uint8Array(o.width);return(0,i.writeUInt16BE)(t,e,0),new o(t)}throw new Error("Can not construct UInt16 with given value")}valueOf(){return parseInt((0,i.readUInt16BE)(this.bytes,0))}}t.UInt16=o,o.width=2,o.defaultUInt16=new o(new Uint8Array(o.width))},1377:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashTxTree=t.hashStateTree=t.hashLedger=t.hashSignedTx=t.hashLedgerHeader=t.hashPaymentChannel=t.hashEscrow=t.hashTrustline=t.hashOfferId=t.hashSignerListId=t.hashAccountRoot=t.hashTx=void 0;const a=n(619),c=s(n(735)),u=n(6333),l=o(n(6228));t.hashLedger=l.default,Object.defineProperty(t,"hashLedgerHeader",{enumerable:!0,get:function(){return l.hashLedgerHeader}}),Object.defineProperty(t,"hashSignedTx",{enumerable:!0,get:function(){return l.hashSignedTx}}),Object.defineProperty(t,"hashTxTree",{enumerable:!0,get:function(){return l.hashTxTree}}),Object.defineProperty(t,"hashStateTree",{enumerable:!0,get:function(){return l.hashStateTree}});const d=s(n(9373)),f=s(n(3627)),h=s(n(2530)),g=16;function p(e){return(0,a.bytesToHex)((0,u.decodeAccountID)(e))}function y(e){return f.default[e].charCodeAt(0).toString(g).padStart(4,"0")}t.hashTx=function(e){const t=d.default.TRANSACTION_SIGN.toString(g).toUpperCase();return(0,h.default)(t+e)},t.hashAccountRoot=function(e){return(0,h.default)(y("account")+p(e))},t.hashSignerListId=function(e){return(0,h.default)(`${y("signerList")+p(e)}00000000`)},t.hashOfferId=function(e,t){const n=f.default.offer.charCodeAt(0).toString(g).padStart(2,"0"),r=t.toString(g).padStart(8,"0"),i=`00${n}`;return(0,h.default)(i+p(e)+r)},t.hashTrustline=function(e,t,n){const r=p(e),i=p(t),o=new c.default(r,16).isGreaterThan(new c.default(i,16)),s=o?i:r,u=o?r:i,l=y("rippleState");return(0,h.default)(l+s+u+function(e){if(3!==e.length)return e;const t=Array(20).fill(0);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),(0,a.bytesToHex)(Uint8Array.from(t))}(n))},t.hashEscrow=function(e,t){return(0,h.default)(y("escrow")+p(e)+t.toString(g).padStart(8,"0"))},t.hashPaymentChannel=function(e,t,n){return(0,h.default)(y("paychan")+p(e)+p(t)+n.toString(g).padStart(8,"0"))}},1386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOracleSet=void 0;const r=n(255),i=n(99),o=n(2794);t.validateOracleSet=function(e){(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"OracleDocumentID",o.isNumber),(0,o.validateRequiredField)(e,"LastUpdateTime",o.isNumber),(0,o.validateOptionalField)(e,"Provider",o.isString),(0,o.validateOptionalField)(e,"URI",o.isString),(0,o.validateOptionalField)(e,"AssetClass",o.isString),(0,o.validateRequiredField)(e,"PriceDataSeries",e=>{if(!(0,o.isArray)(e))throw new r.ValidationError("OracleSet: PriceDataSeries must be an array");if(e.length>10)throw new r.ValidationError("OracleSet: PriceDataSeries must have at most 10 PriceData objects");for(const t of e){if(!(0,o.isRecord)(t))throw new r.ValidationError("OracleSet: PriceDataSeries must be an array of objects");const e=t.PriceData;if(!(0,o.isRecord)(e))throw new r.ValidationError("OracleSet: PriceDataSeries must have a `PriceData` object");if(1!==Object.keys(t).length)throw new r.ValidationError("OracleSet: PriceDataSeries must only have a single PriceData object");if(null==e.BaseAsset||"string"!=typeof e.BaseAsset)throw new r.ValidationError("OracleSet: PriceDataSeries must have a `BaseAsset` string");if("string"!=typeof e.QuoteAsset)throw new r.ValidationError("OracleSet: PriceDataSeries must have a `QuoteAsset` string");if(null==e.AssetPrice!=(null==e.Scale))throw new r.ValidationError("OracleSet: PriceDataSeries must have both `AssetPrice` and `Scale` if any are present");if("AssetPrice"in e&&!(0,o.isNumber)(e.AssetPrice)){if("string"!=typeof e.AssetPrice)throw new r.ValidationError("OracleSet: Field AssetPrice must be a string or a number");if(!(0,i.isHex)(e.AssetPrice))throw new r.ValidationError("OracleSet: Field AssetPrice must be a valid hex string");if(e.AssetPrice.length<1||e.AssetPrice.length>16)throw new r.ValidationError("OracleSet: Length of AssetPrice field must be between 1 and 16 characters long")}if("Scale"in e){if(!(0,o.isNumber)(e.Scale))throw new r.ValidationError("OracleSet: invalid field Scale");if(e.Scale<0||e.Scale>10)throw new r.ValidationError("OracleSet: Scale must be in range 0-10")}}return!0})}},1441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePayment=t.PaymentFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;function a(e){return!(void 0!==e.account&&"string"!=typeof e.account||void 0!==e.currency&&"string"!=typeof e.currency||void 0!==e.issuer&&"string"!=typeof e.issuer||(void 0===e.account||void 0!==e.currency||void 0!==e.issuer)&&void 0===e.currency&&void 0===e.issuer)}function c(e){if(!Array.isArray(e)||0===e.length)return!1;for(const t of e)if(!a(t))return!1;return!0}!function(e){e[e.tfNoRippleDirect=65536]="tfNoRippleDirect",e[e.tfPartialPayment=131072]="tfPartialPayment",e[e.tfLimitQuality=262144]="tfLimitQuality"}(s||(t.PaymentFlags=s={})),t.validatePayment=function(e){if((0,o.validateBaseTransaction)(e),void 0===e.Amount)throw new r.ValidationError("PaymentTransaction: missing field Amount");if(!(0,o.isAmount)(e.Amount))throw new r.ValidationError("PaymentTransaction: invalid Amount");if((0,o.validateRequiredField)(e,"Destination",o.isAccount),(0,o.validateOptionalField)(e,"DestinationTag",o.isNumber),(0,o.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,o.MAX_AUTHORIZED_CREDENTIALS),void 0!==e.InvoiceID&&"string"!=typeof e.InvoiceID)throw new r.ValidationError("PaymentTransaction: InvoiceID must be a string");if((0,o.validateOptionalField)(e,"DomainID",o.isDomainID,{txType:"PaymentTransaction",paramName:"DomainID"}),void 0!==e.Paths&&!function(e){if(!(0,o.isArray)(e)||0===e.length)return!1;for(const t of e){if(!(0,o.isArray)(t)||0===t.length)return!1;if(!c(t))return!1}return!0}(e.Paths))throw new r.ValidationError("PaymentTransaction: invalid Paths");if(void 0!==e.SendMax&&!(0,o.isAmount)(e.SendMax))throw new r.ValidationError("PaymentTransaction: invalid SendMax");!function(e){var t;if(null!=e.DeliverMin){if(null==e.Flags)throw new r.ValidationError("PaymentTransaction: tfPartialPayment flag required with DeliverMin");const n=e.Flags;if(!("number"==typeof n?(0,i.isFlagEnabled)(n,s.tfPartialPayment):null!==(t=n.tfPartialPayment)&&void 0!==t&&t))throw new r.ValidationError("PaymentTransaction: tfPartialPayment flag required with DeliverMin");if(!(0,o.isAmount)(e.DeliverMin))throw new r.ValidationError("PaymentTransaction: invalid DeliverMin")}}(e)}},1533:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=void 0,t.fromBig=i,t.split=o,t.add=b;const n=BigInt(2**32-1),r=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[n[o],r[o]]=[s,a]}return[n,r]}const s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const u=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=u;const l=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=l;const d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;const f=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const g=(e,t)=>e;t.rotr32L=g;const p=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=p;const y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;const m=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=m;const E=(e,t,n)=>e<<n-32|t>>>64-n;function b(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}t.rotlBL=E;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const A=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=A;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=S;const v=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;t.add4H=v;const T=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);t.add5L=T;const O=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;t.add5H=O;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:g,rotlSH:p,rotlSL:y,rotlBH:m,rotlBL:E,add:b,add3L:w,add3H:A,add4L:S,add4H:v,add5H:O,add5L:T};t.default=I},1565:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.autofillBatchTxn=t.handleDeliverMax=t.checkAccountDeleteBlockers=t.setLatestValidatedLedgerSequence=t.getTransactionFee=t.setNextValidSequenceNumber=t.setValidAddresses=t.txNeedsNetworkID=void 0;const o=i(n(735)),s=n(6333),a=n(255),c=n(5684),u=i(n(6509));function l(e){return!!(void 0!==e.networkID&&e.networkID>1024&&e.buildVersion&&function(e,t){if(e===t)return!0;const n=e.split("."),r=t.split("."),i=parseInt(n[0],10),o=parseInt(n[1],10),s=parseInt(r[0],10),a=parseInt(r[1],10);if(i!==s)return i<s;if(o!==a)return o<a;const c=n[2].split("-"),u=r[2].split("-"),l=parseInt(c[0],10),d=parseInt(u[0],10);return l!==d?l<d:c.length!==u.length?c.length>u.length:2===c.length&&(c[1][0].startsWith(u[1][0])?c[1].startsWith("b")?parseInt(c[1].slice(1),10)<parseInt(u[1].slice(1),10):parseInt(c[1].slice(2),10)<parseInt(u[1].slice(2),10):c[1]<u[1])}("1.11.0",e.buildVersion))}function d(e,t,n){const{classicAccount:r,tag:i}=f(e[t]);if(e[t]=r,null!=i&&!1!==i){if(e[n]&&e[n]!==i)throw new a.ValidationError(`The ${n}, if present, must match the tag of the ${t} X-address`);e[n]=i}}function f(e,t){if((0,s.isValidXAddress)(e)){const n=(0,s.xAddressToClassicAddress)(e);if(null!=t&&n.tag!==t)throw new a.ValidationError("address includes a tag that does not match the tag specified in the transaction");return{classicAccount:n.classicAddress,tag:n.tag}}return{classicAccount:e,tag:t}}function h(e,t){const n=e[t];if("string"==typeof n){const{classicAccount:r}=f(n);e[t]=r}}function g(e,t){return r(this,void 0,void 0,function*(){const n={command:"account_info",account:t,ledger_index:"current"};return(yield e.request(n)).result.account_data.Sequence})}function p(e,t,n=0){return r(this,void 0,void 0,function*(){const i=yield(0,u.default)(e),s=(0,c.xrpToDrops)(i);let a=new o.default(s);const l=["AccountDelete","AMMCreate"].includes(t.TransactionType);if("EscrowFinish"===t.TransactionType&&null!=t.Fulfillment){const e=Math.ceil(t.Fulfillment.length/2);a=new o.default(y(s,33+e/16))}else if(l)a=yield function(e){var t;return r(this,void 0,void 0,function*(){const n=yield e.request({command:"server_state"}),r=null===(t=n.result.state.validated_ledger)||void 0===t?void 0:t.reserve_inc;return null==r?Promise.reject(new Error("Could not fetch Owner Reserve.")):new o.default(r)})}(e);else if("Batch"===t.TransactionType){const n=yield t.RawTransactions.reduce((t,n)=>r(this,void 0,void 0,function*(){const r=yield t,i=yield p(e,n.RawTransaction);return o.default.sum(r,i)}),Promise.resolve(new o.default(0)));a=o.default.sum(a.times(2),n)}n>0&&(a=o.default.sum(a,y(s,n)));const d=(0,c.xrpToDrops)(e.maxFeeXRP);return(l?a:o.default.min(a,d)).dp(0,o.default.ROUND_CEIL)})}function y(e,t){return new o.default(e).times(t).toString()}t.txNeedsNetworkID=l,t.setValidAddresses=function(e){d(e,"Account","SourceTag"),null!=e.Destination&&d(e,"Destination","DestinationTag"),h(e,"Authorize"),h(e,"Unauthorize"),h(e,"Owner"),h(e,"RegularKey")},t.setNextValidSequenceNumber=function(e,t){return r(this,void 0,void 0,function*(){t.Sequence=yield g(e,t.Account)})},t.getTransactionFee=function(e,t,n=0){return r(this,void 0,void 0,function*(){const r=yield p(e,t,n);t.Fee=r.toString(10)})},t.setLatestValidatedLedgerSequence=function(e,t){return r(this,void 0,void 0,function*(){const n=yield e.getLedgerIndex();t.LastLedgerSequence=n+20})},t.checkAccountDeleteBlockers=function(e,t){return r(this,void 0,void 0,function*(){const n={command:"account_objects",account:t.Account,ledger_index:"validated",deletion_blockers_only:!0},r=yield e.request(n);return new Promise((e,n)=>{r.result.account_objects.length>0&&n(new a.XrplError(`Account ${t.Account} cannot be deleted; there are Escrows, PayChannels, RippleStates, or Checks associated with the account.`,r.result.account_objects)),e()})})},t.handleDeliverMax=function(e){var t;if(null!=e.DeliverMax){if(null!==(t=e.Amount)&&void 0!==t||(e.Amount=e.DeliverMax),null!=e.Amount&&e.Amount!==e.DeliverMax)throw new a.ValidationError("PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided");delete e.DeliverMax}},t.autofillBatchTxn=function(e,t){return r(this,void 0,void 0,function*(){const n={};for(const r of t.RawTransactions){const i=r.RawTransaction;if(null==i.Sequence&&null==i.TicketSequence)if(i.Account in n)i.Sequence=n[i.Account],n[i.Account]+=1;else{const r=yield g(e,i.Account),o=i.Account===t.Account?r+1:r;n[i.Account]=o+1,i.Sequence=o}if(null==i.Fee)i.Fee="0";else if("0"!==i.Fee)throw new a.XrplError('Must have `Fee of "0" in inner Batch transaction.');if(null==i.SigningPubKey)i.SigningPubKey="";else if(""!==i.SigningPubKey)throw new a.XrplError('Must have `SigningPubKey` of "" in inner Batch transaction.');if(null!=i.TxnSignature)throw new a.XrplError("Must not have `TxnSignature` in inner Batch transaction.");if(null!=i.Signers)throw new a.XrplError("Must not have `Signers` in inner Batch transaction.");null==i.NetworkID&&l(e)&&(i.NetworkID=e.networkID)}})}},1602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equal=t.concat=t.HEX_REGEX=void 0;const r=n(5492);t.HEX_REGEX=/^[A-F0-9]*$/iu,t.concat=function(e){return(0,r.concatBytes)(...e)},t.equal=function(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Int8Array(e),r=new Int8Array(t);for(let t=0;t!==e.byteLength;t++)if(n[t]!==r[t])return!1;return!0}},1616:(e,t)=>{"use strict";function n(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function r(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function i(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>"string"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function o(e){if("function"!=typeof e)throw new Error("function expected");return!0}function s(e,t){if("string"!=typeof t)throw new Error(`${e}: string expected`);return!0}function a(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function c(e){if(!Array.isArray(e))throw new Error("array expected")}function u(e,t){if(!i(!0,t))throw new Error(`${e}: array of strings expected`)}function l(e,t){if(!i(!1,t))throw new Error(`${e}: array of numbers expected`)}function d(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map(e=>e.encode).reduceRight(n,t),decode:e.map(e=>e.decode).reduce(n,t)}}function f(e){const t="string"==typeof e?e.split(""):e,n=t.length;u("alphabet",t);const r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(c(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]})),decode:t=>(c(t),t.map(t=>{s("alphabet.decode",t);const n=r.get(t);if(void 0===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}function h(e=""){return s("join",e),{encode:t=>(u("join.decode",t),t.join(e)),decode:t=>(s("join.decode",t),t.split(e))}}function g(e,t="="){return a(e),s("padding",t),{encode(n){for(u("padding.encode",n);n.length*e%8;)n.push(t);return n},decode(n){u("padding.decode",n);let r=n.length;if(r*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function p(e){return o(e),{encode:e=>e,decode:t=>e(t)}}function y(e,t,n){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(c(e),!e.length)return[];let r=0;const i=[],o=Array.from(e,e=>{if(a(e),e<0||e>=t)throw new Error(`invalid integer: ${e}`);return e}),s=o.length;for(;;){let e=0,a=!0;for(let i=r;i<s;i++){const s=o[i],c=t*e,u=c+s;if(!Number.isSafeInteger(u)||c/t!==e||u-s!==c)throw new Error("convertRadix: carry overflow");const l=u/n;e=u%n;const d=Math.floor(l);if(o[i]=d,!Number.isSafeInteger(d)||d*n+e!==u)throw new Error("convertRadix: carry overflow");a&&(d?a=!1:r=i)}if(i.push(e),a)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.createBase58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64nopad=t.base64=t.base32crockford=t.base32hexnopad=t.base32hex=t.base32nopad=t.base32=t.base16=t.utils=void 0;const m=(e,t)=>0===t?e:m(t,e%t),E=(e,t)=>e+(t-m(e,t)),b=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function w(e,t,n,r){if(c(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(E(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${E(t,n)}`);let i=0,o=0;const s=b[t],u=b[n]-1,l=[];for(const r of e){if(a(r),r>=s)throw new Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)l.push((i>>o-n&u)>>>0);const e=b[o];if(void 0===e)throw new Error("invalid carry");i&=e-1}if(i=i<<n-o&u,!r&&o>=t)throw new Error("Excess padding");if(!r&&i>0)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&l.push(i>>>0),l}function A(e){return a(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return y(Array.from(t),256,e)},decode:t=>(l("radix.decode",t),Uint8Array.from(y(t,e,256)))}}function S(e,t=!1){if(a(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(E(8,e)>32||E(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return w(Array.from(r),8,e,!t)},decode:n=>(l("radix2.decode",n),Uint8Array.from(w(n,e,8,t)))}}function v(e){return o(e),function(...t){try{return e.apply(null,t)}catch(e){}}}function T(e,t){return a(e),o(t),{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const i=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const i=r.slice(0,-e),o=r.slice(-e),s=t(i).slice(0,e);for(let t=0;t<e;t++)if(s[t]!==o[t])throw new Error("Invalid checksum");return i}}}t.utils={alphabet:f,chain:d,checksum:T,convertRadix:y,convertRadix2:w,radix:A,radix2:S,join:h,padding:g},t.base16=d(S(4),f("0123456789ABCDEF"),h("")),t.base32=d(S(5),f("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),g(5),h("")),t.base32nopad=d(S(5),f("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h("")),t.base32hex=d(S(5),f("0123456789ABCDEFGHIJKLMNOPQRSTUV"),g(5),h("")),t.base32hexnopad=d(S(5),f("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h("")),t.base32crockford=d(S(5),f("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),h(""),p(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const O=(()=>"function"==typeof Uint8Array.from([]).toBase64&&"function"==typeof Uint8Array.fromBase64)(),I=(e,t)=>{s("base64",e);const n=t?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,r=t?"base64url":"base64";if(e.length>0&&!n.test(e))throw new Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:r,lastChunkHandling:"strict"})};t.base64=O?{encode:e=>(r(e),e.toBase64()),decode:e=>I(e,!1)}:d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),g(6),h("")),t.base64nopad=d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h("")),t.base64url=O?{encode:e=>(r(e),e.toBase64({alphabet:"base64url"})),decode:e=>I(e,!0)}:d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),g(6),h("")),t.base64urlnopad=d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(""));const B=e=>d(A(58),f(e),h(""));t.base58=B("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=B("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=B("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const _=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let n="";for(let r=0;r<e.length;r+=8){const i=e.subarray(r,r+8);n+=t.base58.encode(i).padStart(_[i.length],"1")}return n},decode(e){let n=[];for(let r=0;r<e.length;r+=11){const i=e.slice(r,r+11),o=_.indexOf(i.length),s=t.base58.decode(i);for(let e=0;e<s.length-o;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");n=n.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(n)}},t.createBase58check=e=>d(T(4,t=>e(e(t))),t.base58),t.base58check=t.createBase58check;const N=d(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),h("")),L=[996825010,642813549,513874426,1027748829,705979059];function C(e){const t=e>>25;let n=(33554431&e)<<5;for(let e=0;e<L.length;e++)1==(t>>e&1)&&(n^=L[e]);return n}function F(e,t,n=1){const r=e.length;let i=1;for(let t=0;t<r;t++){const n=e.charCodeAt(t);if(n<33||n>126)throw new Error(`Invalid prefix (${e})`);i=C(i)^n>>5}i=C(i);for(let t=0;t<r;t++)i=C(i)^31&e.charCodeAt(t);for(let e of t)i=C(i)^e;for(let e=0;e<6;e++)i=C(i);return i^=n,N.encode(w([i%b[30]],30,5,!1))}function D(e){const t="bech32"===e?1:734539939,r=S(5),i=r.decode,o=r.encode,a=v(i);function c(e,r,i=90){s("bech32.encode prefix",e),n(r)&&(r=Array.from(r)),l("bech32.encode",r);const o=e.length;if(0===o)throw new TypeError(`Invalid prefix length ${o}`);const a=o+7+r.length;if(!1!==i&&a>i)throw new TypeError(`Length ${a} exceeds limit ${i}`);const c=e.toLowerCase(),u=F(c,r,t);return`${c}1${N.encode(r)}${u}`}function u(e,n=90){s("bech32.decode input",e);const r=e.length;if(r<8||!1!==n&&r>n)throw new TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);const i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=i.lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const a=i.slice(0,o),c=i.slice(o+1);if(c.length<6)throw new Error("Data must be at least 6 characters long");const u=N.decode(c).slice(0,-6),l=F(a,u,t);if(!c.endsWith(l))throw new Error(`Invalid checksum in ${e}: expected "${l}"`);return{prefix:a,words:u}}return{encode:c,decode:u,encodeFromBytes:function(e,t){return c(e,o(t))},decodeToBytes:function(e){const{prefix:t,words:n}=u(e,!1);return{prefix:t,words:n,bytes:i(n)}},decodeUnsafe:v(u),fromWords:i,fromWordsUnsafe:a,toWords:o}}t.bech32=D("bech32"),t.bech32m=D("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)};const P=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),M={encode:e=>(r(e),e.toHex()),decode:e=>(s("hex",e),Uint8Array.fromHex(e))};t.hex=P?M:d(S(4),f("0123456789abcdef"),h(""),p(e=>{if("string"!=typeof e||e.length%2!=0)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const R={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},x="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!R.hasOwnProperty(e))throw new TypeError(x);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return R[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!R.hasOwnProperty(e))throw new TypeError(x);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return R[e].decode(t)},t.bytes=t.stringToBytes},1658:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const i=n(6557),o=r(n(2635));t.ripemd160=(0,o.default)(i.ripemd160)},1664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSetRegularKey=void 0;const r=n(255),i=n(2794);t.validateSetRegularKey=function(e){if((0,i.validateBaseTransaction)(e),void 0!==e.RegularKey&&"string"!=typeof e.RegularKey)throw new r.ValidationError("SetRegularKey: RegularKey must be a string")}},1722:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelCreate=void 0;const r=n(255),i=n(2794);t.validatePaymentChannelCreate=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.Amount)throw new r.ValidationError("PaymentChannelCreate: missing Amount");if("string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelCreate: Amount must be a string");if((0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),void 0===e.SettleDelay)throw new r.ValidationError("PaymentChannelCreate: missing SettleDelay");if("number"!=typeof e.SettleDelay)throw new r.ValidationError("PaymentChannelCreate: SettleDelay must be a number");if(void 0===e.PublicKey)throw new r.ValidationError("PaymentChannelCreate: missing PublicKey");if("string"!=typeof e.PublicKey)throw new r.ValidationError("PaymentChannelCreate: PublicKey must be a string");if(void 0!==e.CancelAfter&&"number"!=typeof e.CancelAfter)throw new r.ValidationError("PaymentChannelCreate: CancelAfter must be a number")}},1781:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SignerListFlags=void 0,function(e){e[e.lsfOneOwnerCount=65536]="lsfOneOwnerCount"}(n||(t.SignerListFlags=n={}))},1788:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.getAlgorithmFromPrivateKey=t.getAlgorithmFromPublicKey=t.getAlgorithmFromKey=void 0,function(e){e[e.NONE=-1]="NONE",e[e.ED25519=237]="ED25519",e[e.SECP256K1_PUB_X=2]="SECP256K1_PUB_X",e[e.SECP256K1_PUB_X_ODD_Y=3]="SECP256K1_PUB_X_ODD_Y",e[e.SECP256K1_PUB_XY=4]="SECP256K1_PUB_XY",e[e.SECP256K1_PRIVATE=0]="SECP256K1_PRIVATE"}(n||(n={}));const r={[`private_${n.NONE}_32`]:"ecdsa-secp256k1",[`private_${n.SECP256K1_PRIVATE}_33`]:"ecdsa-secp256k1",[`private_${n.ED25519}_33`]:"ed25519",[`public_${n.ED25519}_33`]:"ed25519",[`public_${n.SECP256K1_PUB_X}_33`]:"ecdsa-secp256k1",[`public_${n.SECP256K1_PUB_X_ODD_Y}_33`]:"ecdsa-secp256k1",[`public_${n.SECP256K1_PUB_XY}_65`]:"ecdsa-secp256k1"};function i(e){return e===n.NONE?"None":`0x${e.toString(16).padStart(2,"0")}`}function o(e,t){const{prefix:o,len:s}=function(e){return{prefix:e.length<2?n.NONE:parseInt(e.slice(0,2),16),len:e.length/2}}(e),a="private"===t&&32===s?n.NONE:o,c=r[`${t}_${a}_${s}`];if(!c)throw new Error(function({key:e,type:t,prefix:n,len:o}){const s=function(e){const t=17,n=6;return Object.entries(r).filter(([t])=>t.startsWith(e)).map(([e,r])=>{const[,o,s]=e.split("_");return`${r.padEnd(t)} - Prefix: ${i(Number(o)).padEnd(n)} Length: ${s} bytes`}).join("\n")}(t);return`invalid_key:\n\nType: ${t}\nKey: ${e}\nPrefix: ${i(n)} \nLength: ${o} bytes\n\nAcceptable ${t} formats are:\n${s}\n`}({key:e,type:t,len:s,prefix:a}));return c}t.getAlgorithmFromKey=o,t.getAlgorithmFromPublicKey=function(e){return o(e,"public")},t.getAlgorithmFromPrivateKey=function(e){return o(e,"private")}},1811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultSet=void 0;const r=n(255),i=n(99),o=n(2794);t.validateVaultSet=function(e){if((0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"VaultID",o.isString),(0,o.validateOptionalField)(e,"Data",o.isString),(0,o.validateOptionalField)(e,"AssetsMaximum",o.isXRPLNumber),(0,o.validateOptionalField)(e,"DomainID",o.isString),void 0!==e.Data){const t=e.Data;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultSet: Data must be a valid hex string");const n=t.length/2;if(n>o.VAULT_DATA_MAX_BYTE_LENGTH)throw new r.ValidationError(`VaultSet: Data exceeds ${o.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${n})`)}}},1837:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Issue=void 0;const r=n(619),i=n(892),o=n(5763),s=n(5967),a=n(1275),c=n(6905);class u extends a.SerializedType{constructor(e){super(null!=e?e:u.ZERO_ISSUED_CURRENCY.bytes)}static from(e){if(e instanceof u)return e;if(function(e){const t=Object.keys(e).sort(),n=1===t.length&&"currency"===t[0],r=2===t.length&&"currency"===t[0]&&"issuer"===t[1],i=1===t.length&&"mpt_issuance_id"===t[0];return n||r||i}(e)){if(e.currency){const t=s.Currency.from(e.currency.toString()).toBytes();if(e.issuer){const n=o.AccountID.from(e.issuer.toString()).toBytes();return new u((0,r.concat)([t,n]))}return new u(t)}if(e.mpt_issuance_id){const t=c.Hash192.from(e.mpt_issuance_id.toString()).toBytes();return new u(t)}}throw new Error("Invalid type to construct an Amount")}static fromParser(e,t){if(t===c.Hash192.width){const t=e.read(c.Hash192.width);return new u(t)}const n=e.read(20);if("XRP"===new s.Currency(n).toJSON())return new u(n);const i=[n,e.read(20)];return new u((0,r.concat)(i))}toJSON(){if(this.toBytes().length===c.Hash192.width)return{mpt_issuance_id:this.toHex().toUpperCase()};const e=new i.BinaryParser(this.toString()),t=s.Currency.fromParser(e);if("XRP"===t.toJSON())return{currency:t.toJSON()};const n=o.AccountID.fromParser(e);return{currency:t.toJSON(),issuer:n.toJSON()}}}t.Issue=u,u.ZERO_ISSUED_CURRENCY=new u(new Uint8Array(20))},1845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)?new Uint8Array(e):e}},1933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAddClaimAttestation=void 0;const r=n(2794);t.validateXChainAddClaimAttestation=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateRequiredField)(e,"AttestationRewardAccount",r.isAccount),(0,r.validateRequiredField)(e,"AttestationSignerAccount",r.isAccount),(0,r.validateOptionalField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount),(0,r.validateRequiredField)(e,"PublicKey",r.isString),(0,r.validateRequiredField)(e,"Signature",r.isString),(0,r.validateRequiredField)(e,"WasLockingChainSend",e=>0===e||1===e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e))}},1998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=void 0,t.setBigUint64=o,t.Chi=function(e,t,n){return e&t^~e&n},t.Maj=function(e,t,n){return e&t^e&n^t&n};const r=n(5489),i=n(9987);function o(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class s extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,r.aexists)(this);const{view:t,buffer:n,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let r=0;r<s;){const a=Math.min(o-this.pos,s-r);if(a===o){const t=(0,i.createView)(e);for(;o<=s-r;r+=o)this.process(t,r);continue}n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:a}=this;let{pos:c}=this;t[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>s-c&&(this.process(n,0),c=0);for(let e=c;e<s;e++)t[e]=0;o(n,s-8,BigInt(8*this.length),a),this.process(n,0);const u=(0,i.createView)(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=l/4,f=this.get();if(d>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)u.setUint32(4*e,f[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=o,r%t&&e.buffer.set(n),e}}t.HashMD=s},2152:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelClaim=t.PaymentChannelClaimFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfRenew=65536]="tfRenew",e[e.tfClose=131072]="tfClose"}(o||(t.PaymentChannelClaimFlags=o={})),t.validatePaymentChannelClaim=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,i.MAX_AUTHORIZED_CREDENTIALS),void 0===e.Channel)throw new r.ValidationError("PaymentChannelClaim: missing Channel");if("string"!=typeof e.Channel)throw new r.ValidationError("PaymentChannelClaim: Channel must be a string");if(void 0!==e.Balance&&"string"!=typeof e.Balance)throw new r.ValidationError("PaymentChannelClaim: Balance must be a string");if(void 0!==e.Amount&&"string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelClaim: Amount must be a string");if(void 0!==e.Signature&&"string"!=typeof e.Signature)throw new r.ValidationError("PaymentChannelClaim: Signature must be a string");if(void 0!==e.PublicKey&&"string"!=typeof e.PublicKey)throw new r.ValidationError("PaymentChannelClaim: PublicKey must be a string")}},2190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMVote=void 0;const r=n(255),i=n(9966),o=n(2794);t.validateAMMVote=function(e){if((0,o.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMVote: missing field Asset");if(!(0,o.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMVote: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMVote: missing field Asset2");if(!(0,o.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMVote: Asset2 must be a Currency");if(null==e.TradingFee)throw new r.ValidationError("AMMVote: missing field TradingFee");if("number"!=typeof e.TradingFee)throw new r.ValidationError("AMMVote: TradingFee must be a number");if(e.TradingFee<0||e.TradingFee>i.AMM_MAX_TRADING_FEE)throw new r.ValidationError(`AMMVote: TradingFee must be between 0 and ${i.AMM_MAX_TRADING_FEE}`)}},2242:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=void 0,t.negateCt=a,t.normalizeZ=function(e,t){const n=(0,i.FpInvertBatch)(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))},t.mulEndoUnsafe=function(e,t,n,r){let i=t,a=e.ZERO,c=e.ZERO;for(;n>o||r>o;)n&s&&(a=a.add(i)),r&s&&(c=c.add(i)),i=i.double(),n>>=s,r>>=s;return{p1:a,p2:c}},t.pippenger=function(e,t,n,i){d(n,e),f(i,t);const o=n.length,s=i.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,c=(0,r.bitLen)(BigInt(o));let u=1;c>12?u=c-3:c>4?u=c-2:c>0&&(u=2);const l=(0,r.bitMask)(u),h=new Array(Number(l)+1).fill(a);let g=a;for(let e=Math.floor((t.BITS-1)/u)*u;e>=0;e-=u){h.fill(a);for(let t=0;t<s;t++){const r=i[t],o=Number(r>>BigInt(e)&l);h[o]=h[o].add(n[t])}let t=a;for(let e=h.length-1,n=a;e>0;e--)n=n.add(h[e]),t=t.add(n);if(g=g.add(t),0!==e)for(let e=0;e<u;e++)g=g.double()}return g},t.precomputeMSMUnsafe=function(e,t,n,i){c(i,t.BITS),d(n,e);const o=e.ZERO,s=2**i-1,a=Math.ceil(t.BITS/i),u=(0,r.bitMask)(i),l=n.map(e=>{const t=[];for(let n=0,r=e;n<s;n++)t.push(r),r=r.add(e);return t});return e=>{if(f(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let r=o;for(let t=0;t<a;t++){if(r!==o)for(let e=0;e<i;e++)r=r.double();const n=BigInt(a*i-(t+1)*i);for(let t=0;t<e.length;t++){const i=e[t],o=Number(i>>n&u);o&&(r=r.add(l[t][o-1]))}}return r}},t.validateBasic=function(e){return(0,i.validateField)(e.Fp),(0,r.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,i.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})},t._createCurveFields=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const n=t[e];if(!("bigint"==typeof n&&n>o))throw new Error(`CURVE.${e} must be positive bigint`)}const i=m(t.p,n.Fp,r),s=m(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of a)if(!i.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}};const r=n(7663),i=n(5827),o=BigInt(0),s=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){c(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,r.bitMask)(e),maxNumber:n,shiftBy:BigInt(e)}}function l(e,t,n){const{windowSize:r,mask:i,maxNumber:o,shiftBy:a}=n;let c=Number(e&i),u=e>>a;c>r&&(c-=o,u+=s);const l=t*r;return{nextN:u,offset:l+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!=0,offsetF:l}}function d(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function f(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const h=new WeakMap,g=new WeakMap;function p(e){return g.get(e)||1}function y(e){if(e!==o)throw new Error("invalid wNAF")}function m(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.validateField)(t),t}return(0,i.Field)(e,{isLE:n})}t.wNAF=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>o;)t&s&&(n=n.add(r)),r=r.double(),t>>=s;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=u(t,this.bits),i=[];let o=e,s=o;for(let e=0;e<n;e++){s=o,i.push(s);for(let e=1;e<r;e++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const o=u(e,this.bits);for(let e=0;e<o.windows;e++){const{nextN:s,offset:c,isZero:u,isNeg:d,isNegF:f,offsetF:h}=l(n,e,o);n=s,u?i=i.add(a(f,t[h])):r=r.add(a(d,t[c]))}return y(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){const i=u(e,this.bits);for(let e=0;e<i.windows&&n!==o;e++){const{nextN:o,offset:s,isZero:a,isNeg:c}=l(n,e,i);if(n=o,!a){const e=t[s];r=r.add(c?e.negate():e)}}return y(n),r}getPrecomputes(e,t,n){let r=h.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),h.set(t,r))),r}cached(e,t,n){const r=p(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=p(e);return 1===i?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){c(t,this.bits),g.set(e,t),h.delete(e)}hasCache(e){return 1!==p(e)}}},2295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isoTimeToRippleTime=t.rippleTimeToISOTime=t.unixTimeToRippleTime=t.rippleTimeToUnixTime=void 0;const n=946684800;function r(e){return 1e3*(e+n)}function i(e){return Math.round(e/1e3)-n}t.rippleTimeToUnixTime=r,t.unixTimeToRippleTime=i,t.rippleTimeToISOTime=function(e){return new Date(r(e)).toISOString()},t.isoTimeToRippleTime=function(e){return i(("string"==typeof e?new Date(e):e).getTime())}},2404:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultDelete=void 0;const r=n(2794);t.validateVaultDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString)}},2427:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&u.push(a[c]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},2476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLedgerData=t.ledgerHash=t.transactionTreeHash=t.accountStateHash=void 0;const r=n(8390),i=n(7375),o=n(7410),s=n(9543),a=n(8264),c=n(8847),u=n(5463),l=n(4200),d=n(401),f=n(892);function h(e,t){const n=new r.ShaMap;return t.forEach(t=>n.addItem(...e(t))),n.hash()}function g(e){if(!e.hash)throw new Error;return[a.Hash256.from(e.hash),{hashPrefix:()=>i.HashPrefix.transaction,toBytesSink(t){const n=new s.BinarySerializer(t);n.writeLengthEncoded(c.STObject.from(e)),n.writeLengthEncoded(c.STObject.from(e.metaData))}},void 0]}function p(e){const t=a.Hash256.from(e.index),n=(0,s.serializeObject)(e);return[t,{hashPrefix:()=>i.HashPrefix.accountStateEntry,toBytesSink(e){e.put(n)}},void 0]}t.transactionTreeHash=function(e){return h(g,e)},t.accountStateHash=function(e){return h(p,e)},t.ledgerHash=function(e){const t=new o.Sha512Half;if(t.put(i.HashPrefix.ledgerHeader),void 0===e.parent_close_time||void 0===e.close_flags)throw new Error;return l.UInt32.from(e.ledger_index).toBytesSink(t),u.UInt64.from(BigInt(String(e.total_coins))).toBytesSink(t),a.Hash256.from(e.parent_hash).toBytesSink(t),a.Hash256.from(e.transaction_hash).toBytesSink(t),a.Hash256.from(e.account_hash).toBytesSink(t),l.UInt32.from(e.parent_close_time).toBytesSink(t),l.UInt32.from(e.close_time).toBytesSink(t),d.UInt8.from(e.close_time_resolution).toBytesSink(t),d.UInt8.from(e.close_flags).toBytesSink(t),t.finish()},t.decodeLedgerData=function(e,t){if("string"!=typeof e)throw new Error("binary must be a hex string");const n=new f.BinaryParser(e,t);return{ledger_index:n.readUInt32(),total_coins:n.readType(u.UInt64).valueOf().toString(),parent_hash:n.readType(a.Hash256).toHex(),transaction_hash:n.readType(a.Hash256).toHex(),account_hash:n.readType(a.Hash256).toHex(),parent_close_time:n.readUInt32(),close_time:n.readUInt32(),close_time_resolution:n.readUInt8(),close_flags:n.readUInt8()}}},2484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(3449),o=n(9005),s=n(619),a=n(8957),c=r(n(3212)),u=r(n(4876)),l={deriveKeypair(e,t){const n=(0,a.derivePrivateKey)(e,t);return{privateKey:"00"+(0,s.bytesToHex)((0,i.numberToBytesBE)(n,32)),publicKey:(0,s.bytesToHex)(o.secp256k1.getPublicKey(n,!0))}},sign(e,t){c.default.ok(66===t.length&&t.startsWith("00")||64===t.length);const n=66===t.length?t.slice(2):t;return o.secp256k1.sign(u.default.half(e),n,{lowS:!0,extraEntropy:void 0}).toDERHex(!0).toUpperCase()},verify(e,t,n){const r=o.secp256k1.Signature.fromDER(t);return o.secp256k1.verify(r,u.default.half(e),n)}};t.default=l},2530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2896),i=n(619);t.default=function(e){return(0,i.bytesToHex)((0,r.sha512)((0,i.hexToBytes)(e)).slice(0,32))}},2588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;const r=n(5442),i=n(8161);t.Account=class{constructor(e){this._account={familySeed:"",address:"",keypair:{publicKey:"",privateKey:""}},"string"==typeof e?this._secret=(0,i.parseSecretString)(e):Array.isArray(e)?this._secret=e:e instanceof Uint8Array?this._secret=(0,i.entropyToSecret)(e):this._secret=(0,i.randomSecret)(),function(e){if(8!==e.length)throw new Error("Secret must have 8 numbers");e.forEach(e=>{if(6!==e.length)throw new Error("Each secret number must be 6 digits")})}(this._secret),this.derive()}getSecret(){return this._secret}getSecretString(){return this._secret.join(" ")}getAddress(){return this._account.address}getFamilySeed(){return this._account.familySeed}getKeypair(){return this._account.keypair}toString(){return this.getSecretString()}derive(){try{const e=(0,i.secretToEntropy)(this._secret);this._account.familySeed=(0,r.generateSeed)({entropy:e}),this._account.keypair=(0,r.deriveKeypair)(this._account.familySeed),this._account.address=(0,r.deriveAddress)(this._account.keypair.publicKey)}catch(e){let t="Unknown Error";throw e instanceof Error&&(t=e.message),new Error(t)}}}},2635:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(1862));t.default=function(e){function t(t){return e((0,i.default)(t))}return t.create=()=>{const t=e.create();return{update(e){return t.update((0,i.default)(e)),this},digest:()=>t.digest()}},t}},2722:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.xrpToDrops=t.dropsToXrp=void 0;const i=r(n(735)),o=n(255),s=1e6,a=/^-?[0-9.]+$/u;t.dropsToXrp=function(e){const t=new i.default(e).toString(10);if("string"==typeof e&&"NaN"===t)throw new o.ValidationError(`dropsToXrp: invalid value '${e}', should be a BigNumber or string-encoded number.`);if(t.includes("."))throw new o.ValidationError(`dropsToXrp: value '${t}' has too many decimal places.`);if(!a.exec(t))throw new o.ValidationError(`dropsToXrp: failed sanity check - value '${t}', does not match (^-?[0-9]+$).`);return new i.default(t).dividedBy(s).toNumber()},t.xrpToDrops=function(e){const t=new i.default(e).toString(10);if("string"==typeof e&&"NaN"===t)throw new o.ValidationError(`xrpToDrops: invalid value '${e}', should be a BigNumber or string-encoded number.`);if(!a.exec(t))throw new o.ValidationError(`xrpToDrops: failed sanity check - value '${t}', does not match (^-?[0-9.]+$).`);const n=t.split(".");if(n.length>2)throw new o.ValidationError(`xrpToDrops: failed sanity check - value '${t}' has too many decimal points.`);if((n[1]||"0").length>6)throw new o.ValidationError(`xrpToDrops: value '${t}' has too many decimal places.`);return new i.default(t).times(s).integerValue(i.default.ROUND_FLOOR).toString(10)}},2794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenMetadata=t.isDomainID=t.containsDuplicates=t.validateCredentialsList=t.validateCredentialType=t.parseAmountValue=t.validateBaseTransaction=t.GlobalFlags=t.validateOptionalField=t.validateRequiredField=t.isArray=t.isXChainBridge=t.isAmount=t.isAccount=t.isClawbackAmount=t.isMPTAmount=t.isAuthorizeCredential=t.isIssuedCurrencyAmount=t.isIssuedCurrency=t.isCurrency=t.isXRPLNumber=t.isValue=t.isNull=t.isNumber=t.isString=t.isRecord=t.MPT_META_WARNING_HEADER=t.VAULT_DATA_MAX_BYTE_LENGTH=t.MAX_MPT_META_BYTE_LENGTH=t.MAX_AUTHORIZED_CREDENTIALS=void 0;const r=n(619),i=n(6333),o=n(5620),s=n(255),a=n(99);t.MAX_AUTHORIZED_CREDENTIALS=8,t.MAX_MPT_META_BYTE_LENGTH=1024,t.VAULT_DATA_MAX_BYTE_LENGTH=256;const c=/^[A-Z0-9]{1,6}$/u,u=["ticker","name","icon","asset_class","issuer_name"],l=["rwa","memes","wrapped","gaming","defi","other"],d=["stablecoin","commodity","real_estate","private_credit","equity","treasury","other"];function f(e){if(!g(e))return!1;const t=e.Memo;if(!g(t))return!1;const n=Object.keys(t).length,r=null==t.MemoData||p(t.MemoData)&&(0,a.isHex)(t.MemoData),i=null==t.MemoFormat||p(t.MemoFormat)&&(0,a.isHex)(t.MemoFormat),o=null==t.MemoType||p(t.MemoType)&&(0,a.isHex)(t.MemoType);return n>=1&&n<=3&&r&&i&&o&&(0,a.onlyHasFields)(t,["MemoFormat","MemoData","MemoType"])}function h(e){if(!g(e))return!1;const t=e.Signer;return!!g(t)&&3===Object.keys(t).length&&p(t.Account)&&p(t.TxnSignature)&&p(t.SigningPubKey)}function g(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function p(e){return"string"==typeof e}function y(e){return"number"==typeof e}function m(e){return g(e)&&(2===Object.keys(e).length&&p(e.issuer)&&p(e.currency)||1===Object.keys(e).length&&"XRP"===e.currency)}function E(e){return g(e)&&3===Object.keys(e).length&&p(e.value)&&p(e.issuer)&&p(e.currency)}function b(e){return g(e)&&g(e.Credential)&&1===Object.keys(e).length&&"string"==typeof e.Credential.CredentialType&&"string"==typeof e.Credential.Issuer}function w(e){return g(e)&&2===Object.keys(e).length&&"string"==typeof e.value&&"string"==typeof e.mpt_issuance_id}function A(e){return"string"==typeof e&&((0,i.isValidClassicAddress)(e)||(0,i.isValidXAddress)(e))}function S(e){return"string"==typeof e||E(e)||w(e)}function v(e){return null!=e&&Array.isArray(e)}function T(e,t,n,r={}){var i,o;const a=null!==(i=r.paramName)&&void 0!==i?i:t,c=null!==(o=r.txType)&&void 0!==o?o:e.TransactionType;if(null==e[t])throw new s.ValidationError(`${c}: missing field ${String(a)}`);if(!n(e[t]))throw new s.ValidationError(`${c}: invalid field ${String(a)}`)}function O(e,t,n,r={}){var i,o;const a=null!==(i=r.paramName)&&void 0!==i?i:t,c=null!==(o=r.txType)&&void 0!==o?o:e.TransactionType;if(void 0!==e[t]&&!n(e[t]))throw new s.ValidationError(`${c}: invalid field ${String(a)}`)}var I;function B(e){if("string"==typeof e[0])return new Set(e.map(e=>JSON.stringify(e))).size!==e.length;const t=new Set;if("string"!=typeof e[0])for(const n of e){const e=`${n.Credential.Issuer}-${n.Credential.CredentialType}`;if(t.has(e))return!0;t.add(e)}return!1}function _(e){if(null==e)return!1;const t=e;return"object"==typeof t&&p(t.url)&&p(t.type)&&p(t.title)&&3===Object.keys(t).length}t.MPT_META_WARNING_HEADER="MPTokenMetadata is not properly formatted as JSON as per the XLS-89d standard. While adherence to this standard is not mandatory, such non-compliant MPToken's might not be discoverable by Explorers and Indexers in the XRPL ecosystem.",t.isRecord=g,t.isString=p,t.isNumber=y,t.isNull=function(e){return null==e},t.isValue=function(e){return t=>t===e},t.isXRPLNumber=function(e){return"string"==typeof e&&/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/u.test(e.trim())},t.isCurrency=function(e){return p(e)||m(e)},t.isIssuedCurrency=m,t.isIssuedCurrencyAmount=E,t.isAuthorizeCredential=b,t.isMPTAmount=w,t.isClawbackAmount=function(e){return E(e)||w(e)},t.isAccount=A,t.isAmount=S,t.isXChainBridge=function(e){return g(e)&&4===Object.keys(e).length&&"string"==typeof e.LockingChainDoor&&m(e.LockingChainIssue)&&"string"==typeof e.IssuingChainDoor&&m(e.IssuingChainIssue)},t.isArray=v,t.validateRequiredField=T,t.validateOptionalField=O,function(e){e[e.tfInnerBatchTxn=1073741824]="tfInnerBatchTxn"}(I||(t.GlobalFlags=I={})),t.validateBaseTransaction=function(e){if(!g(e))throw new s.ValidationError("BaseTransaction: invalid, expected a valid object");if(void 0===e.TransactionType)throw new s.ValidationError("BaseTransaction: missing field TransactionType");if("string"!=typeof e.TransactionType)throw new s.ValidationError("BaseTransaction: TransactionType not string");if(!o.TRANSACTION_TYPES.includes(e.TransactionType))throw new s.ValidationError(`BaseTransaction: Unknown TransactionType ${e.TransactionType}`);T(e,"Account",p),O(e,"Fee",p),O(e,"Sequence",y),O(e,"AccountTxnID",p),O(e,"LastLedgerSequence",y);const t=e.Memos;if(!(null==t||v(t)&&t.every(f)))throw new s.ValidationError("BaseTransaction: invalid Memos");const n=e.Signers;if(!(null==n||v(n)&&0!==n.length&&n.every(h)))throw new s.ValidationError("BaseTransaction: invalid Signers");O(e,"SourceTag",y),O(e,"SigningPubKey",p),O(e,"TicketSequence",y),O(e,"TxnSignature",p),O(e,"NetworkID",y),O(e,"Delegate",A);const r=e.Delegate;if(null!=r&&r===e.Account)throw new s.ValidationError("BaseTransaction: Account and Delegate addresses cannot be the same")},t.parseAmountValue=function(e){return S(e)?"string"==typeof e?parseFloat(e):parseFloat(e.value):NaN},t.validateCredentialType=function(e){if("string"!=typeof e.TransactionType)throw new s.ValidationError("Invalid TransactionType");if(void 0===e.CredentialType)throw new s.ValidationError(`${e.TransactionType}: missing field CredentialType`);if(!p(e.CredentialType))throw new s.ValidationError(`${e.TransactionType}: CredentialType must be a string`);if(0===e.CredentialType.length)throw new s.ValidationError(`${e.TransactionType}: CredentialType cannot be an empty string`);if(e.CredentialType.length>128)throw new s.ValidationError(`${e.TransactionType}: CredentialType length cannot be > 128`);if(!r.HEX_REGEX.test(e.CredentialType))throw new s.ValidationError(`${e.TransactionType}: CredentialType must be encoded in hex`)},t.validateCredentialsList=function(e,t,n,r){if(null!=e){if(!v(e))throw new s.ValidationError(`${t}: Credentials must be an array`);if(e.length>r)throw new s.ValidationError(`${t}: Credentials length cannot exceed ${r} elements`);if(0===e.length)throw new s.ValidationError(`${t}: Credentials cannot be an empty array`);if(e.forEach(e=>{if(n){if(!p(e))throw new s.ValidationError(`${t}: Invalid Credentials ID list format`)}else if(!b(e))throw new s.ValidationError(`${t}: Invalid Credentials format`)}),B(e))throw new s.ValidationError(`${t}: Credentials cannot contain duplicate elements`)}},t.containsDuplicates=B,t.isDomainID=function(e){return p(e)&&64===e.length&&(0,a.isHex)(e)},t.validateMPTokenMetadata=function(e){const n=[];if(!(0,a.isHex)(e))return n.push("MPTokenMetadata must be in hex format."),n;if(e.length/2>t.MAX_MPT_META_BYTE_LENGTH)return n.push(`MPTokenMetadata must be max ${t.MAX_MPT_META_BYTE_LENGTH} bytes.`),n;let i;try{i=JSON.parse((0,r.hexToString)(e))}catch(e){return n.push(`MPTokenMetadata is not properly formatted as JSON - ${String(e)}`),n}if(null==i||"object"!=typeof i||Array.isArray(i))return n.push("MPTokenMetadata is not properly formatted as per XLS-89d."),n;const o=i,s=Object.keys(o).length;if(s>9)return n.push(`MPTokenMetadata must not contain more than 9 top-level fields (found ${s}).`),n;const f=u.filter(e=>!p(o[e]));if(f.length>0)return f.forEach(e=>n.push(`${e} is required and must be string.`)),n;if(null!=o.desc&&!p(o.desc))return n.push("desc must be a string."),n;if(null!=o.asset_subclass&&!p(o.asset_subclass))return n.push("asset_subclass must be a string."),n;if(null!=o.additional_info&&!p(o.additional_info)&&!g(o.additional_info))return n.push("additional_info must be a string or JSON object."),n;if(null!=o.urls){if(!Array.isArray(o.urls))return n.push("urls must be an array as per XLS-89d."),n;if(!o.urls.every(_))return n.push("One or more urls are not structured per XLS-89d."),n}const h=o;return c.test(h.ticker)||n.push("ticker should have uppercase letters (A-Z) and digits (0-9) only. Max 6 characters recommended."),h.icon.startsWith("https://")||n.push("icon should be a valid https url."),l.includes(h.asset_class.toLowerCase())||n.push(`asset_class should be one of ${l.join(", ")}.`),null==h.asset_subclass||d.includes(h.asset_subclass.toLowerCase())||n.push(`asset_subclass should be one of ${d.join(", ")}.`),"rwa"===h.asset_class.toLowerCase()&&null==h.asset_subclass&&n.push("asset_subclass is required when asset_class is rwa."),null==h.urls||h.urls.every(e=>e.url.startsWith("https://"))||n.push("url should be a valid https url."),n}},2824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatArgs=t.arrayEqual=void 0,t.arrayEqual=function(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])},t.concatArgs=function(...e){return e.flatMap(e=>"number"==typeof e?[e]:Array.from(e))}},2859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCreate=void 0;const r=n(255),i=n(2794);t.validateCheckCreate=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.SendMax)throw new r.ValidationError("CheckCreate: missing field SendMax");if((0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),"string"!=typeof e.SendMax&&!(0,i.isIssuedCurrencyAmount)(e.SendMax))throw new r.ValidationError("CheckCreate: invalid SendMax");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("CheckCreate: invalid Expiration");if(void 0!==e.InvoiceID&&"string"!=typeof e.InvoiceID)throw new r.ValidationError("CheckCreate: invalid InvoiceID")}},2896:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=void 0;const i=n(5943),o=r(n(2635));t.sha512=(0,o.default)(i.sha512)},2905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSignerListSet=void 0;const r=n(255),i=n(2794),o=/^[0-9A-Fa-f]{64}$/u;t.validateSignerListSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"SignerQuorum",i.isNumber),0!==e.SignerQuorum){if((0,i.validateRequiredField)(e,"SignerEntries",i.isArray),0===e.SignerEntries.length)throw new r.ValidationError("SignerListSet: need at least 1 member in SignerEntries");if(e.SignerEntries.length>32)throw new r.ValidationError("SignerListSet: maximum of 32 members allowed in SignerEntries");for(const t of e.SignerEntries){if(!(0,i.isRecord)(t)||!(0,i.isRecord)(t.SignerEntry))throw new r.ValidationError("SignerListSet: SignerEntries must be an array of SignerEntry objects");const e=t.SignerEntry,{WalletLocator:n}=e;if(!(null==n||(0,i.isString)(n)&&o.test(n)))throw new r.ValidationError("SignerListSet: WalletLocator in SignerEntry must be a 256-bit (32-byte) hexadecimal value")}}}},2911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XChainBridge=void 0;const r=n(892),i=n(5763),o=n(1275),s=n(1837),a=n(619);class c extends o.SerializedType{constructor(e){super(null!=e?e:c.ZERO_XCHAIN_BRIDGE.bytes)}static from(e){if(e instanceof c)return e;if(!function(e){const t=Object.keys(e).sort();return 4===t.length&&"IssuingChainDoor"===t[0]&&"IssuingChainIssue"===t[1]&&"LockingChainDoor"===t[2]&&"LockingChainIssue"===t[3]}(e))throw new Error("Invalid type to construct an XChainBridge");const t=[];return this.TYPE_ORDER.forEach(n=>{const{name:r,type:o}=n;o===i.AccountID&&t.push(Uint8Array.from([20]));const s=o.from(e[r]);t.push(s.toBytes())}),new c((0,a.concat)(t))}static fromParser(e){const t=[];return this.TYPE_ORDER.forEach(n=>{const{type:r}=n;r===i.AccountID&&(e.skip(1),t.push(Uint8Array.from([20])));const o=r.fromParser(e);t.push(o.toBytes())}),new c((0,a.concat)(t))}toJSON(){const e=new r.BinaryParser(this.toString()),t={};return c.TYPE_ORDER.forEach(n=>{const{name:r,type:o}=n;o===i.AccountID&&e.skip(1);const s=o.fromParser(e).toJSON();t[r]=s}),t}}t.XChainBridge=c,c.ZERO_XCHAIN_BRIDGE=new c((0,a.concat)([Uint8Array.from([20]),new Uint8Array(40),Uint8Array.from([20]),new Uint8Array(40)])),c.TYPE_ORDER=[{name:"LockingChainDoor",type:i.AccountID},{name:"LockingChainIssue",type:s.Issue},{name:"IssuingChainDoor",type:i.AccountID},{name:"IssuingChainIssue",type:s.Issue}]},2942:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesLookup=t.Bytes=void 0;class n{constructor(e,t,n){this.name=e,this.ordinal=t,this.ordinalWidth=n,this.bytes=new Uint8Array(n);for(let e=0;e<n;e++)this.bytes[n-e-1]=t>>>8*e&255}toJSON(){return this.name}toBytesSink(e){e.put(this.bytes)}toBytes(){return this.bytes}}t.Bytes=n,t.BytesLookup=class{constructor(e,t){this.ordinalWidth=t,Object.entries(e).forEach(([e,t])=>{this.add(e,t)})}add(e,t){if(this[e])throw new SyntaxError(`Attempted to add a value with a duplicate name "${e}". This is not allowed because it is unclear how to decode.`);if(this[t.toString()])throw new SyntaxError(`Attempted to add a duplicate value under a different name (Given name: "${e}" and previous name: "${this[t.toString()]}. This is not allowed because it is unclear how to decode.\nGiven value: ${t.toString()}`);this[e]=new n(e,t,this.ordinalWidth),this[t.toString()]=this[e]}from(e){return e instanceof n?e:this[e]}fromParser(e){return this.from(e.readUIntN(this.ordinalWidth).toString())}}},2945:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(735)),o=n(9333),s=n(2722);function a(e){const t=Object.keys(e)[0],n=e[t];return Object.assign(Object.assign({},n),{NodeType:t,LedgerEntryType:n.LedgerEntryType,LedgerIndex:n.LedgerIndex,NewFields:n.NewFields,FinalFields:n.FinalFields,PreviousFields:n.PreviousFields})}function c(e){return"string"==typeof e?new i.default(e):new i.default(e.value)}function u(e){var t,n,r;let i=null;return(null===(t=e.NewFields)||void 0===t?void 0:t.Balance)?i=c(e.NewFields.Balance):(null===(n=e.PreviousFields)||void 0===n?void 0:n.Balance)&&(null===(r=e.FinalFields)||void 0===r?void 0:r.Balance)&&(i=c(e.FinalFields.Balance).minus(c(e.PreviousFields.Balance))),null===i||i.isZero()?null:i}function l(e){const t=new i.default(e.balance.value).negated();return{account:e.balance.issuer,balance:{issuer:e.account,currency:e.balance.currency,value:t.toString()}}}t.default=function(e){return function(e){const t=(0,o.groupBy)(e,e=>e.account);return Object.entries(t).map(([e,t])=>({account:e,balances:t.map(e=>e.balance)}))}(function(e){return 0===e.AffectedNodes.length?[]:e.AffectedNodes.map(a)}(e).map(e=>{if("AccountRoot"===e.LedgerEntryType){const t=function(e){var t,n,r;const i=u(e);return null===i?null:{account:null!==(n=null===(t=e.FinalFields)||void 0===t?void 0:t.Account)&&void 0!==n?n:null===(r=e.NewFields)||void 0===r?void 0:r.Account,balance:{currency:"XRP",value:(0,s.dropsToXrp)(i).toString()}}}(e);return null==t?[]:[t]}if("RippleState"===e.LedgerEntryType){const t=function(e){var t,n,r;const i=u(e);if(null===i)return null;const o=null!==(t=e.NewFields)&&void 0!==t?t:e.FinalFields,s={account:null===(n=null==o?void 0:o.LowLimit)||void 0===n?void 0:n.issuer,balance:{issuer:null===(r=null==o?void 0:o.HighLimit)||void 0===r?void 0:r.issuer,currency:(null==o?void 0:o.Balance).currency,value:i.toString()}};return[s,l(s)]}(e);return null==t?[]:t}return[]}).flat())}},3007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTicketCreate=void 0;const r=n(255),i=n(2794);t.validateTicketCreate=function(e){(0,i.validateBaseTransaction)(e);const{TicketCount:t}=e;if(void 0===t)throw new r.ValidationError("TicketCreate: missing field TicketCount");if("number"!=typeof t)throw new r.ValidationError("TicketCreate: TicketCount must be a number");if(!Number.isInteger(t)||t<1||t>250)throw new r.ValidationError("TicketCreate: TicketCount must be an integer from 1 to 250")}},3062:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&u.push(a[c]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},3094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenAuthorize=t.MPTokenAuthorizeFlags=void 0;const r=n(2794);var i;!function(e){e[e.tfMPTUnauthorize=1]="tfMPTUnauthorize"}(i||(t.MPTokenAuthorizeFlags=i={})),t.validateMPTokenAuthorize=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"MPTokenIssuanceID",r.isString),(0,r.validateOptionalField)(e,"Holder",r.isAccount)}},3122:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(534)),a=o(n(5644));i(n(168),t),t.default=class{constructor(){this.root=new s.default(0)}get hash(){return this.root.hash}addItem(e,t,n){this.root.addItem(e,new a.default(e,t,n))}}},3181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t._splitEndoScalar=u,t._normFnElement=E,t.weierstrassN=b,t.SWUFpSqrtRatio=A,t.mapToCurveSimpleSWU=function(e,t){(0,a.validateField)(e);const{A:n,B:r,Z:i}=t;if(!e.isValid(n)||!e.isValid(r)||!e.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=A(e,i);if(!e.isOdd)throw new Error("Field does not have .isOdd()");return t=>{let s,c,u,l,d,f,h,g;s=e.sqr(t),s=e.mul(s,i),c=e.sqr(s),c=e.add(c,s),u=e.add(c,e.ONE),u=e.mul(u,r),l=e.cmov(i,e.neg(c),!e.eql(c,e.ZERO)),l=e.mul(l,n),c=e.sqr(u),f=e.sqr(l),d=e.mul(f,n),c=e.add(c,d),c=e.mul(c,u),f=e.mul(f,l),d=e.mul(f,r),c=e.add(c,d),h=e.mul(s,u);const{isValid:p,value:y}=o(c,f);g=e.mul(s,t),g=e.mul(g,y),h=e.cmov(h,u,p),g=e.cmov(g,y,p);const m=e.isOdd(t)===e.isOdd(g);g=e.cmov(e.neg(g),g,m);const E=(0,a.FpInvertBatch)(e,[l],!0)[0];return h=e.mul(h,E),{x:h,y:g}}},t.ecdh=v,t.ecdsa=T,t.weierstrassPoints=function(e){const{CURVE:t,curveOpts:n}=O(e);return function(e,t){const{Fp:n,Fn:r}=t;const i=I(n,e.a,e.b);return Object.assign({},{CURVE:e,Point:t,ProjectivePoint:t,normPrivateKeyToScalar:e=>E(r,e),weierstrassEquation:i,isWithinCurveOrder:function(e){return(0,o.inRange)(e,g,r.ORDER)}})}(e,b(t,n))},t._legacyHelperEquat=I,t.weierstrass=function(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:n}=O(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,(0,a.nLength)(n.Fn.ORDER,n.Fn.BITS))})}(e,T(b(t,n),r,i))};const r=n(6202),i=n(5492),o=n(7663),s=n(2242),a=n(5827),c=(e,t)=>(e+(e>=0?t:-t)/p)/t;function u(e,t,n){const[[r,i],[s,a]]=t,u=c(a*e,n),l=c(-i*e,n);let d=e-u*r-l*s,f=-u*i-l*a;const p=d<h,y=f<h;p&&(d=-d),y&&(f=-f);const m=(0,o.bitMask)(Math.ceil((0,o.bitLen)(n)/2))+g;if(d<h||d>=m||f<h||f>=m)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:p,k1:d,k2neg:y,k2:f}}function l(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function d(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return(0,o._abool2)(n.lowS,"lowS"),(0,o._abool2)(n.prehash,"prehash"),void 0!==n.format&&l(n.format),n}class f extends Error{constructor(e=""){super(e)}}t.DERErr=f,t.DER={Err:f,_tlv:{encode:(e,n)=>{const{Err:r}=t.DER;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&n.length)throw new r("tlv.encode: unpadded data");const i=n.length/2,s=(0,o.numberToHexUnpadded)(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=i>127?(0,o.numberToHexUnpadded)(s.length/2|128):"";return(0,o.numberToHexUnpadded)(e)+a+s+n},decode(e,n){const{Err:r}=t.DER;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(n.length<2||n[i++]!==e)throw new r("tlv.decode: wrong tlv");const o=n[i++];let s=0;if(128&o){const e=127&o;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const t=n.subarray(i,i+e);if(t.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===t[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of t)s=s<<8|e;if(i+=e,s<128)throw new r("tlv.decode(long): not minimal encoding")}else s=o;const a=n.subarray(i,i+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:n.subarray(i+s)}}},_int:{encode(e){const{Err:n}=t.DER;if(e<h)throw new n("integer: negative integers are not allowed");let r=(0,o.numberToHexUnpadded)(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new n("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:n}=t.DER;if(128&e[0])throw new n("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new n("invalid signature integer: unnecessary leading zero");return(0,o.bytesToNumberBE)(e)}},toSig(e){const{Err:n,_int:r,_tlv:i}=t.DER,s=(0,o.ensureBytes)("signature",e),{v:a,l:c}=i.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:u,l}=i.decode(2,a),{v:d,l:f}=i.decode(2,l);if(f.length)throw new n("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(d)}},hexFromSig(e){const{_tlv:n,_int:r}=t.DER,i=n.encode(2,r.encode(e.r))+n.encode(2,r.encode(e.s));return n.encode(48,i)}};const h=BigInt(0),g=BigInt(1),p=BigInt(2),y=BigInt(3),m=BigInt(4);function E(e,t){const{BYTES:n}=e;let r;if("bigint"==typeof t)r=t;else{let i=(0,o.ensureBytes)("private key",t);try{r=e.fromBytes(i)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function b(e,t={}){const n=(0,s._createCurveFields)("weierstrass",e,t),{Fp:r,Fn:i}=n;let a=n.CURVE;const{h:c,n:l}=a;(0,o._validateObject)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:d}=t;if(d&&(!r.is0(a.a)||"bigint"!=typeof d.beta||!Array.isArray(d.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const f=S(r,i);function p(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const b=t.toBytes||function(e,t,n){const{x:i,y:s}=t.toAffine(),a=r.toBytes(i);if((0,o._abool2)(n,"isCompressed"),n){p();const e=!r.isOdd(s);return(0,o.concatBytes)(w(e),a)}return(0,o.concatBytes)(Uint8Array.of(4),a,r.toBytes(s))},A=t.fromBytes||function(e){(0,o._abytes2)(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=f,i=e.length,s=e[0],a=e.subarray(1);if(i!==t||2!==s&&3!==s){if(i===n&&4===s){const e=r.BYTES,t=r.fromBytes(a.subarray(0,e)),n=r.fromBytes(a.subarray(e,2*e));if(!T(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}{const e=r.fromBytes(a);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=v(e);let n;try{n=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}return p(),!(1&~s)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function v(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,a.a)),a.b)}function T(e,t){const n=r.sqr(t),i=v(e);return r.eql(n,i)}if(!T(a.Gx,a.Gy))throw new Error("bad curve params: generator point");const O=r.mul(r.pow(a.a,y),m),I=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(O,I)))throw new Error("bad curve params: a or b");function B(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function _(e){if(!(e instanceof D))throw new Error("ProjectivePoint expected")}function N(e){if(!d||!d.basises)throw new Error("no endo");return u(e,d.basises,i.ORDER)}const L=(0,o.memoized)((e,t)=>{const{X:n,Y:i,Z:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const s=e.is0();null==t&&(t=s?r.ONE:r.inv(o));const a=r.mul(n,t),c=r.mul(i,t),u=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),C=(0,o.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!T(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function F(e,t,n,i,o){return n=new D(r.mul(n.X,e),n.Y,n.Z),t=(0,s.negateCt)(i,t),n=(0,s.negateCt)(o,n),t.add(n)}class D{constructor(e,t,n){this.X=B("x",e),this.Y=B("y",t,!0),this.Z=B("z",n),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof D)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?D.ZERO:new D(t,n,r.ONE)}static fromBytes(e){const t=D.fromAffine(A((0,o._abytes2)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return D.fromBytes((0,o.ensureBytes)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return M.createCache(this,e),t||this.multiply(y),this}assertValidity(){C(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){_(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new D(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=a,n=r.mul(t,y),{X:i,Y:o,Z:s}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(i,i),f=r.mul(o,o),h=r.mul(s,s),g=r.mul(i,o);return g=r.add(g,g),l=r.mul(i,s),l=r.add(l,l),c=r.mul(e,l),u=r.mul(n,h),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(n,l),h=r.mul(e,h),g=r.sub(d,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,h),d=r.mul(d,g),u=r.add(u,d),h=r.mul(o,s),h=r.add(h,h),d=r.mul(h,g),c=r.sub(c,d),l=r.mul(h,f),l=r.add(l,l),l=r.add(l,l),new D(c,u,l)}add(e){_(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:c}=e;let u=r.ZERO,l=r.ZERO,d=r.ZERO;const f=a.a,h=r.mul(a.b,y);let g=r.mul(t,o),p=r.mul(n,s),m=r.mul(i,c),E=r.add(t,n),b=r.add(o,s);E=r.mul(E,b),b=r.add(g,p),E=r.sub(E,b),b=r.add(t,i);let w=r.add(o,c);return b=r.mul(b,w),w=r.add(g,m),b=r.sub(b,w),w=r.add(n,i),u=r.add(s,c),w=r.mul(w,u),u=r.add(p,m),w=r.sub(w,u),d=r.mul(f,b),u=r.mul(h,m),d=r.add(u,d),u=r.sub(p,d),d=r.add(p,d),l=r.mul(u,d),p=r.add(g,g),p=r.add(p,g),m=r.mul(f,m),b=r.mul(h,b),p=r.add(p,m),m=r.sub(g,m),m=r.mul(f,m),b=r.add(b,m),g=r.mul(p,b),l=r.add(l,g),g=r.mul(w,b),u=r.mul(E,u),u=r.sub(u,g),g=r.mul(E,p),d=r.mul(w,d),d=r.add(d,g),new D(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(D.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const a=e=>M.cached(this,e,e=>(0,s.normalizeZ)(D,e));if(n){const{k1neg:t,k1:i,k2neg:s,k2:c}=N(e),{p:u,f:l}=a(i),{p:d,f}=a(c);o=l.add(f),r=F(n.beta,u,d,t,s)}else{const{p:t,f:n}=a(e);r=t,o=n}return(0,s.normalizeZ)(D,[r,o])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===h||r.is0())return D.ZERO;if(e===g)return r;if(M.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:o,k2:a}=N(e),{p1:c,p2:u}=(0,s.mulEndoUnsafe)(D,r,i,a);return F(n.beta,c,u,t,o)}return M.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return L(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return c===g||(e?e(D,this):M.unsafe(this,l).is0())}clearCofactor(){const{clearCofactor:e}=t;return c===g?this:e?e(D,this):this.multiplyUnsafe(c)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}toBytes(e=!0){return(0,o._abool2)(e,"isCompressed"),this.assertValidity(),b(D,this,e)}toHex(e=!0){return(0,o.bytesToHex)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,s.normalizeZ)(D,e)}static msm(e,t){return(0,s.pippenger)(D,i,e,t)}static fromPrivateKey(e){return D.BASE.multiply(E(i,e))}}D.BASE=new D(a.Gx,a.Gy,r.ONE),D.ZERO=new D(r.ZERO,r.ONE,r.ZERO),D.Fp=r,D.Fn=i;const P=i.BITS,M=new s.wNAF(D,t.endo?Math.ceil(P/2):P);return D.BASE.precompute(8),D}function w(e){return Uint8Array.of(e?2:3)}function A(e,t){const n=e.ORDER;let r=h;for(let e=n-g;e%p===h;e/=p)r+=g;const i=r,o=p<<i-g-g,s=o*p,a=(n-g)/s,c=(a-g)/p,u=s-g,l=o,d=e.pow(t,a),f=e.pow(t,(a+g)/p);let E=(t,n)=>{let r=d,o=e.pow(n,u),s=e.sqr(o);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,n),s=e.mul(a,t);let h=e.mul(s,o);a=e.pow(h,l);let y=e.eql(a,e.ONE);o=e.mul(s,f),a=e.mul(h,r),s=e.cmov(o,s,y),h=e.cmov(a,h,y);for(let t=i;t>g;t--){let n=t-p;n=p<<n-g;let i=e.pow(h,n);const a=e.eql(i,e.ONE);o=e.mul(s,r),r=e.mul(r,r),i=e.mul(h,r),s=e.cmov(o,s,a),h=e.cmov(i,h,a)}return{isValid:y,value:s}};if(e.ORDER%m===y){const n=(e.ORDER-y)/m,r=e.sqrt(e.neg(t));E=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,n);a=e.mul(a,s);const c=e.mul(a,r),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return E}function S(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function v(e,t={}){const{Fn:n}=e,r=t.randomBytes||o.randomBytes,i=Object.assign(S(e.Fp,n),{seed:(0,a.getMinHashLength)(n.ORDER)});function s(e){try{return!!E(n,e)}catch(e){return!1}}function c(e=r(i.seed)){return(0,a.mapHashToField)((0,o._abytes2)(e,i.seed,"seed"),n.ORDER)}function u(t,r=!0){return e.BASE.multiply(E(n,t)).toBytes(r)}function l(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:s,publicKeyUncompressed:a}=i;if(n.allowedLengths||r===s)return;const c=(0,o.ensureBytes)("key",t).length;return c===s||c===a}const d={isValidSecretKey:s,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:o}=i;try{const i=t.length;return!(!0===n&&i!==r||!1===n&&i!==o||!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:c,isValidPrivateKey:s,randomPrivateKey:c,normPrivateKeyToScalar:e=>E(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({getPublicKey:u,getSharedSecret:function(t,r,i=!0){if(!0===l(t))throw new Error("first arg must be private key");if(!1===l(r))throw new Error("second arg must be public key");const o=E(n,t);return e.fromHex(r).multiply(o).toBytes(i)},keygen:function(e){const t=c(e);return{secretKey:t,publicKey:u(t)}},Point:e,utils:d,lengths:i})}function T(e,n,s={}){(0,i.ahash)(n),(0,o._validateObject)(s,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const a=s.randomBytes||o.randomBytes,c=s.hmac||((e,...t)=>(0,r.hmac)(n,e,(0,o.concatBytes)(...t))),{Fp:u,Fn:f}=e,{ORDER:y,BITS:m}=f,{keygen:b,getPublicKey:A,getSharedSecret:S,utils:T,lengths:O}=v(e,s),I={prehash:!1,lowS:"boolean"==typeof s.lowS&&s.lowS,format:void 0,extraEntropy:!1},B="compact";function _(e){return e>y>>g}function N(e,t){if(!f.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class L{constructor(e,t,n){this.r=N("r",e),this.s=N("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,n=B){let r;if(function(e,t){l(t);const n=O.signature,r="compact"===t?n:"recovered"===t?n+1:void 0;(0,o._abytes2)(e,r,`${t} signature`)}(e,n),"der"===n){const{r:n,s:r}=t.DER.toSig((0,o._abytes2)(e));return new L(n,r)}"recovered"===n&&(r=e[0],n="compact",e=e.subarray(1));const i=f.BYTES,s=e.subarray(0,i),a=e.subarray(i,2*i);return new L(f.fromBytes(s),f.fromBytes(a),r)}static fromHex(e,t){return this.fromBytes((0,o.hexToBytes)(e),t)}addRecoveryBit(e){return new L(this.r,this.s,e)}recoverPublicKey(t){const n=u.ORDER,{r,s:i,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(y*p<n&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const a=2===s||3===s?r+y:r;if(!u.isValid(a))throw new Error("recovery id 2 or 3 invalid");const c=u.toBytes(a),l=e.fromBytes((0,o.concatBytes)(w(!(1&s)),c)),d=f.inv(a),h=F((0,o.ensureBytes)("msgHash",t)),g=f.create(-h*d),m=f.create(i*d),E=e.BASE.multiplyUnsafe(g).add(l.multiplyUnsafe(m));if(E.is0())throw new Error("point at infinify");return E.assertValidity(),E}hasHighS(){return _(this.s)}toBytes(e=B){if(l(e),"der"===e)return(0,o.hexToBytes)(t.DER.hexFromSig(this));const n=f.toBytes(this.r),r=f.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return(0,o.concatBytes)(Uint8Array.of(this.recovery),n,r)}return(0,o.concatBytes)(n,r)}toHex(e){return(0,o.bytesToHex)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return L.fromBytes((0,o.ensureBytes)("sig",e),"compact")}static fromDER(e){return L.fromBytes((0,o.ensureBytes)("sig",e),"der")}normalizeS(){return this.hasHighS()?new L(this.r,f.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.bytesToHex)(this.toBytes("compact"))}}const C=s.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,o.bytesToNumberBE)(e),n=8*e.length-m;return n>0?t>>BigInt(n):t},F=s.bits2int_modN||function(e){return f.create(C(e))},D=(0,o.bitMask)(m);function P(e){return(0,o.aInRange)("num < 2^"+m,e,h,D),f.toBytes(e)}function M(e,t){return(0,o._abytes2)(e,void 0,"message"),t?(0,o._abytes2)(n(e),void 0,"prehashed message"):e}return Object.freeze({keygen:b,getPublicKey:A,getSharedSecret:S,utils:T,lengths:O,Point:e,sign:function(t,r,i={}){t=(0,o.ensureBytes)("message",t);const{seed:s,k2sig:u}=function(t,n,r){if(["recovered","canonical"].some(e=>e in r))throw new Error("sign() legacy options not supported");const{lowS:i,prehash:s,extraEntropy:c}=d(r,I);t=M(t,s);const u=F(t),l=E(f,n),p=[P(l),P(u)];if(null!=c&&!1!==c){const e=!0===c?a(O.secretKey):c;p.push((0,o.ensureBytes)("extraEntropy",e))}const y=(0,o.concatBytes)(...p),m=u;return{seed:y,k2sig:function(t){const n=C(t);if(!f.isValidNot0(n))return;const r=f.inv(n),o=e.BASE.multiply(n).toAffine(),s=f.create(o.x);if(s===h)return;const a=f.create(r*f.create(m+s*l));if(a===h)return;let c=(o.x===s?0:2)|Number(o.y&g),u=a;return i&&_(a)&&(u=f.neg(a),c^=1),new L(s,u,c)}}}(t,r,i);return(0,o.createHmacDrbg)(n.outputLen,f.BYTES,c)(s,u)},verify:function(n,r,i,s={}){const{lowS:a,prehash:c,format:u}=d(s,I);if(i=(0,o.ensureBytes)("publicKey",i),r=M((0,o.ensureBytes)("message",r),c),"strict"in s)throw new Error("options.strict was renamed to lowS");const l=void 0===u?function(e){let n;const r="string"==typeof e||(0,o.isBytes)(e),i=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!i)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(i)n=new L(e.r,e.s);else if(r){try{n=L.fromBytes((0,o.ensureBytes)("sig",e),"der")}catch(e){if(!(e instanceof t.DER.Err))throw e}if(!n)try{n=L.fromBytes((0,o.ensureBytes)("sig",e),"compact")}catch(e){return!1}}return n||!1}(n):L.fromBytes((0,o.ensureBytes)("sig",n),u);if(!1===l)return!1;try{const t=e.fromBytes(i);if(a&&l.hasHighS())return!1;const{r:n,s:o}=l,s=F(r),c=f.inv(o),u=f.create(s*c),d=f.create(n*c),h=e.BASE.multiplyUnsafe(u).add(t.multiplyUnsafe(d));return!h.is0()&&f.create(h.x)===n}catch(e){return!1}},recoverPublicKey:function(e,t,n={}){const{prehash:r}=d(n,I);return t=M(t,r),L.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:L,hash:n})}function O(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:(0,a.Field)(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function I(e,t,n){return function(r){const i=e.sqr(r),o=e.mul(i,r);return e.add(e.add(o,e.mul(r,t)),n)}}},3212:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={ok(e,t){if(!e)throw new Error(t)}};t.default=n},3222:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortAndLimitOffers=t.separateBuySellOrders=t.combineOrders=t.extractOffers=t.reverseRequest=t.requestAllOffers=t.createBookOffersRequest=t.validateOrderbookOptions=void 0;const o=i(n(735)),s=n(255),a=n(5237),c=new Set(["limit","ledger_index","ledger_hash","taker"]);t.validateOrderbookOptions=function(e){for(const t of Object.keys(e))if(!c.has(t))throw new s.ValidationError(`Unexpected option: ${t}`,e);if(e.limit&&"number"!=typeof e.limit)throw new s.ValidationError("limit must be a number",e.limit);if(e.ledger_index&&!("number"==typeof e.ledger_index||"string"==typeof e.ledger_index&&["validated","closed","current"].includes(e.ledger_index)))throw new s.ValidationError('ledger_index must be a number or a string of "validated", "closed", or "current"',e.ledger_index);if(void 0!==e.ledger_hash&&null!==e.ledger_hash&&"string"!=typeof e.ledger_hash)throw new s.ValidationError("ledger_hash must be a string",e.ledger_hash);if(void 0!==e.taker&&"string"!=typeof e.taker)throw new s.ValidationError("taker must be a string",e.taker)},t.createBookOffersRequest=function(e,t,n){var r,i,o;return{command:"book_offers",taker_pays:e,taker_gets:t,ledger_index:null!==(r=n.ledger_index)&&void 0!==r?r:"validated",ledger_hash:null===n.ledger_hash?void 0:n.ledger_hash,limit:null!==(i=n.limit)&&void 0!==i?i:20,taker:null!==(o=n.taker)&&void 0!==o?o:void 0}},t.requestAllOffers=function(e,t){return r(this,void 0,void 0,function*(){return(yield e.requestAll(t)).map(e=>e.result.offers)})},t.reverseRequest=function(e){return Object.assign(Object.assign({},e),{taker_pays:e.taker_gets,taker_gets:e.taker_pays})},t.extractOffers=function(e){return e.flatMap(e=>e)},t.combineOrders=function(e,t){return[...e,...t]},t.separateBuySellOrders=function(e){const t=[],n=[];return e.forEach(e=>{0===(e.Flags&a.OfferFlags.lsfSell)?t.push(e):n.push(e)}),{buy:t,sell:n}},t.sortAndLimitOffers=function(e,t){return function(e){return e.sort((e,t)=>{var n,r;const i=null!==(n=e.quality)&&void 0!==n?n:0,s=null!==(r=t.quality)&&void 0!==r?r:0;return new o.default(i).comparedTo(s)})}(e).slice(0,t)}},3296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowCreate=void 0;const r=n(255),i=n(2794);t.validateEscrowCreate=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Amount",i.isAmount),(0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),void 0===e.CancelAfter&&void 0===e.FinishAfter)throw new r.ValidationError("EscrowCreate: Either CancelAfter or FinishAfter must be specified");if(void 0===e.FinishAfter&&void 0===e.Condition)throw new r.ValidationError("EscrowCreate: Either Condition or FinishAfter must be specified");if(void 0!==e.CancelAfter&&"number"!=typeof e.CancelAfter)throw new r.ValidationError("EscrowCreate: CancelAfter must be a number");if(void 0!==e.FinishAfter&&"number"!=typeof e.FinishAfter)throw new r.ValidationError("EscrowCreate: FinishAfter must be a number");if(void 0!==e.Condition&&"string"!=typeof e.Condition)throw new r.ValidationError("EscrowCreate: Condition must be a string")}},3328:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt=void 0;const r=n(1275);class i extends r.Comparable{constructor(e){super(e)}compareTo(e){return(t=this.valueOf())<(n=e.valueOf())?-1:t==n?0:1;var t,n}toJSON(){const e=this.valueOf();return"number"==typeof e?e:e.toString()}static checkUintRange(e,t,n){if(e<t||e>n)throw new Error(`Invalid ${this.constructor.name}: ${e} must be >= ${t} and <= ${n}`)}}t.UInt=i},3342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeletedNode=t.isModifiedNode=t.isCreatedNode=void 0,t.isCreatedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"CreatedNode")},t.isModifiedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"ModifiedNode")},t.isDeletedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"DeletedNode")}},3365:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.percentToQuality=t.transferRateToDecimal=t.qualityToDecimal=t.decimalToQuality=t.percentToTransferRate=t.decimalToTransferRate=void 0;const i=r(n(735)),o=n(255),s="1000000000";function a(e){if(!e.endsWith("%"))throw new o.ValidationError(`Value ${e} must end with %`);const t=e.split("%").filter(e=>""!==e);if(1!==t.length)throw new o.ValidationError(`Value ${e} contains too many % signs`);return new i.default(t[0]).dividedBy("100").toString(10)}function c(e){const t=new i.default(e).times(s).plus(s);if(t.isLessThan(s)||t.isGreaterThan("2000000000"))throw new o.ValidationError("Decimal value must be between 0 and 1.00.");const n=t.toString(10);if(n===s)return 0;if("NaN"===n)throw new o.ValidationError("Value is not a number");if(n.includes("."))throw new o.ValidationError("Decimal exceeds maximum precision.");return Number(n)}function u(e){const t=new i.default(e).times(s).toString(10);if("NaN"===t)throw new o.ValidationError("Value is not a number");if(t.includes("-"))throw new o.ValidationError("Cannot have negative Quality");if(t===s)return 0;if(t.includes("."))throw new o.ValidationError("Decimal exceeds maximum precision.");return Number(t)}t.decimalToTransferRate=c,t.percentToTransferRate=function(e){return c(a(e))},t.decimalToQuality=u,t.qualityToDecimal=function(e){if(!Number.isInteger(e))throw new o.ValidationError("Quality must be an integer");if(e<0)throw new o.ValidationError("Negative quality not allowed");return 0===e?"1":new i.default(e).dividedBy(s).toString(10)},t.transferRateToDecimal=function(e){if(!Number.isInteger(e))throw new o.ValidationError("Error decoding, transfer Rate must be an integer");if(0===e)return"0";const t=new i.default(e).minus(s).dividedBy(s);if(t.isLessThan(0))throw new o.ValidationError("Error decoding, negative transfer rate");return t.toString(10)},t.percentToQuality=function(e){return u(a(e))}},3449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=o,t.abytes=s,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.bytesToHex=c,t.numberToHexUnpadded=u,t.hexToNumber=l,t.hexToBytes=h,t.bytesToNumberBE=function(e){return l(c(e))},t.bytesToNumberLE=function(e){return s(e),l(c(Uint8Array.from(e).reverse()))},t.numberToBytesBE=g,t.numberToBytesLE=function(e,t){return g(e,t).reverse()},t.numberToVarBytesBE=function(e){return h(u(e))},t.ensureBytes=function(e,t,n){let r;if("string"==typeof t)try{r=h(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r},t.concatBytes=p,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},t.inRange=m,t.aInRange=function(e,t,n,r){if(!m(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>n;e>>=r,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&r},t.bitSet=function(e,t,i){return e|(i?r:n)<<BigInt(t)},t.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=E(e),i=E(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...e)=>n(i,r,...e),c=(e=E())=>{i=a(b([0]),e),r=a(),0!==e.length&&(i=a(b([1]),e),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return p(...n)};return(e,t)=>{let n;for(s(),c(e);!(n=t(u()));)c();return s(),n}},t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=w[n];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(r&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+o)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e},t.memoized=function(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}};const n=BigInt(0),r=BigInt(1),i=BigInt(2);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function s(e){if(!o(e))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(e){s(e);let t="";for(let n=0;n<e.length;n++)t+=a[e[n]];return t}function u(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?n:BigInt("0x"+e)}const d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r}function g(e,t){return h(e.toString(16).padStart(2*t,"0"))}function p(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];s(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}const y=e=>"bigint"==typeof e&&n<=e;function m(e,t,n){return y(e)&&y(t)&&y(n)&&t<=e&&e<n}t.bitMask=e=>(i<<BigInt(e-1))-r;const E=e=>new Uint8Array(e),b=e=>Uint8Array.from(e),w={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},3461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultDeposit=void 0;const r=n(2794);t.validateVaultDeposit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},3471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCommit=void 0;const r=n(2794);t.validateXChainCommit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateOptionalField)(e,"OtherChainDestination",r.isAccount),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},3539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOfferCancel=void 0;const r=n(255),i=n(2794);t.validateOfferCancel=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.OfferSequence)throw new r.ValidationError("OfferCancel: missing field OfferSequence");if("number"!=typeof e.OfferSequence)throw new r.ValidationError("OfferCancel: OfferSequence must be a number")}},3627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={account:"a",dirNode:"d",generatorMap:"g",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",escrow:"u",amendment:"f",feeSettings:"e",ticket:"T",signerList:"S",paychan:"x",check:"C",depositPreauth:"p"}},3719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=void 0;const r=n(1275),i=n(8264),o=n(7995),s=n(619);class a extends r.SerializedType{constructor(e){super(e)}static fromParser(e,t){const n=new o.BytesList,r=(null!=t?t:e.size())/32;for(let t=0;t<r;t++)i.Hash256.fromParser(e).toBytesSink(n);return new a(n.toBytes())}static from(e){if(e instanceof a)return e;if(t=e,Array.isArray(t)&&(0===t.length||"string"==typeof t[0])){const t=new o.BytesList;return e.forEach(e=>{i.Hash256.from(e).toBytesSink(t)}),new a(t.toBytes())}var t;throw new Error("Cannot construct Vector256 from given value")}toJSON(){if(this.bytes.byteLength%32!=0)throw new Error("Invalid bytes for Vector256");const e=[];for(let t=0;t<this.bytes.byteLength;t+=32)e.push((0,s.bytesToHex)(this.bytes.slice(t,t+32)));return e}}t.Vector256=a},3733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldLookup=void 0;const r=n(2942),i=n(1275),o=n(8188);t.FieldLookup=class{constructor(e,t){e.forEach(([e,n])=>{const s=t[n.type];this[e]=function([e,t],n){const s=function(e,t){const n=[];return e<16?t<16?n.push(e<<4|t):n.push(e<<4,t):t<16?n.push(t,e):n.push(0,e,t),Uint8Array.from(n)}(n,t.nth);return{name:e,nth:t.nth,isVariableLengthEncoded:t.isVLEncoded,isSerialized:t.isSerialized,isSigningField:t.isSigningField,ordinal:n<<16|t.nth,type:new r.Bytes(t.type,n,o.TYPE_WIDTH),header:s,associatedType:i.SerializedType}}([e,n],s),this[this[e].ordinal.toString()]=this[e]})}fromString(e){return this[e]}}},3746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMClawback=t.AMMClawbackFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfClawTwoAssets=1]="tfClawTwoAssets"}(o||(t.AMMClawbackFlags=o={})),t.validateAMMClawback=function(e){(0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Holder",i.isAccount),(0,i.validateRequiredField)(e,"Asset",i.isIssuedCurrency);const t=e.Asset;if(e.Holder===t.issuer)throw new r.ValidationError("AMMClawback: Holder and Asset.issuer must be distinct");if(e.Account!==t.issuer)throw new r.ValidationError("AMMClawback: Account must be the same as Asset.issuer");if((0,i.validateRequiredField)(e,"Asset2",i.isIssuedCurrency),(0,i.validateOptionalField)(e,"Amount",i.isIssuedCurrencyAmount),null!=e.Amount){if(e.Amount.currency!==t.currency)throw new r.ValidationError("AMMClawback: Amount.currency must match Asset.currency");if(e.Amount.issuer!==t.issuer)throw new r.ValidationError("AMMClawback: Amount.issuer must match Amount.issuer")}}},3750:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAccountSet=t.AccountSetTfFlags=t.AccountSetAsfFlags=void 0;const r=n(255),i=n(2794);var o,s;!function(e){e[e.asfRequireDest=1]="asfRequireDest",e[e.asfRequireAuth=2]="asfRequireAuth",e[e.asfDisallowXRP=3]="asfDisallowXRP",e[e.asfDisableMaster=4]="asfDisableMaster",e[e.asfAccountTxnID=5]="asfAccountTxnID",e[e.asfNoFreeze=6]="asfNoFreeze",e[e.asfGlobalFreeze=7]="asfGlobalFreeze",e[e.asfDefaultRipple=8]="asfDefaultRipple",e[e.asfDepositAuth=9]="asfDepositAuth",e[e.asfAuthorizedNFTokenMinter=10]="asfAuthorizedNFTokenMinter",e[e.asfDisallowIncomingNFTokenOffer=12]="asfDisallowIncomingNFTokenOffer",e[e.asfDisallowIncomingCheck=13]="asfDisallowIncomingCheck",e[e.asfDisallowIncomingPayChan=14]="asfDisallowIncomingPayChan",e[e.asfDisallowIncomingTrustline=15]="asfDisallowIncomingTrustline",e[e.asfAllowTrustLineClawback=16]="asfAllowTrustLineClawback",e[e.asfAllowTrustLineLocking=17]="asfAllowTrustLineLocking"}(o||(t.AccountSetAsfFlags=o={})),function(e){e[e.tfRequireDestTag=65536]="tfRequireDestTag",e[e.tfOptionalDestTag=131072]="tfOptionalDestTag",e[e.tfRequireAuth=262144]="tfRequireAuth",e[e.tfOptionalAuth=524288]="tfOptionalAuth",e[e.tfDisallowXRP=1048576]="tfDisallowXRP",e[e.tfAllowXRP=2097152]="tfAllowXRP"}(s||(t.AccountSetTfFlags=s={})),t.validateAccountSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateOptionalField)(e,"NFTokenMinter",i.isAccount),void 0!==e.ClearFlag){if("number"!=typeof e.ClearFlag)throw new r.ValidationError("AccountSet: invalid ClearFlag");if(!Object.values(o).includes(e.ClearFlag))throw new r.ValidationError("AccountSet: invalid ClearFlag")}if(void 0!==e.Domain&&"string"!=typeof e.Domain)throw new r.ValidationError("AccountSet: invalid Domain");if(void 0!==e.EmailHash&&"string"!=typeof e.EmailHash)throw new r.ValidationError("AccountSet: invalid EmailHash");if(void 0!==e.MessageKey&&"string"!=typeof e.MessageKey)throw new r.ValidationError("AccountSet: invalid MessageKey");if(void 0!==e.SetFlag){if("number"!=typeof e.SetFlag)throw new r.ValidationError("AccountSet: invalid SetFlag");if(!Object.values(o).includes(e.SetFlag))throw new r.ValidationError("AccountSet: invalid SetFlag")}if(void 0!==e.TransferRate&&"number"!=typeof e.TransferRate)throw new r.ValidationError("AccountSet: invalid TransferRate");if(void 0!==e.TickSize){if("number"!=typeof e.TickSize)throw new r.ValidationError("AccountSet: invalid TickSize");if(0!==e.TickSize&&(e.TickSize<3||e.TickSize>15))throw new r.ValidationError("AccountSet: invalid TickSize")}}},3767:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2588),t),i(n(8161),t)},3776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;const r=n(1275),i=n(619),o=n(5517);class s extends r.Comparable{constructor(e){if(super(e),this.bytes.length!==this.constructor.width)throw new Error(`Invalid Hash length ${this.bytes.byteLength}`)}static from(e){if(e instanceof this)return e;if("string"==typeof e){if(!i.HEX_REGEX.test(e))throw new Error(`Invalid hash string ${e}`);return new this((0,i.hexToBytes)(e))}throw new Error("Cannot construct Hash from given value")}static fromParser(e,t){return new this(e.read(null!=t?t:this.width))}compareTo(e){return(0,o.compare)(this.bytes,this.constructor.from(e).bytes)}toString(){return this.toHex()}nibblet(e){const t=e>0?e/2|0:0;let n=this.bytes[t];return e%2==0?n=(240&n)>>>4:n&=15,n}}t.Hash=s},3795:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(5489),i=n(9987);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(e);const n=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(n.length>o?e.create().update(n).digest():n);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,r.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,r.aexists)(this),(0,r.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,n)=>new o(e,t).update(n).digest(),t.hmac.create=(e,t)=>new o(e,t)},3842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multisign=t.verifySignature=void 0;const r=n(5620),i=n(5442),o=n(255),s=n(9843),a=n(667);t.multisign=function(e){if(0===e.length)throw new o.ValidationError("There were 0 transactions to multisign");const t=e.map(e=>(0,a.getDecodedTransaction)(e));return t.forEach(e=>{if((0,s.validate)(e),null==e.Signers||0===e.Signers.length)throw new o.ValidationError("For multisigning all transactions must include a Signers field containing an array of signatures. You may have forgotten to pass the 'forMultisign' parameter when signing.");if(""!==e.SigningPubKey)throw new o.ValidationError("SigningPubKey must be an empty string for all transactions when multisigning.")}),function(e){const t=JSON.stringify(Object.assign(Object.assign({},e[0]),{Signers:null}));if(e.slice(1).some(e=>JSON.stringify(Object.assign(Object.assign({},e),{Signers:null}))!==t))throw new o.ValidationError("txJSON is not the same for all signedTransactions")}(t),(0,r.encode)(function(e){const t=e.flatMap(e=>{var t;return null!==(t=e.Signers)&&void 0!==t?t:[]}).sort((e,t)=>(0,a.compareSigners)(e.Signer,t.Signer));return Object.assign(Object.assign({},e[0]),{Signers:t})}(t))},t.verifySignature=function(e,t){const n=(0,a.getDecodedTransaction)(e);let o=t;if("string"!=typeof n.TxnSignature||!n.TxnSignature)throw new Error("Transaction is missing a signature, TxnSignature");if(!o){if("string"!=typeof n.SigningPubKey||!n.SigningPubKey)throw new Error("Transaction is missing a public key, SigningPubKey");o=n.SigningPubKey}return(0,i.verify)((0,r.encodeForSigning)(n),n.TxnSignature,o)}},3914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathSet=void 0;const r=n(5763),i=n(5967),o=n(892),s=n(1275),a=n(619);class c extends s.SerializedType{static from(e){if(e instanceof c)return e;const t=[Uint8Array.from([0])];return e.account&&(t.push(r.AccountID.from(e.account).toBytes()),t[0][0]|=1),e.currency&&(t.push(i.Currency.from(e.currency).toBytes()),t[0][0]|=16),e.issuer&&(t.push(r.AccountID.from(e.issuer).toBytes()),t[0][0]|=32),new c((0,a.concat)(t))}static fromParser(e){const t=e.readUInt8(),n=[Uint8Array.from([t])];return 1&t&&n.push(e.read(r.AccountID.width)),16&t&&n.push(e.read(i.Currency.width)),32&t&&n.push(e.read(r.AccountID.width)),new c((0,a.concat)(n))}toJSON(){const e=new o.BinaryParser((0,a.bytesToHex)(this.bytes)),t=e.readUInt8();let n,s,c;1&t&&(n=r.AccountID.fromParser(e).toJSON()),16&t&&(s=i.Currency.fromParser(e).toJSON()),32&t&&(c=r.AccountID.fromParser(e).toJSON());const u={};return n&&(u.account=n),c&&(u.issuer=c),s&&(u.currency=s),u}type(){return this.bytes[0]}}class u extends s.SerializedType{static from(e){if(e instanceof u)return e;const t=[];return e.forEach(e=>{t.push(c.from(e).toBytes())}),new u((0,a.concat)(t))}static fromParser(e){const t=[];for(;!e.end()&&(t.push(c.fromParser(e).toBytes()),0!==e.peek()&&255!==e.peek()););return new u((0,a.concat)(t))}toJSON(){const e=[],t=new o.BinaryParser(this.toString());for(;!t.end();)e.push(c.fromParser(t).toJSON());return e}}class l extends s.SerializedType{static from(e){if(e instanceof l)return e;if(t=e,Array.isArray(t)&&0===t.length||Array.isArray(t)&&Array.isArray(t[0])&&0===t[0].length||Array.isArray(t)&&Array.isArray(t[0])&&function(e){return void 0!==e.issuer||void 0!==e.account||void 0!==e.currency}(t[0][0])){const t=[];return e.forEach(e=>{t.push(u.from(e).toBytes()),t.push(Uint8Array.from([255]))}),t[t.length-1]=Uint8Array.from([0]),new l((0,a.concat)(t))}var t;throw new Error("Cannot construct PathSet from given value")}static fromParser(e){const t=[];for(;!e.end()&&(t.push(u.fromParser(e).toBytes()),t.push(e.read(1)),0!=t[t.length-1][0]););return new l((0,a.concat)(t))}toJSON(){const e=[],t=new o.BinaryParser(this.toString());for(;!t.end();)e.push(u.fromParser(t).toJSON()),t.skip(1);return e}}t.PathSet=l},3947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=t.SHA256=void 0;const r=n(1998),i=n(9987),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends r.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;a[e]=o+a[e-7]+r+a[e-16]|0}let{A:n,B:s,C:c,D:u,E:l,F:d,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,r.Chi)(l,d,f)+o[e]+a[e]|0,g=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+(0,r.Maj)(n,s,c)|0;h=f,f=d,d=l,l=u+t|0,u=c,c=s,s=n,n=t+g|0}n=n+this.A|0,s=s+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,c,u,l,d,f,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.SHA256=c;class u extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new c),t.sha224=(0,i.wrapConstructor)(()=>new u)},4107:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){return{constTimeNegate:a,hasPrecomputes:e=>1!==g(e),unsafeLadder(t,n,r=e.ZERO){let i=t;for(;n>o;)n&s&&(r=r.add(i)),i=i.double(),n>>=s;return r},precomputeWindow(e,n){const{windows:r,windowSize:i}=u(n,t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(n,r,i){const{windows:o,windowSize:c}=u(n,t);let l=e.ZERO,d=e.BASE;const f=BigInt(2**n-1),h=2**n,g=BigInt(n);for(let e=0;e<o;e++){const t=e*c;let n=Number(i&f);i>>=g,n>c&&(n-=h,i+=s);const o=t,u=t+Math.abs(n)-1,p=e%2!=0,y=n<0;0===n?d=d.add(a(p,r[o])):l=l.add(a(y,r[u]))}return{p:l,f:d}},wNAFUnsafe(n,r,i,a=e.ZERO){const{windows:c,windowSize:l}=u(n,t),d=BigInt(2**n-1),f=2**n,h=BigInt(n);for(let e=0;e<c;e++){const t=e*l;if(i===o)break;let n=Number(i&d);if(i>>=h,n>l&&(n-=f,i+=s),0===n)continue;let c=r[t+Math.abs(n)-1];n<0&&(c=c.negate()),a=a.add(c)}return a},getPrecomputes(e,t,n){let r=f.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&f.set(t,n(r))),r},wNAFCached(e,t,n){const r=g(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){const i=g(e);return 1===i?this.unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)},setWindowSize(e,n){c(n,t),h.set(e,n),f.delete(e)}}},t.pippenger=function(e,t,n,r){if(l(n,e),d(r,t),n.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,s=(0,i.bitLen)(BigInt(n.length)),a=s>12?s-3:s>4?s-2:s?2:1,c=(1<<a)-1,u=new Array(c+1).fill(o);let f=o;for(let e=Math.floor((t.BITS-1)/a)*a;e>=0;e-=a){u.fill(o);for(let t=0;t<r.length;t++){const i=r[t],o=Number(i>>BigInt(e)&BigInt(c));u[o]=u[o].add(n[t])}let t=o;for(let e=u.length-1,n=o;e>0;e--)n=n.add(u[e]),t=t.add(n);if(f=f.add(t),0!==e)for(let e=0;e<a;e++)f=f.double()}return f},t.precomputeMSMUnsafe=function(e,t,n,r){c(r,t.BITS),l(n,e);const i=e.ZERO,o=2**r-1,s=Math.ceil(t.BITS/r),a=BigInt((1<<r)-1),u=n.map(e=>{const t=[];for(let n=0,r=e;n<o;n++)t.push(r),r=r.add(e);return t});return e=>{if(d(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let o=i;for(let t=0;t<s;t++){if(o!==i)for(let e=0;e<r;e++)o=o.double();const n=BigInt(s*r-(t+1)*r);for(let t=0;t<e.length;t++){const r=e[t],i=Number(r>>n&a);i&&(o=o.add(u[t][i-1]))}}return o}},t.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};const r=n(802),i=n(3449),o=BigInt(0),s=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){return c(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}function l(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function d(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const f=new WeakMap,h=new WeakMap;function g(e){return h.get(e)||1}},4110:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=t.INTENTIONAL_DISCONNECT_CODE=void 0;const o=n(619),s=i(n(964)),a=n(3062),c=n(255),u=i(n(9859)),l=i(n(5435)),d=i(n(9566));t.INTENTIONAL_DISCONNECT_CODE=4e3;class f extends a.EventEmitter{constructor(e,t={}){super(),this.ws=null,this.reconnectTimeoutID=null,this.heartbeatIntervalID=null,this.retryConnectionBackoff=new l.default({min:100,max:6e4}),this.requestManager=new d.default,this.connectionManager=new u.default,this.trace=()=>{},this.url=e,this.config=Object.assign({timeout:2e4,connectionTimeout:5e3},t),"function"==typeof t.trace?this.trace=t.trace:t.trace&&(this.trace=console.log)}get state(){return this.ws?this.ws.readyState:s.default.CLOSED}get shouldBeConnected(){return null!==this.ws}isConnected(){return this.state===s.default.OPEN}connect(){return r(this,void 0,void 0,function*(){if(this.isConnected())return Promise.resolve();if(this.state===s.default.CONNECTING)return this.connectionManager.awaitConnection();if(!this.url)return Promise.reject(new c.ConnectionError("Cannot connect because no server was specified"));if(null!=this.ws)return Promise.reject(new c.XrplError("Websocket connection never cleaned up.",{state:this.state}));const e=setTimeout(()=>{this.onConnectionFailed(new c.ConnectionError(`Error: connect() timed out after ${this.config.connectionTimeout} ms. If your internet connection is working, the rippled server may be blocked or inaccessible. You can also try setting the 'connectionTimeout' option in the Client constructor.`))},this.config.connectionTimeout);if(this.ws=function(e,t){const n={agent:t.agent};t.headers&&(n.headers=t.headers),null!=t.authorization&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Basic ${btoa(t.authorization)}`}));const r=Object.assign({},n);return new s.default(e,r)}(this.url,this.config),null==this.ws)throw new c.XrplError("Connect: created null websocket");return this.ws.on("error",e=>this.onConnectionFailed(e)),this.ws.on("error",()=>clearTimeout(e)),this.ws.on("close",e=>this.onConnectionFailed(e)),this.ws.on("close",()=>clearTimeout(e)),this.ws.once("open",()=>{this.onceOpen(e)}),this.connectionManager.awaitConnection()})}disconnect(){return r(this,void 0,void 0,function*(){return this.clearHeartbeatInterval(),null!==this.reconnectTimeoutID&&(clearTimeout(this.reconnectTimeoutID),this.reconnectTimeoutID=null),this.state===s.default.CLOSED||null==this.ws?Promise.resolve(void 0):new Promise(e=>{null==this.ws&&e(void 0),null!=this.ws&&this.ws.once("close",t=>e(t)),null!=this.ws&&this.state!==s.default.CLOSING&&this.ws.close(t.INTENTIONAL_DISCONNECT_CODE)})})}reconnect(){return r(this,void 0,void 0,function*(){this.emit("reconnect"),yield this.disconnect(),yield this.connect()})}request(e,t){return r(this,void 0,void 0,function*(){if(!this.shouldBeConnected||null==this.ws)throw new c.NotConnectedError(JSON.stringify(e),e);const[n,i,o]=this.requestManager.createRequest(e,null!=t?t:this.config.timeout);return this.trace("send",i),function(e,t){return r(this,void 0,void 0,function*(){return new Promise((n,r)=>{e.send(t,e=>{e?r(new c.DisconnectedError(e.message,e)):n()})})})}(this.ws,i).catch(e=>{try{this.requestManager.reject(n,e)}catch(e){e instanceof c.XrplError?this.trace("send",`send errored after connection was closed: ${e.toString()}`):this.trace("send",String(e))}}),o})}getUrl(){var e;return null!==(e=this.url)&&void 0!==e?e:""}onMessage(e){let t;this.trace("receive",e);try{t=JSON.parse(e)}catch(t){return void(t instanceof Error&&this.emit("error","badMessage",t.message,e))}if(null==t.type&&t.error)this.emit("error",t.error,t.error_message,t);else if(t.type&&this.emit(t.type,t),"response"===t.type)try{this.requestManager.handleResponse(t)}catch(t){t instanceof Error?this.emit("error","badMessage",t.message,e):this.emit("error","badMessage",t,t)}}onceOpen(e){return r(this,void 0,void 0,function*(){if(null==this.ws)throw new c.XrplError("onceOpen: ws is null");this.ws.removeAllListeners(),clearTimeout(e),this.ws.on("message",e=>this.onMessage(e)),this.ws.on("error",e=>this.emit("error","websocket",e.message,e)),this.ws.once("close",(e,n)=>{if(null==this.ws)throw new c.XrplError("onceClose: ws is null");if(this.clearHeartbeatInterval(),this.requestManager.rejectAll(new c.DisconnectedError(`websocket was closed, ${n?(0,o.hexToString)((0,o.bytesToHex)(n)):""}`)),this.ws.removeAllListeners(),this.ws=null,void 0===e){const e=1011;this.emit("disconnected",e)}else this.emit("disconnected",e);e!==t.INTENTIONAL_DISCONNECT_CODE&&void 0!==e&&this.intentionalDisconnect()});try{this.retryConnectionBackoff.reset(),this.startHeartbeatInterval(),this.connectionManager.resolveAllAwaiting(),this.emit("connected")}catch(e){e instanceof Error&&(this.connectionManager.rejectAllAwaiting(e),yield this.disconnect().catch(()=>{}))}})}intentionalDisconnect(){const e=this.retryConnectionBackoff.duration();this.trace("reconnect",`Retrying connection in ${e}ms.`),this.emit("reconnecting",this.retryConnectionBackoff.attempts),this.reconnectTimeoutID=setTimeout(()=>{this.reconnect().catch(e=>{this.emit("error","reconnect",e.message,e)})},e)}clearHeartbeatInterval(){this.heartbeatIntervalID&&clearInterval(this.heartbeatIntervalID)}startHeartbeatInterval(){this.clearHeartbeatInterval(),this.heartbeatIntervalID=setInterval(()=>{this.heartbeat()},this.config.timeout)}heartbeat(){return r(this,void 0,void 0,function*(){this.request({command:"ping"}).catch(()=>r(this,void 0,void 0,function*(){return this.reconnect().catch(e=>{this.emit("error","reconnect",e.message,e)})}))})}onConnectionFailed(e){this.ws&&(this.ws.removeAllListeners(),this.ws.on("error",()=>{}),this.ws.close(),this.ws=null),"number"==typeof e?this.connectionManager.rejectAllAwaiting(new c.NotConnectedError(`Connection failed with code ${e}.`,{code:e})):(null==e?void 0:e.message)?this.connectionManager.rejectAllAwaiting(new c.NotConnectedError(e.message,e)):this.connectionManager.rejectAllAwaiting(new c.NotConnectedError("Connection failed."))}}t.Connection=f},4184:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.types=t.ShaMap=t.HashPrefix=t.quality=t.TransactionResult=t.Type=t.LedgerEntryType=t.TransactionType=t.Field=t.DEFAULT_DEFINITIONS=t.ledgerHashes=t.binary=t.hashes=void 0;const s=n(1141);Object.defineProperty(t,"DEFAULT_DEFINITIONS",{enumerable:!0,get:function(){return s.DEFAULT_DEFINITIONS}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return s.Field}}),Object.defineProperty(t,"TransactionType",{enumerable:!0,get:function(){return s.TransactionType}}),Object.defineProperty(t,"LedgerEntryType",{enumerable:!0,get:function(){return s.LedgerEntryType}}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return s.Type}}),Object.defineProperty(t,"TransactionResult",{enumerable:!0,get:function(){return s.TransactionResult}});const a=o(n(6986));t.types=a;const c=o(n(9543));t.binary=c;const u=n(8390);Object.defineProperty(t,"ShaMap",{enumerable:!0,get:function(){return u.ShaMap}});const l=o(n(2476));t.ledgerHashes=l;const d=o(n(7410));t.hashes=d;const f=n(8213);Object.defineProperty(t,"quality",{enumerable:!0,get:function(){return f.quality}});const h=n(7375);Object.defineProperty(t,"HashPrefix",{enumerable:!0,get:function(){return h.HashPrefix}})},4192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(3342);t.default=function(e){if("string"!=typeof e&&void 0===(null==e?void 0:e.AffectedNodes))throw new TypeError(`Unable to parse the parameter given to getXChainClaimID.\n 'meta' must be the metadata from an XChainCreateClaimID transaction. Received ${JSON.stringify(e)} instead.`);const t=function(e){return"string"==typeof e?(0,r.decode)(e):e}(e);if(!t.TransactionResult)throw new TypeError("Cannot get XChainClaimID from un-validated transaction");if("tesSUCCESS"===t.TransactionResult)return t.AffectedNodes.find(e=>(0,i.isCreatedNode)(e)&&"XChainOwnedClaimID"===e.CreatedNode.LedgerEntryType).CreatedNode.NewFields.XChainClaimID}},4200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt32=void 0;const r=n(3328),i=n(5517);class o extends r.UInt{constructor(e){super(null!=e?e:o.defaultUInt32.bytes)}static fromParser(e){return new o(e.read(o.width))}static from(e){if(e instanceof o)return e;const t=new Uint8Array(o.width);if("string"==typeof e){const n=Number.parseInt(e);return(0,i.writeUInt32BE)(t,n,0),new o(t)}if("number"==typeof e)return o.checkUintRange(e,0,4294967295),(0,i.writeUInt32BE)(t,e,0),new o(t);throw new Error("Cannot construct UInt32 from given value")}valueOf(){return parseInt((0,i.readUInt32BE)(this.bytes,0),10)}}t.UInt32=o,o.width=4,o.defaultUInt32=new o(new Uint8Array(o.width))},4202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFaucetPath=t.getFaucetHost=t.faucetNetworkIDs=t.faucetNetworkPaths=t.FaucetNetwork=void 0;const r=n(255);var i;!function(e){e.Testnet="faucet.altnet.rippletest.net",e.Devnet="faucet.devnet.rippletest.net"}(i||(t.FaucetNetwork=i={})),t.faucetNetworkPaths={[i.Testnet]:"/accounts",[i.Devnet]:"/accounts"},t.faucetNetworkIDs=new Map([[1,i.Testnet],[2,i.Devnet]]),t.getFaucetHost=function(e){if(null==e.networkID)throw new r.XRPLFaucetError("Cannot create faucet URL without networkID or the faucetHost information");if(t.faucetNetworkIDs.has(e.networkID))return t.faucetNetworkIDs.get(e.networkID);if(0===e.networkID)throw new r.XRPLFaucetError("Faucet is not available for mainnet.");throw new r.XRPLFaucetError("Faucet URL is not defined or inferrable.")},t.getFaucetPath=function(e){return void 0===e?"/accounts":t.faucetNetworkPaths[e]||"/accounts"}},4204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=function(e,t,n,r){const{c:a,dkLen:c,DK:u,PRF:l,PRFSalt:d}=o(e,t,n,r);let f;const h=new Uint8Array(4),g=(0,i.createView)(h),p=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const n=u.subarray(t,t+l.outputLen);g.setInt32(0,e,!1),(f=d._cloneInto(f)).update(h).digestInto(p),n.set(p.subarray(0,n.length));for(let e=1;e<a;e++){l._cloneInto(f).update(p).digestInto(p);for(let e=0;e<n.length;e++)n[e]^=p[e]}}return s(l,d,u,f,p)},t.pbkdf2Async=async function(e,t,n,r){const{c:a,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:f}=o(e,t,n,r);let h;const g=new Uint8Array(4),p=(0,i.createView)(g),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=l.subarray(t,t+d.outputLen);p.setInt32(0,e,!1),(h=f._cloneInto(h)).update(g).digestInto(y),n.set(y.subarray(0,n.length)),await(0,i.asyncLoop)(a-1,u,()=>{d._cloneInto(h).update(y).digestInto(y);for(let e=0;e<n.length;e++)n[e]^=y[e]})}return s(d,f,l,h,y)};const r=n(6202),i=n(5492);function o(e,t,n,o){(0,i.ahash)(e);const s=(0,i.checkOpts)({dkLen:32,asyncTick:10},o),{c:a,dkLen:c,asyncTick:u}=s;if((0,i.anumber)(a),(0,i.anumber)(c),(0,i.anumber)(u),a<1)throw new Error("iterations (c) should be >= 1");const l=(0,i.kdfInputToBytes)(t),d=(0,i.kdfInputToBytes)(n),f=new Uint8Array(c),h=r.hmac.create(e,l),g=h._cloneInto().update(d);return{c:a,dkLen:c,asyncTick:u,DK:f,PRF:h,PRFSalt:g}}function s(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),(0,i.clean)(o),n}},4218:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.keyToRFC1751Mnemonic=t.rfc1751MnemonicToKey=void 0;const i=n(619),o=r(n(8413)).default,s=["0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"];function a(e){let t="";for(const n of e)t+=s[n>>4]+s[15&n];return t}function c(e,t,n){const r=e.substring(t,t+n);let i=0;for(let e=0;e<r.length;e++)i=2*i+r.charCodeAt(e)-48;return i}function u(e,t){const n=e.slice(t,t+6);let r=0;const i=[0,0,0,0,0,0,0,0,0];let s="";for(s of n){const e=o.indexOf(s.toUpperCase());if(-1===e)throw new TypeError(`Expected an RFC1751 word, but received '${s}'. For the full list of words in the RFC1751 encoding see https://datatracker.ietf.org/doc/html/rfc1751`);const t=(8-(r+11)%8)%8,n=e<<t,a=n>>16,c=n>>8&255,u=255&n,l=Math.floor(r/8);t>5?(i[l]|=a,i[l+1]|=c,i[l+2]|=u):t>-3?(i[l]|=c,i[l+1]|=u):i[l]|=u,r+=11}return{subKey:i.slice(),word:s}}function l(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function d(e){const t=function(e){const t=e.length;for(let n=0;n<t;n+=8)l(e,n,n+7),l(e,n+1,n+6),l(e,n+2,n+5),l(e,n+3,n+4);return e}(e);return(0,i.concat)([t.slice(8,16),t.slice(0,8)])}t.keyToRFC1751Mnemonic=function(e){let t=(n=d((0,i.hexToBytes)(e.replace(/\s+/gu,""))),Array.prototype.slice.call(n));var n;const r=[];for(let e=0;e<(8-t.length%8)%8;e++)r.push(0);t=r.concat(t);const s=[];for(let e=0;e<t.length;e+=8){const n=t.slice(e,e+8);let r=a(n),i=0;for(let e=0;e<64;e+=2)i+=c(r,e,2);n.push(i<<6&255),r=a(n);for(let e=0;e<64;e+=11)s.push(o[c(r,e,11)])}return s.join(" ")},t.rfc1751MnemonicToKey=function(e){const t=e.split(" ");let n=[];for(let e=0;e<t.length;e+=6){const{subKey:r,word:i}=u(t,e),o=a(r);let s=0;for(let e=0;e<64;e+=2)s+=c(o,e,2);if(c(o,64,2)!==(3&s))throw new Error(`Parity error at ${i}`);n=n.concat(r.slice(0,8))}return d(Uint8Array.from(n))}},4233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const r=n(6897),i=n(6667),o=n(5492),s=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array(64);class c extends r.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|r.SHA256_IV[0],this.B=0|r.SHA256_IV[1],this.C=0|r.SHA256_IV[2],this.D=0|r.SHA256_IV[3],this.E=0|r.SHA256_IV[4],this.F=0|r.SHA256_IV[5],this.G=0|r.SHA256_IV[6],this.H=0|r.SHA256_IV[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(n,17)^(0,o.rotr)(n,19)^n>>>10;a[e]=i+a[e-7]+r+a[e-16]|0}let{A:n,B:i,C:c,D:u,E:l,F:d,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+(0,r.Chi)(l,d,f)+s[e]+a[e]|0,g=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+(0,r.Maj)(n,i,c)|0;h=f,f=d,d=l,l=u+t|0,u=c,c=i,i=n,n=t+g|0}n=n+this.A|0,i=i+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,i,c,u,l,d,f,h)}roundClean(){(0,o.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA256=c;class u extends c{constructor(){super(28),this.A=0|r.SHA224_IV[0],this.B=0|r.SHA224_IV[1],this.C=0|r.SHA224_IV[2],this.D=0|r.SHA224_IV[3],this.E=0|r.SHA224_IV[4],this.F=0|r.SHA224_IV[5],this.G=0|r.SHA224_IV[6],this.H=0|r.SHA224_IV[7]}}t.SHA224=u;const l=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),d=(()=>l[0])(),f=(()=>l[1])(),h=new Uint32Array(80),g=new Uint32Array(80);class p extends r.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|r.SHA512_IV[0],this.Al=0|r.SHA512_IV[1],this.Bh=0|r.SHA512_IV[2],this.Bl=0|r.SHA512_IV[3],this.Ch=0|r.SHA512_IV[4],this.Cl=0|r.SHA512_IV[5],this.Dh=0|r.SHA512_IV[6],this.Dl=0|r.SHA512_IV[7],this.Eh=0|r.SHA512_IV[8],this.El=0|r.SHA512_IV[9],this.Fh=0|r.SHA512_IV[10],this.Fl=0|r.SHA512_IV[11],this.Gh=0|r.SHA512_IV[12],this.Gl=0|r.SHA512_IV[13],this.Hh=0|r.SHA512_IV[14],this.Hl=0|r.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:h,Hh:g,Hl:p}=this;return[e,t,n,r,i,o,s,a,c,u,l,d,f,h,g,p]}set(e,t,n,r,i,o,s,a,c,u,l,d,f,h,g,p){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|g,this.Hl=0|p}process(e,t){for(let n=0;n<16;n++,t+=4)h[n]=e.getUint32(t),g[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|h[e-15],n=0|g[e-15],r=i.rotrSH(t,n,1)^i.rotrSH(t,n,8)^i.shrSH(t,n,7),o=i.rotrSL(t,n,1)^i.rotrSL(t,n,8)^i.shrSL(t,n,7),s=0|h[e-2],a=0|g[e-2],c=i.rotrSH(s,a,19)^i.rotrBH(s,a,61)^i.shrSH(s,a,6),u=i.rotrSL(s,a,19)^i.rotrBL(s,a,61)^i.shrSL(s,a,6),l=i.add4L(o,u,g[e-7],g[e-16]),d=i.add4H(l,r,c,h[e-7],h[e-16]);h[e]=0|d,g[e]=0|l}let{Ah:n,Al:r,Bh:o,Bl:s,Ch:a,Cl:c,Dh:u,Dl:l,Eh:p,El:y,Fh:m,Fl:E,Gh:b,Gl:w,Hh:A,Hl:S}=this;for(let e=0;e<80;e++){const t=i.rotrSH(p,y,14)^i.rotrSH(p,y,18)^i.rotrBH(p,y,41),v=i.rotrSL(p,y,14)^i.rotrSL(p,y,18)^i.rotrBL(p,y,41),T=p&m^~p&b,O=y&E^~y&w,I=i.add5L(S,v,O,f[e],g[e]),B=i.add5H(I,A,t,T,d[e],h[e]),_=0|I,N=i.rotrSH(n,r,28)^i.rotrBH(n,r,34)^i.rotrBH(n,r,39),L=i.rotrSL(n,r,28)^i.rotrBL(n,r,34)^i.rotrBL(n,r,39),C=n&o^n&a^o&a,F=r&s^r&c^s&c;A=0|b,S=0|w,b=0|m,w=0|E,m=0|p,E=0|y,({h:p,l:y}=i.add(0|u,0|l,0|B,0|_)),u=0|a,l=0|c,a=0|o,c=0|s,o=0|n,s=0|r;const D=i.add3L(_,L,F);n=i.add3H(D,B,N,C),r=0|D}({h:n,l:r}=i.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:s}=i.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:c}=i.add(0|this.Ch,0|this.Cl,0|a,0|c)),({h:u,l}=i.add(0|this.Dh,0|this.Dl,0|u,0|l)),({h:p,l:y}=i.add(0|this.Eh,0|this.El,0|p,0|y)),({h:m,l:E}=i.add(0|this.Fh,0|this.Fl,0|m,0|E)),({h:b,l:w}=i.add(0|this.Gh,0|this.Gl,0|b,0|w)),({h:A,l:S}=i.add(0|this.Hh,0|this.Hl,0|A,0|S)),this.set(n,r,o,s,a,c,u,l,p,y,m,E,b,w,A,S)}roundClean(){(0,o.clean)(h,g)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=p;class y extends p{constructor(){super(48),this.Ah=0|r.SHA384_IV[0],this.Al=0|r.SHA384_IV[1],this.Bh=0|r.SHA384_IV[2],this.Bl=0|r.SHA384_IV[3],this.Ch=0|r.SHA384_IV[4],this.Cl=0|r.SHA384_IV[5],this.Dh=0|r.SHA384_IV[6],this.Dl=0|r.SHA384_IV[7],this.Eh=0|r.SHA384_IV[8],this.El=0|r.SHA384_IV[9],this.Fh=0|r.SHA384_IV[10],this.Fl=0|r.SHA384_IV[11],this.Gh=0|r.SHA384_IV[12],this.Gl=0|r.SHA384_IV[13],this.Hh=0|r.SHA384_IV[14],this.Hl=0|r.SHA384_IV[15]}}t.SHA384=y;const m=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),E=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class b extends p{constructor(){super(28),this.Ah=0|m[0],this.Al=0|m[1],this.Bh=0|m[2],this.Bl=0|m[3],this.Ch=0|m[4],this.Cl=0|m[5],this.Dh=0|m[6],this.Dl=0|m[7],this.Eh=0|m[8],this.El=0|m[9],this.Fh=0|m[10],this.Fl=0|m[11],this.Gh=0|m[12],this.Gl=0|m[13],this.Hh=0|m[14],this.Hl=0|m[15]}}t.SHA512_224=b;class w extends p{constructor(){super(32),this.Ah=0|E[0],this.Al=0|E[1],this.Bh=0|E[2],this.Bl=0|E[3],this.Ch=0|E[4],this.Cl=0|E[5],this.Dh=0|E[6],this.Dl=0|E[7],this.Eh=0|E[8],this.El=0|E[9],this.Fh=0|E[10],this.Fl=0|E[11],this.Gh=0|E[12],this.Gl=0|E[13],this.Hh=0|E[14],this.Hl=0|E[15]}}t.SHA512_256=w,t.sha256=(0,o.createHasher)(()=>new c),t.sha224=(0,o.createHasher)(()=>new u),t.sha512=(0,o.createHasher)(()=>new p),t.sha384=(0,o.createHasher)(()=>new y),t.sha512_256=(0,o.createHasher)(()=>new w),t.sha512_224=(0,o.createHasher)(()=>new b)},4263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMBid=void 0;const r=n(255),i=n(2794);t.validateAMMBid=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMBid: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMBid: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMBid: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMBid: Asset2 must be a Currency");if(null!=e.BidMin&&!(0,i.isAmount)(e.BidMin))throw new r.ValidationError("AMMBid: BidMin must be an Amount");if(null!=e.BidMax&&!(0,i.isAmount)(e.BidMax))throw new r.ValidationError("AMMBid: BidMax must be an Amount");if(null!=e.AuthAccounts){if(!(0,i.isArray)(e.AuthAccounts))throw new r.ValidationError("AMMBid: AuthAccounts must be an AuthAccount array");if(e.AuthAccounts.length>4)throw new r.ValidationError("AMMBid: AuthAccounts length must not be greater than 4");!function(e,t){for(const n of t){if(!(0,i.isRecord)(n))throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(!(0,i.isRecord)(n.AuthAccount))throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(null==n.AuthAccount.Account)throw new r.ValidationError("AMMBid: invalid AuthAccounts");if("string"!=typeof n.AuthAccount.Account)throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(n.AuthAccount.Account===e)throw new r.ValidationError("AMMBid: AuthAccounts must not include sender's address")}}(e.Account,e.AuthAccounts)}}},4296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t.weierstrassPoints=y,t.weierstrass=function(e){const n=function(e){const t=(0,r.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:c,n:u}=n,l=c.BYTES+1,h=2*c.BYTES+1;function g(e){return(0,i.mod)(e,u)}function p(e){return(0,i.invert)(e,u)}const{ProjectivePoint:m,normPrivateKeyToScalar:E,weierstrassEquation:b,isWithinCurveOrder:w}=y({...n,toBytes(e,t,n){const r=t.toAffine(),i=c.toBytes(r.x),a=o.concatBytes;return(0,s.abool)("isCompressed",n),n?a(Uint8Array.from([t.hasEvenY()?2:3]),i):a(Uint8Array.from([4]),i,c.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==l||2!==n&&3!==n){if(t===h&&4===n)return{x:c.fromBytes(r.subarray(0,c.BYTES)),y:c.fromBytes(r.subarray(c.BYTES,2*c.BYTES))};throw new Error("invalid Point, expected length of "+l+", or uncompressed "+h+", got "+t)}{const e=o.bytesToNumberBE(r);if(!o.inRange(e,f,c.ORDER))throw new Error("Point is not on curve");const t=b(e);let i;try{i=c.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!=((i&f)===f)&&(i=c.neg(i)),{x:e,y:i}}}}),A=e=>o.bytesToHex(o.numberToBytesBE(e,n.nByteLength));function S(e){return e>u>>f}const v=(e,t,n)=>o.bytesToNumberBE(e.slice(t,n));class T{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const t=n.nByteLength;return e=(0,s.ensureBytes)("compactSignature",e,2*t),new T(v(e,0,t),v(e,t,2*t))}static fromDER(e){const{r:n,s:r}=t.DER.toSig((0,s.ensureBytes)("DER",e));return new T(n,r)}assertValidity(){o.aInRange("r",this.r,f,u),o.aInRange("s",this.s,f,u)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:r,recovery:i}=this,o=_((0,s.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const a=2===i||3===i?t+n.n:t;if(a>=c.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=m.fromHex(u+A(a)),d=p(a),f=g(-o*d),h=g(r*d),y=m.BASE.multiplyAndAddUnsafe(l,f,h);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,g(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return A(this.r)+A(this.s)}}const O={isValidPrivateKey(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:()=>{const e=(0,i.getMinHashLength)(n.n);return(0,i.mapHashToField)(n.randomBytes(e),n.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function I(e){const t=o.isBytes(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===l||r===h:n?r===2*l||r===2*h:e instanceof m}const B=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=o.bytesToNumberBE(e),r=8*e.length-n.nBitLength;return r>0?t>>BigInt(r):t},_=n.bits2int_modN||function(e){return g(B(e))},N=o.bitMask(n.nBitLength);function L(e){return o.aInRange("num < 2^"+n.nBitLength,e,d,N),o.numberToBytesBE(e,n.nByteLength)}const C={lowS:n.lowS,prehash:!1},F={lowS:n.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:n,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(I(e))throw new Error("first arg must be private key");if(!I(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(E(e)).toRawBytes(n)},sign:function(e,t,r=C){const{seed:i,k2sig:u}=function(e,t,r=C){if(["recovered","canonical"].some(e=>e in r))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:u}=n;let{lowS:l,prehash:h,extraEntropy:y}=r;null==l&&(l=!0),e=(0,s.ensureBytes)("msgHash",e),a(r),h&&(e=(0,s.ensureBytes)("prehashed msgHash",i(e)));const b=_(e),A=E(t),v=[L(A),L(b)];if(null!=y&&!1!==y){const e=!0===y?u(c.BYTES):y;v.push((0,s.ensureBytes)("extraEntropy",e))}const O=o.concatBytes(...v),I=b;return{seed:O,k2sig:function(e){const t=B(e);if(!w(t))return;const n=p(t),r=m.BASE.multiply(t).toAffine(),i=g(r.x);if(i===d)return;const o=g(n*g(I+i*A));if(o===d)return;let s=(r.x===i?0:2)|Number(r.y&f),a=o;return l&&S(o)&&(a=function(e){return S(e)?g(-e):e}(o),s^=1),new T(i,a,s)}}}(e,t,r),l=n;return o.createHmacDrbg(l.hash.outputLen,l.nByteLength,l.hmac)(i,u)},verify:function(e,r,i,c=F){const u=e;r=(0,s.ensureBytes)("msgHash",r),i=(0,s.ensureBytes)("publicKey",i);const{lowS:l,prehash:d,format:f}=c;if(a(c),"strict"in c)throw new Error("options.strict was renamed to lowS");if(void 0!==f&&"compact"!==f&&"der"!==f)throw new Error("format must be compact or der");const h="string"==typeof u||o.isBytes(u),y=!h&&!f&&"object"==typeof u&&null!==u&&"bigint"==typeof u.r&&"bigint"==typeof u.s;if(!h&&!y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let E,b;try{if(y&&(E=new T(u.r,u.s)),h){try{"compact"!==f&&(E=T.fromDER(u))}catch(e){if(!(e instanceof t.DER.Err))throw e}E||"der"===f||(E=T.fromCompact(u))}b=m.fromHex(i)}catch(e){return!1}if(!E)return!1;if(l&&E.hasHighS())return!1;d&&(r=n.hash(r));const{r:w,s:A}=E,S=_(r),v=p(A),O=g(S*v),I=g(w*v),B=m.BASE.multiplyAndAddUnsafe(b,O,I)?.toAffine();return!!B&&g(B.x)===w},ProjectivePoint:m,Signature:T,utils:O}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if((0,i.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let i,o,s,a,c,u,l,d;i=e.sqr(r),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,s),u=e.mul(u,a),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,s);const{isValid:f,value:h}=n(o,u);d=e.mul(i,r),d=e.mul(d,h),l=e.cmov(l,s,f),d=e.cmov(d,h,f);const g=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,g),l=e.div(l,a),{x:l,y:d}}};const r=n(4107),i=n(802),o=n(3449),s=n(3449);function a(e){void 0!==e.lowS&&(0,s.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,s.abool)("prehash",e.prehash)}const{bytesToNumberBE:c,hexToBytes:u}=o;class l extends Error{constructor(e=""){super(e)}}t.DERErr=l,t.DER={Err:l,_tlv:{encode:(e,n)=>{const{Err:r}=t.DER;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&n.length)throw new r("tlv.encode: unpadded data");const i=n.length/2,s=o.numberToHexUnpadded(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=i>127?o.numberToHexUnpadded(s.length/2|128):"";return o.numberToHexUnpadded(e)+a+s+n},decode(e,n){const{Err:r}=t.DER;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(n.length<2||n[i++]!==e)throw new r("tlv.decode: wrong tlv");const o=n[i++];let s=0;if(128&o){const e=127&o;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const t=n.subarray(i,i+e);if(t.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===t[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of t)s=s<<8|e;if(i+=e,s<128)throw new r("tlv.decode(long): not minimal encoding")}else s=o;const a=n.subarray(i,i+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:n.subarray(i+s)}}},_int:{encode(e){const{Err:n}=t.DER;if(e<d)throw new n("integer: negative integers are not allowed");let r=o.numberToHexUnpadded(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new n("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:n}=t.DER;if(128&e[0])throw new n("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new n("invalid signature integer: unnecessary leading zero");return c(e)}},toSig(e){const{Err:n,_int:r,_tlv:i}=t.DER,s="string"==typeof e?u(e):e;o.abytes(s);const{v:a,l:c}=i.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:l,l:d}=i.decode(2,a),{v:f,l:h}=i.decode(2,d);if(h.length)throw new n("invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(f)}},hexFromSig(e){const{_tlv:n,_int:r}=t.DER,i=n.encode(2,r.encode(e.r))+n.encode(2,r.encode(e.s));return n.encode(48,i)}};const d=BigInt(0),f=BigInt(1),h=BigInt(2),g=BigInt(3),p=BigInt(4);function y(e){const t=function(e){const t=(0,r.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:i,a:s}=t;if(n){if(!i.eql(s,i.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,a=(0,i.Field)(t.n,t.nBitLength),c=t.toBytes||((e,t,r)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function l(e){const{a:r,b:i}=t,o=n.sqr(e),s=n.mul(o,e);return n.add(n.add(s,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),l(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:c}=t;if(n&&"bigint"!=typeof e){if(o.isBytes(e)&&(e=o.bytesToHex(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*r,"0")}let u;try{u="bigint"==typeof e?e:o.bytesToNumberBE((0,s.ensureBytes)("private key",e,r))}catch(t){throw new Error("invalid private key, expected hex or "+r+" bytes, got "+typeof e)}return a&&(u=(0,i.mod)(u,c)),o.aInRange("private key",u,f,c),u}function p(e){if(!(e instanceof E))throw new Error("ProjectivePoint expected")}const y=(0,s.memoized)((e,t)=>{const{px:r,py:i,pz:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};const s=e.is0();null==t&&(t=s?n.ONE:n.inv(o));const a=n.mul(r,t),c=n.mul(i,t),u=n.mul(o,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),m=(0,s.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw new Error("bad point: x or y not FE");const o=n.sqr(i),s=l(r);if(!n.eql(o,s))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class E{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof E)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?E.ZERO:new E(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(E.fromAffine)}static fromHex(e){const t=E.fromAffine(u((0,s.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return E.BASE.multiply(h(e))}static msm(e,t){return(0,r.pippenger)(E,a,e,t)}_setWindowSize(e){w.setWindowSize(this,e)}assertValidity(){m(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){p(e);const{px:t,py:r,pz:i}=this,{px:o,py:s,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(o,i)),u=n.eql(n.mul(r,a),n.mul(s,i));return c&&u}negate(){return new E(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,g),{px:o,py:s,pz:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(o,o),f=n.mul(s,s),h=n.mul(a,a),p=n.mul(o,s);return p=n.add(p,p),l=n.mul(o,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(i,h),u=n.add(c,u),c=n.sub(f,u),u=n.add(f,u),u=n.mul(c,u),c=n.mul(p,c),l=n.mul(i,l),h=n.mul(e,h),p=n.sub(d,h),p=n.mul(e,p),p=n.add(p,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,h),d=n.mul(d,p),u=n.add(u,d),h=n.mul(s,a),h=n.add(h,h),d=n.mul(h,p),c=n.sub(c,d),l=n.mul(h,f),l=n.add(l,l),l=n.add(l,l),new E(c,u,l)}add(e){p(e);const{px:r,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const f=t.a,h=n.mul(t.b,g);let y=n.mul(r,s),m=n.mul(i,a),b=n.mul(o,c),w=n.add(r,i),A=n.add(s,a);w=n.mul(w,A),A=n.add(y,m),w=n.sub(w,A),A=n.add(r,o);let S=n.add(s,c);return A=n.mul(A,S),S=n.add(y,b),A=n.sub(A,S),S=n.add(i,o),u=n.add(a,c),S=n.mul(S,u),u=n.add(m,b),S=n.sub(S,u),d=n.mul(f,A),u=n.mul(h,b),d=n.add(u,d),u=n.sub(m,d),d=n.add(m,d),l=n.mul(u,d),m=n.add(y,y),m=n.add(m,y),b=n.mul(f,b),A=n.mul(h,A),m=n.add(m,b),b=n.sub(y,b),b=n.mul(f,b),A=n.add(A,b),y=n.mul(m,A),l=n.add(l,y),y=n.mul(S,A),u=n.mul(w,u),u=n.sub(u,y),y=n.mul(w,m),d=n.mul(S,d),d=n.add(d,y),new E(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}wNAF(e){return w.wNAFCached(this,e,E.normalizeZ)}multiplyUnsafe(e){const{endo:r,n:i}=t;o.aInRange("scalar",e,d,i);const s=E.ZERO;if(e===d)return s;if(this.is0()||e===f)return this;if(!r||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,e,E.normalizeZ);let{k1neg:a,k1:c,k2neg:u,k2:l}=r.splitScalar(e),h=s,g=s,p=this;for(;c>d||l>d;)c&f&&(h=h.add(p)),l&f&&(g=g.add(p)),p=p.double(),c>>=f,l>>=f;return a&&(h=h.negate()),u&&(g=g.negate()),g=new E(n.mul(g.px,r.beta),g.py,g.pz),h.add(g)}multiply(e){const{endo:r,n:i}=t;let s,a;if(o.aInRange("scalar",e,f,i),r){const{k1neg:t,k1:i,k2neg:o,k2:c}=r.splitScalar(e);let{p:u,f:l}=this.wNAF(i),{p:d,f}=this.wNAF(c);u=w.constTimeNegate(t,u),d=w.constTimeNegate(o,d),d=new E(n.mul(d.px,r.beta),d.py,d.pz),s=u.add(d),a=l.add(f)}else{const{p:t,f:n}=this.wNAF(e);s=t,a=n}return E.normalizeZ([s,a])[0]}multiplyAndAddUnsafe(e,t,n){const r=E.BASE,i=(e,t)=>t!==d&&t!==f&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,n));return o.is0()?void 0:o}toAffine(e){return y(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===f)return!0;if(n)return n(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===f?this:n?n(E,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,s.abool)("isCompressed",e),this.assertValidity(),c(E,this,e)}toHex(e=!0){return(0,s.abool)("isCompressed",e),o.bytesToHex(this.toRawBytes(e))}}E.BASE=new E(t.Gx,t.Gy,n.ONE),E.ZERO=new E(n.ZERO,n.ONE,n.ZERO);const b=t.nBitLength,w=(0,r.wNAF)(E,t.endo?Math.ceil(b/2):b);return{CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:h,weierstrassEquation:l,isWithinCurveOrder:function(e){return o.inRange(e,f,t.n)}}}function m(e,t){const n=e.ORDER;let r=d;for(let e=n-f;e%h===d;e/=h)r+=f;const i=r,o=h<<i-f-f,s=o*h,a=(n-f)/s,c=(a-f)/h,u=s-f,l=o,y=e.pow(t,a),m=e.pow(t,(a+f)/h);let E=(t,n)=>{let r=y,o=e.pow(n,u),s=e.sqr(o);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,n),s=e.mul(a,t);let d=e.mul(s,o);a=e.pow(d,l);let g=e.eql(a,e.ONE);o=e.mul(s,m),a=e.mul(d,r),s=e.cmov(o,s,g),d=e.cmov(a,d,g);for(let t=i;t>f;t--){let n=t-h;n=h<<n-f;let i=e.pow(d,n);const a=e.eql(i,e.ONE);o=e.mul(s,r),r=e.mul(r,r),i=e.mul(d,r),s=e.cmov(o,s,a),d=e.cmov(i,d,a)}return{isValid:g,value:s}};if(e.ORDER%p===g){const n=(e.ORDER-g)/p,r=e.sqrt(e.neg(t));E=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,n);a=e.mul(a,s);const c=e.mul(a,r),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return E}},4315:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLedgerSequence=t.getSignedTx=t.waitForFinalTransactionOutcome=t.submitRequest=void 0;const i=n(255),o=n(5684);function s(e){const t="string"==typeof e?(0,o.decode)(e):e;if("string"==typeof t)return!1;if(null!=t.Signers){const e=t.Signers;for(const t of e)if(null==t.Signer.SigningPubKey||null==t.Signer.TxnSignature)return!1;return!0}return null!=t.SigningPubKey&&null!=t.TxnSignature}t.submitRequest=function(e,t,n=!1){return r(this,void 0,void 0,function*(){if(!s(t))throw new i.ValidationError("Transaction must be signed.");const r={command:"submit",tx_blob:"string"==typeof t?t:(0,o.encode)(t),fail_hard:(a=t,"AccountDelete"===("string"==typeof a?(0,o.decode)(a):a).TransactionType||n)};var a;return e.request(r)})},t.waitForFinalTransactionOutcome=function e(t,n,o,s){return r(this,void 0,void 0,function*(){yield function(){return r(this,void 0,void 0,function*(){return new Promise(e=>{setTimeout(e,1e3)})})}();const a=yield t.getLedgerIndex();if(o<a)throw new i.XrplError(`The latest ledger sequence ${a} is greater than the transaction's LastLedgerSequence (${o}).\nPreliminary result: ${s}`);const c=yield t.request({command:"tx",transaction:n}).catch(i=>r(this,void 0,void 0,function*(){var r;const a=null===(r=null==i?void 0:i.data)||void 0===r?void 0:r.error;if("txnNotFound"===a)return e(t,n,o,s);throw new Error(`${a} \n Preliminary result: ${s}.\nFull error details: ${String(i)}`)}));return c.result.validated?c:e(t,n,o,s)})},t.getSignedTx=function(e,t,{autofill:n=!0,wallet:a}={}){return r(this,void 0,void 0,function*(){if(s(t))return t;if(!a)throw new i.ValidationError("Wallet must be provided when submitting an unsigned transaction");let r="string"==typeof t?(0,o.decode)(t):t;return n&&(r=yield e.autofill(r)),a.sign(r).tx_blob})},t.getLastLedgerSequence=function(e){return("string"==typeof e?(0,o.decode)(e):e).LastLedgerSequence}},4329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainModifyBridge=t.XChainModifyBridgeFlags=void 0;const r=n(2794);var i;!function(e){e[e.tfClearAccountCreateAmount=65536]="tfClearAccountCreateAmount"}(i||(t.XChainModifyBridgeFlags=i={})),t.validateXChainModifyBridge=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateOptionalField)(e,"SignatureReward",r.isAmount),(0,r.validateOptionalField)(e,"MinAccountCreateAmount",r.isAmount)}},4526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDelegateSet=void 0;const r=n(255),i=n(2794),o=new Set(["AccountSet","SetRegularKey","SignerListSet","DelegateSet","AccountDelete","Batch","EnableAmendment","SetFee","UNLModify"]);t.validateDelegateSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Authorize",i.isAccount),e.Authorize===e.Account)throw new r.ValidationError("DelegateSet: Authorize and Account must be different.");(0,i.validateRequiredField)(e,"Permissions",Array.isArray);const t=e.Permissions;if(t.length>10)throw new r.ValidationError("DelegateSet: Permissions array length cannot be greater than 10.");const n=new Set;if(t.forEach(e=>{if(null==e||1!==Object.keys(e).length||null==e.Permission||1!==Object.keys(e.Permission).length)throw new r.ValidationError("DelegateSet: Permissions array element is malformed");const t=e.Permission.PermissionValue;if(null==t)throw new r.ValidationError("DelegateSet: PermissionValue must be defined");if("string"!=typeof t)throw new r.ValidationError("DelegateSet: PermissionValue must be a string");if(o.has(t))throw new r.ValidationError(`DelegateSet: PermissionValue contains a non-delegatable transaction ${t}`);n.add(t)}),t.length!==n.size)throw new r.ValidationError("DelegateSet: Permissions array cannot contain duplicate values")}},4660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XrplDefinitions=void 0;const r=n(8816),i=n(6986);class o extends r.XrplDefinitionsBase{constructor(e,t){super(e,Object.assign({},i.coreTypes,t))}}t.XrplDefinitions=o},4758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePermissionedDomainDelete=void 0;const r=n(2794);t.validatePermissionedDomainDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"DomainID",r.isString)}},4876:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2896),i=n(3449);class o{constructor(){this.hash=r.sha512.create()}static half(e){return(new o).add(e).first256()}add(e){return this.hash.update(e),this}addU32(e){const t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),this.add(t)}finish(){return this.hash.digest()}first256(){return this.finish().slice(0,32)}first256BigInt(){return(0,i.bytesToNumberBE)(this.first256())}}t.default=o},4894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=function(e){return{hash:e}},t.createCurve=function(e,t){const n=t=>(0,r.weierstrass)({...e,hash:t});return{...n(t),create:n}};const r=n(3181)},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMDelete=void 0;const r=n(255),i=n(2794);t.validateAMMDelete=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMDelete: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMDelete: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMDelete: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMDelete: Asset2 must be a Currency")}},5029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAccountCreateCommit=void 0;const r=n(2794);t.validateXChainAccountCreateCommit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},5036:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;const i=n(3062),o=n(255),s=n(1279),a=n(9672),c=n(7831),u=n(1565),l=n(6362),d=n(3222),f=n(5684),h=n(5274),g=n(7234),p=n(4110),y=n(811);function m(e,t,n){if(t>n)throw new Error("Illegal clamp bounds");return Math.min(Math.max(e,t),n)}class E extends i.EventEmitter{constructor(e,t={}){var n,r;if(super(),this.apiVersion=s.DEFAULT_API_VERSION,"string"!=typeof e||!/wss?(?:\+unix)?:\/\//u.exec(e))throw new o.ValidationError("server URI must start with `wss://`, `ws://`, `wss+unix://`, or `ws+unix://`.");this.feeCushion=null!==(n=t.feeCushion)&&void 0!==n?n:1.2,this.maxFeeXRP=null!==(r=t.maxFeeXRP)&&void 0!==r?r:"2",this.connection=new p.Connection(e,t),this.connection.on("error",(e,t,n)=>{this.emit("error",e,t,n)}),this.connection.on("reconnect",()=>{this.connection.on("connected",()=>this.emit("connected"))}),this.connection.on("disconnected",e=>{let t=e;t===p.INTENTIONAL_DISCONNECT_CODE&&(t=1e3),this.emit("disconnected",t)}),this.connection.on("ledgerClosed",e=>{this.emit("ledgerClosed",e)}),this.connection.on("transaction",e=>{(0,y.handleStreamPartialPayment)(e,this.connection.trace),this.emit("transaction",e)}),this.connection.on("validationReceived",e=>{this.emit("validationReceived",e)}),this.connection.on("manifestReceived",e=>{this.emit("manifestReceived",e)}),this.connection.on("peerStatusChange",e=>{this.emit("peerStatusChange",e)}),this.connection.on("consensusPhase",e=>{this.emit("consensusPhase",e)}),this.connection.on("path_find",e=>{this.emit("path_find",e)})}get url(){return this.connection.getUrl()}request(e){var t;return r(this,void 0,void 0,function*(){const n=Object.assign(Object.assign({},e),{account:"string"==typeof e.account?(0,c.ensureClassicAddress)(e.account):void 0,api_version:null!==(t=e.api_version)&&void 0!==t?t:this.apiVersion}),r=yield this.connection.request(n);return(0,y.handlePartialPayment)(e.command,r),r})}requestNextPage(e,t){return r(this,void 0,void 0,function*(){if(!t.result.marker)return Promise.reject(new o.NotFoundError("response does not have a next page"));const n=Object.assign(Object.assign({},e),{marker:t.result.marker});return this.request(n)})}on(e,t){return super.on(e,t)}requestAll(e,t){var n;return r(this,void 0,void 0,function*(){const r=null!=t?t:function(e){switch(e){case"account_channels":return"channels";case"account_lines":return"lines";case"account_objects":return"account_objects";case"account_tx":return"transactions";case"account_offers":case"book_offers":return"offers";case"ledger_data":return"state";default:return null}}(e.command);if(!r)throw new o.ValidationError(`no collect key for command ${e.command}`);const i=null!==(n=e.limit)&&void 0!==n?n:1/0;let s=0,a=e.marker;const c=[];do{const t=m(i-s,10,400),n=Object.assign(Object.assign({},e),{limit:t,marker:a}),u=yield this.connection.request(n),l=u.result;if(!(r in l))throw new o.XrplError(`${r} not in result`);const d=l[r];a=l.marker,c.push(u),Array.isArray(d)&&(s+=d.length)}while(Boolean(a)&&s<i);return c})}getServerInfo(){var e;return r(this,void 0,void 0,function*(){try{const t=yield this.request({command:"server_info"});this.networkID=null!==(e=t.result.info.network_id)&&void 0!==e?e:void 0,this.buildVersion=t.result.info.build_version}catch(e){console.error(e)}})}connect(){return r(this,void 0,void 0,function*(){return this.connection.connect().then(()=>r(this,void 0,void 0,function*(){yield this.getServerInfo(),this.emit("connected")}))})}disconnect(){return r(this,void 0,void 0,function*(){yield this.connection.disconnect()})}isConnected(){return this.connection.isConnected()}autofill(e,t){var n;return r(this,void 0,void 0,function*(){const r=Object.assign({},e);(0,u.setValidAddresses)(r),r.Flags=(0,a.convertTxFlagsToNumber)(r);const i=[];return null!==(n=r.NetworkID)&&void 0!==n||(r.NetworkID=(0,u.txNeedsNetworkID)(this)?this.networkID:void 0),null==r.Sequence&&i.push((0,u.setNextValidSequenceNumber)(this,r)),null==r.Fee&&i.push((0,u.getTransactionFee)(this,r,t)),null==r.LastLedgerSequence&&i.push((0,u.setLatestValidatedLedgerSequence)(this,r)),"AccountDelete"===r.TransactionType&&i.push((0,u.checkAccountDeleteBlockers)(this,r)),"Batch"===r.TransactionType&&i.push((0,u.autofillBatchTxn)(this,r)),"Payment"===r.TransactionType&&null!=r.DeliverMax&&(0,u.handleDeliverMax)(r),Promise.all(i).then(()=>r)})}simulate(e,t){var n;return r(this,void 0,void 0,function*(){const r=null!==(n=null==t?void 0:t.binary)&&void 0!==n&&n,i="string"==typeof e?{command:"simulate",tx_blob:e,binary:r}:{command:"simulate",tx_json:e,binary:r};return this.request(i)})}submit(e,t){return r(this,void 0,void 0,function*(){const n=yield(0,c.getSignedTx)(this,e,t);return(0,c.submitRequest)(this,n,null==t?void 0:t.failHard)})}submitAndWait(e,t){return r(this,void 0,void 0,function*(){const n=yield(0,c.getSignedTx)(this,e,t),r=(0,c.getLastLedgerSequence)(n);if(null==r)throw new o.ValidationError("Transaction must contain a LastLedgerSequence value for reliable submission.");const i=yield(0,c.submitRequest)(this,n,null==t?void 0:t.failHard);if(i.result.engine_result.startsWith("tem"))throw new o.XrplError(`Transaction failed, ${i.result.engine_result}: ${i.result.engine_result_message}`);const s=f.hashes.hashSignedTx(n);return(0,c.waitForFinalTransactionOutcome)(this,s,r,i.result.engine_result)})}prepareTransaction(e,t){return r(this,void 0,void 0,function*(){return this.autofill(e,t)})}getXrpBalance(e,t={}){var n;return r(this,void 0,void 0,function*(){const r={command:"account_info",account:e,ledger_index:null!==(n=t.ledger_index)&&void 0!==n?n:"validated",ledger_hash:t.ledger_hash},i=yield this.request(r);return(0,f.dropsToXrp)(i.result.account_data.Balance)})}getBalances(e,t={}){var n;return r(this,void 0,void 0,function*(){const r=[];let i=Promise.resolve(0);t.peer||(i=this.getXrpBalance(e,{ledger_hash:t.ledger_hash,ledger_index:t.ledger_index}));const o={command:"account_lines",account:e,ledger_index:null!==(n=t.ledger_index)&&void 0!==n?n:"validated",ledger_hash:t.ledger_hash,peer:t.peer,limit:t.limit},s=this.requestAll(o);return yield Promise.all([i,s]).then(([e,t])=>{const n=t.flatMap(e=>(0,l.formatBalances)(e.result.lines));0!==e&&r.push({currency:"XRP",value:e.toString()}),r.push(...n)}),r.slice(0,t.limit)})}getOrderbook(e,t,n={}){return r(this,void 0,void 0,function*(){(0,d.validateOrderbookOptions)(n);const r=(0,d.createBookOffersRequest)(e,t,n),i=yield(0,d.requestAllOffers)(this,r),o=yield(0,d.requestAllOffers)(this,(0,d.reverseRequest)(r)),s=(0,d.extractOffers)(i),a=(0,d.extractOffers)(o),c=(0,d.combineOrders)(s,a),{buy:u,sell:l}=(0,d.separateBuySellOrders)(c);return{buy:(0,d.sortAndLimitOffers)(u,n.limit),sell:(0,d.sortAndLimitOffers)(l,n.limit)}})}getLedgerIndex(){return r(this,void 0,void 0,function*(){return(yield this.request({command:"ledger",ledger_index:"validated"})).result.ledger_index})}fundWallet(e,t={}){return r(this,void 0,void 0,function*(){if(!this.isConnected())throw new o.RippledError("Client not connected, cannot call faucet");const n=Boolean(e),r=e&&(0,f.isValidClassicAddress)(e.classicAddress)?e:h.Wallet.generate(),i={destination:r.classicAddress,xrpAmount:t.amount,usageContext:t.usageContext,userAgent:"xrpl.js"};let s=0;if(n)try{s=Number(yield this.getXrpBalance(r.classicAddress))}catch(e){}return(0,g.requestFunding)(t,this,s,r,i)})}}t.Client=E},5123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenBurn=void 0;const r=n(2794);t.validateNFTokenBurn=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"NFTokenID",r.isString),(0,r.validateOptionalField)(e,"Owner",r.isAccount)}},5149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._DST_scalar=void 0,t.expand_message_xmd=l,t.expand_message_xof=d,t.hash_to_field=f,t.isogenyMap=function(e,t){const n=t.map(e=>Array.from(e).reverse());return(t,r)=>{const[o,s,a,c]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r))),[u,l]=(0,i.FpInvertBatch)(e,[s,c],!0);return t=e.mul(o,u),r=e.mul(r,e.mul(a,l)),{x:t,y:r}}},t.createHasher=function(e,n,r){if("function"!=typeof n)throw new Error("mapToCurve() must be defined");function i(t){return e.fromAffine(n(t))}function o(t){const n=t.clearCofactor();return n.equals(e.ZERO)?e.ZERO:(n.assertValidity(),n)}return{defaults:r,hashToCurve(e,t){const n=f(e,2,Object.assign({},r,t)),s=i(n[0]),a=i(n[1]);return o(s.add(a))},encodeToCurve(e,t){const n=r.encodeDST?{DST:r.encodeDST}:{};return o(i(f(e,1,Object.assign({},r,n,t))[0]))},mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!=typeof t)throw new Error("expected array of bigints");return o(i(e))},hashToScalar(n,i){const o=e.Fn.ORDER;return f(n,1,Object.assign({},r,{p:o,m:1,DST:t._DST_scalar},i))[0][0]}}};const r=n(7663),i=n(5827),o=r.bytesToNumberBE;function s(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e){if(!(0,r.isBytes)(e)&&"string"!=typeof e)throw new Error("DST must be Uint8Array or string");return"string"==typeof e?(0,r.utf8ToBytes)(e):e}function l(e,t,n,i){(0,r.abytes)(e),c(n),(t=u(t)).length>255&&(t=i((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=i,d=Math.ceil(n/o);if(n>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=(0,r.concatBytes)(t,s(t.length,1)),h=s(0,l),g=s(n,2),p=new Array(d),y=i((0,r.concatBytes)(h,e,g,s(0,1),f));p[0]=i((0,r.concatBytes)(y,s(1,1),f));for(let e=1;e<=d;e++){const t=[a(y,p[e-1]),s(e+1,1),f];p[e]=i((0,r.concatBytes)(...t))}return(0,r.concatBytes)(...p).slice(0,n)}function d(e,t,n,i,o){if((0,r.abytes)(e),c(n),(t=u(t)).length>255){const e=Math.ceil(2*i/8);t=o.create({dkLen:e}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(e).update(s(n,2)).update(t).update(s(t.length,1)).digest()}function f(e,t,n){(0,r._validateObject)(n,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:s,k:a,m:u,hash:f,expand:h,DST:g}=n;if(!(0,r.isHash)(n.hash))throw new Error("expected valid hash");(0,r.abytes)(e),c(t);const p=s.toString(2).length,y=Math.ceil((p+a)/8),m=t*u*y;let E;if("xmd"===h)E=l(e,g,m,f);else if("xof"===h)E=d(e,g,m,a,f);else{if("_internal_pass"!==h)throw new Error('expand must be "xmd" or "xof"');E=e}const b=new Array(t);for(let e=0;e<t;e++){const t=new Array(u);for(let n=0;n<u;n++){const r=y*(n+e*u),a=E.subarray(r,r+y);t[n]=(0,i.mod)(o(a),s)}b[e]=t}return b}t._DST_scalar=(0,r.utf8ToBytes)("HashToScalar-")},5237:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.OfferFlags=void 0,function(e){e[e.lsfPassive=65536]="lsfPassive",e[e.lsfSell=131072]="lsfSell",e[e.lsfHybrid=262144]="lsfHybrid"}(n||(t.OfferFlags=n={}))},5274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const i=n(857),o=n(9760),s=n(1218),a=n(619),c=r(n(735)),u=n(6333),l=n(5620),d=n(5442),f=r(n(5970)),h=n(255),g=n(9843),p=n(2794),y=n(99),m=n(7954),E=n(9333),b=n(6228),w=n(4218),A=n(3842),S=f.default.ed25519;class v{constructor(e,t,n={}){this.publicKey=e,this.privateKey=t,this.classicAddress=n.masterAddress?(0,m.ensureClassicAddress)(n.masterAddress):(0,d.deriveAddress)(e),this.seed=n.seed}get address(){return this.classicAddress}static generate(e=S){if(!Object.values(f.default).includes(e))throw new h.ValidationError("Invalid cryptographic signing algorithm");const t=(0,d.generateSeed)({algorithm:e});return v.fromSeed(t,{algorithm:e})}static fromSeed(e,t={}){return v.deriveWallet(e,{algorithm:t.algorithm,masterAddress:t.masterAddress})}static fromEntropy(e,t={}){var n;const r=null!==(n=t.algorithm)&&void 0!==n?n:S,i={entropy:Uint8Array.from(e),algorithm:r},o=(0,d.generateSeed)(i);return v.deriveWallet(o,{algorithm:r,masterAddress:t.masterAddress})}static fromMnemonic(e,t={}){var n;if("rfc1751"===t.mnemonicEncoding)return v.fromRFC1751Mnemonic(e,{masterAddress:t.masterAddress,algorithm:t.algorithm});if(!(0,o.validateMnemonic)(e,s.wordlist))throw new h.ValidationError("Unable to parse the given mnemonic using bip39 encoding");const r=(0,o.mnemonicToSeedSync)(e),c=i.HDKey.fromMasterSeed(r).derive(null!==(n=t.derivationPath)&&void 0!==n?n:"m/44'/144'/0'/0/0");!function(e){if(!(e.privateKey instanceof Uint8Array))throw new h.ValidationError("Unable to derive privateKey from mnemonic input");if(!(e.publicKey instanceof Uint8Array))throw new h.ValidationError("Unable to derive publicKey from mnemonic input")}(c);const u=(0,a.bytesToHex)(c.publicKey),l=(0,a.bytesToHex)(c.privateKey);return new v(u,`00${l}`,{masterAddress:t.masterAddress})}static fromRFC1751Mnemonic(e,t){const n=(0,w.rfc1751MnemonicToKey)(e);let r;r=t.algorithm===f.default.ed25519?"ed25519":"secp256k1";const i=(0,u.encodeSeed)(n,r);return v.fromSeed(i,{masterAddress:t.masterAddress,algorithm:t.algorithm})}static deriveWallet(e,t={}){var n;const{publicKey:r,privateKey:i}=(0,d.deriveKeypair)(e,{algorithm:null!==(n=t.algorithm)&&void 0!==n?n:S});return new v(r,i,{seed:e,masterAddress:t.masterAddress})}sign(e,t){let n=!1;"string"==typeof t?n=t:t&&(n=this.classicAddress);const r=(0,E.omitBy)(Object.assign({},e),e=>null==e);if(r.TxnSignature||r.Signers)throw new h.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');if(function(e){"Payment"===e.TransactionType&&"string"!=typeof e.Amount&&e.Amount.value.includes(".")&&e.Amount.value.endsWith("0")&&(e.Amount=Object.assign({},e.Amount),e.Amount.value=new c.default(e.Amount.value).toString())}(r),(0,g.validate)(r),(0,y.hasFlag)(r,p.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new h.ValidationError("Cannot sign a Batch inner transaction.");const i=Object.assign({},r);if(n){i.SigningPubKey="";const e={Account:n,SigningPubKey:this.publicKey,TxnSignature:T(i,this.privateKey,n)};i.Signers=[{Signer:e}]}else i.SigningPubKey=this.publicKey,i.TxnSignature=T(i,this.privateKey);const o=(0,l.encode)(i);return{tx_blob:o,hash:(0,b.hashSignedTx)(o)}}verifyTransaction(e){return(0,A.verifySignature)(e,this.publicKey)}getXAddress(e=!1,t=!1){return(0,u.classicAddressToXAddress)(this.classicAddress,e,t)}}function T(e,t,n){if(n){const r=(0,u.isValidXAddress)(n)?(0,u.xAddressToClassicAddress)(n).classicAddress:n;return(0,d.sign)((0,l.encodeForMultisigning)(e,r),t)}return(0,d.sign)((0,l.encodeForSigning)(e),t)}t.Wallet=v,v.fromSecret=v.fromSeed},5315:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(619),o=r(n(735)),s=n(6333),a=n(255);function c(e,t){const n=4294967296;return(e^new o.default(384160001).multipliedBy(t).modulo(n).plus(2459).modulo(n).toNumber())>>>0}t.default=function(e){if(64!==e.length)throw new a.XrplError(`Attempting to parse a nftokenID with length ${e.length}\n , but expected a token with length 64`);const t=new o.default(e.substring(48,56),16).toNumber(),n=new o.default(e.substring(56,64),16).toNumber();return{NFTokenID:e,Flags:new o.default(e.substring(0,4),16).toNumber(),TransferFee:new o.default(e.substring(4,8),16).toNumber(),Issuer:(0,s.encodeAccountID)((0,i.hexToBytes)(e.substring(8,48))),Taxon:c(t,n),Sequence:n}}},5407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NEGATIVE_UNL_ID=void 0,t.NEGATIVE_UNL_ID="2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244"},5435:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e={}){var t,n;this.factor=2,this.numAttempts=0,this.ms=null!==(t=e.min)&&void 0!==t?t:100,this.max=null!==(n=e.max)&&void 0!==n?n:1e3}get attempts(){return this.numAttempts}duration(){const e=this.ms*Math.pow(this.factor,this.numAttempts);return this.numAttempts+=1,Math.floor(Math.min(e,this.max))}reset(){this.numAttempts=0}}},5442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSeed=t.deriveNodeAddress=t.deriveAddress=t.verify=t.sign=t.deriveKeypair=t.generateSeed=void 0;const i=n(6333);Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}});const o=n(1658),s=n(7377),a=n(619),c=n(8957),u=r(n(4876)),l=r(n(3212)),d=n(1788),f=r(n(2484)),h=r(n(9577));function g(e){return{"ecdsa-secp256k1":f.default,ed25519:h.default}[e]}function p(e){return(0,i.encodeAccountID)(function(e){return(0,o.ripemd160)((0,s.sha256)(e))}(e))}t.generateSeed=function(e={}){l.default.ok(!e.entropy||e.entropy.length>=16,"entropy too short");const t=e.entropy?e.entropy.slice(0,16):(0,a.randomBytes)(16),n="ed25519"===e.algorithm?"ed25519":"secp256k1";return(0,i.encodeSeed)(t,n)},t.deriveKeypair=function(e,t){var n;const r=(0,i.decodeSeed)(e),o=g("ed25519"===(null!==(n=null==t?void 0:t.algorithm)&&void 0!==n?n:r.type)?"ed25519":"ecdsa-secp256k1"),s=o.deriveKeypair(r.bytes,t),a=u.default.half("This test message should verify."),c=o.sign(a,s.privateKey);if(!o.verify(a,c,s.publicKey))throw new Error("derived keypair did not generate verifiable signature");return s},t.sign=function(e,t){return g((0,d.getAlgorithmFromPrivateKey)(t)).sign((0,a.hexToBytes)(e),t)},t.verify=function(e,t,n){return g((0,d.getAlgorithmFromPublicKey)(n)).verify((0,a.hexToBytes)(e),t,n)},t.deriveAddress=function(e){return p((0,a.hexToBytes)(e))},t.deriveNodeAddress=function(e){const t=(0,i.decodeNodePublic)(e);return p((0,c.accountPublicFromPublicGenerator)(t))}},5463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt64=void 0;const r=n(3328),i=n(619),o=n(5517),s=n(1141),a=/^[a-fA-F0-9]{1,16}$/,c=/^[0-9]{1,20}$/,u=BigInt(4294967295),l=new Set(["MaximumAmount","OutstandingAmount","MPTAmount","LockedAmount"]);function d(e){return l.has(e)}class f extends r.UInt{constructor(e){super(null!=e?e:f.defaultUInt64.bytes)}static fromParser(e){return new f(e.read(f.width))}static from(e,t=""){if(e instanceof f)return e;let n=new Uint8Array(f.width);if("number"==typeof e){if(e<0)throw new Error("value must be an unsigned integer");const t=BigInt(e),n=[new Uint8Array(4),new Uint8Array(4)];return(0,o.writeUInt32BE)(n[0],Number(t>>BigInt(32)),0),(0,o.writeUInt32BE)(n[1],Number(t&BigInt(u)),0),new f((0,i.concat)(n))}if("string"==typeof e){if(d(t)){if(!c.test(e))throw new Error(`${t} ${e} is not a valid base 10 string`);e=BigInt(e).toString(16)}if("string"==typeof e&&!a.test(e))throw new Error(`${e} is not a valid hex-string`);const r=e.padStart(16,"0");return n=(0,i.hexToBytes)(r),new f(n)}if("bigint"==typeof e){const t=[new Uint8Array(4),new Uint8Array(4)];return(0,o.writeUInt32BE)(t[0],Number(Number(e>>BigInt(32))),0),(0,o.writeUInt32BE)(t[1],Number(e&BigInt(u)),0),new f((0,i.concat)(t))}throw new Error("Cannot construct UInt64 from given value")}toJSON(e=s.DEFAULT_DEFINITIONS,t=""){const n=(0,i.bytesToHex)(this.bytes);return d(t)?BigInt("0x"+n).toString(10):n}valueOf(){const e=BigInt((0,o.readUInt32BE)(this.bytes.slice(0,4),0)),t=BigInt((0,o.readUInt32BE)(this.bytes.slice(4),0));return e<<BigInt(32)|t}toBytes(){return this.bytes}}t.UInt64=f,f.width=8,f.defaultUInt64=new f(new Uint8Array(f.width))},5489:(e,t)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function r(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.anumber=n,t.abytes=r,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){r(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}},5492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=o,t.abytes=s,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=a,t.byteSwap32=c,t.bytesToHex=function(e){if(s(e),u)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=l[e[n]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(u)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r},t.asyncLoop=async function(e,n,r){let i=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-i;e>=0&&e<n||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=h,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=g,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=h(e)),s(e),e},t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];s(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=p,t.createOptHasher=y,t.createXOFer=m,t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return Uint8Array.from(r.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const r=n(1300);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function s(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function a(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=a(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>a(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const u=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),l=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function g(e){return"string"==typeof e&&(e=h(e)),s(e),e}function p(e){const t=t=>e().update(g(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function y(e){const t=(t,n)=>e(n).update(g(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function m(e){const t=(t,n)=>e(n).update(g(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=p,t.wrapConstructorWithOpts=y,t.wrapXOFConstructorWithOpts=m},5516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.encodeNodePublic=t.decodeNodePublic=t.decodeAddress=t.decodeAccountID=t.encodeAddress=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const r=n(1616),i=n(7377),o=n(2824),s=[1,225,75],a={sha256:i.sha256},c=new class{constructor(e){this._sha256=e.sha256,this._codec=r.base58xrp}encode(e,t){const n=t.versions;return this._encodeVersioned(e,n,t.expectedLength)}decode(e,t){var n;const r=t.versions,i=t.versionTypes,s=this.decodeChecked(e);if(r.length>1&&!t.expectedLength)throw new Error("expectedLength is required because there are >= 2 possible versions");const a="number"==typeof r[0]?1:r[0].length,c=null!==(n=t.expectedLength)&&void 0!==n?n:s.length-a,u=s.slice(0,-c),l=s.slice(-c);for(let e=0;e<r.length;e++){const t=Array.isArray(r[e])?r[e]:[r[e]];if((0,o.arrayEqual)(u,t))return{version:t,bytes:l,type:i?i[e]:null}}throw new Error("version_invalid: version bytes do not match any of the provided version(s)")}encodeChecked(e){const t=this._sha256(this._sha256(e)).slice(0,4);return this._encodeRaw(Uint8Array.from((0,o.concatArgs)(e,t)))}decodeChecked(e){const t=this._decodeRaw(e);if(t.byteLength<5)throw new Error("invalid_input_size: decoded data must have length >= 5");if(!this._verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}_encodeVersioned(e,t,n){if(!d(e,n))throw new Error("unexpected_payload_length: bytes.length does not match expectedLength. Ensure that the bytes are a Uint8Array.");return this.encodeChecked((0,o.concatArgs)(t,e))}_encodeRaw(e){return this._codec.encode(Uint8Array.from(e))}_decodeRaw(e){return this._codec.decode(e)}_verifyCheckSum(e){const t=this._sha256(this._sha256(e.slice(0,-4))).slice(0,4),n=e.slice(-4);return(0,o.arrayEqual)(t,n)}}(a);function u(e){return c.encode(e,{versions:[0],expectedLength:20})}function l(e){return c.decode(e,{versions:[0],expectedLength:20}).bytes}function d(e,t){return"byteLength"in e?e.byteLength===t:e.length===t}t.codec=c,t.encodeSeed=function(e,t){if(!d(e,16))throw new Error("entropy must have length 16");const n={expectedLength:16,versions:"ed25519"===t?s:[33]};return c.encode(e,n)},t.decodeSeed=function(e,t={versionTypes:["ed25519","secp256k1"],versions:[s,33],expectedLength:16}){return c.decode(e,t)},t.encodeAccountID=u,t.encodeAddress=u,t.decodeAccountID=l,t.decodeAddress=l,t.decodeNodePublic=function(e){return c.decode(e,{versions:[28],expectedLength:33}).bytes},t.encodeNodePublic=function(e){return c.encode(e,{versions:[28],expectedLength:33})},t.encodeAccountPublic=function(e){return c.encode(e,{versions:[35],expectedLength:33})},t.decodeAccountPublic=function(e){return c.decode(e,{versions:[35],expectedLength:33}).bytes},t.isValidClassicAddress=function(e){try{l(e)}catch(e){return!1}return!0}},5517:(e,t)=>{"use strict";function n(e,t){if(e.byteLength!==t.byteLength)throw new Error("Cannot compare arrays of different length");for(let n=0;n<e.length-1;n+=1){if(e[n]>t[n])return 1;if(e[n]<t[n])return-1}return 0}function r(e){return e.byteOffset%2==0&&e.byteLength%2==0}function i(e){return e.byteOffset%4==0&&e.byteLength%4==0}Object.defineProperty(t,"__esModule",{value:!0}),t.compare=t.equal=t.readInt64BE=t.readInt32BE=t.readUInt32BE=t.readUInt16BE=t.writeInt64BE=t.writeInt32BE=t.writeUInt32BE=t.writeUInt16BE=t.writeUInt8=void 0,t.writeUInt8=function(e,t,n){t=Number(t),e[n]=t},t.writeUInt16BE=function(e,t,n){t=Number(t),e[n]=t>>>8,e[n+1]=t},t.writeUInt32BE=function(e,t,n){e[n]=t>>>24&255,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t},t.writeInt32BE=function(e,t,n){new DataView(e.buffer,e.byteOffset,e.byteLength).setInt32(n,t,!1)},t.writeInt64BE=function(e,t,n){new DataView(e.buffer,e.byteOffset,e.byteLength).setBigInt64(n,t,!1)},t.readUInt16BE=function(e,t){return new DataView(e.buffer).getUint16(t,!1).toString(10)},t.readUInt32BE=function(e,t){return new DataView(e.buffer).getUint32(t,!1).toString(10)},t.readInt32BE=function(e,t){return new DataView(e.buffer,e.byteOffset,e.byteLength).getInt32(t,!1)},t.readInt64BE=function(e,t){return new DataView(e.buffer,e.byteOffset,e.byteLength).getBigInt64(t,!1)},t.equal=function(e,t){const o=e instanceof ArrayBuffer?new Uint8Array(e,0):e,s=t instanceof ArrayBuffer?new Uint8Array(t,0):t;return o.byteLength==s.byteLength&&(i(o)&&i(s)?0===function(e,t){return n(new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4),new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4))}(o,s):r(o)&&r(s)?0===function(e,t){return n(new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2))}(o,s):0===function(e,t){return n(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(o,s))},t.compare=n},5615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultCreate=t.VaultCreateFlags=t.VaultWithdrawalPolicy=void 0;const r=n(255),i=n(99),o=n(2794);var s,a;!function(e){e[e.vaultStrategyFirstComeFirstServe=1]="vaultStrategyFirstComeFirstServe"}(s||(t.VaultWithdrawalPolicy=s={})),function(e){e[e.tfVaultPrivate=65536]="tfVaultPrivate",e[e.tfVaultShareNonTransferable=131072]="tfVaultShareNonTransferable"}(a||(t.VaultCreateFlags=a={})),t.validateVaultCreate=function(e){if((0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"Asset",o.isCurrency),(0,o.validateOptionalField)(e,"Data",o.isString),(0,o.validateOptionalField)(e,"AssetsMaximum",o.isXRPLNumber),(0,o.validateOptionalField)(e,"MPTokenMetadata",o.isString),(0,o.validateOptionalField)(e,"WithdrawalPolicy",o.isNumber),(0,o.validateOptionalField)(e,"DomainID",o.isString),void 0!==e.Data){const t=e.Data;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultCreate: Data must be a valid hex string");const n=t.length/2;if(n>o.VAULT_DATA_MAX_BYTE_LENGTH)throw new r.ValidationError(`VaultCreate: Data exceeds ${o.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${n})`)}if(void 0!==e.MPTokenMetadata){const t=e.MPTokenMetadata;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultCreate: MPTokenMetadata must be a valid non-empty hex string");const n=t.length/2;if(n>o.MAX_MPT_META_BYTE_LENGTH)throw new r.ValidationError(`VaultCreate: MPTokenMetadata exceeds ${o.MAX_MPT_META_BYTE_LENGTH} bytes (actual: ${n})`)}if(void 0!==e.DomainID&&!(0,i.hasFlag)(e,a.tfVaultPrivate,"tfVaultPrivate"))throw new r.ValidationError("VaultCreate: Cannot set DomainID unless tfVaultPrivate flag is set.");if(null!=e.MPTokenMetadata){const t=(0,o.validateMPTokenMetadata)(e.MPTokenMetadata);if(t.length>0){const e=[o.MPT_META_WARNING_HEADER,...t.map(e=>`- ${e}`)].join("\n");console.warn(e)}}}},5620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreTypes=t.DEFAULT_DEFINITIONS=t.XrplDefinitionsBase=t.XrplDefinitions=t.TRANSACTION_TYPES=t.decodeLedgerData=t.decodeQuality=t.encodeQuality=t.encodeForSigningBatch=t.encodeForMultisigning=t.encodeForSigningClaim=t.encodeForSigning=t.encode=t.decode=void 0;const r=n(4184),i=n(2476);Object.defineProperty(t,"decodeLedgerData",{enumerable:!0,get:function(){return i.decodeLedgerData}});const o=n(1141);Object.defineProperty(t,"XrplDefinitionsBase",{enumerable:!0,get:function(){return o.XrplDefinitionsBase}}),Object.defineProperty(t,"TRANSACTION_TYPES",{enumerable:!0,get:function(){return o.TRANSACTION_TYPES}}),Object.defineProperty(t,"DEFAULT_DEFINITIONS",{enumerable:!0,get:function(){return o.DEFAULT_DEFINITIONS}});const s=n(4660);Object.defineProperty(t,"XrplDefinitions",{enumerable:!0,get:function(){return s.XrplDefinitions}});const a=n(6986);Object.defineProperty(t,"coreTypes",{enumerable:!0,get:function(){return a.coreTypes}});const c=n(619),{signingData:u,signingClaimData:l,multiSigningData:d,signingBatchData:f,binaryToJSON:h,serializeObject:g}=r.binary;t.decode=function(e,t){if("string"!=typeof e)throw new Error("binary must be a hex string");return h(e,t)},t.encode=function(e,t){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(g(e,{definitions:t}))},t.encodeForSigning=function(e,t){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(u(e,r.HashPrefix.transactionSig,{definitions:t}))},t.encodeForSigningClaim=function(e){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(l(e))},t.encodeForMultisigning=function(e,t,n){if("object"!=typeof e)throw new Error;if(""!==e.SigningPubKey)throw new Error;const r=n?{definitions:n}:void 0;return(0,c.bytesToHex)(d(e,t,r))},t.encodeForSigningBatch=function(e){if("object"!=typeof e)throw new Error("Need an object to encode a Batch transaction");return(0,c.bytesToHex)(f(e))},t.encodeQuality=function(e){if("string"!=typeof e)throw new Error;return(0,c.bytesToHex)(r.quality.encode(e))},t.decodeQuality=function(e){if("string"!=typeof e)throw new Error;return r.quality.decode(e).toString()}},5642:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rfc1751MnemonicToKey=t.keyToRFC1751Mnemonic=t.walletFromSecretNumbers=t.Wallet=t.ECDSA=t.Client=void 0;var s=n(5036);Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return s.Client}}),i(n(9729),t),i(n(5684),t);var a=n(5970);Object.defineProperty(t,"ECDSA",{enumerable:!0,get:function(){return o(a).default}}),i(n(255),t);var c=n(5274);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.Wallet}});var u=n(5907);Object.defineProperty(t,"walletFromSecretNumbers",{enumerable:!0,get:function(){return u.walletFromSecretNumbers}});var l=n(4218);Object.defineProperty(t,"keyToRFC1751Mnemonic",{enumerable:!0,get:function(){return l.keyToRFC1751Mnemonic}}),Object.defineProperty(t,"rfc1751MnemonicToKey",{enumerable:!0,get:function(){return l.rfc1751MnemonicToKey}}),i(n(3842),t)},5644:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255),o=r(n(9373)),s=r(n(2530)),a=n(168);class c extends a.Node{constructor(e,t,n){super(),this.tag=e,this.type=n,this.data=t}get hash(){switch(this.type){case a.NodeType.ACCOUNT_STATE:{const e=o.default.LEAF_NODE.toString(16);return(0,s.default)(e+this.data+this.tag)}case a.NodeType.TRANSACTION_NO_METADATA:{const e=o.default.TRANSACTION_ID.toString(16);return(0,s.default)(e+this.data)}case a.NodeType.TRANSACTION_METADATA:{const e=o.default.TRANSACTION_NODE.toString(16);return(0,s.default)(e+this.data+this.tag)}default:throw new i.XrplError("Tried to hash a SHAMap node of unknown type.")}}addItem(e,t){throw new i.XrplError("Cannot call addItem on a LeafNode")}}t.default=c},5684:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getXChainClaimID=t.parseNFTokenID=t.getNFTokenID=t.encodeForSigningClaim=t.encodeForSigning=t.encodeForMultiSigning=t.decode=t.encode=t.decodeXAddress=t.encodeXAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.isValidClassicAddress=t.isValidXAddress=t.xAddressToClassicAddress=t.classicAddressToXAddress=t.convertHexToString=t.convertStringToHex=t.verifyPaymentChannelClaim=t.verifyKeypairSignature=t.signPaymentChannelClaim=t.deriveXAddress=t.deriveAddress=t.deriveKeypair=t.hashes=t.isValidAddress=t.isValidSecret=t.qualityToDecimal=t.transferRateToDecimal=t.decimalToTransferRate=t.percentToTransferRate=t.decimalToQuality=t.percentToQuality=t.unixTimeToRippleTime=t.rippleTimeToUnixTime=t.isoTimeToRippleTime=t.rippleTimeToISOTime=t.hasNextPage=t.xrpToDrops=t.dropsToXrp=t.getBalanceChanges=void 0;const i=n(6333);Object.defineProperty(t,"classicAddressToXAddress",{enumerable:!0,get:function(){return i.classicAddressToXAddress}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"decodeXAddress",{enumerable:!0,get:function(){return i.decodeXAddress}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"encodeXAddress",{enumerable:!0,get:function(){return i.encodeXAddress}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}}),Object.defineProperty(t,"isValidXAddress",{enumerable:!0,get:function(){return i.isValidXAddress}}),Object.defineProperty(t,"xAddressToClassicAddress",{enumerable:!0,get:function(){return i.xAddressToClassicAddress}});const o=n(5620),s=n(5442);Object.defineProperty(t,"verifyKeypairSignature",{enumerable:!0,get:function(){return s.verify}});const a=n(8437);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return a.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return a.deriveAddress}}),Object.defineProperty(t,"deriveXAddress",{enumerable:!0,get:function(){return a.deriveXAddress}});const c=r(n(2945));t.getBalanceChanges=c.default;const u=r(n(6670));t.getNFTokenID=u.default;const l=r(n(4192));t.getXChainClaimID=l.default;const d=n(1377),f=r(n(5315));t.parseNFTokenID=f.default;const h=n(3365);Object.defineProperty(t,"percentToTransferRate",{enumerable:!0,get:function(){return h.percentToTransferRate}}),Object.defineProperty(t,"decimalToTransferRate",{enumerable:!0,get:function(){return h.decimalToTransferRate}}),Object.defineProperty(t,"transferRateToDecimal",{enumerable:!0,get:function(){return h.transferRateToDecimal}}),Object.defineProperty(t,"percentToQuality",{enumerable:!0,get:function(){return h.percentToQuality}}),Object.defineProperty(t,"decimalToQuality",{enumerable:!0,get:function(){return h.decimalToQuality}}),Object.defineProperty(t,"qualityToDecimal",{enumerable:!0,get:function(){return h.qualityToDecimal}});const g=r(n(376));t.signPaymentChannelClaim=g.default;const p=n(6339);Object.defineProperty(t,"convertHexToString",{enumerable:!0,get:function(){return p.convertHexToString}}),Object.defineProperty(t,"convertStringToHex",{enumerable:!0,get:function(){return p.convertStringToHex}});const y=n(2295);Object.defineProperty(t,"rippleTimeToISOTime",{enumerable:!0,get:function(){return y.rippleTimeToISOTime}}),Object.defineProperty(t,"isoTimeToRippleTime",{enumerable:!0,get:function(){return y.isoTimeToRippleTime}}),Object.defineProperty(t,"rippleTimeToUnixTime",{enumerable:!0,get:function(){return y.rippleTimeToUnixTime}}),Object.defineProperty(t,"unixTimeToRippleTime",{enumerable:!0,get:function(){return y.unixTimeToRippleTime}});const m=r(n(392));t.verifyPaymentChannelClaim=m.default;const E=n(2722);Object.defineProperty(t,"xrpToDrops",{enumerable:!0,get:function(){return E.xrpToDrops}}),Object.defineProperty(t,"dropsToXrp",{enumerable:!0,get:function(){return E.dropsToXrp}}),t.isValidSecret=function(e){try{return(0,a.deriveKeypair)(e),!0}catch(e){return!1}},t.encode=function(e){return(0,o.encode)(e)},t.encodeForSigning=function(e){return(0,o.encodeForSigning)(e)},t.encodeForSigningClaim=function(e){return(0,o.encodeForSigningClaim)(e)},t.encodeForMultiSigning=function(e,t){return(0,o.encodeForMultisigning)(e,t)},t.decode=function(e){return(0,o.decode)(e)},t.isValidAddress=function(e){return(0,i.isValidXAddress)(e)||(0,i.isValidClassicAddress)(e)},t.hasNextPage=function(e){return Boolean(e.result.marker)};const b={hashSignedTx:d.hashSignedTx,hashTx:d.hashTx,hashAccountRoot:d.hashAccountRoot,hashSignerListId:d.hashSignerListId,hashOfferId:d.hashOfferId,hashTrustline:d.hashTrustline,hashTxTree:d.hashTxTree,hashStateTree:d.hashStateTree,hashLedger:d.hashLedger,hashLedgerHeader:d.hashLedgerHeader,hashEscrow:d.hashEscrow,hashPaymentChannel:d.hashPaymentChannel};t.hashes=b},5713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultWithdraw=void 0;const r=n(2794);t.validateVaultWithdraw=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateOptionalField)(e,"Destination",r.isAccount)}},5755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Blob=void 0;const r=n(1275),i=n(619);class o extends r.SerializedType{constructor(e){super(e)}static fromParser(e,t){return new o(e.read(t))}static from(e){if(e instanceof o)return e;if("string"==typeof e){if(!/^[A-F0-9]*$/iu.test(e))throw new Error("Cannot construct Blob from a non-hex string");return new o((0,i.hexToBytes)(e))}throw new Error("Cannot construct Blob from value given")}}t.Blob=o},5763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountID=void 0;const r=n(6333),i=n(7284),o=n(619),s=/^[A-F0-9]{40}$/;class a extends i.Hash160{constructor(e){super(null!=e?e:a.defaultAccountID.bytes)}static from(e){if(e instanceof a)return e;if("string"==typeof e)return""===e?new a:s.test(e)?new a((0,o.hexToBytes)(e)):this.fromBase58(e);throw new Error("Cannot construct AccountID from value given")}static fromBase58(e){if((0,r.isValidXAddress)(e)){const t=(0,r.xAddressToClassicAddress)(e);if(!1!==t.tag)throw new Error("Only allowed to have tag on Account or Destination");e=t.classicAddress}return new a(Uint8Array.from((0,r.decodeAccountID)(e)))}toJSON(){return this.toBase58()}toBase58(){return(0,r.encodeAccountID)(this.bytes)}}t.AccountID=a,a.defaultAccountID=new a(new Uint8Array(20))},5812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.twistedEdwards=function(e){const t=function(e){const t=(0,r.validateBasic)(e);return o.validateObject(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:f,prehash:h,hash:g,randomBytes:p,nByteLength:y,h:m}=t,E=u<<BigInt(8*y)-c,b=n.create,w=(0,i.Field)(t.n,t.nBitLength),A=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(e){return{isValid:!1,value:a}}}),S=t.adjustScalarBytes||(e=>e),v=t.domain||((e,t,n)=>{if((0,s.abool)("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function T(e,t){o.aInRange("coordinate "+e,t,a,E)}function O(e){if(!(e instanceof _))throw new Error("ExtendedPoint expected")}const I=(0,s.memoized)((e,t)=>{const{ex:r,ey:i,ez:o}=e,s=e.is0();null==t&&(t=s?l:n.inv(o));const u=b(r*t),d=b(i*t),f=b(o*t);if(s)return{x:a,y:c};if(f!==c)throw new Error("invZ was invalid");return{x:u,y:d}}),B=(0,s.memoized)(e=>{const{a:n,d:r}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:i,ey:o,ez:s,et:a}=e,c=b(i*i),u=b(o*o),l=b(s*s),d=b(l*l),f=b(c*n);if(b(l*b(f+u))!==b(d+b(r*b(c*u))))throw new Error("bad point: equation left != right (1)");if(b(i*o)!==b(s*a))throw new Error("bad point: equation left != right (2)");return!0});class _{constructor(e,t,n,r){this.ex=e,this.ey=t,this.ez=n,this.et=r,T("x",e),T("y",t),T("z",n),T("t",r),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof _)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return T("x",t),T("y",n),new _(t,n,c,b(t*n))}static normalizeZ(e){const t=n.invertBatch(e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(_.fromAffine)}static msm(e,t){return(0,r.pippenger)(_,w,e,t)}_setWindowSize(e){C.setWindowSize(this,e)}assertValidity(){B(this)}equals(e){O(e);const{ex:t,ey:n,ez:r}=this,{ex:i,ey:o,ez:s}=e,a=b(t*s),c=b(i*r),u=b(n*s),l=b(o*r);return a===c&&u===l}is0(){return this.equals(_.ZERO)}negate(){return new _(b(-this.ex),this.ey,this.ez,b(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:i}=this,o=b(n*n),s=b(r*r),a=b(u*b(i*i)),c=b(e*o),l=n+r,d=b(b(l*l)-o-s),f=c+s,h=f-a,g=c-s,p=b(d*h),y=b(f*g),m=b(d*g),E=b(h*f);return new _(p,y,E,m)}add(e){O(e);const{a:n,d:r}=t,{ex:i,ey:o,ez:s,et:c}=this,{ex:l,ey:d,ez:f,et:h}=e;if(n===BigInt(-1)){const e=b((o-i)*(d+l)),t=b((o+i)*(d-l)),n=b(t-e);if(n===a)return this.double();const r=b(s*u*h),g=b(c*u*f),p=g+r,y=t+e,m=g-r,E=b(p*n),w=b(y*m),A=b(p*m),S=b(n*y);return new _(E,w,S,A)}const g=b(i*l),p=b(o*d),y=b(c*r*h),m=b(s*f),E=b((i+o)*(l+d)-g-p),w=m-y,A=m+y,S=b(p-n*g),v=b(E*w),T=b(A*S),I=b(E*S),B=b(w*A);return new _(v,T,B,I)}subtract(e){return this.add(e.negate())}wNAF(e){return C.wNAFCached(this,e,_.normalizeZ)}multiply(e){const t=e;o.aInRange("scalar",t,c,f);const{p:n,f:r}=this.wNAF(t);return _.normalizeZ([n,r])[0]}multiplyUnsafe(e,t=_.ZERO){const n=e;return o.aInRange("scalar",n,a,f),n===a?L:this.is0()||n===c?this:C.wNAFCachedUnsafe(this,n,_.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(m).is0()}isTorsionFree(){return C.unsafeLadder(this,f).is0()}toAffine(e){return I(this,e)}clearCofactor(){const{h:e}=t;return e===c?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:i,a:u}=t,l=n.BYTES;e=(0,s.ensureBytes)("pointHex",e,l),(0,s.abool)("zip215",r);const d=e.slice(),f=e[l-1];d[l-1]=-129&f;const h=o.bytesToNumberLE(d),g=r?E:n.ORDER;o.aInRange("pointHex.y",h,a,g);const p=b(h*h),y=b(p-c),m=b(i*p-u);let{isValid:w,value:S}=A(y,m);if(!w)throw new Error("Point.fromHex: invalid y coordinate");const v=(S&c)===c,T=!!(128&f);if(!r&&S===a&&T)throw new Error("Point.fromHex: x=0 and x_0=1");return T!==v&&(S=b(-S)),_.fromAffine({x:S,y:h})}static fromPrivateKey(e){return P(e).point}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=o.numberToBytesLE(t,n.BYTES);return r[r.length-1]|=e&c?128:0,r}toHex(){return o.bytesToHex(this.toRawBytes())}}_.BASE=new _(t.Gx,t.Gy,c,b(t.Gx*t.Gy)),_.ZERO=new _(a,c,c,a);const{BASE:N,ZERO:L}=_,C=(0,r.wNAF)(_,8*y);function F(e){return(0,i.mod)(e,f)}function D(e){return F(o.bytesToNumberLE(e))}function P(e){const t=n.BYTES;e=(0,s.ensureBytes)("private key",e,t);const r=(0,s.ensureBytes)("hashed private key",g(e),2*t),i=S(r.slice(0,t)),o=r.slice(t,2*t),a=D(i),c=N.multiply(a),u=c.toRawBytes();return{head:i,prefix:o,scalar:a,point:c,pointBytes:u}}function M(e=new Uint8Array,...t){const n=o.concatBytes(...t);return D(g(v(n,(0,s.ensureBytes)("context",e),!!h)))}const R=d;return N._setWindowSize(8),{CURVE:t,getPublicKey:function(e){return P(e).pointBytes},sign:function(e,t,r={}){e=(0,s.ensureBytes)("message",e),h&&(e=h(e));const{prefix:i,scalar:c,pointBytes:u}=P(t),l=M(r.context,i,e),d=N.multiply(l).toRawBytes(),g=F(l+M(r.context,d,u,e)*c);o.aInRange("signature.s",g,a,f);const p=o.concatBytes(d,o.numberToBytesLE(g,n.BYTES));return(0,s.ensureBytes)("result",p,2*n.BYTES)},verify:function(e,t,r,i=R){const{context:a,zip215:c}=i,u=n.BYTES;e=(0,s.ensureBytes)("signature",e,2*u),t=(0,s.ensureBytes)("message",t),r=(0,s.ensureBytes)("publicKey",r,u),void 0!==c&&(0,s.abool)("zip215",c),h&&(t=h(t));const l=o.bytesToNumberLE(e.slice(u,2*u));let d,f,g;try{d=_.fromHex(r,c),f=_.fromHex(e.slice(0,u),c),g=N.multiplyUnsafe(l)}catch(e){return!1}if(!c&&d.isSmallOrder())return!1;const p=M(a,f.toRawBytes(),d.toRawBytes(),t);return f.add(d.multiplyUnsafe(p)).subtract(g).clearCofactor().equals(_.ZERO)},ExtendedPoint:_,utils:{getExtendedPublicKey:P,randomPrivateKey:()=>p(n.BYTES),precompute:(e=8,t=_.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}};const r=n(4107),i=n(802),o=n(3449),s=n(3449),a=BigInt(0),c=BigInt(1),u=BigInt(2),l=BigInt(8),d={zip215:!0}},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=g,t.pow=function(e,t,n){return S(I(n),e,t)},t.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},t.invert=p,t.tonelliShanks=b,t.FpSqrt=w,t.validateField=function(e){const t=A.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,r._validateObject)(e,t),e},t.FpPow=S,t.FpInvertBatch=v,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?p(n,e.ORDER):e.inv(n))},t.FpLegendre=T,t.FpIsSquare=function(e,t){return 1===T(e,t)},t.nLength=O,t.Field=I,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,s=O(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return g(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=B,t.getMinHashLength=_,t.mapHashToField=function(e,t,n=!1){const i=e.length,s=B(t),a=_(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=g(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o;return n?(0,r.numberToBytesLE)(c,s):(0,r.numberToBytesBE)(c,s)};const r=n(7663),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(7),d=BigInt(8),f=BigInt(9),h=BigInt(16);function g(e,t){const n=e%t;return n>=i?n:t+n}function p(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let n=g(e,t),r=t,s=i,a=o,c=o,u=i;for(;n!==i;){const e=r/n,t=r%n,i=s-c*e,o=a-u*e;r=n,n=t,s=c,a=u,c=i,u=o}if(r!==o)throw new Error("invert: does not exist");return g(s,t)}function y(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function m(e,t){const n=(e.ORDER+o)/c,r=e.pow(t,n);return y(e,r,t),r}function E(e,t){const n=(e.ORDER-u)/d,r=e.mul(t,s),i=e.pow(r,n),o=e.mul(t,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));return y(e,c,t),c}function b(e){if(e<a)throw new Error("sqrt is not defined for small field");let t=e-o,n=0;for(;t%s===i;)t/=s,n++;let r=s;const c=I(e);for(;1===T(c,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return m;let u=c.pow(r,t);const l=(t+o)/s;return function(e,r){if(e.is0(r))return r;if(1!==T(e,r))throw new Error("Cannot find square root");let i=n,s=e.mul(e.ONE,u),a=e.pow(r,t),c=e.pow(r,l);for(;!e.eql(a,e.ONE);){if(e.is0(a))return e.ZERO;let t=1,n=e.sqr(a);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=o<<BigInt(i-t-1),u=e.pow(s,r);i=t,s=e.sqr(u),a=e.mul(a,s),c=e.mul(c,u)}return c}}function w(e){return e%c===a?m:e%d===u?E:e%h===f?function(e){const t=I(e),n=b(e),r=n(t,t.neg(t.ONE)),i=n(t,r),o=n(t,t.neg(r)),s=(e+l)/h;return(e,t)=>{let n=e.pow(t,s),a=e.mul(n,r);const c=e.mul(n,i),u=e.mul(n,o),l=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,a,l),a=e.cmov(u,c,d);const f=e.eql(e.sqr(a),t),h=e.cmov(n,a,f);return y(e,h,t),h}}(e):b(e)}t.isNegativeLE=(e,t)=>(g(e,t)&o)===o;const A=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function S(e,t,n){if(n<i)throw new Error("invalid exponent, negatives unsupported");if(n===i)return e.ONE;if(n===o)return t;let r=e.ONE,s=t;for(;n>i;)n&o&&(r=e.mul(r,s)),s=e.sqr(s),n>>=o;return r}function v(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),o=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),o),r}function T(e,t){const n=(e.ORDER-o)/s,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!c)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function O(e,t){void 0!==t&&(0,r.anumber)(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function I(e,t,n=!1,s={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);let a,c,u,l=!1;if("object"==typeof t&&null!=t){if(s.sqrt||n)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(a=e.BITS),e.sqrt&&(c=e.sqrt),"boolean"==typeof e.isLE&&(n=e.isLE),"boolean"==typeof e.modFromBytes&&(l=e.modFromBytes),u=e.allowedLengths}else"number"==typeof t&&(a=t),s.sqrt&&(c=s.sqrt);const{nBitLength:d,nByteLength:f}=O(e,a);if(f>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const y=Object.freeze({ORDER:e,isLE:n,BITS:d,BYTES:f,MASK:(0,r.bitMask)(d),ZERO:i,ONE:o,allowedLengths:u,create:t=>g(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isValidNot0:e=>!y.is0(e)&&y.isValid(e),isOdd:e=>(e&o)===o,neg:t=>g(-t,e),eql:(e,t)=>e===t,sqr:t=>g(t*t,e),add:(t,n)=>g(t+n,e),sub:(t,n)=>g(t-n,e),mul:(t,n)=>g(t*n,e),pow:(e,t)=>S(y,e,t),div:(t,n)=>g(t*p(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:c||(t=>(h||(h=w(e)),h(y,t))),toBytes:e=>n?(0,r.numberToBytesLE)(e,f):(0,r.numberToBytesBE)(e,f),fromBytes:(t,i=!0)=>{if(u){if(!u.includes(t.length)||t.length>f)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);const e=new Uint8Array(f);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==f)throw new Error("Field.fromBytes: expected "+f+" bytes, got "+t.length);let o=n?(0,r.bytesToNumberLE)(t):(0,r.bytesToNumberBE)(t);if(l&&(o=g(o,e)),!i&&!y.isValid(o))throw new Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:e=>v(y,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(y)}function B(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function _(e){const t=B(e);return t+Math.ceil(t/2)}},5842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenCreateOffer=t.NFTokenCreateOfferFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfSellNFToken=1]="tfSellNFToken"}(s||(t.NFTokenCreateOfferFlags=s={})),t.validateNFTokenCreateOffer=function(e){var t,n;if((0,o.validateBaseTransaction)(e),e.Account===e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner and Account must not be equal");if(e.Account===e.Destination)throw new r.ValidationError("NFTokenCreateOffer: Destination and Account must not be equal");if((0,o.validateOptionalField)(e,"Destination",o.isAccount),(0,o.validateOptionalField)(e,"Owner",o.isAccount),null==e.NFTokenID)throw new r.ValidationError("NFTokenCreateOffer: missing field NFTokenID");if(!(0,o.isAmount)(e.Amount))throw new r.ValidationError("NFTokenCreateOffer: invalid Amount");const a=null!==(t=e.Flags)&&void 0!==t?t:0;("number"==typeof a?(0,i.isFlagEnabled)(a,s.tfSellNFToken):null!==(n=a.tfSellNFToken)&&void 0!==n&&n)?function(e){if(null!=e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner must not be present for sell offers")}(e):function(e){if(null==e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner must be present for buy offers");if((0,o.parseAmountValue)(e.Amount)<=0)throw new r.ValidationError("NFTokenCreateOffer: Amount must be greater than 0 for buy offers")}(e)}},5863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=void 0;const r=n(255),i=n(9672),o=n(8571),s=n(3750),a=n(4263),c=n(3746),u=n(9966),l=n(4965),d=n(6214),f=n(2190),h=n(988),g=n(6695),p=n(6237),y=n(248),m=n(2859),E=n(5903),b=n(2794),w=n(390),A=n(7698),S=n(6769),v=n(4526),T=n(602),O=n(8377),I=n(8292),B=n(7118),_=n(3296),N=n(7315),L=n(3094),C=n(9962),F=n(1362),D=n(548),P=n(5998),M=n(5123),R=n(7688),x=n(5842),U=n(8718),H=n(7636),k=n(3539),V=n(9349),j=n(9726),z=n(1386),K=n(1441),G=n(2152),q=n(1722),W=n(5),X=n(4758),Y=n(821),$=n(1664),Z=n(2905),J=n(3007),Q=n(6181),ee=n(9043),te=n(5615),ne=n(2404),re=n(3461),ie=n(1811),oe=n(5713),se=n(5029),ae=n(7872),ce=n(1933),ue=n(8312),le=n(3471),de=n(707),fe=n(425),he=n(4329);t.validate=function e(t){const n=Object.assign({},t);switch((0,b.validateBaseTransaction)(n),Object.keys(n).forEach(e=>{const t=n[e];if(t&&(0,b.isIssuedCurrencyAmount)(t)){const e=t.currency;if(3===e.length&&"XRP"===e.toUpperCase())throw new r.ValidationError(`Cannot have an issued currency with a similar standard code to XRP (received '${e}'). XRP is not an issued currency.`)}}),n.Flags=(0,i.convertTxFlagsToNumber)(n),n.TransactionType){case"AMMBid":(0,a.validateAMMBid)(n);break;case"AMMClawback":(0,c.validateAMMClawback)(n);break;case"AMMCreate":(0,u.validateAMMCreate)(n);break;case"AMMDelete":(0,l.validateAMMDelete)(n);break;case"AMMDeposit":(0,d.validateAMMDeposit)(n);break;case"AMMVote":(0,f.validateAMMVote)(n);break;case"AMMWithdraw":(0,h.validateAMMWithdraw)(n);break;case"AccountDelete":(0,o.validateAccountDelete)(n);break;case"AccountSet":(0,s.validateAccountSet)(n);break;case"Batch":(0,g.validateBatch)(n),n.RawTransactions.forEach(t=>{e(t.RawTransaction)});break;case"CheckCancel":(0,p.validateCheckCancel)(n);break;case"CheckCash":(0,y.validateCheckCash)(n);break;case"CheckCreate":(0,m.validateCheckCreate)(n);break;case"Clawback":(0,E.validateClawback)(n);break;case"CredentialAccept":(0,w.validateCredentialAccept)(n);break;case"CredentialCreate":(0,A.validateCredentialCreate)(n);break;case"CredentialDelete":(0,S.validateCredentialDelete)(n);break;case"DIDDelete":(0,O.validateDIDDelete)(n);break;case"DIDSet":(0,I.validateDIDSet)(n);break;case"DelegateSet":(0,v.validateDelegateSet)(n);break;case"DepositPreauth":(0,T.validateDepositPreauth)(n);break;case"EscrowCancel":(0,B.validateEscrowCancel)(n);break;case"EscrowCreate":(0,_.validateEscrowCreate)(n);break;case"EscrowFinish":(0,N.validateEscrowFinish)(n);break;case"MPTokenAuthorize":(0,L.validateMPTokenAuthorize)(n);break;case"MPTokenIssuanceCreate":(0,C.validateMPTokenIssuanceCreate)(n);break;case"MPTokenIssuanceDestroy":(0,F.validateMPTokenIssuanceDestroy)(n);break;case"MPTokenIssuanceSet":(0,D.validateMPTokenIssuanceSet)(n);break;case"NFTokenAcceptOffer":(0,P.validateNFTokenAcceptOffer)(n);break;case"NFTokenBurn":(0,M.validateNFTokenBurn)(n);break;case"NFTokenCancelOffer":(0,R.validateNFTokenCancelOffer)(n);break;case"NFTokenCreateOffer":(0,x.validateNFTokenCreateOffer)(n);break;case"NFTokenMint":(0,U.validateNFTokenMint)(n);break;case"NFTokenModify":(0,H.validateNFTokenModify)(n);break;case"OfferCancel":(0,k.validateOfferCancel)(n);break;case"OfferCreate":(0,V.validateOfferCreate)(n);break;case"OracleDelete":(0,j.validateOracleDelete)(n);break;case"OracleSet":(0,z.validateOracleSet)(n);break;case"Payment":(0,K.validatePayment)(n);break;case"PaymentChannelClaim":(0,G.validatePaymentChannelClaim)(n);break;case"PaymentChannelCreate":(0,q.validatePaymentChannelCreate)(n);break;case"PaymentChannelFund":(0,W.validatePaymentChannelFund)(n);break;case"PermissionedDomainSet":(0,Y.validatePermissionedDomainSet)(n);break;case"PermissionedDomainDelete":(0,X.validatePermissionedDomainDelete)(n);break;case"SetRegularKey":(0,$.validateSetRegularKey)(n);break;case"SignerListSet":(0,Z.validateSignerListSet)(n);break;case"TicketCreate":(0,J.validateTicketCreate)(n);break;case"TrustSet":(0,Q.validateTrustSet)(n);break;case"VaultClawback":(0,ee.validateVaultClawback)(n);break;case"VaultCreate":(0,te.validateVaultCreate)(n);break;case"VaultDelete":(0,ne.validateVaultDelete)(n);break;case"VaultDeposit":(0,re.validateVaultDeposit)(n);break;case"VaultSet":(0,ie.validateVaultSet)(n);break;case"VaultWithdraw":(0,oe.validateVaultWithdraw)(n);break;case"XChainAccountCreateCommit":(0,se.validateXChainAccountCreateCommit)(n);break;case"XChainAddAccountCreateAttestation":(0,ae.validateXChainAddAccountCreateAttestation)(n);break;case"XChainAddClaimAttestation":(0,ce.validateXChainAddClaimAttestation)(n);break;case"XChainClaim":(0,ue.validateXChainClaim)(n);break;case"XChainCommit":(0,le.validateXChainCommit)(n);break;case"XChainCreateBridge":(0,de.validateXChainCreateBridge)(n);break;case"XChainCreateClaimID":(0,fe.validateXChainCreateClaimID)(n);break;case"XChainModifyBridge":(0,he.validateXChainModifyBridge)(n);break;default:throw new r.ValidationError(`Invalid field TransactionType: ${n.TransactionType}`)}}},5903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateClawback=void 0;const r=n(255),i=n(2794);t.validateClawback=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Amount",i.isClawbackAmount),(0,i.validateOptionalField)(e,"Holder",i.isAccount),!(0,i.isIssuedCurrencyAmount)(e.Amount)&&!(0,i.isMPTAmount)(e.Amount))throw new r.ValidationError("Clawback: invalid Amount");if((0,i.isIssuedCurrencyAmount)(e.Amount)&&e.Account===e.Amount.issuer)throw new r.ValidationError("Clawback: invalid holder Account");if((0,i.isMPTAmount)(e.Amount)&&e.Account===e.Holder)throw new r.ValidationError("Clawback: invalid holder Account");if((0,i.isIssuedCurrencyAmount)(e.Amount)&&e.Holder)throw new r.ValidationError("Clawback: cannot have Holder for currency");if((0,i.isMPTAmount)(e.Amount)&&!e.Holder)throw new r.ValidationError("Clawback: missing Holder")}},5907:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.walletFromSecretNumbers=void 0;const i=n(3767),o=r(n(5970)),s=n(5274);t.walletFromSecretNumbers=function(e,t){var n;const r=new i.Account(e).getFamilySeed(),a={masterAddress:void 0,algorithm:void 0};return void 0===t?a.algorithm=o.default.secp256k1:(a.masterAddress=t.masterAddress,a.algorithm=null!==(n=t.algorithm)&&void 0!==n?n:o.default.secp256k1),s.Wallet.fromSecret(r,a)}},5943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_256=t.SHA512_256=t.sha512_224=t.SHA512_224=t.sha384=t.SHA384=t.sha512=t.SHA512=void 0;const r=n(4233);t.SHA512=r.SHA512,t.sha512=r.sha512,t.SHA384=r.SHA384,t.sha384=r.sha384,t.SHA512_224=r.SHA512_224,t.sha512_224=r.sha512_224,t.SHA512_256=r.SHA512_256,t.sha512_256=r.sha512_256},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Currency=void 0;const r=n(7284),i=n(619),o=/^0{40}$/,s=/^[A-Z0-9a-z?!@#$%^&*(){}[\]|]{3}$/,a=/^[A-F0-9]{40}$/,c=/^0{24}[\x00-\x7F]{6}0{10}$/;function u(e){if(!function(e){return e instanceof Uint8Array?20===e.byteLength:function(e){return 3===e.length||(t=e,a.test(t));var t}(e)}(e))throw new Error(`Unsupported Currency representation: ${e}`);return 3===e.length?function(e){const t=new Uint8Array(20);if("XRP"!==e){const n=e.split("").map(e=>e.charCodeAt(0));t.set(n,12)}return t}(e):(0,i.hexToBytes)(e)}class l extends r.Hash160{constructor(e){super(null!=e?e:l.XRP.bytes);const t=(0,i.bytesToHex)(this.bytes);o.test(t)?this._iso="XRP":c.test(t)?this._iso=function(e){const t=(0,i.hexToString)((0,i.bytesToHex)(e));return"XRP"===t?null:function(e){return s.test(e)}(t)?t:null}(this.bytes.slice(12,15)):this._iso=null}iso(){return this._iso}static from(e){if(e instanceof l)return e;if("string"==typeof e)return new l(u(e));throw new Error("Cannot construct Currency from value given")}toJSON(){const e=this.iso();return null!==e?e:(0,i.bytesToHex)(this.bytes)}}t.Currency=l,l.XRP=new l(new Uint8Array(20))},5970:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ed25519="ed25519",e.secp256k1="ecdsa-secp256k1"}(n||(n={})),t.default=n},5998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenAcceptOffer=void 0;const r=n(255),i=n(2794);t.validateNFTokenAcceptOffer=function(e){if((0,i.validateBaseTransaction)(e),null!=e.NFTokenBrokerFee&&function(e){const t=(0,i.parseAmountValue)(e.NFTokenBrokerFee);if(Number.isNaN(t))throw new r.ValidationError("NFTokenAcceptOffer: invalid NFTokenBrokerFee");if(t<=0)throw new r.ValidationError("NFTokenAcceptOffer: NFTokenBrokerFee must be greater than 0; omit if there is no fee");if(null==e.NFTokenSellOffer||null==e.NFTokenBuyOffer)throw new r.ValidationError("NFTokenAcceptOffer: both NFTokenSellOffer and NFTokenBuyOffer must be set if using brokered mode")}(e),null==e.NFTokenSellOffer&&null==e.NFTokenBuyOffer)throw new r.ValidationError("NFTokenAcceptOffer: must set either NFTokenSellOffer or NFTokenBuyOffer")}},6181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTrustSet=t.TrustSetFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfSetfAuth=65536]="tfSetfAuth",e[e.tfSetNoRipple=131072]="tfSetNoRipple",e[e.tfClearNoRipple=262144]="tfClearNoRipple",e[e.tfSetFreeze=1048576]="tfSetFreeze",e[e.tfClearFreeze=2097152]="tfClearFreeze",e[e.tfSetDeepFreeze=4194304]="tfSetDeepFreeze",e[e.tfClearDeepFreeze=8388608]="tfClearDeepFreeze"}(o||(t.TrustSetFlags=o={})),t.validateTrustSet=function(e){(0,i.validateBaseTransaction)(e);const{LimitAmount:t,QualityIn:n,QualityOut:o}=e;if(void 0===t)throw new r.ValidationError("TrustSet: missing field LimitAmount");if(!(0,i.isAmount)(t))throw new r.ValidationError("TrustSet: invalid LimitAmount");if(void 0!==n&&"number"!=typeof n)throw new r.ValidationError("TrustSet: QualityIn must be a number");if(void 0!==o&&"number"!=typeof o)throw new r.ValidationError("TrustSet: QualityOut must be a number")}},6202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(5492);class i extends r.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(e);const n=(0,r.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),(0,r.clean)(o)}update(e){return(0,r.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,r.aexists)(this),(0,r.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,n)=>new i(e,t).update(n).digest(),t.hmac.create=(e,t)=>new i(e,t)},6214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMDeposit=t.AMMDepositFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfLPToken=65536]="tfLPToken",e[e.tfSingleAsset=524288]="tfSingleAsset",e[e.tfTwoAsset=1048576]="tfTwoAsset",e[e.tfOneAssetLPToken=2097152]="tfOneAssetLPToken",e[e.tfLimitLPToken=4194304]="tfLimitLPToken",e[e.tfTwoAssetIfEmpty=8388608]="tfTwoAssetIfEmpty"}(o||(t.AMMDepositFlags=o={})),t.validateAMMDeposit=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMDeposit: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMDeposit: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMDeposit: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMDeposit: Asset2 must be a Currency");if(null!=e.Amount2&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set Amount with Amount2");if(null!=e.EPrice&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set Amount with EPrice");if(null==e.LPTokenOut&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set at least LPTokenOut or Amount");if(null!=e.LPTokenOut&&!(0,i.isIssuedCurrencyAmount)(e.LPTokenOut))throw new r.ValidationError("AMMDeposit: LPTokenOut must be an IssuedCurrencyAmount");if(null!=e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMDeposit: Amount must be an Amount");if(null!=e.Amount2&&!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMDeposit: Amount2 must be an Amount");if(null!=e.EPrice&&!(0,i.isAmount)(e.EPrice))throw new r.ValidationError("AMMDeposit: EPrice must be an Amount")}},6228:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashStateTree=t.hashTxTree=t.hashLedgerHeader=t.hashSignedTx=void 0;const a=n(619),c=s(n(735)),u=n(5620),l=n(255),d=n(2794),f=n(99),h=s(n(9373)),g=s(n(2530)),p=o(n(3122));function y(e,t){return Number(e).toString(16).padStart(2*t,"0")}function m(e){const t=e.length/2;if(t<=192)return(0,a.bytesToHex)([t])+e;if(t<=12480){const n=t-193;return(0,a.bytesToHex)([193+(n>>>8),255&n])+e}if(t<=918744){const n=t-12481;return(0,a.bytesToHex)([241+(n>>>16),n>>>8&255,255&n])+e}throw new l.XrplError("Variable integer overflow.")}function E(e){let t,n;if("string"==typeof e?(t=e,n=(0,u.decode)(e)):(t=(0,u.encode)(e),n=e),void 0===n.TxnSignature&&void 0===n.Signers&&void 0===n.SigningPubKey&&!(0,f.hasFlag)(n,d.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new l.ValidationError("The transaction must be signed to hash it.");const r=h.default.TRANSACTION_ID.toString(16).toUpperCase();return(0,g.default)(r.concat(t))}function b(e){const t=h.default.LEDGER.toString(16).toUpperCase()+y(Number(e.ledger_index),4)+(n=e.total_coins,new c.default(n).toString(16).padStart(16,"0"))+e.parent_hash+e.transaction_hash+e.account_hash+y(e.parent_close_time,4)+y(e.close_time,4)+y(e.close_time_resolution,1)+y(e.close_flags,1);var n;return(0,g.default)(t)}function w(e){var t;const n=new p.default;for(const r of e){const e=(0,u.encode)(r),i=(0,u.encode)(null!==(t=r.metaData)&&void 0!==t?t:{}),o=E(e),s=m(e)+m(i);n.addItem(o,s,p.NodeType.TRANSACTION_METADATA)}return n.hash}function A(e){const t=new p.default;return e.forEach(e=>{const n=(0,u.encode)(e);t.addItem(e.index,n,p.NodeType.ACCOUNT_STATE)}),t.hash}function S(e,t){const{transaction_hash:n}=e;if(!t.computeTreeHashes)return n;if(null==e.transactions)throw new l.ValidationError("transactions is missing from the ledger");const r=w(e.transactions);if(n!==r)throw new l.ValidationError("transactionHash in header does not match computed hash of transactions",{transactionHashInHeader:n,computedHashOfTransactions:r});return r}function v(e,t){const{account_hash:n}=e;if(!t.computeTreeHashes)return n;if(null==e.accountState)throw new l.ValidationError("accountState is missing from the ledger");const r=A(e.accountState);if(n!==r)throw new l.ValidationError("stateHash in header does not match computed hash of state");return r}t.hashSignedTx=E,t.hashLedgerHeader=b,t.hashTxTree=w,t.hashStateTree=A,t.default=function(e,t={}){const n={transaction_hash:S(e,t),account_hash:v(e,t)};return b(Object.assign(Object.assign({},e),n))}},6237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCancel=void 0;const r=n(255),i=n(2794);t.validateCheckCancel=function(e){if((0,i.validateBaseTransaction)(e),void 0!==e.CheckID&&"string"!=typeof e.CheckID)throw new r.ValidationError("CheckCancel: invalid CheckID")}},6333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidXAddress=t.decodeXAddress=t.xAddressToClassicAddress=t.encodeXAddress=t.classicAddressToXAddress=t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const r=n(619),i=n(5516);Object.defineProperty(t,"codec",{enumerable:!0,get:function(){return i.codec}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}});const o={main:Uint8Array.from([5,68]),test:Uint8Array.from([4,147])};function s(e,t,n){if(20!==e.length)throw new Error("Account ID must be 20 bytes");if(!1!==t&&t>4294967295)throw new Error("Invalid tag");const s=t||0,a=!1===t||null==t?0:1,c=(0,r.concat)([n?o.test:o.main,e,Uint8Array.from([a,255&s,s>>8&255,s>>16&255,s>>24&255,0,0,0,0])]);return i.codec.encodeChecked(c)}function a(e){const t=i.codec.decodeChecked(e),n=function(e){const t=e.slice(0,2);if((0,r.equal)(o.main,t))return!1;if((0,r.equal)(o.test,t))return!0;throw new Error("Invalid X-address: bad prefix")}(t);return{accountId:t.slice(2,22),tag:function(e){const t=e[22];if(t>=2)throw new Error("Unsupported X-address");if(1===t)return e[23]+256*e[24]+65536*e[25]+16777216*e[26];if(0!==t)throw new Error("flag must be zero to indicate no tag");if(!(0,r.equal)((0,r.hexToBytes)("0000000000000000"),e.slice(23,31)))throw new Error("remaining bytes must be zero");return!1}(t),test:n}}t.classicAddressToXAddress=function(e,t,n){return s((0,i.decodeAccountID)(e),t,n)},t.encodeXAddress=s,t.xAddressToClassicAddress=function(e){const{accountId:t,tag:n,test:r}=a(e);return{classicAddress:(0,i.encodeAccountID)(t),tag:n,test:r}},t.decodeXAddress=a,t.isValidXAddress=function(e){try{a(e)}catch(e){return!1}return!0}},6339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHex=t.convertHexToString=void 0;const r=n(619);t.convertStringToHex=function(e){return(0,r.stringToHex)(e)},t.convertHexToString=function(e,t="utf8"){return(0,r.hexToString)(e,t)}},6362:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBalances=void 0,t.formatBalances=function(e){return e.map(e=>({value:e.balance,currency:e.currency,issuer:e.account}))}},6509:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(735)),s=n(255);t.default=function(e,t){var n,i;return r(this,void 0,void 0,function*(){const r=null!=t?t:e.feeCushion,a=(yield e.request({command:"server_info"})).result.info,c=null===(n=a.validated_ledger)||void 0===n?void 0:n.base_fee_xrp;if(null==c)throw new s.XrplError("getFeeXrp: Could not get base_fee_xrp from server_info");const u=new o.default(c);null!==(i=a.load_factor)&&void 0!==i||(a.load_factor=1);let l=u.times(a.load_factor).times(r);return l=o.default.min(l,e.maxFeeXRP),new o.default(l.toFixed(6)).toString(10)})}},6557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const r=n(1026);t.RIPEMD160=r.RIPEMD160,t.ripemd160=r.ripemd160},6657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=s,t.createCurve=function(e,t){const n=t=>(0,o.weierstrass)({...e,...s(t)});return{...n(t),create:n}};const r=n(3795),i=n(9987),o=n(4296);function s(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,i.concatBytes)(...n)),randomBytes:i.randomBytes}}},6667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=b,t.fromBig=i,t.split=o;const n=BigInt(2**32-1),r=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function o(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:n,l:a}=i(e[s],t);[r[s],o[s]]=[n,a]}return[r,o]}const s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const u=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=u;const l=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=l;const d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;const f=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const g=(e,t)=>e;t.rotr32L=g;const p=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=p;const y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;const m=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=m;const E=(e,t,n)=>e<<n-32|t>>>64-n;function b(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}t.rotlBL=E;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const A=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=A;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=S;const v=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;t.add4H=v;const T=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);t.add5L=T;const O=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;t.add5H=O;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:g,rotlSH:p,rotlSL:y,rotlBH:m,rotlBL:E,add:b,add3L:w,add3H:A,add4L:S,add4H:v,add5H:O,add5L:T};t.default=I},6670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(3342);t.default=function(e){if("string"!=typeof e&&void 0===(null==e?void 0:e.AffectedNodes))throw new TypeError(`Unable to parse the parameter given to getNFTokenID.\n 'meta' must be the metadata from an NFTokenMint transaction. Received ${JSON.stringify(e)} instead.`);const t=function(e){return"string"==typeof e?(0,r.decode)(e):e}(e).AffectedNodes.filter(e=>{var t;return(0,i.isCreatedNode)(e)?"NFTokenPage"===e.CreatedNode.LedgerEntryType:!!(0,i.isModifiedNode)(e)&&"NFTokenPage"===e.ModifiedNode.LedgerEntryType&&Boolean(null===(t=e.ModifiedNode.PreviousFields)||void 0===t?void 0:t.NFTokens)}),n=new Set(t.flatMap(e=>{var t;return((0,i.isModifiedNode)(e)?null===(t=e.ModifiedNode.PreviousFields)||void 0===t?void 0:t.NFTokens:[]).map(e=>e.NFToken.NFTokenID)}).filter(e=>Boolean(e)));return t.flatMap(e=>{var t,n,r,i,o,s;return(null!==(s=null!==(r=null===(n=null===(t=e.ModifiedNode)||void 0===t?void 0:t.FinalFields)||void 0===n?void 0:n.NFTokens)&&void 0!==r?r:null===(o=null===(i=e.CreatedNode)||void 0===i?void 0:i.NewFields)||void 0===o?void 0:o.NFTokens)&&void 0!==s?s:[]).map(e=>e.NFToken.NFTokenID)}).filter(e=>Boolean(e)).find(e=>!n.has(e))}},6695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBatch=t.BatchFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfAllOrNothing=65536]="tfAllOrNothing",e[e.tfOnlyOne=131072]="tfOnlyOne",e[e.tfUntilFailure=262144]="tfUntilFailure",e[e.tfIndependent=524288]="tfIndependent"}(s||(t.BatchFlags=s={})),t.validateBatch=function(e){var t;(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"RawTransactions",o.isArray),e.RawTransactions.forEach((e,t)=>{if(!(0,o.isRecord)(e))throw new r.ValidationError(`Batch: RawTransactions[${t}] is not object.`);(0,o.validateRequiredField)(e,"RawTransaction",o.isRecord,{paramName:`RawTransactions[${t}].RawTransaction`,txType:"Batch"}),function(e,t){if("Batch"===e.TransactionType)throw new r.ValidationError(`Batch: RawTransactions[${t}] is a Batch transaction. Cannot nest Batch transactions.`);if(!(0,i.hasFlag)(e,o.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new r.ValidationError(`Batch: RawTransactions[${t}] must contain the \`tfInnerBatchTxn\` flag.`);(0,o.validateOptionalField)(e,"Fee",(0,o.isValue)("0"),{paramName:`RawTransactions[${t}].RawTransaction.Fee`,txType:"Batch"}),(0,o.validateOptionalField)(e,"SigningPubKey",(0,o.isValue)(""),{paramName:`RawTransactions[${t}].RawTransaction.SigningPubKey`,txType:"Batch"}),(0,o.validateOptionalField)(e,"TxnSignature",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.TxnSignature`,txType:"Batch"}),(0,o.validateOptionalField)(e,"Signers",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.Signers`,txType:"Batch"}),(0,o.validateOptionalField)(e,"LastLedgerSequence",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.LastLedgerSequence`,txType:"Batch"})}(e.RawTransaction,t)}),(0,o.validateOptionalField)(e,"BatchSigners",o.isArray),null===(t=e.BatchSigners)||void 0===t||t.forEach((e,t)=>{if(!(0,o.isRecord)(e))throw new r.ValidationError(`Batch: BatchSigners[${t}] is not object.`);const n=e;(0,o.validateRequiredField)(n,"BatchSigner",o.isRecord,{paramName:`BatchSigners[${t}].BatchSigner`,txType:"Batch"});const i=n.BatchSigner;(0,o.validateRequiredField)(i,"Account",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.Account`,txType:"Batch"}),(0,o.validateOptionalField)(i,"SigningPubKey",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.SigningPubKey`,txType:"Batch"}),(0,o.validateOptionalField)(i,"TxnSignature",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.TxnSignature`,txType:"Batch"}),(0,o.validateOptionalField)(i,"Signers",o.isArray,{paramName:`BatchSigners[${t}].BatchSigner.Signers`,txType:"Batch"})})}},6769:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialDelete=void 0;const r=n(255),i=n(2794);t.validateCredentialDelete=function(e){if((0,i.validateBaseTransaction)(e),!e.Subject&&!e.Issuer)throw new r.ValidationError("CredentialDelete: either `Issuer` or `Subject` must be provided");(0,i.validateRequiredField)(e,"Account",i.isString),(0,i.validateCredentialType)(e),(0,i.validateOptionalField)(e,"Subject",i.isString),(0,i.validateOptionalField)(e,"Issuer",i.isString)}},6897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,n){return e&t^~e&n},t.Maj=function(e,t,n){return e&t^e&n^t&n};const r=n(5492);function i(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class o extends r.Hash{constructor(e,t,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){(0,r.aexists)(this),e=(0,r.toBytes)(e),(0,r.abytes)(e);const{view:t,buffer:n,blockLen:i}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const t=(0,r.createView)(e);for(;i<=o-s;s+=i)this.process(t,s);continue}n.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,(0,r.clean)(this.buffer.subarray(a)),this.padOffset>o-a&&(this.process(n,0),a=0);for(let e=a;e<o;e++)t[e]=0;i(n,o-8,BigInt(8*this.length),s),this.process(n,0);const c=(0,r.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}t.HashMD=o,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},6905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash192=void 0;const r=n(3776);class i extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=i.ZERO_192.bytes),super(null!=e?e:i.ZERO_192.bytes)}}t.Hash192=i,i.width=24,i.ZERO_192=new i(new Uint8Array(i.width))},6986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=t.UInt64=t.UInt32=t.UInt16=t.UInt8=t.STObject=t.STArray=t.PathSet=t.Hash256=t.Hash192=t.Hash160=t.Hash128=t.Currency=t.Blob=t.Amount=t.AccountID=t.coreTypes=void 0;const r=n(5763);Object.defineProperty(t,"AccountID",{enumerable:!0,get:function(){return r.AccountID}});const i=n(9492);Object.defineProperty(t,"Amount",{enumerable:!0,get:function(){return i.Amount}});const o=n(5755);Object.defineProperty(t,"Blob",{enumerable:!0,get:function(){return o.Blob}});const s=n(5967);Object.defineProperty(t,"Currency",{enumerable:!0,get:function(){return s.Currency}});const a=n(24);Object.defineProperty(t,"Hash128",{enumerable:!0,get:function(){return a.Hash128}});const c=n(7284);Object.defineProperty(t,"Hash160",{enumerable:!0,get:function(){return c.Hash160}});const u=n(6905);Object.defineProperty(t,"Hash192",{enumerable:!0,get:function(){return u.Hash192}});const l=n(8264);Object.defineProperty(t,"Hash256",{enumerable:!0,get:function(){return l.Hash256}});const d=n(1837),f=n(8741),h=n(3914);Object.defineProperty(t,"PathSet",{enumerable:!0,get:function(){return h.PathSet}});const g=n(8239);Object.defineProperty(t,"STArray",{enumerable:!0,get:function(){return g.STArray}});const p=n(8847);Object.defineProperty(t,"STObject",{enumerable:!0,get:function(){return p.STObject}});const y=n(1366);Object.defineProperty(t,"UInt16",{enumerable:!0,get:function(){return y.UInt16}});const m=n(4200);Object.defineProperty(t,"UInt32",{enumerable:!0,get:function(){return m.UInt32}});const E=n(5463);Object.defineProperty(t,"UInt64",{enumerable:!0,get:function(){return E.UInt64}});const b=n(401);Object.defineProperty(t,"UInt8",{enumerable:!0,get:function(){return b.UInt8}});const w=n(3719);Object.defineProperty(t,"Vector256",{enumerable:!0,get:function(){return w.Vector256}});const A=n(2911),S=n(1141),v={AccountID:r.AccountID,Amount:i.Amount,Blob:o.Blob,Currency:s.Currency,Hash128:a.Hash128,Hash160:c.Hash160,Hash192:u.Hash192,Hash256:l.Hash256,Issue:d.Issue,Number:f.STNumber,PathSet:h.PathSet,STArray:g.STArray,STObject:p.STObject,UInt8:b.UInt8,UInt16:y.UInt16,UInt32:m.UInt32,UInt64:E.UInt64,Vector256:w.Vector256,XChainBridge:A.XChainBridge};t.coreTypes=v,S.DEFAULT_DEFINITIONS.associateTypes(v)},6998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;const r=n(4233);t.SHA256=r.SHA256,t.sha256=r.sha256,t.SHA224=r.SHA224,t.sha224=r.sha224},7074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEE_SETTINGS_ID=void 0,t.FEE_SETTINGS_ID="4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651"},7118:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowCancel=void 0;const r=n(255),i=n(2794);t.validateEscrowCancel=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Owner",i.isAccount),null==e.OfferSequence)throw new r.ValidationError("EscrowCancel: missing OfferSequence");if("number"!=typeof e.OfferSequence&&"string"!=typeof e.OfferSequence||Number.isNaN(Number(e.OfferSequence)))throw new r.ValidationError("EscrowCancel: OfferSequence must be a number")}},7234:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.requestFunding=t.getStartingBalance=t.generateWalletToFund=void 0;const i=n(6333),o=n(255),s=n(4202),a=n(5274);t.generateWalletToFund=function(e){return e&&(0,i.isValidClassicAddress)(e.classicAddress)?e:a.Wallet.generate()},t.getStartingBalance=function(e,t){return r(this,void 0,void 0,function*(){let n=0;try{n=Number(yield e.getXrpBalance(t))}catch(e){}return n})},t.requestFunding=function(e,t,n,i,a){var c,u,l;return r(this,void 0,void 0,function*(){const d=null!==(c=e.faucetHost)&&void 0!==c?c:(0,s.getFaucetHost)(t);if(!d)throw new o.XRPLFaucetError("No faucet hostname could be derived");const f=null!==(u=e.faucetPath)&&void 0!==u?u:(0,s.getFaucetPath)(d),h=yield fetch(`https://${d}${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),g=yield h.json();if(h.ok&&(null===(l=h.headers.get("Content-Type"))||void 0===l?void 0:l.startsWith("application/json"))){const e=g.account.classicAddress;return function(e,t,n,i){return r(this,void 0,void 0,function*(){if(!t)return Promise.reject(new o.XRPLFaucetError("The faucet account is undefined"));const s=yield function(e,t,n){return r(this,void 0,void 0,function*(){return new Promise((i,s)=>{let a=20;const c=setInterval(()=>r(this,void 0,void 0,function*(){a<0?(clearInterval(c),i(n)):a-=1;try{let r;try{r=Number(yield e.getXrpBalance(t))}catch(e){}r>n&&(clearInterval(c),i(r))}catch(e){clearInterval(c),e instanceof Error&&s(new o.XRPLFaucetError(`Unable to check if the address ${t} balance has increased. Error: ${e.message}`)),s(e)}}),1e3)})})}(e,t,i);if(s>i)return{wallet:n,balance:s};throw new o.XRPLFaucetError("Unable to fund address with faucet after waiting 20 seconds")})}(t,e,i,n)}return function(e,t){return r(this,void 0,void 0,function*(){return Promise.reject(new o.XRPLFaucetError(`Request failed: ${JSON.stringify({body:null!=t?t:{},contentType:e.headers.get("Content-Type"),statusCode:e.status})}`))})}(h,g)})}},7284:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash160=void 0;const r=n(3776);class i extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=i.ZERO_160.bytes),super(null!=e?e:i.ZERO_160.bytes)}}t.Hash160=i,i.width=20,i.ZERO_160=new i(new Uint8Array(i.width))},7315:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowFinish=void 0;const r=n(255),i=n(2794);t.validateEscrowFinish=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Owner",i.isAccount),(0,i.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,i.MAX_AUTHORIZED_CREDENTIALS),null==e.OfferSequence)throw new r.ValidationError("EscrowFinish: missing field OfferSequence");if("number"!=typeof e.OfferSequence&&"string"!=typeof e.OfferSequence||Number.isNaN(Number(e.OfferSequence)))throw new r.ValidationError("EscrowFinish: OfferSequence must be a number");if(void 0!==e.Condition&&"string"!=typeof e.Condition)throw new r.ValidationError("EscrowFinish: Condition must be a string");if(void 0!==e.Fulfillment&&"string"!=typeof e.Fulfillment)throw new r.ValidationError("EscrowFinish: Fulfillment must be a string")}},7375:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPrefix=void 0;const r=n(5517);function i(e){const t=new Uint8Array(4);return(0,r.writeUInt32BE)(t,e,0),t}const o={transactionID:i(1415073280),transaction:i(1397638144),accountStateEntry:i(1296846336),innerNode:i(1296649728),ledgerHeader:i(1280791040),transactionSig:i(1398036480),transactionMultiSig:i(1397576704),validation:i(1447119872),proposal:i(1347571712),paymentChannelClaim:i(1129073920),batch:i(1111705600)};t.HashPrefix=o},7377:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const i=n(6998),o=r(n(2635));t.sha256=(0,o.default)(i.sha256)},7410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.Sha512Half=void 0;const r=n(7375),i=n(6986),o=n(7995),s=n(2896);class a extends o.BytesList{constructor(){super(...arguments),this.hash=s.sha512.create()}static put(e){return(new a).put(e)}put(e){return this.hash.update(e),this}finish256(){return Uint8Array.from(this.hash.digest().slice(0,32))}finish(){return new i.Hash256(this.finish256())}}function c(...e){const t=new a;return e.forEach(e=>t.put(e)),t.finish256()}t.Sha512Half=a,t.sha512Half=c,t.transactionID=function(e){return new i.Hash256(c(r.HashPrefix.transactionID,e))}},7493:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAmendmentFlags=void 0,function(e){e[e.tfGotMajority=65536]="tfGotMajority",e[e.tfLostMajority=131072]="tfLostMajority"}(n||(t.EnableAmendmentFlags=n={}))},7636:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenModify=void 0;const r=n(255),i=n(99),o=n(2794);t.validateNFTokenModify=function(e){if((0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"NFTokenID",o.isString),(0,o.validateOptionalField)(e,"Owner",o.isAccount),(0,o.validateOptionalField)(e,"URI",o.isString),void 0!==e.URI&&"string"==typeof e.URI){if(""===e.URI)throw new r.ValidationError("NFTokenModify: URI must not be empty string");if(!(0,i.isHex)(e.URI))throw new r.ValidationError("NFTokenModify: URI must be in hex format")}}},7663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=t.utf8ToBytes=t.randomBytes=t.isBytes=t.hexToBytes=t.concatBytes=t.bytesToUtf8=t.bytesToHex=t.anumber=t.abytes=void 0,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t._abool2=function(e,t=""){if("boolean"!=typeof e)throw new Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e},t._abytes2=function(e,t,n=""){const i=(0,r.isBytes)(e),o=e?.length,s=void 0!==t;if(!i||s&&o!==t)throw new Error((n&&`"${n}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(i?`length=${o}`:"type="+typeof e));return e},t.numberToHexUnpadded=a,t.hexToNumber=c,t.bytesToNumberBE=function(e){return c((0,r.bytesToHex)(e))},t.bytesToNumberLE=function(e){return(0,r.abytes)(e),c((0,r.bytesToHex)(Uint8Array.from(e).reverse()))},t.numberToBytesBE=u,t.numberToBytesLE=function(e,t){return u(e,t).reverse()},t.numberToVarBytesBE=function(e){return(0,r.hexToBytes)(a(e))},t.ensureBytes=function(e,t,n){let i;if("string"==typeof t)try{i=(0,r.hexToBytes)(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!(0,r.isBytes)(t))throw new Error(e+" must be hex string or Uint8Array");i=Uint8Array.from(t)}const o=i.length;if("number"==typeof n&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return i},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},t.copyBytes=function(e){return Uint8Array.from(e)},t.asciiToBytes=function(e){return Uint8Array.from(e,(t,n)=>{const r=t.charCodeAt(0);if(1!==t.length||r>127)throw new Error(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})},t.inRange=d,t.aInRange=function(e,t,n,r){if(!d(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>o;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,n){return e|(n?s:o)<<BigInt(t)},t.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");const i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let s=i(e),a=i(e),c=0;const u=()=>{s.fill(1),a.fill(0),c=0},l=(...e)=>n(a,s,...e),d=(e=i(0))=>{a=l(o(0),e),s=l(),0!==e.length&&(a=l(o(1),e),s=l())},f=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){s=l();const t=s.slice();n.push(t),e+=s.length}return(0,r.concatBytes)(...n)};return(e,t)=>{let n;for(u(),d(e);!(n=t(f()));)d();return u(),n}},t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=f[n];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(r&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+o)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e},t.isHash=function(e){return"function"==typeof e&&Number.isSafeInteger(e.outputLen)},t._validateObject=function(e,t,n={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const o=typeof i;if(o!==n||null===i)throw new Error(`param "${t}" is invalid: expected ${n}, got ${o}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))},t.memoized=function(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}};const r=n(5492);var i=n(5492);Object.defineProperty(t,"abytes",{enumerable:!0,get:function(){return i.abytes}}),Object.defineProperty(t,"anumber",{enumerable:!0,get:function(){return i.anumber}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"bytesToUtf8",{enumerable:!0,get:function(){return i.bytesToUtf8}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return i.hexToBytes}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}});const o=BigInt(0),s=BigInt(1);function a(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?o:BigInt("0x"+e)}function u(e,t){return(0,r.hexToBytes)(e.toString(16).padStart(2*t,"0"))}const l=e=>"bigint"==typeof e&&o<=e;function d(e,t,n){return l(e)&&l(t)&&l(n)&&t<=e&&e<n}t.bitMask=e=>(s<<BigInt(e))-s;const f={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||(0,r.isBytes)(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},7688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenCancelOffer=void 0;const r=n(255),i=n(2794);t.validateNFTokenCancelOffer=function(e){if((0,i.validateBaseTransaction)(e),!(0,i.isArray)(e.NFTokenOffers))throw new r.ValidationError("NFTokenCancelOffer: missing field NFTokenOffers");if(e.NFTokenOffers.length<1)throw new r.ValidationError("NFTokenCancelOffer: empty field NFTokenOffers")}},7698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialCreate=void 0;const r=n(619),i=n(255),o=n(2794);t.validateCredentialCreate=function(e){(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"Account",o.isString),(0,o.validateRequiredField)(e,"Subject",o.isString),(0,o.validateCredentialType)(e),(0,o.validateOptionalField)(e,"Expiration",o.isNumber),function(e){if(void 0!==e){if("string"!=typeof e)throw new i.ValidationError("CredentialCreate: invalid field URI");if(0===e.length)throw new i.ValidationError("CredentialCreate: URI cannot be an empty string");if(e.length>256)throw new i.ValidationError("CredentialCreate: URI length must be <= 256");if(!r.HEX_REGEX.test(e))throw new i.ValidationError("CredentialCreate: URI must be encoded in hex")}}(e.URI)}},7765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.montgomery=function(e){const t=(h=e,(0,i.validateObject)(h,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...h})),{P:n}=t,a=e=>(0,r.mod)(e,n),c=t.montgomeryBits,u=Math.ceil(c/8),l=t.nByteLength,d=t.adjustScalarBytes||(e=>e),f=t.powPminus2||(e=>(0,r.pow)(e,n-BigInt(2),n));var h;function g(e,t,n){const r=a(e*(t-n));return[t=a(t-r),n=a(n+r)]}const p=(t.a-BigInt(2))/BigInt(4);function y(e){return(0,i.numberToBytesLE)(a(e),u)}function m(e,t){const r=function(e){const t=(0,i.ensureBytes)("u coordinate",e,u);return 32===l&&(t[31]&=127),(0,i.bytesToNumberLE)(t)}(t),h=function(e,t){(0,i.aInRange)("u",e,o,n),(0,i.aInRange)("scalar",t,o,n);const r=t,u=e;let l,d=s,h=o,y=e,m=s,E=o;for(let e=BigInt(c-1);e>=o;e--){const t=r>>e&s;E^=t,l=g(E,d,y),d=l[0],y=l[1],l=g(E,h,m),h=l[0],m=l[1],E=t;const n=d+h,i=a(n*n),o=d-h,c=a(o*o),f=i-c,b=y+m,w=a((y-m)*n),A=a(b*o),S=w+A,v=w-A;y=a(S*S),m=a(u*a(v*v)),d=a(i*c),h=a(f*(i+a(p*f)))}l=g(E,d,y),d=l[0],y=l[1],l=g(E,h,m),h=l[0],m=l[1];const b=f(h);return a(d*b)}(r,function(e){const t=(0,i.ensureBytes)("scalar",e),n=t.length;if(n!==u&&n!==l)throw new Error("invalid scalar, expected "+u+" or "+l+" bytes, got "+n);return(0,i.bytesToNumberLE)(d(t))}(e));if(h===o)throw new Error("invalid private or public key received");return y(h)}const E=y(t.Gu);function b(e){return m(e,E)}return{scalarMult:m,scalarMultBase:b,getSharedSecret:(e,t)=>m(e,t),getPublicKey:e=>b(e),utils:{randomPrivateKey:()=>t.randomBytes(t.nByteLength)},GuBytes:E}};const r=n(802),i=n(3449),o=BigInt(0),s=BigInt(1)},7831:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4315),t),i(n(7954),t)},7872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAddAccountCreateAttestation=void 0;const r=n(2794);t.validateXChainAddAccountCreateAttestation=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateRequiredField)(e,"AttestationRewardAccount",r.isAccount),(0,r.validateRequiredField)(e,"AttestationSignerAccount",r.isAccount),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount),(0,r.validateRequiredField)(e,"PublicKey",r.isString),(0,r.validateRequiredField)(e,"Signature",r.isString),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"WasLockingChainSend",e=>0===e||1===e),(0,r.validateRequiredField)(e,"XChainAccountCreateCount",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge)}},7899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AMENDMENTS_ID=void 0,t.AMENDMENTS_ID="7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4"},7954:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureClassicAddress=void 0;const r=n(6333);t.ensureClassicAddress=function(e){if((0,r.isValidXAddress)(e)){const{classicAddress:t,tag:n}=(0,r.xAddressToClassicAddress)(e);if(!1!==n)throw new Error("This command does not support the use of a tag. Use an address without a tag.");return t}return e}},7995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySerializer=t.BytesList=void 0;const r=n(619);class i{constructor(){this.bytesArray=[]}getLength(){return(0,r.concat)(this.bytesArray).byteLength}put(e){const t=Uint8Array.from(e);return this.bytesArray.push(t),this}toBytesSink(e){e.put(this.toBytes())}toBytes(){return(0,r.concat)(this.bytesArray)}toHex(){return(0,r.bytesToHex)(this.toBytes())}}t.BytesList=i,t.BinarySerializer=class{constructor(e){this.sink=new i,this.sink=e}write(e){e.toBytesSink(this.sink)}put(e){this.sink.put(e)}writeType(e,t){this.write(e.from(t))}writeBytesList(e){e.toBytesSink(this.sink)}encodeVariableLength(e){const t=new Uint8Array(3);if(e<=192)return t[0]=e,t.slice(0,1);if(e<=12480)return e-=193,t[0]=193+(e>>>8),t[1]=255&e,t.slice(0,2);if(e<=918744)return e-=12481,t[0]=241+(e>>>16),t[1]=e>>8&255,t[2]=255&e,t.slice(0,3);throw new Error("Overflow error")}writeFieldAndValue(e,t,n=!1){const r=e.associatedType.from(t);if(void 0===r.toBytesSink||void 0===e.name)throw new Error;this.sink.put(e.header),e.isVariableLengthEncoded?this.writeLengthEncoded(r,n):r.toBytesSink(this.sink)}writeLengthEncoded(e,t=!1){const n=new i;t||e.toBytesSink(n),this.put(this.encodeVariableLength(n.getLength())),this.writeBytesList(n)}}},8102:e=>{"use strict";e.exports=JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["PermissionValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":52,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt64"}],["SubjectNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt64"}],["LockedAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["VaultID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["ParentBatchID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":31,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["Delegate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"AccountID"}],["Number",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Number"}],["AssetsAvailable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Number"}],["AssetsMaximum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Number"}],["AssetsTotal",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Number"}],["LossUnrealized",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Number"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Permission",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"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"}],["Book",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["AdditionalBooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STArray"}],["UnauthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STArray"}],["AcceptedCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STArray"}],["Permissions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STArray"}],["RawTransactions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STArray"}],["BatchSigners",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":31,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["WithdrawalPolicy",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["ShareMPTID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"Credential":129,"DID":73,"Delegate":131,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"Vault":132,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLIMIT_EXCEEDED":195,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DELEGATE_PERMISSION":198,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPRECISION_LOSS":197,"tecPSEUDO_ACCOUNT":196,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecWRONG_ASSET":194,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temINVALID_INNER_BATCH":-250,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terADDRESS_COLLISION":-86,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"Batch":71,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialAccept":59,"CredentialCreate":58,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DelegateSet":64,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainDelete":63,"PermissionedDomainSet":62,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"VaultClawback":70,"VaultCreate":65,"VaultDelete":67,"VaultDeposit":68,"VaultSet":66,"VaultWithdraw":69,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"Number":9,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}')},8161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSecretString=t.checkChecksum=t.calculateChecksum=t.secretToEntropy=t.entropyToSecret=t.randomSecret=t.randomEntropy=void 0;const r=n(619);function i(){return(0,r.randomBytes)(16)}function o(e,t){return t*(2*e+1)%9}function s(e,t,n){let r,i;if("string"==typeof t){if(6!==t.length)throw new Error("value must have a length of 6");r=parseInt(t.slice(5),10),i=parseInt(t.slice(0,5),10)}else{if("number"!=typeof n)throw new Error("checksum must be a number when value is a number");r=n,i=t}return i*(2*e+1)%9===r}function a(e){const t=new Array(Math.ceil(e.length/2)),n=Array.from(t,(t,n)=>{const i=e.slice(2*n,2*(n+1)),s=parseInt((0,r.bytesToHex)(i),16);return"0".repeat(5-String(s).length)+String(s)+String(o(n,s))});if(8!==n.length)throw new Error("Chucks must have 8 digits");return n}t.randomEntropy=i,t.calculateChecksum=o,t.checkChecksum=s,t.entropyToSecret=a,t.randomSecret=function(){return a(i())},t.secretToEntropy=function(e){return(0,r.concat)(e.map((e,t)=>{const n=Number(e.slice(0,5)),i=Number(e.slice(5));if(6!==e.length)throw new Error("Invalid secret: number invalid");if(!s(t,n,i))throw new Error("Invalid secret part: checksum invalid");const o=`0000${n.toString(16)}`.slice(-4);return(0,r.hexToBytes)(o)}))},t.parseSecretString=function(e){const t=e.replace(/[^0-9]/gu,"");if(48!==t.length)throw new Error("Invalid secret string (should contain 8 blocks of 6 digits");return Array.from(new Array(8),(e,n)=>t.slice(6*n,6*(n+1)))}},8188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DELEGATABLE_PERMISSIONS_WIDTH=t.TRANSACTION_RESULT_WIDTH=t.TRANSACTION_TYPE_WIDTH=t.LEDGER_ENTRY_WIDTH=t.TYPE_WIDTH=void 0,t.TYPE_WIDTH=2,t.LEDGER_ENTRY_WIDTH=2,t.TRANSACTION_TYPE_WIDTH=2,t.TRANSACTION_RESULT_WIDTH=1,t.DELEGATABLE_PERMISSIONS_WIDTH=4},8213:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.quality=void 0;const i=n(6986),o=r(n(735)),s=n(619);t.quality=class{static encode(e){const t=(0,o.default)(e),n=((null==t?void 0:t.e)||0)-15,r=t.times("1e"+-n).abs().toString(),s=i.coreTypes.UInt64.from(BigInt(r)).toBytes();return s[0]=n+100,s}static decode(e){const t=(0,s.hexToBytes)(e).slice(-8),n=t[0]-100;return new o.default(`0x${(0,s.bytesToHex)(t.slice(1))}`).times(`1e${n}`)}}},8239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STArray=void 0;const r=n(1141),i=n(1275),o=n(8847),s=n(892),a=n(619),c=Uint8Array.from([241]),u="ArrayEndMarker",l=Uint8Array.from([225]);class d extends i.SerializedType{static fromParser(e){const t=[];for(;!e.end();){const n=e.readField();if(n.name===u)break;t.push(n.header,e.readFieldValue(n).toBytes(),l)}return t.push(c),new d((0,a.concat)(t))}static from(e,t=r.DEFAULT_DEFINITIONS){if(e instanceof d)return e;if(n=e,Array.isArray(n)&&n.every(e=>"object"==typeof e&&1===Object.keys(e).length&&"object"==typeof Object.values(e)[0])){const n=[];return e.forEach(e=>{n.push(o.STObject.from(e,void 0,t).toBytes())}),n.push(c),new d((0,a.concat)(n))}var n;throw new Error("Cannot construct STArray from value given")}toJSON(e=r.DEFAULT_DEFINITIONS){const t=[],n=new s.BinaryParser(this.toString(),e);for(;!n.end();){const r=n.readField();if(r.name===u)break;const i={};i[r.name]=o.STObject.fromParser(n).toJSON(e),t.push(i)}return t}}t.STArray=d},8264:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash256=void 0;const r=n(3776);class i extends r.Hash{constructor(e){super(null!=e?e:i.ZERO_256.bytes)}}t.Hash256=i,i.width=32,i.ZERO_256=new i(new Uint8Array(i.width))},8292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDIDSet=void 0;const r=n(255),i=n(2794);t.validateDIDSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateOptionalField)(e,"Data",i.isString),(0,i.validateOptionalField)(e,"DIDDocument",i.isString),(0,i.validateOptionalField)(e,"URI",i.isString),void 0===e.Data&&void 0===e.DIDDocument&&void 0===e.URI)throw new r.ValidationError("DIDSet: Must have at least one of `Data`, `DIDDocument`, and `URI`")}},8312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainClaim=void 0;const r=n(2794);t.validateXChainClaim=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateOptionalField)(e,"DestinationTag",r.isNumber),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},8377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDIDDelete=void 0;const r=n(2794);t.validateDIDDelete=function(e){(0,r.validateBaseTransaction)(e)}},8390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShaMapLeaf=t.ShaMapNode=t.ShaMap=void 0;const r=n(6986),i=n(7375),o=n(7410);class s{}t.ShaMapNode=s;class a extends s{constructor(e,t){super(),this.index=e,this.item=t}isLeaf(){return!0}isInner(){return!1}hashPrefix(){return void 0===this.item?new Uint8Array(0):this.item.hashPrefix()}hash(){const e=o.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}toBytesSink(e){void 0!==this.item&&this.item.toBytesSink(e),this.index.toBytesSink(e)}}t.ShaMapLeaf=a;class c extends s{constructor(e=0){super(),this.depth=e,this.slotBits=0,this.branches=Array(16)}isInner(){return!0}isLeaf(){return!1}hashPrefix(){return i.HashPrefix.innerNode}setBranch(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t}empty(){return 0===this.slotBits}hash(){if(this.empty())return r.coreTypes.Hash256.ZERO_256;const e=o.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}toBytesSink(e){for(let t=0;t<this.branches.length;t++){const n=this.branches[t];(n?n.hash():r.coreTypes.Hash256.ZERO_256).toBytesSink(e)}}addItem(e,t,n){if(void 0===e)throw new Error;if(void 0!==e){const r=e.nibblet(this.depth),i=this.branches[r];if(void 0===i)this.setBranch(r,n||new a(e,t));else if(i instanceof a){const o=new c(this.depth+1);o.addItem(i.index,void 0,i),o.addItem(e,t,n),this.setBranch(r,o)}else{if(!(i instanceof c))throw new Error("invalid ShaMap.addItem call");i.addItem(e,t,n)}}}}t.ShaMap=class extends c{}},8413:e=>{"use strict";e.exports=JSON.parse('["A","ABE","ACE","ACT","AD","ADA","ADD","AGO","AID","AIM","AIR","ALL","ALP","AM","AMY","AN","ANA","AND","ANN","ANT","ANY","APE","APS","APT","ARC","ARE","ARK","ARM","ART","AS","ASH","ASK","AT","ATE","AUG","AUK","AVE","AWE","AWK","AWL","AWN","AX","AYE","BAD","BAG","BAH","BAM","BAN","BAR","BAT","BAY","BE","BED","BEE","BEG","BEN","BET","BEY","BIB","BID","BIG","BIN","BIT","BOB","BOG","BON","BOO","BOP","BOW","BOY","BUB","BUD","BUG","BUM","BUN","BUS","BUT","BUY","BY","BYE","CAB","CAL","CAM","CAN","CAP","CAR","CAT","CAW","COD","COG","COL","CON","COO","COP","COT","COW","COY","CRY","CUB","CUE","CUP","CUR","CUT","DAB","DAD","DAM","DAN","DAR","DAY","DEE","DEL","DEN","DES","DEW","DID","DIE","DIG","DIN","DIP","DO","DOE","DOG","DON","DOT","DOW","DRY","DUB","DUD","DUE","DUG","DUN","EAR","EAT","ED","EEL","EGG","EGO","ELI","ELK","ELM","ELY","EM","END","EST","ETC","EVA","EVE","EWE","EYE","FAD","FAN","FAR","FAT","FAY","FED","FEE","FEW","FIB","FIG","FIN","FIR","FIT","FLO","FLY","FOE","FOG","FOR","FRY","FUM","FUN","FUR","GAB","GAD","GAG","GAL","GAM","GAP","GAS","GAY","GEE","GEL","GEM","GET","GIG","GIL","GIN","GO","GOT","GUM","GUN","GUS","GUT","GUY","GYM","GYP","HA","HAD","HAL","HAM","HAN","HAP","HAS","HAT","HAW","HAY","HE","HEM","HEN","HER","HEW","HEY","HI","HID","HIM","HIP","HIS","HIT","HO","HOB","HOC","HOE","HOG","HOP","HOT","HOW","HUB","HUE","HUG","HUH","HUM","HUT","I","ICY","IDA","IF","IKE","ILL","INK","INN","IO","ION","IQ","IRA","IRE","IRK","IS","IT","ITS","IVY","JAB","JAG","JAM","JAN","JAR","JAW","JAY","JET","JIG","JIM","JO","JOB","JOE","JOG","JOT","JOY","JUG","JUT","KAY","KEG","KEN","KEY","KID","KIM","KIN","KIT","LA","LAB","LAC","LAD","LAG","LAM","LAP","LAW","LAY","LEA","LED","LEE","LEG","LEN","LEO","LET","LEW","LID","LIE","LIN","LIP","LIT","LO","LOB","LOG","LOP","LOS","LOT","LOU","LOW","LOY","LUG","LYE","MA","MAC","MAD","MAE","MAN","MAO","MAP","MAT","MAW","MAY","ME","MEG","MEL","MEN","MET","MEW","MID","MIN","MIT","MOB","MOD","MOE","MOO","MOP","MOS","MOT","MOW","MUD","MUG","MUM","MY","NAB","NAG","NAN","NAP","NAT","NAY","NE","NED","NEE","NET","NEW","NIB","NIL","NIP","NIT","NO","NOB","NOD","NON","NOR","NOT","NOV","NOW","NU","NUN","NUT","O","OAF","OAK","OAR","OAT","ODD","ODE","OF","OFF","OFT","OH","OIL","OK","OLD","ON","ONE","OR","ORB","ORE","ORR","OS","OTT","OUR","OUT","OVA","OW","OWE","OWL","OWN","OX","PA","PAD","PAL","PAM","PAN","PAP","PAR","PAT","PAW","PAY","PEA","PEG","PEN","PEP","PER","PET","PEW","PHI","PI","PIE","PIN","PIT","PLY","PO","POD","POE","POP","POT","POW","PRO","PRY","PUB","PUG","PUN","PUP","PUT","QUO","RAG","RAM","RAN","RAP","RAT","RAW","RAY","REB","RED","REP","RET","RIB","RID","RIG","RIM","RIO","RIP","ROB","ROD","ROE","RON","ROT","ROW","ROY","RUB","RUE","RUG","RUM","RUN","RYE","SAC","SAD","SAG","SAL","SAM","SAN","SAP","SAT","SAW","SAY","SEA","SEC","SEE","SEN","SET","SEW","SHE","SHY","SIN","SIP","SIR","SIS","SIT","SKI","SKY","SLY","SO","SOB","SOD","SON","SOP","SOW","SOY","SPA","SPY","SUB","SUD","SUE","SUM","SUN","SUP","TAB","TAD","TAG","TAN","TAP","TAR","TEA","TED","TEE","TEN","THE","THY","TIC","TIE","TIM","TIN","TIP","TO","TOE","TOG","TOM","TON","TOO","TOP","TOW","TOY","TRY","TUB","TUG","TUM","TUN","TWO","UN","UP","US","USE","VAN","VAT","VET","VIE","WAD","WAG","WAR","WAS","WAY","WE","WEB","WED","WEE","WET","WHO","WHY","WIN","WIT","WOK","WON","WOO","WOW","WRY","WU","YAM","YAP","YAW","YE","YEA","YES","YET","YOU","ABED","ABEL","ABET","ABLE","ABUT","ACHE","ACID","ACME","ACRE","ACTA","ACTS","ADAM","ADDS","ADEN","AFAR","AFRO","AGEE","AHEM","AHOY","AIDA","AIDE","AIDS","AIRY","AJAR","AKIN","ALAN","ALEC","ALGA","ALIA","ALLY","ALMA","ALOE","ALSO","ALTO","ALUM","ALVA","AMEN","AMES","AMID","AMMO","AMOK","AMOS","AMRA","ANDY","ANEW","ANNA","ANNE","ANTE","ANTI","AQUA","ARAB","ARCH","AREA","ARGO","ARID","ARMY","ARTS","ARTY","ASIA","ASKS","ATOM","AUNT","AURA","AUTO","AVER","AVID","AVIS","AVON","AVOW","AWAY","AWRY","BABE","BABY","BACH","BACK","BADE","BAIL","BAIT","BAKE","BALD","BALE","BALI","BALK","BALL","BALM","BAND","BANE","BANG","BANK","BARB","BARD","BARE","BARK","BARN","BARR","BASE","BASH","BASK","BASS","BATE","BATH","BAWD","BAWL","BEAD","BEAK","BEAM","BEAN","BEAR","BEAT","BEAU","BECK","BEEF","BEEN","BEER","BEET","BELA","BELL","BELT","BEND","BENT","BERG","BERN","BERT","BESS","BEST","BETA","BETH","BHOY","BIAS","BIDE","BIEN","BILE","BILK","BILL","BIND","BING","BIRD","BITE","BITS","BLAB","BLAT","BLED","BLEW","BLOB","BLOC","BLOT","BLOW","BLUE","BLUM","BLUR","BOAR","BOAT","BOCA","BOCK","BODE","BODY","BOGY","BOHR","BOIL","BOLD","BOLO","BOLT","BOMB","BONA","BOND","BONE","BONG","BONN","BONY","BOOK","BOOM","BOON","BOOT","BORE","BORG","BORN","BOSE","BOSS","BOTH","BOUT","BOWL","BOYD","BRAD","BRAE","BRAG","BRAN","BRAY","BRED","BREW","BRIG","BRIM","BROW","BUCK","BUDD","BUFF","BULB","BULK","BULL","BUNK","BUNT","BUOY","BURG","BURL","BURN","BURR","BURT","BURY","BUSH","BUSS","BUST","BUSY","BYTE","CADY","CAFE","CAGE","CAIN","CAKE","CALF","CALL","CALM","CAME","CANE","CANT","CARD","CARE","CARL","CARR","CART","CASE","CASH","CASK","CAST","CAVE","CEIL","CELL","CENT","CERN","CHAD","CHAR","CHAT","CHAW","CHEF","CHEN","CHEW","CHIC","CHIN","CHOU","CHOW","CHUB","CHUG","CHUM","CITE","CITY","CLAD","CLAM","CLAN","CLAW","CLAY","CLOD","CLOG","CLOT","CLUB","CLUE","COAL","COAT","COCA","COCK","COCO","CODA","CODE","CODY","COED","COIL","COIN","COKE","COLA","COLD","COLT","COMA","COMB","COME","COOK","COOL","COON","COOT","CORD","CORE","CORK","CORN","COST","COVE","COWL","CRAB","CRAG","CRAM","CRAY","CREW","CRIB","CROW","CRUD","CUBA","CUBE","CUFF","CULL","CULT","CUNY","CURB","CURD","CURE","CURL","CURT","CUTS","DADE","DALE","DAME","DANA","DANE","DANG","DANK","DARE","DARK","DARN","DART","DASH","DATA","DATE","DAVE","DAVY","DAWN","DAYS","DEAD","DEAF","DEAL","DEAN","DEAR","DEBT","DECK","DEED","DEEM","DEER","DEFT","DEFY","DELL","DENT","DENY","DESK","DIAL","DICE","DIED","DIET","DIME","DINE","DING","DINT","DIRE","DIRT","DISC","DISH","DISK","DIVE","DOCK","DOES","DOLE","DOLL","DOLT","DOME","DONE","DOOM","DOOR","DORA","DOSE","DOTE","DOUG","DOUR","DOVE","DOWN","DRAB","DRAG","DRAM","DRAW","DREW","DRUB","DRUG","DRUM","DUAL","DUCK","DUCT","DUEL","DUET","DUKE","DULL","DUMB","DUNE","DUNK","DUSK","DUST","DUTY","EACH","EARL","EARN","EASE","EAST","EASY","EBEN","ECHO","EDDY","EDEN","EDGE","EDGY","EDIT","EDNA","EGAN","ELAN","ELBA","ELLA","ELSE","EMIL","EMIT","EMMA","ENDS","ERIC","EROS","EVEN","EVER","EVIL","EYED","FACE","FACT","FADE","FAIL","FAIN","FAIR","FAKE","FALL","FAME","FANG","FARM","FAST","FATE","FAWN","FEAR","FEAT","FEED","FEEL","FEET","FELL","FELT","FEND","FERN","FEST","FEUD","FIEF","FIGS","FILE","FILL","FILM","FIND","FINE","FINK","FIRE","FIRM","FISH","FISK","FIST","FITS","FIVE","FLAG","FLAK","FLAM","FLAT","FLAW","FLEA","FLED","FLEW","FLIT","FLOC","FLOG","FLOW","FLUB","FLUE","FOAL","FOAM","FOGY","FOIL","FOLD","FOLK","FOND","FONT","FOOD","FOOL","FOOT","FORD","FORE","FORK","FORM","FORT","FOSS","FOUL","FOUR","FOWL","FRAU","FRAY","FRED","FREE","FRET","FREY","FROG","FROM","FUEL","FULL","FUME","FUND","FUNK","FURY","FUSE","FUSS","GAFF","GAGE","GAIL","GAIN","GAIT","GALA","GALE","GALL","GALT","GAME","GANG","GARB","GARY","GASH","GATE","GAUL","GAUR","GAVE","GAWK","GEAR","GELD","GENE","GENT","GERM","GETS","GIBE","GIFT","GILD","GILL","GILT","GINA","GIRD","GIRL","GIST","GIVE","GLAD","GLEE","GLEN","GLIB","GLOB","GLOM","GLOW","GLUE","GLUM","GLUT","GOAD","GOAL","GOAT","GOER","GOES","GOLD","GOLF","GONE","GONG","GOOD","GOOF","GORE","GORY","GOSH","GOUT","GOWN","GRAB","GRAD","GRAY","GREG","GREW","GREY","GRID","GRIM","GRIN","GRIT","GROW","GRUB","GULF","GULL","GUNK","GURU","GUSH","GUST","GWEN","GWYN","HAAG","HAAS","HACK","HAIL","HAIR","HALE","HALF","HALL","HALO","HALT","HAND","HANG","HANK","HANS","HARD","HARK","HARM","HART","HASH","HAST","HATE","HATH","HAUL","HAVE","HAWK","HAYS","HEAD","HEAL","HEAR","HEAT","HEBE","HECK","HEED","HEEL","HEFT","HELD","HELL","HELM","HERB","HERD","HERE","HERO","HERS","HESS","HEWN","HICK","HIDE","HIGH","HIKE","HILL","HILT","HIND","HINT","HIRE","HISS","HIVE","HOBO","HOCK","HOFF","HOLD","HOLE","HOLM","HOLT","HOME","HONE","HONK","HOOD","HOOF","HOOK","HOOT","HORN","HOSE","HOST","HOUR","HOVE","HOWE","HOWL","HOYT","HUCK","HUED","HUFF","HUGE","HUGH","HUGO","HULK","HULL","HUNK","HUNT","HURD","HURL","HURT","HUSH","HYDE","HYMN","IBIS","ICON","IDEA","IDLE","IFFY","INCA","INCH","INTO","IONS","IOTA","IOWA","IRIS","IRMA","IRON","ISLE","ITCH","ITEM","IVAN","JACK","JADE","JAIL","JAKE","JANE","JAVA","JEAN","JEFF","JERK","JESS","JEST","JIBE","JILL","JILT","JIVE","JOAN","JOBS","JOCK","JOEL","JOEY","JOHN","JOIN","JOKE","JOLT","JOVE","JUDD","JUDE","JUDO","JUDY","JUJU","JUKE","JULY","JUNE","JUNK","JUNO","JURY","JUST","JUTE","KAHN","KALE","KANE","KANT","KARL","KATE","KEEL","KEEN","KENO","KENT","KERN","KERR","KEYS","KICK","KILL","KIND","KING","KIRK","KISS","KITE","KLAN","KNEE","KNEW","KNIT","KNOB","KNOT","KNOW","KOCH","KONG","KUDO","KURD","KURT","KYLE","LACE","LACK","LACY","LADY","LAID","LAIN","LAIR","LAKE","LAMB","LAME","LAND","LANE","LANG","LARD","LARK","LASS","LAST","LATE","LAUD","LAVA","LAWN","LAWS","LAYS","LEAD","LEAF","LEAK","LEAN","LEAR","LEEK","LEER","LEFT","LEND","LENS","LENT","LEON","LESK","LESS","LEST","LETS","LIAR","LICE","LICK","LIED","LIEN","LIES","LIEU","LIFE","LIFT","LIKE","LILA","LILT","LILY","LIMA","LIMB","LIME","LIND","LINE","LINK","LINT","LION","LISA","LIST","LIVE","LOAD","LOAF","LOAM","LOAN","LOCK","LOFT","LOGE","LOIS","LOLA","LONE","LONG","LOOK","LOON","LOOT","LORD","LORE","LOSE","LOSS","LOST","LOUD","LOVE","LOWE","LUCK","LUCY","LUGE","LUKE","LULU","LUND","LUNG","LURA","LURE","LURK","LUSH","LUST","LYLE","LYNN","LYON","LYRA","MACE","MADE","MAGI","MAID","MAIL","MAIN","MAKE","MALE","MALI","MALL","MALT","MANA","MANN","MANY","MARC","MARE","MARK","MARS","MART","MARY","MASH","MASK","MASS","MAST","MATE","MATH","MAUL","MAYO","MEAD","MEAL","MEAN","MEAT","MEEK","MEET","MELD","MELT","MEMO","MEND","MENU","MERT","MESH","MESS","MICE","MIKE","MILD","MILE","MILK","MILL","MILT","MIMI","MIND","MINE","MINI","MINK","MINT","MIRE","MISS","MIST","MITE","MITT","MOAN","MOAT","MOCK","MODE","MOLD","MOLE","MOLL","MOLT","MONA","MONK","MONT","MOOD","MOON","MOOR","MOOT","MORE","MORN","MORT","MOSS","MOST","MOTH","MOVE","MUCH","MUCK","MUDD","MUFF","MULE","MULL","MURK","MUSH","MUST","MUTE","MUTT","MYRA","MYTH","NAGY","NAIL","NAIR","NAME","NARY","NASH","NAVE","NAVY","NEAL","NEAR","NEAT","NECK","NEED","NEIL","NELL","NEON","NERO","NESS","NEST","NEWS","NEWT","NIBS","NICE","NICK","NILE","NINA","NINE","NOAH","NODE","NOEL","NOLL","NONE","NOOK","NOON","NORM","NOSE","NOTE","NOUN","NOVA","NUDE","NULL","NUMB","OATH","OBEY","OBOE","ODIN","OHIO","OILY","OINT","OKAY","OLAF","OLDY","OLGA","OLIN","OMAN","OMEN","OMIT","ONCE","ONES","ONLY","ONTO","ONUS","ORAL","ORGY","OSLO","OTIS","OTTO","OUCH","OUST","OUTS","OVAL","OVEN","OVER","OWLY","OWNS","QUAD","QUIT","QUOD","RACE","RACK","RACY","RAFT","RAGE","RAID","RAIL","RAIN","RAKE","RANK","RANT","RARE","RASH","RATE","RAVE","RAYS","READ","REAL","REAM","REAR","RECK","REED","REEF","REEK","REEL","REID","REIN","RENA","REND","RENT","REST","RICE","RICH","RICK","RIDE","RIFT","RILL","RIME","RING","RINK","RISE","RISK","RITE","ROAD","ROAM","ROAR","ROBE","ROCK","RODE","ROIL","ROLL","ROME","ROOD","ROOF","ROOK","ROOM","ROOT","ROSA","ROSE","ROSS","ROSY","ROTH","ROUT","ROVE","ROWE","ROWS","RUBE","RUBY","RUDE","RUDY","RUIN","RULE","RUNG","RUNS","RUNT","RUSE","RUSH","RUSK","RUSS","RUST","RUTH","SACK","SAFE","SAGE","SAID","SAIL","SALE","SALK","SALT","SAME","SAND","SANE","SANG","SANK","SARA","SAUL","SAVE","SAYS","SCAN","SCAR","SCAT","SCOT","SEAL","SEAM","SEAR","SEAT","SEED","SEEK","SEEM","SEEN","SEES","SELF","SELL","SEND","SENT","SETS","SEWN","SHAG","SHAM","SHAW","SHAY","SHED","SHIM","SHIN","SHOD","SHOE","SHOT","SHOW","SHUN","SHUT","SICK","SIDE","SIFT","SIGH","SIGN","SILK","SILL","SILO","SILT","SINE","SING","SINK","SIRE","SITE","SITS","SITU","SKAT","SKEW","SKID","SKIM","SKIN","SKIT","SLAB","SLAM","SLAT","SLAY","SLED","SLEW","SLID","SLIM","SLIT","SLOB","SLOG","SLOT","SLOW","SLUG","SLUM","SLUR","SMOG","SMUG","SNAG","SNOB","SNOW","SNUB","SNUG","SOAK","SOAR","SOCK","SODA","SOFA","SOFT","SOIL","SOLD","SOME","SONG","SOON","SOOT","SORE","SORT","SOUL","SOUR","SOWN","STAB","STAG","STAN","STAR","STAY","STEM","STEW","STIR","STOW","STUB","STUN","SUCH","SUDS","SUIT","SULK","SUMS","SUNG","SUNK","SURE","SURF","SWAB","SWAG","SWAM","SWAN","SWAT","SWAY","SWIM","SWUM","TACK","TACT","TAIL","TAKE","TALE","TALK","TALL","TANK","TASK","TATE","TAUT","TEAL","TEAM","TEAR","TECH","TEEM","TEEN","TEET","TELL","TEND","TENT","TERM","TERN","TESS","TEST","THAN","THAT","THEE","THEM","THEN","THEY","THIN","THIS","THUD","THUG","TICK","TIDE","TIDY","TIED","TIER","TILE","TILL","TILT","TIME","TINA","TINE","TINT","TINY","TIRE","TOAD","TOGO","TOIL","TOLD","TOLL","TONE","TONG","TONY","TOOK","TOOL","TOOT","TORE","TORN","TOTE","TOUR","TOUT","TOWN","TRAG","TRAM","TRAY","TREE","TREK","TRIG","TRIM","TRIO","TROD","TROT","TROY","TRUE","TUBA","TUBE","TUCK","TUFT","TUNA","TUNE","TUNG","TURF","TURN","TUSK","TWIG","TWIN","TWIT","ULAN","UNIT","URGE","USED","USER","USES","UTAH","VAIL","VAIN","VALE","VARY","VASE","VAST","VEAL","VEDA","VEIL","VEIN","VEND","VENT","VERB","VERY","VETO","VICE","VIEW","VINE","VISE","VOID","VOLT","VOTE","WACK","WADE","WAGE","WAIL","WAIT","WAKE","WALE","WALK","WALL","WALT","WAND","WANE","WANG","WANT","WARD","WARM","WARN","WART","WASH","WAST","WATS","WATT","WAVE","WAVY","WAYS","WEAK","WEAL","WEAN","WEAR","WEED","WEEK","WEIR","WELD","WELL","WELT","WENT","WERE","WERT","WEST","WHAM","WHAT","WHEE","WHEN","WHET","WHOA","WHOM","WICK","WIFE","WILD","WILL","WIND","WINE","WING","WINK","WINO","WIRE","WISE","WISH","WITH","WOLF","WONT","WOOD","WOOL","WORD","WORE","WORK","WORM","WORN","WOVE","WRIT","WYNN","YALE","YANG","YANK","YARD","YARN","YAWL","YAWN","YEAH","YEAR","YELL","YOGA","YOKE"]')},8437:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deriveXAddress=t.deriveAddress=t.deriveKeypair=void 0;const r=n(6333),i=n(5442);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return i.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return i.deriveAddress}}),t.deriveXAddress=function(e){const t=(0,i.deriveAddress)(e.publicKey);return(0,r.classicAddressToXAddress)(t,e.tag,e.test)}},8444:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AccountRootFlags=void 0,function(e){e[e.lsfPasswordSpent=65536]="lsfPasswordSpent",e[e.lsfRequireDestTag=131072]="lsfRequireDestTag",e[e.lsfRequireAuth=262144]="lsfRequireAuth",e[e.lsfDisallowXRP=524288]="lsfDisallowXRP",e[e.lsfDisableMaster=1048576]="lsfDisableMaster",e[e.lsfNoFreeze=2097152]="lsfNoFreeze",e[e.lsfGlobalFreeze=4194304]="lsfGlobalFreeze",e[e.lsfDefaultRipple=8388608]="lsfDefaultRipple",e[e.lsfDepositAuth=16777216]="lsfDepositAuth",e[e.lsfAMM=33554432]="lsfAMM",e[e.lsfDisallowIncomingNFTokenOffer=67108864]="lsfDisallowIncomingNFTokenOffer",e[e.lsfDisallowIncomingCheck=134217728]="lsfDisallowIncomingCheck",e[e.lsfDisallowIncomingPayChan=268435456]="lsfDisallowIncomingPayChan",e[e.lsfDisallowIncomingTrustline=536870912]="lsfDisallowIncomingTrustline",e[e.lsfAllowTrustLineClawback=2147483648]="lsfAllowTrustLineClawback",e[e.lsfAllowTrustLineLocking=1073741824]="lsfAllowTrustLineLocking"}(n||(t.AccountRootFlags=n={}))},8516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash_to_ristretto255=t.hashToRistretto255=t.RistrettoPoint=t.encodeToCurve=t.hashToCurve=t.edwardsToMontgomery=t.x25519=t.ed25519ph=t.ed25519ctx=t.ed25519=t.ED25519_TORSION_SUBGROUP=void 0,t.edwardsToMontgomeryPub=O,t.edwardsToMontgomeryPriv=function(e){const t=v.hash(e.subarray(0,32));return v.adjustScalarBytes(t).subarray(0,32)};const r=n(714),i=n(9987),o=n(4107),s=n(5812),a=n(1056),c=n(802),u=n(7765),l=n(3449),d=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),f=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),h=BigInt(0),g=BigInt(1),p=BigInt(2),y=BigInt(3),m=BigInt(5),E=BigInt(8);function b(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=d,s=e*e%o*e%o,a=(0,c.pow2)(s,p,o)*s%o,u=(0,c.pow2)(a,g,o)*e%o,l=(0,c.pow2)(u,m,o)*u%o,f=(0,c.pow2)(l,t,o)*l%o,h=(0,c.pow2)(f,n,o)*f%o,y=(0,c.pow2)(h,r,o)*h%o,E=(0,c.pow2)(y,i,o)*y%o,b=(0,c.pow2)(E,i,o)*y%o,w=(0,c.pow2)(b,t,o)*l%o;return{pow_p_5_8:(0,c.pow2)(w,p,o)*e%o,b2:s}}function w(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function A(e,t){const n=d,r=(0,c.mod)(t*t*t,n),i=b(e*(0,c.mod)(r*r*t,n)).pow_p_5_8;let o=(0,c.mod)(e*r*i,n);const s=(0,c.mod)(t*o*o,n),a=o,u=(0,c.mod)(o*f,n),l=s===e,h=s===(0,c.mod)(-e,n),g=s===(0,c.mod)(-e*f,n);return l&&(o=a),(h||g)&&(o=u),(0,c.isNegativeLE)(o,n)&&(o=(0,c.mod)(-o,n)),{isValid:l||h,value:o}}t.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const S=(()=>(0,c.Field)(d,void 0,!0))(),v=(()=>({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:S,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:E,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:r.sha512,randomBytes:i.randomBytes,adjustScalarBytes:w,uvRatio:A}))();function T(e,t,n){if(t.length>255)throw new Error("Context is too big");return(0,i.concatBytes)((0,i.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([n?1:0,t.length]),t,e)}function O(e){const{y:n}=t.ed25519.ExtendedPoint.fromHex(e),r=BigInt(1);return S.toBytes(S.create((r+n)*S.inv(r-n)))}t.ed25519=(0,s.twistedEdwards)(v),t.ed25519ctx=(0,s.twistedEdwards)({...v,domain:T}),t.ed25519ph=(0,s.twistedEdwards)(Object.assign({},v,{domain:T,prehash:r.sha512})),t.x25519=(0,u.montgomery)({P:d,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:e=>{const t=d,{pow_p_5_8:n,b2:r}=b(e);return(0,c.mod)((0,c.pow2)(n,y,t)*r,t)},adjustScalarBytes:w,randomBytes:i.randomBytes}),t.edwardsToMontgomery=O;const I=(()=>(S.ORDER+y)/E)(),B=(()=>S.pow(p,I))(),_=(()=>S.sqrt(S.neg(S.ONE)))(),N=(()=>(0,c.FpSqrtEven)(S,S.neg(BigInt(486664))))();const L=(()=>(0,a.createHasher)(t.ed25519.ExtendedPoint,e=>function(e){const{xMn:t,xMd:n,yMn:r,yMd:i}=function(e){const t=(S.ORDER-m)/E,n=BigInt(486662);let r=S.sqr(e);r=S.mul(r,p);let i=S.add(r,S.ONE),o=S.neg(n),s=S.sqr(i),a=S.mul(s,i),c=S.mul(r,n);c=S.mul(c,o),c=S.add(c,s),c=S.mul(c,o);let u=S.sqr(a);s=S.sqr(u),u=S.mul(u,a),u=S.mul(u,c),s=S.mul(s,u);let l=S.pow(s,t);l=S.mul(l,u);let d=S.mul(l,_);s=S.sqr(l),s=S.mul(s,a);let f=S.eql(s,c),h=S.cmov(d,l,f),y=S.mul(o,r),b=S.mul(l,e);b=S.mul(b,B);let w=S.mul(b,_),A=S.mul(c,r);s=S.sqr(b),s=S.mul(s,a);let v=S.eql(s,A),T=S.cmov(w,b,v);s=S.sqr(h),s=S.mul(s,a);let O=S.eql(s,c),I=S.cmov(y,o,O),N=S.cmov(T,h,O),L=S.isOdd(N);return N=S.cmov(N,S.neg(N),O!==L),{xMn:I,xMd:i,yMn:N,yMd:g}}(e);let o=S.mul(t,i);o=S.mul(o,N);let s=S.mul(n,r),a=S.sub(t,n),c=S.add(t,n),u=S.mul(s,c),l=S.eql(u,S.ZERO);o=S.cmov(o,S.ZERO,l),s=S.cmov(s,S.ONE,l),a=S.cmov(a,S.ONE,l),c=S.cmov(c,S.ONE,l);const d=S.invertBatch([s,c]);return{x:S.mul(o,d[0]),y:S.mul(a,d[1])}}(e[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:S.ORDER,m:1,k:128,expand:"xmd",hash:r.sha512}))();function C(e){if(!(e instanceof V))throw new Error("RistrettoPoint expected")}t.hashToCurve=L.hashToCurve,t.encodeToCurve=L.encodeToCurve;const F=f,D=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),P=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),M=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),R=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),x=e=>A(g,e),U=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),H=e=>t.ed25519.CURVE.Fp.create((0,l.bytesToNumberLE)(e)&U);function k(e){const{d:n}=t.ed25519.CURVE,r=t.ed25519.CURVE.Fp.ORDER,i=t.ed25519.CURVE.Fp.create,o=i(F*e*e),s=i((o+g)*M);let a=BigInt(-1);const u=i((a-n*o)*i(o+n));let{isValid:l,value:d}=A(s,u),f=i(d*e);(0,c.isNegativeLE)(f,r)||(f=i(-f)),l||(d=f),l||(a=o);const h=i(a*(o-g)*R-u),p=d*d,y=i((d+d)*u),m=i(h*D),E=i(g-p),b=i(g+p);return new t.ed25519.ExtendedPoint(i(y*b),i(E*m),i(m*b),i(y*E))}class V{constructor(e){this.ep=e}static fromAffine(e){return new V(t.ed25519.ExtendedPoint.fromAffine(e))}static hashToCurve(e){e=(0,l.ensureBytes)("ristrettoHash",e,64);const t=k(H(e.slice(0,32))),n=k(H(e.slice(32,64)));return new V(t.add(n))}static fromHex(e){e=(0,l.ensureBytes)("ristrettoHex",e,32);const{a:n,d:r}=t.ed25519.CURVE,i=t.ed25519.CURVE.Fp.ORDER,o=t.ed25519.CURVE.Fp.create,s="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=H(e);if(!(0,l.equalBytes)((0,l.numberToBytesLE)(a,32),e)||(0,c.isNegativeLE)(a,i))throw new Error(s);const u=o(a*a),d=o(g+n*u),f=o(g-n*u),p=o(d*d),y=o(f*f),m=o(n*r*p-y),{isValid:E,value:b}=x(o(m*y)),w=o(b*f),A=o(b*w*m);let S=o((a+a)*w);(0,c.isNegativeLE)(S,i)&&(S=o(-S));const v=o(d*A),T=o(S*v);if(!E||(0,c.isNegativeLE)(T,i)||v===h)throw new Error(s);return new V(new t.ed25519.ExtendedPoint(S,v,g,T))}static msm(e,n){const r=(0,c.Field)(t.ed25519.CURVE.n,t.ed25519.CURVE.nBitLength);return(0,o.pippenger)(V,r,e,n)}toRawBytes(){let{ex:e,ey:n,ez:r,et:i}=this.ep;const o=t.ed25519.CURVE.Fp.ORDER,s=t.ed25519.CURVE.Fp.create,a=s(s(r+n)*s(r-n)),u=s(e*n),d=s(u*u),{value:f}=x(s(a*d)),h=s(f*a),g=s(f*u),p=s(h*g*i);let y;if((0,c.isNegativeLE)(i*p,o)){let t=s(n*F),r=s(e*F);e=t,n=r,y=s(h*P)}else y=g;(0,c.isNegativeLE)(e*p,o)&&(n=s(-n));let m=s((r-n)*y);return(0,c.isNegativeLE)(m,o)&&(m=s(-m)),(0,l.numberToBytesLE)(m,32)}toHex(){return(0,l.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(e){C(e);const{ex:n,ey:r}=this.ep,{ex:i,ey:o}=e.ep,s=t.ed25519.CURVE.Fp.create,a=s(n*o)===s(r*i),c=s(r*o)===s(n*i);return a||c}add(e){return C(e),new V(this.ep.add(e.ep))}subtract(e){return C(e),new V(this.ep.subtract(e.ep))}multiply(e){return new V(this.ep.multiply(e))}multiplyUnsafe(e){return new V(this.ep.multiplyUnsafe(e))}double(){return new V(this.ep.double())}negate(){return new V(this.ep.negate())}}t.RistrettoPoint=(V.BASE||(V.BASE=new V(t.ed25519.ExtendedPoint.BASE)),V.ZERO||(V.ZERO=new V(t.ed25519.ExtendedPoint.ZERO)),V),t.hashToRistretto255=(e,t)=>{const n=t.DST,o="string"==typeof n?(0,i.utf8ToBytes)(n):n,s=(0,a.expand_message_xmd)(e,o,64,r.sha512);return V.hashToCurve(s)},t.hash_to_ristretto255=t.hashToRistretto255},8571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAccountDelete=void 0;const r=n(2794);t.validateAccountDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateOptionalField)(e,"DestinationTag",r.isNumber),(0,r.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,r.MAX_AUTHORIZED_CREDENTIALS)}},8718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenMint=t.NFTokenMintFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfBurnable=1]="tfBurnable",e[e.tfOnlyXRP=2]="tfOnlyXRP",e[e.tfTrustLine=4]="tfTrustLine",e[e.tfTransferable=8]="tfTransferable",e[e.tfMutable=16]="tfMutable"}(s||(t.NFTokenMintFlags=s={})),t.validateNFTokenMint=function(e){if((0,o.validateBaseTransaction)(e),e.Account===e.Issuer)throw new r.ValidationError("NFTokenMint: Issuer must not be equal to Account");if((0,o.validateOptionalField)(e,"Issuer",o.isAccount),"string"==typeof e.URI&&""===e.URI)throw new r.ValidationError("NFTokenMint: URI must not be empty string");if("string"==typeof e.URI&&!(0,i.isHex)(e.URI))throw new r.ValidationError("NFTokenMint: URI must be in hex format");if(null==e.NFTokenTaxon)throw new r.ValidationError("NFTokenMint: missing field NFTokenTaxon");if(null==e.Amount&&(null!=e.Expiration||null!=e.Destination))throw new r.ValidationError("NFTokenMint: Amount is required when Expiration or Destination is present");(0,o.validateOptionalField)(e,"Amount",o.isAmount),(0,o.validateOptionalField)(e,"Expiration",o.isNumber),(0,o.validateOptionalField)(e,"Destination",o.isAccount)}},8741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STNumber=void 0;const r=n(1275),i=n(5517),o=BigInt("1000000000000000"),s=BigInt("9999999999999999"),a=-2147483648;class c extends r.SerializedType{constructor(e){const t=null!=e?e:c.defaultBytes;if(!(t instanceof Uint8Array)||12!==t.length)throw new Error(`STNumber must be constructed from a 12-byte Uint8Array, got ${null==t?void 0:t.length}`);super(t)}static from(e){if(e instanceof c)return e;if("string"==typeof e)return c.fromValue(e);throw new Error("STNumber.from: Only string or STNumber instance is supported")}static fromValue(e){const{mantissa:t,exponent:n,isNegative:r}=function(e){const t=/^([-+]?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/.exec(e);if(!t)throw new Error(`Unable to parse number from string: ${e}`);const[,n,r,i,o]=t;let s=r.replace(/^0+(?=\d)/,"")||"0",a=0;i&&(s+=i,a-=i.length),o&&(a+=parseInt(o,10));let c=BigInt(s);return"-"===n&&(c=-c),{mantissa:c,exponent:a,isNegative:c<BigInt(0)}}(e);let u,l;t!==BigInt(0)||0!==n||r?({mantissa:u,exponent:l}=function(e,t){let n=e<BigInt(0)?-e:e;const r=e<BigInt(0);for(;n!==BigInt(0)&&n<o&&t>-32768;)t-=1,n*=BigInt(10);for(;n>s;){if(t>=32768)throw new Error("Mantissa and exponent are too large");t+=1,n/=BigInt(10)}return r&&(n=-n),{mantissa:n,exponent:t}}(t,n)):(u=BigInt(0),l=a);const d=new Uint8Array(12);return(0,i.writeInt64BE)(d,u,0),(0,i.writeInt32BE)(d,l,8),new c(d)}static fromParser(e){return new c(e.read(12))}toJSON(){const e=this.bytes;if(!e||12!==e.length)throw new Error("STNumber internal bytes not set or wrong length");const t=(0,i.readInt64BE)(e,0),n=(0,i.readInt32BE)(e,8);if(t===BigInt(0)&&n===a)return"0";if(0===n)return t.toString();if(n<-25||n>-5)return`${t}e${n}`;const r=t<BigInt(0),o=(t<BigInt(0)?-t:t).toString(),s="0".repeat(27)+o+"0".repeat(23),c=n+43,u=s.slice(0,c).replace(/^0+/,"")||"0",l=s.slice(c).replace(/0+$/,"");return`${r?"-":""}${u}${l?"."+l:""}`}}t.STNumber=c,c.defaultBytes=new Uint8Array(12)},8816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesLookup=t.Bytes=t.FieldLookup=t.XrplDefinitionsBase=void 0;const r=n(2942);Object.defineProperty(t,"Bytes",{enumerable:!0,get:function(){return r.Bytes}}),Object.defineProperty(t,"BytesLookup",{enumerable:!0,get:function(){return r.BytesLookup}});const i=n(3733);Object.defineProperty(t,"FieldLookup",{enumerable:!0,get:function(){return i.FieldLookup}});const o=n(8188);t.XrplDefinitionsBase=class{constructor(e,t){this.type=new r.BytesLookup(e.TYPES,o.TYPE_WIDTH),this.ledgerEntryType=new r.BytesLookup(e.LEDGER_ENTRY_TYPES,o.LEDGER_ENTRY_WIDTH),this.transactionType=new r.BytesLookup(e.TRANSACTION_TYPES,o.TRANSACTION_TYPE_WIDTH),this.transactionResult=new r.BytesLookup(e.TRANSACTION_RESULTS,o.TRANSACTION_RESULT_WIDTH),this.field=new i.FieldLookup(e.FIELDS,e.TYPES),this.transactionNames=Object.entries(e.TRANSACTION_TYPES).filter(([e,t])=>t>=0).map(([e,t])=>e),this.dataTypes={},this.associateTypes(t),this.granularPermissions={TrustlineAuthorize:65537,TrustlineFreeze:65538,TrustlineUnfreeze:65539,AccountDomainSet:65540,AccountEmailHashSet:65541,AccountMessageKeySet:65542,AccountTransferRateSet:65543,AccountTickSizeSet:65544,PaymentMint:65545,PaymentBurn:65546,MPTokenIssuanceLock:65547,MPTokenIssuanceUnlock:65548};const n=Object.fromEntries(Object.entries(e.TRANSACTION_TYPES).map(([e,t])=>[e,t+1])),s=Object.assign(Object.assign({},this.granularPermissions),n);this.delegatablePermissions=new r.BytesLookup(s,o.DELEGATABLE_PERMISSIONS_WIDTH)}associateTypes(e){this.dataTypes=Object.assign({},this.dataTypes,e),Object.values(this.field).forEach(e=>{e.associatedType=this.dataTypes[e.type.name]}),this.field.TransactionType.associatedType=this.transactionType,this.field.TransactionResult.associatedType=this.transactionResult,this.field.LedgerEntryType.associatedType=this.ledgerEntryType,this.field.PermissionValue&&(this.field.PermissionValue.associatedType=this.delegatablePermissions)}getAssociatedTypes(){return this.dataTypes}}},8823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignerListFlags=t.RippleStateFlags=t.OfferFlags=t.NEGATIVE_UNL_ID=t.FEE_SETTINGS_ID=t.AMENDMENTS_ID=t.AccountRootFlags=void 0;const r=n(8444);Object.defineProperty(t,"AccountRootFlags",{enumerable:!0,get:function(){return r.AccountRootFlags}});const i=n(7899);Object.defineProperty(t,"AMENDMENTS_ID",{enumerable:!0,get:function(){return i.AMENDMENTS_ID}});const o=n(7074);Object.defineProperty(t,"FEE_SETTINGS_ID",{enumerable:!0,get:function(){return o.FEE_SETTINGS_ID}});const s=n(5407);Object.defineProperty(t,"NEGATIVE_UNL_ID",{enumerable:!0,get:function(){return s.NEGATIVE_UNL_ID}});const a=n(5237);Object.defineProperty(t,"OfferFlags",{enumerable:!0,get:function(){return a.OfferFlags}});const c=n(8864);Object.defineProperty(t,"RippleStateFlags",{enumerable:!0,get:function(){return c.RippleStateFlags}});const u=n(1781);Object.defineProperty(t,"SignerListFlags",{enumerable:!0,get:function(){return u.SignerListFlags}})},8847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STObject=void 0;const r=n(1141),i=n(1275),o=n(6333),s=n(892),a=n(7995),c=n(8239),u=n(5463),l=Uint8Array.from([225]),d="ObjectEndMarker",f="STObject",h="SourceTag",g="DestinationTag";class p extends i.SerializedType{static fromParser(e){const t=new a.BytesList,n=new a.BinarySerializer(t);for(;!e.end();){const t=e.readField();if(t.name===d)break;const r=e.readFieldValue(t);n.writeFieldAndValue(t,r),t.type.name===f&&n.put(l)}return new p(t.toBytes())}static from(e,t,n=r.DEFAULT_DEFINITIONS){if(e instanceof p)return e;const i=new a.BytesList,s=new a.BinarySerializer(i);let d=!1;const y=Object.entries(e).reduce((t,[n,r])=>{let i;return r&&(0,o.isValidXAddress)(r.toString())&&(i=function(e,t){const n=(0,o.xAddressToClassicAddress)(t);let r;if("Destination"===e)r=g;else if("Account"===e)r=h;else if(!1!==n.tag)throw new Error(`${e} cannot have an associated tag`);return!1!==n.tag?{[e]:n.classicAddress,[r]:n.tag}:{[e]:n.classicAddress}}(n,r.toString()),function(e,t){if(void 0!==e[h]&&void 0!==t[h])throw new Error("Cannot have Account X-Address and SourceTag");if(void 0!==e[g]&&void 0!==t[g])throw new Error("Cannot have Destination X-Address and DestinationTag")}(i,e)),Object.assign(t,null!=i?i:{[n]:r})},{});let m=Object.keys(y).map(e=>{if(!(e in n.field)){if(e[0]===e[0].toLowerCase())return;throw new Error(`Field ${e} is not defined in the definitions`)}return n.field[e]}).filter(function(e){return void 0!==e&&void 0!==y[e.name]&&e.isSerialized}).sort((e,t)=>e.ordinal-t.ordinal);return void 0!==t&&(m=m.filter(t)),m.forEach(e=>{var t;const r=e.type.name===f?this.from(y[e.name],void 0,n):"STArray"===e.type.name?c.STArray.from(y[e.name],n):"UInt64"===e.type.name?u.UInt64.from(y[e.name],e.name):(null===(t=e.associatedType)||void 0===t?void 0:t.from)?e.associatedType.from(y[e.name]):(()=>{throw new Error(`Type ${e.type.name} for field ${e.name} is missing associatedType.from`)})();if(null==r)throw new TypeError(`Unable to interpret "${e.name}: ${y[e.name]}".`);"UNLModify"===r.name&&(d=!0);const i="Account"==e.name&&d;s.writeFieldAndValue(e,r,i),e.type.name===f&&s.put(l)}),new p(i.toBytes())}toJSON(e){const t=new s.BinaryParser(this.toString(),e),n={};for(;!t.end();){const r=t.readField();if(r.name===d)break;n[r.name]=t.readFieldValue(r).toJSON(e,r.name)}return n}}t.STObject=p},8864:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RippleStateFlags=void 0,function(e){e[e.lsfLowReserve=65536]="lsfLowReserve",e[e.lsfHighReserve=131072]="lsfHighReserve",e[e.lsfLowAuth=262144]="lsfLowAuth",e[e.lsfHighAuth=524288]="lsfHighAuth",e[e.lsfLowNoRipple=1048576]="lsfLowNoRipple",e[e.lsfHighNoRipple=2097152]="lsfHighNoRipple",e[e.lsfLowFreeze=4194304]="lsfLowFreeze",e[e.lsfHighFreeze=8388608]="lsfHighFreeze",e[e.lsfAMMNode=16777216]="lsfAMMNode",e[e.lsfLowDeepFreeze=33554432]="lsfLowDeepFreeze",e[e.lsfHighDeepFreeze=67108864]="lsfHighDeepFreeze"}(n||(t.RippleStateFlags=n={}))},8932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.accountPublicFromPublicGenerator=t.derivePrivateKey=void 0;const i=n(9005),o=r(n(4876)),s=BigInt(0);function a(e,t){const n=i.secp256k1.CURVE.n;for(let r=0;r<=4294967295;r++){const i=(new o.default).add(e);void 0!==t&&i.addU32(t),i.addU32(r);const a=i.first256BigInt();if(a>s&&a<n)return a}throw new Error("impossible unicorn ;)")}t.derivePrivateKey=function(e,t={}){const n=t.validator,r=i.secp256k1.CURVE.n,o=a(e);return n?o:(a(i.secp256k1.ProjectivePoint.BASE.multiply(o).toRawBytes(!0),t.accountIndex||0)+o)%r},t.accountPublicFromPublicGenerator=function(e){const t=i.secp256k1.ProjectivePoint.fromHex(e),n=a(e,0),r=i.secp256k1.ProjectivePoint.BASE.multiply(n);return t.add(r).toRawBytes(!0)}},9005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const r=n(3947),i=n(9987),o=n(6657),s=n(1056),a=n(802),c=n(3449),u=n(4296),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),g=(e,t)=>(e+t/h)/t;function p(e){const t=l,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,g=(0,a.pow2)(f,n,t)*f%t,p=(0,a.pow2)(g,n,t)*f%t,m=(0,a.pow2)(p,h,t)*d%t,E=(0,a.pow2)(m,i,t)*m%t,b=(0,a.pow2)(E,o,t)*E%t,w=(0,a.pow2)(b,c,t)*b%t,A=(0,a.pow2)(w,u,t)*w%t,S=(0,a.pow2)(A,c,t)*b%t,v=(0,a.pow2)(S,n,t)*f%t,T=(0,a.pow2)(v,s,t)*E%t,O=(0,a.pow2)(T,r,t)*d%t,I=(0,a.pow2)(O,h,t);if(!y.eql(y.sqr(I),e))throw new Error("Cannot find square root");return I}const y=(0,a.Field)(l,void 0,void 0,{sqrt:p});t.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),c=g(o*e,t),u=g(-r*e,t);let l=(0,a.mod)(e-c*n-u*i,t),h=(0,a.mod)(-c*r-u*o,t);const p=l>s,y=h>s;if(p&&(l=t-l),y&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:l,k2neg:y,k2:h}}}},r.sha256);const m=BigInt(0),E={};function b(e,...t){let n=E[e];if(void 0===n){const t=(0,r.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));n=(0,c.concatBytes)(t,t),E[e]=n}return(0,r.sha256)((0,c.concatBytes)(n,...t))}const w=e=>e.toRawBytes(!0).slice(1),A=e=>(0,c.numberToBytesBE)(e,32),S=e=>(0,a.mod)(e,l),v=e=>(0,a.mod)(e,d),T=t.secp256k1.ProjectivePoint;function O(e){let n=t.secp256k1.utils.normPrivateKeyToScalar(e),r=T.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:v(-n),bytes:w(r)}}function I(e){(0,c.aInRange)("x",e,f,l);const t=S(e*e);let n=p(S(t*e+BigInt(7)));n%h!==m&&(n=S(-n));const r=new T(e,n,f);return r.assertValidity(),r}const B=c.bytesToNumberBE;function _(...e){return v(B(b("BIP0340/challenge",...e)))}function N(e,t,n){const r=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),o=(0,c.ensureBytes)("publicKey",n,32);try{const e=I(B(o)),t=B(r.subarray(0,32));if(!(0,c.inRange)(t,f,l))return!1;const n=B(r.subarray(32,64));if(!(0,c.inRange)(n,f,d))return!1;const h=_(A(t),w(e),i),g=(s=e,a=n,u=v(-h),T.BASE.multiplyAndAddUnsafe(s,a,u));return!(!g||!g.hasEvenY()||g.toAffine().x!==t)}catch(e){return!1}var s,a,u}t.schnorr={getPublicKey:function(e){return O(e).bytes},sign:function(e,t,n=(0,i.randomBytes)(32)){const r=(0,c.ensureBytes)("message",e),{bytes:o,scalar:s}=O(t),a=(0,c.ensureBytes)("auxRand",n,32),u=A(s^B(b("BIP0340/aux",a))),l=b("BIP0340/nonce",u,o,r),d=v(B(l));if(d===m)throw new Error("sign failed: k is zero");const{bytes:f,scalar:h}=O(d),g=_(f,o,r),p=new Uint8Array(64);if(p.set(f,0),p.set(A(v(h+g*s)),32),!N(p,r,o))throw new Error("sign: Invalid signature produced");return p},verify:N,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:w,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:b,mod:a.mod}};const L=(()=>(0,s.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),C=(()=>(0,u.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),F=(()=>(0,s.createHasher)(t.secp256k1.ProjectivePoint,e=>{const{x:t,y:n}=C(y.create(e[0]));return L(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();t.hashToCurve=F.hashToCurve,t.encodeToCurve=F.encodeToCurve},9043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultClawback=void 0;const r=n(2794);t.validateVaultClawback=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Holder",r.isAccount),(0,r.validateOptionalField)(e,"Amount",r.isClawbackAmount)}},9333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.omitBy=t.groupBy=void 0,t.groupBy=function(e,t){return e.reduce(function(e,n,r,i){const o=t(n,r,i)||0,s=e[o]||[];return s.push(n),e[o]=s,e},{})},t.omitBy=function(e,t){return Object.keys(e).filter(n=>!t(e[n],n)).reduce((t,n)=>(t[n]=e[n],t),{})}},9349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOfferCreate=t.OfferCreateFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfPassive=65536]="tfPassive",e[e.tfImmediateOrCancel=131072]="tfImmediateOrCancel",e[e.tfFillOrKill=262144]="tfFillOrKill",e[e.tfSell=524288]="tfSell",e[e.tfHybrid=1048576]="tfHybrid"}(s||(t.OfferCreateFlags=s={})),t.validateOfferCreate=function(e){if((0,o.validateBaseTransaction)(e),void 0===e.TakerGets)throw new r.ValidationError("OfferCreate: missing field TakerGets");if(void 0===e.TakerPays)throw new r.ValidationError("OfferCreate: missing field TakerPays");if("string"!=typeof e.TakerGets&&!(0,o.isAmount)(e.TakerGets))throw new r.ValidationError("OfferCreate: invalid TakerGets");if("string"!=typeof e.TakerPays&&!(0,o.isAmount)(e.TakerPays))throw new r.ValidationError("OfferCreate: invalid TakerPays");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("OfferCreate: invalid Expiration");if(void 0!==e.OfferSequence&&"number"!=typeof e.OfferSequence)throw new r.ValidationError("OfferCreate: invalid OfferSequence");if((0,o.validateOptionalField)(e,"DomainID",o.isDomainID,{txType:"OfferCreate",paramName:"DomainID"}),null==e.DomainID&&(0,i.hasFlag)(e,s.tfHybrid,"tfHybrid"))throw new r.ValidationError("OfferCreate: tfHybrid flag cannot be set if DomainID is not present")}},9373:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TRANSACTION_ID=1415073280]="TRANSACTION_ID",e[e.TRANSACTION_NODE=1397638144]="TRANSACTION_NODE",e[e.INNER_NODE=1296649728]="INNER_NODE",e[e.LEAF_NODE=1296846336]="LEAF_NODE",e[e.TRANSACTION_SIGN=1398036480]="TRANSACTION_SIGN",e[e.TRANSACTION_SIGN_TESTNET=1937012736]="TRANSACTION_SIGN_TESTNET",e[e.TRANSACTION_MULTISIGN=1397576704]="TRANSACTION_MULTISIGN",e[e.LEDGER=1280791040]="LEDGER"}(n||(n={})),t.default=n},9450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;const r=n(4233),i=n(5492),o=n(4894),s=n(5149),a=n(5827),c=n(3181),u=n(7663),l={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},f=BigInt(0),h=BigInt(1),g=BigInt(2),p=(0,a.Field)(l.p,{sqrt:function(e){const t=l.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,h=(0,a.pow2)(f,n,t)*f%t,y=(0,a.pow2)(h,n,t)*f%t,m=(0,a.pow2)(y,g,t)*d%t,E=(0,a.pow2)(m,i,t)*m%t,b=(0,a.pow2)(E,o,t)*E%t,w=(0,a.pow2)(b,c,t)*b%t,A=(0,a.pow2)(w,u,t)*w%t,S=(0,a.pow2)(A,c,t)*b%t,v=(0,a.pow2)(S,n,t)*f%t,T=(0,a.pow2)(v,s,t)*E%t,O=(0,a.pow2)(T,r,t)*d%t,I=(0,a.pow2)(O,g,t);if(!p.eql(p.sqr(I),e))throw new Error("Cannot find square root");return I}});t.secp256k1=(0,o.createCurve)({...l,Fp:p,lowS:!0,endo:d},r.sha256);const y={};function m(e,...t){let n=y[e];if(void 0===n){const t=(0,r.sha256)((0,u.utf8ToBytes)(e));n=(0,u.concatBytes)(t,t),y[e]=n}return(0,r.sha256)((0,u.concatBytes)(n,...t))}const E=e=>e.toBytes(!0).slice(1),b=(()=>t.secp256k1.Point)(),w=e=>e%g===f;function A(e){const{Fn:t,BASE:n}=b,r=(0,c._normFnElement)(t,e),i=n.multiply(r);return{scalar:w(i.y)?r:t.neg(r),bytes:E(i)}}function S(e){const t=p;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x ≥ p");const n=t.create(e*e),r=t.create(n*e+BigInt(7));let i=t.sqrt(r);w(i)||(i=t.neg(i));const o=b.fromAffine({x:e,y:i});return o.assertValidity(),o}const v=u.bytesToNumberBE;function T(...e){return b.Fn.create(v(m("BIP0340/challenge",...e)))}function O(e){return A(e).bytes}function I(e,t,n=(0,i.randomBytes)(32)){const{Fn:r}=b,o=(0,u.ensureBytes)("message",e),{bytes:s,scalar:a}=A(t),c=(0,u.ensureBytes)("auxRand",n,32),l=r.toBytes(a^v(m("BIP0340/aux",c))),d=m("BIP0340/nonce",l,s,o),{bytes:f,scalar:h}=A(d),g=T(f,s,o),p=new Uint8Array(64);if(p.set(f,0),p.set(r.toBytes(r.create(h+g*a)),32),!B(p,o,s))throw new Error("sign: Invalid signature produced");return p}function B(e,t,n){const{Fn:r,BASE:i}=b,o=(0,u.ensureBytes)("signature",e,64),s=(0,u.ensureBytes)("message",t),a=(0,u.ensureBytes)("publicKey",n,32);try{const e=S(v(a)),t=v(o.subarray(0,32));if(!(0,u.inRange)(t,h,l.p))return!1;const n=v(o.subarray(32,64));if(!(0,u.inRange)(n,h,l.n))return!1;const c=T(r.toBytes(t),E(e),s),d=i.multiplyUnsafe(n).add(e.multiplyUnsafe(r.neg(c))),{x:f,y:g}=d.toAffine();return!(d.is0()||!w(g)||f!==t)}catch(e){return!1}}t.schnorr=(()=>{const e=(e=(0,i.randomBytes)(48))=>(0,a.mapHashToField)(e,l.n);return t.secp256k1.utils.randomSecretKey,{keygen:function(t){const n=e(t);return{secretKey:n,publicKey:O(n)}},getPublicKey:O,sign:I,verify:B,Point:b,utils:{randomSecretKey:e,randomPrivateKey:e,taggedHash:m,lift_x:S,pointToBytes:E,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,mod:a.mod},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();const _=(()=>(0,s.isogenyMap)(p,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),N=(()=>(0,c.mapToCurveSimpleSWU)(p,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:p.create(BigInt("-11"))}))();t.secp256k1_hasher=(0,s.createHasher)(t.secp256k1.Point,e=>{const{x:t,y:n}=N(p.create(e[0]));return _(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:p.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},9492:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Amount=void 0;const i=n(892),o=n(5763),s=n(5967),a=n(1275),c=r(n(735)),u=n(619),l=n(5517),d=n(6905),f=new c.default("1e17"),h=new c.default("1e-6"),g=BigInt(4294967295),p=BigInt(0x8000000000000000);c.default.config({EXPONENTIAL_AT:[-112,96]});class y extends a.SerializedType{constructor(e){super(null!=e?e:y.defaultAmount.bytes)}static from(e){if(e instanceof y)return e;let t=new Uint8Array(8);if("string"==typeof e){y.assertXrpIsValid(e);const n=BigInt(e),r=[new Uint8Array(4),new Uint8Array(4)];return(0,l.writeUInt32BE)(r[0],Number(n>>BigInt(32)),0),(0,l.writeUInt32BE)(r[1],Number(n&BigInt(g)),0),t=(0,u.concat)(r),t[0]|=64,new y(t)}if(function(e){const t=Object.keys(e).sort();return 3===t.length&&"currency"===t[0]&&"issuer"===t[1]&&"value"===t[2]}(e)){const n=new c.default(e.value);if(y.assertIouIsValid(n),n.isZero())t[0]|=128;else{const e=n.times("1e"+-((n.e||0)-15)).abs().toString(),r=BigInt(e),i=[new Uint8Array(4),new Uint8Array(4)];(0,l.writeUInt32BE)(i[0],Number(r>>BigInt(32)),0),(0,l.writeUInt32BE)(i[1],Number(r&BigInt(g)),0),t=(0,u.concat)(i),t[0]|=128,n.gt(new c.default(0))&&(t[0]|=64);const o=(n.e||0)-15+97;t[0]|=o>>>2,t[1]|=(3&o)<<6}const r=s.Currency.from(e.currency).toBytes(),i=o.AccountID.from(e.issuer).toBytes();return new y((0,u.concat)([t,r,i]))}if(function(e){const t=Object.keys(e).sort();return 2===t.length&&"mpt_issuance_id"===t[0]&&"value"===t[1]}(e)){y.assertMptIsValid(e.value);let n=new Uint8Array(1);n[0]|=96;const r=BigInt(e.value),i=[new Uint8Array(4),new Uint8Array(4)];(0,l.writeUInt32BE)(i[0],Number(r>>BigInt(32)),0),(0,l.writeUInt32BE)(i[1],Number(r&BigInt(g)),0),t=(0,u.concat)(i);const o=d.Hash192.from(e.mpt_issuance_id).toBytes();return new y((0,u.concat)([n,t,o]))}throw new Error("Invalid type to construct an Amount")}static fromParser(e){if(128&e.peek())return new y(e.read(48));const t=32&e.peek()?33:8;return new y(e.read(t))}toJSON(){if(this.isNative()){const e=this.bytes,t=64&e[0]?"":"-";e[0]&=63;const n=BigInt((0,l.readUInt32BE)(e.slice(0,4),0)),r=BigInt((0,l.readUInt32BE)(e.slice(4),0));return`${t}${(n<<BigInt(32)|r).toString()}`}if(this.isIOU()){const e=new i.BinaryParser(this.toString()),t=e.read(8),n=s.Currency.fromParser(e),r=o.AccountID.fromParser(e),a=t[0],l=64&a?"":"-",d=((63&a)<<2)+((255&t[1])>>6)-97;t[0]=0,t[1]&=63;const f=new c.default(`${l}0x${(0,u.bytesToHex)(t)}`).times(`1e${d}`);return y.assertIouIsValid(f),{value:f.toString(),currency:n.toJSON(),issuer:r.toJSON()}}if(this.isMPT()){const e=new i.BinaryParser(this.toString()),t=e.read(1),n=e.read(8),r=d.Hash192.fromParser(e),o=64&t[0]?"":"-",s=BigInt((0,l.readUInt32BE)(n.slice(0,4),0)),a=BigInt((0,l.readUInt32BE)(n.slice(4),0));return{value:`${o}${(s<<BigInt(32)|a).toString()}`,mpt_issuance_id:r.toString()}}throw new Error("Invalid amount to construct JSON")}static assertXrpIsValid(e){if(-1!==e.indexOf("."))throw new Error(`${e.toString()} is an illegal amount`);const t=new c.default(e);if(!t.isZero()&&(t.lt(h)||t.gt(f)))throw new Error(`${e.toString()} is an illegal amount`)}static assertIouIsValid(e){if(!e.isZero()){const t=e.precision(),n=(e.e||0)-15;if(t>16||n>80||n<-96)throw new Error("Decimal precision out of range");this.verifyNoDecimal(e)}}static assertMptIsValid(e){if(-1!==e.indexOf("."))throw new Error(`${e.toString()} is an illegal amount`);const t=new c.default(e);if(!t.isZero()){if(t<(0,c.default)(0))throw new Error(`${e.toString()} is an illegal amount`);if(0!=Number(BigInt(e)&BigInt(p)))throw new Error(`${e.toString()} is an illegal amount`)}}static verifyNoDecimal(e){if(-1!==e.times("1e"+-((e.e||0)-15)).abs().toString().indexOf("."))throw new Error("Decimal place found in integerNumberString")}isNative(){return!(128&this.bytes[0]||32&this.bytes[0])}isMPT(){return!(128&this.bytes[0]||!(32&this.bytes[0]))}isIOU(){return!!(128&this.bytes[0])}}t.Amount=y,y.defaultAmount=new y((0,u.hexToBytes)("4000000000000000"))},9543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signingBatchData=t.transactionID=t.sha512Half=t.binaryToJSON=t.signingClaimData=t.signingData=t.multiSigningData=t.readJSON=t.serializeObject=t.makeParser=t.BytesList=t.BinarySerializer=t.BinaryParser=void 0;const r=n(619),i=n(6986),o=n(892);Object.defineProperty(t,"BinaryParser",{enumerable:!0,get:function(){return o.BinaryParser}});const s=n(7375),a=n(7995);Object.defineProperty(t,"BinarySerializer",{enumerable:!0,get:function(){return a.BinarySerializer}}),Object.defineProperty(t,"BytesList",{enumerable:!0,get:function(){return a.BytesList}});const c=n(7410);Object.defineProperty(t,"sha512Half",{enumerable:!0,get:function(){return c.sha512Half}}),Object.defineProperty(t,"transactionID",{enumerable:!0,get:function(){return c.transactionID}});const u=n(1141),l=(e,t)=>new o.BinaryParser(e instanceof Uint8Array?(0,r.bytesToHex)(e):e,t);t.makeParser=l;const d=(e,t=u.DEFAULT_DEFINITIONS)=>e.readType(i.coreTypes.STObject).toJSON(t);function f(e,t={}){const{prefix:n,suffix:r,signingFieldsOnly:o=!1,definitions:s}=t,c=new a.BytesList;n&&c.put(n);const u=o?e=>e.isSigningField:void 0;return i.coreTypes.STObject.from(e,u,s).toBytesSink(c),r&&c.put(r),c.toBytes()}t.readJSON=d,t.binaryToJSON=(e,t)=>d(l(e,t),t),t.serializeObject=f,t.signingData=function(e,t=s.HashPrefix.transactionSig,n={}){return f(e,{prefix:t,signingFieldsOnly:!0,definitions:n.definitions})},t.signingClaimData=function(e){const t=BigInt(String(e.amount)),n=s.HashPrefix.paymentChannelClaim,r=i.coreTypes.Hash256.from(e.channel).toBytes(),o=i.coreTypes.UInt64.from(t).toBytes(),c=new a.BytesList;return c.put(n),c.put(r),c.put(o),c.toBytes()},t.multiSigningData=function(e,t,n={definitions:u.DEFAULT_DEFINITIONS}){return f(e,{prefix:s.HashPrefix.transactionMultiSig,suffix:i.coreTypes.AccountID.from(t).toBytes(),signingFieldsOnly:!0,definitions:n.definitions})},t.signingBatchData=function(e){if(null==e.flags)throw Error("No field `flags'");if(null==e.txIDs)throw Error("No field `txIDs`");const t=s.HashPrefix.batch,n=i.coreTypes.UInt32.from(e.flags).toBytes(),r=i.coreTypes.UInt32.from(e.txIDs.length).toBytes(),o=new a.BytesList;return o.put(t),o.put(n),o.put(r),e.txIDs.forEach(e=>{o.put(i.coreTypes.Hash256.from(e).toBytes())}),o.toBytes()}},9566:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255);t.default=class{constructor(){this.nextId=0,this.promisesAwaitingResponse=new Map}addPromise(e,t){return r(this,void 0,void 0,function*(){return new Promise((n,r)=>{this.promisesAwaitingResponse.set(e,{resolve:n,reject:r,timer:t})})})}resolve(e,t){const n=this.promisesAwaitingResponse.get(e);if(null==n)throw new i.XrplError(`No existing promise with id ${e}`,{type:"resolve",response:t});clearTimeout(n.timer),n.resolve(t),this.deletePromise(e)}reject(e,t){const n=this.promisesAwaitingResponse.get(e);if(null==n)throw new i.XrplError(`No existing promise with id ${e}`,{type:"reject",error:t});clearTimeout(n.timer),n.reject(t),this.deletePromise(e)}rejectAll(e){this.promisesAwaitingResponse.forEach((t,n,r)=>{this.reject(n,e),this.deletePromise(n)})}createRequest(e,t){let n;null==e.id?(n=this.nextId,this.nextId+=1):n=e.id;const r=JSON.stringify(Object.assign(Object.assign({},e),{id:n})),o=setTimeout(()=>{this.reject(n,new i.TimeoutError(`Timeout for request: ${JSON.stringify(e)} with id ${n}`,e))},t);if(o.unref&&o.unref(),this.promisesAwaitingResponse.has(n))throw clearTimeout(o),new i.XrplError(`Response with id '${n}' is already pending`,e);const s=new Promise((e,t)=>{this.promisesAwaitingResponse.set(n,{resolve:e,reject:t,timer:o})});return[n,r,s]}handleResponse(e){var t,n,r;if(null==e.id||"string"!=typeof e.id&&"number"!=typeof e.id)throw new i.ResponseFormatError("valid id not found in response",e);if(this.promisesAwaitingResponse.has(e.id)){if(null==e.status){const t=new i.ResponseFormatError("Response has no status");this.reject(e.id,t)}if("error"===e.status){const r=e,o=new i.RippledError(null!==(n=null!==(t=r.error_message)&&void 0!==t?t:r.error_exception)&&void 0!==n?n:r.error,r);return void this.reject(e.id,o)}if("success"!==e.status){const t=new i.ResponseFormatError(`unrecognized response.status: ${null!==(r=e.status)&&void 0!==r?r:""}`,e);return void this.reject(e.id,t)}delete e.status,this.resolve(e.id,e)}}deletePromise(e){this.promisesAwaitingResponse.delete(e)}}},9577:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(8516),o=n(619),s=r(n(3212)),a=r(n(4876)),c={deriveKeypair(e){const t=a.default.half(e);return{privateKey:"ED"+(0,o.bytesToHex)(t),publicKey:"ED"+(0,o.bytesToHex)(i.ed25519.getPublicKey(t))}},sign:(e,t)=>(s.default.ok(e instanceof Uint8Array,"message must be array of octets"),s.default.ok(66===t.length,"private key must be 33 bytes including prefix"),(0,o.bytesToHex)(i.ed25519.sign(e,t.slice(2)))),verify:(e,t,n)=>(s.default.ok(66===n.length,"public key must be 33 bytes including prefix"),i.ed25519.verify(t,e,n.slice(2),{zip215:!1}))};t.default=c},9672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransactionFlags=t.convertTxFlagsToNumber=t.setTransactionFlagsToNumber=t.parseAccountRootFlags=void 0;const r=n(255),i=n(8444),o=n(3750),s=n(3746),a=n(6214),c=n(988),u=n(6695),l=n(2794),d=n(3094),f=n(9962),h=n(548),g=n(5842),p=n(8718),y=n(9349),m=n(1441),E=n(2152),b=n(6181),w=n(5615),A=n(4329),S=n(99);t.parseAccountRootFlags=function(e){const t={};return Object.values(i.AccountRootFlags).forEach(n=>{"string"==typeof n&&(0,S.isFlagEnabled)(e,i.AccountRootFlags[n])&&(t[n]=!0)}),t};const v={AccountSet:o.AccountSetTfFlags,AMMClawback:s.AMMClawbackFlags,AMMDeposit:a.AMMDepositFlags,AMMWithdraw:c.AMMWithdrawFlags,Batch:u.BatchFlags,MPTokenAuthorize:d.MPTokenAuthorizeFlags,MPTokenIssuanceCreate:f.MPTokenIssuanceCreateFlags,MPTokenIssuanceSet:h.MPTokenIssuanceSetFlags,NFTokenCreateOffer:g.NFTokenCreateOfferFlags,NFTokenMint:p.NFTokenMintFlags,OfferCreate:y.OfferCreateFlags,PaymentChannelClaim:E.PaymentChannelClaimFlags,Payment:m.PaymentFlags,TrustSet:b.TrustSetFlags,VaultCreate:w.VaultCreateFlags,XChainModifyBridge:A.XChainModifyBridgeFlags};function T(e){return e in v}function O(e){const t=e.Flags;if(null==t)return 0;if("number"==typeof t)return t;if(T(e.TransactionType)){const n=v[e.TransactionType];return Object.keys(t).reduce((e,i)=>{var o;if(null==n[i]&&null==l.GlobalFlags[i])throw new r.ValidationError(`Invalid flag ${i}.`);return t[i]?e|(null!==(o=n[i])&&void 0!==o?o:l.GlobalFlags[i]):e},0)}return Object.keys(t).reduce((e,n)=>{if(null==l.GlobalFlags[n])throw new r.ValidationError(`Invalid flag ${n}. Valid flags are ${JSON.stringify(l.GlobalFlags)}`);return t[n]?e|l.GlobalFlags[n]:e},0)}t.setTransactionFlagsToNumber=function(e){console.warn("This function is deprecated. Use convertTxFlagsToNumber() instead and use the returned value to modify the Transaction.Flags from the caller."),e.Flags&&(e.Flags=O(e))},t.convertTxFlagsToNumber=O,t.parseTransactionFlags=function(e){const t=O(e);if(0===t)return{};const n={};if(T(e.TransactionType)){const r=v[e.TransactionType];Object.values(r).forEach(e=>{"string"==typeof e&&(0,S.isFlagEnabled)(t,r[e])&&(n[e]=!0)})}return Object.values(l.GlobalFlags).forEach(e=>{"string"==typeof e&&(0,S.isFlagEnabled)(t,l.GlobalFlags[e])&&(n[e]=!0)}),n}},9726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOracleDelete=void 0;const r=n(2794);t.validateOracleDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"OracleDocumentID",r.isNumber)}},9729:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransactionFlags=t.convertTxFlagsToNumber=t.setTransactionFlagsToNumber=t.parseAccountRootFlags=t.LedgerEntry=void 0,t.LedgerEntry=o(n(8823));var a=n(9672);Object.defineProperty(t,"parseAccountRootFlags",{enumerable:!0,get:function(){return a.parseAccountRootFlags}}),Object.defineProperty(t,"setTransactionFlagsToNumber",{enumerable:!0,get:function(){return a.setTransactionFlagsToNumber}}),Object.defineProperty(t,"convertTxFlagsToNumber",{enumerable:!0,get:function(){return a.convertTxFlagsToNumber}}),Object.defineProperty(t,"parseTransactionFlags",{enumerable:!0,get:function(){return a.parseTransactionFlags}}),s(n(8932),t),s(n(9843),t),s(n(1279),t)},9760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateMnemonic=function(e,t=128){if((0,o.anumber)(t),t%32!=0||t>256)throw new TypeError("Invalid entropy");return g((0,o.randomBytes)(t/8),e)},t.mnemonicToEntropy=h,t.entropyToMnemonic=g,t.validateMnemonic=function(e,t){try{h(e,t)}catch(e){return!1}return!0},t.mnemonicToSeed=function(e,t=""){return(0,r.pbkdf2Async)(i.sha512,u(e).nfkd,p(t),{c:2048,dkLen:64})},t.mnemonicToSeedSync=function(e,t=""){return(0,r.pbkdf2)(i.sha512,u(e).nfkd,p(t),{c:2048,dkLen:64})};const r=n(4204),i=n(4233),o=n(5492),s=n(1616),a=e=>"あいこくしん"===e[0];function c(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function u(e){const t=c(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function l(e){(0,o.abytes)(e,16,20,24,28,32)}const d=e=>{const t=8-e.length/4;return new Uint8Array([(0,i.sha256)(e)[0]>>t<<t])};function f(e){if(!Array.isArray(e)||2048!==e.length||"string"!=typeof e[0])throw new Error("Wordlist: expected array of 2048 strings");return e.forEach(e=>{if("string"!=typeof e)throw new Error("wordlist: non-string element: "+e)}),s.utils.chain(s.utils.checksum(1,d),s.utils.radix2(11,!0),s.utils.alphabet(e))}function h(e,t){const{words:n}=u(e),r=f(t).decode(n);return l(r),r}function g(e,t){return l(e),f(t).encode(e).join(a(t)?" ":" ")}const p=e=>c("mnemonic"+e)},9843:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.XChainModifyBridgeFlags=t.VaultWithdrawalPolicy=t.VaultCreateFlags=t.TrustSetFlags=t.PaymentChannelClaimFlags=t.PaymentFlags=t.OfferCreateFlags=t.validateNFTokenModify=t.NFTokenMintFlags=t.NFTokenCreateOfferFlags=t.MPTokenIssuanceSetFlags=t.MPTokenIssuanceCreateFlags=t.MPTokenAuthorizeFlags=t.EnableAmendmentFlags=t.AMMWithdrawFlags=t.AMMDepositFlags=t.AMMClawbackFlags=t.AccountSetTfFlags=t.AccountSetAsfFlags=t.validate=t.validateMPTokenMetadata=t.isMPTAmount=void 0;var o=n(2794);Object.defineProperty(t,"isMPTAmount",{enumerable:!0,get:function(){return o.isMPTAmount}}),Object.defineProperty(t,"validateMPTokenMetadata",{enumerable:!0,get:function(){return o.validateMPTokenMetadata}});var s=n(5863);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return s.validate}}),i(n(3342),t);var a=n(3750);Object.defineProperty(t,"AccountSetAsfFlags",{enumerable:!0,get:function(){return a.AccountSetAsfFlags}}),Object.defineProperty(t,"AccountSetTfFlags",{enumerable:!0,get:function(){return a.AccountSetTfFlags}});var c=n(3746);Object.defineProperty(t,"AMMClawbackFlags",{enumerable:!0,get:function(){return c.AMMClawbackFlags}});var u=n(6214);Object.defineProperty(t,"AMMDepositFlags",{enumerable:!0,get:function(){return u.AMMDepositFlags}});var l=n(988);Object.defineProperty(t,"AMMWithdrawFlags",{enumerable:!0,get:function(){return l.AMMWithdrawFlags}});var d=n(7493);Object.defineProperty(t,"EnableAmendmentFlags",{enumerable:!0,get:function(){return d.EnableAmendmentFlags}});var f=n(3094);Object.defineProperty(t,"MPTokenAuthorizeFlags",{enumerable:!0,get:function(){return f.MPTokenAuthorizeFlags}});var h=n(9962);Object.defineProperty(t,"MPTokenIssuanceCreateFlags",{enumerable:!0,get:function(){return h.MPTokenIssuanceCreateFlags}});var g=n(548);Object.defineProperty(t,"MPTokenIssuanceSetFlags",{enumerable:!0,get:function(){return g.MPTokenIssuanceSetFlags}});var p=n(5842);Object.defineProperty(t,"NFTokenCreateOfferFlags",{enumerable:!0,get:function(){return p.NFTokenCreateOfferFlags}});var y=n(8718);Object.defineProperty(t,"NFTokenMintFlags",{enumerable:!0,get:function(){return y.NFTokenMintFlags}});var m=n(7636);Object.defineProperty(t,"validateNFTokenModify",{enumerable:!0,get:function(){return m.validateNFTokenModify}});var E=n(9349);Object.defineProperty(t,"OfferCreateFlags",{enumerable:!0,get:function(){return E.OfferCreateFlags}});var b=n(1441);Object.defineProperty(t,"PaymentFlags",{enumerable:!0,get:function(){return b.PaymentFlags}});var w=n(2152);Object.defineProperty(t,"PaymentChannelClaimFlags",{enumerable:!0,get:function(){return w.PaymentChannelClaimFlags}});var A=n(6181);Object.defineProperty(t,"TrustSetFlags",{enumerable:!0,get:function(){return A.TrustSetFlags}});var S=n(5615);Object.defineProperty(t,"VaultCreateFlags",{enumerable:!0,get:function(){return S.VaultCreateFlags}}),Object.defineProperty(t,"VaultWithdrawalPolicy",{enumerable:!0,get:function(){return S.VaultWithdrawalPolicy}});var v=n(4329);Object.defineProperty(t,"XChainModifyBridgeFlags",{enumerable:!0,get:function(){return v.XChainModifyBridgeFlags}})},9859:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.promisesAwaitingConnection=[]}resolveAllAwaiting(){this.promisesAwaitingConnection.map(({resolve:e})=>e()),this.promisesAwaitingConnection=[]}rejectAllAwaiting(e){this.promisesAwaitingConnection.map(({reject:t})=>t(e)),this.promisesAwaitingConnection=[]}awaitConnection(){return n(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.promisesAwaitingConnection.push({resolve:e,reject:t})})})}}},9962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceCreate=t.MPTokenIssuanceCreateFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfMPTCanLock=2]="tfMPTCanLock",e[e.tfMPTRequireAuth=4]="tfMPTRequireAuth",e[e.tfMPTCanEscrow=8]="tfMPTCanEscrow",e[e.tfMPTCanTrade=16]="tfMPTCanTrade",e[e.tfMPTCanTransfer=32]="tfMPTCanTransfer",e[e.tfMPTCanClawback=64]="tfMPTCanClawback"}(s||(t.MPTokenIssuanceCreateFlags=s={})),t.validateMPTokenIssuanceCreate=function(e){var t,n;if((0,o.validateBaseTransaction)(e),(0,o.validateOptionalField)(e,"MaximumAmount",o.isString),(0,o.validateOptionalField)(e,"MPTokenMetadata",o.isString),(0,o.validateOptionalField)(e,"TransferFee",o.isNumber),(0,o.validateOptionalField)(e,"AssetScale",o.isNumber),"string"==typeof e.MPTokenMetadata&&(!(0,i.isHex)(e.MPTokenMetadata)||e.MPTokenMetadata.length/2>o.MAX_MPT_META_BYTE_LENGTH))throw new r.ValidationError(`MPTokenIssuanceCreate: MPTokenMetadata (hex format) must be non-empty and no more than ${o.MAX_MPT_META_BYTE_LENGTH} bytes.`);if("string"==typeof e.MaximumAmount){if(!i.INTEGER_SANITY_CHECK.exec(e.MaximumAmount))throw new r.ValidationError("MPTokenIssuanceCreate: Invalid MaximumAmount");if(BigInt(e.MaximumAmount)>BigInt("9223372036854775807")||BigInt(e.MaximumAmount)<BigInt("0"))throw new r.ValidationError("MPTokenIssuanceCreate: MaximumAmount out of range")}if("number"==typeof e.TransferFee){const o=null!==(t=e.Flags)&&void 0!==t?t:0,a="number"==typeof o?(0,i.isFlagEnabled)(o,s.tfMPTCanTransfer):null!==(n=o.tfMPTCanTransfer)&&void 0!==n&&n;if(e.TransferFee<0||e.TransferFee>5e4)throw new r.ValidationError("MPTokenIssuanceCreate: TransferFee must be between 0 and 50000");if(e.TransferFee&&!a)throw new r.ValidationError("MPTokenIssuanceCreate: TransferFee cannot be provided without enabling tfMPTCanTransfer flag")}if(null!=e.MPTokenMetadata){const t=(0,o.validateMPTokenMetadata)(e.MPTokenMetadata);if(t.length>0){const e=[o.MPT_META_WARNING_HEADER,...t.map(e=>`- ${e}`)].join("\n");console.warn(e)}}}},9966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMCreate=t.AMM_MAX_TRADING_FEE=void 0;const r=n(255),i=n(2794);t.AMM_MAX_TRADING_FEE=1e3,t.validateAMMCreate=function(e){if((0,i.validateBaseTransaction)(e),null==e.Amount)throw new r.ValidationError("AMMCreate: missing field Amount");if(!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMCreate: Amount must be an Amount");if(null==e.Amount2)throw new r.ValidationError("AMMCreate: missing field Amount2");if(!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMCreate: Amount2 must be an Amount");if(null==e.TradingFee)throw new r.ValidationError("AMMCreate: missing field TradingFee");if("number"!=typeof e.TradingFee)throw new r.ValidationError("AMMCreate: TradingFee must be a number");if(e.TradingFee<0||e.TradingFee>t.AMM_MAX_TRADING_FEE)throw new r.ValidationError(`AMMCreate: TradingFee must be between 0 and ${t.AMM_MAX_TRADING_FEE}`)}},9987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.isLE=void 0,t.isBytes=function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=o,t.byteSwap32=function(e){for(let t=0;t<e.length;t++)e[t]=o(e[t])},t.bytesToHex=function(e){(0,i.abytes)(e);let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=c(e.charCodeAt(i)),o=c(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r},t.asyncLoop=async function(e,n,r){let i=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-i;e>=0&&e<n||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=u,t.toBytes=l,t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];(0,i.abytes)(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return r.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")};const r=n(1845),i=n(5489);function o(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwapIfBE=t.isLE?e=>e:e=>o(e);const s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),a={_0:48,_9:57,A:65,F:70,a:97,f:102};function c(e){return e>=a._0&&e<=a._9?e-a._0:e>=a.A&&e<=a.F?e-(a.A-10):e>=a.a&&e<=a.f?e-(a.a-10):void 0}function u(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function l(e){return"string"==typeof e&&(e=u(e)),(0,i.abytes)(e),e}t.nextTick=async()=>{},t.Hash=class{clone(){return this._cloneInto()}}}},t={},n=function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(5642);xrpl=n})();
2
+ var xrpl;(()=>{var e={5:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelFund=void 0;const r=n(255),i=n(2794);t.validatePaymentChannelFund=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.Channel)throw new r.ValidationError("PaymentChannelFund: missing Channel");if("string"!=typeof e.Channel)throw new r.ValidationError("PaymentChannelFund: Channel must be a string");if(void 0===e.Amount)throw new r.ValidationError("PaymentChannelFund: missing Amount");if("string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelFund: Amount must be a string");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("PaymentChannelFund: Expiration must be a number")}},24:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash128=void 0;const r=n(3776),i=n(619);class o extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=o.ZERO_128.bytes),super(null!=e?e:o.ZERO_128.bytes)}toHex(){const e=(0,i.bytesToHex)(this.toBytes());return/^0+$/.exec(e)?"":e}}t.Hash128=o,o.width=16,o.ZERO_128=new o(new Uint8Array(o.width))},99:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=t.hasFlag=t.isFlagEnabled=t.onlyHasFields=t.INTEGER_SANITY_CHECK=void 0;const n=/^[0-9A-Fa-f]+$/u;function r(e,t){return(BigInt(t)&BigInt(e))===BigInt(t)}t.INTEGER_SANITY_CHECK=/^[0-9]+$/u,t.onlyHasFields=function(e,t){return Object.keys(e).every(e=>t.includes(e))},t.isFlagEnabled=r,t.hasFlag=function(e,t,n){return null!=e.Flags&&("number"==typeof e.Flags?r(e.Flags,t):!0===e.Flags[n])},t.isHex=function(e){return n.test(e)}},168:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Node=t.NodeType=void 0,function(e){e[e.INNER=1]="INNER",e[e.TRANSACTION_NO_METADATA=2]="TRANSACTION_NO_METADATA",e[e.TRANSACTION_METADATA=3]="TRANSACTION_METADATA",e[e.ACCOUNT_STATE=4]="ACCOUNT_STATE"}(n||(t.NodeType=n={})),t.Node=class{}},248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCash=void 0;const r=n(255),i=n(2794);t.validateCheckCash=function(e){if((0,i.validateBaseTransaction)(e),null==e.Amount&&null==e.DeliverMin)throw new r.ValidationError("CheckCash: must have either Amount or DeliverMin");if(null!=e.Amount&&null!=e.DeliverMin)throw new r.ValidationError("CheckCash: cannot have both Amount and DeliverMin");if(null!=e.Amount&&void 0!==e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("CheckCash: invalid Amount");if(null!=e.DeliverMin&&void 0!==e.DeliverMin&&!(0,i.isAmount)(e.DeliverMin))throw new r.ValidationError("CheckCash: invalid DeliverMin");if(void 0!==e.CheckID&&"string"!=typeof e.CheckID)throw new r.ValidationError("CheckCash: invalid CheckID")}},255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XRPLFaucetError=t.NotFoundError=t.ValidationError=t.ResponseFormatError=t.TimeoutError=t.RippledNotInitializedError=t.DisconnectedError=t.NotConnectedError=t.RippledError=t.ConnectionError=t.UnexpectedError=t.XrplError=void 0;class n extends Error{constructor(e="",t){super(e),this.name=this.constructor.name,this.message=e,this.data=t,null!=Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(){let e=`[${this.name}(${this.message}`;return this.data&&(e+=`, ${JSON.stringify(this.data)}`),e+=")]",e}inspect(){return this.toString()}}t.XrplError=n,t.RippledError=class extends n{},t.UnexpectedError=class extends n{};class r extends n{}t.ConnectionError=r,t.NotConnectedError=class extends r{},t.DisconnectedError=class extends r{},t.RippledNotInitializedError=class extends r{},t.TimeoutError=class extends r{},t.ResponseFormatError=class extends r{},t.ValidationError=class extends n{},t.XRPLFaucetError=class extends n{},t.NotFoundError=class extends n{constructor(e="Not found"){super(e)}}},376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(5442),o=n(2722);t.default=function(e,t,n){const s=(0,r.encodeForSigningClaim)({channel:e,amount:(0,o.xrpToDrops)(t)});return(0,i.sign)(s,n)}},390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialAccept=void 0;const r=n(2794);t.validateCredentialAccept=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Account",r.isString),(0,r.validateRequiredField)(e,"Issuer",r.isString),(0,r.validateCredentialType)(e)}},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(5442),o=n(2722);t.default=function(e,t,n,s){const a=(0,r.encodeForSigningClaim)({channel:e,amount:(0,o.xrpToDrops)(t)});return(0,i.verify)(a,n,s)}},401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt8=void 0;const r=n(3328),i=n(619),o=n(5517);class s extends r.UInt{constructor(e){super(null!=e?e:s.defaultUInt8.bytes)}static fromParser(e){return new s(e.read(s.width))}static from(e){if(e instanceof s)return e;if("number"==typeof e){s.checkUintRange(e,0,255);const t=new Uint8Array(s.width);return(0,o.writeUInt8)(t,e,0),new s(t)}throw new Error("Cannot construct UInt8 from given value")}valueOf(){return parseInt((0,i.bytesToHex)(this.bytes),16)}}t.UInt8=s,s.width=1,s.defaultUInt8=new s(new Uint8Array(s.width))},425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCreateClaimID=void 0;const r=n(2794);t.validateXChainCreateClaimID=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount)}},534:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255),o=r(n(9373)),s=r(n(2530)),a=r(n(5644)),c=n(168),l="0000000000000000000000000000000000000000000000000000000000000000";class u extends c.Node{constructor(e=0){super(),this.leaves={},this.type=c.NodeType.INNER,this.depth=e,this.empty=!0}get hash(){if(this.empty)return l;let e="";for(let t=0;t<=15;t++){const n=this.leaves[t];e+=null==n?l:n.hash}const t=o.default.INNER_NODE.toString(16);return(0,s.default)(t+e)}addItem(e,t){const n=this.getNode(parseInt(e[this.depth],16));if(void 0!==n){if(n instanceof u)n.addItem(e,t);else if(n instanceof a.default){if(n.tag===e)throw new i.XrplError("Tried to add a node to a SHAMap that was already in there.");{const r=new u(this.depth+1);r.addItem(n.tag,n),r.addItem(e,t),this.setNode(parseInt(e[this.depth],16),r)}}}else this.setNode(parseInt(e[this.depth],16),t)}setNode(e,t){if(e<0||e>15)throw new i.XrplError("Invalid slot: slot must be between 0-15.");this.leaves[e]=t,this.empty=!1}getNode(e){if(e<0||e>15)throw new i.XrplError("Invalid slot: slot must be between 0-15.");return this.leaves[e]}}t.default=u},548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceSet=t.MPTokenIssuanceSetFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfMPTLock=1]="tfMPTLock",e[e.tfMPTUnlock=2]="tfMPTUnlock"}(s||(t.MPTokenIssuanceSetFlags=s={})),t.validateMPTokenIssuanceSet=function(e){var t,n,a;(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"MPTokenIssuanceID",o.isString),(0,o.validateOptionalField)(e,"Holder",o.isAccount);const c=null!==(t=e.Flags)&&void 0!==t?t:0,l="number"==typeof c?(0,i.isFlagEnabled)(c,s.tfMPTLock):null!==(n=c.tfMPTLock)&&void 0!==n&&n,u="number"==typeof c?(0,i.isFlagEnabled)(c,s.tfMPTUnlock):null!==(a=c.tfMPTUnlock)&&void 0!==a&&a;if(l&&u)throw new r.ValidationError("MPTokenIssuanceSet: flag conflict")}},602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDepositPreauth=void 0;const r=n(255),i=n(2794);t.validateDepositPreauth=function(e){if((0,i.validateBaseTransaction)(e),function(e){if(1!==["Authorize","Unauthorize","AuthorizeCredentials","UnauthorizeCredentials"].filter(t=>void 0!==e[t]).length)throw new r.ValidationError("DepositPreauth: Requires exactly one field of the following: Authorize, Unauthorize, AuthorizeCredentials, UnauthorizeCredentials.")}(e),void 0!==e.Authorize){if("string"!=typeof e.Authorize)throw new r.ValidationError("DepositPreauth: Authorize must be a string");if(e.Account===e.Authorize)throw new r.ValidationError("DepositPreauth: Account can't preauthorize its own address")}else if(void 0!==e.Unauthorize){if("string"!=typeof e.Unauthorize)throw new r.ValidationError("DepositPreauth: Unauthorize must be a string");if(e.Account===e.Unauthorize)throw new r.ValidationError("DepositPreauth: Account can't unauthorize its own address")}else void 0!==e.AuthorizeCredentials?(0,i.validateCredentialsList)(e.AuthorizeCredentials,e.TransactionType,!1,i.MAX_AUTHORIZED_CREDENTIALS):void 0!==e.UnauthorizeCredentials&&(0,i.validateCredentialsList)(e.UnauthorizeCredentials,e.TransactionType,!1,i.MAX_AUTHORIZED_CREDENTIALS)}},619:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.stringToHex=t.hexToString=t.hexToBytes=t.bytesToHex=void 0;const o=n(5492),s=n(1602);t.bytesToHex=e=>(0,o.bytesToHex)(e instanceof Uint8Array?e:Uint8Array.from(e)).toUpperCase(),t.hexToBytes=e=>{const t=e.length,n=new Uint8Array(t/2);if(!s.HEX_REGEX.test(e))throw new Error("Invalid hex string");for(let t=0;t<n.length;t++){const r=2*t,i=e.slice(r,r+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");n[t]=o}return n},t.hexToString=(e,n="utf8")=>new TextDecoder(n).decode((0,t.hexToBytes)(e)),t.stringToHex=e=>(0,t.bytesToHex)((new TextEncoder).encode(e)),t.randomBytes=o.randomBytes,i(n(1602),t)},667:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDecodedTransaction=t.addressToBigNumber=t.NUM_BITS_IN_HEX=t.compareSigners=void 0;const i=n(619),o=r(n(735)),s=n(6333),a=n(5620);function c(e){const n=(0,i.bytesToHex)((0,s.decodeAccountID)(e));return new o.default(n,t.NUM_BITS_IN_HEX)}t.compareSigners=function(e,t){return c(e.Account).comparedTo(c(t.Account))},t.NUM_BITS_IN_HEX=16,t.addressToBigNumber=c,t.getDecodedTransaction=function(e){return"object"==typeof e?(0,a.decode)((0,a.encode)(e)):(0,a.decode)(e)}},707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCreateBridge=void 0;const r=n(2794);t.validateXChainCreateBridge=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateOptionalField)(e,"MinAccountCreateAmount",r.isAmount)}},714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA384=t.SHA512_256=t.SHA512_224=t.SHA512=void 0;const r=n(1998),i=n(1533),o=n(9987),[s,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),c=new Uint32Array(80),l=new Uint32Array(80);class u extends r.HashMD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:h,Hh:g,Hl:p}=this;return[e,t,n,r,i,o,s,a,c,l,u,d,f,h,g,p]}set(e,t,n,r,i,o,s,a,c,l,u,d,f,h,g,p){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|g,this.Hl=0|p}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),l[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|l[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),o=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),s=0|c[e-2],a=0|l[e-2],u=i.default.rotrSH(s,a,19)^i.default.rotrBH(s,a,61)^i.default.shrSH(s,a,6),d=i.default.rotrSL(s,a,19)^i.default.rotrBL(s,a,61)^i.default.shrSL(s,a,6),f=i.default.add4L(o,d,l[e-7],l[e-16]),h=i.default.add4H(f,r,u,c[e-7],c[e-16]);c[e]=0|h,l[e]=0|f}let{Ah:n,Al:r,Bh:o,Bl:u,Ch:d,Cl:f,Dh:h,Dl:g,Eh:p,El:y,Fh:m,Fl:b,Gh:E,Gl:w,Hh:A,Hl:S}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(p,y,14)^i.default.rotrSH(p,y,18)^i.default.rotrBH(p,y,41),v=i.default.rotrSL(p,y,14)^i.default.rotrSL(p,y,18)^i.default.rotrBL(p,y,41),T=p&m^~p&E,O=y&b^~y&w,I=i.default.add5L(S,v,O,a[e],l[e]),B=i.default.add5H(I,A,t,T,s[e],c[e]),_=0|I,N=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),L=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),F=n&o^n&d^o&d,C=r&u^r&f^u&f;A=0|E,S=0|w,E=0|m,w=0|b,m=0|p,b=0|y,({h:p,l:y}=i.default.add(0|h,0|g,0|B,0|_)),h=0|d,g=0|f,d=0|o,f=0|u,o=0|n,u=0|r;const D=i.default.add3L(_,L,C);n=i.default.add3H(D,B,N,F),r=0|D}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:u}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|u)),({h:d,l:f}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|f)),({h,l:g}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|g)),({h:p,l:y}=i.default.add(0|this.Eh,0|this.El,0|p,0|y)),({h:m,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|m,0|b)),({h:E,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|E,0|w)),({h:A,l:S}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|S)),this.set(n,r,o,u,d,f,h,g,p,y,m,b,E,w,A,S)}roundClean(){c.fill(0),l.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=u;class d extends u{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}t.SHA512_224=d;class f extends u{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}t.SHA512_256=f;class h extends u{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.SHA384=h,t.sha512=(0,o.wrapConstructor)(()=>new u),t.sha512_224=(0,o.wrapConstructor)(()=>new d),t.sha512_256=(0,o.wrapConstructor)(()=>new f),t.sha384=(0,o.wrapConstructor)(()=>new h)},735:function(e,t,n){var r;!function(){"use strict";var i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,a=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",u=1e14,d=14,f=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,p=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=d-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function b(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=c==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(a=(c=i.length)<(l=o.length)?c:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return c==l?0:c>l^n?1:-1}function E(e,t,n,r){if(e<t||e>n||e!==a(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return y(e.e/d)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}i=function e(t){var n,r,i,v,T,O,I,B,_,N,L=K.prototype={constructor:K,toString:null,valueOf:null},F=new K(1),C=20,D=4,M=-7,P=21,R=-1e7,x=1e7,U=!1,k=1,H=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",z=!0;function K(e,t){var n,s,c,u,h,g,p,y,m=this;if(!(m instanceof K))return new K(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>x?m.c=m.e=null:e.e<R?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((g="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,h=e;h>=10;h/=10,u++);return void(u>x?m.c=m.e=null:(m.e=u,m.c=[e]))}y=String(e)}else{if(!o.test(y=String(e)))return i(m,y,g);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(u=y.indexOf("."))>-1&&(y=y.replace(".","")),(h=y.search(/e/i))>0?(u<0&&(u=h),u+=+y.slice(h+1),y=y.substring(0,h)):u<0&&(u=y.length)}else{if(E(t,2,j.length,"Base"),10==t&&z)return X(m=new K(e),C+m.e+1,D);if(y=String(e),g="number"==typeof e){if(0*e!=0)return i(m,y,g,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,K.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=j.slice(0,t),u=h=0,p=y.length;h<p;h++)if(n.indexOf(s=y.charAt(h))<0){if("."==s){if(h>u){u=p;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,h=-1,u=0;continue}return i(m,String(e),g,t)}g=!1,(u=(y=r(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):u=y.length}for(h=0;48===y.charCodeAt(h);h++);for(p=y.length;48===y.charCodeAt(--p););if(y=y.slice(h,++p)){if(p-=h,g&&K.DEBUG&&p>15&&(e>f||e!==a(e)))throw Error(l+m.s*e);if((u=u-h-1)>x)m.c=m.e=null;else if(u<R)m.c=[m.e=0];else{if(m.e=u,m.c=[],h=(u+1)%d,u<0&&(h+=d),h<p){for(h&&m.c.push(+y.slice(0,h)),p-=d;h<p;)m.c.push(+y.slice(h,h+=d));h=d-(y=y.slice(h)).length}else h-=p;for(;h--;y+="0");m.c.push(+y)}}else m.c=[m.e=0]}function G(e,t,n,r){var i,o,s,a,c;if(null==n?n=D:E(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=m(e.c),c=1==r||2==r&&(s<=M||s>=P)?A(c,s):S(c,s,"0");else if(o=(e=X(new K(e),t,n)).e,a=(c=m(e.c)).length,1==r||2==r&&(t<=o||o<=M)){for(;a<t;c+="0",a++);c=A(c,o)}else if(t-=s,c=S(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function q(e,t){for(var n,r,i=1,o=new K(e[0]);i<e.length;i++)(!(r=new K(e[i])).s||(n=b(o,r))===t||0===n&&o.s===t)&&(o=r);return o}function W(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*d-1)>x?e.c=e.e=null:n<R?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n,r){var i,o,c,l,f,g,p,y=e.c,m=h;if(y){e:{for(i=1,l=y[0];l>=10;l/=10,i++);if((o=t-i)<0)o+=d,c=t,f=y[g=0],p=a(f/m[i-c-1]%10);else if((g=s((o+1)/d))>=y.length){if(!r)break e;for(;y.length<=g;y.push(0));f=p=0,i=1,c=(o%=d)-d+1}else{for(f=l=y[g],i=1;l>=10;l/=10,i++);p=(c=(o%=d)-d+i)<0?0:a(f/m[i-c-1]%10)}if(r=r||t<0||null!=y[g+1]||(c<0?f:f%m[i-c-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?c>0?f/m[i-c]:0:y[g-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=m[(d-t%d)%d],e.e=-t||0):y[0]=e.e=0,e;if(0==o?(y.length=g,l=1,g--):(y.length=g+1,l=m[d-o],y[g]=c>0?a(f/m[i-c]%m[c])*l:0),r)for(;;){if(0==g){for(o=1,c=y[0];c>=10;c/=10,o++);for(c=y[0]+=l,l=1;c>=10;c/=10,l++);o!=l&&(e.e++,y[0]==u&&(y[0]=1));break}if(y[g]+=l,y[g]!=u)break;y[g--]=0,l=1}for(o=y.length;0===y[--o];y.pop());}e.e>x?e.c=e.e=null:e.e<R&&(e.c=[e.e=0])}return e}function $(e){var t,n=e.e;return null===n?e.toString():(t=m(e.c),t=n<=M||n>=P?A(t,n):S(t,n,"0"),e.s<0?"-"+t:t)}return K.clone=e,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(E(n=e[t],0,p,t),C=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(E(n=e[t],0,8,t),D=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(E(n[0],-p,0,t),E(n[1],0,p,t),M=n[0],P=n[1]):(E(n,-p,p,t),M=-(P=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)E(n[0],-p,-1,t),E(n[1],1,p,t),R=n[0],x=n[1];else{if(E(n,-p,p,t),!n)throw Error(c+t+" cannot be zero: "+n);R=-(x=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(E(n=e[t],0,9,t),k=n),e.hasOwnProperty(t="POW_PRECISION")&&(E(n=e[t],0,p,t),H=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);z="0123456789"==n.slice(0,10),j=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:D,EXPONENTIAL_AT:[M,P],RANGE:[R,x],CRYPTO:U,MODULO_MODE:k,POW_PRECISION:H,FORMAT:V,ALPHABET:j}},K.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!K.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-p&&i<=p&&i===a(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=u||n!==a(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},K.maximum=K.max=function(){return q(arguments,-1)},K.minimum=K.min=function(){return q(arguments,1)},K.random=(v=9007199254740992,T=Math.random()*v&2097151?function(){return a(Math.random()*v)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,l=0,u=[],f=new K(F);if(null==e?e=C:E(e,0,p),i=s(e/d),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));l<i;)(o=131072*t[l]+(t[l+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[l]=n[0],t[l+1]=n[1]):(u.push(o%1e14),l+=2);l=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);l<i;)(o=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(u.push(o%1e14),l+=7);l=i/7}if(!U)for(;l<i;)(o=T())<9e15&&(u[l++]=o%1e14);for(i=u[--l],e%=d,i&&e&&(o=h[d-e],u[l]=a(i/o)*o);0===u[l];u.pop(),l--);if(l<0)u=[r=0];else{for(r=-1;0===u[0];u.splice(0,1),r-=d);for(l=1,o=u[0];o>=10;o/=10,l++);l<d&&(r-=d-l)}return f.e=r,f.c=u,f}),K.sum=function(){for(var e=1,t=arguments,n=new K(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,o,s,a){var c,l,u,d,f,h,g,p,y=r.indexOf("."),b=C,E=D;for(y>=0&&(d=H,H=0,r=r.replace(".",""),h=(p=new K(i)).pow(r.length-y),H=d,p.c=t(S(m(h.c),h.e,"0"),10,o,e),p.e=p.c.length),u=d=(g=t(r,i,o,a?(c=j,e):(c=e,j))).length;0==g[--d];g.pop());if(!g[0])return c.charAt(0);if(y<0?--u:(h.c=g,h.e=u,h.s=s,g=(h=n(h,p,b,E,o)).c,f=h.r,u=h.e),y=g[l=u+b+1],d=o/2,f=f||l<0||null!=g[l+1],f=E<4?(null!=y||f)&&(0==E||E==(h.s<0?3:2)):y>d||y==d&&(4==E||f||6==E&&1&g[l-1]||E==(h.s<0?8:7)),l<1||!g[0])r=f?S(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(g.length=l,f)for(--o;++g[--l]>o;)g[l]=0,l||(++u,g=[1].concat(g));for(d=g.length;!g[--d];);for(y=0,r="";y<=d;r+=c.charAt(g[y++]));r=S(r,u,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,s,a=0,c=e.length,l=t%g,u=t/g|0;for(e=e.slice();c--;)a=((i=l*(o=e[c]%g)+(r=u*o+(s=e[c]/g|0)*l)%g*g+a)/n|0)+(r/g|0)+u*s,e[c]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,s,c){var l,f,h,g,p,m,b,E,w,A,S,v,T,O,I,B,_,N=r.s==i.s?1:-1,L=r.c,F=i.c;if(!(L&&L[0]&&F&&F[0]))return new K(r.s&&i.s&&(L?!F||L[0]!=F[0]:F)?L&&0==L[0]||!F?0*N:N/0:NaN);for(w=(E=new K(N)).c=[],N=o+(f=r.e-i.e)+1,c||(c=u,f=y(r.e/d)-y(i.e/d),N=N/d|0),h=0;F[h]==(L[h]||0);h++);if(F[h]>(L[h]||0)&&f--,N<0)w.push(1),g=!0;else{for(O=L.length,B=F.length,h=0,N+=2,(p=a(c/(F[0]+1)))>1&&(F=e(F,p,c),L=e(L,p,c),B=F.length,O=L.length),T=B,S=(A=L.slice(0,B)).length;S<B;A[S++]=0);_=F.slice(),_=[0].concat(_),I=F[0],F[1]>=c/2&&I++;do{if(p=0,(l=t(F,A,B,S))<0){if(v=A[0],B!=S&&(v=v*c+(A[1]||0)),(p=a(v/I))>1)for(p>=c&&(p=c-1),b=(m=e(F,p,c)).length,S=A.length;1==t(m,A,b,S);)p--,n(m,B<b?_:F,b,c),b=m.length,l=1;else 0==p&&(l=p=1),b=(m=F.slice()).length;if(b<S&&(m=[0].concat(m)),n(A,m,S,c),S=A.length,-1==l)for(;t(F,A,B,S)<1;)p++,n(A,B<S?_:F,S,c),S=A.length}else 0===l&&(p++,A=[0]);w[h++]=p,A[0]?A[S++]=L[T]||0:(A=[L[T]],S=1)}while((T++<O||null!=A[0])&&N--);g=null!=A[0],w[0]||w.splice(0,1)}if(c==u){for(h=1,N=w[0];N>=10;N/=10,h++);X(E,o+(E.e=h+f*d-1)+1,s,g)}else E.e=f,E.r=+g;return E}}(),O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,B=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,o=n?t:t.replace(N,"");if(_.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(O,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(I,"$1").replace(B,"0.$1")),t!=o))return new K(o,i);if(K.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},L.absoluteValue=L.abs=function(){var e=new K(this);return e.s<0&&(e.s=1),e},L.comparedTo=function(e,t){return b(this,new K(e,t))},L.decimalPlaces=L.dp=function(e,t){var n,r,i,o=this;if(null!=e)return E(e,0,p),null==t?t=D:E(t,0,8),X(new K(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-y(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},L.dividedBy=L.div=function(e,t){return n(this,new K(e,t),C,D)},L.dividedToIntegerBy=L.idiv=function(e,t){return n(this,new K(e,t),0,1)},L.exponentiatedBy=L.pow=function(e,t){var n,r,i,o,l,u,f,h,g=this;if((e=new K(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+$(e));if(null!=t&&(t=new K(t)),l=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return h=new K(Math.pow(+$(g),l?e.s*(2-w(e)):+$(e))),t?h.mod(t):h;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new K(NaN);(r=!u&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||l&&g.c[1]>=24e7:g.c[0]<8e13||l&&g.c[0]<=9999975e7)))return o=g.s<0&&w(e)?-0:0,g.e>-1&&(o=1/o),new K(u?1/o:o);H&&(o=s(H/d+2))}for(l?(n=new K(.5),u&&(e.s=1),f=w(e)):f=(i=Math.abs(+$(e)))%2,h=new K(F);;){if(f){if(!(h=h.times(g)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(t))}if(i){if(0===(i=a(i/2)))break;f=i%2}else if(X(e=e.times(n),e.e+1,1),e.e>14)f=w(e);else{if(0===(i=+$(e)))break;f=i%2}g=g.times(g),o?g.c&&g.c.length>o&&(g.c.length=o):r&&(g=g.mod(t))}return r?h:(u&&(h=F.div(h)),t?h.mod(t):o?X(h,H,D,void 0):h)},L.integerValue=function(e){var t=new K(this);return null==e?e=D:E(e,0,8),X(t,t.e+1,e)},L.isEqualTo=L.eq=function(e,t){return 0===b(this,new K(e,t))},L.isFinite=function(){return!!this.c},L.isGreaterThan=L.gt=function(e,t){return b(this,new K(e,t))>0},L.isGreaterThanOrEqualTo=L.gte=function(e,t){return 1===(t=b(this,new K(e,t)))||0===t},L.isInteger=function(){return!!this.c&&y(this.e/d)>this.c.length-2},L.isLessThan=L.lt=function(e,t){return b(this,new K(e,t))<0},L.isLessThanOrEqualTo=L.lte=function(e,t){return-1===(t=b(this,new K(e,t)))||0===t},L.isNaN=function(){return!this.s},L.isNegative=function(){return this.s<0},L.isPositive=function(){return this.s>0},L.isZero=function(){return!!this.c&&0==this.c[0]},L.minus=function(e,t){var n,r,i,o,s=this,a=s.s;if(t=(e=new K(e,t)).s,!a||!t)return new K(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/d,l=e.e/d,f=s.c,h=e.c;if(!c||!l){if(!f||!h)return f?(e.s=-t,e):new K(h?s:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new K(f[0]?s:3==D?-0:0)}if(c=y(c),l=y(l),f=f.slice(),a=c-l){for((o=a<0)?(a=-a,i=f):(l=c,i=h),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=f.length)<(t=h.length))?a:t,a=t=0;t<r;t++)if(f[t]!=h[t]){o=f[t]<h[t];break}if(o&&(i=f,f=h,h=i,e.s=-e.s),(t=(r=h.length)-(n=f.length))>0)for(;t--;f[n++]=0);for(t=u-1;r>a;){if(f[--r]<h[r]){for(n=r;n&&!f[--n];f[n]=t);--f[n],f[r]+=u}f[r]-=h[r]}for(;0==f[0];f.splice(0,1),--l);return f[0]?W(e,f,l):(e.s=3==D?-1:1,e.c=[e.e=0],e)},L.modulo=L.mod=function(e,t){var r,i,o=this;return e=new K(e,t),!o.c||!e.s||e.c&&!e.c[0]?new K(NaN):!e.c||o.c&&!o.c[0]?new K(o):(9==k?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,k),(e=o.minus(r.times(e))).c[0]||1!=k||(e.s=o.s),e)},L.multipliedBy=L.times=function(e,t){var n,r,i,o,s,a,c,l,f,h,p,m,b,E,w,A=this,S=A.c,v=(e=new K(e,t)).c;if(!(S&&v&&S[0]&&v[0]))return!A.s||!e.s||S&&!S[0]&&!v||v&&!v[0]&&!S?e.c=e.e=e.s=null:(e.s*=A.s,S&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(A.e/d)+y(e.e/d),e.s*=A.s,(c=S.length)<(h=v.length)&&(b=S,S=v,v=b,i=c,c=h,h=i),i=c+h,b=[];i--;b.push(0));for(E=u,w=g,i=h;--i>=0;){for(n=0,p=v[i]%w,m=v[i]/w|0,o=i+(s=c);o>i;)n=((l=p*(l=S[--s]%w)+(a=m*l+(f=S[s]/w|0)*p)%w*w+b[o]+n)/E|0)+(a/w|0)+m*f,b[o--]=l%E;b[o]=n}return n?++r:b.splice(0,1),W(e,b,r)},L.negated=function(){var e=new K(this);return e.s=-e.s||null,e},L.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new K(e,t)).s,!i||!t)return new K(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/d,s=e.e/d,a=r.c,c=e.c;if(!o||!s){if(!a||!c)return new K(i/0);if(!a[0]||!c[0])return c[0]?e:new K(a[0]?r:0*i)}if(o=y(o),s=y(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=c):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=c.length)<0&&(n=c,c=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/u|0,a[t]=u===a[t]?0:a[t]%u;return i&&(a=[i].concat(a),++s),W(e,a,s)},L.precision=L.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return E(e,1,p),null==t?t=D:E(t,0,8),X(new K(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},L.shiftedBy=function(e){return E(e,-9007199254740991,f),this.times("1e"+e)},L.squareRoot=L.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,c=s.s,l=s.e,u=C+4,d=new K("0.5");if(1!==c||!a||!a[0])return new K(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+$(s)))||c==1/0?(((t=m(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(+t),l=y((l+1)/2)-(l<0||l%2),r=new K(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new K(c+""),r.c[0])for((c=(l=r.e)+u)<3&&(c=0);;)if(o=r,r=d.times(o.plus(n(s,o,u,1))),m(o.c).slice(0,c)===(t=m(r.c)).slice(0,c)){if(r.e<l&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(X(r,r.e+C+2,1),e=!r.times(r).eq(s));break}if(!i&&(X(o,o.e+C+2,0),o.times(o).eq(s))){r=o;break}u+=4,c+=4,i=1}return X(r,r.e+C+1,D,e)},L.toExponential=function(e,t){return null!=e&&(E(e,0,p),e++),G(this,e,t,1)},L.toFixed=function(e,t){return null!=e&&(E(e,0,p),e=e+this.e+1),G(this,e,t)},L.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var o,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",d=s[0],f=s[1],h=i.s<0,g=h?d.slice(1):d,p=g.length;if(l&&(o=a,a=l,l=o,p-=o),a>0&&p>0){for(o=p%a||a,d=g.substr(0,o);o<p;o+=a)d+=u+g.substr(o,a);l>0&&(d+=u+g.slice(o)),h&&(d="-"+d)}r=f?d+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):d}return(n.prefix||"")+r+(n.suffix||"")},L.toFraction=function(e){var t,r,i,o,s,a,l,u,f,g,p,y,b=this,E=b.c;if(null!=e&&(!(l=new K(e)).isInteger()&&(l.c||1!==l.s)||l.lt(F)))throw Error(c+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+$(l));if(!E)return new K(b);for(t=new K(F),f=r=new K(F),i=u=new K(F),y=m(E),s=t.e=y.length-b.e-1,t.c[0]=h[(a=s%d)<0?d+a:a],e=!e||l.comparedTo(t)>0?s>0?t:f:l,a=x,x=1/0,l=new K(y),u.c[0]=0;g=n(l,t,0,1),1!=(o=r.plus(g.times(i))).comparedTo(e);)r=i,i=o,f=u.plus(g.times(o=f)),u=o,t=l.minus(g.times(o=t)),l=o;return o=n(e.minus(r),i,0,1),u=u.plus(o.times(f)),r=r.plus(o.times(i)),u.s=f.s=b.s,p=n(f,i,s*=2,D).minus(b).abs().comparedTo(n(u,r,s,D).minus(b).abs())<1?[f,i]:[u,r],x=a,p},L.toNumber=function(){return+$(this)},L.toPrecision=function(e,t){return null!=e&&E(e,1,p),G(this,e,t,2)},L.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=M||o>=P?A(m(n.c),o):S(m(n.c),o,"0"):10===e&&z?t=S(m((n=X(new K(n),C+o+1,D)).c),n.e,"0"):(E(e,2,j.length,"Base"),t=r(S(m(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},L.valueOf=L.toJSON=function(){return $(this)},L._isBigNumber=!0,null!=t&&K.set(t),K}(),i.default=i.BigNumber=i,void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},751:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFlags=void 0,function(e){e[e.lsfVaultPrivate=65536]="lsfVaultPrivate"}(n||(t.VaultFlags=n={}))},802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=d,t.pow=f,t.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},t.invert=h,t.tonelliShanks=g,t.FpSqrt=p,t.validateField=function(e){const t=y.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,r.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=b,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?h(n,e.ORDER):e.inv(n))},t.FpLegendre=E,t.FpIsSquare=function(e){const t=E(e.ORDER);return n=>{const r=t(e,n);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}},t.nLength=w,t.Field=function(e,t,n=!1,s={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:a,nByteLength:c}=w(e,t);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const u=Object.freeze({ORDER:e,isLE:n,BITS:a,BYTES:c,MASK:(0,r.bitMask)(a),ZERO:i,ONE:o,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,n)=>d(t+n,e),sub:(t,n)=>d(t-n,e),mul:(t,n)=>d(t*n,e),pow:(e,t)=>m(u,e,t),div:(t,n)=>d(t*h(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(t=>(l||(l=p(e)),l(u,t))),invertBatch:e=>b(u,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?(0,r.numberToBytesLE)(e,c):(0,r.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e)}});return Object.freeze(u)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,s=w(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=A,t.getMinHashLength=S,t.mapHashToField=function(e,t,n=!1){const i=e.length,s=A(t),a=S(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=d(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o;return n?(0,r.numberToBytesLE)(c,s):(0,r.numberToBytesBE)(c,s)};const r=n(3449),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),l=BigInt(5),u=BigInt(8);function d(e,t){const n=e%t;return n>=i?n:t+n}function f(e,t,n){if(t<i)throw new Error("invalid exponent, negatives unsupported");if(n<=i)throw new Error("invalid modulus");if(n===o)return i;let r=o;for(;t>i;)t&o&&(r=r*e%n),e=e*e%n,t>>=o;return r}function h(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let n=d(e,t),r=t,s=i,a=o,c=o,l=i;for(;n!==i;){const e=r/n,t=r%n,i=s-c*e,o=a-l*e;r=n,n=t,s=c,a=l,c=i,l=o}if(r!==o)throw new Error("invert: does not exist");return d(s,t)}function g(e){const t=(e-o)/s;let n,r,a;for(n=e-o,r=0;n%s===i;n/=s,r++);for(a=s;a<e&&f(a,t,e)!==e-o;a++)if(a>1e3)throw new Error("Cannot find square root: likely non-prime P");if(1===r){const t=(e+o)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const l=(n+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=r,c=e.pow(e.mul(e.ONE,a),n),u=e.pow(i,l),d=e.pow(i,n);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(d);t<s&&!e.eql(n,e.ONE);t++)n=e.sqr(n);const n=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(n),u=e.mul(u,n),d=e.mul(d,c),s=t}return u}}function p(e){if(e%c===a){const t=(e+o)/c;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%u===l){const t=(e-l)/u;return function(e,n){const r=e.mul(n,s),i=e.pow(r,t),o=e.mul(n,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}}return g(e)}t.isNegativeLE=(e,t)=>(d(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,n){if(n<i)throw new Error("invalid exponent, negatives unsupported");if(n===i)return e.ONE;if(n===o)return t;let r=e.ONE,s=t;for(;n>i;)n&o&&(r=e.mul(r,s)),s=e.sqr(s),n>>=o;return r}function b(e,t){const n=new Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n}function E(e){const t=(e-o)/s;return(e,n)=>e.pow(n,t)}function w(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function A(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function S(e){const t=A(e);return t+Math.ceil(t/2)}},811:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.handleStreamPartialPayment=t.handlePartialPayment=void 0;const i=r(n(735)),o=n(5620),s=n(9843),a=n(99);function c(e,t){var n,r;if(null==e||null==t||"Payment"!==e.TransactionType)return!1;let c=t;if("string"==typeof c){if("unavailable"===c)return!1;c=(0,o.decode)(c)}if(!("number"==typeof e.Flags?(0,a.isFlagEnabled)(e.Flags,s.PaymentFlags.tfPartialPayment):null===(n=e.Flags)||void 0===n?void 0:n.tfPartialPayment))return!1;const l=c.delivered_amount,u=null!==(r=e.DeliverMax)&&void 0!==r?r:e.Amount;return void 0!==l&&!function(e,t){if("string"==typeof e&&"string"==typeof t)return e===t;if("string"==typeof e||"string"==typeof t)return!1;if((0,s.isMPTAmount)(e)&&(0,s.isMPTAmount)(t)){const n=new i.default(e.value),r=new i.default(t.value);return e.mpt_issuance_id===t.mpt_issuance_id&&n.isEqualTo(r)}if((0,s.isMPTAmount)(e)||(0,s.isMPTAmount)(t))return!1;const n=new i.default(e.value),r=new i.default(t.value);return e.currency===t.currency&&e.issuer===t.issuer&&n.isEqualTo(r)}(l,u)}t.handlePartialPayment=function(e,t){var n;if(function(e,t){switch(e){case"tx":return function(e){return c(e.result.tx_json,e.result.meta)}(t);case"transaction_entry":return function(e){return c(e.result.tx_json,e.result.metadata)}(t);case"account_tx":return function(e){const{transactions:t}=e.result;return t.some(e=>{if(null!=e.tx_json){const t=e;return c(t.tx_json,t.meta)}const t=e;return c(t.tx,t.meta)})}(t);default:return!1}}(e,t)){const e=null!==(n=t.warnings)&&void 0!==n?n:[],r={id:2001,message:"This response contains a Partial Payment"};e.push(r),t.warnings=e}},t.handleStreamPartialPayment=function(e,t){var n,r;if(c(null!==(n=e.tx_json)&&void 0!==n?n:e.transaction,e.meta)){const n=null!==(r=e.warnings)&&void 0!==r?r:[],i={id:2001,message:"This response contains a Partial Payment"};n.push(i),e.warnings=n,t("Partial payment received",JSON.stringify(e))}}},821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePermissionedDomainSet=void 0;const r=n(2794);t.validatePermissionedDomainSet=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateOptionalField)(e,"DomainID",r.isString),(0,r.validateRequiredField)(e,"AcceptedCredentials",r.isArray),(0,r.validateCredentialsList)(e.AcceptedCredentials,e.TransactionType,!1,10)}},857:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HDKey=t.HARDENED_OFFSET=void 0;const r=n(5827),i=n(9450),o=n(6202),s=n(1026),a=n(4233),c=n(5492),l=n(1616),u=i.secp256k1.ProjectivePoint,d=(0,l.createBase58check)(a.sha256);function f(e){(0,c.abytes)(e);const t=0===e.length?"0":(0,c.bytesToHex)(e);return BigInt("0x"+t)}const h=(0,c.utf8ToBytes)("Bitcoin seed"),g={private:76066276,public:76067358};t.HARDENED_OFFSET=2147483648;const p=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error("invalid number, should be from 0 to 2**32-1, got "+e);const t=new Uint8Array(4);return(0,c.createView)(t).setUint32(0,e,!1),t};class y{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return e=this.pubHash,(0,c.createView)(e).getUint32(0,!1);var e}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const e=this.privateKey;if(!e)throw new Error("No private key");return d.encode(this.serialize(this.versions.private,(0,c.concatBytes)(new Uint8Array([0]),e)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return d.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(e,t=g){if((0,c.abytes)(e),8*e.length<128||8*e.length>512)throw new Error("HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got "+e.length);const n=(0,o.hmac)(a.sha512,h,e);return new y({versions:t,chainCode:n.slice(32),privateKey:n.slice(0,32)})}static fromExtendedKey(e,t=g){const n=d.decode(e),r=(0,c.createView)(n),i=r.getUint32(0,!1),o={versions:t,depth:n[4],parentFingerprint:r.getUint32(5,!1),index:r.getUint32(9,!1),chainCode:n.slice(13,45)},s=n.slice(45),a=0===s[0];if(i!==t[a?"private":"public"])throw new Error("Version mismatch");return new y(a?{...o,privateKey:s.slice(1)}:{...o,publicKey:s})}static fromJSON(e){return y.fromExtendedKey(e.xpriv)}constructor(e){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!e||"object"!=typeof e)throw new Error("HDKey.constructor must not be called directly");if(this.versions=e.versions||g,this.depth=e.depth||0,this.chainCode=e.chainCode||null,this.index=e.index||0,this.parentFingerprint=e.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(e.publicKey&&e.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(e.privateKey){if(!i.secp256k1.utils.isValidPrivateKey(e.privateKey))throw new Error("Invalid private key");this.privKey="bigint"==typeof e.privateKey?e.privateKey:f(e.privateKey),this.privKeyBytes=function(e){if("bigint"!=typeof e)throw new Error("bigint expected");return(0,c.hexToBytes)(e.toString(16).padStart(64,"0"))}(this.privKey),this.pubKey=i.secp256k1.getPublicKey(e.privateKey,!0)}else{if(!e.publicKey)throw new Error("HDKey: no public or private key provided");this.pubKey=u.fromHex(e.publicKey).toRawBytes(!0)}var t;this.pubHash=(t=this.pubKey,(0,s.ripemd160)((0,a.sha256)(t)))}derive(e){if(!/^[mM]'?/.test(e))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(e))return this;const n=e.replace(/^[mM]'?\//,"").split("/");let r=this;for(const e of n){const n=/^(\d+)('?)$/.exec(e),i=n&&n[1];if(!n||3!==n.length||"string"!=typeof i)throw new Error("invalid child index: "+e);let o=+i;if(!Number.isSafeInteger(o)||o>=t.HARDENED_OFFSET)throw new Error("Invalid index");"'"===n[2]&&(o+=t.HARDENED_OFFSET),r=r.deriveChild(o)}return r}deriveChild(e){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=p(e);if(e>=t.HARDENED_OFFSET){const e=this.privateKey;if(!e)throw new Error("Could not derive hardened child key");n=(0,c.concatBytes)(new Uint8Array([0]),e,n)}else n=(0,c.concatBytes)(this.pubKey,n);const s=(0,o.hmac)(a.sha512,this.chainCode,n),l=f(s.slice(0,32)),d=s.slice(32);if(!i.secp256k1.utils.isValidPrivateKey(l))throw new Error("Tweak bigger than curve order");const h={versions:this.versions,chainCode:d,depth:this.depth+1,parentFingerprint:this.fingerprint,index:e};try{if(this.privateKey){const e=(0,r.mod)(this.privKey+l,i.secp256k1.CURVE.n);if(!i.secp256k1.utils.isValidPrivateKey(e))throw new Error("The tweak was out of range or the resulted private key is invalid");h.privateKey=e}else{const e=u.fromHex(this.pubKey).add(u.fromPrivateKey(l));if(e.equals(u.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");h.publicKey=e.toRawBytes(!0)}return new y(h)}catch(t){return this.deriveChild(e+1)}}sign(e){if(!this.privateKey)throw new Error("No privateKey set!");return(0,c.abytes)(e,32),i.secp256k1.sign(e,this.privKey).toCompactRawBytes()}verify(e,t){if((0,c.abytes)(e,32),(0,c.abytes)(t,64),!this.publicKey)throw new Error("No publicKey set!");let n;try{n=i.secp256k1.Signature.fromCompact(t)}catch(e){return!1}return i.secp256k1.verify(n,e,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(e,t){if(!this.chainCode)throw new Error("No chainCode set");return(0,c.abytes)(t,33),(0,c.concatBytes)(p(e),new Uint8Array([this.depth]),p(this.parentFingerprint),p(this.index),this.chainCode,t)}}t.HDKey=y},892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryParser=void 0;const r=n(1141),i=n(619);t.BinaryParser=class{constructor(e,t=r.DEFAULT_DEFINITIONS){this.bytes=(0,i.hexToBytes)(e),this.definitions=t}peek(){if(0===this.bytes.byteLength)throw new Error;return this.bytes[0]}skip(e){if(e>this.bytes.byteLength)throw new Error;this.bytes=this.bytes.slice(e)}read(e){if(e>this.bytes.byteLength)throw new Error;const t=this.bytes.slice(0,e);return this.skip(e),t}readUIntN(e){if(0>=e||e>4)throw new Error("invalid n");return this.read(e).reduce((e,t)=>e<<8|t)>>>0}readUInt8(){return this.readUIntN(1)}readUInt16(){return this.readUIntN(2)}readUInt32(){return this.readUIntN(4)}size(){return this.bytes.byteLength}end(e){const t=this.bytes.byteLength;return 0===t||void 0!==e&&t<=e}readVariableLength(){return this.read(this.readVariableLengthLength())}readVariableLengthLength(){const e=this.readUInt8();if(e<=192)return e;if(e<=240)return 193+256*(e-193)+this.readUInt8();if(e<=254)return 12481+65536*(e-241)+256*this.readUInt8()+this.readUInt8();throw new Error("Invalid variable length indicator")}readFieldOrdinal(){let e=this.readUInt8(),t=15&e;if(e>>=4,0===e&&(e=this.readUInt8(),0===e||e<16))throw new Error(`Cannot read FieldOrdinal, type_code ${e} out of range`);if(0===t&&(t=this.readUInt8(),0===t||t<16))throw new Error(`Cannot read FieldOrdinal, field_code ${t} out of range`);return e<<16|t}readField(){return this.definitions.field.fromString(this.readFieldOrdinal().toString())}readType(e){return e.fromParser(this)}typeForField(e){return e.associatedType}readFieldValue(e){const t=this.typeForField(e);if(!t)throw new Error(`unsupported: (${e.name}, ${e.type.name})`);const n=e.isVariableLengthEncoded?this.readVariableLengthLength():void 0,r=t.fromParser(this,n);if(void 0===r)throw new Error(`fromParser for (${e.name}, ${e.type.name}) -> undefined `);return r}readFieldAndValue(){const e=this.readField();return[e,this.readFieldValue(e)]}}},964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2427);class i extends r.EventEmitter{constructor(e,t,n){super(),this.ws=new WebSocket(e),this.ws.onclose=e=>{let t;e.reason&&(t=(new TextEncoder).encode(e.reason)),this.emit("close",e.code,t)},this.ws.onopen=()=>{this.emit("open")},this.ws.onerror=e=>{this.emit("error",e)},this.ws.onmessage=e=>{this.emit("message",e.data)}}get readyState(){return this.ws.readyState}close(e,t){1===this.readyState&&this.ws.close(e,t)}send(e){this.ws.send(e)}}i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,t.default=i},988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMWithdraw=t.AMMWithdrawFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfLPToken=65536]="tfLPToken",e[e.tfWithdrawAll=131072]="tfWithdrawAll",e[e.tfOneAssetWithdrawAll=262144]="tfOneAssetWithdrawAll",e[e.tfSingleAsset=524288]="tfSingleAsset",e[e.tfTwoAsset=1048576]="tfTwoAsset",e[e.tfOneAssetLPToken=2097152]="tfOneAssetLPToken",e[e.tfLimitLPToken=4194304]="tfLimitLPToken"}(o||(t.AMMWithdrawFlags=o={})),t.validateAMMWithdraw=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMWithdraw: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMWithdraw: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMWithdraw: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMWithdraw: Asset2 must be a Currency");if(null!=e.Amount2&&null==e.Amount)throw new r.ValidationError("AMMWithdraw: must set Amount with Amount2");if(null!=e.EPrice&&null==e.Amount)throw new r.ValidationError("AMMWithdraw: must set Amount with EPrice");if(null!=e.LPTokenIn&&!(0,i.isIssuedCurrencyAmount)(e.LPTokenIn))throw new r.ValidationError("AMMWithdraw: LPTokenIn must be an IssuedCurrencyAmount");if(null!=e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMWithdraw: Amount must be an Amount");if(null!=e.Amount2&&!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMWithdraw: Amount2 must be an Amount");if(null!=e.EPrice&&!(0,i.isAmount)(e.EPrice))throw new r.ValidationError("AMMWithdraw: EPrice must be an Amount")}},1026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;const r=n(6897),i=n(5492),o=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),s=new Uint32Array(80);class a extends r.HashMD{constructor(){super(64,20,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4]}get(){const{A:e,B:t,C:n,D:r,E:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i}process(e,t){for(let n=0;n<16;n++,t+=4)s[n]=e.getUint32(t,!1);for(let e=16;e<80;e++)s[e]=(0,i.rotl)(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let{A:n,B:o,C:a,D:c,E:l}=this;for(let e=0;e<80;e++){let t,u;e<20?(t=(0,r.Chi)(o,a,c),u=1518500249):e<40?(t=o^a^c,u=1859775393):e<60?(t=(0,r.Maj)(o,a,c),u=2400959708):(t=o^a^c,u=3395469782);const d=(0,i.rotl)(n,5)+t+l+u+s[e]|0;l=c,c=a,a=(0,i.rotl)(o,30),o=n,n=d}n=n+this.A|0,o=o+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,this.set(n,o,a,c,l)}roundClean(){(0,i.clean)(s)}destroy(){this.set(0,0,0,0,0),(0,i.clean)(this.buffer)}}t.SHA1=a,t.sha1=(0,i.createHasher)(()=>new a);const c=Math.pow(2,32),l=Array.from({length:64},(e,t)=>Math.floor(c*Math.abs(Math.sin(t+1)))),u=o.slice(0,4),d=new Uint32Array(16);class f extends r.HashMD{constructor(){super(64,16,8,!0),this.A=0|u[0],this.B=0|u[1],this.C=0|u[2],this.D=0|u[3]}get(){const{A:e,B:t,C:n,D:r}=this;return[e,t,n,r]}set(e,t,n,r){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r}process(e,t){for(let n=0;n<16;n++,t+=4)d[n]=e.getUint32(t,!0);let{A:n,B:o,C:s,D:a}=this;for(let e=0;e<64;e++){let t,c,u;e<16?(t=(0,r.Chi)(o,s,a),c=e,u=[7,12,17,22]):e<32?(t=(0,r.Chi)(a,o,s),c=(5*e+1)%16,u=[5,9,14,20]):e<48?(t=o^s^a,c=(3*e+5)%16,u=[4,11,16,23]):(t=s^(o|~a),c=7*e%16,u=[6,10,15,21]),t=t+n+l[e]+d[c],n=a,a=s,s=o,o+=(0,i.rotl)(t,u[e%4])}n=n+this.A|0,o=o+this.B|0,s=s+this.C|0,a=a+this.D|0,this.set(n,o,s,a)}roundClean(){(0,i.clean)(d)}destroy(){this.set(0,0,0,0),(0,i.clean)(this.buffer)}}t.MD5=f,t.md5=(0,i.createHasher)(()=>new f);const h=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),g=(()=>Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)))(),p=(()=>g.map(e=>(9*e+5)%16))(),y=(()=>{const e=[[g],[p]];for(let t=0;t<4;t++)for(let n of e)n.push(n[t].map(e=>h[e]));return e})(),m=(()=>y[0])(),b=(()=>y[1])(),E=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),w=m.map((e,t)=>e.map(e=>E[t][e])),A=b.map((e,t)=>e.map(e=>E[t][e])),S=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),v=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function T(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}const O=new Uint32Array(16);class I extends r.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:r,h4:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|r,this.h4=0|i}process(e,t){for(let n=0;n<16;n++,t+=4)O[n]=e.getUint32(t,!0);let n=0|this.h0,r=n,o=0|this.h1,s=o,a=0|this.h2,c=a,l=0|this.h3,u=l,d=0|this.h4,f=d;for(let e=0;e<5;e++){const t=4-e,h=S[e],g=v[e],p=m[e],y=b[e],E=w[e],I=A[e];for(let t=0;t<16;t++){const r=(0,i.rotl)(n+T(e,o,a,l)+O[p[t]]+h,E[t])+d|0;n=d,d=l,l=0|(0,i.rotl)(a,10),a=o,o=r}for(let e=0;e<16;e++){const n=(0,i.rotl)(r+T(t,s,c,u)+O[y[e]]+g,I[e])+f|0;r=f,f=u,u=0|(0,i.rotl)(c,10),c=s,s=n}}this.set(this.h1+a+u|0,this.h2+l+f|0,this.h3+d+r|0,this.h4+n+s|0,this.h0+o+c|0)}roundClean(){(0,i.clean)(O)}destroy(){this.destroyed=!0,(0,i.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=I,t.ripemd160=(0,i.createHasher)(()=>new I)},1056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=l,t.expand_message_xof=u,t.hash_to_field=d,t.isogenyMap=function(e,t){const n=t.map(e=>Array.from(e).reverse());return(t,r)=>{const[i,o,s,a]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r)));return t=e.div(i,o),r=e.mul(r,e.div(s,a)),{x:t,y:r}}},t.createHasher=function(e,t,n){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,i){const o=d(r,2,{...n,DST:n.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,i){const o=d(r,1,{...n,DST:n.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(const e of n)if("bigint"!=typeof e)throw new Error("mapToCurve: expected array of bigints");const r=e.fromAffine(t(n)).clearCofactor();return r.assertValidity(),r}}};const r=n(802),i=n(3449),o=i.bytesToNumberBE;function s(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,n,r){(0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255&&(t=r((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=r,u=Math.ceil(n/o);if(n>65535||u>255)throw new Error("expand_message_xmd: invalid lenInBytes");const d=(0,i.concatBytes)(t,s(t.length,1)),f=s(0,l),h=s(n,2),g=new Array(u),p=r((0,i.concatBytes)(f,e,h,s(0,1),d));g[0]=r((0,i.concatBytes)(p,s(1,1),d));for(let e=1;e<=u;e++){const t=[a(p,g[e-1]),s(e+1,1),d];g[e]=r((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,n)}function u(e,t,n,r,o){if((0,i.abytes)(e),(0,i.abytes)(t),c(n),t.length>255){const e=Math.ceil(2*r/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(e).update(s(n,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,n){(0,i.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:d,hash:f,expand:h,DST:g}=n;(0,i.abytes)(e),c(t);const p="string"==typeof g?(0,i.utf8ToBytes)(g):g,y=s.toString(2).length,m=Math.ceil((y+a)/8),b=t*d*m;let E;if("xmd"===h)E=l(e,p,b,f);else if("xof"===h)E=u(e,p,b,a,f);else{if("_internal_pass"!==h)throw new Error('expand must be "xmd" or "xof"');E=e}const w=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let n=0;n<d;n++){const i=m*(n+e*d),a=E.subarray(i,i+m);t[n]=(0,r.mod)(o(a),s)}w[e]=t}return w}},1141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TRANSACTION_TYPES=t.TransactionType=t.TransactionResult=t.LedgerEntryType=t.Type=t.Field=t.DEFAULT_DEFINITIONS=t.XrplDefinitionsBase=t.Bytes=void 0;const i=r(n(8102)),o=n(8816);Object.defineProperty(t,"XrplDefinitionsBase",{enumerable:!0,get:function(){return o.XrplDefinitionsBase}}),Object.defineProperty(t,"Bytes",{enumerable:!0,get:function(){return o.Bytes}});const s=new o.XrplDefinitionsBase(i.default,{});t.DEFAULT_DEFINITIONS=s;const a=s.type;t.Type=a;const c=s.ledgerEntryType;t.LedgerEntryType=c;const l=s.transactionType;t.TransactionType=l;const u=s.transactionResult;t.TransactionResult=u;const d=s.field;t.Field=d;const f=s.transactionNames;t.TRANSACTION_TYPES=f},1218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlist=void 0,t.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")},1275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Comparable=t.SerializedType=void 0;const r=n(7995),i=n(619);class o{constructor(e){this.bytes=new Uint8Array(0),this.bytes=null!=e?e:new Uint8Array(0)}static fromParser(e,t){throw new Error("fromParser not implemented")}static from(e){throw new Error("from not implemented")}toBytesSink(e){e.put(this.bytes)}toHex(){return(0,i.bytesToHex)(this.toBytes())}toBytes(){if(this.bytes)return this.bytes;const e=new r.BytesList;return this.toBytesSink(e),e.toBytes()}toJSON(e,t){return this.toHex()}toString(){return this.toHex()}}t.SerializedType=o,t.Comparable=class extends o{lt(e){return this.compareTo(e)<0}eq(e){return 0===this.compareTo(e)}gt(e){return this.compareTo(e)>0}gte(e){return this.compareTo(e)>-1}lte(e){return this.compareTo(e)<1}compareTo(e){throw new Error(`cannot compare ${this.toString()} and ${e.toString()}`)}}},1279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_API_VERSION=t.RIPPLED_API_V2=t.RIPPLED_API_V1=void 0,t.RIPPLED_API_V1=1,t.RIPPLED_API_V2=2,t.DEFAULT_API_VERSION=t.RIPPLED_API_V2},1300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceDestroy=void 0;const r=n(2794);t.validateMPTokenIssuanceDestroy=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"MPTokenIssuanceID",r.isString)}},1366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt16=void 0;const r=n(3328),i=n(5517);class o extends r.UInt{constructor(e){super(null!=e?e:o.defaultUInt16.bytes)}static fromParser(e){return new o(e.read(o.width))}static from(e){if(e instanceof o)return e;if("number"==typeof e){o.checkUintRange(e,0,65535);const t=new Uint8Array(o.width);return(0,i.writeUInt16BE)(t,e,0),new o(t)}throw new Error("Can not construct UInt16 with given value")}valueOf(){return parseInt((0,i.readUInt16BE)(this.bytes,0))}}t.UInt16=o,o.width=2,o.defaultUInt16=new o(new Uint8Array(o.width))},1377:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashTxTree=t.hashStateTree=t.hashLedger=t.hashSignedTx=t.hashLedgerHeader=t.hashPaymentChannel=t.hashEscrow=t.hashTrustline=t.hashOfferId=t.hashSignerListId=t.hashAccountRoot=t.hashTx=void 0;const a=n(619),c=s(n(735)),l=n(6333),u=o(n(6228));t.hashLedger=u.default,Object.defineProperty(t,"hashLedgerHeader",{enumerable:!0,get:function(){return u.hashLedgerHeader}}),Object.defineProperty(t,"hashSignedTx",{enumerable:!0,get:function(){return u.hashSignedTx}}),Object.defineProperty(t,"hashTxTree",{enumerable:!0,get:function(){return u.hashTxTree}}),Object.defineProperty(t,"hashStateTree",{enumerable:!0,get:function(){return u.hashStateTree}});const d=s(n(9373)),f=s(n(3627)),h=s(n(2530)),g=16;function p(e){return(0,a.bytesToHex)((0,l.decodeAccountID)(e))}function y(e){return f.default[e].charCodeAt(0).toString(g).padStart(4,"0")}t.hashTx=function(e){const t=d.default.TRANSACTION_SIGN.toString(g).toUpperCase();return(0,h.default)(t+e)},t.hashAccountRoot=function(e){return(0,h.default)(y("account")+p(e))},t.hashSignerListId=function(e){return(0,h.default)(`${y("signerList")+p(e)}00000000`)},t.hashOfferId=function(e,t){const n=f.default.offer.charCodeAt(0).toString(g).padStart(2,"0"),r=t.toString(g).padStart(8,"0"),i=`00${n}`;return(0,h.default)(i+p(e)+r)},t.hashTrustline=function(e,t,n){const r=p(e),i=p(t),o=new c.default(r,16).isGreaterThan(new c.default(i,16)),s=o?i:r,l=o?r:i,u=y("rippleState");return(0,h.default)(u+s+l+function(e){if(3!==e.length)return e;const t=Array(20).fill(0);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),(0,a.bytesToHex)(Uint8Array.from(t))}(n))},t.hashEscrow=function(e,t){return(0,h.default)(y("escrow")+p(e)+t.toString(g).padStart(8,"0"))},t.hashPaymentChannel=function(e,t,n){return(0,h.default)(y("paychan")+p(e)+p(t)+n.toString(g).padStart(8,"0"))}},1386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOracleSet=void 0;const r=n(255),i=n(99),o=n(2794);t.validateOracleSet=function(e){(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"OracleDocumentID",o.isNumber),(0,o.validateRequiredField)(e,"LastUpdateTime",o.isNumber),(0,o.validateOptionalField)(e,"Provider",o.isString),(0,o.validateOptionalField)(e,"URI",o.isString),(0,o.validateOptionalField)(e,"AssetClass",o.isString),(0,o.validateRequiredField)(e,"PriceDataSeries",e=>{if(!(0,o.isArray)(e))throw new r.ValidationError("OracleSet: PriceDataSeries must be an array");if(e.length>10)throw new r.ValidationError("OracleSet: PriceDataSeries must have at most 10 PriceData objects");for(const t of e){if(!(0,o.isRecord)(t))throw new r.ValidationError("OracleSet: PriceDataSeries must be an array of objects");const e=t.PriceData;if(!(0,o.isRecord)(e))throw new r.ValidationError("OracleSet: PriceDataSeries must have a `PriceData` object");if(1!==Object.keys(t).length)throw new r.ValidationError("OracleSet: PriceDataSeries must only have a single PriceData object");if(null==e.BaseAsset||"string"!=typeof e.BaseAsset)throw new r.ValidationError("OracleSet: PriceDataSeries must have a `BaseAsset` string");if("string"!=typeof e.QuoteAsset)throw new r.ValidationError("OracleSet: PriceDataSeries must have a `QuoteAsset` string");if(null==e.AssetPrice!=(null==e.Scale))throw new r.ValidationError("OracleSet: PriceDataSeries must have both `AssetPrice` and `Scale` if any are present");if("AssetPrice"in e&&!(0,o.isNumber)(e.AssetPrice)){if("string"!=typeof e.AssetPrice)throw new r.ValidationError("OracleSet: Field AssetPrice must be a string or a number");if(!(0,i.isHex)(e.AssetPrice))throw new r.ValidationError("OracleSet: Field AssetPrice must be a valid hex string");if(e.AssetPrice.length<1||e.AssetPrice.length>16)throw new r.ValidationError("OracleSet: Length of AssetPrice field must be between 1 and 16 characters long")}if("Scale"in e){if(!(0,o.isNumber)(e.Scale))throw new r.ValidationError("OracleSet: invalid field Scale");if(e.Scale<0||e.Scale>10)throw new r.ValidationError("OracleSet: Scale must be in range 0-10")}}return!0})}},1441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePayment=t.PaymentFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;function a(e){return!(void 0!==e.account&&"string"!=typeof e.account||void 0!==e.currency&&"string"!=typeof e.currency||void 0!==e.issuer&&"string"!=typeof e.issuer||(void 0===e.account||void 0!==e.currency||void 0!==e.issuer)&&void 0===e.currency&&void 0===e.issuer)}function c(e){if(!Array.isArray(e)||0===e.length)return!1;for(const t of e)if(!a(t))return!1;return!0}!function(e){e[e.tfNoRippleDirect=65536]="tfNoRippleDirect",e[e.tfPartialPayment=131072]="tfPartialPayment",e[e.tfLimitQuality=262144]="tfLimitQuality"}(s||(t.PaymentFlags=s={})),t.validatePayment=function(e){if((0,o.validateBaseTransaction)(e),void 0===e.Amount)throw new r.ValidationError("PaymentTransaction: missing field Amount");if(!(0,o.isAmount)(e.Amount))throw new r.ValidationError("PaymentTransaction: invalid Amount");if((0,o.validateRequiredField)(e,"Destination",o.isAccount),(0,o.validateOptionalField)(e,"DestinationTag",o.isNumber),(0,o.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,o.MAX_AUTHORIZED_CREDENTIALS),void 0!==e.InvoiceID&&"string"!=typeof e.InvoiceID)throw new r.ValidationError("PaymentTransaction: InvoiceID must be a string");if((0,o.validateOptionalField)(e,"DomainID",o.isDomainID,{txType:"PaymentTransaction",paramName:"DomainID"}),void 0!==e.Paths&&!function(e){if(!(0,o.isArray)(e)||0===e.length)return!1;for(const t of e){if(!(0,o.isArray)(t)||0===t.length)return!1;if(!c(t))return!1}return!0}(e.Paths))throw new r.ValidationError("PaymentTransaction: invalid Paths");if(void 0!==e.SendMax&&!(0,o.isAmount)(e.SendMax))throw new r.ValidationError("PaymentTransaction: invalid SendMax");!function(e){var t;if(null!=e.DeliverMin){if(null==e.Flags)throw new r.ValidationError("PaymentTransaction: tfPartialPayment flag required with DeliverMin");const n=e.Flags;if(!("number"==typeof n?(0,i.isFlagEnabled)(n,s.tfPartialPayment):null!==(t=n.tfPartialPayment)&&void 0!==t&&t))throw new r.ValidationError("PaymentTransaction: tfPartialPayment flag required with DeliverMin");if(!(0,o.isAmount)(e.DeliverMin))throw new r.ValidationError("PaymentTransaction: invalid DeliverMin")}}(e)}},1533:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=void 0,t.fromBig=i,t.split=o,t.add=E;const n=BigInt(2**32-1),r=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[n[o],r[o]]=[s,a]}return[n,r]}const s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const l=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=l;const u=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=u;const d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;const f=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const g=(e,t)=>e;t.rotr32L=g;const p=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=p;const y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;const m=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=m;const b=(e,t,n)=>e<<n-32|t>>>64-n;function E(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}t.rotlBL=b;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const A=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=A;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=S;const v=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;t.add4H=v;const T=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);t.add5L=T;const O=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;t.add5H=O;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:l,rotrSL:u,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:g,rotlSH:p,rotlSL:y,rotlBH:m,rotlBL:b,add:E,add3L:w,add3H:A,add4L:S,add4H:v,add5H:O,add5L:T};t.default=I},1565:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.autofillBatchTxn=t.handleDeliverMax=t.checkAccountDeleteBlockers=t.setLatestValidatedLedgerSequence=t.getTransactionFee=t.setNextValidSequenceNumber=t.setValidAddresses=t.txNeedsNetworkID=void 0;const o=i(n(735)),s=n(6333),a=n(255),c=n(5684),l=i(n(6509));function u(e){return!!(void 0!==e.networkID&&e.networkID>1024&&e.buildVersion&&function(e,t){if(e===t)return!0;const n=e.split("."),r=t.split("."),i=parseInt(n[0],10),o=parseInt(n[1],10),s=parseInt(r[0],10),a=parseInt(r[1],10);if(i!==s)return i<s;if(o!==a)return o<a;const c=n[2].split("-"),l=r[2].split("-"),u=parseInt(c[0],10),d=parseInt(l[0],10);return u!==d?u<d:c.length!==l.length?c.length>l.length:2===c.length&&(c[1][0].startsWith(l[1][0])?c[1].startsWith("b")?parseInt(c[1].slice(1),10)<parseInt(l[1].slice(1),10):parseInt(c[1].slice(2),10)<parseInt(l[1].slice(2),10):c[1]<l[1])}("1.11.0",e.buildVersion))}function d(e,t,n){const{classicAccount:r,tag:i}=f(e[t]);if(e[t]=r,null!=i&&!1!==i){if(e[n]&&e[n]!==i)throw new a.ValidationError(`The ${n}, if present, must match the tag of the ${t} X-address`);e[n]=i}}function f(e,t){if((0,s.isValidXAddress)(e)){const n=(0,s.xAddressToClassicAddress)(e);if(null!=t&&n.tag!==t)throw new a.ValidationError("address includes a tag that does not match the tag specified in the transaction");return{classicAccount:n.classicAddress,tag:n.tag}}return{classicAccount:e,tag:t}}function h(e,t){const n=e[t];if("string"==typeof n){const{classicAccount:r}=f(n);e[t]=r}}function g(e,t){return r(this,void 0,void 0,function*(){const n={command:"account_info",account:t,ledger_index:"current"};return(yield e.request(n)).result.account_data.Sequence})}function p(e,t,n=0){return r(this,void 0,void 0,function*(){const i=yield(0,l.default)(e),s=(0,c.xrpToDrops)(i);let a=new o.default(s);const u=["AccountDelete","AMMCreate"].includes(t.TransactionType);if("EscrowFinish"===t.TransactionType&&null!=t.Fulfillment){const e=Math.ceil(t.Fulfillment.length/2);a=new o.default(y(s,33+e/16))}else if(u)a=yield function(e){var t;return r(this,void 0,void 0,function*(){const n=yield e.request({command:"server_state"}),r=null===(t=n.result.state.validated_ledger)||void 0===t?void 0:t.reserve_inc;return null==r?Promise.reject(new Error("Could not fetch Owner Reserve.")):new o.default(r)})}(e);else if("Batch"===t.TransactionType){const n=yield t.RawTransactions.reduce((t,n)=>r(this,void 0,void 0,function*(){const r=yield t,i=yield p(e,n.RawTransaction);return o.default.sum(r,i)}),Promise.resolve(new o.default(0)));a=o.default.sum(a.times(2),n)}n>0&&(a=o.default.sum(a,y(s,n)));const d=(0,c.xrpToDrops)(e.maxFeeXRP);return(u?a:o.default.min(a,d)).dp(0,o.default.ROUND_CEIL)})}function y(e,t){return new o.default(e).times(t).toString()}t.txNeedsNetworkID=u,t.setValidAddresses=function(e){d(e,"Account","SourceTag"),null!=e.Destination&&d(e,"Destination","DestinationTag"),h(e,"Authorize"),h(e,"Unauthorize"),h(e,"Owner"),h(e,"RegularKey")},t.setNextValidSequenceNumber=function(e,t){return r(this,void 0,void 0,function*(){t.Sequence=yield g(e,t.Account)})},t.getTransactionFee=function(e,t,n=0){return r(this,void 0,void 0,function*(){const r=yield p(e,t,n);t.Fee=r.toString(10)})},t.setLatestValidatedLedgerSequence=function(e,t){return r(this,void 0,void 0,function*(){const n=yield e.getLedgerIndex();t.LastLedgerSequence=n+20})},t.checkAccountDeleteBlockers=function(e,t){return r(this,void 0,void 0,function*(){const n={command:"account_objects",account:t.Account,ledger_index:"validated",deletion_blockers_only:!0},r=yield e.request(n);return new Promise((e,n)=>{r.result.account_objects.length>0&&n(new a.XrplError(`Account ${t.Account} cannot be deleted; there are Escrows, PayChannels, RippleStates, or Checks associated with the account.`,r.result.account_objects)),e()})})},t.handleDeliverMax=function(e){var t;if(null!=e.DeliverMax){if(null!==(t=e.Amount)&&void 0!==t||(e.Amount=e.DeliverMax),null!=e.Amount&&e.Amount!==e.DeliverMax)throw new a.ValidationError("PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided");delete e.DeliverMax}},t.autofillBatchTxn=function(e,t){return r(this,void 0,void 0,function*(){const n={};for(const r of t.RawTransactions){const i=r.RawTransaction;if(null==i.Sequence&&null==i.TicketSequence)if(i.Account in n)i.Sequence=n[i.Account],n[i.Account]+=1;else{const r=yield g(e,i.Account),o=i.Account===t.Account?r+1:r;n[i.Account]=o+1,i.Sequence=o}if(null==i.Fee)i.Fee="0";else if("0"!==i.Fee)throw new a.XrplError('Must have `Fee of "0" in inner Batch transaction.');if(null==i.SigningPubKey)i.SigningPubKey="";else if(""!==i.SigningPubKey)throw new a.XrplError('Must have `SigningPubKey` of "" in inner Batch transaction.');if(null!=i.TxnSignature)throw new a.XrplError("Must not have `TxnSignature` in inner Batch transaction.");if(null!=i.Signers)throw new a.XrplError("Must not have `Signers` in inner Batch transaction.");null==i.NetworkID&&u(e)&&(i.NetworkID=e.networkID)}})}},1602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equal=t.concat=t.HEX_REGEX=void 0;const r=n(5492);t.HEX_REGEX=/^[A-F0-9]*$/iu,t.concat=function(e){return(0,r.concatBytes)(...e)},t.equal=function(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Int8Array(e),r=new Int8Array(t);for(let t=0;t!==e.byteLength;t++)if(n[t]!==r[t])return!1;return!0}},1616:(e,t)=>{"use strict";function n(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function r(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function i(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>"string"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function o(e){if("function"!=typeof e)throw new Error("function expected");return!0}function s(e,t){if("string"!=typeof t)throw new Error(`${e}: string expected`);return!0}function a(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function c(e){if(!Array.isArray(e))throw new Error("array expected")}function l(e,t){if(!i(!0,t))throw new Error(`${e}: array of strings expected`)}function u(e,t){if(!i(!1,t))throw new Error(`${e}: array of numbers expected`)}function d(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map(e=>e.encode).reduceRight(n,t),decode:e.map(e=>e.decode).reduce(n,t)}}function f(e){const t="string"==typeof e?e.split(""):e,n=t.length;l("alphabet",t);const r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(c(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]})),decode:t=>(c(t),t.map(t=>{s("alphabet.decode",t);const n=r.get(t);if(void 0===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}function h(e=""){return s("join",e),{encode:t=>(l("join.decode",t),t.join(e)),decode:t=>(s("join.decode",t),t.split(e))}}function g(e,t="="){return a(e),s("padding",t),{encode(n){for(l("padding.encode",n);n.length*e%8;)n.push(t);return n},decode(n){l("padding.decode",n);let r=n.length;if(r*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw new Error("padding: invalid, string has too much padding");return n.slice(0,r)}}}function p(e){return o(e),{encode:e=>e,decode:t=>e(t)}}function y(e,t,n){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(c(e),!e.length)return[];let r=0;const i=[],o=Array.from(e,e=>{if(a(e),e<0||e>=t)throw new Error(`invalid integer: ${e}`);return e}),s=o.length;for(;;){let e=0,a=!0;for(let i=r;i<s;i++){const s=o[i],c=t*e,l=c+s;if(!Number.isSafeInteger(l)||c/t!==e||l-s!==c)throw new Error("convertRadix: carry overflow");const u=l/n;e=l%n;const d=Math.floor(u);if(o[i]=d,!Number.isSafeInteger(d)||d*n+e!==l)throw new Error("convertRadix: carry overflow");a&&(d?a=!1:r=i)}if(i.push(e),a)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.createBase58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64nopad=t.base64=t.base32crockford=t.base32hexnopad=t.base32hex=t.base32nopad=t.base32=t.base16=t.utils=void 0;const m=(e,t)=>0===t?e:m(t,e%t),b=(e,t)=>e+(t-m(e,t)),E=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function w(e,t,n,r){if(c(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(b(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${b(t,n)}`);let i=0,o=0;const s=E[t],l=E[n]-1,u=[];for(const r of e){if(a(r),r>=s)throw new Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)u.push((i>>o-n&l)>>>0);const e=E[o];if(void 0===e)throw new Error("invalid carry");i&=e-1}if(i=i<<n-o&l,!r&&o>=t)throw new Error("Excess padding");if(!r&&i>0)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&u.push(i>>>0),u}function A(e){return a(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return y(Array.from(t),256,e)},decode:t=>(u("radix.decode",t),Uint8Array.from(y(t,e,256)))}}function S(e,t=!1){if(a(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(b(8,e)>32||b(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return w(Array.from(r),8,e,!t)},decode:n=>(u("radix2.decode",n),Uint8Array.from(w(n,e,8,t)))}}function v(e){return o(e),function(...t){try{return e.apply(null,t)}catch(e){}}}function T(e,t){return a(e),o(t),{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const i=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const i=r.slice(0,-e),o=r.slice(-e),s=t(i).slice(0,e);for(let t=0;t<e;t++)if(s[t]!==o[t])throw new Error("Invalid checksum");return i}}}t.utils={alphabet:f,chain:d,checksum:T,convertRadix:y,convertRadix2:w,radix:A,radix2:S,join:h,padding:g},t.base16=d(S(4),f("0123456789ABCDEF"),h("")),t.base32=d(S(5),f("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),g(5),h("")),t.base32nopad=d(S(5),f("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),h("")),t.base32hex=d(S(5),f("0123456789ABCDEFGHIJKLMNOPQRSTUV"),g(5),h("")),t.base32hexnopad=d(S(5),f("0123456789ABCDEFGHIJKLMNOPQRSTUV"),h("")),t.base32crockford=d(S(5),f("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),h(""),p(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const O=(()=>"function"==typeof Uint8Array.from([]).toBase64&&"function"==typeof Uint8Array.fromBase64)(),I=(e,t)=>{s("base64",e);const n=t?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,r=t?"base64url":"base64";if(e.length>0&&!n.test(e))throw new Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:r,lastChunkHandling:"strict"})};t.base64=O?{encode:e=>(r(e),e.toBase64()),decode:e=>I(e,!1)}:d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),g(6),h("")),t.base64nopad=d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),h("")),t.base64url=O?{encode:e=>(r(e),e.toBase64({alphabet:"base64url"})),decode:e=>I(e,!0)}:d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),g(6),h("")),t.base64urlnopad=d(S(6),f("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),h(""));const B=e=>d(A(58),f(e),h(""));t.base58=B("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=B("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=B("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const _=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let n="";for(let r=0;r<e.length;r+=8){const i=e.subarray(r,r+8);n+=t.base58.encode(i).padStart(_[i.length],"1")}return n},decode(e){let n=[];for(let r=0;r<e.length;r+=11){const i=e.slice(r,r+11),o=_.indexOf(i.length),s=t.base58.decode(i);for(let e=0;e<s.length-o;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");n=n.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(n)}},t.createBase58check=e=>d(T(4,t=>e(e(t))),t.base58),t.base58check=t.createBase58check;const N=d(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),h("")),L=[996825010,642813549,513874426,1027748829,705979059];function F(e){const t=e>>25;let n=(33554431&e)<<5;for(let e=0;e<L.length;e++)1==(t>>e&1)&&(n^=L[e]);return n}function C(e,t,n=1){const r=e.length;let i=1;for(let t=0;t<r;t++){const n=e.charCodeAt(t);if(n<33||n>126)throw new Error(`Invalid prefix (${e})`);i=F(i)^n>>5}i=F(i);for(let t=0;t<r;t++)i=F(i)^31&e.charCodeAt(t);for(let e of t)i=F(i)^e;for(let e=0;e<6;e++)i=F(i);return i^=n,N.encode(w([i%E[30]],30,5,!1))}function D(e){const t="bech32"===e?1:734539939,r=S(5),i=r.decode,o=r.encode,a=v(i);function c(e,r,i=90){s("bech32.encode prefix",e),n(r)&&(r=Array.from(r)),u("bech32.encode",r);const o=e.length;if(0===o)throw new TypeError(`Invalid prefix length ${o}`);const a=o+7+r.length;if(!1!==i&&a>i)throw new TypeError(`Length ${a} exceeds limit ${i}`);const c=e.toLowerCase(),l=C(c,r,t);return`${c}1${N.encode(r)}${l}`}function l(e,n=90){s("bech32.decode input",e);const r=e.length;if(r<8||!1!==n&&r>n)throw new TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);const i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=i.lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const a=i.slice(0,o),c=i.slice(o+1);if(c.length<6)throw new Error("Data must be at least 6 characters long");const l=N.decode(c).slice(0,-6),u=C(a,l,t);if(!c.endsWith(u))throw new Error(`Invalid checksum in ${e}: expected "${u}"`);return{prefix:a,words:l}}return{encode:c,decode:l,encodeFromBytes:function(e,t){return c(e,o(t))},decodeToBytes:function(e){const{prefix:t,words:n}=l(e,!1);return{prefix:t,words:n,bytes:i(n)}},decodeUnsafe:v(l),fromWords:i,fromWordsUnsafe:a,toWords:o}}t.bech32=D("bech32"),t.bech32m=D("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)};const M=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),P={encode:e=>(r(e),e.toHex()),decode:e=>(s("hex",e),Uint8Array.fromHex(e))};t.hex=M?P:d(S(4),f("0123456789abcdef"),h(""),p(e=>{if("string"!=typeof e||e.length%2!=0)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const R={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},x="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!R.hasOwnProperty(e))throw new TypeError(x);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return R[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!R.hasOwnProperty(e))throw new TypeError(x);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return R[e].decode(t)},t.bytes=t.stringToBytes},1658:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const i=n(6557),o=r(n(2635));t.ripemd160=(0,o.default)(i.ripemd160)},1664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSetRegularKey=void 0;const r=n(255),i=n(2794);t.validateSetRegularKey=function(e){if((0,i.validateBaseTransaction)(e),void 0!==e.RegularKey&&"string"!=typeof e.RegularKey)throw new r.ValidationError("SetRegularKey: RegularKey must be a string")}},1722:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelCreate=void 0;const r=n(255),i=n(2794);t.validatePaymentChannelCreate=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.Amount)throw new r.ValidationError("PaymentChannelCreate: missing Amount");if("string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelCreate: Amount must be a string");if((0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),void 0===e.SettleDelay)throw new r.ValidationError("PaymentChannelCreate: missing SettleDelay");if("number"!=typeof e.SettleDelay)throw new r.ValidationError("PaymentChannelCreate: SettleDelay must be a number");if(void 0===e.PublicKey)throw new r.ValidationError("PaymentChannelCreate: missing PublicKey");if("string"!=typeof e.PublicKey)throw new r.ValidationError("PaymentChannelCreate: PublicKey must be a string");if(void 0!==e.CancelAfter&&"number"!=typeof e.CancelAfter)throw new r.ValidationError("PaymentChannelCreate: CancelAfter must be a number")}},1781:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SignerListFlags=void 0,function(e){e[e.lsfOneOwnerCount=65536]="lsfOneOwnerCount"}(n||(t.SignerListFlags=n={}))},1788:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.getAlgorithmFromPrivateKey=t.getAlgorithmFromPublicKey=t.getAlgorithmFromKey=void 0,function(e){e[e.NONE=-1]="NONE",e[e.ED25519=237]="ED25519",e[e.SECP256K1_PUB_X=2]="SECP256K1_PUB_X",e[e.SECP256K1_PUB_X_ODD_Y=3]="SECP256K1_PUB_X_ODD_Y",e[e.SECP256K1_PUB_XY=4]="SECP256K1_PUB_XY",e[e.SECP256K1_PRIVATE=0]="SECP256K1_PRIVATE"}(n||(n={}));const r={[`private_${n.NONE}_32`]:"ecdsa-secp256k1",[`private_${n.SECP256K1_PRIVATE}_33`]:"ecdsa-secp256k1",[`private_${n.ED25519}_33`]:"ed25519",[`public_${n.ED25519}_33`]:"ed25519",[`public_${n.SECP256K1_PUB_X}_33`]:"ecdsa-secp256k1",[`public_${n.SECP256K1_PUB_X_ODD_Y}_33`]:"ecdsa-secp256k1",[`public_${n.SECP256K1_PUB_XY}_65`]:"ecdsa-secp256k1"};function i(e){return e===n.NONE?"None":`0x${e.toString(16).padStart(2,"0")}`}function o(e,t){const{prefix:o,len:s}=function(e){return{prefix:e.length<2?n.NONE:parseInt(e.slice(0,2),16),len:e.length/2}}(e),a="private"===t&&32===s?n.NONE:o,c=r[`${t}_${a}_${s}`];if(!c)throw new Error(function({key:e,type:t,prefix:n,len:o}){const s=function(e){const t=17,n=6;return Object.entries(r).filter(([t])=>t.startsWith(e)).map(([e,r])=>{const[,o,s]=e.split("_");return`${r.padEnd(t)} - Prefix: ${i(Number(o)).padEnd(n)} Length: ${s} bytes`}).join("\n")}(t);return`invalid_key:\n\nType: ${t}\nKey: ${e}\nPrefix: ${i(n)} \nLength: ${o} bytes\n\nAcceptable ${t} formats are:\n${s}\n`}({key:e,type:t,len:s,prefix:a}));return c}t.getAlgorithmFromKey=o,t.getAlgorithmFromPublicKey=function(e){return o(e,"public")},t.getAlgorithmFromPrivateKey=function(e){return o(e,"private")}},1811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultSet=void 0;const r=n(255),i=n(99),o=n(2794);t.validateVaultSet=function(e){if((0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"VaultID",o.isString),(0,o.validateOptionalField)(e,"Data",o.isString),(0,o.validateOptionalField)(e,"AssetsMaximum",o.isXRPLNumber),(0,o.validateOptionalField)(e,"DomainID",o.isString),void 0!==e.Data){const t=e.Data;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultSet: Data must be a valid hex string");const n=t.length/2;if(n>o.VAULT_DATA_MAX_BYTE_LENGTH)throw new r.ValidationError(`VaultSet: Data exceeds ${o.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${n})`)}}},1837:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Issue=void 0;const r=n(619),i=n(892),o=n(5763),s=n(5967),a=n(1275),c=n(6905),l=n(5517),u=o.AccountID.from("0000000000000000000000000000000000000001");class d extends a.SerializedType{constructor(e){super(null!=e?e:d.XRP_ISSUE.bytes)}static from(e){if(e instanceof d)return e;if(function(e){const t=Object.keys(e).sort(),n=1===t.length&&"currency"===t[0],r=2===t.length&&"currency"===t[0]&&"issuer"===t[1],i=1===t.length&&"mpt_issuance_id"===t[0];return n||r||i}(e)){if(e.currency){const t=s.Currency.from(e.currency.toString()).toBytes();if(e.issuer){const n=o.AccountID.from(e.issuer.toString()).toBytes();return new d((0,r.concat)([t,n]))}return new d(t)}if(e.mpt_issuance_id){const t=c.Hash192.from(e.mpt_issuance_id.toString()).toBytes(),n=t.slice(4),i=Number((0,l.readUInt32BE)(t.slice(0,4),0)),o=new Uint8Array(4);return new DataView(o.buffer).setUint32(0,i,!0),new d((0,r.concat)([n,u.toBytes(),o]))}}throw new Error("Invalid type to construct an Issue")}static fromParser(e){const t=e.read(20);if("XRP"===new s.Currency(t).toJSON())return new d(t);const n=new o.AccountID(e.read(20));if(u.toHex()===n.toHex()){const n=e.read(4);return new d((0,r.concat)([t,u.toBytes(),n]))}return new d((0,r.concat)([t,n.toBytes()]))}toJSON(){if(44===this.toBytes().length){const e=this.toBytes().slice(0,20),t=new DataView(this.toBytes().slice(40).buffer).getUint32(0,!0),n=new Uint8Array(4);return(0,l.writeUInt32BE)(n,t,0),{mpt_issuance_id:(0,r.bytesToHex)((0,r.concat)([n,e]))}}const e=new i.BinaryParser(this.toString()),t=s.Currency.fromParser(e);if("XRP"===t.toJSON())return{currency:t.toJSON()};const n=o.AccountID.fromParser(e);return{currency:t.toJSON(),issuer:n.toJSON()}}}t.Issue=d,d.XRP_ISSUE=new d(new Uint8Array(20))},1845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)?new Uint8Array(e):e}},1933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAddClaimAttestation=void 0;const r=n(2794);t.validateXChainAddClaimAttestation=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateRequiredField)(e,"AttestationRewardAccount",r.isAccount),(0,r.validateRequiredField)(e,"AttestationSignerAccount",r.isAccount),(0,r.validateOptionalField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount),(0,r.validateRequiredField)(e,"PublicKey",r.isString),(0,r.validateRequiredField)(e,"Signature",r.isString),(0,r.validateRequiredField)(e,"WasLockingChainSend",e=>0===e||1===e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e))}},1998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=void 0,t.setBigUint64=o,t.Chi=function(e,t,n){return e&t^~e&n},t.Maj=function(e,t,n){return e&t^e&n^t&n};const r=n(5489),i=n(9987);function o(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,l=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+l,a,r)}class s extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,r.aexists)(this);const{view:t,buffer:n,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let r=0;r<s;){const a=Math.min(o-this.pos,s-r);if(a===o){const t=(0,i.createView)(e);for(;o<=s-r;r+=o)this.process(t,r);continue}n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:a}=this;let{pos:c}=this;t[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>s-c&&(this.process(n,0),c=0);for(let e=c;e<s;e++)t[e]=0;o(n,s-8,BigInt(8*this.length),a),this.process(n,0);const l=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,f=this.get();if(d>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)l.setUint32(4*e,f[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=o,r%t&&e.buffer.set(n),e}}t.HashMD=s},2012:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenMetadata=t.decodeMPTokenMetadata=t.encodeMPTokenMetadata=t.MPT_META_WARNING_HEADER=t.MAX_MPT_META_BYTE_LENGTH=void 0;const i=n(619),o=r(n(6085)),s=n(2794),a=n(99);t.MAX_MPT_META_BYTE_LENGTH=1024,t.MPT_META_WARNING_HEADER="MPTokenMetadata is not properly formatted as JSON as per the XLS-89 standard. While adherence to this standard is not mandatory, such non-compliant MPToken's might not be discoverable by Explorers and Indexers in the XRPL ecosystem.";const c=[{long:"uri",compact:"u"},{long:"category",compact:"c"},{long:"title",compact:"t"}],l=[{long:"ticker",compact:"t",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)&&/^[A-Z0-9]{1,6}$/u.test(n)?[]:[`${this.long}/${this.compact}: should have uppercase letters (A-Z) and digits (0-9) only. Max 6 characters recommended.`]}},{long:"name",compact:"n",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)&&0!==n.length?[]:[`${this.long}/${this.compact}: should be a non-empty string.`]}},{long:"icon",compact:"i",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)&&0!==n.length?[]:[`${this.long}/${this.compact}: should be a non-empty string.`]}},{long:"asset_class",compact:"ac",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact],r=["rwa","memes","wrapped","gaming","defi","other"];return(0,s.isString)(n)&&r.includes(n)?[]:[`${this.long}/${this.compact}: should be one of ${r.join(", ")}.`]}},{long:"issuer_name",compact:"in",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)&&0!==n.length?[]:[`${this.long}/${this.compact}: should be a non-empty string.`]}},{long:"desc",compact:"d",validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];if(void 0===e[this.long]&&void 0===e[this.compact])return[];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)&&0!==n.length?[]:[`${this.long}/${this.compact}: should be a non-empty string.`]}},{long:"asset_subclass",compact:"as",required:!1,validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];if(("rwa"===e.asset_class||"rwa"===e.ac)&&void 0===n)return[`${this.long}/${this.compact}: required when asset_class is rwa.`];if(void 0===e[this.long]&&void 0===e[this.compact])return[];const r=["stablecoin","commodity","real_estate","private_credit","equity","treasury","other"];return(0,s.isString)(n)&&r.includes(n)?[]:[`${this.long}/${this.compact}: should be one of ${r.join(", ")}.`]}},{long:"uris",compact:"us",required:!1,validate(e){var t,n,r,i;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];if(void 0===e[this.long]&&void 0===e[this.compact])return[];const o=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];if(!Array.isArray(o)||0===o.length)return[`${this.long}/${this.compact}: should be a non-empty array.`];const a=[];for(const e of o){if(!(0,s.isRecord)(e)||Object.keys(e).length!==c.length){a.push(`${this.long}/${this.compact}: should be an array of objects each with uri/u, category/c, and title/t properties.`);continue}for(const t of c)if(null!=e[t.long]&&null!=e[t.compact]){a.push(`${this.long}/${this.compact}: should not have both ${t.long} and ${t.compact} fields.`);break}const t=null!==(n=e.uri)&&void 0!==n?n:e.u,o=null!==(r=e.category)&&void 0!==r?r:e.c,l=null!==(i=e.title)&&void 0!==i?i:e.t;(0,s.isString)(t)&&(0,s.isString)(o)&&(0,s.isString)(l)||a.push(`${this.long}/${this.compact}: should be an array of objects each with uri/u, category/c, and title/t properties.`)}return a}},{long:"additional_info",compact:"ai",required:!1,validate(e){var t;if(null!=e[this.long]&&null!=e[this.compact])return[`${this.long}/${this.compact}: both long and compact forms present. expected only one.`];if(void 0===e[this.long]&&void 0===e[this.compact])return[];const n=null!==(t=e[this.long])&&void 0!==t?t:e[this.compact];return(0,s.isString)(n)||(0,s.isRecord)(n)?[]:[`${this.long}/${this.compact}: should be a string or JSON object.`]}}];function u(e,t){const n={};for(const[r,i]of Object.entries(e)){const o=t.find(({long:e,compact:t})=>e===r||t===r);void 0!==o&&(void 0===e[o.long]||void 0===e[o.compact])?n[o.compact]=i:n[r]=i}return n}function d(e,t){const n={};for(const[r,i]of Object.entries(e)){const o=t.find(({long:e,compact:t})=>e===r||t===r);void 0!==o&&(void 0===e[o.long]||void 0===e[o.compact])?n[o.long]=i:n[r]=i}return n}t.encodeMPTokenMetadata=function(e){let t=e;if(!(0,s.isRecord)(t))throw new Error("MPTokenMetadata must be JSON object.");return t=u(t,l),Array.isArray(t.uris)&&(t.uris=t.uris.map(e=>(0,s.isRecord)(e)?u(e,c):e)),Array.isArray(t.us)&&(t.us=t.us.map(e=>(0,s.isRecord)(e)?u(e,c):e)),(0,i.stringToHex)((0,o.default)(t)).toUpperCase()},t.decodeMPTokenMetadata=function(e){if(!(0,a.isHex)(e))throw new Error("MPTokenMetadata must be in hex format.");let t;try{t=JSON.parse((0,i.hexToString)(e))}catch(e){throw new Error(`MPTokenMetadata is not properly formatted as JSON - ${String(e)}`)}if(!(0,s.isRecord)(t))throw new Error("MPTokenMetadata must be a JSON object.");let n=t;return n=d(n,l),Array.isArray(n.uris)&&(n.uris=n.uris.map(e=>(0,s.isRecord)(e)?d(e,c):e)),Array.isArray(n.us)&&(n.us=n.us.map(e=>(0,s.isRecord)(e)?d(e,c):e)),n},t.validateMPTokenMetadata=function(e){const n=[];if(!(0,a.isHex)(e))return n.push("MPTokenMetadata must be in hex format."),n;if(e.length/2>t.MAX_MPT_META_BYTE_LENGTH)return n.push(`MPTokenMetadata must be max ${t.MAX_MPT_META_BYTE_LENGTH} bytes.`),n;let r;try{r=JSON.parse((0,i.hexToString)(e))}catch(e){return n.push(`MPTokenMetadata is not properly formatted as JSON - ${String(e)}`),n}if(!(0,s.isRecord)(r))return n.push("MPTokenMetadata is not properly formatted JSON object as per XLS-89."),n;Object.keys(r).length>l.length&&n.push(`MPTokenMetadata must not contain more than ${l.length} top-level fields (found ${Object.keys(r).length}).`);const o=r;for(const e of l)n.push(...e.validate(o));return n}},2152:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePaymentChannelClaim=t.PaymentChannelClaimFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfRenew=65536]="tfRenew",e[e.tfClose=131072]="tfClose"}(o||(t.PaymentChannelClaimFlags=o={})),t.validatePaymentChannelClaim=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,i.MAX_AUTHORIZED_CREDENTIALS),void 0===e.Channel)throw new r.ValidationError("PaymentChannelClaim: missing Channel");if("string"!=typeof e.Channel)throw new r.ValidationError("PaymentChannelClaim: Channel must be a string");if(void 0!==e.Balance&&"string"!=typeof e.Balance)throw new r.ValidationError("PaymentChannelClaim: Balance must be a string");if(void 0!==e.Amount&&"string"!=typeof e.Amount)throw new r.ValidationError("PaymentChannelClaim: Amount must be a string");if(void 0!==e.Signature&&"string"!=typeof e.Signature)throw new r.ValidationError("PaymentChannelClaim: Signature must be a string");if(void 0!==e.PublicKey&&"string"!=typeof e.PublicKey)throw new r.ValidationError("PaymentChannelClaim: PublicKey must be a string")}},2190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMVote=void 0;const r=n(255),i=n(9966),o=n(2794);t.validateAMMVote=function(e){if((0,o.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMVote: missing field Asset");if(!(0,o.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMVote: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMVote: missing field Asset2");if(!(0,o.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMVote: Asset2 must be a Currency");if(null==e.TradingFee)throw new r.ValidationError("AMMVote: missing field TradingFee");if("number"!=typeof e.TradingFee)throw new r.ValidationError("AMMVote: TradingFee must be a number");if(e.TradingFee<0||e.TradingFee>i.AMM_MAX_TRADING_FEE)throw new r.ValidationError(`AMMVote: TradingFee must be between 0 and ${i.AMM_MAX_TRADING_FEE}`)}},2242:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=void 0,t.negateCt=a,t.normalizeZ=function(e,t){const n=(0,i.FpInvertBatch)(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))},t.mulEndoUnsafe=function(e,t,n,r){let i=t,a=e.ZERO,c=e.ZERO;for(;n>o||r>o;)n&s&&(a=a.add(i)),r&s&&(c=c.add(i)),i=i.double(),n>>=s,r>>=s;return{p1:a,p2:c}},t.pippenger=function(e,t,n,i){d(n,e),f(i,t);const o=n.length,s=i.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,c=(0,r.bitLen)(BigInt(o));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const u=(0,r.bitMask)(l),h=new Array(Number(u)+1).fill(a);let g=a;for(let e=Math.floor((t.BITS-1)/l)*l;e>=0;e-=l){h.fill(a);for(let t=0;t<s;t++){const r=i[t],o=Number(r>>BigInt(e)&u);h[o]=h[o].add(n[t])}let t=a;for(let e=h.length-1,n=a;e>0;e--)n=n.add(h[e]),t=t.add(n);if(g=g.add(t),0!==e)for(let e=0;e<l;e++)g=g.double()}return g},t.precomputeMSMUnsafe=function(e,t,n,i){c(i,t.BITS),d(n,e);const o=e.ZERO,s=2**i-1,a=Math.ceil(t.BITS/i),l=(0,r.bitMask)(i),u=n.map(e=>{const t=[];for(let n=0,r=e;n<s;n++)t.push(r),r=r.add(e);return t});return e=>{if(f(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let r=o;for(let t=0;t<a;t++){if(r!==o)for(let e=0;e<i;e++)r=r.double();const n=BigInt(a*i-(t+1)*i);for(let t=0;t<e.length;t++){const i=e[t],o=Number(i>>n&l);o&&(r=r.add(u[t][o-1]))}}return r}},t.validateBasic=function(e){return(0,i.validateField)(e.Fp),(0,r.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,i.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})},t._createCurveFields=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const n=t[e];if(!("bigint"==typeof n&&n>o))throw new Error(`CURVE.${e} must be positive bigint`)}const i=m(t.p,n.Fp,r),s=m(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of a)if(!i.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}};const r=n(7663),i=n(5827),o=BigInt(0),s=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function l(e,t){c(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,r.bitMask)(e),maxNumber:n,shiftBy:BigInt(e)}}function u(e,t,n){const{windowSize:r,mask:i,maxNumber:o,shiftBy:a}=n;let c=Number(e&i),l=e>>a;c>r&&(c-=o,l+=s);const u=t*r;return{nextN:l,offset:u+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!=0,offsetF:u}}function d(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function f(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const h=new WeakMap,g=new WeakMap;function p(e){return g.get(e)||1}function y(e){if(e!==o)throw new Error("invalid wNAF")}function m(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.validateField)(t),t}return(0,i.Field)(e,{isLE:n})}t.wNAF=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>o;)t&s&&(n=n.add(r)),r=r.double(),t>>=s;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=l(t,this.bits),i=[];let o=e,s=o;for(let e=0;e<n;e++){s=o,i.push(s);for(let e=1;e<r;e++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const o=l(e,this.bits);for(let e=0;e<o.windows;e++){const{nextN:s,offset:c,isZero:l,isNeg:d,isNegF:f,offsetF:h}=u(n,e,o);n=s,l?i=i.add(a(f,t[h])):r=r.add(a(d,t[c]))}return y(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){const i=l(e,this.bits);for(let e=0;e<i.windows&&n!==o;e++){const{nextN:o,offset:s,isZero:a,isNeg:c}=u(n,e,i);if(n=o,!a){const e=t[s];r=r.add(c?e.negate():e)}}return y(n),r}getPrecomputes(e,t,n){let r=h.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),h.set(t,r))),r}cached(e,t,n){const r=p(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=p(e);return 1===i?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){c(t,this.bits),g.set(e,t),h.delete(e)}hasCache(e){return 1!==p(e)}}},2295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isoTimeToRippleTime=t.rippleTimeToISOTime=t.unixTimeToRippleTime=t.rippleTimeToUnixTime=void 0;const n=946684800;function r(e){return 1e3*(e+n)}function i(e){return Math.round(e/1e3)-n}t.rippleTimeToUnixTime=r,t.unixTimeToRippleTime=i,t.rippleTimeToISOTime=function(e){return new Date(r(e)).toISOString()},t.isoTimeToRippleTime=function(e){return i(("string"==typeof e?new Date(e):e).getTime())}},2404:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultDelete=void 0;const r=n(2794);t.validateVaultDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString)}},2408:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineBatchSigners=t.signMultiBatch=void 0;const r=n(5620),i=n(5442),o=n(255),s=n(9729),a=n(6695),c=n(1377),l=n(667);function u(e,t,n,r=!1){let i;return i=r?{BatchSigner:{Account:e,Signers:[{Signer:{Account:r,SigningPubKey:t.publicKey,TxnSignature:n}}]}}:{BatchSigner:{Account:e,SigningPubKey:t.publicKey,TxnSignature:n}},i}t.signMultiBatch=function(e,t,n={}){var a;const l=null!==(a=n.batchAccount)&&void 0!==a?a:e.classicAddress;let d=!1;if("string"==typeof n.multisign?d=n.multisign:n.multisign&&(d=e.classicAddress),"Batch"!==t.TransactionType)throw new o.ValidationError("Must be a Batch transaction.");if((0,s.validate)(t),!new Set(t.RawTransactions.map(e=>e.RawTransaction.Account)).has(l))throw new o.ValidationError("Must be signing for an address submitting a transaction in the Batch.");const f={flags:t.Flags,txIDs:t.RawTransactions.map(e=>(0,c.hashSignedTx)(e.RawTransaction))},h=(0,i.sign)((0,r.encodeForSigningBatch)(f),e.privateKey);t.BatchSigners=[u(l,e,h,d)]},t.combineBatchSigners=function(e){if(0===e.length)throw new o.ValidationError("There are 0 transactions to combine.");const t=e.map(e=>(0,l.getDecodedTransaction)(e));t.forEach(e=>{if("Batch"!==e.TransactionType)throw new o.ValidationError("TransactionType must be `Batch`.");if((0,a.validateBatch)(e),null==e.BatchSigners||0===e.BatchSigners.length)throw new o.ValidationError("For combining Batch transaction signatures, all transactions must include a BatchSigners field containing an array of signatures.");if(null!=e.TxnSignature||null!=e.Signers)throw new o.ValidationError("Batch transaction must be unsigned.")});const n=t;return function(e){const t=JSON.stringify({flags:e[0].Flags,transactionIDs:e[0].RawTransactions.map(e=>(0,c.hashSignedTx)(e.RawTransaction))});if(e.slice(1).some(e=>JSON.stringify({flags:e.Flags,transactionIDs:e.RawTransactions.map(e=>(0,c.hashSignedTx)(e.RawTransaction))})!==t))throw new o.ValidationError("Flags and transaction hashes are not the same for all provided transactions.")}(n),(0,r.encode)(function(e){const t=e.flatMap(e=>{var t;return null!==(t=e.BatchSigners)&&void 0!==t?t:[]}).filter(t=>t.BatchSigner.Account!==e[0].Account).sort((e,t)=>(0,l.compareSigners)(e.BatchSigner,t.BatchSigner));return Object.assign(Object.assign({},e[0]),{BatchSigners:t})}(n))}},2427:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,s),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},2476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLedgerData=t.ledgerHash=t.transactionTreeHash=t.accountStateHash=void 0;const r=n(8390),i=n(7375),o=n(7410),s=n(9543),a=n(8264),c=n(8847),l=n(5463),u=n(4200),d=n(401),f=n(892);function h(e,t){const n=new r.ShaMap;return t.forEach(t=>n.addItem(...e(t))),n.hash()}function g(e){if(!e.hash)throw new Error;return[a.Hash256.from(e.hash),{hashPrefix:()=>i.HashPrefix.transaction,toBytesSink(t){const n=new s.BinarySerializer(t);n.writeLengthEncoded(c.STObject.from(e)),n.writeLengthEncoded(c.STObject.from(e.metaData))}},void 0]}function p(e){const t=a.Hash256.from(e.index),n=(0,s.serializeObject)(e);return[t,{hashPrefix:()=>i.HashPrefix.accountStateEntry,toBytesSink(e){e.put(n)}},void 0]}t.transactionTreeHash=function(e){return h(g,e)},t.accountStateHash=function(e){return h(p,e)},t.ledgerHash=function(e){const t=new o.Sha512Half;if(t.put(i.HashPrefix.ledgerHeader),void 0===e.parent_close_time||void 0===e.close_flags)throw new Error;return u.UInt32.from(e.ledger_index).toBytesSink(t),l.UInt64.from(BigInt(String(e.total_coins))).toBytesSink(t),a.Hash256.from(e.parent_hash).toBytesSink(t),a.Hash256.from(e.transaction_hash).toBytesSink(t),a.Hash256.from(e.account_hash).toBytesSink(t),u.UInt32.from(e.parent_close_time).toBytesSink(t),u.UInt32.from(e.close_time).toBytesSink(t),d.UInt8.from(e.close_time_resolution).toBytesSink(t),d.UInt8.from(e.close_flags).toBytesSink(t),t.finish()},t.decodeLedgerData=function(e,t){if("string"!=typeof e)throw new Error("binary must be a hex string");const n=new f.BinaryParser(e,t);return{ledger_index:n.readUInt32(),total_coins:n.readType(l.UInt64).valueOf().toString(),parent_hash:n.readType(a.Hash256).toHex(),transaction_hash:n.readType(a.Hash256).toHex(),account_hash:n.readType(a.Hash256).toHex(),parent_close_time:n.readUInt32(),close_time:n.readUInt32(),close_time_resolution:n.readUInt8(),close_flags:n.readUInt8()}}},2484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(3449),o=n(9005),s=n(619),a=n(8957),c=r(n(3212)),l=r(n(4876)),u={deriveKeypair(e,t){const n=(0,a.derivePrivateKey)(e,t);return{privateKey:"00"+(0,s.bytesToHex)((0,i.numberToBytesBE)(n,32)),publicKey:(0,s.bytesToHex)(o.secp256k1.getPublicKey(n,!0))}},sign(e,t){c.default.ok(66===t.length&&t.startsWith("00")||64===t.length);const n=66===t.length?t.slice(2):t;return o.secp256k1.sign(l.default.half(e),n,{lowS:!0,extraEntropy:void 0}).toDERHex(!0).toUpperCase()},verify(e,t,n){const r=o.secp256k1.Signature.fromDER(t);return o.secp256k1.verify(r,l.default.half(e),n)}};t.default=u},2530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2896),i=n(619);t.default=function(e){return(0,i.bytesToHex)((0,r.sha512)((0,i.hexToBytes)(e)).slice(0,32))}},2588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;const r=n(5442),i=n(8161);t.Account=class{constructor(e){this._account={familySeed:"",address:"",keypair:{publicKey:"",privateKey:""}},"string"==typeof e?this._secret=(0,i.parseSecretString)(e):Array.isArray(e)?this._secret=e:e instanceof Uint8Array?this._secret=(0,i.entropyToSecret)(e):this._secret=(0,i.randomSecret)(),function(e){if(8!==e.length)throw new Error("Secret must have 8 numbers");e.forEach(e=>{if(6!==e.length)throw new Error("Each secret number must be 6 digits")})}(this._secret),this.derive()}getSecret(){return this._secret}getSecretString(){return this._secret.join(" ")}getAddress(){return this._account.address}getFamilySeed(){return this._account.familySeed}getKeypair(){return this._account.keypair}toString(){return this.getSecretString()}derive(){try{const e=(0,i.secretToEntropy)(this._secret);this._account.familySeed=(0,r.generateSeed)({entropy:e}),this._account.keypair=(0,r.deriveKeypair)(this._account.familySeed),this._account.address=(0,r.deriveAddress)(this._account.keypair.publicKey)}catch(e){let t="Unknown Error";throw e instanceof Error&&(t=e.message),new Error(t)}}}},2635:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(1862));t.default=function(e){function t(t){return e((0,i.default)(t))}return t.create=()=>{const t=e.create();return{update(e){return t.update((0,i.default)(e)),this},digest:()=>t.digest()}},t}},2722:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.xrpToDrops=t.dropsToXrp=void 0;const i=r(n(735)),o=n(255),s=1e6,a=/^-?[0-9.]+$/u;t.dropsToXrp=function(e){const t=new i.default(e).toString(10);if("string"==typeof e&&"NaN"===t)throw new o.ValidationError(`dropsToXrp: invalid value '${e}', should be a BigNumber or string-encoded number.`);if(t.includes("."))throw new o.ValidationError(`dropsToXrp: value '${t}' has too many decimal places.`);if(!a.exec(t))throw new o.ValidationError(`dropsToXrp: failed sanity check - value '${t}', does not match (^-?[0-9]+$).`);return new i.default(t).dividedBy(s).toNumber()},t.xrpToDrops=function(e){const t=new i.default(e).toString(10);if("string"==typeof e&&"NaN"===t)throw new o.ValidationError(`xrpToDrops: invalid value '${e}', should be a BigNumber or string-encoded number.`);if(!a.exec(t))throw new o.ValidationError(`xrpToDrops: failed sanity check - value '${t}', does not match (^-?[0-9.]+$).`);const n=t.split(".");if(n.length>2)throw new o.ValidationError(`xrpToDrops: failed sanity check - value '${t}' has too many decimal points.`);if((n[1]||"0").length>6)throw new o.ValidationError(`xrpToDrops: value '${t}' has too many decimal places.`);return new i.default(t).times(s).integerValue(i.default.ROUND_FLOOR).toString(10)}},2794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDomainID=t.containsDuplicates=t.validateCredentialsList=t.validateCredentialType=t.parseAmountValue=t.validateBaseTransaction=t.GlobalFlags=t.validateOptionalField=t.validateRequiredField=t.isArray=t.isXChainBridge=t.isAmount=t.isAccount=t.isClawbackAmount=t.isMPTAmount=t.isAuthorizeCredential=t.isIssuedCurrencyAmount=t.isIssuedCurrency=t.isCurrency=t.isXRPLNumber=t.isValue=t.isNull=t.isNumber=t.isString=t.isRecord=t.VAULT_DATA_MAX_BYTE_LENGTH=t.MAX_AUTHORIZED_CREDENTIALS=void 0;const r=n(619),i=n(6333),o=n(5620),s=n(255),a=n(99);function c(e){if(!u(e))return!1;const t=e.Memo;if(!u(t))return!1;const n=Object.keys(t).length,r=null==t.MemoData||d(t.MemoData)&&(0,a.isHex)(t.MemoData),i=null==t.MemoFormat||d(t.MemoFormat)&&(0,a.isHex)(t.MemoFormat),o=null==t.MemoType||d(t.MemoType)&&(0,a.isHex)(t.MemoType);return n>=1&&n<=3&&r&&i&&o&&(0,a.onlyHasFields)(t,["MemoFormat","MemoData","MemoType"])}function l(e){if(!u(e))return!1;const t=e.Signer;return!!u(t)&&3===Object.keys(t).length&&d(t.Account)&&d(t.TxnSignature)&&d(t.SigningPubKey)}function u(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return"string"==typeof e}function f(e){return"number"==typeof e}function h(e){return u(e)&&(2===Object.keys(e).length&&d(e.issuer)&&d(e.currency)||1===Object.keys(e).length&&"XRP"===e.currency)}function g(e){return u(e)&&3===Object.keys(e).length&&d(e.value)&&d(e.issuer)&&d(e.currency)}function p(e){return u(e)&&u(e.Credential)&&1===Object.keys(e).length&&"string"==typeof e.Credential.CredentialType&&"string"==typeof e.Credential.Issuer}function y(e){return u(e)&&2===Object.keys(e).length&&"string"==typeof e.value&&"string"==typeof e.mpt_issuance_id}function m(e){return"string"==typeof e&&((0,i.isValidClassicAddress)(e)||(0,i.isValidXAddress)(e))}function b(e){return"string"==typeof e||g(e)||y(e)}function E(e){return null!=e&&Array.isArray(e)}function w(e,t,n,r={}){var i,o;const a=null!==(i=r.paramName)&&void 0!==i?i:t,c=null!==(o=r.txType)&&void 0!==o?o:e.TransactionType;if(null==e[t])throw new s.ValidationError(`${c}: missing field ${String(a)}`);if(!n(e[t]))throw new s.ValidationError(`${c}: invalid field ${String(a)}`)}function A(e,t,n,r={}){var i,o;const a=null!==(i=r.paramName)&&void 0!==i?i:t,c=null!==(o=r.txType)&&void 0!==o?o:e.TransactionType;if(void 0!==e[t]&&!n(e[t]))throw new s.ValidationError(`${c}: invalid field ${String(a)}`)}var S;function v(e){if("string"==typeof e[0])return new Set(e.map(e=>JSON.stringify(e))).size!==e.length;const t=new Set;if("string"!=typeof e[0])for(const n of e){const e=`${n.Credential.Issuer}-${n.Credential.CredentialType}`;if(t.has(e))return!0;t.add(e)}return!1}t.MAX_AUTHORIZED_CREDENTIALS=8,t.VAULT_DATA_MAX_BYTE_LENGTH=256,t.isRecord=u,t.isString=d,t.isNumber=f,t.isNull=function(e){return null==e},t.isValue=function(e){return t=>t===e},t.isXRPLNumber=function(e){return"string"==typeof e&&/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/u.test(e.trim())},t.isCurrency=function(e){return u(e)&&(2===Object.keys(e).length&&d(e.issuer)&&d(e.currency)||1===Object.keys(e).length&&"XRP"===e.currency||1===Object.keys(e).length&&d(e.mpt_issuance_id))},t.isIssuedCurrency=h,t.isIssuedCurrencyAmount=g,t.isAuthorizeCredential=p,t.isMPTAmount=y,t.isClawbackAmount=function(e){return g(e)||y(e)},t.isAccount=m,t.isAmount=b,t.isXChainBridge=function(e){return u(e)&&4===Object.keys(e).length&&"string"==typeof e.LockingChainDoor&&h(e.LockingChainIssue)&&"string"==typeof e.IssuingChainDoor&&h(e.IssuingChainIssue)},t.isArray=E,t.validateRequiredField=w,t.validateOptionalField=A,function(e){e[e.tfInnerBatchTxn=1073741824]="tfInnerBatchTxn"}(S||(t.GlobalFlags=S={})),t.validateBaseTransaction=function(e){if(!u(e))throw new s.ValidationError("BaseTransaction: invalid, expected a valid object");if(void 0===e.TransactionType)throw new s.ValidationError("BaseTransaction: missing field TransactionType");if("string"!=typeof e.TransactionType)throw new s.ValidationError("BaseTransaction: TransactionType not string");if(!o.TRANSACTION_TYPES.includes(e.TransactionType))throw new s.ValidationError(`BaseTransaction: Unknown TransactionType ${e.TransactionType}`);w(e,"Account",d),A(e,"Fee",d),A(e,"Sequence",f),A(e,"AccountTxnID",d),A(e,"LastLedgerSequence",f);const t=e.Memos;if(!(null==t||E(t)&&t.every(c)))throw new s.ValidationError("BaseTransaction: invalid Memos");const n=e.Signers;if(!(null==n||E(n)&&0!==n.length&&n.every(l)))throw new s.ValidationError("BaseTransaction: invalid Signers");A(e,"SourceTag",f),A(e,"SigningPubKey",d),A(e,"TicketSequence",f),A(e,"TxnSignature",d),A(e,"NetworkID",f),A(e,"Delegate",m);const r=e.Delegate;if(null!=r&&r===e.Account)throw new s.ValidationError("BaseTransaction: Account and Delegate addresses cannot be the same")},t.parseAmountValue=function(e){return b(e)?"string"==typeof e?parseFloat(e):parseFloat(e.value):NaN},t.validateCredentialType=function(e){if("string"!=typeof e.TransactionType)throw new s.ValidationError("Invalid TransactionType");if(void 0===e.CredentialType)throw new s.ValidationError(`${e.TransactionType}: missing field CredentialType`);if(!d(e.CredentialType))throw new s.ValidationError(`${e.TransactionType}: CredentialType must be a string`);if(0===e.CredentialType.length)throw new s.ValidationError(`${e.TransactionType}: CredentialType cannot be an empty string`);if(e.CredentialType.length>128)throw new s.ValidationError(`${e.TransactionType}: CredentialType length cannot be > 128`);if(!r.HEX_REGEX.test(e.CredentialType))throw new s.ValidationError(`${e.TransactionType}: CredentialType must be encoded in hex`)},t.validateCredentialsList=function(e,t,n,r){if(null!=e){if(!E(e))throw new s.ValidationError(`${t}: Credentials must be an array`);if(e.length>r)throw new s.ValidationError(`${t}: Credentials length cannot exceed ${r} elements`);if(0===e.length)throw new s.ValidationError(`${t}: Credentials cannot be an empty array`);if(e.forEach(e=>{if(n){if(!d(e))throw new s.ValidationError(`${t}: Invalid Credentials ID list format`)}else if(!p(e))throw new s.ValidationError(`${t}: Invalid Credentials format`)}),v(e))throw new s.ValidationError(`${t}: Credentials cannot contain duplicate elements`)}},t.containsDuplicates=v,t.isDomainID=function(e){return d(e)&&64===e.length&&(0,a.isHex)(e)}},2824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatArgs=t.arrayEqual=void 0,t.arrayEqual=function(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])},t.concatArgs=function(...e){return e.flatMap(e=>"number"==typeof e?[e]:Array.from(e))}},2859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCreate=void 0;const r=n(255),i=n(2794);t.validateCheckCreate=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.SendMax)throw new r.ValidationError("CheckCreate: missing field SendMax");if((0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),"string"!=typeof e.SendMax&&!(0,i.isIssuedCurrencyAmount)(e.SendMax))throw new r.ValidationError("CheckCreate: invalid SendMax");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("CheckCreate: invalid Expiration");if(void 0!==e.InvoiceID&&"string"!=typeof e.InvoiceID)throw new r.ValidationError("CheckCreate: invalid InvoiceID")}},2896:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=void 0;const i=n(5943),o=r(n(2635));t.sha512=(0,o.default)(i.sha512)},2905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSignerListSet=void 0;const r=n(255),i=n(2794),o=/^[0-9A-Fa-f]{64}$/u;t.validateSignerListSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"SignerQuorum",i.isNumber),0!==e.SignerQuorum){if((0,i.validateRequiredField)(e,"SignerEntries",i.isArray),0===e.SignerEntries.length)throw new r.ValidationError("SignerListSet: need at least 1 member in SignerEntries");if(e.SignerEntries.length>32)throw new r.ValidationError("SignerListSet: maximum of 32 members allowed in SignerEntries");for(const t of e.SignerEntries){if(!(0,i.isRecord)(t)||!(0,i.isRecord)(t.SignerEntry))throw new r.ValidationError("SignerListSet: SignerEntries must be an array of SignerEntry objects");const e=t.SignerEntry,{WalletLocator:n}=e;if(!(null==n||(0,i.isString)(n)&&o.test(n)))throw new r.ValidationError("SignerListSet: WalletLocator in SignerEntry must be a 256-bit (32-byte) hexadecimal value")}}}},2911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XChainBridge=void 0;const r=n(892),i=n(5763),o=n(1275),s=n(1837),a=n(619);class c extends o.SerializedType{constructor(e){super(null!=e?e:c.ZERO_XCHAIN_BRIDGE.bytes)}static from(e){if(e instanceof c)return e;if(!function(e){const t=Object.keys(e).sort();return 4===t.length&&"IssuingChainDoor"===t[0]&&"IssuingChainIssue"===t[1]&&"LockingChainDoor"===t[2]&&"LockingChainIssue"===t[3]}(e))throw new Error("Invalid type to construct an XChainBridge");const t=[];return this.TYPE_ORDER.forEach(n=>{const{name:r,type:o}=n;o===i.AccountID&&t.push(Uint8Array.from([20]));const s=o.from(e[r]);t.push(s.toBytes())}),new c((0,a.concat)(t))}static fromParser(e){const t=[];return this.TYPE_ORDER.forEach(n=>{const{type:r}=n;r===i.AccountID&&(e.skip(1),t.push(Uint8Array.from([20])));const o=r.fromParser(e);t.push(o.toBytes())}),new c((0,a.concat)(t))}toJSON(){const e=new r.BinaryParser(this.toString()),t={};return c.TYPE_ORDER.forEach(n=>{const{name:r,type:o}=n;o===i.AccountID&&e.skip(1);const s=o.fromParser(e).toJSON();t[r]=s}),t}}t.XChainBridge=c,c.ZERO_XCHAIN_BRIDGE=new c((0,a.concat)([Uint8Array.from([20]),new Uint8Array(40),Uint8Array.from([20]),new Uint8Array(40)])),c.TYPE_ORDER=[{name:"LockingChainDoor",type:i.AccountID},{name:"LockingChainIssue",type:s.Issue},{name:"IssuingChainDoor",type:i.AccountID},{name:"IssuingChainIssue",type:s.Issue}]},2942:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesLookup=t.Bytes=void 0;class n{constructor(e,t,n){this.name=e,this.ordinal=t,this.ordinalWidth=n,this.bytes=new Uint8Array(n);for(let e=0;e<n;e++)this.bytes[n-e-1]=t>>>8*e&255}toJSON(){return this.name}toBytesSink(e){e.put(this.bytes)}toBytes(){return this.bytes}}t.Bytes=n,t.BytesLookup=class{constructor(e,t){this.ordinalWidth=t,Object.entries(e).forEach(([e,t])=>{this.add(e,t)})}add(e,t){if(this[e])throw new SyntaxError(`Attempted to add a value with a duplicate name "${e}". This is not allowed because it is unclear how to decode.`);if(this[t.toString()])throw new SyntaxError(`Attempted to add a duplicate value under a different name (Given name: "${e}" and previous name: "${this[t.toString()]}. This is not allowed because it is unclear how to decode.\nGiven value: ${t.toString()}`);this[e]=new n(e,t,this.ordinalWidth),this[t.toString()]=this[e]}from(e){return e instanceof n?e:this[e]}fromParser(e){return this.from(e.readUIntN(this.ordinalWidth).toString())}}},2945:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(735)),o=n(9333),s=n(2722);function a(e){const t=Object.keys(e)[0],n=e[t];return Object.assign(Object.assign({},n),{NodeType:t,LedgerEntryType:n.LedgerEntryType,LedgerIndex:n.LedgerIndex,NewFields:n.NewFields,FinalFields:n.FinalFields,PreviousFields:n.PreviousFields})}function c(e){return"string"==typeof e?new i.default(e):new i.default(e.value)}function l(e){var t,n,r;let i=null;return(null===(t=e.NewFields)||void 0===t?void 0:t.Balance)?i=c(e.NewFields.Balance):(null===(n=e.PreviousFields)||void 0===n?void 0:n.Balance)&&(null===(r=e.FinalFields)||void 0===r?void 0:r.Balance)&&(i=c(e.FinalFields.Balance).minus(c(e.PreviousFields.Balance))),null===i||i.isZero()?null:i}function u(e){const t=new i.default(e.balance.value).negated();return{account:e.balance.issuer,balance:{issuer:e.account,currency:e.balance.currency,value:t.toString()}}}t.default=function(e){return function(e){const t=(0,o.groupBy)(e,e=>e.account);return Object.entries(t).map(([e,t])=>({account:e,balances:t.map(e=>e.balance)}))}(function(e){return 0===e.AffectedNodes.length?[]:e.AffectedNodes.map(a)}(e).map(e=>{if("AccountRoot"===e.LedgerEntryType){const t=function(e){var t,n,r;const i=l(e);return null===i?null:{account:null!==(n=null===(t=e.FinalFields)||void 0===t?void 0:t.Account)&&void 0!==n?n:null===(r=e.NewFields)||void 0===r?void 0:r.Account,balance:{currency:"XRP",value:(0,s.dropsToXrp)(i).toString()}}}(e);return null==t?[]:[t]}if("RippleState"===e.LedgerEntryType){const t=function(e){var t,n,r;const i=l(e);if(null===i)return null;const o=null!==(t=e.NewFields)&&void 0!==t?t:e.FinalFields,s={account:null===(n=null==o?void 0:o.LowLimit)||void 0===n?void 0:n.issuer,balance:{issuer:null===(r=null==o?void 0:o.HighLimit)||void 0===r?void 0:r.issuer,currency:(null==o?void 0:o.Balance).currency,value:i.toString()}};return[s,u(s)]}(e);return null==t?[]:t}return[]}).flat())}},3007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTicketCreate=void 0;const r=n(255),i=n(2794);t.validateTicketCreate=function(e){(0,i.validateBaseTransaction)(e);const{TicketCount:t}=e;if(void 0===t)throw new r.ValidationError("TicketCreate: missing field TicketCount");if("number"!=typeof t)throw new r.ValidationError("TicketCreate: TicketCount must be a number");if(!Number.isInteger(t)||t<1||t>250)throw new r.ValidationError("TicketCreate: TicketCount must be an integer from 1 to 250")}},3062:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,s),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},3094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenAuthorize=t.MPTokenAuthorizeFlags=void 0;const r=n(2794);var i;!function(e){e[e.tfMPTUnauthorize=1]="tfMPTUnauthorize"}(i||(t.MPTokenAuthorizeFlags=i={})),t.validateMPTokenAuthorize=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"MPTokenIssuanceID",r.isString),(0,r.validateOptionalField)(e,"Holder",r.isAccount)}},3122:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(534)),a=o(n(5644));i(n(168),t),t.default=class{constructor(){this.root=new s.default(0)}get hash(){return this.root.hash}addItem(e,t,n){this.root.addItem(e,new a.default(e,t,n))}}},3181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t._splitEndoScalar=l,t._normFnElement=b,t.weierstrassN=E,t.SWUFpSqrtRatio=A,t.mapToCurveSimpleSWU=function(e,t){(0,a.validateField)(e);const{A:n,B:r,Z:i}=t;if(!e.isValid(n)||!e.isValid(r)||!e.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=A(e,i);if(!e.isOdd)throw new Error("Field does not have .isOdd()");return t=>{let s,c,l,u,d,f,h,g;s=e.sqr(t),s=e.mul(s,i),c=e.sqr(s),c=e.add(c,s),l=e.add(c,e.ONE),l=e.mul(l,r),u=e.cmov(i,e.neg(c),!e.eql(c,e.ZERO)),u=e.mul(u,n),c=e.sqr(l),f=e.sqr(u),d=e.mul(f,n),c=e.add(c,d),c=e.mul(c,l),f=e.mul(f,u),d=e.mul(f,r),c=e.add(c,d),h=e.mul(s,l);const{isValid:p,value:y}=o(c,f);g=e.mul(s,t),g=e.mul(g,y),h=e.cmov(h,l,p),g=e.cmov(g,y,p);const m=e.isOdd(t)===e.isOdd(g);g=e.cmov(e.neg(g),g,m);const b=(0,a.FpInvertBatch)(e,[u],!0)[0];return h=e.mul(h,b),{x:h,y:g}}},t.ecdh=v,t.ecdsa=T,t.weierstrassPoints=function(e){const{CURVE:t,curveOpts:n}=O(e);return function(e,t){const{Fp:n,Fn:r}=t;const i=I(n,e.a,e.b);return Object.assign({},{CURVE:e,Point:t,ProjectivePoint:t,normPrivateKeyToScalar:e=>b(r,e),weierstrassEquation:i,isWithinCurveOrder:function(e){return(0,o.inRange)(e,g,r.ORDER)}})}(e,E(t,n))},t._legacyHelperEquat=I,t.weierstrass=function(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:n}=O(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,(0,a.nLength)(n.Fn.ORDER,n.Fn.BITS))})}(e,T(E(t,n),r,i))};const r=n(6202),i=n(5492),o=n(7663),s=n(2242),a=n(5827),c=(e,t)=>(e+(e>=0?t:-t)/p)/t;function l(e,t,n){const[[r,i],[s,a]]=t,l=c(a*e,n),u=c(-i*e,n);let d=e-l*r-u*s,f=-l*i-u*a;const p=d<h,y=f<h;p&&(d=-d),y&&(f=-f);const m=(0,o.bitMask)(Math.ceil((0,o.bitLen)(n)/2))+g;if(d<h||d>=m||f<h||f>=m)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:p,k1:d,k2neg:y,k2:f}}function u(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function d(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return(0,o._abool2)(n.lowS,"lowS"),(0,o._abool2)(n.prehash,"prehash"),void 0!==n.format&&u(n.format),n}class f extends Error{constructor(e=""){super(e)}}t.DERErr=f,t.DER={Err:f,_tlv:{encode:(e,n)=>{const{Err:r}=t.DER;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&n.length)throw new r("tlv.encode: unpadded data");const i=n.length/2,s=(0,o.numberToHexUnpadded)(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=i>127?(0,o.numberToHexUnpadded)(s.length/2|128):"";return(0,o.numberToHexUnpadded)(e)+a+s+n},decode(e,n){const{Err:r}=t.DER;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(n.length<2||n[i++]!==e)throw new r("tlv.decode: wrong tlv");const o=n[i++];let s=0;if(128&o){const e=127&o;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const t=n.subarray(i,i+e);if(t.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===t[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of t)s=s<<8|e;if(i+=e,s<128)throw new r("tlv.decode(long): not minimal encoding")}else s=o;const a=n.subarray(i,i+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:n.subarray(i+s)}}},_int:{encode(e){const{Err:n}=t.DER;if(e<h)throw new n("integer: negative integers are not allowed");let r=(0,o.numberToHexUnpadded)(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new n("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:n}=t.DER;if(128&e[0])throw new n("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new n("invalid signature integer: unnecessary leading zero");return(0,o.bytesToNumberBE)(e)}},toSig(e){const{Err:n,_int:r,_tlv:i}=t.DER,s=(0,o.ensureBytes)("signature",e),{v:a,l:c}=i.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:l,l:u}=i.decode(2,a),{v:d,l:f}=i.decode(2,u);if(f.length)throw new n("invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(d)}},hexFromSig(e){const{_tlv:n,_int:r}=t.DER,i=n.encode(2,r.encode(e.r))+n.encode(2,r.encode(e.s));return n.encode(48,i)}};const h=BigInt(0),g=BigInt(1),p=BigInt(2),y=BigInt(3),m=BigInt(4);function b(e,t){const{BYTES:n}=e;let r;if("bigint"==typeof t)r=t;else{let i=(0,o.ensureBytes)("private key",t);try{r=e.fromBytes(i)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function E(e,t={}){const n=(0,s._createCurveFields)("weierstrass",e,t),{Fp:r,Fn:i}=n;let a=n.CURVE;const{h:c,n:u}=a;(0,o._validateObject)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:d}=t;if(d&&(!r.is0(a.a)||"bigint"!=typeof d.beta||!Array.isArray(d.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const f=S(r,i);function p(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const E=t.toBytes||function(e,t,n){const{x:i,y:s}=t.toAffine(),a=r.toBytes(i);if((0,o._abool2)(n,"isCompressed"),n){p();const e=!r.isOdd(s);return(0,o.concatBytes)(w(e),a)}return(0,o.concatBytes)(Uint8Array.of(4),a,r.toBytes(s))},A=t.fromBytes||function(e){(0,o._abytes2)(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=f,i=e.length,s=e[0],a=e.subarray(1);if(i!==t||2!==s&&3!==s){if(i===n&&4===s){const e=r.BYTES,t=r.fromBytes(a.subarray(0,e)),n=r.fromBytes(a.subarray(e,2*e));if(!T(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}{const e=r.fromBytes(a);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=v(e);let n;try{n=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}return p(),!(1&~s)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function v(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,a.a)),a.b)}function T(e,t){const n=r.sqr(t),i=v(e);return r.eql(n,i)}if(!T(a.Gx,a.Gy))throw new Error("bad curve params: generator point");const O=r.mul(r.pow(a.a,y),m),I=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(O,I)))throw new Error("bad curve params: a or b");function B(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function _(e){if(!(e instanceof D))throw new Error("ProjectivePoint expected")}function N(e){if(!d||!d.basises)throw new Error("no endo");return l(e,d.basises,i.ORDER)}const L=(0,o.memoized)((e,t)=>{const{X:n,Y:i,Z:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const s=e.is0();null==t&&(t=s?r.ONE:r.inv(o));const a=r.mul(n,t),c=r.mul(i,t),l=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),F=(0,o.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!T(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function C(e,t,n,i,o){return n=new D(r.mul(n.X,e),n.Y,n.Z),t=(0,s.negateCt)(i,t),n=(0,s.negateCt)(o,n),t.add(n)}class D{constructor(e,t,n){this.X=B("x",e),this.Y=B("y",t,!0),this.Z=B("z",n),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof D)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?D.ZERO:new D(t,n,r.ONE)}static fromBytes(e){const t=D.fromAffine(A((0,o._abytes2)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return D.fromBytes((0,o.ensureBytes)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return P.createCache(this,e),t||this.multiply(y),this}assertValidity(){F(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){_(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),l=r.eql(r.mul(n,a),r.mul(s,i));return c&&l}negate(){return new D(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=a,n=r.mul(t,y),{X:i,Y:o,Z:s}=this;let c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(i,i),f=r.mul(o,o),h=r.mul(s,s),g=r.mul(i,o);return g=r.add(g,g),u=r.mul(i,s),u=r.add(u,u),c=r.mul(e,u),l=r.mul(n,h),l=r.add(c,l),c=r.sub(f,l),l=r.add(f,l),l=r.mul(c,l),c=r.mul(g,c),u=r.mul(n,u),h=r.mul(e,h),g=r.sub(d,h),g=r.mul(e,g),g=r.add(g,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,h),d=r.mul(d,g),l=r.add(l,d),h=r.mul(o,s),h=r.add(h,h),d=r.mul(h,g),c=r.sub(c,d),u=r.mul(h,f),u=r.add(u,u),u=r.add(u,u),new D(c,l,u)}add(e){_(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:c}=e;let l=r.ZERO,u=r.ZERO,d=r.ZERO;const f=a.a,h=r.mul(a.b,y);let g=r.mul(t,o),p=r.mul(n,s),m=r.mul(i,c),b=r.add(t,n),E=r.add(o,s);b=r.mul(b,E),E=r.add(g,p),b=r.sub(b,E),E=r.add(t,i);let w=r.add(o,c);return E=r.mul(E,w),w=r.add(g,m),E=r.sub(E,w),w=r.add(n,i),l=r.add(s,c),w=r.mul(w,l),l=r.add(p,m),w=r.sub(w,l),d=r.mul(f,E),l=r.mul(h,m),d=r.add(l,d),l=r.sub(p,d),d=r.add(p,d),u=r.mul(l,d),p=r.add(g,g),p=r.add(p,g),m=r.mul(f,m),E=r.mul(h,E),p=r.add(p,m),m=r.sub(g,m),m=r.mul(f,m),E=r.add(E,m),g=r.mul(p,E),u=r.add(u,g),g=r.mul(w,E),l=r.mul(b,l),l=r.sub(l,g),g=r.mul(b,p),d=r.mul(w,d),d=r.add(d,g),new D(l,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(D.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const a=e=>P.cached(this,e,e=>(0,s.normalizeZ)(D,e));if(n){const{k1neg:t,k1:i,k2neg:s,k2:c}=N(e),{p:l,f:u}=a(i),{p:d,f}=a(c);o=u.add(f),r=C(n.beta,l,d,t,s)}else{const{p:t,f:n}=a(e);r=t,o=n}return(0,s.normalizeZ)(D,[r,o])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===h||r.is0())return D.ZERO;if(e===g)return r;if(P.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:o,k2:a}=N(e),{p1:c,p2:l}=(0,s.mulEndoUnsafe)(D,r,i,a);return C(n.beta,c,l,t,o)}return P.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return L(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return c===g||(e?e(D,this):P.unsafe(this,u).is0())}clearCofactor(){const{clearCofactor:e}=t;return c===g?this:e?e(D,this):this.multiplyUnsafe(c)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}toBytes(e=!0){return(0,o._abool2)(e,"isCompressed"),this.assertValidity(),E(D,this,e)}toHex(e=!0){return(0,o.bytesToHex)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,s.normalizeZ)(D,e)}static msm(e,t){return(0,s.pippenger)(D,i,e,t)}static fromPrivateKey(e){return D.BASE.multiply(b(i,e))}}D.BASE=new D(a.Gx,a.Gy,r.ONE),D.ZERO=new D(r.ZERO,r.ONE,r.ZERO),D.Fp=r,D.Fn=i;const M=i.BITS,P=new s.wNAF(D,t.endo?Math.ceil(M/2):M);return D.BASE.precompute(8),D}function w(e){return Uint8Array.of(e?2:3)}function A(e,t){const n=e.ORDER;let r=h;for(let e=n-g;e%p===h;e/=p)r+=g;const i=r,o=p<<i-g-g,s=o*p,a=(n-g)/s,c=(a-g)/p,l=s-g,u=o,d=e.pow(t,a),f=e.pow(t,(a+g)/p);let b=(t,n)=>{let r=d,o=e.pow(n,l),s=e.sqr(o);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,n),s=e.mul(a,t);let h=e.mul(s,o);a=e.pow(h,u);let y=e.eql(a,e.ONE);o=e.mul(s,f),a=e.mul(h,r),s=e.cmov(o,s,y),h=e.cmov(a,h,y);for(let t=i;t>g;t--){let n=t-p;n=p<<n-g;let i=e.pow(h,n);const a=e.eql(i,e.ONE);o=e.mul(s,r),r=e.mul(r,r),i=e.mul(h,r),s=e.cmov(o,s,a),h=e.cmov(i,h,a)}return{isValid:y,value:s}};if(e.ORDER%m===y){const n=(e.ORDER-y)/m,r=e.sqrt(e.neg(t));b=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,n);a=e.mul(a,s);const c=e.mul(a,r),l=e.mul(e.sqr(a),i),u=e.eql(l,t);return{isValid:u,value:e.cmov(c,a,u)}}}return b}function S(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function v(e,t={}){const{Fn:n}=e,r=t.randomBytes||o.randomBytes,i=Object.assign(S(e.Fp,n),{seed:(0,a.getMinHashLength)(n.ORDER)});function s(e){try{return!!b(n,e)}catch(e){return!1}}function c(e=r(i.seed)){return(0,a.mapHashToField)((0,o._abytes2)(e,i.seed,"seed"),n.ORDER)}function l(t,r=!0){return e.BASE.multiply(b(n,t)).toBytes(r)}function u(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:s,publicKeyUncompressed:a}=i;if(n.allowedLengths||r===s)return;const c=(0,o.ensureBytes)("key",t).length;return c===s||c===a}const d={isValidSecretKey:s,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:o}=i;try{const i=t.length;return!(!0===n&&i!==r||!1===n&&i!==o||!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:c,isValidPrivateKey:s,randomPrivateKey:c,normPrivateKeyToScalar:e=>b(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({getPublicKey:l,getSharedSecret:function(t,r,i=!0){if(!0===u(t))throw new Error("first arg must be private key");if(!1===u(r))throw new Error("second arg must be public key");const o=b(n,t);return e.fromHex(r).multiply(o).toBytes(i)},keygen:function(e){const t=c(e);return{secretKey:t,publicKey:l(t)}},Point:e,utils:d,lengths:i})}function T(e,n,s={}){(0,i.ahash)(n),(0,o._validateObject)(s,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const a=s.randomBytes||o.randomBytes,c=s.hmac||((e,...t)=>(0,r.hmac)(n,e,(0,o.concatBytes)(...t))),{Fp:l,Fn:f}=e,{ORDER:y,BITS:m}=f,{keygen:E,getPublicKey:A,getSharedSecret:S,utils:T,lengths:O}=v(e,s),I={prehash:!1,lowS:"boolean"==typeof s.lowS&&s.lowS,format:void 0,extraEntropy:!1},B="compact";function _(e){return e>y>>g}function N(e,t){if(!f.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class L{constructor(e,t,n){this.r=N("r",e),this.s=N("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,n=B){let r;if(function(e,t){u(t);const n=O.signature,r="compact"===t?n:"recovered"===t?n+1:void 0;(0,o._abytes2)(e,r,`${t} signature`)}(e,n),"der"===n){const{r:n,s:r}=t.DER.toSig((0,o._abytes2)(e));return new L(n,r)}"recovered"===n&&(r=e[0],n="compact",e=e.subarray(1));const i=f.BYTES,s=e.subarray(0,i),a=e.subarray(i,2*i);return new L(f.fromBytes(s),f.fromBytes(a),r)}static fromHex(e,t){return this.fromBytes((0,o.hexToBytes)(e),t)}addRecoveryBit(e){return new L(this.r,this.s,e)}recoverPublicKey(t){const n=l.ORDER,{r,s:i,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(y*p<n&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const a=2===s||3===s?r+y:r;if(!l.isValid(a))throw new Error("recovery id 2 or 3 invalid");const c=l.toBytes(a),u=e.fromBytes((0,o.concatBytes)(w(!(1&s)),c)),d=f.inv(a),h=C((0,o.ensureBytes)("msgHash",t)),g=f.create(-h*d),m=f.create(i*d),b=e.BASE.multiplyUnsafe(g).add(u.multiplyUnsafe(m));if(b.is0())throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return _(this.s)}toBytes(e=B){if(u(e),"der"===e)return(0,o.hexToBytes)(t.DER.hexFromSig(this));const n=f.toBytes(this.r),r=f.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return(0,o.concatBytes)(Uint8Array.of(this.recovery),n,r)}return(0,o.concatBytes)(n,r)}toHex(e){return(0,o.bytesToHex)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return L.fromBytes((0,o.ensureBytes)("sig",e),"compact")}static fromDER(e){return L.fromBytes((0,o.ensureBytes)("sig",e),"der")}normalizeS(){return this.hasHighS()?new L(this.r,f.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.bytesToHex)(this.toBytes("compact"))}}const F=s.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,o.bytesToNumberBE)(e),n=8*e.length-m;return n>0?t>>BigInt(n):t},C=s.bits2int_modN||function(e){return f.create(F(e))},D=(0,o.bitMask)(m);function M(e){return(0,o.aInRange)("num < 2^"+m,e,h,D),f.toBytes(e)}function P(e,t){return(0,o._abytes2)(e,void 0,"message"),t?(0,o._abytes2)(n(e),void 0,"prehashed message"):e}return Object.freeze({keygen:E,getPublicKey:A,getSharedSecret:S,utils:T,lengths:O,Point:e,sign:function(t,r,i={}){t=(0,o.ensureBytes)("message",t);const{seed:s,k2sig:l}=function(t,n,r){if(["recovered","canonical"].some(e=>e in r))throw new Error("sign() legacy options not supported");const{lowS:i,prehash:s,extraEntropy:c}=d(r,I);t=P(t,s);const l=C(t),u=b(f,n),p=[M(u),M(l)];if(null!=c&&!1!==c){const e=!0===c?a(O.secretKey):c;p.push((0,o.ensureBytes)("extraEntropy",e))}const y=(0,o.concatBytes)(...p),m=l;return{seed:y,k2sig:function(t){const n=F(t);if(!f.isValidNot0(n))return;const r=f.inv(n),o=e.BASE.multiply(n).toAffine(),s=f.create(o.x);if(s===h)return;const a=f.create(r*f.create(m+s*u));if(a===h)return;let c=(o.x===s?0:2)|Number(o.y&g),l=a;return i&&_(a)&&(l=f.neg(a),c^=1),new L(s,l,c)}}}(t,r,i);return(0,o.createHmacDrbg)(n.outputLen,f.BYTES,c)(s,l)},verify:function(n,r,i,s={}){const{lowS:a,prehash:c,format:l}=d(s,I);if(i=(0,o.ensureBytes)("publicKey",i),r=P((0,o.ensureBytes)("message",r),c),"strict"in s)throw new Error("options.strict was renamed to lowS");const u=void 0===l?function(e){let n;const r="string"==typeof e||(0,o.isBytes)(e),i=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!i)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(i)n=new L(e.r,e.s);else if(r){try{n=L.fromBytes((0,o.ensureBytes)("sig",e),"der")}catch(e){if(!(e instanceof t.DER.Err))throw e}if(!n)try{n=L.fromBytes((0,o.ensureBytes)("sig",e),"compact")}catch(e){return!1}}return n||!1}(n):L.fromBytes((0,o.ensureBytes)("sig",n),l);if(!1===u)return!1;try{const t=e.fromBytes(i);if(a&&u.hasHighS())return!1;const{r:n,s:o}=u,s=C(r),c=f.inv(o),l=f.create(s*c),d=f.create(n*c),h=e.BASE.multiplyUnsafe(l).add(t.multiplyUnsafe(d));return!h.is0()&&f.create(h.x)===n}catch(e){return!1}},recoverPublicKey:function(e,t,n={}){const{prehash:r}=d(n,I);return t=P(t,r),L.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:L,hash:n})}function O(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:(0,a.Field)(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function I(e,t,n){return function(r){const i=e.sqr(r),o=e.mul(i,r);return e.add(e.add(o,e.mul(r,t)),n)}}},3212:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={ok(e,t){if(!e)throw new Error(t)}};t.default=n},3222:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortAndLimitOffers=t.separateBuySellOrders=t.combineOrders=t.extractOffers=t.reverseRequest=t.requestAllOffers=t.createBookOffersRequest=t.validateOrderbookOptions=void 0;const o=i(n(735)),s=n(255),a=n(5237),c=new Set(["limit","ledger_index","ledger_hash","taker"]);t.validateOrderbookOptions=function(e){for(const t of Object.keys(e))if(!c.has(t))throw new s.ValidationError(`Unexpected option: ${t}`,e);if(e.limit&&"number"!=typeof e.limit)throw new s.ValidationError("limit must be a number",e.limit);if(e.ledger_index&&!("number"==typeof e.ledger_index||"string"==typeof e.ledger_index&&["validated","closed","current"].includes(e.ledger_index)))throw new s.ValidationError('ledger_index must be a number or a string of "validated", "closed", or "current"',e.ledger_index);if(void 0!==e.ledger_hash&&null!==e.ledger_hash&&"string"!=typeof e.ledger_hash)throw new s.ValidationError("ledger_hash must be a string",e.ledger_hash);if(void 0!==e.taker&&"string"!=typeof e.taker)throw new s.ValidationError("taker must be a string",e.taker)},t.createBookOffersRequest=function(e,t,n){var r,i,o;return{command:"book_offers",taker_pays:e,taker_gets:t,ledger_index:null!==(r=n.ledger_index)&&void 0!==r?r:"validated",ledger_hash:null===n.ledger_hash?void 0:n.ledger_hash,limit:null!==(i=n.limit)&&void 0!==i?i:20,taker:null!==(o=n.taker)&&void 0!==o?o:void 0}},t.requestAllOffers=function(e,t){return r(this,void 0,void 0,function*(){return(yield e.requestAll(t)).map(e=>e.result.offers)})},t.reverseRequest=function(e){return Object.assign(Object.assign({},e),{taker_pays:e.taker_gets,taker_gets:e.taker_pays})},t.extractOffers=function(e){return e.flatMap(e=>e)},t.combineOrders=function(e,t){return[...e,...t]},t.separateBuySellOrders=function(e){const t=[],n=[];return e.forEach(e=>{0===(e.Flags&a.OfferFlags.lsfSell)?t.push(e):n.push(e)}),{buy:t,sell:n}},t.sortAndLimitOffers=function(e,t){return function(e){return e.sort((e,t)=>{var n,r;const i=null!==(n=e.quality)&&void 0!==n?n:0,s=null!==(r=t.quality)&&void 0!==r?r:0;return new o.default(i).comparedTo(s)})}(e).slice(0,t)}},3296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowCreate=void 0;const r=n(255),i=n(2794);t.validateEscrowCreate=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Amount",i.isAmount),(0,i.validateRequiredField)(e,"Destination",i.isAccount),(0,i.validateOptionalField)(e,"DestinationTag",i.isNumber),void 0===e.CancelAfter&&void 0===e.FinishAfter)throw new r.ValidationError("EscrowCreate: Either CancelAfter or FinishAfter must be specified");if(void 0===e.FinishAfter&&void 0===e.Condition)throw new r.ValidationError("EscrowCreate: Either Condition or FinishAfter must be specified");if(void 0!==e.CancelAfter&&"number"!=typeof e.CancelAfter)throw new r.ValidationError("EscrowCreate: CancelAfter must be a number");if(void 0!==e.FinishAfter&&"number"!=typeof e.FinishAfter)throw new r.ValidationError("EscrowCreate: FinishAfter must be a number");if(void 0!==e.Condition&&"string"!=typeof e.Condition)throw new r.ValidationError("EscrowCreate: Condition must be a string")}},3328:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt=void 0;const r=n(1275);class i extends r.Comparable{constructor(e){super(e)}compareTo(e){return(t=this.valueOf())<(n=e.valueOf())?-1:t==n?0:1;var t,n}toJSON(){const e=this.valueOf();return"number"==typeof e?e:e.toString()}static checkUintRange(e,t,n){if(e<t||e>n)throw new Error(`Invalid ${this.constructor.name}: ${e} must be >= ${t} and <= ${n}`)}}t.UInt=i},3342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeletedNode=t.isModifiedNode=t.isCreatedNode=void 0,t.isCreatedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"CreatedNode")},t.isModifiedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"ModifiedNode")},t.isDeletedNode=function(e){return Object.prototype.hasOwnProperty.call(e,"DeletedNode")}},3365:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.percentToQuality=t.transferRateToDecimal=t.qualityToDecimal=t.decimalToQuality=t.percentToTransferRate=t.decimalToTransferRate=void 0;const i=r(n(735)),o=n(255),s="1000000000";function a(e){if(!e.endsWith("%"))throw new o.ValidationError(`Value ${e} must end with %`);const t=e.split("%").filter(e=>""!==e);if(1!==t.length)throw new o.ValidationError(`Value ${e} contains too many % signs`);return new i.default(t[0]).dividedBy("100").toString(10)}function c(e){const t=new i.default(e).times(s).plus(s);if(t.isLessThan(s)||t.isGreaterThan("2000000000"))throw new o.ValidationError("Decimal value must be between 0 and 1.00.");const n=t.toString(10);if(n===s)return 0;if("NaN"===n)throw new o.ValidationError("Value is not a number");if(n.includes("."))throw new o.ValidationError("Decimal exceeds maximum precision.");return Number(n)}function l(e){const t=new i.default(e).times(s).toString(10);if("NaN"===t)throw new o.ValidationError("Value is not a number");if(t.includes("-"))throw new o.ValidationError("Cannot have negative Quality");if(t===s)return 0;if(t.includes("."))throw new o.ValidationError("Decimal exceeds maximum precision.");return Number(t)}t.decimalToTransferRate=c,t.percentToTransferRate=function(e){return c(a(e))},t.decimalToQuality=l,t.qualityToDecimal=function(e){if(!Number.isInteger(e))throw new o.ValidationError("Quality must be an integer");if(e<0)throw new o.ValidationError("Negative quality not allowed");return 0===e?"1":new i.default(e).dividedBy(s).toString(10)},t.transferRateToDecimal=function(e){if(!Number.isInteger(e))throw new o.ValidationError("Error decoding, transfer Rate must be an integer");if(0===e)return"0";const t=new i.default(e).minus(s).dividedBy(s);if(t.isLessThan(0))throw new o.ValidationError("Error decoding, negative transfer rate");return t.toString(10)},t.percentToQuality=function(e){return l(a(e))}},3449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=o,t.abytes=s,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.bytesToHex=c,t.numberToHexUnpadded=l,t.hexToNumber=u,t.hexToBytes=h,t.bytesToNumberBE=function(e){return u(c(e))},t.bytesToNumberLE=function(e){return s(e),u(c(Uint8Array.from(e).reverse()))},t.numberToBytesBE=g,t.numberToBytesLE=function(e,t){return g(e,t).reverse()},t.numberToVarBytesBE=function(e){return h(l(e))},t.ensureBytes=function(e,t,n){let r;if("string"==typeof t)try{r=h(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r},t.concatBytes=p,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},t.inRange=m,t.aInRange=function(e,t,n,r){if(!m(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>n;e>>=r,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&r},t.bitSet=function(e,t,i){return e|(i?r:n)<<BigInt(t)},t.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let r=b(e),i=b(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...e)=>n(i,r,...e),c=(e=b())=>{i=a(E([0]),e),r=a(),0!==e.length&&(i=a(E([1]),e),r=a())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return p(...n)};return(e,t)=>{let n;for(s(),c(e);!(n=t(l()));)c();return s(),n}},t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=w[n];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(r&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+o)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e},t.memoized=function(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}};const n=BigInt(0),r=BigInt(1),i=BigInt(2);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function s(e){if(!o(e))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(e){s(e);let t="";for(let n=0;n<e.length;n++)t+=a[e[n]];return t}function l(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?n:BigInt("0x"+e)}const d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r}function g(e,t){return h(e.toString(16).padStart(2*t,"0"))}function p(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];s(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}const y=e=>"bigint"==typeof e&&n<=e;function m(e,t,n){return y(e)&&y(t)&&y(n)&&t<=e&&e<n}t.bitMask=e=>(i<<BigInt(e-1))-r;const b=e=>new Uint8Array(e),E=e=>Uint8Array.from(e),w={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},3461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultDeposit=void 0;const r=n(2794);t.validateVaultDeposit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},3471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainCommit=void 0;const r=n(2794);t.validateXChainCommit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateOptionalField)(e,"OtherChainDestination",r.isAccount),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},3539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOfferCancel=void 0;const r=n(255),i=n(2794);t.validateOfferCancel=function(e){if((0,i.validateBaseTransaction)(e),void 0===e.OfferSequence)throw new r.ValidationError("OfferCancel: missing field OfferSequence");if("number"!=typeof e.OfferSequence)throw new r.ValidationError("OfferCancel: OfferSequence must be a number")}},3627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={account:"a",dirNode:"d",generatorMap:"g",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",escrow:"u",amendment:"f",feeSettings:"e",ticket:"T",signerList:"S",paychan:"x",check:"C",depositPreauth:"p"}},3719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=void 0;const r=n(1275),i=n(8264),o=n(7995),s=n(619);class a extends r.SerializedType{constructor(e){super(e)}static fromParser(e,t){const n=new o.BytesList,r=(null!=t?t:e.size())/32;for(let t=0;t<r;t++)i.Hash256.fromParser(e).toBytesSink(n);return new a(n.toBytes())}static from(e){if(e instanceof a)return e;if(t=e,Array.isArray(t)&&(0===t.length||"string"==typeof t[0])){const t=new o.BytesList;return e.forEach(e=>{i.Hash256.from(e).toBytesSink(t)}),new a(t.toBytes())}var t;throw new Error("Cannot construct Vector256 from given value")}toJSON(){if(this.bytes.byteLength%32!=0)throw new Error("Invalid bytes for Vector256");const e=[];for(let t=0;t<this.bytes.byteLength;t+=32)e.push((0,s.bytesToHex)(this.bytes.slice(t,t+32)));return e}}t.Vector256=a},3733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldLookup=void 0;const r=n(2942),i=n(1275),o=n(8188);t.FieldLookup=class{constructor(e,t){e.forEach(([e,n])=>{const s=t[n.type];this[e]=function([e,t],n){const s=function(e,t){const n=[];return e<16?t<16?n.push(e<<4|t):n.push(e<<4,t):t<16?n.push(t,e):n.push(0,e,t),Uint8Array.from(n)}(n,t.nth);return{name:e,nth:t.nth,isVariableLengthEncoded:t.isVLEncoded,isSerialized:t.isSerialized,isSigningField:t.isSigningField,ordinal:n<<16|t.nth,type:new r.Bytes(t.type,n,o.TYPE_WIDTH),header:s,associatedType:i.SerializedType}}([e,n],s),this[this[e].ordinal.toString()]=this[e]})}fromString(e){return this[e]}}},3746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMClawback=t.AMMClawbackFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfClawTwoAssets=1]="tfClawTwoAssets"}(o||(t.AMMClawbackFlags=o={})),t.validateAMMClawback=function(e){(0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Holder",i.isAccount),(0,i.validateRequiredField)(e,"Asset",i.isIssuedCurrency);const t=e.Asset;if(e.Holder===t.issuer)throw new r.ValidationError("AMMClawback: Holder and Asset.issuer must be distinct");if(e.Account!==t.issuer)throw new r.ValidationError("AMMClawback: Account must be the same as Asset.issuer");if((0,i.validateRequiredField)(e,"Asset2",i.isIssuedCurrency),(0,i.validateOptionalField)(e,"Amount",i.isIssuedCurrencyAmount),null!=e.Amount){if(e.Amount.currency!==t.currency)throw new r.ValidationError("AMMClawback: Amount.currency must match Asset.currency");if(e.Amount.issuer!==t.issuer)throw new r.ValidationError("AMMClawback: Amount.issuer must match Amount.issuer")}}},3750:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAccountSet=t.AccountSetTfFlags=t.AccountSetAsfFlags=void 0;const r=n(255),i=n(2794);var o,s;!function(e){e[e.asfRequireDest=1]="asfRequireDest",e[e.asfRequireAuth=2]="asfRequireAuth",e[e.asfDisallowXRP=3]="asfDisallowXRP",e[e.asfDisableMaster=4]="asfDisableMaster",e[e.asfAccountTxnID=5]="asfAccountTxnID",e[e.asfNoFreeze=6]="asfNoFreeze",e[e.asfGlobalFreeze=7]="asfGlobalFreeze",e[e.asfDefaultRipple=8]="asfDefaultRipple",e[e.asfDepositAuth=9]="asfDepositAuth",e[e.asfAuthorizedNFTokenMinter=10]="asfAuthorizedNFTokenMinter",e[e.asfDisallowIncomingNFTokenOffer=12]="asfDisallowIncomingNFTokenOffer",e[e.asfDisallowIncomingCheck=13]="asfDisallowIncomingCheck",e[e.asfDisallowIncomingPayChan=14]="asfDisallowIncomingPayChan",e[e.asfDisallowIncomingTrustline=15]="asfDisallowIncomingTrustline",e[e.asfAllowTrustLineClawback=16]="asfAllowTrustLineClawback",e[e.asfAllowTrustLineLocking=17]="asfAllowTrustLineLocking"}(o||(t.AccountSetAsfFlags=o={})),function(e){e[e.tfRequireDestTag=65536]="tfRequireDestTag",e[e.tfOptionalDestTag=131072]="tfOptionalDestTag",e[e.tfRequireAuth=262144]="tfRequireAuth",e[e.tfOptionalAuth=524288]="tfOptionalAuth",e[e.tfDisallowXRP=1048576]="tfDisallowXRP",e[e.tfAllowXRP=2097152]="tfAllowXRP"}(s||(t.AccountSetTfFlags=s={})),t.validateAccountSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateOptionalField)(e,"NFTokenMinter",i.isAccount),void 0!==e.ClearFlag){if("number"!=typeof e.ClearFlag)throw new r.ValidationError("AccountSet: invalid ClearFlag");if(!Object.values(o).includes(e.ClearFlag))throw new r.ValidationError("AccountSet: invalid ClearFlag")}if(void 0!==e.Domain&&"string"!=typeof e.Domain)throw new r.ValidationError("AccountSet: invalid Domain");if(void 0!==e.EmailHash&&"string"!=typeof e.EmailHash)throw new r.ValidationError("AccountSet: invalid EmailHash");if(void 0!==e.MessageKey&&"string"!=typeof e.MessageKey)throw new r.ValidationError("AccountSet: invalid MessageKey");if(void 0!==e.SetFlag){if("number"!=typeof e.SetFlag)throw new r.ValidationError("AccountSet: invalid SetFlag");if(!Object.values(o).includes(e.SetFlag))throw new r.ValidationError("AccountSet: invalid SetFlag")}if(void 0!==e.TransferRate&&"number"!=typeof e.TransferRate)throw new r.ValidationError("AccountSet: invalid TransferRate");if(void 0!==e.TickSize){if("number"!=typeof e.TickSize)throw new r.ValidationError("AccountSet: invalid TickSize");if(0!==e.TickSize&&(e.TickSize<3||e.TickSize>15))throw new r.ValidationError("AccountSet: invalid TickSize")}}},3767:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2588),t),i(n(8161),t)},3776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;const r=n(1275),i=n(619),o=n(5517);class s extends r.Comparable{constructor(e){if(super(e),this.bytes.length!==this.constructor.width)throw new Error(`Invalid Hash length ${this.bytes.byteLength}`)}static from(e){if(e instanceof this)return e;if("string"==typeof e){if(!i.HEX_REGEX.test(e))throw new Error(`Invalid hash string ${e}`);return new this((0,i.hexToBytes)(e))}throw new Error("Cannot construct Hash from given value")}static fromParser(e,t){return new this(e.read(null!=t?t:this.width))}compareTo(e){return(0,o.compare)(this.bytes,this.constructor.from(e).bytes)}toString(){return this.toHex()}nibblet(e){const t=e>0?e/2|0:0;let n=this.bytes[t];return e%2==0?n=(240&n)>>>4:n&=15,n}}t.Hash=s},3795:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(5489),i=n(9987);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(e);const n=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(n.length>o?e.create().update(n).digest():n);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,r.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,r.aexists)(this),(0,r.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,n)=>new o(e,t).update(n).digest(),t.hmac.create=(e,t)=>new o(e,t)},3842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multisign=t.verifySignature=void 0;const r=n(5620),i=n(5442),o=n(255),s=n(9843),a=n(667);t.multisign=function(e){if(0===e.length)throw new o.ValidationError("There were 0 transactions to multisign");const t=e.map(e=>(0,a.getDecodedTransaction)(e));return t.forEach(e=>{if((0,s.validate)(e),null==e.Signers||0===e.Signers.length)throw new o.ValidationError("For multisigning all transactions must include a Signers field containing an array of signatures. You may have forgotten to pass the 'forMultisign' parameter when signing.");if(""!==e.SigningPubKey)throw new o.ValidationError("SigningPubKey must be an empty string for all transactions when multisigning.")}),function(e){const t=JSON.stringify(Object.assign(Object.assign({},e[0]),{Signers:null}));if(e.slice(1).some(e=>JSON.stringify(Object.assign(Object.assign({},e),{Signers:null}))!==t))throw new o.ValidationError("txJSON is not the same for all signedTransactions")}(t),(0,r.encode)(function(e){const t=e.flatMap(e=>{var t;return null!==(t=e.Signers)&&void 0!==t?t:[]}).sort((e,t)=>(0,a.compareSigners)(e.Signer,t.Signer));return Object.assign(Object.assign({},e[0]),{Signers:t})}(t))},t.verifySignature=function(e,t){const n=(0,a.getDecodedTransaction)(e);let o=t;if("string"!=typeof n.TxnSignature||!n.TxnSignature)throw new Error("Transaction is missing a signature, TxnSignature");if(!o){if("string"!=typeof n.SigningPubKey||!n.SigningPubKey)throw new Error("Transaction is missing a public key, SigningPubKey");o=n.SigningPubKey}return(0,i.verify)((0,r.encodeForSigning)(n),n.TxnSignature,o)}},3914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathSet=void 0;const r=n(5763),i=n(5967),o=n(892),s=n(1275),a=n(619);class c extends s.SerializedType{static from(e){if(e instanceof c)return e;const t=[Uint8Array.from([0])];return e.account&&(t.push(r.AccountID.from(e.account).toBytes()),t[0][0]|=1),e.currency&&(t.push(i.Currency.from(e.currency).toBytes()),t[0][0]|=16),e.issuer&&(t.push(r.AccountID.from(e.issuer).toBytes()),t[0][0]|=32),new c((0,a.concat)(t))}static fromParser(e){const t=e.readUInt8(),n=[Uint8Array.from([t])];return 1&t&&n.push(e.read(r.AccountID.width)),16&t&&n.push(e.read(i.Currency.width)),32&t&&n.push(e.read(r.AccountID.width)),new c((0,a.concat)(n))}toJSON(){const e=new o.BinaryParser((0,a.bytesToHex)(this.bytes)),t=e.readUInt8();let n,s,c;1&t&&(n=r.AccountID.fromParser(e).toJSON()),16&t&&(s=i.Currency.fromParser(e).toJSON()),32&t&&(c=r.AccountID.fromParser(e).toJSON());const l={};return n&&(l.account=n),c&&(l.issuer=c),s&&(l.currency=s),l}type(){return this.bytes[0]}}class l extends s.SerializedType{static from(e){if(e instanceof l)return e;const t=[];return e.forEach(e=>{t.push(c.from(e).toBytes())}),new l((0,a.concat)(t))}static fromParser(e){const t=[];for(;!e.end()&&(t.push(c.fromParser(e).toBytes()),0!==e.peek()&&255!==e.peek()););return new l((0,a.concat)(t))}toJSON(){const e=[],t=new o.BinaryParser(this.toString());for(;!t.end();)e.push(c.fromParser(t).toJSON());return e}}class u extends s.SerializedType{static from(e){if(e instanceof u)return e;if(t=e,Array.isArray(t)&&0===t.length||Array.isArray(t)&&Array.isArray(t[0])&&0===t[0].length||Array.isArray(t)&&Array.isArray(t[0])&&function(e){return void 0!==e.issuer||void 0!==e.account||void 0!==e.currency}(t[0][0])){const t=[];return e.forEach(e=>{t.push(l.from(e).toBytes()),t.push(Uint8Array.from([255]))}),t[t.length-1]=Uint8Array.from([0]),new u((0,a.concat)(t))}var t;throw new Error("Cannot construct PathSet from given value")}static fromParser(e){const t=[];for(;!e.end()&&(t.push(l.fromParser(e).toBytes()),t.push(e.read(1)),0!=t[t.length-1][0]););return new u((0,a.concat)(t))}toJSON(){const e=[],t=new o.BinaryParser(this.toString());for(;!t.end();)e.push(l.fromParser(t).toJSON()),t.skip(1);return e}}t.PathSet=u},3947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=t.SHA256=void 0;const r=n(1998),i=n(9987),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends r.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;a[e]=o+a[e-7]+r+a[e-16]|0}let{A:n,B:s,C:c,D:l,E:u,F:d,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(u,6)^(0,i.rotr)(u,11)^(0,i.rotr)(u,25))+(0,r.Chi)(u,d,f)+o[e]+a[e]|0,g=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+(0,r.Maj)(n,s,c)|0;h=f,f=d,d=u,u=l+t|0,l=c,c=s,s=n,n=t+g|0}n=n+this.A|0,s=s+this.B|0,c=c+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,c,l,u,d,f,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.SHA256=c;class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new c),t.sha224=(0,i.wrapConstructor)(()=>new l)},4107:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){return{constTimeNegate:a,hasPrecomputes:e=>1!==g(e),unsafeLadder(t,n,r=e.ZERO){let i=t;for(;n>o;)n&s&&(r=r.add(i)),i=i.double(),n>>=s;return r},precomputeWindow(e,n){const{windows:r,windowSize:i}=l(n,t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(n,r,i){const{windows:o,windowSize:c}=l(n,t);let u=e.ZERO,d=e.BASE;const f=BigInt(2**n-1),h=2**n,g=BigInt(n);for(let e=0;e<o;e++){const t=e*c;let n=Number(i&f);i>>=g,n>c&&(n-=h,i+=s);const o=t,l=t+Math.abs(n)-1,p=e%2!=0,y=n<0;0===n?d=d.add(a(p,r[o])):u=u.add(a(y,r[l]))}return{p:u,f:d}},wNAFUnsafe(n,r,i,a=e.ZERO){const{windows:c,windowSize:u}=l(n,t),d=BigInt(2**n-1),f=2**n,h=BigInt(n);for(let e=0;e<c;e++){const t=e*u;if(i===o)break;let n=Number(i&d);if(i>>=h,n>u&&(n-=f,i+=s),0===n)continue;let c=r[t+Math.abs(n)-1];n<0&&(c=c.negate()),a=a.add(c)}return a},getPrecomputes(e,t,n){let r=f.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&f.set(t,n(r))),r},wNAFCached(e,t,n){const r=g(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){const i=g(e);return 1===i?this.unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)},setWindowSize(e,n){c(n,t),h.set(e,n),f.delete(e)}}},t.pippenger=function(e,t,n,r){if(u(n,e),d(r,t),n.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,s=(0,i.bitLen)(BigInt(n.length)),a=s>12?s-3:s>4?s-2:s?2:1,c=(1<<a)-1,l=new Array(c+1).fill(o);let f=o;for(let e=Math.floor((t.BITS-1)/a)*a;e>=0;e-=a){l.fill(o);for(let t=0;t<r.length;t++){const i=r[t],o=Number(i>>BigInt(e)&BigInt(c));l[o]=l[o].add(n[t])}let t=o;for(let e=l.length-1,n=o;e>0;e--)n=n.add(l[e]),t=t.add(n);if(f=f.add(t),0!==e)for(let e=0;e<a;e++)f=f.double()}return f},t.precomputeMSMUnsafe=function(e,t,n,r){c(r,t.BITS),u(n,e);const i=e.ZERO,o=2**r-1,s=Math.ceil(t.BITS/r),a=BigInt((1<<r)-1),l=n.map(e=>{const t=[];for(let n=0,r=e;n<o;n++)t.push(r),r=r.add(e);return t});return e=>{if(d(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let o=i;for(let t=0;t<s;t++){if(o!==i)for(let e=0;e<r;e++)o=o.double();const n=BigInt(s*r-(t+1)*r);for(let t=0;t<e.length;t++){const r=e[t],i=Number(r>>n&a);i&&(o=o.add(l[t][i-1]))}}return o}},t.validateBasic=function(e){return(0,r.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,r.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};const r=n(802),i=n(3449),o=BigInt(0),s=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function l(e,t){return c(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}function u(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function d(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const f=new WeakMap,h=new WeakMap;function g(e){return h.get(e)||1}},4110:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=t.INTENTIONAL_DISCONNECT_CODE=void 0;const o=n(619),s=i(n(964)),a=n(3062),c=n(255),l=i(n(9859)),u=i(n(5435)),d=i(n(9566));t.INTENTIONAL_DISCONNECT_CODE=4e3;class f extends a.EventEmitter{constructor(e,t={}){super(),this.ws=null,this.reconnectTimeoutID=null,this.heartbeatIntervalID=null,this.retryConnectionBackoff=new u.default({min:100,max:6e4}),this.requestManager=new d.default,this.connectionManager=new l.default,this.trace=()=>{},this.url=e,this.config=Object.assign({timeout:2e4,connectionTimeout:5e3},t),"function"==typeof t.trace?this.trace=t.trace:t.trace&&(this.trace=console.log)}get state(){return this.ws?this.ws.readyState:s.default.CLOSED}get shouldBeConnected(){return null!==this.ws}isConnected(){return this.state===s.default.OPEN}connect(){return r(this,void 0,void 0,function*(){if(this.isConnected())return Promise.resolve();if(this.state===s.default.CONNECTING)return this.connectionManager.awaitConnection();if(!this.url)return Promise.reject(new c.ConnectionError("Cannot connect because no server was specified"));if(null!=this.ws)return Promise.reject(new c.XrplError("Websocket connection never cleaned up.",{state:this.state}));const e=setTimeout(()=>{this.onConnectionFailed(new c.ConnectionError(`Error: connect() timed out after ${this.config.connectionTimeout} ms. If your internet connection is working, the rippled server may be blocked or inaccessible. You can also try setting the 'connectionTimeout' option in the Client constructor.`))},this.config.connectionTimeout);if(this.ws=function(e,t){const n={agent:t.agent};t.headers&&(n.headers=t.headers),null!=t.authorization&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Basic ${btoa(t.authorization)}`}));const r=Object.assign({},n);return new s.default(e,r)}(this.url,this.config),null==this.ws)throw new c.XrplError("Connect: created null websocket");return this.ws.on("error",e=>this.onConnectionFailed(e)),this.ws.on("error",()=>clearTimeout(e)),this.ws.on("close",e=>this.onConnectionFailed(e)),this.ws.on("close",()=>clearTimeout(e)),this.ws.once("open",()=>{this.onceOpen(e)}),this.connectionManager.awaitConnection()})}disconnect(){return r(this,void 0,void 0,function*(){return this.clearHeartbeatInterval(),null!==this.reconnectTimeoutID&&(clearTimeout(this.reconnectTimeoutID),this.reconnectTimeoutID=null),this.state===s.default.CLOSED||null==this.ws?Promise.resolve(void 0):new Promise(e=>{null==this.ws&&e(void 0),null!=this.ws&&this.ws.once("close",t=>e(t)),null!=this.ws&&this.state!==s.default.CLOSING&&this.ws.close(t.INTENTIONAL_DISCONNECT_CODE)})})}reconnect(){return r(this,void 0,void 0,function*(){this.emit("reconnect"),yield this.disconnect(),yield this.connect()})}request(e,t){return r(this,void 0,void 0,function*(){if(!this.shouldBeConnected||null==this.ws)throw new c.NotConnectedError(JSON.stringify(e),e);const[n,i,o]=this.requestManager.createRequest(e,null!=t?t:this.config.timeout);return this.trace("send",i),function(e,t){return r(this,void 0,void 0,function*(){return new Promise((n,r)=>{e.send(t,e=>{e?r(new c.DisconnectedError(e.message,e)):n()})})})}(this.ws,i).catch(e=>{try{this.requestManager.reject(n,e)}catch(e){e instanceof c.XrplError?this.trace("send",`send errored after connection was closed: ${e.toString()}`):this.trace("send",String(e))}}),o})}getUrl(){var e;return null!==(e=this.url)&&void 0!==e?e:""}onMessage(e){let t;this.trace("receive",e);try{t=JSON.parse(e)}catch(t){return void(t instanceof Error&&this.emit("error","badMessage",t.message,e))}if(null==t.type&&t.error)this.emit("error",t.error,t.error_message,t);else if(t.type&&this.emit(t.type,t),"response"===t.type)try{this.requestManager.handleResponse(t)}catch(t){t instanceof Error?this.emit("error","badMessage",t.message,e):this.emit("error","badMessage",t,t)}}onceOpen(e){return r(this,void 0,void 0,function*(){if(null==this.ws)throw new c.XrplError("onceOpen: ws is null");this.ws.removeAllListeners(),clearTimeout(e),this.ws.on("message",e=>this.onMessage(e)),this.ws.on("error",e=>this.emit("error","websocket",e.message,e)),this.ws.once("close",(e,n)=>{if(null==this.ws)throw new c.XrplError("onceClose: ws is null");if(this.clearHeartbeatInterval(),this.requestManager.rejectAll(new c.DisconnectedError(`websocket was closed, ${n?(0,o.hexToString)((0,o.bytesToHex)(n)):""}`)),this.ws.removeAllListeners(),this.ws=null,void 0===e){const e=1011;this.emit("disconnected",e)}else this.emit("disconnected",e);e!==t.INTENTIONAL_DISCONNECT_CODE&&void 0!==e&&this.intentionalDisconnect()});try{this.retryConnectionBackoff.reset(),this.startHeartbeatInterval(),this.connectionManager.resolveAllAwaiting(),this.emit("connected")}catch(e){e instanceof Error&&(this.connectionManager.rejectAllAwaiting(e),yield this.disconnect().catch(()=>{}))}})}intentionalDisconnect(){const e=this.retryConnectionBackoff.duration();this.trace("reconnect",`Retrying connection in ${e}ms.`),this.emit("reconnecting",this.retryConnectionBackoff.attempts),this.reconnectTimeoutID=setTimeout(()=>{this.reconnect().catch(e=>{this.emit("error","reconnect",e.message,e)})},e)}clearHeartbeatInterval(){this.heartbeatIntervalID&&clearInterval(this.heartbeatIntervalID)}startHeartbeatInterval(){this.clearHeartbeatInterval(),this.heartbeatIntervalID=setInterval(()=>{this.heartbeat()},this.config.timeout)}heartbeat(){return r(this,void 0,void 0,function*(){this.request({command:"ping"}).catch(()=>r(this,void 0,void 0,function*(){return this.reconnect().catch(e=>{this.emit("error","reconnect",e.message,e)})}))})}onConnectionFailed(e){this.ws&&(this.ws.removeAllListeners(),this.ws.on("error",()=>{}),this.ws.close(),this.ws=null),"number"==typeof e?this.connectionManager.rejectAllAwaiting(new c.NotConnectedError(`Connection failed with code ${e}.`,{code:e})):(null==e?void 0:e.message)?this.connectionManager.rejectAllAwaiting(new c.NotConnectedError(e.message,e)):this.connectionManager.rejectAllAwaiting(new c.NotConnectedError("Connection failed."))}}t.Connection=f},4184:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.types=t.ShaMap=t.HashPrefix=t.quality=t.TransactionResult=t.Type=t.LedgerEntryType=t.TransactionType=t.Field=t.DEFAULT_DEFINITIONS=t.ledgerHashes=t.binary=t.hashes=void 0;const s=n(1141);Object.defineProperty(t,"DEFAULT_DEFINITIONS",{enumerable:!0,get:function(){return s.DEFAULT_DEFINITIONS}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return s.Field}}),Object.defineProperty(t,"TransactionType",{enumerable:!0,get:function(){return s.TransactionType}}),Object.defineProperty(t,"LedgerEntryType",{enumerable:!0,get:function(){return s.LedgerEntryType}}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return s.Type}}),Object.defineProperty(t,"TransactionResult",{enumerable:!0,get:function(){return s.TransactionResult}});const a=o(n(6986));t.types=a;const c=o(n(9543));t.binary=c;const l=n(8390);Object.defineProperty(t,"ShaMap",{enumerable:!0,get:function(){return l.ShaMap}});const u=o(n(2476));t.ledgerHashes=u;const d=o(n(7410));t.hashes=d;const f=n(8213);Object.defineProperty(t,"quality",{enumerable:!0,get:function(){return f.quality}});const h=n(7375);Object.defineProperty(t,"HashPrefix",{enumerable:!0,get:function(){return h.HashPrefix}})},4192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(3342);t.default=function(e){if("string"!=typeof e&&void 0===(null==e?void 0:e.AffectedNodes))throw new TypeError(`Unable to parse the parameter given to getXChainClaimID.\n 'meta' must be the metadata from an XChainCreateClaimID transaction. Received ${JSON.stringify(e)} instead.`);const t=function(e){return"string"==typeof e?(0,r.decode)(e):e}(e);if(!t.TransactionResult)throw new TypeError("Cannot get XChainClaimID from un-validated transaction");if("tesSUCCESS"===t.TransactionResult)return t.AffectedNodes.find(e=>(0,i.isCreatedNode)(e)&&"XChainOwnedClaimID"===e.CreatedNode.LedgerEntryType).CreatedNode.NewFields.XChainClaimID}},4200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt32=void 0;const r=n(3328),i=n(5517);class o extends r.UInt{constructor(e){super(null!=e?e:o.defaultUInt32.bytes)}static fromParser(e){return new o(e.read(o.width))}static from(e){if(e instanceof o)return e;const t=new Uint8Array(o.width);if("string"==typeof e){const n=Number.parseInt(e);return(0,i.writeUInt32BE)(t,n,0),new o(t)}if("number"==typeof e)return o.checkUintRange(e,0,4294967295),(0,i.writeUInt32BE)(t,e,0),new o(t);throw new Error("Cannot construct UInt32 from given value")}valueOf(){return parseInt((0,i.readUInt32BE)(this.bytes,0),10)}}t.UInt32=o,o.width=4,o.defaultUInt32=new o(new Uint8Array(o.width))},4202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFaucetPath=t.getFaucetHost=t.faucetNetworkIDs=t.faucetNetworkPaths=t.FaucetNetwork=void 0;const r=n(255);var i;!function(e){e.Testnet="faucet.altnet.rippletest.net",e.Devnet="faucet.devnet.rippletest.net"}(i||(t.FaucetNetwork=i={})),t.faucetNetworkPaths={[i.Testnet]:"/accounts",[i.Devnet]:"/accounts"},t.faucetNetworkIDs=new Map([[1,i.Testnet],[2,i.Devnet]]),t.getFaucetHost=function(e){if(null==e.networkID)throw new r.XRPLFaucetError("Cannot create faucet URL without networkID or the faucetHost information");if(t.faucetNetworkIDs.has(e.networkID))return t.faucetNetworkIDs.get(e.networkID);if(0===e.networkID)throw new r.XRPLFaucetError("Faucet is not available for mainnet.");throw new r.XRPLFaucetError("Faucet URL is not defined or inferrable.")},t.getFaucetPath=function(e){return void 0===e?"/accounts":t.faucetNetworkPaths[e]||"/accounts"}},4204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=function(e,t,n,r){const{c:a,dkLen:c,DK:l,PRF:u,PRFSalt:d}=o(e,t,n,r);let f;const h=new Uint8Array(4),g=(0,i.createView)(h),p=new Uint8Array(u.outputLen);for(let e=1,t=0;t<c;e++,t+=u.outputLen){const n=l.subarray(t,t+u.outputLen);g.setInt32(0,e,!1),(f=d._cloneInto(f)).update(h).digestInto(p),n.set(p.subarray(0,n.length));for(let e=1;e<a;e++){u._cloneInto(f).update(p).digestInto(p);for(let e=0;e<n.length;e++)n[e]^=p[e]}}return s(u,d,l,f,p)},t.pbkdf2Async=async function(e,t,n,r){const{c:a,dkLen:c,asyncTick:l,DK:u,PRF:d,PRFSalt:f}=o(e,t,n,r);let h;const g=new Uint8Array(4),p=(0,i.createView)(g),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=u.subarray(t,t+d.outputLen);p.setInt32(0,e,!1),(h=f._cloneInto(h)).update(g).digestInto(y),n.set(y.subarray(0,n.length)),await(0,i.asyncLoop)(a-1,l,()=>{d._cloneInto(h).update(y).digestInto(y);for(let e=0;e<n.length;e++)n[e]^=y[e]})}return s(d,f,u,h,y)};const r=n(6202),i=n(5492);function o(e,t,n,o){(0,i.ahash)(e);const s=(0,i.checkOpts)({dkLen:32,asyncTick:10},o),{c:a,dkLen:c,asyncTick:l}=s;if((0,i.anumber)(a),(0,i.anumber)(c),(0,i.anumber)(l),a<1)throw new Error("iterations (c) should be >= 1");const u=(0,i.kdfInputToBytes)(t),d=(0,i.kdfInputToBytes)(n),f=new Uint8Array(c),h=r.hmac.create(e,u),g=h._cloneInto().update(d);return{c:a,dkLen:c,asyncTick:l,DK:f,PRF:h,PRFSalt:g}}function s(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),(0,i.clean)(o),n}},4218:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.keyToRFC1751Mnemonic=t.rfc1751MnemonicToKey=void 0;const i=n(619),o=r(n(8413)).default,s=["0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"];function a(e){let t="";for(const n of e)t+=s[n>>4]+s[15&n];return t}function c(e,t,n){const r=e.substring(t,t+n);let i=0;for(let e=0;e<r.length;e++)i=2*i+r.charCodeAt(e)-48;return i}function l(e,t){const n=e.slice(t,t+6);let r=0;const i=[0,0,0,0,0,0,0,0,0];let s="";for(s of n){const e=o.indexOf(s.toUpperCase());if(-1===e)throw new TypeError(`Expected an RFC1751 word, but received '${s}'. For the full list of words in the RFC1751 encoding see https://datatracker.ietf.org/doc/html/rfc1751`);const t=(8-(r+11)%8)%8,n=e<<t,a=n>>16,c=n>>8&255,l=255&n,u=Math.floor(r/8);t>5?(i[u]|=a,i[u+1]|=c,i[u+2]|=l):t>-3?(i[u]|=c,i[u+1]|=l):i[u]|=l,r+=11}return{subKey:i.slice(),word:s}}function u(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function d(e){const t=function(e){const t=e.length;for(let n=0;n<t;n+=8)u(e,n,n+7),u(e,n+1,n+6),u(e,n+2,n+5),u(e,n+3,n+4);return e}(e);return(0,i.concat)([t.slice(8,16),t.slice(0,8)])}t.keyToRFC1751Mnemonic=function(e){let t=(n=d((0,i.hexToBytes)(e.replace(/\s+/gu,""))),Array.prototype.slice.call(n));var n;const r=[];for(let e=0;e<(8-t.length%8)%8;e++)r.push(0);t=r.concat(t);const s=[];for(let e=0;e<t.length;e+=8){const n=t.slice(e,e+8);let r=a(n),i=0;for(let e=0;e<64;e+=2)i+=c(r,e,2);n.push(i<<6&255),r=a(n);for(let e=0;e<64;e+=11)s.push(o[c(r,e,11)])}return s.join(" ")},t.rfc1751MnemonicToKey=function(e){const t=e.split(" ");let n=[];for(let e=0;e<t.length;e+=6){const{subKey:r,word:i}=l(t,e),o=a(r);let s=0;for(let e=0;e<64;e+=2)s+=c(o,e,2);if(c(o,64,2)!==(3&s))throw new Error(`Parity error at ${i}`);n=n.concat(r.slice(0,8))}return d(Uint8Array.from(n))}},4233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const r=n(6897),i=n(6667),o=n(5492),s=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array(64);class c extends r.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|r.SHA256_IV[0],this.B=0|r.SHA256_IV[1],this.C=0|r.SHA256_IV[2],this.D=0|r.SHA256_IV[3],this.E=0|r.SHA256_IV[4],this.F=0|r.SHA256_IV[5],this.G=0|r.SHA256_IV[6],this.H=0|r.SHA256_IV[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(n,17)^(0,o.rotr)(n,19)^n>>>10;a[e]=i+a[e-7]+r+a[e-16]|0}let{A:n,B:i,C:c,D:l,E:u,F:d,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,o.rotr)(u,6)^(0,o.rotr)(u,11)^(0,o.rotr)(u,25))+(0,r.Chi)(u,d,f)+s[e]+a[e]|0,g=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+(0,r.Maj)(n,i,c)|0;h=f,f=d,d=u,u=l+t|0,l=c,c=i,i=n,n=t+g|0}n=n+this.A|0,i=i+this.B|0,c=c+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,i,c,l,u,d,f,h)}roundClean(){(0,o.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA256=c;class l extends c{constructor(){super(28),this.A=0|r.SHA224_IV[0],this.B=0|r.SHA224_IV[1],this.C=0|r.SHA224_IV[2],this.D=0|r.SHA224_IV[3],this.E=0|r.SHA224_IV[4],this.F=0|r.SHA224_IV[5],this.G=0|r.SHA224_IV[6],this.H=0|r.SHA224_IV[7]}}t.SHA224=l;const u=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),d=(()=>u[0])(),f=(()=>u[1])(),h=new Uint32Array(80),g=new Uint32Array(80);class p extends r.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|r.SHA512_IV[0],this.Al=0|r.SHA512_IV[1],this.Bh=0|r.SHA512_IV[2],this.Bl=0|r.SHA512_IV[3],this.Ch=0|r.SHA512_IV[4],this.Cl=0|r.SHA512_IV[5],this.Dh=0|r.SHA512_IV[6],this.Dl=0|r.SHA512_IV[7],this.Eh=0|r.SHA512_IV[8],this.El=0|r.SHA512_IV[9],this.Fh=0|r.SHA512_IV[10],this.Fl=0|r.SHA512_IV[11],this.Gh=0|r.SHA512_IV[12],this.Gl=0|r.SHA512_IV[13],this.Hh=0|r.SHA512_IV[14],this.Hl=0|r.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:h,Hh:g,Hl:p}=this;return[e,t,n,r,i,o,s,a,c,l,u,d,f,h,g,p]}set(e,t,n,r,i,o,s,a,c,l,u,d,f,h,g,p){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|g,this.Hl=0|p}process(e,t){for(let n=0;n<16;n++,t+=4)h[n]=e.getUint32(t),g[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|h[e-15],n=0|g[e-15],r=i.rotrSH(t,n,1)^i.rotrSH(t,n,8)^i.shrSH(t,n,7),o=i.rotrSL(t,n,1)^i.rotrSL(t,n,8)^i.shrSL(t,n,7),s=0|h[e-2],a=0|g[e-2],c=i.rotrSH(s,a,19)^i.rotrBH(s,a,61)^i.shrSH(s,a,6),l=i.rotrSL(s,a,19)^i.rotrBL(s,a,61)^i.shrSL(s,a,6),u=i.add4L(o,l,g[e-7],g[e-16]),d=i.add4H(u,r,c,h[e-7],h[e-16]);h[e]=0|d,g[e]=0|u}let{Ah:n,Al:r,Bh:o,Bl:s,Ch:a,Cl:c,Dh:l,Dl:u,Eh:p,El:y,Fh:m,Fl:b,Gh:E,Gl:w,Hh:A,Hl:S}=this;for(let e=0;e<80;e++){const t=i.rotrSH(p,y,14)^i.rotrSH(p,y,18)^i.rotrBH(p,y,41),v=i.rotrSL(p,y,14)^i.rotrSL(p,y,18)^i.rotrBL(p,y,41),T=p&m^~p&E,O=y&b^~y&w,I=i.add5L(S,v,O,f[e],g[e]),B=i.add5H(I,A,t,T,d[e],h[e]),_=0|I,N=i.rotrSH(n,r,28)^i.rotrBH(n,r,34)^i.rotrBH(n,r,39),L=i.rotrSL(n,r,28)^i.rotrBL(n,r,34)^i.rotrBL(n,r,39),F=n&o^n&a^o&a,C=r&s^r&c^s&c;A=0|E,S=0|w,E=0|m,w=0|b,m=0|p,b=0|y,({h:p,l:y}=i.add(0|l,0|u,0|B,0|_)),l=0|a,u=0|c,a=0|o,c=0|s,o=0|n,s=0|r;const D=i.add3L(_,L,C);n=i.add3H(D,B,N,F),r=0|D}({h:n,l:r}=i.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:s}=i.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:c}=i.add(0|this.Ch,0|this.Cl,0|a,0|c)),({h:l,l:u}=i.add(0|this.Dh,0|this.Dl,0|l,0|u)),({h:p,l:y}=i.add(0|this.Eh,0|this.El,0|p,0|y)),({h:m,l:b}=i.add(0|this.Fh,0|this.Fl,0|m,0|b)),({h:E,l:w}=i.add(0|this.Gh,0|this.Gl,0|E,0|w)),({h:A,l:S}=i.add(0|this.Hh,0|this.Hl,0|A,0|S)),this.set(n,r,o,s,a,c,l,u,p,y,m,b,E,w,A,S)}roundClean(){(0,o.clean)(h,g)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=p;class y extends p{constructor(){super(48),this.Ah=0|r.SHA384_IV[0],this.Al=0|r.SHA384_IV[1],this.Bh=0|r.SHA384_IV[2],this.Bl=0|r.SHA384_IV[3],this.Ch=0|r.SHA384_IV[4],this.Cl=0|r.SHA384_IV[5],this.Dh=0|r.SHA384_IV[6],this.Dl=0|r.SHA384_IV[7],this.Eh=0|r.SHA384_IV[8],this.El=0|r.SHA384_IV[9],this.Fh=0|r.SHA384_IV[10],this.Fl=0|r.SHA384_IV[11],this.Gh=0|r.SHA384_IV[12],this.Gl=0|r.SHA384_IV[13],this.Hh=0|r.SHA384_IV[14],this.Hl=0|r.SHA384_IV[15]}}t.SHA384=y;const m=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),b=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class E extends p{constructor(){super(28),this.Ah=0|m[0],this.Al=0|m[1],this.Bh=0|m[2],this.Bl=0|m[3],this.Ch=0|m[4],this.Cl=0|m[5],this.Dh=0|m[6],this.Dl=0|m[7],this.Eh=0|m[8],this.El=0|m[9],this.Fh=0|m[10],this.Fl=0|m[11],this.Gh=0|m[12],this.Gl=0|m[13],this.Hh=0|m[14],this.Hl=0|m[15]}}t.SHA512_224=E;class w extends p{constructor(){super(32),this.Ah=0|b[0],this.Al=0|b[1],this.Bh=0|b[2],this.Bl=0|b[3],this.Ch=0|b[4],this.Cl=0|b[5],this.Dh=0|b[6],this.Dl=0|b[7],this.Eh=0|b[8],this.El=0|b[9],this.Fh=0|b[10],this.Fl=0|b[11],this.Gh=0|b[12],this.Gl=0|b[13],this.Hh=0|b[14],this.Hl=0|b[15]}}t.SHA512_256=w,t.sha256=(0,o.createHasher)(()=>new c),t.sha224=(0,o.createHasher)(()=>new l),t.sha512=(0,o.createHasher)(()=>new p),t.sha384=(0,o.createHasher)(()=>new y),t.sha512_256=(0,o.createHasher)(()=>new w),t.sha512_224=(0,o.createHasher)(()=>new E)},4263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMBid=void 0;const r=n(255),i=n(2794);t.validateAMMBid=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMBid: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMBid: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMBid: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMBid: Asset2 must be a Currency");if(null!=e.BidMin&&!(0,i.isAmount)(e.BidMin))throw new r.ValidationError("AMMBid: BidMin must be an Amount");if(null!=e.BidMax&&!(0,i.isAmount)(e.BidMax))throw new r.ValidationError("AMMBid: BidMax must be an Amount");if(null!=e.AuthAccounts){if(!(0,i.isArray)(e.AuthAccounts))throw new r.ValidationError("AMMBid: AuthAccounts must be an AuthAccount array");if(e.AuthAccounts.length>4)throw new r.ValidationError("AMMBid: AuthAccounts length must not be greater than 4");!function(e,t){for(const n of t){if(!(0,i.isRecord)(n))throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(!(0,i.isRecord)(n.AuthAccount))throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(null==n.AuthAccount.Account)throw new r.ValidationError("AMMBid: invalid AuthAccounts");if("string"!=typeof n.AuthAccount.Account)throw new r.ValidationError("AMMBid: invalid AuthAccounts");if(n.AuthAccount.Account===e)throw new r.ValidationError("AMMBid: AuthAccounts must not include sender's address")}}(e.Account,e.AuthAccounts)}}},4296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t.weierstrassPoints=y,t.weierstrass=function(e){const n=function(e){const t=(0,r.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:c,n:l}=n,u=c.BYTES+1,h=2*c.BYTES+1;function g(e){return(0,i.mod)(e,l)}function p(e){return(0,i.invert)(e,l)}const{ProjectivePoint:m,normPrivateKeyToScalar:b,weierstrassEquation:E,isWithinCurveOrder:w}=y({...n,toBytes(e,t,n){const r=t.toAffine(),i=c.toBytes(r.x),a=o.concatBytes;return(0,s.abool)("isCompressed",n),n?a(Uint8Array.from([t.hasEvenY()?2:3]),i):a(Uint8Array.from([4]),i,c.toBytes(r.y))},fromBytes(e){const t=e.length,n=e[0],r=e.subarray(1);if(t!==u||2!==n&&3!==n){if(t===h&&4===n)return{x:c.fromBytes(r.subarray(0,c.BYTES)),y:c.fromBytes(r.subarray(c.BYTES,2*c.BYTES))};throw new Error("invalid Point, expected length of "+u+", or uncompressed "+h+", got "+t)}{const e=o.bytesToNumberBE(r);if(!o.inRange(e,f,c.ORDER))throw new Error("Point is not on curve");const t=E(e);let i;try{i=c.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!=((i&f)===f)&&(i=c.neg(i)),{x:e,y:i}}}}),A=e=>o.bytesToHex(o.numberToBytesBE(e,n.nByteLength));function S(e){return e>l>>f}const v=(e,t,n)=>o.bytesToNumberBE(e.slice(t,n));class T{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const t=n.nByteLength;return e=(0,s.ensureBytes)("compactSignature",e,2*t),new T(v(e,0,t),v(e,t,2*t))}static fromDER(e){const{r:n,s:r}=t.DER.toSig((0,s.ensureBytes)("DER",e));return new T(n,r)}assertValidity(){o.aInRange("r",this.r,f,l),o.aInRange("s",this.s,f,l)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:r,recovery:i}=this,o=_((0,s.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const a=2===i||3===i?t+n.n:t;if(a>=c.ORDER)throw new Error("recovery id 2 or 3 invalid");const l=1&i?"03":"02",u=m.fromHex(l+A(a)),d=p(a),f=g(-o*d),h=g(r*d),y=m.BASE.multiplyAndAddUnsafe(u,f,h);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,g(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return A(this.r)+A(this.s)}}const O={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=(0,i.getMinHashLength)(n.n);return(0,i.mapHashToField)(n.randomBytes(e),n.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function I(e){const t=o.isBytes(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===u||r===h:n?r===2*u||r===2*h:e instanceof m}const B=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=o.bytesToNumberBE(e),r=8*e.length-n.nBitLength;return r>0?t>>BigInt(r):t},_=n.bits2int_modN||function(e){return g(B(e))},N=o.bitMask(n.nBitLength);function L(e){return o.aInRange("num < 2^"+n.nBitLength,e,d,N),o.numberToBytesBE(e,n.nByteLength)}const F={lowS:n.lowS,prehash:!1},C={lowS:n.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:n,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(I(e))throw new Error("first arg must be private key");if(!I(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(b(e)).toRawBytes(n)},sign:function(e,t,r=F){const{seed:i,k2sig:l}=function(e,t,r=F){if(["recovered","canonical"].some(e=>e in r))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:l}=n;let{lowS:u,prehash:h,extraEntropy:y}=r;null==u&&(u=!0),e=(0,s.ensureBytes)("msgHash",e),a(r),h&&(e=(0,s.ensureBytes)("prehashed msgHash",i(e)));const E=_(e),A=b(t),v=[L(A),L(E)];if(null!=y&&!1!==y){const e=!0===y?l(c.BYTES):y;v.push((0,s.ensureBytes)("extraEntropy",e))}const O=o.concatBytes(...v),I=E;return{seed:O,k2sig:function(e){const t=B(e);if(!w(t))return;const n=p(t),r=m.BASE.multiply(t).toAffine(),i=g(r.x);if(i===d)return;const o=g(n*g(I+i*A));if(o===d)return;let s=(r.x===i?0:2)|Number(r.y&f),a=o;return u&&S(o)&&(a=function(e){return S(e)?g(-e):e}(o),s^=1),new T(i,a,s)}}}(e,t,r),u=n;return o.createHmacDrbg(u.hash.outputLen,u.nByteLength,u.hmac)(i,l)},verify:function(e,r,i,c=C){const l=e;r=(0,s.ensureBytes)("msgHash",r),i=(0,s.ensureBytes)("publicKey",i);const{lowS:u,prehash:d,format:f}=c;if(a(c),"strict"in c)throw new Error("options.strict was renamed to lowS");if(void 0!==f&&"compact"!==f&&"der"!==f)throw new Error("format must be compact or der");const h="string"==typeof l||o.isBytes(l),y=!h&&!f&&"object"==typeof l&&null!==l&&"bigint"==typeof l.r&&"bigint"==typeof l.s;if(!h&&!y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let b,E;try{if(y&&(b=new T(l.r,l.s)),h){try{"compact"!==f&&(b=T.fromDER(l))}catch(e){if(!(e instanceof t.DER.Err))throw e}b||"der"===f||(b=T.fromCompact(l))}E=m.fromHex(i)}catch(e){return!1}if(!b)return!1;if(u&&b.hasHighS())return!1;d&&(r=n.hash(r));const{r:w,s:A}=b,S=_(r),v=p(A),O=g(S*v),I=g(w*v),B=m.BASE.multiplyAndAddUnsafe(E,O,I)?.toAffine();return!!B&&g(B.x)===w},ProjectivePoint:m,Signature:T,utils:O}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if((0,i.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=m(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let i,o,s,a,c,l,u,d;i=e.sqr(r),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),l=e.sqr(a),c=e.mul(l,t.A),o=e.add(o,c),o=e.mul(o,s),l=e.mul(l,a),c=e.mul(l,t.B),o=e.add(o,c),u=e.mul(i,s);const{isValid:f,value:h}=n(o,l);d=e.mul(i,r),d=e.mul(d,h),u=e.cmov(u,s,f),d=e.cmov(d,h,f);const g=e.isOdd(r)===e.isOdd(d);return d=e.cmov(e.neg(d),d,g),u=e.div(u,a),{x:u,y:d}}};const r=n(4107),i=n(802),o=n(3449),s=n(3449);function a(e){void 0!==e.lowS&&(0,s.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,s.abool)("prehash",e.prehash)}const{bytesToNumberBE:c,hexToBytes:l}=o;class u extends Error{constructor(e=""){super(e)}}t.DERErr=u,t.DER={Err:u,_tlv:{encode:(e,n)=>{const{Err:r}=t.DER;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&n.length)throw new r("tlv.encode: unpadded data");const i=n.length/2,s=o.numberToHexUnpadded(i);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=i>127?o.numberToHexUnpadded(s.length/2|128):"";return o.numberToHexUnpadded(e)+a+s+n},decode(e,n){const{Err:r}=t.DER;let i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(n.length<2||n[i++]!==e)throw new r("tlv.decode: wrong tlv");const o=n[i++];let s=0;if(128&o){const e=127&o;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const t=n.subarray(i,i+e);if(t.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===t[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of t)s=s<<8|e;if(i+=e,s<128)throw new r("tlv.decode(long): not minimal encoding")}else s=o;const a=n.subarray(i,i+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:n.subarray(i+s)}}},_int:{encode(e){const{Err:n}=t.DER;if(e<d)throw new n("integer: negative integers are not allowed");let r=o.numberToHexUnpadded(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new n("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:n}=t.DER;if(128&e[0])throw new n("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new n("invalid signature integer: unnecessary leading zero");return c(e)}},toSig(e){const{Err:n,_int:r,_tlv:i}=t.DER,s="string"==typeof e?l(e):e;o.abytes(s);const{v:a,l:c}=i.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:u,l:d}=i.decode(2,a),{v:f,l:h}=i.decode(2,d);if(h.length)throw new n("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(f)}},hexFromSig(e){const{_tlv:n,_int:r}=t.DER,i=n.encode(2,r.encode(e.r))+n.encode(2,r.encode(e.s));return n.encode(48,i)}};const d=BigInt(0),f=BigInt(1),h=BigInt(2),g=BigInt(3),p=BigInt(4);function y(e){const t=function(e){const t=(0,r.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:i,a:s}=t;if(n){if(!i.eql(s,i.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,a=(0,i.Field)(t.n,t.nBitLength),c=t.toBytes||((e,t,r)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),l=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function u(e){const{a:r,b:i}=t,o=n.sqr(e),s=n.mul(o,e);return n.add(n.add(s,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),u(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:a,n:c}=t;if(n&&"bigint"!=typeof e){if(o.isBytes(e)&&(e=o.bytesToHex(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*r,"0")}let l;try{l="bigint"==typeof e?e:o.bytesToNumberBE((0,s.ensureBytes)("private key",e,r))}catch(t){throw new Error("invalid private key, expected hex or "+r+" bytes, got "+typeof e)}return a&&(l=(0,i.mod)(l,c)),o.aInRange("private key",l,f,c),l}function p(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}const y=(0,s.memoized)((e,t)=>{const{px:r,py:i,pz:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};const s=e.is0();null==t&&(t=s?n.ONE:n.inv(o));const a=n.mul(r,t),c=n.mul(i,t),l=n.mul(o,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(l,n.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),m=(0,s.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw new Error("bad point: x or y not FE");const o=n.sqr(i),s=u(r);if(!n.eql(o,s))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class b{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required");Object.freeze(this)}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?b.ZERO:new b(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(l((0,s.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(h(e))}static msm(e,t){return(0,r.pippenger)(b,a,e,t)}_setWindowSize(e){w.setWindowSize(this,e)}assertValidity(){m(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){p(e);const{px:t,py:r,pz:i}=this,{px:o,py:s,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(o,i)),l=n.eql(n.mul(r,a),n.mul(s,i));return c&&l}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,g),{px:o,py:s,pz:a}=this;let c=n.ZERO,l=n.ZERO,u=n.ZERO,d=n.mul(o,o),f=n.mul(s,s),h=n.mul(a,a),p=n.mul(o,s);return p=n.add(p,p),u=n.mul(o,a),u=n.add(u,u),c=n.mul(e,u),l=n.mul(i,h),l=n.add(c,l),c=n.sub(f,l),l=n.add(f,l),l=n.mul(c,l),c=n.mul(p,c),u=n.mul(i,u),h=n.mul(e,h),p=n.sub(d,h),p=n.mul(e,p),p=n.add(p,u),u=n.add(d,d),d=n.add(u,d),d=n.add(d,h),d=n.mul(d,p),l=n.add(l,d),h=n.mul(s,a),h=n.add(h,h),d=n.mul(h,p),c=n.sub(c,d),u=n.mul(h,f),u=n.add(u,u),u=n.add(u,u),new b(c,l,u)}add(e){p(e);const{px:r,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let l=n.ZERO,u=n.ZERO,d=n.ZERO;const f=t.a,h=n.mul(t.b,g);let y=n.mul(r,s),m=n.mul(i,a),E=n.mul(o,c),w=n.add(r,i),A=n.add(s,a);w=n.mul(w,A),A=n.add(y,m),w=n.sub(w,A),A=n.add(r,o);let S=n.add(s,c);return A=n.mul(A,S),S=n.add(y,E),A=n.sub(A,S),S=n.add(i,o),l=n.add(a,c),S=n.mul(S,l),l=n.add(m,E),S=n.sub(S,l),d=n.mul(f,A),l=n.mul(h,E),d=n.add(l,d),l=n.sub(m,d),d=n.add(m,d),u=n.mul(l,d),m=n.add(y,y),m=n.add(m,y),E=n.mul(f,E),A=n.mul(h,A),m=n.add(m,E),E=n.sub(y,E),E=n.mul(f,E),A=n.add(A,E),y=n.mul(m,A),u=n.add(u,y),y=n.mul(S,A),l=n.mul(w,l),l=n.sub(l,y),y=n.mul(w,m),d=n.mul(S,d),d=n.add(d,y),new b(l,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,e,b.normalizeZ)}multiplyUnsafe(e){const{endo:r,n:i}=t;o.aInRange("scalar",e,d,i);const s=b.ZERO;if(e===d)return s;if(this.is0()||e===f)return this;if(!r||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,e,b.normalizeZ);let{k1neg:a,k1:c,k2neg:l,k2:u}=r.splitScalar(e),h=s,g=s,p=this;for(;c>d||u>d;)c&f&&(h=h.add(p)),u&f&&(g=g.add(p)),p=p.double(),c>>=f,u>>=f;return a&&(h=h.negate()),l&&(g=g.negate()),g=new b(n.mul(g.px,r.beta),g.py,g.pz),h.add(g)}multiply(e){const{endo:r,n:i}=t;let s,a;if(o.aInRange("scalar",e,f,i),r){const{k1neg:t,k1:i,k2neg:o,k2:c}=r.splitScalar(e);let{p:l,f:u}=this.wNAF(i),{p:d,f}=this.wNAF(c);l=w.constTimeNegate(t,l),d=w.constTimeNegate(o,d),d=new b(n.mul(d.px,r.beta),d.py,d.pz),s=l.add(d),a=u.add(f)}else{const{p:t,f:n}=this.wNAF(e);s=t,a=n}return b.normalizeZ([s,a])[0]}multiplyAndAddUnsafe(e,t,n){const r=b.BASE,i=(e,t)=>t!==d&&t!==f&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,n));return o.is0()?void 0:o}toAffine(e){return y(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===f)return!0;if(n)return n(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===f?this:n?n(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,s.abool)("isCompressed",e),this.assertValidity(),c(b,this,e)}toHex(e=!0){return(0,s.abool)("isCompressed",e),o.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const E=t.nBitLength,w=(0,r.wNAF)(b,t.endo?Math.ceil(E/2):E);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:h,weierstrassEquation:u,isWithinCurveOrder:function(e){return o.inRange(e,f,t.n)}}}function m(e,t){const n=e.ORDER;let r=d;for(let e=n-f;e%h===d;e/=h)r+=f;const i=r,o=h<<i-f-f,s=o*h,a=(n-f)/s,c=(a-f)/h,l=s-f,u=o,y=e.pow(t,a),m=e.pow(t,(a+f)/h);let b=(t,n)=>{let r=y,o=e.pow(n,l),s=e.sqr(o);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,n),s=e.mul(a,t);let d=e.mul(s,o);a=e.pow(d,u);let g=e.eql(a,e.ONE);o=e.mul(s,m),a=e.mul(d,r),s=e.cmov(o,s,g),d=e.cmov(a,d,g);for(let t=i;t>f;t--){let n=t-h;n=h<<n-f;let i=e.pow(d,n);const a=e.eql(i,e.ONE);o=e.mul(s,r),r=e.mul(r,r),i=e.mul(d,r),s=e.cmov(o,s,a),d=e.cmov(i,d,a)}return{isValid:g,value:s}};if(e.ORDER%p===g){const n=(e.ORDER-g)/p,r=e.sqrt(e.neg(t));b=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,n);a=e.mul(a,s);const c=e.mul(a,r),l=e.mul(e.sqr(a),i),u=e.eql(l,t);return{isValid:u,value:e.cmov(c,a,u)}}}return b}},4315:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLedgerSequence=t.getSignedTx=t.waitForFinalTransactionOutcome=t.submitRequest=void 0;const i=n(255),o=n(5684);function s(e){const t="string"==typeof e?(0,o.decode)(e):e;if("string"==typeof t)return!1;if(null!=t.Signers){const e=t.Signers;for(const t of e)if(null==t.Signer.SigningPubKey||null==t.Signer.TxnSignature)return!1;return!0}return null!=t.SigningPubKey&&null!=t.TxnSignature}t.submitRequest=function(e,t,n=!1){return r(this,void 0,void 0,function*(){if(!s(t))throw new i.ValidationError("Transaction must be signed.");const r={command:"submit",tx_blob:"string"==typeof t?t:(0,o.encode)(t),fail_hard:(a=t,"AccountDelete"===("string"==typeof a?(0,o.decode)(a):a).TransactionType||n)};var a;return e.request(r)})},t.waitForFinalTransactionOutcome=function e(t,n,o,s){return r(this,void 0,void 0,function*(){yield function(){return r(this,void 0,void 0,function*(){return new Promise(e=>{setTimeout(e,1e3)})})}();const a=yield t.getLedgerIndex();if(o<a)throw new i.XrplError(`The latest ledger sequence ${a} is greater than the transaction's LastLedgerSequence (${o}).\nPreliminary result: ${s}`);const c=yield t.request({command:"tx",transaction:n}).catch(i=>r(this,void 0,void 0,function*(){var r;const a=null===(r=null==i?void 0:i.data)||void 0===r?void 0:r.error;if("txnNotFound"===a)return e(t,n,o,s);throw new Error(`${a} \n Preliminary result: ${s}.\nFull error details: ${String(i)}`)}));return c.result.validated?c:e(t,n,o,s)})},t.getSignedTx=function(e,t,{autofill:n=!0,wallet:a}={}){return r(this,void 0,void 0,function*(){if(s(t))return t;if(!a)throw new i.ValidationError("Wallet must be provided when submitting an unsigned transaction");let r="string"==typeof t?(0,o.decode)(t):t;return n&&(r=yield e.autofill(r)),a.sign(r).tx_blob})},t.getLastLedgerSequence=function(e){return("string"==typeof e?(0,o.decode)(e):e).LastLedgerSequence}},4329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainModifyBridge=t.XChainModifyBridgeFlags=void 0;const r=n(2794);var i;!function(e){e[e.tfClearAccountCreateAmount=65536]="tfClearAccountCreateAmount"}(i||(t.XChainModifyBridgeFlags=i={})),t.validateXChainModifyBridge=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateOptionalField)(e,"SignatureReward",r.isAmount),(0,r.validateOptionalField)(e,"MinAccountCreateAmount",r.isAmount)}},4526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDelegateSet=void 0;const r=n(255),i=n(2794),o=new Set(["AccountSet","SetRegularKey","SignerListSet","DelegateSet","AccountDelete","Batch","EnableAmendment","SetFee","UNLModify"]);t.validateDelegateSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Authorize",i.isAccount),e.Authorize===e.Account)throw new r.ValidationError("DelegateSet: Authorize and Account must be different.");(0,i.validateRequiredField)(e,"Permissions",Array.isArray);const t=e.Permissions;if(t.length>10)throw new r.ValidationError("DelegateSet: Permissions array length cannot be greater than 10.");const n=new Set;if(t.forEach(e=>{if(null==e||1!==Object.keys(e).length||null==e.Permission||1!==Object.keys(e.Permission).length)throw new r.ValidationError("DelegateSet: Permissions array element is malformed");const t=e.Permission.PermissionValue;if(null==t)throw new r.ValidationError("DelegateSet: PermissionValue must be defined");if("string"!=typeof t)throw new r.ValidationError("DelegateSet: PermissionValue must be a string");if(o.has(t))throw new r.ValidationError(`DelegateSet: PermissionValue contains a non-delegatable transaction ${t}`);n.add(t)}),t.length!==n.size)throw new r.ValidationError("DelegateSet: Permissions array cannot contain duplicate values")}},4660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XrplDefinitions=void 0;const r=n(8816),i=n(6986);class o extends r.XrplDefinitionsBase{constructor(e,t){super(e,Object.assign({},i.coreTypes,t))}}t.XrplDefinitions=o},4758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePermissionedDomainDelete=void 0;const r=n(2794);t.validatePermissionedDomainDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"DomainID",r.isString)}},4876:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2896),i=n(3449);class o{constructor(){this.hash=r.sha512.create()}static half(e){return(new o).add(e).first256()}add(e){return this.hash.update(e),this}addU32(e){const t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),this.add(t)}finish(){return this.hash.digest()}first256(){return this.finish().slice(0,32)}first256BigInt(){return(0,i.bytesToNumberBE)(this.first256())}}t.default=o},4894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=function(e){return{hash:e}},t.createCurve=function(e,t){const n=t=>(0,r.weierstrass)({...e,hash:t});return{...n(t),create:n}};const r=n(3181)},4965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMDelete=void 0;const r=n(255),i=n(2794);t.validateAMMDelete=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMDelete: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMDelete: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMDelete: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMDelete: Asset2 must be a Currency")}},5029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAccountCreateCommit=void 0;const r=n(2794);t.validateXChainAccountCreateCommit=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},5036:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;const i=n(3062),o=n(255),s=n(1279),a=n(9672),c=n(7831),l=n(1565),u=n(6362),d=n(3222),f=n(5684),h=n(5274),g=n(7234),p=n(4110),y=n(811);function m(e,t,n){if(t>n)throw new Error("Illegal clamp bounds");return Math.min(Math.max(e,t),n)}class b extends i.EventEmitter{constructor(e,t={}){var n,r;if(super(),this.apiVersion=s.DEFAULT_API_VERSION,"string"!=typeof e||!/wss?(?:\+unix)?:\/\//u.exec(e))throw new o.ValidationError("server URI must start with `wss://`, `ws://`, `wss+unix://`, or `ws+unix://`.");this.feeCushion=null!==(n=t.feeCushion)&&void 0!==n?n:1.2,this.maxFeeXRP=null!==(r=t.maxFeeXRP)&&void 0!==r?r:"2",this.connection=new p.Connection(e,t),this.connection.on("error",(e,t,n)=>{this.emit("error",e,t,n)}),this.connection.on("reconnect",()=>{this.connection.on("connected",()=>this.emit("connected"))}),this.connection.on("disconnected",e=>{let t=e;t===p.INTENTIONAL_DISCONNECT_CODE&&(t=1e3),this.emit("disconnected",t)}),this.connection.on("ledgerClosed",e=>{this.emit("ledgerClosed",e)}),this.connection.on("transaction",e=>{(0,y.handleStreamPartialPayment)(e,this.connection.trace),this.emit("transaction",e)}),this.connection.on("validationReceived",e=>{this.emit("validationReceived",e)}),this.connection.on("manifestReceived",e=>{this.emit("manifestReceived",e)}),this.connection.on("peerStatusChange",e=>{this.emit("peerStatusChange",e)}),this.connection.on("consensusPhase",e=>{this.emit("consensusPhase",e)}),this.connection.on("path_find",e=>{this.emit("path_find",e)})}get url(){return this.connection.getUrl()}request(e){var t;return r(this,void 0,void 0,function*(){const n=Object.assign(Object.assign({},e),{account:"string"==typeof e.account?(0,c.ensureClassicAddress)(e.account):void 0,api_version:null!==(t=e.api_version)&&void 0!==t?t:this.apiVersion}),r=yield this.connection.request(n);return(0,y.handlePartialPayment)(e.command,r),r})}requestNextPage(e,t){return r(this,void 0,void 0,function*(){if(!t.result.marker)return Promise.reject(new o.NotFoundError("response does not have a next page"));const n=Object.assign(Object.assign({},e),{marker:t.result.marker});return this.request(n)})}on(e,t){return super.on(e,t)}requestAll(e,t){var n;return r(this,void 0,void 0,function*(){const r=null!=t?t:function(e){switch(e){case"account_channels":return"channels";case"account_lines":return"lines";case"account_objects":return"account_objects";case"account_tx":return"transactions";case"account_offers":case"book_offers":return"offers";case"ledger_data":return"state";default:return null}}(e.command);if(!r)throw new o.ValidationError(`no collect key for command ${e.command}`);const i=null!==(n=e.limit)&&void 0!==n?n:1/0;let s=0,a=e.marker;const c=[];do{const t=m(i-s,10,400),n=Object.assign(Object.assign({},e),{limit:t,marker:a}),l=yield this.connection.request(n),u=l.result;if(!(r in u))throw new o.XrplError(`${r} not in result`);const d=u[r];a=u.marker,c.push(l),Array.isArray(d)&&(s+=d.length)}while(Boolean(a)&&s<i);return c})}getServerInfo(){var e;return r(this,void 0,void 0,function*(){try{const t=yield this.request({command:"server_info"});this.networkID=null!==(e=t.result.info.network_id)&&void 0!==e?e:void 0,this.buildVersion=t.result.info.build_version}catch(e){console.error(e)}})}connect(){return r(this,void 0,void 0,function*(){return this.connection.connect().then(()=>r(this,void 0,void 0,function*(){yield this.getServerInfo(),this.emit("connected")}))})}disconnect(){return r(this,void 0,void 0,function*(){yield this.connection.disconnect()})}isConnected(){return this.connection.isConnected()}autofill(e,t){var n;return r(this,void 0,void 0,function*(){const r=Object.assign({},e);(0,l.setValidAddresses)(r),r.Flags=(0,a.convertTxFlagsToNumber)(r);const i=[];return null!==(n=r.NetworkID)&&void 0!==n||(r.NetworkID=(0,l.txNeedsNetworkID)(this)?this.networkID:void 0),null==r.Sequence&&i.push((0,l.setNextValidSequenceNumber)(this,r)),null==r.Fee&&i.push((0,l.getTransactionFee)(this,r,t)),null==r.LastLedgerSequence&&i.push((0,l.setLatestValidatedLedgerSequence)(this,r)),"AccountDelete"===r.TransactionType&&i.push((0,l.checkAccountDeleteBlockers)(this,r)),"Batch"===r.TransactionType&&i.push((0,l.autofillBatchTxn)(this,r)),"Payment"===r.TransactionType&&null!=r.DeliverMax&&(0,l.handleDeliverMax)(r),Promise.all(i).then(()=>r)})}simulate(e,t){var n;return r(this,void 0,void 0,function*(){const r=null!==(n=null==t?void 0:t.binary)&&void 0!==n&&n,i="string"==typeof e?{command:"simulate",tx_blob:e,binary:r}:{command:"simulate",tx_json:e,binary:r};return this.request(i)})}submit(e,t){return r(this,void 0,void 0,function*(){const n=yield(0,c.getSignedTx)(this,e,t);return(0,c.submitRequest)(this,n,null==t?void 0:t.failHard)})}submitAndWait(e,t){return r(this,void 0,void 0,function*(){const n=yield(0,c.getSignedTx)(this,e,t),r=(0,c.getLastLedgerSequence)(n);if(null==r)throw new o.ValidationError("Transaction must contain a LastLedgerSequence value for reliable submission.");const i=yield(0,c.submitRequest)(this,n,null==t?void 0:t.failHard);if(i.result.engine_result.startsWith("tem"))throw new o.XrplError(`Transaction failed, ${i.result.engine_result}: ${i.result.engine_result_message}`);const s=f.hashes.hashSignedTx(n);return(0,c.waitForFinalTransactionOutcome)(this,s,r,i.result.engine_result)})}prepareTransaction(e,t){return r(this,void 0,void 0,function*(){return this.autofill(e,t)})}getXrpBalance(e,t={}){var n;return r(this,void 0,void 0,function*(){const r={command:"account_info",account:e,ledger_index:null!==(n=t.ledger_index)&&void 0!==n?n:"validated",ledger_hash:t.ledger_hash},i=yield this.request(r);return(0,f.dropsToXrp)(i.result.account_data.Balance)})}getBalances(e,t={}){var n;return r(this,void 0,void 0,function*(){const r=[];let i=Promise.resolve(0);t.peer||(i=this.getXrpBalance(e,{ledger_hash:t.ledger_hash,ledger_index:t.ledger_index}));const o={command:"account_lines",account:e,ledger_index:null!==(n=t.ledger_index)&&void 0!==n?n:"validated",ledger_hash:t.ledger_hash,peer:t.peer,limit:t.limit},s=this.requestAll(o);return yield Promise.all([i,s]).then(([e,t])=>{const n=t.flatMap(e=>(0,u.formatBalances)(e.result.lines));0!==e&&r.push({currency:"XRP",value:e.toString()}),r.push(...n)}),r.slice(0,t.limit)})}getOrderbook(e,t,n={}){return r(this,void 0,void 0,function*(){(0,d.validateOrderbookOptions)(n);const r=(0,d.createBookOffersRequest)(e,t,n),i=yield(0,d.requestAllOffers)(this,r),o=yield(0,d.requestAllOffers)(this,(0,d.reverseRequest)(r)),s=(0,d.extractOffers)(i),a=(0,d.extractOffers)(o),c=(0,d.combineOrders)(s,a),{buy:l,sell:u}=(0,d.separateBuySellOrders)(c);return{buy:(0,d.sortAndLimitOffers)(l,n.limit),sell:(0,d.sortAndLimitOffers)(u,n.limit)}})}getLedgerIndex(){return r(this,void 0,void 0,function*(){return(yield this.request({command:"ledger",ledger_index:"validated"})).result.ledger_index})}fundWallet(e,t={}){return r(this,void 0,void 0,function*(){if(!this.isConnected())throw new o.RippledError("Client not connected, cannot call faucet");const n=Boolean(e),r=e&&(0,f.isValidClassicAddress)(e.classicAddress)?e:h.Wallet.generate(),i={destination:r.classicAddress,xrpAmount:t.amount,usageContext:t.usageContext,userAgent:"xrpl.js"};let s=0;if(n)try{s=Number(yield this.getXrpBalance(r.classicAddress))}catch(e){}return(0,g.requestFunding)(t,this,s,r,i)})}}t.Client=b},5123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenBurn=void 0;const r=n(2794);t.validateNFTokenBurn=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"NFTokenID",r.isString),(0,r.validateOptionalField)(e,"Owner",r.isAccount)}},5149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._DST_scalar=void 0,t.expand_message_xmd=u,t.expand_message_xof=d,t.hash_to_field=f,t.isogenyMap=function(e,t){const n=t.map(e=>Array.from(e).reverse());return(t,r)=>{const[o,s,a,c]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r))),[l,u]=(0,i.FpInvertBatch)(e,[s,c],!0);return t=e.mul(o,l),r=e.mul(r,e.mul(a,u)),{x:t,y:r}}},t.createHasher=function(e,n,r){if("function"!=typeof n)throw new Error("mapToCurve() must be defined");function i(t){return e.fromAffine(n(t))}function o(t){const n=t.clearCofactor();return n.equals(e.ZERO)?e.ZERO:(n.assertValidity(),n)}return{defaults:r,hashToCurve(e,t){const n=f(e,2,Object.assign({},r,t)),s=i(n[0]),a=i(n[1]);return o(s.add(a))},encodeToCurve(e,t){const n=r.encodeDST?{DST:r.encodeDST}:{};return o(i(f(e,1,Object.assign({},r,n,t))[0]))},mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!=typeof t)throw new Error("expected array of bigints");return o(i(e))},hashToScalar(n,i){const o=e.Fn.ORDER;return f(n,1,Object.assign({},r,{p:o,m:1,DST:t._DST_scalar},i))[0][0]}}};const r=n(7663),i=n(5827),o=r.bytesToNumberBE;function s(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function a(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e){if(!(0,r.isBytes)(e)&&"string"!=typeof e)throw new Error("DST must be Uint8Array or string");return"string"==typeof e?(0,r.utf8ToBytes)(e):e}function u(e,t,n,i){(0,r.abytes)(e),c(n),(t=l(t)).length>255&&(t=i((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:u}=i,d=Math.ceil(n/o);if(n>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=(0,r.concatBytes)(t,s(t.length,1)),h=s(0,u),g=s(n,2),p=new Array(d),y=i((0,r.concatBytes)(h,e,g,s(0,1),f));p[0]=i((0,r.concatBytes)(y,s(1,1),f));for(let e=1;e<=d;e++){const t=[a(y,p[e-1]),s(e+1,1),f];p[e]=i((0,r.concatBytes)(...t))}return(0,r.concatBytes)(...p).slice(0,n)}function d(e,t,n,i,o){if((0,r.abytes)(e),c(n),(t=l(t)).length>255){const e=Math.ceil(2*i/8);t=o.create({dkLen:e}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(e).update(s(n,2)).update(t).update(s(t.length,1)).digest()}function f(e,t,n){(0,r._validateObject)(n,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:s,k:a,m:l,hash:f,expand:h,DST:g}=n;if(!(0,r.isHash)(n.hash))throw new Error("expected valid hash");(0,r.abytes)(e),c(t);const p=s.toString(2).length,y=Math.ceil((p+a)/8),m=t*l*y;let b;if("xmd"===h)b=u(e,g,m,f);else if("xof"===h)b=d(e,g,m,a,f);else{if("_internal_pass"!==h)throw new Error('expand must be "xmd" or "xof"');b=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(l);for(let n=0;n<l;n++){const r=y*(n+e*l),a=b.subarray(r,r+y);t[n]=(0,i.mod)(o(a),s)}E[e]=t}return E}t._DST_scalar=(0,r.utf8ToBytes)("HashToScalar-")},5237:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.OfferFlags=void 0,function(e){e[e.lsfPassive=65536]="lsfPassive",e[e.lsfSell=131072]="lsfSell",e[e.lsfHybrid=262144]="lsfHybrid"}(n||(t.OfferFlags=n={}))},5274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const i=n(857),o=n(9760),s=n(1218),a=n(619),c=r(n(735)),l=n(6333),u=n(5620),d=n(5442),f=r(n(5970)),h=n(255),g=n(9843),p=n(2794),y=n(99),m=n(7954),b=n(9333),E=n(6228),w=n(4218),A=n(3842),S=f.default.ed25519;class v{constructor(e,t,n={}){this.publicKey=e,this.privateKey=t,this.classicAddress=n.masterAddress?(0,m.ensureClassicAddress)(n.masterAddress):(0,d.deriveAddress)(e),this.seed=n.seed}get address(){return this.classicAddress}static generate(e=S){if(!Object.values(f.default).includes(e))throw new h.ValidationError("Invalid cryptographic signing algorithm");const t=(0,d.generateSeed)({algorithm:e});return v.fromSeed(t,{algorithm:e})}static fromSeed(e,t={}){return v.deriveWallet(e,{algorithm:t.algorithm,masterAddress:t.masterAddress})}static fromEntropy(e,t={}){var n;const r=null!==(n=t.algorithm)&&void 0!==n?n:S,i={entropy:Uint8Array.from(e),algorithm:r},o=(0,d.generateSeed)(i);return v.deriveWallet(o,{algorithm:r,masterAddress:t.masterAddress})}static fromMnemonic(e,t={}){var n;if("rfc1751"===t.mnemonicEncoding)return v.fromRFC1751Mnemonic(e,{masterAddress:t.masterAddress,algorithm:t.algorithm});if(!(0,o.validateMnemonic)(e,s.wordlist))throw new h.ValidationError("Unable to parse the given mnemonic using bip39 encoding");const r=(0,o.mnemonicToSeedSync)(e),c=i.HDKey.fromMasterSeed(r).derive(null!==(n=t.derivationPath)&&void 0!==n?n:"m/44'/144'/0'/0/0");!function(e){if(!(e.privateKey instanceof Uint8Array))throw new h.ValidationError("Unable to derive privateKey from mnemonic input");if(!(e.publicKey instanceof Uint8Array))throw new h.ValidationError("Unable to derive publicKey from mnemonic input")}(c);const l=(0,a.bytesToHex)(c.publicKey),u=(0,a.bytesToHex)(c.privateKey);return new v(l,`00${u}`,{masterAddress:t.masterAddress})}static fromRFC1751Mnemonic(e,t){const n=(0,w.rfc1751MnemonicToKey)(e);let r;r=t.algorithm===f.default.ed25519?"ed25519":"secp256k1";const i=(0,l.encodeSeed)(n,r);return v.fromSeed(i,{masterAddress:t.masterAddress,algorithm:t.algorithm})}static deriveWallet(e,t={}){var n;const{publicKey:r,privateKey:i}=(0,d.deriveKeypair)(e,{algorithm:null!==(n=t.algorithm)&&void 0!==n?n:S});return new v(r,i,{seed:e,masterAddress:t.masterAddress})}sign(e,t){let n=!1;"string"==typeof t?n=t:t&&(n=this.classicAddress);const r=(0,b.omitBy)(Object.assign({},e),e=>null==e);if(r.TxnSignature||r.Signers)throw new h.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');if(function(e){"Payment"===e.TransactionType&&"string"!=typeof e.Amount&&e.Amount.value.includes(".")&&e.Amount.value.endsWith("0")&&(e.Amount=Object.assign({},e.Amount),e.Amount.value=new c.default(e.Amount.value).toString())}(r),(0,g.validate)(r),(0,y.hasFlag)(r,p.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new h.ValidationError("Cannot sign a Batch inner transaction.");const i=Object.assign({},r);if(n){i.SigningPubKey="";const e={Account:n,SigningPubKey:this.publicKey,TxnSignature:T(i,this.privateKey,n)};i.Signers=[{Signer:e}]}else i.SigningPubKey=this.publicKey,i.TxnSignature=T(i,this.privateKey);const o=(0,u.encode)(i);return{tx_blob:o,hash:(0,E.hashSignedTx)(o)}}verifyTransaction(e){return(0,A.verifySignature)(e,this.publicKey)}getXAddress(e=!1,t=!1){return(0,l.classicAddressToXAddress)(this.classicAddress,e,t)}}function T(e,t,n){if(n){const r=(0,l.isValidXAddress)(n)?(0,l.xAddressToClassicAddress)(n).classicAddress:n;return(0,d.sign)((0,u.encodeForMultisigning)(e,r),t)}return(0,d.sign)((0,u.encodeForSigning)(e),t)}t.Wallet=v,v.fromSecret=v.fromSeed},5315:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(619),o=r(n(735)),s=n(6333),a=n(255);function c(e,t){const n=4294967296;return(e^new o.default(384160001).multipliedBy(t).modulo(n).plus(2459).modulo(n).toNumber())>>>0}t.default=function(e){if(64!==e.length)throw new a.XrplError(`Attempting to parse a nftokenID with length ${e.length}\n , but expected a token with length 64`);const t=new o.default(e.substring(48,56),16).toNumber(),n=new o.default(e.substring(56,64),16).toNumber();return{NFTokenID:e,Flags:new o.default(e.substring(0,4),16).toNumber(),TransferFee:new o.default(e.substring(4,8),16).toNumber(),Issuer:(0,s.encodeAccountID)((0,i.hexToBytes)(e.substring(8,48))),Taxon:c(t,n),Sequence:n}}},5407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NEGATIVE_UNL_ID=void 0,t.NEGATIVE_UNL_ID="2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244"},5435:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e={}){var t,n;this.factor=2,this.numAttempts=0,this.ms=null!==(t=e.min)&&void 0!==t?t:100,this.max=null!==(n=e.max)&&void 0!==n?n:1e3}get attempts(){return this.numAttempts}duration(){const e=this.ms*Math.pow(this.factor,this.numAttempts);return this.numAttempts+=1,Math.floor(Math.min(e,this.max))}reset(){this.numAttempts=0}}},5442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSeed=t.deriveNodeAddress=t.deriveAddress=t.verify=t.sign=t.deriveKeypair=t.generateSeed=void 0;const i=n(6333);Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}});const o=n(1658),s=n(7377),a=n(619),c=n(8957),l=r(n(4876)),u=r(n(3212)),d=n(1788),f=r(n(2484)),h=r(n(9577));function g(e){return{"ecdsa-secp256k1":f.default,ed25519:h.default}[e]}function p(e){return(0,i.encodeAccountID)(function(e){return(0,o.ripemd160)((0,s.sha256)(e))}(e))}t.generateSeed=function(e={}){u.default.ok(!e.entropy||e.entropy.length>=16,"entropy too short");const t=e.entropy?e.entropy.slice(0,16):(0,a.randomBytes)(16),n="ed25519"===e.algorithm?"ed25519":"secp256k1";return(0,i.encodeSeed)(t,n)},t.deriveKeypair=function(e,t){var n;const r=(0,i.decodeSeed)(e),o=g("ed25519"===(null!==(n=null==t?void 0:t.algorithm)&&void 0!==n?n:r.type)?"ed25519":"ecdsa-secp256k1"),s=o.deriveKeypair(r.bytes,t),a=l.default.half("This test message should verify."),c=o.sign(a,s.privateKey);if(!o.verify(a,c,s.publicKey))throw new Error("derived keypair did not generate verifiable signature");return s},t.sign=function(e,t){return g((0,d.getAlgorithmFromPrivateKey)(t)).sign((0,a.hexToBytes)(e),t)},t.verify=function(e,t,n){return g((0,d.getAlgorithmFromPublicKey)(n)).verify((0,a.hexToBytes)(e),t,n)},t.deriveAddress=function(e){return p((0,a.hexToBytes)(e))},t.deriveNodeAddress=function(e){const t=(0,i.decodeNodePublic)(e);return p((0,c.accountPublicFromPublicGenerator)(t))}},5463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UInt64=void 0;const r=n(3328),i=n(619),o=n(5517),s=n(1141),a=/^[a-fA-F0-9]{1,16}$/,c=/^[0-9]{1,20}$/,l=BigInt(4294967295),u=new Set(["MaximumAmount","OutstandingAmount","MPTAmount","LockedAmount"]);function d(e){return u.has(e)}class f extends r.UInt{constructor(e){super(null!=e?e:f.defaultUInt64.bytes)}static fromParser(e){return new f(e.read(f.width))}static from(e,t=""){if(e instanceof f)return e;let n=new Uint8Array(f.width);if("number"==typeof e){if(e<0)throw new Error("value must be an unsigned integer");const t=BigInt(e),n=[new Uint8Array(4),new Uint8Array(4)];return(0,o.writeUInt32BE)(n[0],Number(t>>BigInt(32)),0),(0,o.writeUInt32BE)(n[1],Number(t&BigInt(l)),0),new f((0,i.concat)(n))}if("string"==typeof e){if(d(t)){if(!c.test(e))throw new Error(`${t} ${e} is not a valid base 10 string`);e=BigInt(e).toString(16)}if("string"==typeof e&&!a.test(e))throw new Error(`${e} is not a valid hex-string`);const r=e.padStart(16,"0");return n=(0,i.hexToBytes)(r),new f(n)}if("bigint"==typeof e){const t=[new Uint8Array(4),new Uint8Array(4)];return(0,o.writeUInt32BE)(t[0],Number(Number(e>>BigInt(32))),0),(0,o.writeUInt32BE)(t[1],Number(e&BigInt(l)),0),new f((0,i.concat)(t))}throw new Error("Cannot construct UInt64 from given value")}toJSON(e=s.DEFAULT_DEFINITIONS,t=""){const n=(0,i.bytesToHex)(this.bytes);return d(t)?BigInt("0x"+n).toString(10):n}valueOf(){const e=BigInt((0,o.readUInt32BE)(this.bytes.slice(0,4),0)),t=BigInt((0,o.readUInt32BE)(this.bytes.slice(4),0));return e<<BigInt(32)|t}toBytes(){return this.bytes}}t.UInt64=f,f.width=8,f.defaultUInt64=new f(new Uint8Array(f.width))},5489:(e,t)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function r(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.anumber=n,t.abytes=r,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){r(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}},5492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=o,t.abytes=s,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=a,t.byteSwap32=c,t.bytesToHex=function(e){if(s(e),l)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=u[e[n]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(l)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r},t.asyncLoop=async function(e,n,r){let i=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-i;e>=0&&e<n||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=h,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=g,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=h(e)),s(e),e},t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];s(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=p,t.createOptHasher=y,t.createXOFer=m,t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return Uint8Array.from(r.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const r=n(1300);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function s(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function a(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=a(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>a(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const l=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function g(e){return"string"==typeof e&&(e=h(e)),s(e),e}function p(e){const t=t=>e().update(g(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function y(e){const t=(t,n)=>e(n).update(g(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function m(e){const t=(t,n)=>e(n).update(g(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=p,t.wrapConstructorWithOpts=y,t.wrapXOFConstructorWithOpts=m},5516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.encodeNodePublic=t.decodeNodePublic=t.decodeAddress=t.decodeAccountID=t.encodeAddress=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const r=n(1616),i=n(7377),o=n(2824),s=[1,225,75],a={sha256:i.sha256},c=new class{constructor(e){this._sha256=e.sha256,this._codec=r.base58xrp}encode(e,t){const n=t.versions;return this._encodeVersioned(e,n,t.expectedLength)}decode(e,t){var n;const r=t.versions,i=t.versionTypes,s=this.decodeChecked(e);if(r.length>1&&!t.expectedLength)throw new Error("expectedLength is required because there are >= 2 possible versions");const a="number"==typeof r[0]?1:r[0].length,c=null!==(n=t.expectedLength)&&void 0!==n?n:s.length-a,l=s.slice(0,-c),u=s.slice(-c);for(let e=0;e<r.length;e++){const t=Array.isArray(r[e])?r[e]:[r[e]];if((0,o.arrayEqual)(l,t))return{version:t,bytes:u,type:i?i[e]:null}}throw new Error("version_invalid: version bytes do not match any of the provided version(s)")}encodeChecked(e){const t=this._sha256(this._sha256(e)).slice(0,4);return this._encodeRaw(Uint8Array.from((0,o.concatArgs)(e,t)))}decodeChecked(e){const t=this._decodeRaw(e);if(t.byteLength<5)throw new Error("invalid_input_size: decoded data must have length >= 5");if(!this._verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}_encodeVersioned(e,t,n){if(!d(e,n))throw new Error("unexpected_payload_length: bytes.length does not match expectedLength. Ensure that the bytes are a Uint8Array.");return this.encodeChecked((0,o.concatArgs)(t,e))}_encodeRaw(e){return this._codec.encode(Uint8Array.from(e))}_decodeRaw(e){return this._codec.decode(e)}_verifyCheckSum(e){const t=this._sha256(this._sha256(e.slice(0,-4))).slice(0,4),n=e.slice(-4);return(0,o.arrayEqual)(t,n)}}(a);function l(e){return c.encode(e,{versions:[0],expectedLength:20})}function u(e){return c.decode(e,{versions:[0],expectedLength:20}).bytes}function d(e,t){return"byteLength"in e?e.byteLength===t:e.length===t}t.codec=c,t.encodeSeed=function(e,t){if(!d(e,16))throw new Error("entropy must have length 16");const n={expectedLength:16,versions:"ed25519"===t?s:[33]};return c.encode(e,n)},t.decodeSeed=function(e,t={versionTypes:["ed25519","secp256k1"],versions:[s,33],expectedLength:16}){return c.decode(e,t)},t.encodeAccountID=l,t.encodeAddress=l,t.decodeAccountID=u,t.decodeAddress=u,t.decodeNodePublic=function(e){return c.decode(e,{versions:[28],expectedLength:33}).bytes},t.encodeNodePublic=function(e){return c.encode(e,{versions:[28],expectedLength:33})},t.encodeAccountPublic=function(e){return c.encode(e,{versions:[35],expectedLength:33})},t.decodeAccountPublic=function(e){return c.decode(e,{versions:[35],expectedLength:33}).bytes},t.isValidClassicAddress=function(e){try{u(e)}catch(e){return!1}return!0}},5517:(e,t)=>{"use strict";function n(e,t){if(e.byteLength!==t.byteLength)throw new Error("Cannot compare arrays of different length");for(let n=0;n<e.length-1;n+=1){if(e[n]>t[n])return 1;if(e[n]<t[n])return-1}return 0}function r(e){return e.byteOffset%2==0&&e.byteLength%2==0}function i(e){return e.byteOffset%4==0&&e.byteLength%4==0}Object.defineProperty(t,"__esModule",{value:!0}),t.compare=t.equal=t.readInt64BE=t.readInt32BE=t.readUInt32BE=t.readUInt16BE=t.writeInt64BE=t.writeInt32BE=t.writeUInt32BE=t.writeUInt16BE=t.writeUInt8=void 0,t.writeUInt8=function(e,t,n){t=Number(t),e[n]=t},t.writeUInt16BE=function(e,t,n){t=Number(t),e[n]=t>>>8,e[n+1]=t},t.writeUInt32BE=function(e,t,n){e[n]=t>>>24&255,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t},t.writeInt32BE=function(e,t,n){new DataView(e.buffer,e.byteOffset,e.byteLength).setInt32(n,t,!1)},t.writeInt64BE=function(e,t,n){new DataView(e.buffer,e.byteOffset,e.byteLength).setBigInt64(n,t,!1)},t.readUInt16BE=function(e,t){return new DataView(e.buffer).getUint16(t,!1).toString(10)},t.readUInt32BE=function(e,t){return new DataView(e.buffer).getUint32(t,!1).toString(10)},t.readInt32BE=function(e,t){return new DataView(e.buffer,e.byteOffset,e.byteLength).getInt32(t,!1)},t.readInt64BE=function(e,t){return new DataView(e.buffer,e.byteOffset,e.byteLength).getBigInt64(t,!1)},t.equal=function(e,t){const o=e instanceof ArrayBuffer?new Uint8Array(e,0):e,s=t instanceof ArrayBuffer?new Uint8Array(t,0):t;return o.byteLength==s.byteLength&&(i(o)&&i(s)?0===function(e,t){return n(new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4),new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4))}(o,s):r(o)&&r(s)?0===function(e,t){return n(new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2))}(o,s):0===function(e,t){return n(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(o,s))},t.compare=n},5615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultCreate=t.VaultCreateFlags=t.VaultWithdrawalPolicy=void 0;const r=n(255),i=n(99),o=n(2012),s=n(2794);var a,c;!function(e){e[e.vaultStrategyFirstComeFirstServe=1]="vaultStrategyFirstComeFirstServe"}(a||(t.VaultWithdrawalPolicy=a={})),function(e){e[e.tfVaultPrivate=65536]="tfVaultPrivate",e[e.tfVaultShareNonTransferable=131072]="tfVaultShareNonTransferable"}(c||(t.VaultCreateFlags=c={})),t.validateVaultCreate=function(e){if((0,s.validateBaseTransaction)(e),(0,s.validateRequiredField)(e,"Asset",s.isCurrency),(0,s.validateOptionalField)(e,"Data",s.isString),(0,s.validateOptionalField)(e,"AssetsMaximum",s.isXRPLNumber),(0,s.validateOptionalField)(e,"MPTokenMetadata",s.isString),(0,s.validateOptionalField)(e,"WithdrawalPolicy",s.isNumber),(0,s.validateOptionalField)(e,"DomainID",s.isString),void 0!==e.Data){const t=e.Data;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultCreate: Data must be a valid hex string");const n=t.length/2;if(n>s.VAULT_DATA_MAX_BYTE_LENGTH)throw new r.ValidationError(`VaultCreate: Data exceeds ${s.VAULT_DATA_MAX_BYTE_LENGTH} bytes (actual: ${n})`)}if(void 0!==e.MPTokenMetadata){const t=e.MPTokenMetadata;if(!(0,i.isHex)(t))throw new r.ValidationError("VaultCreate: MPTokenMetadata must be a valid non-empty hex string");const n=t.length/2;if(n>o.MAX_MPT_META_BYTE_LENGTH)throw new r.ValidationError(`VaultCreate: MPTokenMetadata exceeds ${o.MAX_MPT_META_BYTE_LENGTH} bytes (actual: ${n})`)}if(void 0!==e.DomainID&&!(0,i.hasFlag)(e,c.tfVaultPrivate,"tfVaultPrivate"))throw new r.ValidationError("VaultCreate: Cannot set DomainID unless tfVaultPrivate flag is set.");if(null!=e.MPTokenMetadata){const t=(0,o.validateMPTokenMetadata)(e.MPTokenMetadata);if(t.length>0){const e=[o.MPT_META_WARNING_HEADER,...t.map(e=>`- ${e}`)].join("\n");console.warn(e)}}}},5620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreTypes=t.DEFAULT_DEFINITIONS=t.XrplDefinitionsBase=t.XrplDefinitions=t.TRANSACTION_TYPES=t.decodeLedgerData=t.decodeQuality=t.encodeQuality=t.encodeForSigningBatch=t.encodeForMultisigning=t.encodeForSigningClaim=t.encodeForSigning=t.encode=t.decode=void 0;const r=n(4184),i=n(2476);Object.defineProperty(t,"decodeLedgerData",{enumerable:!0,get:function(){return i.decodeLedgerData}});const o=n(1141);Object.defineProperty(t,"XrplDefinitionsBase",{enumerable:!0,get:function(){return o.XrplDefinitionsBase}}),Object.defineProperty(t,"TRANSACTION_TYPES",{enumerable:!0,get:function(){return o.TRANSACTION_TYPES}}),Object.defineProperty(t,"DEFAULT_DEFINITIONS",{enumerable:!0,get:function(){return o.DEFAULT_DEFINITIONS}});const s=n(4660);Object.defineProperty(t,"XrplDefinitions",{enumerable:!0,get:function(){return s.XrplDefinitions}});const a=n(6986);Object.defineProperty(t,"coreTypes",{enumerable:!0,get:function(){return a.coreTypes}});const c=n(619),{signingData:l,signingClaimData:u,multiSigningData:d,signingBatchData:f,binaryToJSON:h,serializeObject:g}=r.binary;t.decode=function(e,t){if("string"!=typeof e)throw new Error("binary must be a hex string");return h(e,t)},t.encode=function(e,t){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(g(e,{definitions:t}))},t.encodeForSigning=function(e,t){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(l(e,r.HashPrefix.transactionSig,{definitions:t}))},t.encodeForSigningClaim=function(e){if("object"!=typeof e)throw new Error;return(0,c.bytesToHex)(u(e))},t.encodeForMultisigning=function(e,t,n){if("object"!=typeof e)throw new Error;if(""!==e.SigningPubKey)throw new Error;const r=n?{definitions:n}:void 0;return(0,c.bytesToHex)(d(e,t,r))},t.encodeForSigningBatch=function(e){if("object"!=typeof e)throw new Error("Need an object to encode a Batch transaction");return(0,c.bytesToHex)(f(e))},t.encodeQuality=function(e){if("string"!=typeof e)throw new Error;return(0,c.bytesToHex)(r.quality.encode(e))},t.decodeQuality=function(e){if("string"!=typeof e)throw new Error;return r.quality.decode(e).toString()}},5642:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rfc1751MnemonicToKey=t.keyToRFC1751Mnemonic=t.walletFromSecretNumbers=t.Wallet=t.ECDSA=t.Client=void 0;var s=n(5036);Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return s.Client}}),i(n(9729),t),i(n(5684),t);var a=n(5970);Object.defineProperty(t,"ECDSA",{enumerable:!0,get:function(){return o(a).default}}),i(n(255),t);var c=n(5274);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.Wallet}});var l=n(5907);Object.defineProperty(t,"walletFromSecretNumbers",{enumerable:!0,get:function(){return l.walletFromSecretNumbers}});var u=n(4218);Object.defineProperty(t,"keyToRFC1751Mnemonic",{enumerable:!0,get:function(){return u.keyToRFC1751Mnemonic}}),Object.defineProperty(t,"rfc1751MnemonicToKey",{enumerable:!0,get:function(){return u.rfc1751MnemonicToKey}}),i(n(3842),t),i(n(2408),t)},5644:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255),o=r(n(9373)),s=r(n(2530)),a=n(168);class c extends a.Node{constructor(e,t,n){super(),this.tag=e,this.type=n,this.data=t}get hash(){switch(this.type){case a.NodeType.ACCOUNT_STATE:{const e=o.default.LEAF_NODE.toString(16);return(0,s.default)(e+this.data+this.tag)}case a.NodeType.TRANSACTION_NO_METADATA:{const e=o.default.TRANSACTION_ID.toString(16);return(0,s.default)(e+this.data)}case a.NodeType.TRANSACTION_METADATA:{const e=o.default.TRANSACTION_NODE.toString(16);return(0,s.default)(e+this.data+this.tag)}default:throw new i.XrplError("Tried to hash a SHAMap node of unknown type.")}}addItem(e,t){throw new i.XrplError("Cannot call addItem on a LeafNode")}}t.default=c},5684:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getXChainClaimID=t.parseNFTokenID=t.getNFTokenID=t.encodeForSigningClaim=t.encodeForSigning=t.encodeForMultiSigning=t.decode=t.encode=t.decodeXAddress=t.encodeXAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.isValidClassicAddress=t.isValidXAddress=t.xAddressToClassicAddress=t.classicAddressToXAddress=t.convertHexToString=t.convertStringToHex=t.verifyPaymentChannelClaim=t.verifyKeypairSignature=t.signPaymentChannelClaim=t.deriveXAddress=t.deriveAddress=t.deriveKeypair=t.hashes=t.isValidAddress=t.isValidSecret=t.qualityToDecimal=t.transferRateToDecimal=t.decimalToTransferRate=t.percentToTransferRate=t.decimalToQuality=t.percentToQuality=t.unixTimeToRippleTime=t.rippleTimeToUnixTime=t.isoTimeToRippleTime=t.rippleTimeToISOTime=t.hasNextPage=t.xrpToDrops=t.dropsToXrp=t.getBalanceChanges=void 0;const i=n(6333);Object.defineProperty(t,"classicAddressToXAddress",{enumerable:!0,get:function(){return i.classicAddressToXAddress}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"decodeXAddress",{enumerable:!0,get:function(){return i.decodeXAddress}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"encodeXAddress",{enumerable:!0,get:function(){return i.encodeXAddress}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}}),Object.defineProperty(t,"isValidXAddress",{enumerable:!0,get:function(){return i.isValidXAddress}}),Object.defineProperty(t,"xAddressToClassicAddress",{enumerable:!0,get:function(){return i.xAddressToClassicAddress}});const o=n(5620),s=n(5442);Object.defineProperty(t,"verifyKeypairSignature",{enumerable:!0,get:function(){return s.verify}});const a=n(8437);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return a.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return a.deriveAddress}}),Object.defineProperty(t,"deriveXAddress",{enumerable:!0,get:function(){return a.deriveXAddress}});const c=r(n(2945));t.getBalanceChanges=c.default;const l=r(n(6670));t.getNFTokenID=l.default;const u=r(n(4192));t.getXChainClaimID=u.default;const d=n(1377),f=r(n(5315));t.parseNFTokenID=f.default;const h=n(3365);Object.defineProperty(t,"percentToTransferRate",{enumerable:!0,get:function(){return h.percentToTransferRate}}),Object.defineProperty(t,"decimalToTransferRate",{enumerable:!0,get:function(){return h.decimalToTransferRate}}),Object.defineProperty(t,"transferRateToDecimal",{enumerable:!0,get:function(){return h.transferRateToDecimal}}),Object.defineProperty(t,"percentToQuality",{enumerable:!0,get:function(){return h.percentToQuality}}),Object.defineProperty(t,"decimalToQuality",{enumerable:!0,get:function(){return h.decimalToQuality}}),Object.defineProperty(t,"qualityToDecimal",{enumerable:!0,get:function(){return h.qualityToDecimal}});const g=r(n(376));t.signPaymentChannelClaim=g.default;const p=n(6339);Object.defineProperty(t,"convertHexToString",{enumerable:!0,get:function(){return p.convertHexToString}}),Object.defineProperty(t,"convertStringToHex",{enumerable:!0,get:function(){return p.convertStringToHex}});const y=n(2295);Object.defineProperty(t,"rippleTimeToISOTime",{enumerable:!0,get:function(){return y.rippleTimeToISOTime}}),Object.defineProperty(t,"isoTimeToRippleTime",{enumerable:!0,get:function(){return y.isoTimeToRippleTime}}),Object.defineProperty(t,"rippleTimeToUnixTime",{enumerable:!0,get:function(){return y.rippleTimeToUnixTime}}),Object.defineProperty(t,"unixTimeToRippleTime",{enumerable:!0,get:function(){return y.unixTimeToRippleTime}});const m=r(n(392));t.verifyPaymentChannelClaim=m.default;const b=n(2722);Object.defineProperty(t,"xrpToDrops",{enumerable:!0,get:function(){return b.xrpToDrops}}),Object.defineProperty(t,"dropsToXrp",{enumerable:!0,get:function(){return b.dropsToXrp}}),t.isValidSecret=function(e){try{return(0,a.deriveKeypair)(e),!0}catch(e){return!1}},t.encode=function(e){return(0,o.encode)(e)},t.encodeForSigning=function(e){return(0,o.encodeForSigning)(e)},t.encodeForSigningClaim=function(e){return(0,o.encodeForSigningClaim)(e)},t.encodeForMultiSigning=function(e,t){return(0,o.encodeForMultisigning)(e,t)},t.decode=function(e){return(0,o.decode)(e)},t.isValidAddress=function(e){return(0,i.isValidXAddress)(e)||(0,i.isValidClassicAddress)(e)},t.hasNextPage=function(e){return Boolean(e.result.marker)};const E={hashSignedTx:d.hashSignedTx,hashTx:d.hashTx,hashAccountRoot:d.hashAccountRoot,hashSignerListId:d.hashSignerListId,hashOfferId:d.hashOfferId,hashTrustline:d.hashTrustline,hashTxTree:d.hashTxTree,hashStateTree:d.hashStateTree,hashLedger:d.hashLedger,hashLedgerHeader:d.hashLedgerHeader,hashEscrow:d.hashEscrow,hashPaymentChannel:d.hashPaymentChannel};t.hashes=E},5713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultWithdraw=void 0;const r=n(2794);t.validateVaultWithdraw=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateOptionalField)(e,"Destination",r.isAccount)}},5755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Blob=void 0;const r=n(1275),i=n(619);class o extends r.SerializedType{constructor(e){super(e)}static fromParser(e,t){return new o(e.read(t))}static from(e){if(e instanceof o)return e;if("string"==typeof e){if(!/^[A-F0-9]*$/iu.test(e))throw new Error("Cannot construct Blob from a non-hex string");return new o((0,i.hexToBytes)(e))}throw new Error("Cannot construct Blob from value given")}}t.Blob=o},5763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountID=void 0;const r=n(6333),i=n(7284),o=n(619),s=/^[A-F0-9]{40}$/;class a extends i.Hash160{constructor(e){super(null!=e?e:a.defaultAccountID.bytes)}static from(e){if(e instanceof a)return e;if("string"==typeof e)return""===e?new a:s.test(e)?new a((0,o.hexToBytes)(e)):this.fromBase58(e);throw new Error("Cannot construct AccountID from value given")}static fromBase58(e){if((0,r.isValidXAddress)(e)){const t=(0,r.xAddressToClassicAddress)(e);if(!1!==t.tag)throw new Error("Only allowed to have tag on Account or Destination");e=t.classicAddress}return new a(Uint8Array.from((0,r.decodeAccountID)(e)))}toJSON(){return this.toBase58()}toBase58(){return(0,r.encodeAccountID)(this.bytes)}}t.AccountID=a,a.defaultAccountID=new a(new Uint8Array(20))},5812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.twistedEdwards=function(e){const t=function(e){const t=(0,r.validateBasic)(e);return o.validateObject(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:f,prehash:h,hash:g,randomBytes:p,nByteLength:y,h:m}=t,b=l<<BigInt(8*y)-c,E=n.create,w=(0,i.Field)(t.n,t.nBitLength),A=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(e){return{isValid:!1,value:a}}}),S=t.adjustScalarBytes||(e=>e),v=t.domain||((e,t,n)=>{if((0,s.abool)("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function T(e,t){o.aInRange("coordinate "+e,t,a,b)}function O(e){if(!(e instanceof _))throw new Error("ExtendedPoint expected")}const I=(0,s.memoized)((e,t)=>{const{ex:r,ey:i,ez:o}=e,s=e.is0();null==t&&(t=s?u:n.inv(o));const l=E(r*t),d=E(i*t),f=E(o*t);if(s)return{x:a,y:c};if(f!==c)throw new Error("invZ was invalid");return{x:l,y:d}}),B=(0,s.memoized)(e=>{const{a:n,d:r}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:i,ey:o,ez:s,et:a}=e,c=E(i*i),l=E(o*o),u=E(s*s),d=E(u*u),f=E(c*n);if(E(u*E(f+l))!==E(d+E(r*E(c*l))))throw new Error("bad point: equation left != right (1)");if(E(i*o)!==E(s*a))throw new Error("bad point: equation left != right (2)");return!0});class _{constructor(e,t,n,r){this.ex=e,this.ey=t,this.ez=n,this.et=r,T("x",e),T("y",t),T("z",n),T("t",r),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof _)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return T("x",t),T("y",n),new _(t,n,c,E(t*n))}static normalizeZ(e){const t=n.invertBatch(e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(_.fromAffine)}static msm(e,t){return(0,r.pippenger)(_,w,e,t)}_setWindowSize(e){F.setWindowSize(this,e)}assertValidity(){B(this)}equals(e){O(e);const{ex:t,ey:n,ez:r}=this,{ex:i,ey:o,ez:s}=e,a=E(t*s),c=E(i*r),l=E(n*s),u=E(o*r);return a===c&&l===u}is0(){return this.equals(_.ZERO)}negate(){return new _(E(-this.ex),this.ey,this.ez,E(-this.et))}double(){const{a:e}=t,{ex:n,ey:r,ez:i}=this,o=E(n*n),s=E(r*r),a=E(l*E(i*i)),c=E(e*o),u=n+r,d=E(E(u*u)-o-s),f=c+s,h=f-a,g=c-s,p=E(d*h),y=E(f*g),m=E(d*g),b=E(h*f);return new _(p,y,b,m)}add(e){O(e);const{a:n,d:r}=t,{ex:i,ey:o,ez:s,et:c}=this,{ex:u,ey:d,ez:f,et:h}=e;if(n===BigInt(-1)){const e=E((o-i)*(d+u)),t=E((o+i)*(d-u)),n=E(t-e);if(n===a)return this.double();const r=E(s*l*h),g=E(c*l*f),p=g+r,y=t+e,m=g-r,b=E(p*n),w=E(y*m),A=E(p*m),S=E(n*y);return new _(b,w,S,A)}const g=E(i*u),p=E(o*d),y=E(c*r*h),m=E(s*f),b=E((i+o)*(u+d)-g-p),w=m-y,A=m+y,S=E(p-n*g),v=E(b*w),T=E(A*S),I=E(b*S),B=E(w*A);return new _(v,T,B,I)}subtract(e){return this.add(e.negate())}wNAF(e){return F.wNAFCached(this,e,_.normalizeZ)}multiply(e){const t=e;o.aInRange("scalar",t,c,f);const{p:n,f:r}=this.wNAF(t);return _.normalizeZ([n,r])[0]}multiplyUnsafe(e,t=_.ZERO){const n=e;return o.aInRange("scalar",n,a,f),n===a?L:this.is0()||n===c?this:F.wNAFCachedUnsafe(this,n,_.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(m).is0()}isTorsionFree(){return F.unsafeLadder(this,f).is0()}toAffine(e){return I(this,e)}clearCofactor(){const{h:e}=t;return e===c?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){const{d:i,a:l}=t,u=n.BYTES;e=(0,s.ensureBytes)("pointHex",e,u),(0,s.abool)("zip215",r);const d=e.slice(),f=e[u-1];d[u-1]=-129&f;const h=o.bytesToNumberLE(d),g=r?b:n.ORDER;o.aInRange("pointHex.y",h,a,g);const p=E(h*h),y=E(p-c),m=E(i*p-l);let{isValid:w,value:S}=A(y,m);if(!w)throw new Error("Point.fromHex: invalid y coordinate");const v=(S&c)===c,T=!!(128&f);if(!r&&S===a&&T)throw new Error("Point.fromHex: x=0 and x_0=1");return T!==v&&(S=E(-S)),_.fromAffine({x:S,y:h})}static fromPrivateKey(e){return M(e).point}toRawBytes(){const{x:e,y:t}=this.toAffine(),r=o.numberToBytesLE(t,n.BYTES);return r[r.length-1]|=e&c?128:0,r}toHex(){return o.bytesToHex(this.toRawBytes())}}_.BASE=new _(t.Gx,t.Gy,c,E(t.Gx*t.Gy)),_.ZERO=new _(a,c,c,a);const{BASE:N,ZERO:L}=_,F=(0,r.wNAF)(_,8*y);function C(e){return(0,i.mod)(e,f)}function D(e){return C(o.bytesToNumberLE(e))}function M(e){const t=n.BYTES;e=(0,s.ensureBytes)("private key",e,t);const r=(0,s.ensureBytes)("hashed private key",g(e),2*t),i=S(r.slice(0,t)),o=r.slice(t,2*t),a=D(i),c=N.multiply(a),l=c.toRawBytes();return{head:i,prefix:o,scalar:a,point:c,pointBytes:l}}function P(e=new Uint8Array,...t){const n=o.concatBytes(...t);return D(g(v(n,(0,s.ensureBytes)("context",e),!!h)))}const R=d;return N._setWindowSize(8),{CURVE:t,getPublicKey:function(e){return M(e).pointBytes},sign:function(e,t,r={}){e=(0,s.ensureBytes)("message",e),h&&(e=h(e));const{prefix:i,scalar:c,pointBytes:l}=M(t),u=P(r.context,i,e),d=N.multiply(u).toRawBytes(),g=C(u+P(r.context,d,l,e)*c);o.aInRange("signature.s",g,a,f);const p=o.concatBytes(d,o.numberToBytesLE(g,n.BYTES));return(0,s.ensureBytes)("result",p,2*n.BYTES)},verify:function(e,t,r,i=R){const{context:a,zip215:c}=i,l=n.BYTES;e=(0,s.ensureBytes)("signature",e,2*l),t=(0,s.ensureBytes)("message",t),r=(0,s.ensureBytes)("publicKey",r,l),void 0!==c&&(0,s.abool)("zip215",c),h&&(t=h(t));const u=o.bytesToNumberLE(e.slice(l,2*l));let d,f,g;try{d=_.fromHex(r,c),f=_.fromHex(e.slice(0,l),c),g=N.multiplyUnsafe(u)}catch(e){return!1}if(!c&&d.isSmallOrder())return!1;const p=P(a,f.toRawBytes(),d.toRawBytes(),t);return f.add(d.multiplyUnsafe(p)).subtract(g).clearCofactor().equals(_.ZERO)},ExtendedPoint:_,utils:{getExtendedPublicKey:M,randomPrivateKey:()=>p(n.BYTES),precompute:(e=8,t=_.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}};const r=n(4107),i=n(802),o=n(3449),s=n(3449),a=BigInt(0),c=BigInt(1),l=BigInt(2),u=BigInt(8),d={zip215:!0}},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=g,t.pow=function(e,t,n){return S(I(n),e,t)},t.pow2=function(e,t,n){let r=e;for(;t-- >i;)r*=r,r%=n;return r},t.invert=p,t.tonelliShanks=E,t.FpSqrt=w,t.validateField=function(e){const t=A.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,r._validateObject)(e,t),e},t.FpPow=S,t.FpInvertBatch=v,t.FpDiv=function(e,t,n){return e.mul(t,"bigint"==typeof n?p(n,e.ORDER):e.inv(n))},t.FpLegendre=T,t.FpIsSquare=function(e,t){return 1===T(e,t)},t.nLength=O,t.Field=I,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n},t.hashToPrivateScalar=function(e,t,n=!1){const i=(e=(0,r.ensureBytes)("privateHash",e)).length,s=O(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return g(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=B,t.getMinHashLength=_,t.mapHashToField=function(e,t,n=!1){const i=e.length,s=B(t),a=_(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=g(n?(0,r.bytesToNumberLE)(e):(0,r.bytesToNumberBE)(e),t-o)+o;return n?(0,r.numberToBytesLE)(c,s):(0,r.numberToBytesBE)(c,s)};const r=n(7663),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),l=BigInt(5),u=BigInt(7),d=BigInt(8),f=BigInt(9),h=BigInt(16);function g(e,t){const n=e%t;return n>=i?n:t+n}function p(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let n=g(e,t),r=t,s=i,a=o,c=o,l=i;for(;n!==i;){const e=r/n,t=r%n,i=s-c*e,o=a-l*e;r=n,n=t,s=c,a=l,c=i,l=o}if(r!==o)throw new Error("invert: does not exist");return g(s,t)}function y(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function m(e,t){const n=(e.ORDER+o)/c,r=e.pow(t,n);return y(e,r,t),r}function b(e,t){const n=(e.ORDER-l)/d,r=e.mul(t,s),i=e.pow(r,n),o=e.mul(t,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));return y(e,c,t),c}function E(e){if(e<a)throw new Error("sqrt is not defined for small field");let t=e-o,n=0;for(;t%s===i;)t/=s,n++;let r=s;const c=I(e);for(;1===T(c,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return m;let l=c.pow(r,t);const u=(t+o)/s;return function(e,r){if(e.is0(r))return r;if(1!==T(e,r))throw new Error("Cannot find square root");let i=n,s=e.mul(e.ONE,l),a=e.pow(r,t),c=e.pow(r,u);for(;!e.eql(a,e.ONE);){if(e.is0(a))return e.ZERO;let t=1,n=e.sqr(a);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=o<<BigInt(i-t-1),l=e.pow(s,r);i=t,s=e.sqr(l),a=e.mul(a,s),c=e.mul(c,l)}return c}}function w(e){return e%c===a?m:e%d===l?b:e%h===f?function(e){const t=I(e),n=E(e),r=n(t,t.neg(t.ONE)),i=n(t,r),o=n(t,t.neg(r)),s=(e+u)/h;return(e,t)=>{let n=e.pow(t,s),a=e.mul(n,r);const c=e.mul(n,i),l=e.mul(n,o),u=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,a,u),a=e.cmov(l,c,d);const f=e.eql(e.sqr(a),t),h=e.cmov(n,a,f);return y(e,h,t),h}}(e):E(e)}t.isNegativeLE=(e,t)=>(g(e,t)&o)===o;const A=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function S(e,t,n){if(n<i)throw new Error("invalid exponent, negatives unsupported");if(n===i)return e.ONE;if(n===o)return t;let r=e.ONE,s=t;for(;n>i;)n&o&&(r=e.mul(r,s)),s=e.sqr(s),n>>=o;return r}function v(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),o=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),o),r}function T(e,t){const n=(e.ORDER-o)/s,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!c)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function O(e,t){void 0!==t&&(0,r.anumber)(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function I(e,t,n=!1,s={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);let a,c,l,u=!1;if("object"==typeof t&&null!=t){if(s.sqrt||n)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(a=e.BITS),e.sqrt&&(c=e.sqrt),"boolean"==typeof e.isLE&&(n=e.isLE),"boolean"==typeof e.modFromBytes&&(u=e.modFromBytes),l=e.allowedLengths}else"number"==typeof t&&(a=t),s.sqrt&&(c=s.sqrt);const{nBitLength:d,nByteLength:f}=O(e,a);if(f>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const y=Object.freeze({ORDER:e,isLE:n,BITS:d,BYTES:f,MASK:(0,r.bitMask)(d),ZERO:i,ONE:o,allowedLengths:l,create:t=>g(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isValidNot0:e=>!y.is0(e)&&y.isValid(e),isOdd:e=>(e&o)===o,neg:t=>g(-t,e),eql:(e,t)=>e===t,sqr:t=>g(t*t,e),add:(t,n)=>g(t+n,e),sub:(t,n)=>g(t-n,e),mul:(t,n)=>g(t*n,e),pow:(e,t)=>S(y,e,t),div:(t,n)=>g(t*p(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:c||(t=>(h||(h=w(e)),h(y,t))),toBytes:e=>n?(0,r.numberToBytesLE)(e,f):(0,r.numberToBytesBE)(e,f),fromBytes:(t,i=!0)=>{if(l){if(!l.includes(t.length)||t.length>f)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);const e=new Uint8Array(f);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==f)throw new Error("Field.fromBytes: expected "+f+" bytes, got "+t.length);let o=n?(0,r.bytesToNumberLE)(t):(0,r.bytesToNumberBE)(t);if(u&&(o=g(o,e)),!i&&!y.isValid(o))throw new Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:e=>v(y,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(y)}function B(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function _(e){const t=B(e);return t+Math.ceil(t/2)}},5842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenCreateOffer=t.NFTokenCreateOfferFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfSellNFToken=1]="tfSellNFToken"}(s||(t.NFTokenCreateOfferFlags=s={})),t.validateNFTokenCreateOffer=function(e){var t,n;if((0,o.validateBaseTransaction)(e),e.Account===e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner and Account must not be equal");if(e.Account===e.Destination)throw new r.ValidationError("NFTokenCreateOffer: Destination and Account must not be equal");if((0,o.validateOptionalField)(e,"Destination",o.isAccount),(0,o.validateOptionalField)(e,"Owner",o.isAccount),null==e.NFTokenID)throw new r.ValidationError("NFTokenCreateOffer: missing field NFTokenID");if(!(0,o.isAmount)(e.Amount))throw new r.ValidationError("NFTokenCreateOffer: invalid Amount");const a=null!==(t=e.Flags)&&void 0!==t?t:0;("number"==typeof a?(0,i.isFlagEnabled)(a,s.tfSellNFToken):null!==(n=a.tfSellNFToken)&&void 0!==n&&n)?function(e){if(null!=e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner must not be present for sell offers")}(e):function(e){if(null==e.Owner)throw new r.ValidationError("NFTokenCreateOffer: Owner must be present for buy offers");if((0,o.parseAmountValue)(e.Amount)<=0)throw new r.ValidationError("NFTokenCreateOffer: Amount must be greater than 0 for buy offers")}(e)}},5863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=void 0;const r=n(255),i=n(9672),o=n(8571),s=n(3750),a=n(4263),c=n(3746),l=n(9966),u=n(4965),d=n(6214),f=n(2190),h=n(988),g=n(6695),p=n(6237),y=n(248),m=n(2859),b=n(5903),E=n(2794),w=n(390),A=n(7698),S=n(6769),v=n(4526),T=n(602),O=n(8377),I=n(8292),B=n(7118),_=n(3296),N=n(7315),L=n(3094),F=n(9962),C=n(1362),D=n(548),M=n(5998),P=n(5123),R=n(7688),x=n(5842),U=n(8718),k=n(7636),H=n(3539),V=n(9349),j=n(9726),z=n(1386),K=n(1441),G=n(2152),q=n(1722),W=n(5),X=n(4758),$=n(821),Y=n(1664),Z=n(2905),J=n(3007),Q=n(6181),ee=n(9043),te=n(5615),ne=n(2404),re=n(3461),ie=n(1811),oe=n(5713),se=n(5029),ae=n(7872),ce=n(1933),le=n(8312),ue=n(3471),de=n(707),fe=n(425),he=n(4329);t.validate=function e(t){const n=Object.assign({},t);switch((0,E.validateBaseTransaction)(n),Object.keys(n).forEach(e=>{const t=n[e];if(t&&(0,E.isIssuedCurrencyAmount)(t)){const e=t.currency;if(3===e.length&&"XRP"===e.toUpperCase())throw new r.ValidationError(`Cannot have an issued currency with a similar standard code to XRP (received '${e}'). XRP is not an issued currency.`)}}),n.Flags=(0,i.convertTxFlagsToNumber)(n),n.TransactionType){case"AMMBid":(0,a.validateAMMBid)(n);break;case"AMMClawback":(0,c.validateAMMClawback)(n);break;case"AMMCreate":(0,l.validateAMMCreate)(n);break;case"AMMDelete":(0,u.validateAMMDelete)(n);break;case"AMMDeposit":(0,d.validateAMMDeposit)(n);break;case"AMMVote":(0,f.validateAMMVote)(n);break;case"AMMWithdraw":(0,h.validateAMMWithdraw)(n);break;case"AccountDelete":(0,o.validateAccountDelete)(n);break;case"AccountSet":(0,s.validateAccountSet)(n);break;case"Batch":(0,g.validateBatch)(n),n.RawTransactions.forEach(t=>{e(t.RawTransaction)});break;case"CheckCancel":(0,p.validateCheckCancel)(n);break;case"CheckCash":(0,y.validateCheckCash)(n);break;case"CheckCreate":(0,m.validateCheckCreate)(n);break;case"Clawback":(0,b.validateClawback)(n);break;case"CredentialAccept":(0,w.validateCredentialAccept)(n);break;case"CredentialCreate":(0,A.validateCredentialCreate)(n);break;case"CredentialDelete":(0,S.validateCredentialDelete)(n);break;case"DIDDelete":(0,O.validateDIDDelete)(n);break;case"DIDSet":(0,I.validateDIDSet)(n);break;case"DelegateSet":(0,v.validateDelegateSet)(n);break;case"DepositPreauth":(0,T.validateDepositPreauth)(n);break;case"EscrowCancel":(0,B.validateEscrowCancel)(n);break;case"EscrowCreate":(0,_.validateEscrowCreate)(n);break;case"EscrowFinish":(0,N.validateEscrowFinish)(n);break;case"MPTokenAuthorize":(0,L.validateMPTokenAuthorize)(n);break;case"MPTokenIssuanceCreate":(0,F.validateMPTokenIssuanceCreate)(n);break;case"MPTokenIssuanceDestroy":(0,C.validateMPTokenIssuanceDestroy)(n);break;case"MPTokenIssuanceSet":(0,D.validateMPTokenIssuanceSet)(n);break;case"NFTokenAcceptOffer":(0,M.validateNFTokenAcceptOffer)(n);break;case"NFTokenBurn":(0,P.validateNFTokenBurn)(n);break;case"NFTokenCancelOffer":(0,R.validateNFTokenCancelOffer)(n);break;case"NFTokenCreateOffer":(0,x.validateNFTokenCreateOffer)(n);break;case"NFTokenMint":(0,U.validateNFTokenMint)(n);break;case"NFTokenModify":(0,k.validateNFTokenModify)(n);break;case"OfferCancel":(0,H.validateOfferCancel)(n);break;case"OfferCreate":(0,V.validateOfferCreate)(n);break;case"OracleDelete":(0,j.validateOracleDelete)(n);break;case"OracleSet":(0,z.validateOracleSet)(n);break;case"Payment":(0,K.validatePayment)(n);break;case"PaymentChannelClaim":(0,G.validatePaymentChannelClaim)(n);break;case"PaymentChannelCreate":(0,q.validatePaymentChannelCreate)(n);break;case"PaymentChannelFund":(0,W.validatePaymentChannelFund)(n);break;case"PermissionedDomainSet":(0,$.validatePermissionedDomainSet)(n);break;case"PermissionedDomainDelete":(0,X.validatePermissionedDomainDelete)(n);break;case"SetRegularKey":(0,Y.validateSetRegularKey)(n);break;case"SignerListSet":(0,Z.validateSignerListSet)(n);break;case"TicketCreate":(0,J.validateTicketCreate)(n);break;case"TrustSet":(0,Q.validateTrustSet)(n);break;case"VaultClawback":(0,ee.validateVaultClawback)(n);break;case"VaultCreate":(0,te.validateVaultCreate)(n);break;case"VaultDelete":(0,ne.validateVaultDelete)(n);break;case"VaultDeposit":(0,re.validateVaultDeposit)(n);break;case"VaultSet":(0,ie.validateVaultSet)(n);break;case"VaultWithdraw":(0,oe.validateVaultWithdraw)(n);break;case"XChainAccountCreateCommit":(0,se.validateXChainAccountCreateCommit)(n);break;case"XChainAddAccountCreateAttestation":(0,ae.validateXChainAddAccountCreateAttestation)(n);break;case"XChainAddClaimAttestation":(0,ce.validateXChainAddClaimAttestation)(n);break;case"XChainClaim":(0,le.validateXChainClaim)(n);break;case"XChainCommit":(0,ue.validateXChainCommit)(n);break;case"XChainCreateBridge":(0,de.validateXChainCreateBridge)(n);break;case"XChainCreateClaimID":(0,fe.validateXChainCreateClaimID)(n);break;case"XChainModifyBridge":(0,he.validateXChainModifyBridge)(n);break;default:throw new r.ValidationError(`Invalid field TransactionType: ${n.TransactionType}`)}}},5903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateClawback=void 0;const r=n(255),i=n(2794);t.validateClawback=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Amount",i.isClawbackAmount),(0,i.validateOptionalField)(e,"Holder",i.isAccount),!(0,i.isIssuedCurrencyAmount)(e.Amount)&&!(0,i.isMPTAmount)(e.Amount))throw new r.ValidationError("Clawback: invalid Amount");if((0,i.isIssuedCurrencyAmount)(e.Amount)&&e.Account===e.Amount.issuer)throw new r.ValidationError("Clawback: invalid holder Account");if((0,i.isMPTAmount)(e.Amount)&&e.Account===e.Holder)throw new r.ValidationError("Clawback: invalid holder Account");if((0,i.isIssuedCurrencyAmount)(e.Amount)&&e.Holder)throw new r.ValidationError("Clawback: cannot have Holder for currency");if((0,i.isMPTAmount)(e.Amount)&&!e.Holder)throw new r.ValidationError("Clawback: missing Holder")}},5907:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.walletFromSecretNumbers=void 0;const i=n(3767),o=r(n(5970)),s=n(5274);t.walletFromSecretNumbers=function(e,t){var n;const r=new i.Account(e).getFamilySeed(),a={masterAddress:void 0,algorithm:void 0};return void 0===t?a.algorithm=o.default.secp256k1:(a.masterAddress=t.masterAddress,a.algorithm=null!==(n=t.algorithm)&&void 0!==n?n:o.default.secp256k1),s.Wallet.fromSecret(r,a)}},5943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_256=t.SHA512_256=t.sha512_224=t.SHA512_224=t.sha384=t.SHA384=t.sha512=t.SHA512=void 0;const r=n(4233);t.SHA512=r.SHA512,t.sha512=r.sha512,t.SHA384=r.SHA384,t.sha384=r.sha384,t.SHA512_224=r.SHA512_224,t.sha512_224=r.sha512_224,t.SHA512_256=r.SHA512_256,t.sha512_256=r.sha512_256},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Currency=void 0;const r=n(7284),i=n(619),o=/^0{40}$/,s=/^[A-Z0-9a-z?!@#$%^&*(){}[\]|]{3}$/,a=/^[A-F0-9]{40}$/,c=/^0{24}[\x00-\x7F]{6}0{10}$/;function l(e){if(!function(e){return e instanceof Uint8Array?20===e.byteLength:function(e){return 3===e.length||(t=e,a.test(t));var t}(e)}(e))throw new Error(`Unsupported Currency representation: ${e}`);return 3===e.length?function(e){const t=new Uint8Array(20);if("XRP"!==e){const n=e.split("").map(e=>e.charCodeAt(0));t.set(n,12)}return t}(e):(0,i.hexToBytes)(e)}class u extends r.Hash160{constructor(e){super(null!=e?e:u.XRP.bytes);const t=(0,i.bytesToHex)(this.bytes);o.test(t)?this._iso="XRP":c.test(t)?this._iso=function(e){const t=(0,i.hexToString)((0,i.bytesToHex)(e));return"XRP"===t?null:function(e){return s.test(e)}(t)?t:null}(this.bytes.slice(12,15)):this._iso=null}iso(){return this._iso}static from(e){if(e instanceof u)return e;if("string"==typeof e)return new u(l(e));throw new Error("Cannot construct Currency from value given")}toJSON(){const e=this.iso();return null!==e?e:(0,i.bytesToHex)(this.bytes)}}t.Currency=u,u.XRP=new u(new Uint8Array(20))},5970:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ed25519="ed25519",e.secp256k1="ecdsa-secp256k1"}(n||(n={})),t.default=n},5998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenAcceptOffer=void 0;const r=n(255),i=n(2794);t.validateNFTokenAcceptOffer=function(e){if((0,i.validateBaseTransaction)(e),null!=e.NFTokenBrokerFee&&function(e){const t=(0,i.parseAmountValue)(e.NFTokenBrokerFee);if(Number.isNaN(t))throw new r.ValidationError("NFTokenAcceptOffer: invalid NFTokenBrokerFee");if(t<=0)throw new r.ValidationError("NFTokenAcceptOffer: NFTokenBrokerFee must be greater than 0; omit if there is no fee");if(null==e.NFTokenSellOffer||null==e.NFTokenBuyOffer)throw new r.ValidationError("NFTokenAcceptOffer: both NFTokenSellOffer and NFTokenBuyOffer must be set if using brokered mode")}(e),null==e.NFTokenSellOffer&&null==e.NFTokenBuyOffer)throw new r.ValidationError("NFTokenAcceptOffer: must set either NFTokenSellOffer or NFTokenBuyOffer")}},6085:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},o={key:r,value:e[r]};return n(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,s;if(Array.isArray(t)){for(s="[",n=0;n<t.length;n++)n&&(s+=","),s+=e(t[n])||"null";return s+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=o.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(s="",n=0;n<c.length;n++){var l=c[n],u=e(t[l]);u&&(s&&(s+=","),s+=JSON.stringify(l)+":"+u)}return o.splice(a,1),"{"+s+"}"}}(e)}},6181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTrustSet=t.TrustSetFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfSetfAuth=65536]="tfSetfAuth",e[e.tfSetNoRipple=131072]="tfSetNoRipple",e[e.tfClearNoRipple=262144]="tfClearNoRipple",e[e.tfSetFreeze=1048576]="tfSetFreeze",e[e.tfClearFreeze=2097152]="tfClearFreeze",e[e.tfSetDeepFreeze=4194304]="tfSetDeepFreeze",e[e.tfClearDeepFreeze=8388608]="tfClearDeepFreeze"}(o||(t.TrustSetFlags=o={})),t.validateTrustSet=function(e){(0,i.validateBaseTransaction)(e);const{LimitAmount:t,QualityIn:n,QualityOut:o}=e;if(void 0===t)throw new r.ValidationError("TrustSet: missing field LimitAmount");if(!(0,i.isAmount)(t))throw new r.ValidationError("TrustSet: invalid LimitAmount");if(void 0!==n&&"number"!=typeof n)throw new r.ValidationError("TrustSet: QualityIn must be a number");if(void 0!==o&&"number"!=typeof o)throw new r.ValidationError("TrustSet: QualityOut must be a number")}},6202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(5492);class i extends r.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(e);const n=(0,r.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),(0,r.clean)(o)}update(e){return(0,r.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,r.aexists)(this),(0,r.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,n)=>new i(e,t).update(n).digest(),t.hmac.create=(e,t)=>new i(e,t)},6214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMDeposit=t.AMMDepositFlags=void 0;const r=n(255),i=n(2794);var o;!function(e){e[e.tfLPToken=65536]="tfLPToken",e[e.tfSingleAsset=524288]="tfSingleAsset",e[e.tfTwoAsset=1048576]="tfTwoAsset",e[e.tfOneAssetLPToken=2097152]="tfOneAssetLPToken",e[e.tfLimitLPToken=4194304]="tfLimitLPToken",e[e.tfTwoAssetIfEmpty=8388608]="tfTwoAssetIfEmpty"}(o||(t.AMMDepositFlags=o={})),t.validateAMMDeposit=function(e){if((0,i.validateBaseTransaction)(e),null==e.Asset)throw new r.ValidationError("AMMDeposit: missing field Asset");if(!(0,i.isIssuedCurrency)(e.Asset))throw new r.ValidationError("AMMDeposit: Asset must be a Currency");if(null==e.Asset2)throw new r.ValidationError("AMMDeposit: missing field Asset2");if(!(0,i.isIssuedCurrency)(e.Asset2))throw new r.ValidationError("AMMDeposit: Asset2 must be a Currency");if(null!=e.Amount2&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set Amount with Amount2");if(null!=e.EPrice&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set Amount with EPrice");if(null==e.LPTokenOut&&null==e.Amount)throw new r.ValidationError("AMMDeposit: must set at least LPTokenOut or Amount");if(null!=e.LPTokenOut&&!(0,i.isIssuedCurrencyAmount)(e.LPTokenOut))throw new r.ValidationError("AMMDeposit: LPTokenOut must be an IssuedCurrencyAmount");if(null!=e.Amount&&!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMDeposit: Amount must be an Amount");if(null!=e.Amount2&&!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMDeposit: Amount2 must be an Amount");if(null!=e.EPrice&&!(0,i.isAmount)(e.EPrice))throw new r.ValidationError("AMMDeposit: EPrice must be an Amount")}},6228:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashStateTree=t.hashTxTree=t.hashLedgerHeader=t.hashSignedTx=void 0;const a=n(619),c=s(n(735)),l=n(5620),u=n(255),d=n(2794),f=n(99),h=s(n(9373)),g=s(n(2530)),p=o(n(3122));function y(e,t){return Number(e).toString(16).padStart(2*t,"0")}function m(e){const t=e.length/2;if(t<=192)return(0,a.bytesToHex)([t])+e;if(t<=12480){const n=t-193;return(0,a.bytesToHex)([193+(n>>>8),255&n])+e}if(t<=918744){const n=t-12481;return(0,a.bytesToHex)([241+(n>>>16),n>>>8&255,255&n])+e}throw new u.XrplError("Variable integer overflow.")}function b(e){let t,n;if("string"==typeof e?(t=e,n=(0,l.decode)(e)):(t=(0,l.encode)(e),n=e),void 0===n.TxnSignature&&void 0===n.Signers&&void 0===n.SigningPubKey&&!(0,f.hasFlag)(n,d.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new u.ValidationError("The transaction must be signed to hash it.");const r=h.default.TRANSACTION_ID.toString(16).toUpperCase();return(0,g.default)(r.concat(t))}function E(e){const t=h.default.LEDGER.toString(16).toUpperCase()+y(Number(e.ledger_index),4)+(n=e.total_coins,new c.default(n).toString(16).padStart(16,"0"))+e.parent_hash+e.transaction_hash+e.account_hash+y(e.parent_close_time,4)+y(e.close_time,4)+y(e.close_time_resolution,1)+y(e.close_flags,1);var n;return(0,g.default)(t)}function w(e){var t;const n=new p.default;for(const r of e){const e=(0,l.encode)(r),i=(0,l.encode)(null!==(t=r.metaData)&&void 0!==t?t:{}),o=b(e),s=m(e)+m(i);n.addItem(o,s,p.NodeType.TRANSACTION_METADATA)}return n.hash}function A(e){const t=new p.default;return e.forEach(e=>{const n=(0,l.encode)(e);t.addItem(e.index,n,p.NodeType.ACCOUNT_STATE)}),t.hash}function S(e,t){const{transaction_hash:n}=e;if(!t.computeTreeHashes)return n;if(null==e.transactions)throw new u.ValidationError("transactions is missing from the ledger");const r=w(e.transactions);if(n!==r)throw new u.ValidationError("transactionHash in header does not match computed hash of transactions",{transactionHashInHeader:n,computedHashOfTransactions:r});return r}function v(e,t){const{account_hash:n}=e;if(!t.computeTreeHashes)return n;if(null==e.accountState)throw new u.ValidationError("accountState is missing from the ledger");const r=A(e.accountState);if(n!==r)throw new u.ValidationError("stateHash in header does not match computed hash of state");return r}t.hashSignedTx=b,t.hashLedgerHeader=E,t.hashTxTree=w,t.hashStateTree=A,t.default=function(e,t={}){const n={transaction_hash:S(e,t),account_hash:v(e,t)};return E(Object.assign(Object.assign({},e),n))}},6237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCheckCancel=void 0;const r=n(255),i=n(2794);t.validateCheckCancel=function(e){if((0,i.validateBaseTransaction)(e),void 0!==e.CheckID&&"string"!=typeof e.CheckID)throw new r.ValidationError("CheckCancel: invalid CheckID")}},6333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidXAddress=t.decodeXAddress=t.xAddressToClassicAddress=t.encodeXAddress=t.classicAddressToXAddress=t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const r=n(619),i=n(5516);Object.defineProperty(t,"codec",{enumerable:!0,get:function(){return i.codec}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}});const o={main:Uint8Array.from([5,68]),test:Uint8Array.from([4,147])};function s(e,t,n){if(20!==e.length)throw new Error("Account ID must be 20 bytes");if(!1!==t&&t>4294967295)throw new Error("Invalid tag");const s=t||0,a=!1===t||null==t?0:1,c=(0,r.concat)([n?o.test:o.main,e,Uint8Array.from([a,255&s,s>>8&255,s>>16&255,s>>24&255,0,0,0,0])]);return i.codec.encodeChecked(c)}function a(e){const t=i.codec.decodeChecked(e),n=function(e){const t=e.slice(0,2);if((0,r.equal)(o.main,t))return!1;if((0,r.equal)(o.test,t))return!0;throw new Error("Invalid X-address: bad prefix")}(t);return{accountId:t.slice(2,22),tag:function(e){const t=e[22];if(t>=2)throw new Error("Unsupported X-address");if(1===t)return e[23]+256*e[24]+65536*e[25]+16777216*e[26];if(0!==t)throw new Error("flag must be zero to indicate no tag");if(!(0,r.equal)((0,r.hexToBytes)("0000000000000000"),e.slice(23,31)))throw new Error("remaining bytes must be zero");return!1}(t),test:n}}t.classicAddressToXAddress=function(e,t,n){return s((0,i.decodeAccountID)(e),t,n)},t.encodeXAddress=s,t.xAddressToClassicAddress=function(e){const{accountId:t,tag:n,test:r}=a(e);return{classicAddress:(0,i.encodeAccountID)(t),tag:n,test:r}},t.decodeXAddress=a,t.isValidXAddress=function(e){try{a(e)}catch(e){return!1}return!0}},6339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHex=t.convertHexToString=void 0;const r=n(619);t.convertStringToHex=function(e){return(0,r.stringToHex)(e)},t.convertHexToString=function(e,t="utf8"){return(0,r.hexToString)(e,t)}},6362:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBalances=void 0,t.formatBalances=function(e){return e.map(e=>({value:e.balance,currency:e.currency,issuer:e.account}))}},6509:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(735)),s=n(255);t.default=function(e,t){var n,i;return r(this,void 0,void 0,function*(){const r=null!=t?t:e.feeCushion,a=(yield e.request({command:"server_info"})).result.info,c=null===(n=a.validated_ledger)||void 0===n?void 0:n.base_fee_xrp;if(null==c)throw new s.XrplError("getFeeXrp: Could not get base_fee_xrp from server_info");const l=new o.default(c);null!==(i=a.load_factor)&&void 0!==i||(a.load_factor=1);let u=l.times(a.load_factor).times(r);return u=o.default.min(u,e.maxFeeXRP),new o.default(u.toFixed(6)).toString(10)})}},6557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const r=n(1026);t.RIPEMD160=r.RIPEMD160,t.ripemd160=r.ripemd160},6657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=s,t.createCurve=function(e,t){const n=t=>(0,o.weierstrass)({...e,...s(t)});return{...n(t),create:n}};const r=n(3795),i=n(9987),o=n(4296);function s(e){return{hash:e,hmac:(t,...n)=>(0,r.hmac)(e,t,(0,i.concatBytes)(...n)),randomBytes:i.randomBytes}}},6667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=E,t.fromBig=i,t.split=o;const n=BigInt(2**32-1),r=BigInt(32);function i(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function o(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:n,l:a}=i(e[s],t);[r[s],o[s]]=[n,a]}return[r,o]}const s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const l=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=l;const u=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=u;const d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;const f=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const g=(e,t)=>e;t.rotr32L=g;const p=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=p;const y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;const m=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=m;const b=(e,t,n)=>e<<n-32|t>>>64-n;function E(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}t.rotlBL=b;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const A=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=A;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=S;const v=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;t.add4H=v;const T=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);t.add5L=T;const O=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;t.add5H=O;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:l,rotrSL:u,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:g,rotlSH:p,rotlSL:y,rotlBH:m,rotlBL:b,add:E,add3L:w,add3H:A,add4L:S,add4H:v,add5H:O,add5L:T};t.default=I},6670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5620),i=n(3342);t.default=function(e){if("string"!=typeof e&&void 0===(null==e?void 0:e.AffectedNodes))throw new TypeError(`Unable to parse the parameter given to getNFTokenID.\n 'meta' must be the metadata from an NFTokenMint transaction. Received ${JSON.stringify(e)} instead.`);const t=function(e){return"string"==typeof e?(0,r.decode)(e):e}(e).AffectedNodes.filter(e=>{var t;return(0,i.isCreatedNode)(e)?"NFTokenPage"===e.CreatedNode.LedgerEntryType:!!(0,i.isModifiedNode)(e)&&"NFTokenPage"===e.ModifiedNode.LedgerEntryType&&Boolean(null===(t=e.ModifiedNode.PreviousFields)||void 0===t?void 0:t.NFTokens)}),n=new Set(t.flatMap(e=>{var t;return((0,i.isModifiedNode)(e)?null===(t=e.ModifiedNode.PreviousFields)||void 0===t?void 0:t.NFTokens:[]).map(e=>e.NFToken.NFTokenID)}).filter(e=>Boolean(e)));return t.flatMap(e=>{var t,n,r,i,o,s;return(null!==(s=null!==(r=null===(n=null===(t=e.ModifiedNode)||void 0===t?void 0:t.FinalFields)||void 0===n?void 0:n.NFTokens)&&void 0!==r?r:null===(o=null===(i=e.CreatedNode)||void 0===i?void 0:i.NewFields)||void 0===o?void 0:o.NFTokens)&&void 0!==s?s:[]).map(e=>e.NFToken.NFTokenID)}).filter(e=>Boolean(e)).find(e=>!n.has(e))}},6695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBatch=t.BatchFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfAllOrNothing=65536]="tfAllOrNothing",e[e.tfOnlyOne=131072]="tfOnlyOne",e[e.tfUntilFailure=262144]="tfUntilFailure",e[e.tfIndependent=524288]="tfIndependent"}(s||(t.BatchFlags=s={})),t.validateBatch=function(e){var t;(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"RawTransactions",o.isArray),e.RawTransactions.forEach((e,t)=>{if(!(0,o.isRecord)(e))throw new r.ValidationError(`Batch: RawTransactions[${t}] is not object.`);(0,o.validateRequiredField)(e,"RawTransaction",o.isRecord,{paramName:`RawTransactions[${t}].RawTransaction`,txType:"Batch"}),function(e,t){if("Batch"===e.TransactionType)throw new r.ValidationError(`Batch: RawTransactions[${t}] is a Batch transaction. Cannot nest Batch transactions.`);if(!(0,i.hasFlag)(e,o.GlobalFlags.tfInnerBatchTxn,"tfInnerBatchTxn"))throw new r.ValidationError(`Batch: RawTransactions[${t}] must contain the \`tfInnerBatchTxn\` flag.`);(0,o.validateOptionalField)(e,"Fee",(0,o.isValue)("0"),{paramName:`RawTransactions[${t}].RawTransaction.Fee`,txType:"Batch"}),(0,o.validateOptionalField)(e,"SigningPubKey",(0,o.isValue)(""),{paramName:`RawTransactions[${t}].RawTransaction.SigningPubKey`,txType:"Batch"}),(0,o.validateOptionalField)(e,"TxnSignature",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.TxnSignature`,txType:"Batch"}),(0,o.validateOptionalField)(e,"Signers",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.Signers`,txType:"Batch"}),(0,o.validateOptionalField)(e,"LastLedgerSequence",o.isNull,{paramName:`RawTransactions[${t}].RawTransaction.LastLedgerSequence`,txType:"Batch"})}(e.RawTransaction,t)}),(0,o.validateOptionalField)(e,"BatchSigners",o.isArray),null===(t=e.BatchSigners)||void 0===t||t.forEach((e,t)=>{if(!(0,o.isRecord)(e))throw new r.ValidationError(`Batch: BatchSigners[${t}] is not object.`);const n=e;(0,o.validateRequiredField)(n,"BatchSigner",o.isRecord,{paramName:`BatchSigners[${t}].BatchSigner`,txType:"Batch"});const i=n.BatchSigner;(0,o.validateRequiredField)(i,"Account",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.Account`,txType:"Batch"}),(0,o.validateOptionalField)(i,"SigningPubKey",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.SigningPubKey`,txType:"Batch"}),(0,o.validateOptionalField)(i,"TxnSignature",o.isString,{paramName:`BatchSigners[${t}].BatchSigner.TxnSignature`,txType:"Batch"}),(0,o.validateOptionalField)(i,"Signers",o.isArray,{paramName:`BatchSigners[${t}].BatchSigner.Signers`,txType:"Batch"})})}},6769:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialDelete=void 0;const r=n(255),i=n(2794);t.validateCredentialDelete=function(e){if((0,i.validateBaseTransaction)(e),!e.Subject&&!e.Issuer)throw new r.ValidationError("CredentialDelete: either `Issuer` or `Subject` must be provided");(0,i.validateRequiredField)(e,"Account",i.isString),(0,i.validateCredentialType)(e),(0,i.validateOptionalField)(e,"Subject",i.isString),(0,i.validateOptionalField)(e,"Issuer",i.isString)}},6897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,n){return e&t^~e&n},t.Maj=function(e,t,n){return e&t^e&n^t&n};const r=n(5492);function i(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,l=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+l,a,r)}class o extends r.Hash{constructor(e,t,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){(0,r.aexists)(this),e=(0,r.toBytes)(e),(0,r.abytes)(e);const{view:t,buffer:n,blockLen:i}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const t=(0,r.createView)(e);for(;i<=o-s;s+=i)this.process(t,s);continue}n.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,(0,r.clean)(this.buffer.subarray(a)),this.padOffset>o-a&&(this.process(n,0),a=0);for(let e=a;e<o;e++)t[e]=0;i(n,o-8,BigInt(8*this.length),s),this.process(n,0);const c=(0,r.createView)(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)c.setUint32(4*e,d[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}t.HashMD=o,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},6905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash192=void 0;const r=n(3776);class i extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=i.ZERO_192.bytes),super(null!=e?e:i.ZERO_192.bytes)}}t.Hash192=i,i.width=24,i.ZERO_192=new i(new Uint8Array(i.width))},6986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=t.UInt64=t.UInt32=t.UInt16=t.UInt8=t.STObject=t.STArray=t.PathSet=t.Hash256=t.Hash192=t.Hash160=t.Hash128=t.Currency=t.Blob=t.Amount=t.AccountID=t.coreTypes=void 0;const r=n(5763);Object.defineProperty(t,"AccountID",{enumerable:!0,get:function(){return r.AccountID}});const i=n(9492);Object.defineProperty(t,"Amount",{enumerable:!0,get:function(){return i.Amount}});const o=n(5755);Object.defineProperty(t,"Blob",{enumerable:!0,get:function(){return o.Blob}});const s=n(5967);Object.defineProperty(t,"Currency",{enumerable:!0,get:function(){return s.Currency}});const a=n(24);Object.defineProperty(t,"Hash128",{enumerable:!0,get:function(){return a.Hash128}});const c=n(7284);Object.defineProperty(t,"Hash160",{enumerable:!0,get:function(){return c.Hash160}});const l=n(6905);Object.defineProperty(t,"Hash192",{enumerable:!0,get:function(){return l.Hash192}});const u=n(8264);Object.defineProperty(t,"Hash256",{enumerable:!0,get:function(){return u.Hash256}});const d=n(1837),f=n(8741),h=n(3914);Object.defineProperty(t,"PathSet",{enumerable:!0,get:function(){return h.PathSet}});const g=n(8239);Object.defineProperty(t,"STArray",{enumerable:!0,get:function(){return g.STArray}});const p=n(8847);Object.defineProperty(t,"STObject",{enumerable:!0,get:function(){return p.STObject}});const y=n(1366);Object.defineProperty(t,"UInt16",{enumerable:!0,get:function(){return y.UInt16}});const m=n(4200);Object.defineProperty(t,"UInt32",{enumerable:!0,get:function(){return m.UInt32}});const b=n(5463);Object.defineProperty(t,"UInt64",{enumerable:!0,get:function(){return b.UInt64}});const E=n(401);Object.defineProperty(t,"UInt8",{enumerable:!0,get:function(){return E.UInt8}});const w=n(3719);Object.defineProperty(t,"Vector256",{enumerable:!0,get:function(){return w.Vector256}});const A=n(2911),S=n(1141),v={AccountID:r.AccountID,Amount:i.Amount,Blob:o.Blob,Currency:s.Currency,Hash128:a.Hash128,Hash160:c.Hash160,Hash192:l.Hash192,Hash256:u.Hash256,Issue:d.Issue,Number:f.STNumber,PathSet:h.PathSet,STArray:g.STArray,STObject:p.STObject,UInt8:E.UInt8,UInt16:y.UInt16,UInt32:m.UInt32,UInt64:b.UInt64,Vector256:w.Vector256,XChainBridge:A.XChainBridge};t.coreTypes=v,S.DEFAULT_DEFINITIONS.associateTypes(v)},6998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;const r=n(4233);t.SHA256=r.SHA256,t.sha256=r.sha256,t.SHA224=r.SHA224,t.sha224=r.sha224},7074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEE_SETTINGS_ID=void 0,t.FEE_SETTINGS_ID="4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651"},7118:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowCancel=void 0;const r=n(255),i=n(2794);t.validateEscrowCancel=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Owner",i.isAccount),null==e.OfferSequence)throw new r.ValidationError("EscrowCancel: missing OfferSequence");if("number"!=typeof e.OfferSequence&&"string"!=typeof e.OfferSequence||Number.isNaN(Number(e.OfferSequence)))throw new r.ValidationError("EscrowCancel: OfferSequence must be a number")}},7234:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.requestFunding=t.getStartingBalance=t.generateWalletToFund=void 0;const i=n(6333),o=n(255),s=n(4202),a=n(5274);t.generateWalletToFund=function(e){return e&&(0,i.isValidClassicAddress)(e.classicAddress)?e:a.Wallet.generate()},t.getStartingBalance=function(e,t){return r(this,void 0,void 0,function*(){let n=0;try{n=Number(yield e.getXrpBalance(t))}catch(e){}return n})},t.requestFunding=function(e,t,n,i,a){var c,l,u;return r(this,void 0,void 0,function*(){const d=null!==(c=e.faucetHost)&&void 0!==c?c:(0,s.getFaucetHost)(t);if(!d)throw new o.XRPLFaucetError("No faucet hostname could be derived");const f=null!==(l=e.faucetPath)&&void 0!==l?l:(0,s.getFaucetPath)(d),h=yield fetch(`https://${d}${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),g=yield h.json();if(h.ok&&(null===(u=h.headers.get("Content-Type"))||void 0===u?void 0:u.startsWith("application/json"))){const e=g.account.classicAddress;return function(e,t,n,i){return r(this,void 0,void 0,function*(){if(!t)return Promise.reject(new o.XRPLFaucetError("The faucet account is undefined"));const s=yield function(e,t,n){return r(this,void 0,void 0,function*(){return new Promise((i,s)=>{let a=20;const c=setInterval(()=>r(this,void 0,void 0,function*(){a<0?(clearInterval(c),i(n)):a-=1;try{let r;try{r=Number(yield e.getXrpBalance(t))}catch(e){}r>n&&(clearInterval(c),i(r))}catch(e){clearInterval(c),e instanceof Error&&s(new o.XRPLFaucetError(`Unable to check if the address ${t} balance has increased. Error: ${e.message}`)),s(e)}}),1e3)})})}(e,t,i);if(s>i)return{wallet:n,balance:s};throw new o.XRPLFaucetError("Unable to fund address with faucet after waiting 20 seconds")})}(t,e,i,n)}return function(e,t){return r(this,void 0,void 0,function*(){return Promise.reject(new o.XRPLFaucetError(`Request failed: ${JSON.stringify({body:null!=t?t:{},contentType:e.headers.get("Content-Type"),statusCode:e.status})}`))})}(h,g)})}},7284:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash160=void 0;const r=n(3776);class i extends r.Hash{constructor(e){e&&0===e.byteLength&&(e=i.ZERO_160.bytes),super(null!=e?e:i.ZERO_160.bytes)}}t.Hash160=i,i.width=20,i.ZERO_160=new i(new Uint8Array(i.width))},7315:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateEscrowFinish=void 0;const r=n(255),i=n(2794);t.validateEscrowFinish=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateRequiredField)(e,"Owner",i.isAccount),(0,i.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,i.MAX_AUTHORIZED_CREDENTIALS),null==e.OfferSequence)throw new r.ValidationError("EscrowFinish: missing field OfferSequence");if("number"!=typeof e.OfferSequence&&"string"!=typeof e.OfferSequence||Number.isNaN(Number(e.OfferSequence)))throw new r.ValidationError("EscrowFinish: OfferSequence must be a number");if(void 0!==e.Condition&&"string"!=typeof e.Condition)throw new r.ValidationError("EscrowFinish: Condition must be a string");if(void 0!==e.Fulfillment&&"string"!=typeof e.Fulfillment)throw new r.ValidationError("EscrowFinish: Fulfillment must be a string")}},7375:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPrefix=void 0;const r=n(5517);function i(e){const t=new Uint8Array(4);return(0,r.writeUInt32BE)(t,e,0),t}const o={transactionID:i(1415073280),transaction:i(1397638144),accountStateEntry:i(1296846336),innerNode:i(1296649728),ledgerHeader:i(1280791040),transactionSig:i(1398036480),transactionMultiSig:i(1397576704),validation:i(1447119872),proposal:i(1347571712),paymentChannelClaim:i(1129073920),batch:i(1111705600)};t.HashPrefix=o},7377:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const i=n(6998),o=r(n(2635));t.sha256=(0,o.default)(i.sha256)},7410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.Sha512Half=void 0;const r=n(7375),i=n(6986),o=n(7995),s=n(2896);class a extends o.BytesList{constructor(){super(...arguments),this.hash=s.sha512.create()}static put(e){return(new a).put(e)}put(e){return this.hash.update(e),this}finish256(){return Uint8Array.from(this.hash.digest().slice(0,32))}finish(){return new i.Hash256(this.finish256())}}function c(...e){const t=new a;return e.forEach(e=>t.put(e)),t.finish256()}t.Sha512Half=a,t.sha512Half=c,t.transactionID=function(e){return new i.Hash256(c(r.HashPrefix.transactionID,e))}},7493:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAmendmentFlags=void 0,function(e){e[e.tfGotMajority=65536]="tfGotMajority",e[e.tfLostMajority=131072]="tfLostMajority"}(n||(t.EnableAmendmentFlags=n={}))},7636:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenModify=void 0;const r=n(255),i=n(99),o=n(2794);t.validateNFTokenModify=function(e){if((0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"NFTokenID",o.isString),(0,o.validateOptionalField)(e,"Owner",o.isAccount),(0,o.validateOptionalField)(e,"URI",o.isString),void 0!==e.URI&&"string"==typeof e.URI){if(""===e.URI)throw new r.ValidationError("NFTokenModify: URI must not be empty string");if(!(0,i.isHex)(e.URI))throw new r.ValidationError("NFTokenModify: URI must be in hex format")}}},7663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=t.utf8ToBytes=t.randomBytes=t.isBytes=t.hexToBytes=t.concatBytes=t.bytesToUtf8=t.bytesToHex=t.anumber=t.abytes=void 0,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t._abool2=function(e,t=""){if("boolean"!=typeof e)throw new Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e},t._abytes2=function(e,t,n=""){const i=(0,r.isBytes)(e),o=e?.length,s=void 0!==t;if(!i||s&&o!==t)throw new Error((n&&`"${n}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(i?`length=${o}`:"type="+typeof e));return e},t.numberToHexUnpadded=a,t.hexToNumber=c,t.bytesToNumberBE=function(e){return c((0,r.bytesToHex)(e))},t.bytesToNumberLE=function(e){return(0,r.abytes)(e),c((0,r.bytesToHex)(Uint8Array.from(e).reverse()))},t.numberToBytesBE=l,t.numberToBytesLE=function(e,t){return l(e,t).reverse()},t.numberToVarBytesBE=function(e){return(0,r.hexToBytes)(a(e))},t.ensureBytes=function(e,t,n){let i;if("string"==typeof t)try{i=(0,r.hexToBytes)(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!(0,r.isBytes)(t))throw new Error(e+" must be hex string or Uint8Array");i=Uint8Array.from(t)}const o=i.length;if("number"==typeof n&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return i},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},t.copyBytes=function(e){return Uint8Array.from(e)},t.asciiToBytes=function(e){return Uint8Array.from(e,(t,n)=>{const r=t.charCodeAt(0);if(1!==t.length||r>127)throw new Error(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})},t.inRange=d,t.aInRange=function(e,t,n,r){if(!d(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>o;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,n){return e|(n?s:o)<<BigInt(t)},t.createHmacDrbg=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");const i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let s=i(e),a=i(e),c=0;const l=()=>{s.fill(1),a.fill(0),c=0},u=(...e)=>n(a,s,...e),d=(e=i(0))=>{a=u(o(0),e),s=u(),0!==e.length&&(a=u(o(1),e),s=u())},f=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){s=u();const t=s.slice();n.push(t),e+=s.length}return(0,r.concatBytes)(...n)};return(e,t)=>{let n;for(l(),d(e);!(n=t(f()));)d();return l(),n}},t.validateObject=function(e,t,n={}){const r=(t,n,r)=>{const i=f[n];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(r&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+o)};for(const[e,n]of Object.entries(t))r(e,n,!1);for(const[e,t]of Object.entries(n))r(e,t,!0);return e},t.isHash=function(e){return"function"==typeof e&&Number.isSafeInteger(e.outputLen)},t._validateObject=function(e,t,n={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const o=typeof i;if(o!==n||null===i)throw new Error(`param "${t}" is invalid: expected ${n}, got ${o}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))},t.memoized=function(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}};const r=n(5492);var i=n(5492);Object.defineProperty(t,"abytes",{enumerable:!0,get:function(){return i.abytes}}),Object.defineProperty(t,"anumber",{enumerable:!0,get:function(){return i.anumber}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"bytesToUtf8",{enumerable:!0,get:function(){return i.bytesToUtf8}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return i.hexToBytes}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}});const o=BigInt(0),s=BigInt(1);function a(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?o:BigInt("0x"+e)}function l(e,t){return(0,r.hexToBytes)(e.toString(16).padStart(2*t,"0"))}const u=e=>"bigint"==typeof e&&o<=e;function d(e,t,n){return u(e)&&u(t)&&u(n)&&t<=e&&e<n}t.bitMask=e=>(s<<BigInt(e))-s;const f={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||(0,r.isBytes)(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},7688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenCancelOffer=void 0;const r=n(255),i=n(2794);t.validateNFTokenCancelOffer=function(e){if((0,i.validateBaseTransaction)(e),!(0,i.isArray)(e.NFTokenOffers))throw new r.ValidationError("NFTokenCancelOffer: missing field NFTokenOffers");if(e.NFTokenOffers.length<1)throw new r.ValidationError("NFTokenCancelOffer: empty field NFTokenOffers")}},7698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCredentialCreate=void 0;const r=n(619),i=n(255),o=n(2794);t.validateCredentialCreate=function(e){(0,o.validateBaseTransaction)(e),(0,o.validateRequiredField)(e,"Account",o.isString),(0,o.validateRequiredField)(e,"Subject",o.isString),(0,o.validateCredentialType)(e),(0,o.validateOptionalField)(e,"Expiration",o.isNumber),function(e){if(void 0!==e){if("string"!=typeof e)throw new i.ValidationError("CredentialCreate: invalid field URI");if(0===e.length)throw new i.ValidationError("CredentialCreate: URI cannot be an empty string");if(e.length>256)throw new i.ValidationError("CredentialCreate: URI length must be <= 256");if(!r.HEX_REGEX.test(e))throw new i.ValidationError("CredentialCreate: URI must be encoded in hex")}}(e.URI)}},7765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.montgomery=function(e){const t=(h=e,(0,i.validateObject)(h,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...h})),{P:n}=t,a=e=>(0,r.mod)(e,n),c=t.montgomeryBits,l=Math.ceil(c/8),u=t.nByteLength,d=t.adjustScalarBytes||(e=>e),f=t.powPminus2||(e=>(0,r.pow)(e,n-BigInt(2),n));var h;function g(e,t,n){const r=a(e*(t-n));return[t=a(t-r),n=a(n+r)]}const p=(t.a-BigInt(2))/BigInt(4);function y(e){return(0,i.numberToBytesLE)(a(e),l)}function m(e,t){const r=function(e){const t=(0,i.ensureBytes)("u coordinate",e,l);return 32===u&&(t[31]&=127),(0,i.bytesToNumberLE)(t)}(t),h=function(e,t){(0,i.aInRange)("u",e,o,n),(0,i.aInRange)("scalar",t,o,n);const r=t,l=e;let u,d=s,h=o,y=e,m=s,b=o;for(let e=BigInt(c-1);e>=o;e--){const t=r>>e&s;b^=t,u=g(b,d,y),d=u[0],y=u[1],u=g(b,h,m),h=u[0],m=u[1],b=t;const n=d+h,i=a(n*n),o=d-h,c=a(o*o),f=i-c,E=y+m,w=a((y-m)*n),A=a(E*o),S=w+A,v=w-A;y=a(S*S),m=a(l*a(v*v)),d=a(i*c),h=a(f*(i+a(p*f)))}u=g(b,d,y),d=u[0],y=u[1],u=g(b,h,m),h=u[0],m=u[1];const E=f(h);return a(d*E)}(r,function(e){const t=(0,i.ensureBytes)("scalar",e),n=t.length;if(n!==l&&n!==u)throw new Error("invalid scalar, expected "+l+" or "+u+" bytes, got "+n);return(0,i.bytesToNumberLE)(d(t))}(e));if(h===o)throw new Error("invalid private or public key received");return y(h)}const b=y(t.Gu);function E(e){return m(e,b)}return{scalarMult:m,scalarMultBase:E,getSharedSecret:(e,t)=>m(e,t),getPublicKey:e=>E(e),utils:{randomPrivateKey:()=>t.randomBytes(t.nByteLength)},GuBytes:b}};const r=n(802),i=n(3449),o=BigInt(0),s=BigInt(1)},7831:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4315),t),i(n(7954),t)},7872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainAddAccountCreateAttestation=void 0;const r=n(2794);t.validateXChainAddAccountCreateAttestation=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Amount",r.isAmount),(0,r.validateRequiredField)(e,"AttestationRewardAccount",r.isAccount),(0,r.validateRequiredField)(e,"AttestationSignerAccount",r.isAccount),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateRequiredField)(e,"OtherChainSource",r.isAccount),(0,r.validateRequiredField)(e,"PublicKey",r.isString),(0,r.validateRequiredField)(e,"Signature",r.isString),(0,r.validateRequiredField)(e,"SignatureReward",r.isAmount),(0,r.validateRequiredField)(e,"WasLockingChainSend",e=>0===e||1===e),(0,r.validateRequiredField)(e,"XChainAccountCreateCount",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge)}},7899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AMENDMENTS_ID=void 0,t.AMENDMENTS_ID="7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4"},7954:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureClassicAddress=void 0;const r=n(6333);t.ensureClassicAddress=function(e){if((0,r.isValidXAddress)(e)){const{classicAddress:t,tag:n}=(0,r.xAddressToClassicAddress)(e);if(!1!==n)throw new Error("This command does not support the use of a tag. Use an address without a tag.");return t}return e}},7995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySerializer=t.BytesList=void 0;const r=n(619);class i{constructor(){this.bytesArray=[]}getLength(){return(0,r.concat)(this.bytesArray).byteLength}put(e){const t=Uint8Array.from(e);return this.bytesArray.push(t),this}toBytesSink(e){e.put(this.toBytes())}toBytes(){return(0,r.concat)(this.bytesArray)}toHex(){return(0,r.bytesToHex)(this.toBytes())}}t.BytesList=i,t.BinarySerializer=class{constructor(e){this.sink=new i,this.sink=e}write(e){e.toBytesSink(this.sink)}put(e){this.sink.put(e)}writeType(e,t){this.write(e.from(t))}writeBytesList(e){e.toBytesSink(this.sink)}encodeVariableLength(e){const t=new Uint8Array(3);if(e<=192)return t[0]=e,t.slice(0,1);if(e<=12480)return e-=193,t[0]=193+(e>>>8),t[1]=255&e,t.slice(0,2);if(e<=918744)return e-=12481,t[0]=241+(e>>>16),t[1]=e>>8&255,t[2]=255&e,t.slice(0,3);throw new Error("Overflow error")}writeFieldAndValue(e,t,n=!1){const r=e.associatedType.from(t);if(void 0===r.toBytesSink||void 0===e.name)throw new Error;this.sink.put(e.header),e.isVariableLengthEncoded?this.writeLengthEncoded(r,n):r.toBytesSink(this.sink)}writeLengthEncoded(e,t=!1){const n=new i;t||e.toBytesSink(n),this.put(this.encodeVariableLength(n.getLength())),this.writeBytesList(n)}}},8102:e=>{"use strict";e.exports=JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["PermissionValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":52,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt64"}],["SubjectNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt64"}],["LockedAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["VaultID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["ParentBatchID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":31,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["Delegate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"AccountID"}],["Number",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Number"}],["AssetsAvailable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Number"}],["AssetsMaximum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Number"}],["AssetsTotal",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Number"}],["LossUnrealized",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Number"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Permission",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"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"}],["Book",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["AdditionalBooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STArray"}],["UnauthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STArray"}],["AcceptedCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STArray"}],["Permissions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STArray"}],["RawTransactions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STArray"}],["BatchSigners",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":31,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["WithdrawalPolicy",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["ShareMPTID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"Credential":129,"DID":73,"Delegate":131,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"Vault":132,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLIMIT_EXCEEDED":195,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DELEGATE_PERMISSION":198,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPRECISION_LOSS":197,"tecPSEUDO_ACCOUNT":196,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecWRONG_ASSET":194,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temINVALID_INNER_BATCH":-250,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terADDRESS_COLLISION":-86,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"Batch":71,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialAccept":59,"CredentialCreate":58,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DelegateSet":64,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainDelete":63,"PermissionedDomainSet":62,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"VaultClawback":70,"VaultCreate":65,"VaultDelete":67,"VaultDeposit":68,"VaultSet":66,"VaultWithdraw":69,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"Number":9,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}')},8161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSecretString=t.checkChecksum=t.calculateChecksum=t.secretToEntropy=t.entropyToSecret=t.randomSecret=t.randomEntropy=void 0;const r=n(619);function i(){return(0,r.randomBytes)(16)}function o(e,t){return t*(2*e+1)%9}function s(e,t,n){let r,i;if("string"==typeof t){if(6!==t.length)throw new Error("value must have a length of 6");r=parseInt(t.slice(5),10),i=parseInt(t.slice(0,5),10)}else{if("number"!=typeof n)throw new Error("checksum must be a number when value is a number");r=n,i=t}return i*(2*e+1)%9===r}function a(e){const t=new Array(Math.ceil(e.length/2)),n=Array.from(t,(t,n)=>{const i=e.slice(2*n,2*(n+1)),s=parseInt((0,r.bytesToHex)(i),16);return"0".repeat(5-String(s).length)+String(s)+String(o(n,s))});if(8!==n.length)throw new Error("Chucks must have 8 digits");return n}t.randomEntropy=i,t.calculateChecksum=o,t.checkChecksum=s,t.entropyToSecret=a,t.randomSecret=function(){return a(i())},t.secretToEntropy=function(e){return(0,r.concat)(e.map((e,t)=>{const n=Number(e.slice(0,5)),i=Number(e.slice(5));if(6!==e.length)throw new Error("Invalid secret: number invalid");if(!s(t,n,i))throw new Error("Invalid secret part: checksum invalid");const o=`0000${n.toString(16)}`.slice(-4);return(0,r.hexToBytes)(o)}))},t.parseSecretString=function(e){const t=e.replace(/[^0-9]/gu,"");if(48!==t.length)throw new Error("Invalid secret string (should contain 8 blocks of 6 digits");return Array.from(new Array(8),(e,n)=>t.slice(6*n,6*(n+1)))}},8188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DELEGATABLE_PERMISSIONS_WIDTH=t.TRANSACTION_RESULT_WIDTH=t.TRANSACTION_TYPE_WIDTH=t.LEDGER_ENTRY_WIDTH=t.TYPE_WIDTH=void 0,t.TYPE_WIDTH=2,t.LEDGER_ENTRY_WIDTH=2,t.TRANSACTION_TYPE_WIDTH=2,t.TRANSACTION_RESULT_WIDTH=1,t.DELEGATABLE_PERMISSIONS_WIDTH=4},8213:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.quality=void 0;const i=n(6986),o=r(n(735)),s=n(619);t.quality=class{static encode(e){const t=(0,o.default)(e),n=((null==t?void 0:t.e)||0)-15,r=t.times("1e"+-n).abs().toString(),s=i.coreTypes.UInt64.from(BigInt(r)).toBytes();return s[0]=n+100,s}static decode(e){const t=(0,s.hexToBytes)(e).slice(-8),n=t[0]-100;return new o.default(`0x${(0,s.bytesToHex)(t.slice(1))}`).times(`1e${n}`)}}},8239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STArray=void 0;const r=n(1141),i=n(1275),o=n(8847),s=n(892),a=n(619),c=Uint8Array.from([241]),l="ArrayEndMarker",u=Uint8Array.from([225]);class d extends i.SerializedType{static fromParser(e){const t=[];for(;!e.end();){const n=e.readField();if(n.name===l)break;t.push(n.header,e.readFieldValue(n).toBytes(),u)}return t.push(c),new d((0,a.concat)(t))}static from(e,t=r.DEFAULT_DEFINITIONS){if(e instanceof d)return e;if(n=e,Array.isArray(n)&&n.every(e=>"object"==typeof e&&1===Object.keys(e).length&&"object"==typeof Object.values(e)[0])){const n=[];return e.forEach(e=>{n.push(o.STObject.from(e,void 0,t).toBytes())}),n.push(c),new d((0,a.concat)(n))}var n;throw new Error("Cannot construct STArray from value given")}toJSON(e=r.DEFAULT_DEFINITIONS){const t=[],n=new s.BinaryParser(this.toString(),e);for(;!n.end();){const r=n.readField();if(r.name===l)break;const i={};i[r.name]=o.STObject.fromParser(n).toJSON(e),t.push(i)}return t}}t.STArray=d},8264:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash256=void 0;const r=n(3776);class i extends r.Hash{constructor(e){super(null!=e?e:i.ZERO_256.bytes)}}t.Hash256=i,i.width=32,i.ZERO_256=new i(new Uint8Array(i.width))},8292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDIDSet=void 0;const r=n(255),i=n(2794);t.validateDIDSet=function(e){if((0,i.validateBaseTransaction)(e),(0,i.validateOptionalField)(e,"Data",i.isString),(0,i.validateOptionalField)(e,"DIDDocument",i.isString),(0,i.validateOptionalField)(e,"URI",i.isString),void 0===e.Data&&void 0===e.DIDDocument&&void 0===e.URI)throw new r.ValidationError("DIDSet: Must have at least one of `Data`, `DIDDocument`, and `URI`")}},8312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateXChainClaim=void 0;const r=n(2794);t.validateXChainClaim=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"XChainBridge",r.isXChainBridge),(0,r.validateRequiredField)(e,"XChainClaimID",e=>(0,r.isNumber)(e)||(0,r.isString)(e)),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateOptionalField)(e,"DestinationTag",r.isNumber),(0,r.validateRequiredField)(e,"Amount",r.isAmount)}},8377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDIDDelete=void 0;const r=n(2794);t.validateDIDDelete=function(e){(0,r.validateBaseTransaction)(e)}},8390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShaMapLeaf=t.ShaMapNode=t.ShaMap=void 0;const r=n(6986),i=n(7375),o=n(7410);class s{}t.ShaMapNode=s;class a extends s{constructor(e,t){super(),this.index=e,this.item=t}isLeaf(){return!0}isInner(){return!1}hashPrefix(){return void 0===this.item?new Uint8Array(0):this.item.hashPrefix()}hash(){const e=o.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}toBytesSink(e){void 0!==this.item&&this.item.toBytesSink(e),this.index.toBytesSink(e)}}t.ShaMapLeaf=a;class c extends s{constructor(e=0){super(),this.depth=e,this.slotBits=0,this.branches=Array(16)}isInner(){return!0}isLeaf(){return!1}hashPrefix(){return i.HashPrefix.innerNode}setBranch(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t}empty(){return 0===this.slotBits}hash(){if(this.empty())return r.coreTypes.Hash256.ZERO_256;const e=o.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}toBytesSink(e){for(let t=0;t<this.branches.length;t++){const n=this.branches[t];(n?n.hash():r.coreTypes.Hash256.ZERO_256).toBytesSink(e)}}addItem(e,t,n){if(void 0===e)throw new Error;if(void 0!==e){const r=e.nibblet(this.depth),i=this.branches[r];if(void 0===i)this.setBranch(r,n||new a(e,t));else if(i instanceof a){const o=new c(this.depth+1);o.addItem(i.index,void 0,i),o.addItem(e,t,n),this.setBranch(r,o)}else{if(!(i instanceof c))throw new Error("invalid ShaMap.addItem call");i.addItem(e,t,n)}}}}t.ShaMap=class extends c{}},8413:e=>{"use strict";e.exports=JSON.parse('["A","ABE","ACE","ACT","AD","ADA","ADD","AGO","AID","AIM","AIR","ALL","ALP","AM","AMY","AN","ANA","AND","ANN","ANT","ANY","APE","APS","APT","ARC","ARE","ARK","ARM","ART","AS","ASH","ASK","AT","ATE","AUG","AUK","AVE","AWE","AWK","AWL","AWN","AX","AYE","BAD","BAG","BAH","BAM","BAN","BAR","BAT","BAY","BE","BED","BEE","BEG","BEN","BET","BEY","BIB","BID","BIG","BIN","BIT","BOB","BOG","BON","BOO","BOP","BOW","BOY","BUB","BUD","BUG","BUM","BUN","BUS","BUT","BUY","BY","BYE","CAB","CAL","CAM","CAN","CAP","CAR","CAT","CAW","COD","COG","COL","CON","COO","COP","COT","COW","COY","CRY","CUB","CUE","CUP","CUR","CUT","DAB","DAD","DAM","DAN","DAR","DAY","DEE","DEL","DEN","DES","DEW","DID","DIE","DIG","DIN","DIP","DO","DOE","DOG","DON","DOT","DOW","DRY","DUB","DUD","DUE","DUG","DUN","EAR","EAT","ED","EEL","EGG","EGO","ELI","ELK","ELM","ELY","EM","END","EST","ETC","EVA","EVE","EWE","EYE","FAD","FAN","FAR","FAT","FAY","FED","FEE","FEW","FIB","FIG","FIN","FIR","FIT","FLO","FLY","FOE","FOG","FOR","FRY","FUM","FUN","FUR","GAB","GAD","GAG","GAL","GAM","GAP","GAS","GAY","GEE","GEL","GEM","GET","GIG","GIL","GIN","GO","GOT","GUM","GUN","GUS","GUT","GUY","GYM","GYP","HA","HAD","HAL","HAM","HAN","HAP","HAS","HAT","HAW","HAY","HE","HEM","HEN","HER","HEW","HEY","HI","HID","HIM","HIP","HIS","HIT","HO","HOB","HOC","HOE","HOG","HOP","HOT","HOW","HUB","HUE","HUG","HUH","HUM","HUT","I","ICY","IDA","IF","IKE","ILL","INK","INN","IO","ION","IQ","IRA","IRE","IRK","IS","IT","ITS","IVY","JAB","JAG","JAM","JAN","JAR","JAW","JAY","JET","JIG","JIM","JO","JOB","JOE","JOG","JOT","JOY","JUG","JUT","KAY","KEG","KEN","KEY","KID","KIM","KIN","KIT","LA","LAB","LAC","LAD","LAG","LAM","LAP","LAW","LAY","LEA","LED","LEE","LEG","LEN","LEO","LET","LEW","LID","LIE","LIN","LIP","LIT","LO","LOB","LOG","LOP","LOS","LOT","LOU","LOW","LOY","LUG","LYE","MA","MAC","MAD","MAE","MAN","MAO","MAP","MAT","MAW","MAY","ME","MEG","MEL","MEN","MET","MEW","MID","MIN","MIT","MOB","MOD","MOE","MOO","MOP","MOS","MOT","MOW","MUD","MUG","MUM","MY","NAB","NAG","NAN","NAP","NAT","NAY","NE","NED","NEE","NET","NEW","NIB","NIL","NIP","NIT","NO","NOB","NOD","NON","NOR","NOT","NOV","NOW","NU","NUN","NUT","O","OAF","OAK","OAR","OAT","ODD","ODE","OF","OFF","OFT","OH","OIL","OK","OLD","ON","ONE","OR","ORB","ORE","ORR","OS","OTT","OUR","OUT","OVA","OW","OWE","OWL","OWN","OX","PA","PAD","PAL","PAM","PAN","PAP","PAR","PAT","PAW","PAY","PEA","PEG","PEN","PEP","PER","PET","PEW","PHI","PI","PIE","PIN","PIT","PLY","PO","POD","POE","POP","POT","POW","PRO","PRY","PUB","PUG","PUN","PUP","PUT","QUO","RAG","RAM","RAN","RAP","RAT","RAW","RAY","REB","RED","REP","RET","RIB","RID","RIG","RIM","RIO","RIP","ROB","ROD","ROE","RON","ROT","ROW","ROY","RUB","RUE","RUG","RUM","RUN","RYE","SAC","SAD","SAG","SAL","SAM","SAN","SAP","SAT","SAW","SAY","SEA","SEC","SEE","SEN","SET","SEW","SHE","SHY","SIN","SIP","SIR","SIS","SIT","SKI","SKY","SLY","SO","SOB","SOD","SON","SOP","SOW","SOY","SPA","SPY","SUB","SUD","SUE","SUM","SUN","SUP","TAB","TAD","TAG","TAN","TAP","TAR","TEA","TED","TEE","TEN","THE","THY","TIC","TIE","TIM","TIN","TIP","TO","TOE","TOG","TOM","TON","TOO","TOP","TOW","TOY","TRY","TUB","TUG","TUM","TUN","TWO","UN","UP","US","USE","VAN","VAT","VET","VIE","WAD","WAG","WAR","WAS","WAY","WE","WEB","WED","WEE","WET","WHO","WHY","WIN","WIT","WOK","WON","WOO","WOW","WRY","WU","YAM","YAP","YAW","YE","YEA","YES","YET","YOU","ABED","ABEL","ABET","ABLE","ABUT","ACHE","ACID","ACME","ACRE","ACTA","ACTS","ADAM","ADDS","ADEN","AFAR","AFRO","AGEE","AHEM","AHOY","AIDA","AIDE","AIDS","AIRY","AJAR","AKIN","ALAN","ALEC","ALGA","ALIA","ALLY","ALMA","ALOE","ALSO","ALTO","ALUM","ALVA","AMEN","AMES","AMID","AMMO","AMOK","AMOS","AMRA","ANDY","ANEW","ANNA","ANNE","ANTE","ANTI","AQUA","ARAB","ARCH","AREA","ARGO","ARID","ARMY","ARTS","ARTY","ASIA","ASKS","ATOM","AUNT","AURA","AUTO","AVER","AVID","AVIS","AVON","AVOW","AWAY","AWRY","BABE","BABY","BACH","BACK","BADE","BAIL","BAIT","BAKE","BALD","BALE","BALI","BALK","BALL","BALM","BAND","BANE","BANG","BANK","BARB","BARD","BARE","BARK","BARN","BARR","BASE","BASH","BASK","BASS","BATE","BATH","BAWD","BAWL","BEAD","BEAK","BEAM","BEAN","BEAR","BEAT","BEAU","BECK","BEEF","BEEN","BEER","BEET","BELA","BELL","BELT","BEND","BENT","BERG","BERN","BERT","BESS","BEST","BETA","BETH","BHOY","BIAS","BIDE","BIEN","BILE","BILK","BILL","BIND","BING","BIRD","BITE","BITS","BLAB","BLAT","BLED","BLEW","BLOB","BLOC","BLOT","BLOW","BLUE","BLUM","BLUR","BOAR","BOAT","BOCA","BOCK","BODE","BODY","BOGY","BOHR","BOIL","BOLD","BOLO","BOLT","BOMB","BONA","BOND","BONE","BONG","BONN","BONY","BOOK","BOOM","BOON","BOOT","BORE","BORG","BORN","BOSE","BOSS","BOTH","BOUT","BOWL","BOYD","BRAD","BRAE","BRAG","BRAN","BRAY","BRED","BREW","BRIG","BRIM","BROW","BUCK","BUDD","BUFF","BULB","BULK","BULL","BUNK","BUNT","BUOY","BURG","BURL","BURN","BURR","BURT","BURY","BUSH","BUSS","BUST","BUSY","BYTE","CADY","CAFE","CAGE","CAIN","CAKE","CALF","CALL","CALM","CAME","CANE","CANT","CARD","CARE","CARL","CARR","CART","CASE","CASH","CASK","CAST","CAVE","CEIL","CELL","CENT","CERN","CHAD","CHAR","CHAT","CHAW","CHEF","CHEN","CHEW","CHIC","CHIN","CHOU","CHOW","CHUB","CHUG","CHUM","CITE","CITY","CLAD","CLAM","CLAN","CLAW","CLAY","CLOD","CLOG","CLOT","CLUB","CLUE","COAL","COAT","COCA","COCK","COCO","CODA","CODE","CODY","COED","COIL","COIN","COKE","COLA","COLD","COLT","COMA","COMB","COME","COOK","COOL","COON","COOT","CORD","CORE","CORK","CORN","COST","COVE","COWL","CRAB","CRAG","CRAM","CRAY","CREW","CRIB","CROW","CRUD","CUBA","CUBE","CUFF","CULL","CULT","CUNY","CURB","CURD","CURE","CURL","CURT","CUTS","DADE","DALE","DAME","DANA","DANE","DANG","DANK","DARE","DARK","DARN","DART","DASH","DATA","DATE","DAVE","DAVY","DAWN","DAYS","DEAD","DEAF","DEAL","DEAN","DEAR","DEBT","DECK","DEED","DEEM","DEER","DEFT","DEFY","DELL","DENT","DENY","DESK","DIAL","DICE","DIED","DIET","DIME","DINE","DING","DINT","DIRE","DIRT","DISC","DISH","DISK","DIVE","DOCK","DOES","DOLE","DOLL","DOLT","DOME","DONE","DOOM","DOOR","DORA","DOSE","DOTE","DOUG","DOUR","DOVE","DOWN","DRAB","DRAG","DRAM","DRAW","DREW","DRUB","DRUG","DRUM","DUAL","DUCK","DUCT","DUEL","DUET","DUKE","DULL","DUMB","DUNE","DUNK","DUSK","DUST","DUTY","EACH","EARL","EARN","EASE","EAST","EASY","EBEN","ECHO","EDDY","EDEN","EDGE","EDGY","EDIT","EDNA","EGAN","ELAN","ELBA","ELLA","ELSE","EMIL","EMIT","EMMA","ENDS","ERIC","EROS","EVEN","EVER","EVIL","EYED","FACE","FACT","FADE","FAIL","FAIN","FAIR","FAKE","FALL","FAME","FANG","FARM","FAST","FATE","FAWN","FEAR","FEAT","FEED","FEEL","FEET","FELL","FELT","FEND","FERN","FEST","FEUD","FIEF","FIGS","FILE","FILL","FILM","FIND","FINE","FINK","FIRE","FIRM","FISH","FISK","FIST","FITS","FIVE","FLAG","FLAK","FLAM","FLAT","FLAW","FLEA","FLED","FLEW","FLIT","FLOC","FLOG","FLOW","FLUB","FLUE","FOAL","FOAM","FOGY","FOIL","FOLD","FOLK","FOND","FONT","FOOD","FOOL","FOOT","FORD","FORE","FORK","FORM","FORT","FOSS","FOUL","FOUR","FOWL","FRAU","FRAY","FRED","FREE","FRET","FREY","FROG","FROM","FUEL","FULL","FUME","FUND","FUNK","FURY","FUSE","FUSS","GAFF","GAGE","GAIL","GAIN","GAIT","GALA","GALE","GALL","GALT","GAME","GANG","GARB","GARY","GASH","GATE","GAUL","GAUR","GAVE","GAWK","GEAR","GELD","GENE","GENT","GERM","GETS","GIBE","GIFT","GILD","GILL","GILT","GINA","GIRD","GIRL","GIST","GIVE","GLAD","GLEE","GLEN","GLIB","GLOB","GLOM","GLOW","GLUE","GLUM","GLUT","GOAD","GOAL","GOAT","GOER","GOES","GOLD","GOLF","GONE","GONG","GOOD","GOOF","GORE","GORY","GOSH","GOUT","GOWN","GRAB","GRAD","GRAY","GREG","GREW","GREY","GRID","GRIM","GRIN","GRIT","GROW","GRUB","GULF","GULL","GUNK","GURU","GUSH","GUST","GWEN","GWYN","HAAG","HAAS","HACK","HAIL","HAIR","HALE","HALF","HALL","HALO","HALT","HAND","HANG","HANK","HANS","HARD","HARK","HARM","HART","HASH","HAST","HATE","HATH","HAUL","HAVE","HAWK","HAYS","HEAD","HEAL","HEAR","HEAT","HEBE","HECK","HEED","HEEL","HEFT","HELD","HELL","HELM","HERB","HERD","HERE","HERO","HERS","HESS","HEWN","HICK","HIDE","HIGH","HIKE","HILL","HILT","HIND","HINT","HIRE","HISS","HIVE","HOBO","HOCK","HOFF","HOLD","HOLE","HOLM","HOLT","HOME","HONE","HONK","HOOD","HOOF","HOOK","HOOT","HORN","HOSE","HOST","HOUR","HOVE","HOWE","HOWL","HOYT","HUCK","HUED","HUFF","HUGE","HUGH","HUGO","HULK","HULL","HUNK","HUNT","HURD","HURL","HURT","HUSH","HYDE","HYMN","IBIS","ICON","IDEA","IDLE","IFFY","INCA","INCH","INTO","IONS","IOTA","IOWA","IRIS","IRMA","IRON","ISLE","ITCH","ITEM","IVAN","JACK","JADE","JAIL","JAKE","JANE","JAVA","JEAN","JEFF","JERK","JESS","JEST","JIBE","JILL","JILT","JIVE","JOAN","JOBS","JOCK","JOEL","JOEY","JOHN","JOIN","JOKE","JOLT","JOVE","JUDD","JUDE","JUDO","JUDY","JUJU","JUKE","JULY","JUNE","JUNK","JUNO","JURY","JUST","JUTE","KAHN","KALE","KANE","KANT","KARL","KATE","KEEL","KEEN","KENO","KENT","KERN","KERR","KEYS","KICK","KILL","KIND","KING","KIRK","KISS","KITE","KLAN","KNEE","KNEW","KNIT","KNOB","KNOT","KNOW","KOCH","KONG","KUDO","KURD","KURT","KYLE","LACE","LACK","LACY","LADY","LAID","LAIN","LAIR","LAKE","LAMB","LAME","LAND","LANE","LANG","LARD","LARK","LASS","LAST","LATE","LAUD","LAVA","LAWN","LAWS","LAYS","LEAD","LEAF","LEAK","LEAN","LEAR","LEEK","LEER","LEFT","LEND","LENS","LENT","LEON","LESK","LESS","LEST","LETS","LIAR","LICE","LICK","LIED","LIEN","LIES","LIEU","LIFE","LIFT","LIKE","LILA","LILT","LILY","LIMA","LIMB","LIME","LIND","LINE","LINK","LINT","LION","LISA","LIST","LIVE","LOAD","LOAF","LOAM","LOAN","LOCK","LOFT","LOGE","LOIS","LOLA","LONE","LONG","LOOK","LOON","LOOT","LORD","LORE","LOSE","LOSS","LOST","LOUD","LOVE","LOWE","LUCK","LUCY","LUGE","LUKE","LULU","LUND","LUNG","LURA","LURE","LURK","LUSH","LUST","LYLE","LYNN","LYON","LYRA","MACE","MADE","MAGI","MAID","MAIL","MAIN","MAKE","MALE","MALI","MALL","MALT","MANA","MANN","MANY","MARC","MARE","MARK","MARS","MART","MARY","MASH","MASK","MASS","MAST","MATE","MATH","MAUL","MAYO","MEAD","MEAL","MEAN","MEAT","MEEK","MEET","MELD","MELT","MEMO","MEND","MENU","MERT","MESH","MESS","MICE","MIKE","MILD","MILE","MILK","MILL","MILT","MIMI","MIND","MINE","MINI","MINK","MINT","MIRE","MISS","MIST","MITE","MITT","MOAN","MOAT","MOCK","MODE","MOLD","MOLE","MOLL","MOLT","MONA","MONK","MONT","MOOD","MOON","MOOR","MOOT","MORE","MORN","MORT","MOSS","MOST","MOTH","MOVE","MUCH","MUCK","MUDD","MUFF","MULE","MULL","MURK","MUSH","MUST","MUTE","MUTT","MYRA","MYTH","NAGY","NAIL","NAIR","NAME","NARY","NASH","NAVE","NAVY","NEAL","NEAR","NEAT","NECK","NEED","NEIL","NELL","NEON","NERO","NESS","NEST","NEWS","NEWT","NIBS","NICE","NICK","NILE","NINA","NINE","NOAH","NODE","NOEL","NOLL","NONE","NOOK","NOON","NORM","NOSE","NOTE","NOUN","NOVA","NUDE","NULL","NUMB","OATH","OBEY","OBOE","ODIN","OHIO","OILY","OINT","OKAY","OLAF","OLDY","OLGA","OLIN","OMAN","OMEN","OMIT","ONCE","ONES","ONLY","ONTO","ONUS","ORAL","ORGY","OSLO","OTIS","OTTO","OUCH","OUST","OUTS","OVAL","OVEN","OVER","OWLY","OWNS","QUAD","QUIT","QUOD","RACE","RACK","RACY","RAFT","RAGE","RAID","RAIL","RAIN","RAKE","RANK","RANT","RARE","RASH","RATE","RAVE","RAYS","READ","REAL","REAM","REAR","RECK","REED","REEF","REEK","REEL","REID","REIN","RENA","REND","RENT","REST","RICE","RICH","RICK","RIDE","RIFT","RILL","RIME","RING","RINK","RISE","RISK","RITE","ROAD","ROAM","ROAR","ROBE","ROCK","RODE","ROIL","ROLL","ROME","ROOD","ROOF","ROOK","ROOM","ROOT","ROSA","ROSE","ROSS","ROSY","ROTH","ROUT","ROVE","ROWE","ROWS","RUBE","RUBY","RUDE","RUDY","RUIN","RULE","RUNG","RUNS","RUNT","RUSE","RUSH","RUSK","RUSS","RUST","RUTH","SACK","SAFE","SAGE","SAID","SAIL","SALE","SALK","SALT","SAME","SAND","SANE","SANG","SANK","SARA","SAUL","SAVE","SAYS","SCAN","SCAR","SCAT","SCOT","SEAL","SEAM","SEAR","SEAT","SEED","SEEK","SEEM","SEEN","SEES","SELF","SELL","SEND","SENT","SETS","SEWN","SHAG","SHAM","SHAW","SHAY","SHED","SHIM","SHIN","SHOD","SHOE","SHOT","SHOW","SHUN","SHUT","SICK","SIDE","SIFT","SIGH","SIGN","SILK","SILL","SILO","SILT","SINE","SING","SINK","SIRE","SITE","SITS","SITU","SKAT","SKEW","SKID","SKIM","SKIN","SKIT","SLAB","SLAM","SLAT","SLAY","SLED","SLEW","SLID","SLIM","SLIT","SLOB","SLOG","SLOT","SLOW","SLUG","SLUM","SLUR","SMOG","SMUG","SNAG","SNOB","SNOW","SNUB","SNUG","SOAK","SOAR","SOCK","SODA","SOFA","SOFT","SOIL","SOLD","SOME","SONG","SOON","SOOT","SORE","SORT","SOUL","SOUR","SOWN","STAB","STAG","STAN","STAR","STAY","STEM","STEW","STIR","STOW","STUB","STUN","SUCH","SUDS","SUIT","SULK","SUMS","SUNG","SUNK","SURE","SURF","SWAB","SWAG","SWAM","SWAN","SWAT","SWAY","SWIM","SWUM","TACK","TACT","TAIL","TAKE","TALE","TALK","TALL","TANK","TASK","TATE","TAUT","TEAL","TEAM","TEAR","TECH","TEEM","TEEN","TEET","TELL","TEND","TENT","TERM","TERN","TESS","TEST","THAN","THAT","THEE","THEM","THEN","THEY","THIN","THIS","THUD","THUG","TICK","TIDE","TIDY","TIED","TIER","TILE","TILL","TILT","TIME","TINA","TINE","TINT","TINY","TIRE","TOAD","TOGO","TOIL","TOLD","TOLL","TONE","TONG","TONY","TOOK","TOOL","TOOT","TORE","TORN","TOTE","TOUR","TOUT","TOWN","TRAG","TRAM","TRAY","TREE","TREK","TRIG","TRIM","TRIO","TROD","TROT","TROY","TRUE","TUBA","TUBE","TUCK","TUFT","TUNA","TUNE","TUNG","TURF","TURN","TUSK","TWIG","TWIN","TWIT","ULAN","UNIT","URGE","USED","USER","USES","UTAH","VAIL","VAIN","VALE","VARY","VASE","VAST","VEAL","VEDA","VEIL","VEIN","VEND","VENT","VERB","VERY","VETO","VICE","VIEW","VINE","VISE","VOID","VOLT","VOTE","WACK","WADE","WAGE","WAIL","WAIT","WAKE","WALE","WALK","WALL","WALT","WAND","WANE","WANG","WANT","WARD","WARM","WARN","WART","WASH","WAST","WATS","WATT","WAVE","WAVY","WAYS","WEAK","WEAL","WEAN","WEAR","WEED","WEEK","WEIR","WELD","WELL","WELT","WENT","WERE","WERT","WEST","WHAM","WHAT","WHEE","WHEN","WHET","WHOA","WHOM","WICK","WIFE","WILD","WILL","WIND","WINE","WING","WINK","WINO","WIRE","WISE","WISH","WITH","WOLF","WONT","WOOD","WOOL","WORD","WORE","WORK","WORM","WORN","WOVE","WRIT","WYNN","YALE","YANG","YANK","YARD","YARN","YAWL","YAWN","YEAH","YEAR","YELL","YOGA","YOKE"]')},8437:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deriveXAddress=t.deriveAddress=t.deriveKeypair=void 0;const r=n(6333),i=n(5442);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return i.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return i.deriveAddress}}),t.deriveXAddress=function(e){const t=(0,i.deriveAddress)(e.publicKey);return(0,r.classicAddressToXAddress)(t,e.tag,e.test)}},8444:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AccountRootFlags=void 0,function(e){e[e.lsfPasswordSpent=65536]="lsfPasswordSpent",e[e.lsfRequireDestTag=131072]="lsfRequireDestTag",e[e.lsfRequireAuth=262144]="lsfRequireAuth",e[e.lsfDisallowXRP=524288]="lsfDisallowXRP",e[e.lsfDisableMaster=1048576]="lsfDisableMaster",e[e.lsfNoFreeze=2097152]="lsfNoFreeze",e[e.lsfGlobalFreeze=4194304]="lsfGlobalFreeze",e[e.lsfDefaultRipple=8388608]="lsfDefaultRipple",e[e.lsfDepositAuth=16777216]="lsfDepositAuth",e[e.lsfAMM=33554432]="lsfAMM",e[e.lsfDisallowIncomingNFTokenOffer=67108864]="lsfDisallowIncomingNFTokenOffer",e[e.lsfDisallowIncomingCheck=134217728]="lsfDisallowIncomingCheck",e[e.lsfDisallowIncomingPayChan=268435456]="lsfDisallowIncomingPayChan",e[e.lsfDisallowIncomingTrustline=536870912]="lsfDisallowIncomingTrustline",e[e.lsfAllowTrustLineClawback=2147483648]="lsfAllowTrustLineClawback",e[e.lsfAllowTrustLineLocking=1073741824]="lsfAllowTrustLineLocking"}(n||(t.AccountRootFlags=n={}))},8516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash_to_ristretto255=t.hashToRistretto255=t.RistrettoPoint=t.encodeToCurve=t.hashToCurve=t.edwardsToMontgomery=t.x25519=t.ed25519ph=t.ed25519ctx=t.ed25519=t.ED25519_TORSION_SUBGROUP=void 0,t.edwardsToMontgomeryPub=O,t.edwardsToMontgomeryPriv=function(e){const t=v.hash(e.subarray(0,32));return v.adjustScalarBytes(t).subarray(0,32)};const r=n(714),i=n(9987),o=n(4107),s=n(5812),a=n(1056),c=n(802),l=n(7765),u=n(3449),d=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),f=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),h=BigInt(0),g=BigInt(1),p=BigInt(2),y=BigInt(3),m=BigInt(5),b=BigInt(8);function E(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=d,s=e*e%o*e%o,a=(0,c.pow2)(s,p,o)*s%o,l=(0,c.pow2)(a,g,o)*e%o,u=(0,c.pow2)(l,m,o)*l%o,f=(0,c.pow2)(u,t,o)*u%o,h=(0,c.pow2)(f,n,o)*f%o,y=(0,c.pow2)(h,r,o)*h%o,b=(0,c.pow2)(y,i,o)*y%o,E=(0,c.pow2)(b,i,o)*y%o,w=(0,c.pow2)(E,t,o)*u%o;return{pow_p_5_8:(0,c.pow2)(w,p,o)*e%o,b2:s}}function w(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function A(e,t){const n=d,r=(0,c.mod)(t*t*t,n),i=E(e*(0,c.mod)(r*r*t,n)).pow_p_5_8;let o=(0,c.mod)(e*r*i,n);const s=(0,c.mod)(t*o*o,n),a=o,l=(0,c.mod)(o*f,n),u=s===e,h=s===(0,c.mod)(-e,n),g=s===(0,c.mod)(-e*f,n);return u&&(o=a),(h||g)&&(o=l),(0,c.isNegativeLE)(o,n)&&(o=(0,c.mod)(-o,n)),{isValid:u||h,value:o}}t.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const S=(()=>(0,c.Field)(d,void 0,!0))(),v=(()=>({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:S,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:b,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:r.sha512,randomBytes:i.randomBytes,adjustScalarBytes:w,uvRatio:A}))();function T(e,t,n){if(t.length>255)throw new Error("Context is too big");return(0,i.concatBytes)((0,i.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([n?1:0,t.length]),t,e)}function O(e){const{y:n}=t.ed25519.ExtendedPoint.fromHex(e),r=BigInt(1);return S.toBytes(S.create((r+n)*S.inv(r-n)))}t.ed25519=(0,s.twistedEdwards)(v),t.ed25519ctx=(0,s.twistedEdwards)({...v,domain:T}),t.ed25519ph=(0,s.twistedEdwards)(Object.assign({},v,{domain:T,prehash:r.sha512})),t.x25519=(0,l.montgomery)({P:d,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:e=>{const t=d,{pow_p_5_8:n,b2:r}=E(e);return(0,c.mod)((0,c.pow2)(n,y,t)*r,t)},adjustScalarBytes:w,randomBytes:i.randomBytes}),t.edwardsToMontgomery=O;const I=(()=>(S.ORDER+y)/b)(),B=(()=>S.pow(p,I))(),_=(()=>S.sqrt(S.neg(S.ONE)))(),N=(()=>(0,c.FpSqrtEven)(S,S.neg(BigInt(486664))))();const L=(()=>(0,a.createHasher)(t.ed25519.ExtendedPoint,e=>function(e){const{xMn:t,xMd:n,yMn:r,yMd:i}=function(e){const t=(S.ORDER-m)/b,n=BigInt(486662);let r=S.sqr(e);r=S.mul(r,p);let i=S.add(r,S.ONE),o=S.neg(n),s=S.sqr(i),a=S.mul(s,i),c=S.mul(r,n);c=S.mul(c,o),c=S.add(c,s),c=S.mul(c,o);let l=S.sqr(a);s=S.sqr(l),l=S.mul(l,a),l=S.mul(l,c),s=S.mul(s,l);let u=S.pow(s,t);u=S.mul(u,l);let d=S.mul(u,_);s=S.sqr(u),s=S.mul(s,a);let f=S.eql(s,c),h=S.cmov(d,u,f),y=S.mul(o,r),E=S.mul(u,e);E=S.mul(E,B);let w=S.mul(E,_),A=S.mul(c,r);s=S.sqr(E),s=S.mul(s,a);let v=S.eql(s,A),T=S.cmov(w,E,v);s=S.sqr(h),s=S.mul(s,a);let O=S.eql(s,c),I=S.cmov(y,o,O),N=S.cmov(T,h,O),L=S.isOdd(N);return N=S.cmov(N,S.neg(N),O!==L),{xMn:I,xMd:i,yMn:N,yMd:g}}(e);let o=S.mul(t,i);o=S.mul(o,N);let s=S.mul(n,r),a=S.sub(t,n),c=S.add(t,n),l=S.mul(s,c),u=S.eql(l,S.ZERO);o=S.cmov(o,S.ZERO,u),s=S.cmov(s,S.ONE,u),a=S.cmov(a,S.ONE,u),c=S.cmov(c,S.ONE,u);const d=S.invertBatch([s,c]);return{x:S.mul(o,d[0]),y:S.mul(a,d[1])}}(e[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:S.ORDER,m:1,k:128,expand:"xmd",hash:r.sha512}))();function F(e){if(!(e instanceof V))throw new Error("RistrettoPoint expected")}t.hashToCurve=L.hashToCurve,t.encodeToCurve=L.encodeToCurve;const C=f,D=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),M=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),P=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),R=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),x=e=>A(g,e),U=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),k=e=>t.ed25519.CURVE.Fp.create((0,u.bytesToNumberLE)(e)&U);function H(e){const{d:n}=t.ed25519.CURVE,r=t.ed25519.CURVE.Fp.ORDER,i=t.ed25519.CURVE.Fp.create,o=i(C*e*e),s=i((o+g)*P);let a=BigInt(-1);const l=i((a-n*o)*i(o+n));let{isValid:u,value:d}=A(s,l),f=i(d*e);(0,c.isNegativeLE)(f,r)||(f=i(-f)),u||(d=f),u||(a=o);const h=i(a*(o-g)*R-l),p=d*d,y=i((d+d)*l),m=i(h*D),b=i(g-p),E=i(g+p);return new t.ed25519.ExtendedPoint(i(y*E),i(b*m),i(m*E),i(y*b))}class V{constructor(e){this.ep=e}static fromAffine(e){return new V(t.ed25519.ExtendedPoint.fromAffine(e))}static hashToCurve(e){e=(0,u.ensureBytes)("ristrettoHash",e,64);const t=H(k(e.slice(0,32))),n=H(k(e.slice(32,64)));return new V(t.add(n))}static fromHex(e){e=(0,u.ensureBytes)("ristrettoHex",e,32);const{a:n,d:r}=t.ed25519.CURVE,i=t.ed25519.CURVE.Fp.ORDER,o=t.ed25519.CURVE.Fp.create,s="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=k(e);if(!(0,u.equalBytes)((0,u.numberToBytesLE)(a,32),e)||(0,c.isNegativeLE)(a,i))throw new Error(s);const l=o(a*a),d=o(g+n*l),f=o(g-n*l),p=o(d*d),y=o(f*f),m=o(n*r*p-y),{isValid:b,value:E}=x(o(m*y)),w=o(E*f),A=o(E*w*m);let S=o((a+a)*w);(0,c.isNegativeLE)(S,i)&&(S=o(-S));const v=o(d*A),T=o(S*v);if(!b||(0,c.isNegativeLE)(T,i)||v===h)throw new Error(s);return new V(new t.ed25519.ExtendedPoint(S,v,g,T))}static msm(e,n){const r=(0,c.Field)(t.ed25519.CURVE.n,t.ed25519.CURVE.nBitLength);return(0,o.pippenger)(V,r,e,n)}toRawBytes(){let{ex:e,ey:n,ez:r,et:i}=this.ep;const o=t.ed25519.CURVE.Fp.ORDER,s=t.ed25519.CURVE.Fp.create,a=s(s(r+n)*s(r-n)),l=s(e*n),d=s(l*l),{value:f}=x(s(a*d)),h=s(f*a),g=s(f*l),p=s(h*g*i);let y;if((0,c.isNegativeLE)(i*p,o)){let t=s(n*C),r=s(e*C);e=t,n=r,y=s(h*M)}else y=g;(0,c.isNegativeLE)(e*p,o)&&(n=s(-n));let m=s((r-n)*y);return(0,c.isNegativeLE)(m,o)&&(m=s(-m)),(0,u.numberToBytesLE)(m,32)}toHex(){return(0,u.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(e){F(e);const{ex:n,ey:r}=this.ep,{ex:i,ey:o}=e.ep,s=t.ed25519.CURVE.Fp.create,a=s(n*o)===s(r*i),c=s(r*o)===s(n*i);return a||c}add(e){return F(e),new V(this.ep.add(e.ep))}subtract(e){return F(e),new V(this.ep.subtract(e.ep))}multiply(e){return new V(this.ep.multiply(e))}multiplyUnsafe(e){return new V(this.ep.multiplyUnsafe(e))}double(){return new V(this.ep.double())}negate(){return new V(this.ep.negate())}}t.RistrettoPoint=(V.BASE||(V.BASE=new V(t.ed25519.ExtendedPoint.BASE)),V.ZERO||(V.ZERO=new V(t.ed25519.ExtendedPoint.ZERO)),V),t.hashToRistretto255=(e,t)=>{const n=t.DST,o="string"==typeof n?(0,i.utf8ToBytes)(n):n,s=(0,a.expand_message_xmd)(e,o,64,r.sha512);return V.hashToCurve(s)},t.hash_to_ristretto255=t.hashToRistretto255},8571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAccountDelete=void 0;const r=n(2794);t.validateAccountDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"Destination",r.isAccount),(0,r.validateOptionalField)(e,"DestinationTag",r.isNumber),(0,r.validateCredentialsList)(e.CredentialIDs,e.TransactionType,!0,r.MAX_AUTHORIZED_CREDENTIALS)}},8718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNFTokenMint=t.NFTokenMintFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfBurnable=1]="tfBurnable",e[e.tfOnlyXRP=2]="tfOnlyXRP",e[e.tfTrustLine=4]="tfTrustLine",e[e.tfTransferable=8]="tfTransferable",e[e.tfMutable=16]="tfMutable"}(s||(t.NFTokenMintFlags=s={})),t.validateNFTokenMint=function(e){if((0,o.validateBaseTransaction)(e),e.Account===e.Issuer)throw new r.ValidationError("NFTokenMint: Issuer must not be equal to Account");if((0,o.validateOptionalField)(e,"Issuer",o.isAccount),"string"==typeof e.URI&&""===e.URI)throw new r.ValidationError("NFTokenMint: URI must not be empty string");if("string"==typeof e.URI&&!(0,i.isHex)(e.URI))throw new r.ValidationError("NFTokenMint: URI must be in hex format");if(null==e.NFTokenTaxon)throw new r.ValidationError("NFTokenMint: missing field NFTokenTaxon");if(null==e.Amount&&(null!=e.Expiration||null!=e.Destination))throw new r.ValidationError("NFTokenMint: Amount is required when Expiration or Destination is present");(0,o.validateOptionalField)(e,"Amount",o.isAmount),(0,o.validateOptionalField)(e,"Expiration",o.isNumber),(0,o.validateOptionalField)(e,"Destination",o.isAccount)}},8741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STNumber=void 0;const r=n(1275),i=n(5517),o=BigInt("1000000000000000"),s=BigInt("9999999999999999"),a=-2147483648;class c extends r.SerializedType{constructor(e){const t=null!=e?e:c.defaultBytes;if(!(t instanceof Uint8Array)||12!==t.length)throw new Error(`STNumber must be constructed from a 12-byte Uint8Array, got ${null==t?void 0:t.length}`);super(t)}static from(e){if(e instanceof c)return e;if("string"==typeof e)return c.fromValue(e);throw new Error("STNumber.from: Only string or STNumber instance is supported")}static fromValue(e){const{mantissa:t,exponent:n,isNegative:r}=function(e){const t=/^([-+]?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/.exec(e);if(!t)throw new Error(`Unable to parse number from string: ${e}`);const[,n,r,i,o]=t;let s=r.replace(/^0+(?=\d)/,"")||"0",a=0;i&&(s+=i,a-=i.length),o&&(a+=parseInt(o,10));let c=BigInt(s);return"-"===n&&(c=-c),{mantissa:c,exponent:a,isNegative:c<BigInt(0)}}(e);let l,u;t!==BigInt(0)||0!==n||r?({mantissa:l,exponent:u}=function(e,t){let n=e<BigInt(0)?-e:e;const r=e<BigInt(0);for(;n!==BigInt(0)&&n<o&&t>-32768;)t-=1,n*=BigInt(10);for(;n>s;){if(t>=32768)throw new Error("Mantissa and exponent are too large");t+=1,n/=BigInt(10)}return r&&(n=-n),{mantissa:n,exponent:t}}(t,n)):(l=BigInt(0),u=a);const d=new Uint8Array(12);return(0,i.writeInt64BE)(d,l,0),(0,i.writeInt32BE)(d,u,8),new c(d)}static fromParser(e){return new c(e.read(12))}toJSON(){const e=this.bytes;if(!e||12!==e.length)throw new Error("STNumber internal bytes not set or wrong length");const t=(0,i.readInt64BE)(e,0),n=(0,i.readInt32BE)(e,8);if(t===BigInt(0)&&n===a)return"0";if(0===n)return t.toString();if(n<-25||n>-5)return`${t}e${n}`;const r=t<BigInt(0),o=(t<BigInt(0)?-t:t).toString(),s="0".repeat(27)+o+"0".repeat(23),c=n+43,l=s.slice(0,c).replace(/^0+/,"")||"0",u=s.slice(c).replace(/0+$/,"");return`${r?"-":""}${l}${u?"."+u:""}`}}t.STNumber=c,c.defaultBytes=new Uint8Array(12)},8816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesLookup=t.Bytes=t.FieldLookup=t.XrplDefinitionsBase=void 0;const r=n(2942);Object.defineProperty(t,"Bytes",{enumerable:!0,get:function(){return r.Bytes}}),Object.defineProperty(t,"BytesLookup",{enumerable:!0,get:function(){return r.BytesLookup}});const i=n(3733);Object.defineProperty(t,"FieldLookup",{enumerable:!0,get:function(){return i.FieldLookup}});const o=n(8188);t.XrplDefinitionsBase=class{constructor(e,t){this.type=new r.BytesLookup(e.TYPES,o.TYPE_WIDTH),this.ledgerEntryType=new r.BytesLookup(e.LEDGER_ENTRY_TYPES,o.LEDGER_ENTRY_WIDTH),this.transactionType=new r.BytesLookup(e.TRANSACTION_TYPES,o.TRANSACTION_TYPE_WIDTH),this.transactionResult=new r.BytesLookup(e.TRANSACTION_RESULTS,o.TRANSACTION_RESULT_WIDTH),this.field=new i.FieldLookup(e.FIELDS,e.TYPES),this.transactionNames=Object.entries(e.TRANSACTION_TYPES).filter(([e,t])=>t>=0).map(([e,t])=>e),this.dataTypes={},this.associateTypes(t),this.granularPermissions={TrustlineAuthorize:65537,TrustlineFreeze:65538,TrustlineUnfreeze:65539,AccountDomainSet:65540,AccountEmailHashSet:65541,AccountMessageKeySet:65542,AccountTransferRateSet:65543,AccountTickSizeSet:65544,PaymentMint:65545,PaymentBurn:65546,MPTokenIssuanceLock:65547,MPTokenIssuanceUnlock:65548};const n=Object.fromEntries(Object.entries(e.TRANSACTION_TYPES).map(([e,t])=>[e,t+1])),s=Object.assign(Object.assign({},this.granularPermissions),n);this.delegatablePermissions=new r.BytesLookup(s,o.DELEGATABLE_PERMISSIONS_WIDTH)}associateTypes(e){this.dataTypes=Object.assign({},this.dataTypes,e),Object.values(this.field).forEach(e=>{e.associatedType=this.dataTypes[e.type.name]}),this.field.TransactionType.associatedType=this.transactionType,this.field.TransactionResult.associatedType=this.transactionResult,this.field.LedgerEntryType.associatedType=this.ledgerEntryType,this.field.PermissionValue&&(this.field.PermissionValue.associatedType=this.delegatablePermissions)}getAssociatedTypes(){return this.dataTypes}}},8823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFlags=t.SignerListFlags=t.RippleStateFlags=t.OfferFlags=t.NEGATIVE_UNL_ID=t.FEE_SETTINGS_ID=t.AMENDMENTS_ID=t.AccountRootFlags=void 0;const r=n(8444);Object.defineProperty(t,"AccountRootFlags",{enumerable:!0,get:function(){return r.AccountRootFlags}});const i=n(7899);Object.defineProperty(t,"AMENDMENTS_ID",{enumerable:!0,get:function(){return i.AMENDMENTS_ID}});const o=n(7074);Object.defineProperty(t,"FEE_SETTINGS_ID",{enumerable:!0,get:function(){return o.FEE_SETTINGS_ID}});const s=n(5407);Object.defineProperty(t,"NEGATIVE_UNL_ID",{enumerable:!0,get:function(){return s.NEGATIVE_UNL_ID}});const a=n(5237);Object.defineProperty(t,"OfferFlags",{enumerable:!0,get:function(){return a.OfferFlags}});const c=n(8864);Object.defineProperty(t,"RippleStateFlags",{enumerable:!0,get:function(){return c.RippleStateFlags}});const l=n(1781);Object.defineProperty(t,"SignerListFlags",{enumerable:!0,get:function(){return l.SignerListFlags}});const u=n(751);Object.defineProperty(t,"VaultFlags",{enumerable:!0,get:function(){return u.VaultFlags}})},8847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STObject=void 0;const r=n(1141),i=n(1275),o=n(6333),s=n(892),a=n(7995),c=n(8239),l=n(5463),u=Uint8Array.from([225]),d="ObjectEndMarker",f="STObject",h="SourceTag",g="DestinationTag";class p extends i.SerializedType{static fromParser(e){const t=new a.BytesList,n=new a.BinarySerializer(t);for(;!e.end();){const t=e.readField();if(t.name===d)break;const r=e.readFieldValue(t);n.writeFieldAndValue(t,r),t.type.name===f&&n.put(u)}return new p(t.toBytes())}static from(e,t,n=r.DEFAULT_DEFINITIONS){if(e instanceof p)return e;const i=new a.BytesList,s=new a.BinarySerializer(i);let d=!1;const y=Object.entries(e).reduce((t,[n,r])=>{let i;return r&&(0,o.isValidXAddress)(r.toString())&&(i=function(e,t){const n=(0,o.xAddressToClassicAddress)(t);let r;if("Destination"===e)r=g;else if("Account"===e)r=h;else if(!1!==n.tag)throw new Error(`${e} cannot have an associated tag`);return!1!==n.tag?{[e]:n.classicAddress,[r]:n.tag}:{[e]:n.classicAddress}}(n,r.toString()),function(e,t){if(void 0!==e[h]&&void 0!==t[h])throw new Error("Cannot have Account X-Address and SourceTag");if(void 0!==e[g]&&void 0!==t[g])throw new Error("Cannot have Destination X-Address and DestinationTag")}(i,e)),Object.assign(t,null!=i?i:{[n]:r})},{});let m=Object.keys(y).map(e=>{if(!(e in n.field)){if(e[0]===e[0].toLowerCase())return;throw new Error(`Field ${e} is not defined in the definitions`)}return n.field[e]}).filter(function(e){return void 0!==e&&void 0!==y[e.name]&&e.isSerialized}).sort((e,t)=>e.ordinal-t.ordinal);return void 0!==t&&(m=m.filter(t)),m.forEach(e=>{const t=e.type.name===f?this.from(y[e.name],void 0,n):"STArray"===e.type.name?c.STArray.from(y[e.name],n):"UInt64"===e.type.name?l.UInt64.from(y[e.name],e.name):e.associatedType.from(y[e.name]);if(null==t)throw new TypeError(`Unable to interpret "${e.name}: ${y[e.name]}".`);"UNLModify"===t.name&&(d=!0);const r="Account"==e.name&&d;s.writeFieldAndValue(e,t,r),e.type.name===f&&s.put(u)}),new p(i.toBytes())}toJSON(e){const t=new s.BinaryParser(this.toString(),e),n={};for(;!t.end();){const r=t.readField();if(r.name===d)break;n[r.name]=t.readFieldValue(r).toJSON(e,r.name)}return n}}t.STObject=p},8864:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RippleStateFlags=void 0,function(e){e[e.lsfLowReserve=65536]="lsfLowReserve",e[e.lsfHighReserve=131072]="lsfHighReserve",e[e.lsfLowAuth=262144]="lsfLowAuth",e[e.lsfHighAuth=524288]="lsfHighAuth",e[e.lsfLowNoRipple=1048576]="lsfLowNoRipple",e[e.lsfHighNoRipple=2097152]="lsfHighNoRipple",e[e.lsfLowFreeze=4194304]="lsfLowFreeze",e[e.lsfHighFreeze=8388608]="lsfHighFreeze",e[e.lsfAMMNode=16777216]="lsfAMMNode",e[e.lsfLowDeepFreeze=33554432]="lsfLowDeepFreeze",e[e.lsfHighDeepFreeze=67108864]="lsfHighDeepFreeze"}(n||(t.RippleStateFlags=n={}))},8932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.accountPublicFromPublicGenerator=t.derivePrivateKey=void 0;const i=n(9005),o=r(n(4876)),s=BigInt(0);function a(e,t){const n=i.secp256k1.CURVE.n;for(let r=0;r<=4294967295;r++){const i=(new o.default).add(e);void 0!==t&&i.addU32(t),i.addU32(r);const a=i.first256BigInt();if(a>s&&a<n)return a}throw new Error("impossible unicorn ;)")}t.derivePrivateKey=function(e,t={}){const n=t.validator,r=i.secp256k1.CURVE.n,o=a(e);return n?o:(a(i.secp256k1.ProjectivePoint.BASE.multiply(o).toRawBytes(!0),t.accountIndex||0)+o)%r},t.accountPublicFromPublicGenerator=function(e){const t=i.secp256k1.ProjectivePoint.fromHex(e),n=a(e,0),r=i.secp256k1.ProjectivePoint.BASE.multiply(n);return t.add(r).toRawBytes(!0)}},9005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const r=n(3947),i=n(9987),o=n(6657),s=n(1056),a=n(802),c=n(3449),l=n(4296),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),g=(e,t)=>(e+t/h)/t;function p(e){const t=u,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),l=BigInt(88),d=e*e*e%t,f=d*d*e%t,g=(0,a.pow2)(f,n,t)*f%t,p=(0,a.pow2)(g,n,t)*f%t,m=(0,a.pow2)(p,h,t)*d%t,b=(0,a.pow2)(m,i,t)*m%t,E=(0,a.pow2)(b,o,t)*b%t,w=(0,a.pow2)(E,c,t)*E%t,A=(0,a.pow2)(w,l,t)*w%t,S=(0,a.pow2)(A,c,t)*E%t,v=(0,a.pow2)(S,n,t)*f%t,T=(0,a.pow2)(v,s,t)*b%t,O=(0,a.pow2)(T,r,t)*d%t,I=(0,a.pow2)(O,h,t);if(!y.eql(y.sqr(I),e))throw new Error("Cannot find square root");return I}const y=(0,a.Field)(u,void 0,void 0,{sqrt:p});t.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),c=g(o*e,t),l=g(-r*e,t);let u=(0,a.mod)(e-c*n-l*i,t),h=(0,a.mod)(-c*r-l*o,t);const p=u>s,y=h>s;if(p&&(u=t-u),y&&(h=t-h),u>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:u,k2neg:y,k2:h}}}},r.sha256);const m=BigInt(0),b={};function E(e,...t){let n=b[e];if(void 0===n){const t=(0,r.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));n=(0,c.concatBytes)(t,t),b[e]=n}return(0,r.sha256)((0,c.concatBytes)(n,...t))}const w=e=>e.toRawBytes(!0).slice(1),A=e=>(0,c.numberToBytesBE)(e,32),S=e=>(0,a.mod)(e,u),v=e=>(0,a.mod)(e,d),T=t.secp256k1.ProjectivePoint;function O(e){let n=t.secp256k1.utils.normPrivateKeyToScalar(e),r=T.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:v(-n),bytes:w(r)}}function I(e){(0,c.aInRange)("x",e,f,u);const t=S(e*e);let n=p(S(t*e+BigInt(7)));n%h!==m&&(n=S(-n));const r=new T(e,n,f);return r.assertValidity(),r}const B=c.bytesToNumberBE;function _(...e){return v(B(E("BIP0340/challenge",...e)))}function N(e,t,n){const r=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),o=(0,c.ensureBytes)("publicKey",n,32);try{const e=I(B(o)),t=B(r.subarray(0,32));if(!(0,c.inRange)(t,f,u))return!1;const n=B(r.subarray(32,64));if(!(0,c.inRange)(n,f,d))return!1;const h=_(A(t),w(e),i),g=(s=e,a=n,l=v(-h),T.BASE.multiplyAndAddUnsafe(s,a,l));return!(!g||!g.hasEvenY()||g.toAffine().x!==t)}catch(e){return!1}var s,a,l}t.schnorr={getPublicKey:function(e){return O(e).bytes},sign:function(e,t,n=(0,i.randomBytes)(32)){const r=(0,c.ensureBytes)("message",e),{bytes:o,scalar:s}=O(t),a=(0,c.ensureBytes)("auxRand",n,32),l=A(s^B(E("BIP0340/aux",a))),u=E("BIP0340/nonce",l,o,r),d=v(B(u));if(d===m)throw new Error("sign failed: k is zero");const{bytes:f,scalar:h}=O(d),g=_(f,o,r),p=new Uint8Array(64);if(p.set(f,0),p.set(A(v(h+g*s)),32),!N(p,r,o))throw new Error("sign: Invalid signature produced");return p},verify:N,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:w,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:E,mod:a.mod}};const L=(()=>(0,s.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),F=(()=>(0,l.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),C=(()=>(0,s.createHasher)(t.secp256k1.ProjectivePoint,e=>{const{x:t,y:n}=F(y.create(e[0]));return L(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}))();t.hashToCurve=C.hashToCurve,t.encodeToCurve=C.encodeToCurve},9043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateVaultClawback=void 0;const r=n(2794);t.validateVaultClawback=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"VaultID",r.isString),(0,r.validateRequiredField)(e,"Holder",r.isAccount),(0,r.validateOptionalField)(e,"Amount",r.isClawbackAmount)}},9333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.omitBy=t.groupBy=void 0,t.groupBy=function(e,t){return e.reduce(function(e,n,r,i){const o=t(n,r,i)||0,s=e[o]||[];return s.push(n),e[o]=s,e},{})},t.omitBy=function(e,t){return Object.keys(e).filter(n=>!t(e[n],n)).reduce((t,n)=>(t[n]=e[n],t),{})}},9349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOfferCreate=t.OfferCreateFlags=void 0;const r=n(255),i=n(99),o=n(2794);var s;!function(e){e[e.tfPassive=65536]="tfPassive",e[e.tfImmediateOrCancel=131072]="tfImmediateOrCancel",e[e.tfFillOrKill=262144]="tfFillOrKill",e[e.tfSell=524288]="tfSell",e[e.tfHybrid=1048576]="tfHybrid"}(s||(t.OfferCreateFlags=s={})),t.validateOfferCreate=function(e){if((0,o.validateBaseTransaction)(e),void 0===e.TakerGets)throw new r.ValidationError("OfferCreate: missing field TakerGets");if(void 0===e.TakerPays)throw new r.ValidationError("OfferCreate: missing field TakerPays");if("string"!=typeof e.TakerGets&&!(0,o.isAmount)(e.TakerGets))throw new r.ValidationError("OfferCreate: invalid TakerGets");if("string"!=typeof e.TakerPays&&!(0,o.isAmount)(e.TakerPays))throw new r.ValidationError("OfferCreate: invalid TakerPays");if(void 0!==e.Expiration&&"number"!=typeof e.Expiration)throw new r.ValidationError("OfferCreate: invalid Expiration");if(void 0!==e.OfferSequence&&"number"!=typeof e.OfferSequence)throw new r.ValidationError("OfferCreate: invalid OfferSequence");if((0,o.validateOptionalField)(e,"DomainID",o.isDomainID,{txType:"OfferCreate",paramName:"DomainID"}),null==e.DomainID&&(0,i.hasFlag)(e,s.tfHybrid,"tfHybrid"))throw new r.ValidationError("OfferCreate: tfHybrid flag cannot be set if DomainID is not present")}},9373:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TRANSACTION_ID=1415073280]="TRANSACTION_ID",e[e.TRANSACTION_NODE=1397638144]="TRANSACTION_NODE",e[e.INNER_NODE=1296649728]="INNER_NODE",e[e.LEAF_NODE=1296846336]="LEAF_NODE",e[e.TRANSACTION_SIGN=1398036480]="TRANSACTION_SIGN",e[e.TRANSACTION_SIGN_TESTNET=1937012736]="TRANSACTION_SIGN_TESTNET",e[e.TRANSACTION_MULTISIGN=1397576704]="TRANSACTION_MULTISIGN",e[e.LEDGER=1280791040]="LEDGER"}(n||(n={})),t.default=n},9450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;const r=n(4233),i=n(5492),o=n(4894),s=n(5149),a=n(5827),c=n(3181),l=n(7663),u={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},f=BigInt(0),h=BigInt(1),g=BigInt(2),p=(0,a.Field)(u.p,{sqrt:function(e){const t=u.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),l=BigInt(88),d=e*e*e%t,f=d*d*e%t,h=(0,a.pow2)(f,n,t)*f%t,y=(0,a.pow2)(h,n,t)*f%t,m=(0,a.pow2)(y,g,t)*d%t,b=(0,a.pow2)(m,i,t)*m%t,E=(0,a.pow2)(b,o,t)*b%t,w=(0,a.pow2)(E,c,t)*E%t,A=(0,a.pow2)(w,l,t)*w%t,S=(0,a.pow2)(A,c,t)*E%t,v=(0,a.pow2)(S,n,t)*f%t,T=(0,a.pow2)(v,s,t)*b%t,O=(0,a.pow2)(T,r,t)*d%t,I=(0,a.pow2)(O,g,t);if(!p.eql(p.sqr(I),e))throw new Error("Cannot find square root");return I}});t.secp256k1=(0,o.createCurve)({...u,Fp:p,lowS:!0,endo:d},r.sha256);const y={};function m(e,...t){let n=y[e];if(void 0===n){const t=(0,r.sha256)((0,l.utf8ToBytes)(e));n=(0,l.concatBytes)(t,t),y[e]=n}return(0,r.sha256)((0,l.concatBytes)(n,...t))}const b=e=>e.toBytes(!0).slice(1),E=(()=>t.secp256k1.Point)(),w=e=>e%g===f;function A(e){const{Fn:t,BASE:n}=E,r=(0,c._normFnElement)(t,e),i=n.multiply(r);return{scalar:w(i.y)?r:t.neg(r),bytes:b(i)}}function S(e){const t=p;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x ≥ p");const n=t.create(e*e),r=t.create(n*e+BigInt(7));let i=t.sqrt(r);w(i)||(i=t.neg(i));const o=E.fromAffine({x:e,y:i});return o.assertValidity(),o}const v=l.bytesToNumberBE;function T(...e){return E.Fn.create(v(m("BIP0340/challenge",...e)))}function O(e){return A(e).bytes}function I(e,t,n=(0,i.randomBytes)(32)){const{Fn:r}=E,o=(0,l.ensureBytes)("message",e),{bytes:s,scalar:a}=A(t),c=(0,l.ensureBytes)("auxRand",n,32),u=r.toBytes(a^v(m("BIP0340/aux",c))),d=m("BIP0340/nonce",u,s,o),{bytes:f,scalar:h}=A(d),g=T(f,s,o),p=new Uint8Array(64);if(p.set(f,0),p.set(r.toBytes(r.create(h+g*a)),32),!B(p,o,s))throw new Error("sign: Invalid signature produced");return p}function B(e,t,n){const{Fn:r,BASE:i}=E,o=(0,l.ensureBytes)("signature",e,64),s=(0,l.ensureBytes)("message",t),a=(0,l.ensureBytes)("publicKey",n,32);try{const e=S(v(a)),t=v(o.subarray(0,32));if(!(0,l.inRange)(t,h,u.p))return!1;const n=v(o.subarray(32,64));if(!(0,l.inRange)(n,h,u.n))return!1;const c=T(r.toBytes(t),b(e),s),d=i.multiplyUnsafe(n).add(e.multiplyUnsafe(r.neg(c))),{x:f,y:g}=d.toAffine();return!(d.is0()||!w(g)||f!==t)}catch(e){return!1}}t.schnorr=(()=>{const e=(e=(0,i.randomBytes)(48))=>(0,a.mapHashToField)(e,u.n);return t.secp256k1.utils.randomSecretKey,{keygen:function(t){const n=e(t);return{secretKey:n,publicKey:O(n)}},getPublicKey:O,sign:I,verify:B,Point:E,utils:{randomSecretKey:e,randomPrivateKey:e,taggedHash:m,lift_x:S,pointToBytes:b,numberToBytesBE:l.numberToBytesBE,bytesToNumberBE:l.bytesToNumberBE,mod:a.mod},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();const _=(()=>(0,s.isogenyMap)(p,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),N=(()=>(0,c.mapToCurveSimpleSWU)(p,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:p.create(BigInt("-11"))}))();t.secp256k1_hasher=(0,s.createHasher)(t.secp256k1.Point,e=>{const{x:t,y:n}=N(p.create(e[0]));return _(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:p.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},9492:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Amount=void 0;const i=n(892),o=n(5763),s=n(5967),a=n(1275),c=r(n(735)),l=n(619),u=n(5517),d=n(6905),f=new c.default("1e17"),h=new c.default("1e-6"),g=BigInt(4294967295),p=BigInt(0x8000000000000000);c.default.config({EXPONENTIAL_AT:[-112,96]});class y extends a.SerializedType{constructor(e){super(null!=e?e:y.defaultAmount.bytes)}static from(e){if(e instanceof y)return e;let t=new Uint8Array(8);if("string"==typeof e){y.assertXrpIsValid(e);const n=BigInt(e),r=[new Uint8Array(4),new Uint8Array(4)];return(0,u.writeUInt32BE)(r[0],Number(n>>BigInt(32)),0),(0,u.writeUInt32BE)(r[1],Number(n&BigInt(g)),0),t=(0,l.concat)(r),t[0]|=64,new y(t)}if(function(e){const t=Object.keys(e).sort();return 3===t.length&&"currency"===t[0]&&"issuer"===t[1]&&"value"===t[2]}(e)){const n=new c.default(e.value);if(y.assertIouIsValid(n),n.isZero())t[0]|=128;else{const e=n.times("1e"+-((n.e||0)-15)).abs().toString(),r=BigInt(e),i=[new Uint8Array(4),new Uint8Array(4)];(0,u.writeUInt32BE)(i[0],Number(r>>BigInt(32)),0),(0,u.writeUInt32BE)(i[1],Number(r&BigInt(g)),0),t=(0,l.concat)(i),t[0]|=128,n.gt(new c.default(0))&&(t[0]|=64);const o=(n.e||0)-15+97;t[0]|=o>>>2,t[1]|=(3&o)<<6}const r=s.Currency.from(e.currency).toBytes(),i=o.AccountID.from(e.issuer).toBytes();return new y((0,l.concat)([t,r,i]))}if(function(e){const t=Object.keys(e).sort();return 2===t.length&&"mpt_issuance_id"===t[0]&&"value"===t[1]}(e)){y.assertMptIsValid(e.value);let n=new Uint8Array(1);n[0]|=96;const r=BigInt(e.value),i=[new Uint8Array(4),new Uint8Array(4)];(0,u.writeUInt32BE)(i[0],Number(r>>BigInt(32)),0),(0,u.writeUInt32BE)(i[1],Number(r&BigInt(g)),0),t=(0,l.concat)(i);const o=d.Hash192.from(e.mpt_issuance_id).toBytes();return new y((0,l.concat)([n,t,o]))}throw new Error("Invalid type to construct an Amount")}static fromParser(e){if(128&e.peek())return new y(e.read(48));const t=32&e.peek()?33:8;return new y(e.read(t))}toJSON(){if(this.isNative()){const e=this.bytes,t=64&e[0]?"":"-";e[0]&=63;const n=BigInt((0,u.readUInt32BE)(e.slice(0,4),0)),r=BigInt((0,u.readUInt32BE)(e.slice(4),0));return`${t}${(n<<BigInt(32)|r).toString()}`}if(this.isIOU()){const e=new i.BinaryParser(this.toString()),t=e.read(8),n=s.Currency.fromParser(e),r=o.AccountID.fromParser(e),a=t[0],u=64&a?"":"-",d=((63&a)<<2)+((255&t[1])>>6)-97;t[0]=0,t[1]&=63;const f=new c.default(`${u}0x${(0,l.bytesToHex)(t)}`).times(`1e${d}`);return y.assertIouIsValid(f),{value:f.toString(),currency:n.toJSON(),issuer:r.toJSON()}}if(this.isMPT()){const e=new i.BinaryParser(this.toString()),t=e.read(1),n=e.read(8),r=d.Hash192.fromParser(e),o=64&t[0]?"":"-",s=BigInt((0,u.readUInt32BE)(n.slice(0,4),0)),a=BigInt((0,u.readUInt32BE)(n.slice(4),0));return{value:`${o}${(s<<BigInt(32)|a).toString()}`,mpt_issuance_id:r.toString()}}throw new Error("Invalid amount to construct JSON")}static assertXrpIsValid(e){if(-1!==e.indexOf("."))throw new Error(`${e.toString()} is an illegal amount`);const t=new c.default(e);if(!t.isZero()&&(t.lt(h)||t.gt(f)))throw new Error(`${e.toString()} is an illegal amount`)}static assertIouIsValid(e){if(!e.isZero()){const t=e.precision(),n=(e.e||0)-15;if(t>16||n>80||n<-96)throw new Error("Decimal precision out of range");this.verifyNoDecimal(e)}}static assertMptIsValid(e){if(-1!==e.indexOf("."))throw new Error(`${e.toString()} is an illegal amount`);const t=new c.default(e);if(!t.isZero()){if(t<(0,c.default)(0))throw new Error(`${e.toString()} is an illegal amount`);if(0!=Number(BigInt(e)&BigInt(p)))throw new Error(`${e.toString()} is an illegal amount`)}}static verifyNoDecimal(e){if(-1!==e.times("1e"+-((e.e||0)-15)).abs().toString().indexOf("."))throw new Error("Decimal place found in integerNumberString")}isNative(){return!(128&this.bytes[0]||32&this.bytes[0])}isMPT(){return!(128&this.bytes[0]||!(32&this.bytes[0]))}isIOU(){return!!(128&this.bytes[0])}}t.Amount=y,y.defaultAmount=new y((0,l.hexToBytes)("4000000000000000"))},9543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signingBatchData=t.transactionID=t.sha512Half=t.binaryToJSON=t.signingClaimData=t.signingData=t.multiSigningData=t.readJSON=t.serializeObject=t.makeParser=t.BytesList=t.BinarySerializer=t.BinaryParser=void 0;const r=n(619),i=n(6986),o=n(892);Object.defineProperty(t,"BinaryParser",{enumerable:!0,get:function(){return o.BinaryParser}});const s=n(7375),a=n(7995);Object.defineProperty(t,"BinarySerializer",{enumerable:!0,get:function(){return a.BinarySerializer}}),Object.defineProperty(t,"BytesList",{enumerable:!0,get:function(){return a.BytesList}});const c=n(7410);Object.defineProperty(t,"sha512Half",{enumerable:!0,get:function(){return c.sha512Half}}),Object.defineProperty(t,"transactionID",{enumerable:!0,get:function(){return c.transactionID}});const l=n(1141),u=(e,t)=>new o.BinaryParser(e instanceof Uint8Array?(0,r.bytesToHex)(e):e,t);t.makeParser=u;const d=(e,t=l.DEFAULT_DEFINITIONS)=>e.readType(i.coreTypes.STObject).toJSON(t);function f(e,t={}){const{prefix:n,suffix:r,signingFieldsOnly:o=!1,definitions:s}=t,c=new a.BytesList;n&&c.put(n);const l=o?e=>e.isSigningField:void 0;return i.coreTypes.STObject.from(e,l,s).toBytesSink(c),r&&c.put(r),c.toBytes()}t.readJSON=d,t.binaryToJSON=(e,t)=>d(u(e,t),t),t.serializeObject=f,t.signingData=function(e,t=s.HashPrefix.transactionSig,n={}){return f(e,{prefix:t,signingFieldsOnly:!0,definitions:n.definitions})},t.signingClaimData=function(e){const t=BigInt(String(e.amount)),n=s.HashPrefix.paymentChannelClaim,r=i.coreTypes.Hash256.from(e.channel).toBytes(),o=i.coreTypes.UInt64.from(t).toBytes(),c=new a.BytesList;return c.put(n),c.put(r),c.put(o),c.toBytes()},t.multiSigningData=function(e,t,n={definitions:l.DEFAULT_DEFINITIONS}){return f(e,{prefix:s.HashPrefix.transactionMultiSig,suffix:i.coreTypes.AccountID.from(t).toBytes(),signingFieldsOnly:!0,definitions:n.definitions})},t.signingBatchData=function(e){if(null==e.flags)throw Error("No field `flags'");if(null==e.txIDs)throw Error("No field `txIDs`");const t=s.HashPrefix.batch,n=i.coreTypes.UInt32.from(e.flags).toBytes(),r=i.coreTypes.UInt32.from(e.txIDs.length).toBytes(),o=new a.BytesList;return o.put(t),o.put(n),o.put(r),e.txIDs.forEach(e=>{o.put(i.coreTypes.Hash256.from(e).toBytes())}),o.toBytes()}},9566:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(255);t.default=class{constructor(){this.nextId=0,this.promisesAwaitingResponse=new Map}addPromise(e,t){return r(this,void 0,void 0,function*(){return new Promise((n,r)=>{this.promisesAwaitingResponse.set(e,{resolve:n,reject:r,timer:t})})})}resolve(e,t){const n=this.promisesAwaitingResponse.get(e);if(null==n)throw new i.XrplError(`No existing promise with id ${e}`,{type:"resolve",response:t});clearTimeout(n.timer),n.resolve(t),this.deletePromise(e)}reject(e,t){const n=this.promisesAwaitingResponse.get(e);if(null==n)throw new i.XrplError(`No existing promise with id ${e}`,{type:"reject",error:t});clearTimeout(n.timer),n.reject(t),this.deletePromise(e)}rejectAll(e){this.promisesAwaitingResponse.forEach((t,n,r)=>{this.reject(n,e),this.deletePromise(n)})}createRequest(e,t){let n;null==e.id?(n=this.nextId,this.nextId+=1):n=e.id;const r=JSON.stringify(Object.assign(Object.assign({},e),{id:n})),o=setTimeout(()=>{this.reject(n,new i.TimeoutError(`Timeout for request: ${JSON.stringify(e)} with id ${n}`,e))},t);if(o.unref&&o.unref(),this.promisesAwaitingResponse.has(n))throw clearTimeout(o),new i.XrplError(`Response with id '${n}' is already pending`,e);const s=new Promise((e,t)=>{this.promisesAwaitingResponse.set(n,{resolve:e,reject:t,timer:o})});return[n,r,s]}handleResponse(e){var t,n,r;if(null==e.id||"string"!=typeof e.id&&"number"!=typeof e.id)throw new i.ResponseFormatError("valid id not found in response",e);if(this.promisesAwaitingResponse.has(e.id)){if(null==e.status){const t=new i.ResponseFormatError("Response has no status");this.reject(e.id,t)}if("error"===e.status){const r=e,o=new i.RippledError(null!==(n=null!==(t=r.error_message)&&void 0!==t?t:r.error_exception)&&void 0!==n?n:r.error,r);return void this.reject(e.id,o)}if("success"!==e.status){const t=new i.ResponseFormatError(`unrecognized response.status: ${null!==(r=e.status)&&void 0!==r?r:""}`,e);return void this.reject(e.id,t)}delete e.status,this.resolve(e.id,e)}}deletePromise(e){this.promisesAwaitingResponse.delete(e)}}},9577:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(8516),o=n(619),s=r(n(3212)),a=r(n(4876)),c={deriveKeypair(e){const t=a.default.half(e);return{privateKey:"ED"+(0,o.bytesToHex)(t),publicKey:"ED"+(0,o.bytesToHex)(i.ed25519.getPublicKey(t))}},sign:(e,t)=>(s.default.ok(e instanceof Uint8Array,"message must be array of octets"),s.default.ok(66===t.length,"private key must be 33 bytes including prefix"),(0,o.bytesToHex)(i.ed25519.sign(e,t.slice(2)))),verify:(e,t,n)=>(s.default.ok(66===n.length,"public key must be 33 bytes including prefix"),i.ed25519.verify(t,e,n.slice(2),{zip215:!1}))};t.default=c},9672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransactionFlags=t.convertTxFlagsToNumber=t.setTransactionFlagsToNumber=t.parseAccountRootFlags=void 0;const r=n(255),i=n(8444),o=n(3750),s=n(3746),a=n(6214),c=n(988),l=n(6695),u=n(2794),d=n(3094),f=n(9962),h=n(548),g=n(5842),p=n(8718),y=n(9349),m=n(1441),b=n(2152),E=n(6181),w=n(5615),A=n(4329),S=n(99);t.parseAccountRootFlags=function(e){const t={};return Object.values(i.AccountRootFlags).forEach(n=>{"string"==typeof n&&(0,S.isFlagEnabled)(e,i.AccountRootFlags[n])&&(t[n]=!0)}),t};const v={AccountSet:o.AccountSetTfFlags,AMMClawback:s.AMMClawbackFlags,AMMDeposit:a.AMMDepositFlags,AMMWithdraw:c.AMMWithdrawFlags,Batch:l.BatchFlags,MPTokenAuthorize:d.MPTokenAuthorizeFlags,MPTokenIssuanceCreate:f.MPTokenIssuanceCreateFlags,MPTokenIssuanceSet:h.MPTokenIssuanceSetFlags,NFTokenCreateOffer:g.NFTokenCreateOfferFlags,NFTokenMint:p.NFTokenMintFlags,OfferCreate:y.OfferCreateFlags,PaymentChannelClaim:b.PaymentChannelClaimFlags,Payment:m.PaymentFlags,TrustSet:E.TrustSetFlags,VaultCreate:w.VaultCreateFlags,XChainModifyBridge:A.XChainModifyBridgeFlags};function T(e){return e in v}function O(e){const t=e.Flags;if(null==t)return 0;if("number"==typeof t)return t;if(T(e.TransactionType)){const n=v[e.TransactionType];return Object.keys(t).reduce((e,i)=>{var o;if(null==n[i]&&null==u.GlobalFlags[i])throw new r.ValidationError(`Invalid flag ${i}.`);return t[i]?e|(null!==(o=n[i])&&void 0!==o?o:u.GlobalFlags[i]):e},0)}return Object.keys(t).reduce((e,n)=>{if(null==u.GlobalFlags[n])throw new r.ValidationError(`Invalid flag ${n}. Valid flags are ${JSON.stringify(u.GlobalFlags)}`);return t[n]?e|u.GlobalFlags[n]:e},0)}t.setTransactionFlagsToNumber=function(e){console.warn("This function is deprecated. Use convertTxFlagsToNumber() instead and use the returned value to modify the Transaction.Flags from the caller."),e.Flags&&(e.Flags=O(e))},t.convertTxFlagsToNumber=O,t.parseTransactionFlags=function(e){const t=O(e);if(0===t)return{};const n={};if(T(e.TransactionType)){const r=v[e.TransactionType];Object.values(r).forEach(e=>{"string"==typeof e&&(0,S.isFlagEnabled)(t,r[e])&&(n[e]=!0)})}return Object.values(u.GlobalFlags).forEach(e=>{"string"==typeof e&&(0,S.isFlagEnabled)(t,u.GlobalFlags[e])&&(n[e]=!0)}),n}},9726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOracleDelete=void 0;const r=n(2794);t.validateOracleDelete=function(e){(0,r.validateBaseTransaction)(e),(0,r.validateRequiredField)(e,"OracleDocumentID",r.isNumber)}},9729:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeMPTokenMetadata=t.decodeMPTokenMetadata=t.validateMPTokenMetadata=t.parseTransactionFlags=t.convertTxFlagsToNumber=t.setTransactionFlagsToNumber=t.parseAccountRootFlags=t.LedgerEntry=void 0,t.LedgerEntry=o(n(8823));var a=n(9672);Object.defineProperty(t,"parseAccountRootFlags",{enumerable:!0,get:function(){return a.parseAccountRootFlags}}),Object.defineProperty(t,"setTransactionFlagsToNumber",{enumerable:!0,get:function(){return a.setTransactionFlagsToNumber}}),Object.defineProperty(t,"convertTxFlagsToNumber",{enumerable:!0,get:function(){return a.convertTxFlagsToNumber}}),Object.defineProperty(t,"parseTransactionFlags",{enumerable:!0,get:function(){return a.parseTransactionFlags}});var c=n(2012);Object.defineProperty(t,"validateMPTokenMetadata",{enumerable:!0,get:function(){return c.validateMPTokenMetadata}}),Object.defineProperty(t,"decodeMPTokenMetadata",{enumerable:!0,get:function(){return c.decodeMPTokenMetadata}}),Object.defineProperty(t,"encodeMPTokenMetadata",{enumerable:!0,get:function(){return c.encodeMPTokenMetadata}}),s(n(8932),t),s(n(9843),t),s(n(1279),t)},9760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateMnemonic=function(e,t=128){if((0,o.anumber)(t),t%32!=0||t>256)throw new TypeError("Invalid entropy");return g((0,o.randomBytes)(t/8),e)},t.mnemonicToEntropy=h,t.entropyToMnemonic=g,t.validateMnemonic=function(e,t){try{h(e,t)}catch(e){return!1}return!0},t.mnemonicToSeed=function(e,t=""){return(0,r.pbkdf2Async)(i.sha512,l(e).nfkd,p(t),{c:2048,dkLen:64})},t.mnemonicToSeedSync=function(e,t=""){return(0,r.pbkdf2)(i.sha512,l(e).nfkd,p(t),{c:2048,dkLen:64})};const r=n(4204),i=n(4233),o=n(5492),s=n(1616),a=e=>"あいこくしん"===e[0];function c(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function l(e){const t=c(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function u(e){(0,o.abytes)(e,16,20,24,28,32)}const d=e=>{const t=8-e.length/4;return new Uint8Array([(0,i.sha256)(e)[0]>>t<<t])};function f(e){if(!Array.isArray(e)||2048!==e.length||"string"!=typeof e[0])throw new Error("Wordlist: expected array of 2048 strings");return e.forEach(e=>{if("string"!=typeof e)throw new Error("wordlist: non-string element: "+e)}),s.utils.chain(s.utils.checksum(1,d),s.utils.radix2(11,!0),s.utils.alphabet(e))}function h(e,t){const{words:n}=l(e),r=f(t).decode(n);return u(r),r}function g(e,t){return u(e),f(t).encode(e).join(a(t)?" ":" ")}const p=e=>c("mnemonic"+e)},9843:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.XChainModifyBridgeFlags=t.VaultWithdrawalPolicy=t.VaultCreateFlags=t.TrustSetFlags=t.PaymentChannelClaimFlags=t.PaymentFlags=t.OfferCreateFlags=t.validateNFTokenModify=t.NFTokenMintFlags=t.NFTokenCreateOfferFlags=t.MPTokenIssuanceSetFlags=t.MPTokenIssuanceCreateFlags=t.MPTokenAuthorizeFlags=t.EnableAmendmentFlags=t.BatchFlags=t.AMMWithdrawFlags=t.AMMDepositFlags=t.AMMClawbackFlags=t.AccountSetTfFlags=t.AccountSetAsfFlags=t.validate=t.isMPTAmount=t.GlobalFlags=void 0;var o=n(2794);Object.defineProperty(t,"GlobalFlags",{enumerable:!0,get:function(){return o.GlobalFlags}}),Object.defineProperty(t,"isMPTAmount",{enumerable:!0,get:function(){return o.isMPTAmount}});var s=n(5863);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return s.validate}}),i(n(3342),t);var a=n(3750);Object.defineProperty(t,"AccountSetAsfFlags",{enumerable:!0,get:function(){return a.AccountSetAsfFlags}}),Object.defineProperty(t,"AccountSetTfFlags",{enumerable:!0,get:function(){return a.AccountSetTfFlags}});var c=n(3746);Object.defineProperty(t,"AMMClawbackFlags",{enumerable:!0,get:function(){return c.AMMClawbackFlags}});var l=n(6214);Object.defineProperty(t,"AMMDepositFlags",{enumerable:!0,get:function(){return l.AMMDepositFlags}});var u=n(988);Object.defineProperty(t,"AMMWithdrawFlags",{enumerable:!0,get:function(){return u.AMMWithdrawFlags}});var d=n(6695);Object.defineProperty(t,"BatchFlags",{enumerable:!0,get:function(){return d.BatchFlags}});var f=n(7493);Object.defineProperty(t,"EnableAmendmentFlags",{enumerable:!0,get:function(){return f.EnableAmendmentFlags}});var h=n(3094);Object.defineProperty(t,"MPTokenAuthorizeFlags",{enumerable:!0,get:function(){return h.MPTokenAuthorizeFlags}});var g=n(9962);Object.defineProperty(t,"MPTokenIssuanceCreateFlags",{enumerable:!0,get:function(){return g.MPTokenIssuanceCreateFlags}});var p=n(548);Object.defineProperty(t,"MPTokenIssuanceSetFlags",{enumerable:!0,get:function(){return p.MPTokenIssuanceSetFlags}});var y=n(5842);Object.defineProperty(t,"NFTokenCreateOfferFlags",{enumerable:!0,get:function(){return y.NFTokenCreateOfferFlags}});var m=n(8718);Object.defineProperty(t,"NFTokenMintFlags",{enumerable:!0,get:function(){return m.NFTokenMintFlags}});var b=n(7636);Object.defineProperty(t,"validateNFTokenModify",{enumerable:!0,get:function(){return b.validateNFTokenModify}});var E=n(9349);Object.defineProperty(t,"OfferCreateFlags",{enumerable:!0,get:function(){return E.OfferCreateFlags}});var w=n(1441);Object.defineProperty(t,"PaymentFlags",{enumerable:!0,get:function(){return w.PaymentFlags}});var A=n(2152);Object.defineProperty(t,"PaymentChannelClaimFlags",{enumerable:!0,get:function(){return A.PaymentChannelClaimFlags}});var S=n(6181);Object.defineProperty(t,"TrustSetFlags",{enumerable:!0,get:function(){return S.TrustSetFlags}});var v=n(5615);Object.defineProperty(t,"VaultCreateFlags",{enumerable:!0,get:function(){return v.VaultCreateFlags}}),Object.defineProperty(t,"VaultWithdrawalPolicy",{enumerable:!0,get:function(){return v.VaultWithdrawalPolicy}});var T=n(4329);Object.defineProperty(t,"XChainModifyBridgeFlags",{enumerable:!0,get:function(){return T.XChainModifyBridgeFlags}})},9859:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.promisesAwaitingConnection=[]}resolveAllAwaiting(){this.promisesAwaitingConnection.map(({resolve:e})=>e()),this.promisesAwaitingConnection=[]}rejectAllAwaiting(e){this.promisesAwaitingConnection.map(({reject:t})=>t(e)),this.promisesAwaitingConnection=[]}awaitConnection(){return n(this,void 0,void 0,function*(){return new Promise((e,t)=>{this.promisesAwaitingConnection.push({resolve:e,reject:t})})})}}},9962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMPTokenIssuanceCreate=t.MPTokenIssuanceCreateFlags=void 0;const r=n(255),i=n(99),o=n(2012),s=n(2794);var a;!function(e){e[e.tfMPTCanLock=2]="tfMPTCanLock",e[e.tfMPTRequireAuth=4]="tfMPTRequireAuth",e[e.tfMPTCanEscrow=8]="tfMPTCanEscrow",e[e.tfMPTCanTrade=16]="tfMPTCanTrade",e[e.tfMPTCanTransfer=32]="tfMPTCanTransfer",e[e.tfMPTCanClawback=64]="tfMPTCanClawback"}(a||(t.MPTokenIssuanceCreateFlags=a={})),t.validateMPTokenIssuanceCreate=function(e){var t,n;if((0,s.validateBaseTransaction)(e),(0,s.validateOptionalField)(e,"MaximumAmount",s.isString),(0,s.validateOptionalField)(e,"MPTokenMetadata",s.isString),(0,s.validateOptionalField)(e,"TransferFee",s.isNumber),(0,s.validateOptionalField)(e,"AssetScale",s.isNumber),"string"==typeof e.MPTokenMetadata&&(!(0,i.isHex)(e.MPTokenMetadata)||e.MPTokenMetadata.length/2>o.MAX_MPT_META_BYTE_LENGTH))throw new r.ValidationError(`MPTokenIssuanceCreate: MPTokenMetadata (hex format) must be non-empty and no more than ${o.MAX_MPT_META_BYTE_LENGTH} bytes.`);if("string"==typeof e.MaximumAmount){if(!i.INTEGER_SANITY_CHECK.exec(e.MaximumAmount))throw new r.ValidationError("MPTokenIssuanceCreate: Invalid MaximumAmount");if(BigInt(e.MaximumAmount)>BigInt("9223372036854775807")||BigInt(e.MaximumAmount)<BigInt("0"))throw new r.ValidationError("MPTokenIssuanceCreate: MaximumAmount out of range")}if("number"==typeof e.TransferFee){const o=null!==(t=e.Flags)&&void 0!==t?t:0,s="number"==typeof o?(0,i.isFlagEnabled)(o,a.tfMPTCanTransfer):null!==(n=o.tfMPTCanTransfer)&&void 0!==n&&n;if(e.TransferFee<0||e.TransferFee>5e4)throw new r.ValidationError("MPTokenIssuanceCreate: TransferFee must be between 0 and 50000");if(e.TransferFee&&!s)throw new r.ValidationError("MPTokenIssuanceCreate: TransferFee cannot be provided without enabling tfMPTCanTransfer flag")}if(null!=e.MPTokenMetadata){const t=(0,o.validateMPTokenMetadata)(e.MPTokenMetadata);if(t.length>0){const e=[o.MPT_META_WARNING_HEADER,...t.map(e=>`- ${e}`)].join("\n");console.warn(e)}}}},9966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAMMCreate=t.AMM_MAX_TRADING_FEE=void 0;const r=n(255),i=n(2794);t.AMM_MAX_TRADING_FEE=1e3,t.validateAMMCreate=function(e){if((0,i.validateBaseTransaction)(e),null==e.Amount)throw new r.ValidationError("AMMCreate: missing field Amount");if(!(0,i.isAmount)(e.Amount))throw new r.ValidationError("AMMCreate: Amount must be an Amount");if(null==e.Amount2)throw new r.ValidationError("AMMCreate: missing field Amount2");if(!(0,i.isAmount)(e.Amount2))throw new r.ValidationError("AMMCreate: Amount2 must be an Amount");if(null==e.TradingFee)throw new r.ValidationError("AMMCreate: missing field TradingFee");if("number"!=typeof e.TradingFee)throw new r.ValidationError("AMMCreate: TradingFee must be a number");if(e.TradingFee<0||e.TradingFee>t.AMM_MAX_TRADING_FEE)throw new r.ValidationError(`AMMCreate: TradingFee must be between 0 and ${t.AMM_MAX_TRADING_FEE}`)}},9987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.isLE=void 0,t.isBytes=function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=o,t.byteSwap32=function(e){for(let t=0;t<e.length;t++)e[t]=o(e[t])},t.bytesToHex=function(e){(0,i.abytes)(e);let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=c(e.charCodeAt(i)),o=c(e.charCodeAt(i+1));if(void 0===n||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+o}return r},t.asyncLoop=async function(e,n,r){let i=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-i;e>=0&&e<n||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=l,t.toBytes=u,t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];(0,i.abytes)(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return r.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")};const r=n(1845),i=n(5489);function o(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwapIfBE=t.isLE?e=>e:e=>o(e);const s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),a={_0:48,_9:57,A:65,F:70,a:97,f:102};function c(e){return e>=a._0&&e<=a._9?e-a._0:e>=a.A&&e<=a.F?e-(a.A-10):e>=a.a&&e<=a.f?e-(a.a-10):void 0}function l(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function u(e){return"string"==typeof e&&(e=l(e)),(0,i.abytes)(e),e}t.nextTick=async()=>{},t.Hash=class{clone(){return this._cloneInto()}}}},t={},n=function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(5642);xrpl=n})();
3
3
  //# sourceMappingURL=xrpl-latest-min.js.map