@revibase/core 0.0.58 → 0.0.60
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.
- package/README.md +299 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -18
- package/dist/index.d.ts +42 -18
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),m=require('zod'),superstruct=require('superstruct'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),jsonCanonicalize=require('json-canonicalize'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var m__default=/*#__PURE__*/_interopDefault(m);var Cs=new Uint8Array([201,232,212,229,59,241,106,197]);function Nh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Cs)}function Rg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["numOrigins",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),515)]]),e=>({...e,discriminator:Cs}))}function Es(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["numOrigins",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),515)]])}function wh(){return gill.combineCodec(Rg(),Es())}function Ds(e){return gill.decodeAccount(e,Es())}async function Ps(e,n,r){let o=await bg(e,n,r);return gill.assertAccountExists(o),o}async function bg(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Ds(o)}async function Hh(e,n,r){let o=await _g(e,n,r);return gill.assertAccountsExist(o),o}async function _g(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ds(t))}function Vh(){return 846}var Rs=new Uint8Array([42,206,176,58,175,129,130,233]);function zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Rs)}function zg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Rs}))}function bs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function Kh(){return gill.combineCodec(zg(),bs())}function _s(e){return gill.decodeAccount(e,bs())}async function jh(e,n,r){let o=await Kg(e,n,r);return gill.assertAccountExists(o),o}async function Kg(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return _s(o)}async function qh(e,n,r){let o=await jg(e,n,r);return gill.assertAccountsExist(o),o}async function jg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>_s(t))}function Jh(){return 24}function tn(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function rn(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Xh(){return gill.combineCodec(tn(),rn())}function nn(){return gill.getStructEncoder([["memberKey",V()],["permissions",Ge()],["userArgs",Ke()]])}function on(){return gill.getStructDecoder([["memberKey",ie()],["permissions",ze()],["userArgs",je()]])}function tR(){return gill.combineCodec(nn(),on())}function sn(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function cn(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function oR(){return gill.combineCodec(sn(),cn())}function It(){return gill.getStructEncoder([["treeInfo",Et()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ct(){return gill.getStructDecoder([["treeInfo",Dt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function iR(){return gill.combineCodec(It(),Ct())}function Pt(){return gill.getStructEncoder([["treeInfo",Et()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Mt(){return gill.getStructDecoder([["treeInfo",Dt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function gR(){return gill.combineCodec(Pt(),Mt())}function an(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function dn(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function lR(){return gill.combineCodec(an(),dn())}function mn(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function ln(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function fR(){return gill.combineCodec(mn(),ln())}function ht(){return gill.getStructEncoder([["data",gill.getOptionEncoder(Tn())]])}function J(){return gill.getStructDecoder([["data",gill.getOptionDecoder(yn())]])}function CR(){return gill.combineCodec(ht(),J())}function Tn(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Rt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function yn(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(bt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function MR(){return gill.combineCodec(Tn(),yn())}function _t(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",Sn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(fn()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function vt(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",xn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Ut()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function _R(){return gill.combineCodec(_t(),vt())}function En(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",Pn()]])}function Dn(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Mn()]])}function WR(){return gill.combineCodec(En(),Dn())}function Pn(){return gill.getStructEncoder([["configAccountVersion",gill.getU16Encoder()],["compressToPubkey",gill.getU8Encoder()],["accountVersion",gill.getU8Encoder()],["lamportsPerWrite",gill.getU32Encoder()],["compressionAuthority",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["rentSponsor",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["lastClaimedSlot",gill.getU64Encoder()],["rentExemptionPaid",gill.getU32Encoder()],["reserved",gill.getU32Encoder()],["rentConfig",bn()]])}function Mn(){return gill.getStructDecoder([["configAccountVersion",gill.getU16Decoder()],["compressToPubkey",gill.getU8Decoder()],["accountVersion",gill.getU8Decoder()],["lamportsPerWrite",gill.getU32Decoder()],["compressionAuthority",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["rentSponsor",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["lastClaimedSlot",gill.getU64Decoder()],["rentExemptionPaid",gill.getU32Decoder()],["reserved",gill.getU32Decoder()],["rentConfig",_n()]])}function NR(){return gill.combineCodec(Pn(),Mn())}function qe(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(kn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(nn())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Ln())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Je(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Wn())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(on())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(On())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function FR(){return gill.combineCodec(qe(),Je())}function GR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function zR(e,n){return n.__kind===e}function Bn(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ye()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",ve()]])}function Nn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Ze()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Ue()]])}function JR(){return gill.combineCodec(Bn(),Nn())}function kn(){return gill.getStructEncoder([["memberKey",V()],["permissions",Ge()]])}function Wn(){return gill.getStructDecoder([["memberKey",ie()],["permissions",ze()]])}function QR(){return gill.combineCodec(kn(),Wn())}function kt(){return gill.getStructEncoder([["memberKey",V()],["messageHash",gill.getOptionEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))]])}function Wt(){return gill.getStructDecoder([["memberKey",ie()],["messageHash",gill.getOptionDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))]])}function rb(){return gill.combineCodec(kt(),Wt())}function fn(){return gill.getDiscriminatedUnionEncoder([["Placeholder0",gill.getUnitEncoder()],["Placeholder1",gill.getUnitEncoder()],["Placeholder2",gill.getUnitEncoder()],["Placeholder3",gill.getUnitEncoder()],["Placeholder4",gill.getUnitEncoder()],["Placeholder5",gill.getUnitEncoder()],["Placeholder6",gill.getUnitEncoder()],["Placeholder7",gill.getUnitEncoder()],["Placeholder8",gill.getUnitEncoder()],["Placeholder9",gill.getUnitEncoder()],["Placeholder10",gill.getUnitEncoder()],["Placeholder11",gill.getUnitEncoder()],["Placeholder12",gill.getUnitEncoder()],["Placeholder13",gill.getUnitEncoder()],["Placeholder14",gill.getUnitEncoder()],["Placeholder15",gill.getUnitEncoder()],["Placeholder16",gill.getUnitEncoder()],["Placeholder17",gill.getUnitEncoder()],["Placeholder18",gill.getUnitEncoder()],["TokenMetadata",gill.getStructEncoder([["fields",gill.getTupleEncoder([Gn()])]])],["Placeholder20",gill.getUnitEncoder()],["Placeholder21",gill.getUnitEncoder()],["Placeholder22",gill.getUnitEncoder()],["Placeholder23",gill.getUnitEncoder()],["Placeholder24",gill.getUnitEncoder()],["Placeholder25",gill.getUnitEncoder()],["Placeholder26",gill.getUnitEncoder()],["PausableAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([wn()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Vn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Kn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([qn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([an()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([En()])]])]])}function Ut(){return gill.getDiscriminatedUnionDecoder([["Placeholder0",gill.getUnitDecoder()],["Placeholder1",gill.getUnitDecoder()],["Placeholder2",gill.getUnitDecoder()],["Placeholder3",gill.getUnitDecoder()],["Placeholder4",gill.getUnitDecoder()],["Placeholder5",gill.getUnitDecoder()],["Placeholder6",gill.getUnitDecoder()],["Placeholder7",gill.getUnitDecoder()],["Placeholder8",gill.getUnitDecoder()],["Placeholder9",gill.getUnitDecoder()],["Placeholder10",gill.getUnitDecoder()],["Placeholder11",gill.getUnitDecoder()],["Placeholder12",gill.getUnitDecoder()],["Placeholder13",gill.getUnitDecoder()],["Placeholder14",gill.getUnitDecoder()],["Placeholder15",gill.getUnitDecoder()],["Placeholder16",gill.getUnitDecoder()],["Placeholder17",gill.getUnitDecoder()],["Placeholder18",gill.getUnitDecoder()],["TokenMetadata",gill.getStructDecoder([["fields",gill.getTupleDecoder([zn()])]])],["Placeholder20",gill.getUnitDecoder()],["Placeholder21",gill.getUnitDecoder()],["Placeholder22",gill.getUnitDecoder()],["Placeholder23",gill.getUnitDecoder()],["Placeholder24",gill.getUnitDecoder()],["Placeholder25",gill.getUnitDecoder()],["Placeholder26",gill.getUnitDecoder()],["PausableAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Hn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Fn()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([jn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Jn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([dn()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([Dn()])]])]])}function cb(){return gill.combineCodec(fn(),Ut())}function ab(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function ib(e,n){return n.__kind===e}function Yn(){return gill.getStructEncoder([["settingsMutArgs",Y()],["transactionManager",gill.getOptionEncoder(Lt())]])}function Zn(){return gill.getStructDecoder([["settingsMutArgs",Z()],["transactionManager",gill.getOptionDecoder(Ot())]])}function gb(){return gill.combineCodec(Yn(),Zn())}function Rt(){return gill.getStructEncoder([["pubkey",V()],["role",gill.getU8Encoder()],["permissions",Ge()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function bt(){return gill.getStructDecoder([["pubkey",ie()],["role",gill.getU8Decoder()],["permissions",ze()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function Tb(){return gill.combineCodec(Rt(),bt())}function V(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function ie(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function Sb(){return gill.combineCodec(V(),ie())}function $n(){return gill.getStructEncoder([["authorityCreationArgs",ve()],["compressedProofArgs",D()]])}function eo(){return gill.getStructDecoder([["authorityCreationArgs",Ue()],["compressedProofArgs",P()]])}function Eb(){return gill.combineCodec($n(),eo())}function Bt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function Nt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function Mb(){return gill.combineCodec(Bt(),Nt())}function Sn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function xn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function bb(){return gill.combineCodec(Sn(),xn())}function Et(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Dt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function Ub(){return gill.combineCodec(Et(),Dt())}function wn(){return gill.getStructEncoder([])}function Hn(){return gill.getStructDecoder([])}function Lb(){return gill.combineCodec(wn(),Hn())}function Vn(){return gill.getStructEncoder([])}function Fn(){return gill.getStructDecoder([])}function Nb(){return gill.combineCodec(Vn(),Fn())}function Ge(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function ze(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function Vb(){return gill.combineCodec(Ge(),ze())}function D(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(mn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function P(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(ln())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function Kb(){return gill.combineCodec(D(),P())}function Ln(){return gill.getStructEncoder([["memberKey",V()],["userArgs",Ke()]])}function On(){return gill.getStructDecoder([["memberKey",ie()],["userArgs",je()]])}function Yb(){return gill.combineCodec(Ln(),On())}function bn(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function _n(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function Qb(){return gill.combineCodec(bn(),_n())}function no(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function wt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function t_(){return gill.combineCodec(no(),wt())}function F(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function G(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function o_(){return gill.combineCodec(F(),G())}function oo(){return gill.getStructEncoder([["verifyArgs",F()],["domainConfigIndex",gill.getU8Encoder()]])}function so(){return gill.getStructDecoder([["verifyArgs",G()],["domainConfigIndex",gill.getU8Decoder()]])}function i_(){return gill.combineCodec(oo(),so())}function co(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ao(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function A_(){return gill.combineCodec(co(),ao())}function io(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function uo(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function m_(){return gill.combineCodec(io(),uo())}function Y(){return gill.getStructEncoder([["accountMeta",It()],["data",ht()]])}function Z(){return gill.getStructDecoder([["accountMeta",Ct()],["data",J()]])}function f_(){return gill.combineCodec(Y(),Z())}function Ht(){return gill.getStructEncoder([["accountMeta",Pt()],["data",ht()]])}function Vt(){return gill.getStructDecoder([["accountMeta",Mt()],["data",J()]])}function C_(){return gill.combineCodec(Ht(),Vt())}function Ft(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function Gt(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function P_(){return gill.combineCodec(Ft(),Gt())}function Gn(){return gill.getStructEncoder([["updateAuthority",gill.getAddressEncoder()],["mint",gill.getAddressEncoder()],["name",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["symbol",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["uri",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["additionalMetadata",gill.getArrayEncoder(tn())]])}function zn(){return gill.getStructDecoder([["updateAuthority",gill.getAddressDecoder()],["mint",gill.getAddressDecoder()],["name",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["symbol",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["uri",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["additionalMetadata",gill.getArrayDecoder(rn())]])}function b_(){return gill.combineCodec(Gn(),zn())}function zt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(kt())]])}function Kt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(Wt())]])}function k_(){return gill.combineCodec(zt(),Kt())}function jt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(sn())],["addressTableLookups",gill.getArrayEncoder(yo())]])}function qt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(cn())],["addressTableLookups",gill.getArrayDecoder(fo())]])}function B_(){return gill.combineCodec(jt(),qt())}function yo(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function fo(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function H_(){return gill.combineCodec(yo(),fo())}function Q(){return gill.getDiscriminatedUnionEncoder([["Ed25519",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])],["Secp256r1",gill.getStructEncoder([["fields",gill.getTupleEncoder([oo()])]])]])}function $(){return gill.getDiscriminatedUnionDecoder([["Ed25519",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])],["Secp256r1",gill.getStructDecoder([["fields",gill.getTupleDecoder([so()])]])]])}function z_(){return gill.combineCodec(Q(),$())}function K_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function j_(e,n){return n.__kind===e}function Kn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function jn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function Y_(){return gill.combineCodec(Kn(),jn())}function qn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function Jn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function Q_(){return gill.combineCodec(qn(),Jn())}var So=(a=>(a[a.Ble=0]="Ble",a[a.Cable=1]="Cable",a[a.Hybrid=2]="Hybrid",a[a.Internal=3]="Internal",a[a.Nfc=4]="Nfc",a[a.SmartCard=5]="SmartCard",a[a.Usb=6]="Usb",a))(So||{});function Jt(){return gill.getEnumEncoder(So)}function Yt(){return gill.getEnumDecoder(So)}function tv(){return gill.combineCodec(Jt(),Yt())}function Zt(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",V()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Jt()))],["wallets",gill.getArrayEncoder(io())],["role",Ye()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function ne(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",ie()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(Yt()))],["wallets",gill.getArrayDecoder(uo())],["role",Ze()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function sv(){return gill.combineCodec(Zt(),ne())}function ve(){return gill.getStructEncoder([["addressTreeInfo",Bt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ue(){return gill.getStructDecoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function dv(){return gill.combineCodec(ve(),Ue())}function tt(){return gill.getStructEncoder([["accountMeta",It()],["data",Zt()]])}function rt(){return gill.getStructDecoder([["accountMeta",Ct()],["data",ne()]])}function pv(){return gill.combineCodec(tt(),rt())}function Lt(){return gill.getStructEncoder([["accountMeta",Pt()],["data",Zt()]])}function Ot(){return gill.getStructDecoder([["accountMeta",Mt()],["data",ne()]])}function yv(){return gill.combineCodec(Lt(),Ot())}function Ke(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Lt()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([tt()])]])]])}function je(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Ot()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([rt()])]])]])}function Iv(){return gill.combineCodec(Ke(),je())}function Cv(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function Ev(e,n){return n.__kind===e}var Ne=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(Ne||{});function Ye(){return gill.getEnumEncoder(Ne)}function Ze(){return gill.getEnumDecoder(Ne)}function Mv(){return gill.combineCodec(Ye(),Ze())}var Gc=new Uint8Array([223,179,163,190,177,224,67,173]);function bU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gc)}function W1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Rt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Gc}))}function hr(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(bt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function _U(){return gill.combineCodec(W1(),hr())}function zc(e){return gill.decodeAccount(e,hr())}async function vU(e,n,r){let o=await xo(e,n,r);return gill.assertAccountExists(o),o}async function xo(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return zc(o)}async function UU(e,n,r){let o=await L1(e,n,r);return gill.assertAccountsExist(o),o}async function L1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zc(t))}var Yc=new Uint8Array([90,36,35,219,93,225,110,96]);function OU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Yc)}function $1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["multiWalletSettings",gill.getAddressEncoder()],["multiWalletBump",gill.getU8Encoder()],["canExecute",gill.getBooleanEncoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["validTill",gill.getU64Encoder()],["payer",gill.getAddressEncoder()],["bump",gill.getU8Encoder()],["bufferIndex",gill.getU8Encoder()],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["creator",V()],["executor",V()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(V())],["expectedSigners",gill.getArrayEncoder(kt())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Yc}))}function Zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",ie()],["executor",ie()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(ie())],["expectedSigners",gill.getArrayDecoder(Wt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function BU(){return gill.combineCodec($1(),Zc())}function Xc(e){return gill.decodeAccount(e,Zc())}async function Qc(e,n,r){let o=await ef(e,n,r);return gill.assertAccountExists(o),o}async function ef(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Xc(o)}async function NU(e,n,r){let o=await tf(e,n,r);return gill.assertAccountsExist(o),o}async function tf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Xc(t))}var ta=new Uint8Array([105,23,173,2,197,255,80,87]);function VU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ta)}function xf(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:ta}))}function ra(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function FU(){return gill.combineCodec(xf(),ra())}function na(e){return gill.decodeAccount(e,ra())}async function oa(e,n,r){let o=await If(e,n,r);return gill.assertAccountExists(o),o}async function If(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return na(o)}async function GU(e,n,r){let o=await Cf(e,n,r);return gill.assertAccountsExist(o),o}async function Cf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>na(t))}function l({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function O(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function T(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let o=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:O(r.value),role:sa(r.value)?gill.upgradeRoleToSigner(o):o,...sa(r.value)?{signer:r.value}:{}})}}function sa(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var aa=new Uint8Array([8]);function ck(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(aa)}function Ro(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:aa}))}function ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function ak(){return gill.combineCodec(Ro(),ia())}async function da(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...a],data:Ro().encode(c),programAddress:r})}function ik(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...a],data:Ro().encode(c),programAddress:r})}function dk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:ia().decode(e.data)}}var ma=new Uint8Array([9]);function Tk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ma)}function la(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(qe())],["signers",gill.getArrayEncoder(Q())],["compressedProofArgs",gill.getOptionEncoder(D())]]),e=>({...e,discriminator:ma}))}function Ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Je())],["signers",gill.getArrayDecoder($())],["compressedProofArgs",gill.getOptionDecoder(P())]])}function yk(){return gill.combineCodec(la(),Ta())}function ya(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:la().encode(c),programAddress:r})}function fk(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Ta().decode(e.data)}}var Ca=new Uint8Array([19]);function Pk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function Ea(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(qe())],["signers",gill.getArrayEncoder(Q())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ca}))}function Da(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Je())],["signers",gill.getArrayDecoder($())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function Mk(){return gill.combineCodec(Ea(),Da())}function Pa(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Ea().encode(c),programAddress:r})}function hk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Da().decode(e.data)}}var Ra=new Uint8Array([18]);function Wk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ra)}function bo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["addressTreeInfo",Bt()],["outputStateTreeIndex",gill.getU8Encoder()],["userArgs",Ke()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Ra}))}function ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",P()],["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Decoder()],["userArgs",je()],["settingsIndex",gill.getU128Decoder()]])}function Lk(){return gill.combineCodec(bo(),ba())}async function _a(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...a],data:bo().encode(c),programAddress:r})}function Ok(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...a],data:bo().encode(c),programAddress:r})}function Bk(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:ba().decode(e.data)}}var Na=new Uint8Array([0]);function zk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Na)}function vo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",ve()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Na}))}function wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",Ue()],["compressedProofArgs",P()]])}function Kk(){return gill.combineCodec(vo(),wa())}async function Ha(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:vo().encode(c),programAddress:r})}function jk(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:vo().encode(c),programAddress:r})}function qk(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:wa().decode(e.data)}}var Ga=new Uint8Array([4]);function eW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function Uo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["member",no()],["role",Ye()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Jt())],["userAccountCreationArgs",ve()],["linkWalletArgs",gill.getOptionEncoder(Yn())]]),e=>({...e,discriminator:Ga}))}function za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",P()],["member",wt()],["role",Ze()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(Yt())],["userAccountCreationArgs",Ue()],["linkWalletArgs",gill.getOptionDecoder(Zn())]])}function tW(){return gill.combineCodec(Uo(),za())}async function Ka(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...a],data:Uo().encode(c),programAddress:r})}function rW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...a],data:Uo().encode(c),programAddress:r})}function nW(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:za().decode(e.data)}}var qa=new Uint8Array([3]);function dW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qa)}function Wo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:qa}))}function Ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function uW(){return gill.combineCodec(Wo(),Ja())}async function Ya(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(c),a=T(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Wo().encode({}),programAddress:r})}function AW(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(c),a=T(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Wo().encode({}),programAddress:r})}function gW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:Ja().decode(e.data)}}var Xa=new Uint8Array([5]);function SW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xa)}function Oo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayEncoder(Bn())]]),e=>({...e,discriminator:Xa}))}function Qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",P()],["createUserArgs",gill.getArrayDecoder(Nn())]])}function xW(){return gill.combineCodec(Oo(),Qa())}async function $a(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:Oo().encode(c),programAddress:r})}function IW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:Oo().encode(c),programAddress:r})}function CW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Qa().decode(e.data)}}var ri=new Uint8Array([17]);function bW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function ni(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",Y()],["compressedProofArgs",D()],["signers",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:ri}))}function oi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",Z()],["compressedProofArgs",P()],["signers",gill.getArrayDecoder($())]])}function _W(){return gill.combineCodec(ni(),oi())}function si(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:ni().encode(c),programAddress:r})}function vW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:oi().decode(e.data)}}var ii=new Uint8Array([2]);function BW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ii)}function di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:ii}))}function ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function NW(){return gill.combineCodec(di(),ui())}function Ai(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.admin),...a],data:di().encode(c),programAddress:r})}function wW(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:ui().decode(e.data)}}var li=new Uint8Array([1]);function jW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(li)}function No(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder($n())]]),e=>({...e,discriminator:li}))}function Ti(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(eo())]])}function qW(){return gill.combineCodec(No(),Ti())}async function JW(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...a],data:No().encode(c),programAddress:r})}function yi(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...a],data:No().encode(c),programAddress:r})}function YW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:o(),whitelistedAddressTrees:o(),systemProgram:r()},data:Ti().decode(e.data)}}var xi=new Uint8Array([6]);function rL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xi)}function Ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",tt()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",D()]]),e=>({...e,discriminator:xi}))}function Ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",rt()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",P()]])}function nL(){return gill.combineCodec(Ii(),Ci())}function Ei(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.authority),...a],data:Ii().encode(c),programAddress:r})}function oL(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{authority:r()},data:Ci().decode(e.data)}}var Mi=new Uint8Array([7]);function AL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mi)}function hi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",tt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["delegateTo",gill.getOptionEncoder(co())],["oldSettingsMutArgs",gill.getOptionEncoder(Y())],["newSettingsMutArgs",gill.getOptionEncoder(Y())],["compressedProofArgs",D()]]),e=>({...e,discriminator:Mi}))}function Ri(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",rt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["delegateTo",gill.getOptionDecoder(ao())],["oldSettingsMutArgs",gill.getOptionDecoder(Z())],["newSettingsMutArgs",gill.getOptionDecoder(Z())],["compressedProofArgs",P()]])}function gL(){return gill.combineCodec(hi(),Ri())}function bi(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.feePayer),s(t.signer),s(t.oldSettings),s(t.newSettings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.domainConfig),...a],data:hi().encode(c),programAddress:r})}function pL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:o(),oldSettings:o(),newSettings:o(),slotHashSysvar:o(),instructionsSysvar:o(),domainConfig:o()},data:Ri().decode(e.data)}}var vi=new Uint8Array([29]);function xL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(vi)}function wo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:vi}))}function Ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder($())]])}function IL(){return gill.combineCodec(wo(),Ui())}async function CL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:wo().encode(c),programAddress:r})}function ki(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:wo().encode(c),programAddress:r})}function EL(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Ui().decode(e.data)}}var Oi=new Uint8Array([27]);function _L(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oi)}function Bi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(Q())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Oi}))}function Ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder($())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function vL(){return gill.combineCodec(Bi(),Ni())}function wi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:Bi().encode(c),programAddress:r})}function UL(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Ni().decode(e.data)}}var Gi=new Uint8Array([30]);function wL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gi)}function Fo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Ft())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(_t()))],["compressedProofArgs",gill.getOptionEncoder(D())],["signers",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Gi}))}function zi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Gt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(vt()))],["compressedProofArgs",gill.getOptionDecoder(P())],["signers",gill.getArrayDecoder($())]])}function HL(){return gill.combineCodec(Fo(),zi())}async function VL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Fo().encode(c),programAddress:r})}function Ki(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Fo().encode(c),programAddress:r})}function FL(e){if(e.accounts.length<18)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:zi().decode(e.data)}}var Xi=new Uint8Array([28]);function YL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xi)}function Go(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Ft())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(_t()))],["signers",gill.getArrayEncoder(Q())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Xi}))}function Qi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Gt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(vt()))],["signers",gill.getArrayDecoder($())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function ZL(){return gill.combineCodec(Go(),Qi())}async function XL(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Go().encode(c),programAddress:r})}function $i(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Go().encode(c),programAddress:r})}function QL(e){if(e.accounts.length<17)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:Qi().decode(e.data)}}var rd=new Uint8Array([13]);function sO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(rd)}function nd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:rd}))}function od(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function cO(){return gill.combineCodec(nd(),od())}function sd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:nd().encode(c),programAddress:r})}function aO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:od().decode(e.data)}}var id=new Uint8Array([23]);function mO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(id)}function dd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:id}))}function ud(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function lO(){return gill.combineCodec(dd(),ud())}function Ad(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.rentCollector),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:dd().encode(c),programAddress:r})}function TO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:ud().decode(e.data)}}var md=new Uint8Array([10]);function EO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(md)}function ld(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",zt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:md}))}function Td(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Kt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function DO(){return gill.combineCodec(ld(),Td())}function yd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...a],data:ld().encode(c),programAddress:r})}function PO(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:Td().decode(e.data)}}var xd=new Uint8Array([20]);function UO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xd)}function Id(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",zt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Ht()],["compressedProofArgs",D()]]),e=>({...e,discriminator:xd}))}function Cd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Kt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",Vt()],["compressedProofArgs",P()]])}function kO(){return gill.combineCodec(Id(),Cd())}function Ed(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...a],data:Id().encode(c),programAddress:r})}function WO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:Cd().decode(e.data)}}var Md=new Uint8Array([14]);function VO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Md)}function hd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Md}))}function Rd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function FO(){return gill.combineCodec(hd(),Rd())}function bd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:hd().encode(c),programAddress:r})}function GO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:Rd().decode(e.data)}}var Ud=new Uint8Array([24]);function ZO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ud)}function kd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ud}))}function Wd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function XO(){return gill.combineCodec(kd(),Wd())}function Ld(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:kd().encode(c),programAddress:r})}function QO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:Wd().decode(e.data)}}var Nd=new Uint8Array([12]);function oB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Nd)}function wd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Nd}))}function Hd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function sB(){return gill.combineCodec(wd(),Hd())}function Vd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.transactionBuffer),...a],data:wd().encode(c),programAddress:r})}function cB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:Hd().decode(e.data)}}var zd=new Uint8Array([22]);function gB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zd)}function Kd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:zd}))}function jd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function pB(){return gill.combineCodec(Kd(),jd())}function qd(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.transactionBuffer),...a],data:Kd().encode(c),programAddress:r})}function mB(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:jd().decode(e.data)}}var Zd=new Uint8Array([11]);function IB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zd)}function Xd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Zd}))}function Qd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function CB(){return gill.combineCodec(Xd(),Qd())}function $d(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Xd().encode(c),programAddress:r})}function EB(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:Qd().decode(e.data)}}var ru=new Uint8Array([21]);function _B(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ru)}function nu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Ht()],["compressedProofArgs",D()]]),e=>({...e,discriminator:ru}))}function ou(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",Vt()],["compressedProofArgs",P()]])}function vB(){return gill.combineCodec(nu(),ou())}function su(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:nu().encode(c),programAddress:r})}function UB(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:ou().decode(e.data)}}var iu=new Uint8Array([15]);function NB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(iu)}function du(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:iu}))}function uu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function wB(){return gill.combineCodec(du(),uu())}function Au(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},i=l({}),a=T(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:du().encode({}),programAddress:r})}function HB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:uu().decode(e.data)}}var mu=new Uint8Array([25]);function jB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mu)}function lu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:mu}))}function Tu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function qB(){return gill.combineCodec(lu(),Tu())}function yu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.transactionBuffer),...a],data:lu().encode(c),programAddress:r})}function JB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:Tu().decode(e.data)}}var xu=new Uint8Array([16]);function tN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xu)}function Iu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",jt()],["signers",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:xu}))}function Cu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",qt()],["signers",gill.getArrayDecoder($())]])}function rN(){return gill.combineCodec(Iu(),Cu())}function Eu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Iu().encode(c),programAddress:r})}function nN(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Cu().decode(e.data)}}var Mu=new Uint8Array([26]);function uN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mu)}function hu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",jt()],["signers",gill.getArrayEncoder(Q())],["settingsMutArgs",Y()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Mu}))}function Ru(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",qt()],["signers",gill.getArrayDecoder($())],["settingsMutArgs",Z()],["compressedProofArgs",P()]])}function AN(){return gill.combineCodec(hu(),Ru())}function bu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:hu().encode(c),programAddress:r})}function gN(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Ru().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",RE=(c=>(c[c.DomainConfig=0]="DomainConfig",c[c.GlobalCounter=1]="GlobalCounter",c[c.Settings=2]="Settings",c[c.TransactionBuffer=3]="TransactionBuffer",c[c.WhitelistedAddressTree=4]="WhitelistedAddressTree",c))(RE||{});function JN(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([201,232,212,229,59,241,106,197])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([42,206,176,58,175,129,130,233])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([223,179,163,190,177,224,67,173])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([90,36,35,219,93,225,110,96])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([105,23,173,2,197,255,80,87])),0))return 4;throw new Error("The provided account could not be identified as a multiWallet account.")}var bE=(y=>(y[y.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",y[y.ChangeConfig=1]="ChangeConfig",y[y.ChangeConfigCompressed=2]="ChangeConfigCompressed",y[y.CreateCompressedWallet=3]="CreateCompressedWallet",y[y.CreateDomainConfig=4]="CreateDomainConfig",y[y.CreateDomainUserAccount=5]="CreateDomainUserAccount",y[y.CreateGlobalCounter=6]="CreateGlobalCounter",y[y.CreateUserAccounts=7]="CreateUserAccounts",y[y.DecompressSettingsAccount=8]="DecompressSettingsAccount",y[y.DisableDomainConfig=9]="DisableDomainConfig",y[y.EditDomainConfig=10]="EditDomainConfig",y[y.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",y[y.EditUserDelegate=12]="EditUserDelegate",y[y.NativeTransferIntent=13]="NativeTransferIntent",y[y.NativeTransferIntentCompressed=14]="NativeTransferIntentCompressed",y[y.TokenTransferIntent=15]="TokenTransferIntent",y[y.TokenTransferIntentCompressed=16]="TokenTransferIntentCompressed",y[y.TransactionBufferClose=17]="TransactionBufferClose",y[y.TransactionBufferCloseCompressed=18]="TransactionBufferCloseCompressed",y[y.TransactionBufferCreate=19]="TransactionBufferCreate",y[y.TransactionBufferCreateCompressed=20]="TransactionBufferCreateCompressed",y[y.TransactionBufferExecute=21]="TransactionBufferExecute",y[y.TransactionBufferExecuteCompressed=22]="TransactionBufferExecuteCompressed",y[y.TransactionBufferExtend=23]="TransactionBufferExtend",y[y.TransactionBufferExtendCompressed=24]="TransactionBufferExtendCompressed",y[y.TransactionBufferVote=25]="TransactionBufferVote",y[y.TransactionBufferVoteCompressed=26]="TransactionBufferVoteCompressed",y[y.TransactionExecute=27]="TransactionExecute",y[y.TransactionExecuteCompressed=28]="TransactionExecuteCompressed",y[y.TransactionExecuteSync=29]="TransactionExecuteSync",y[y.TransactionExecuteSyncCompressed=30]="TransactionExecuteSyncCompressed",y))(bE||{});function YN(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 30;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var vE=6e3,UE=6001,kE=6002,WE=6003,LE=6004,OE=6005,BE=6006,NE=6007,wE=6008,HE=6009,VE=6010,FE=6011,GE=6012,zE=6013,KE=6014,jE=6015,qE=6016,JE=6017,YE=6018,ZE=6019,XE=6020,QE=6021,$E=6022,eD=6023,tD=6024,rD=6025,nD=6026,oD=6027,sD=6028,cD=6029,aD=6030,iD=6031,dD=6032,uD=6033,AD=6034,gD=6035,pD=6036,mD=6037,lD=6038,TD=6039,yD=6040,fD=6041,SD=6042,xD=6043,ID=6044,CD=6045,ED=6046,DD=6047,PD=6048,MD=6049,hD=6050,RD=6051,bD=6052,_D=6053,vD=6054,UD=6055,kD=6056,WD=6057,LD=6058,OD=6059,BD=6060,ND=6061,wD=6062,HD=6063,VD=6064,FD=6065,GD=6066,zD=6067,KD=6068,jD=6069,qD=6070,JD=6071,YD=6072,ZD=6073,XD=6074,QD=6075,$D=6076,eP=6077,tP=6078,rP=6079,nP=6080,oP=6081,sP=6082,cP=6083,aP=6084,iP=6085,dP=6086,_u;process.env.NODE_ENV!=="production"&&(_u={[iD]:"This member is already delegated to another wallet.",[NE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[eP]:"Clock sysvar access failed. This may indicate a system error.",[RD]:"Missing credential id.",[_D]:"The domain configuration account is disabled. Please contact support or try again later.",[vD]:"Missing domain configuration account.",[QD]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[dP]:"Duplicate address tree detected. This address tree is already in the whitelist.",[VE]:"Duplicate public keys detected among members. Each member must have a unique key.",[HE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[QE]:"No members provided. A multisig wallet must contain at least one member.",[BD]:"Slot numbers list is empty. At least one slot number is required for validation.",[YE]:"Expected a User with Administrator role for this instruction.",[wE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[qE]:"Expected a User with Transaction Manager role for this instruction.",[yD]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[fD]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[SD]:"Declared buffer size does not match the actual serialized size.",[OD]:"Failed to compute hash. This may indicate a system error.",[AD]:"Not enough members with vote permission to meet the approval threshold.",[dD]:"At least one signer with execute permission is required to proceed.",[uD]:"At least one signer with initiate permission is required to perform this action.",[nD]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[XD]:"Invalid account index in transaction message. The account index is out of bounds.",[WD]:"Address Tree supplied is not part of the whitelisted address trees.",[ZE]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[sD]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[TD]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[ND]:"Member key conversion failed. The provided key format is invalid.",[gD]:"Only delegated members are allowed for this transaction.",[rD]:"Unexpected number of accounts provided for this instruction.",[zE]:"User with Permanent Member role must have a delegated wallet.",[UE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[LE]:"The extracted public key has an invalid length or encoding.",[vE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[WE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[hD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[PD]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[eD]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[JD]:"Invalid source type for token transfer. The source account type is not supported.",[JE]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[jE]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[tD]:"Malformed transaction message: structure or formatting does not match the expected layout.",[nP]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[oD]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[rP]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[qD]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[OE]:"The extracted WebAuthn signed message payload is malformed.",[ED]:"An input string exceeds the maximum allowed character length.",[UD]:"This member is not registered under the provided domain configuration.",[VD]:"Member not found in settings. Cannot remove a member that does not exist.",[ZD]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[cD]:"A required account is missing from the instruction context.",[wD]:"Compressed proof arguments are missing. Required for compressed account operations.",[zD]:"Missing compressed token account. Required for token transfer operations.",[oP]:"Missing destination token account. Required for token transfer operations.",[jD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[HD]:"Light CPI accounts are missing. Required for compressed account operations.",[aD]:"User mutation arguments are required when performing add or remove delegate operations.",[aP]:"Missing new authority account. Required for domain configuration updates.",[cP]:"Missing settings account. Required for delegate operations on compressed wallets.",[LD]:"Compressed settings data is missing. The settings account must be initialized with data.",[sP]:"Missing source token account. Required for token transfer operations.",[KD]:"Missing SPL interface PDA. Required for token transfer operations.",[DD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[$D]:"User account address is missing. Required for secp256r1 signature verification.",[iP]:"Missing whitelisted address trees account. Required for domain configuration updates.",[mD]:"No valid signer found in this transaction.",[XE]:"Only one administrator is allowed per wallet.",[GE]:"Only one permanent member is allowed per wallet.",[KE]:"Only one transaction manager is allowed per wallet.",[kD]:"The given origin index is not in the whitelisted origins.",[GD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[FE]:"Permanent members cannot be removed from a wallet.",[CD]:"Writable CPI calls to protected accounts are not permitted.",[BE]:"The rpIdHash extracted from the signed message does not match the expected value.",[FD]:"Settings key mismatch. The provided settings key does not match the expected value.",[kE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[MD]:"The specified slot number was not found in the provided slot history.",[YD]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[$E]:"Too many members: a maximum of 4 members are supported.",[xD]:"This transaction has expired. It must be executed within 3 minutes of approval.",[ID]:"This transaction has not yet reached the required approval threshold.",[bD]:"Missing transports.",[lD]:"Only the transaction creator or rent payer may close this transaction buffer.",[tP]:"Unauthorized: Only the admin account is allowed to perform this action.",[pD]:"Member is not part of the expected signers for this transaction."});function tw(e){return process.env.NODE_ENV!=="production"?_u[e]:"Error message not available in production bundles."}function rw(e,n,r){return gill.isProgramError(e,n,A,r)}async function pw({admin:e,addressTree:n}){return da({payer:e,addressTree:n,remainingAccounts:[]})}var jo=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],vu="https://mainnet.block-engine.jito.wtf/api/v1",Uu="https://bundles.jito.wtf/api/v1/bundles/tip_floor",ku="landed_tips_75th_percentile";var ke=class extends Error{constructor(r,o,t){super(r);this.code=o;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},nt=class extends ke{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},oe=class extends ke{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},z=class extends ke{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},De=class extends ke{constructor(r,o,t){super(r,"NETWORK_ERROR",{statusCode:o,url:t});this.statusCode=o;this.url=t;}};var le=class extends ke{constructor(r,o,t){super(r,"BUNDLE_ERROR",{bundleId:o,attempt:t});this.bundleId=o;this.attempt=t;}},Br=class extends ke{constructor(r,o,t){super(`Operation "${r}" failed after ${o} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=o;this.lastError=t;}},Nr=class extends ke{constructor(r,o,t){super(r,"PERMISSION_ERROR",{required:o,actual:t});this.required=o;this.actual=t;}};var $t={Ed25519:1,Secp256r1:2};var Wu=m__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),Iw=m__default.default.object({transactionActionType:Wu,transactionAddress:m__default.default.string(),transactionMessageBytes:m__default.default.array(m__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),uP=m__default.default.object({transactionActionType:Wu,transactionAddress:m__default.default.string(),transactionMessageBytes:m__default.default.base64()}).strict(),AP=m__default.default.union([m__default.default.object({type:m__default.default.literal("Ephemeral"),secretKey:m__default.default.string()}),m__default.default.object({type:m__default.default.literal("Default"),publickey:m__default.default.string(),endpoint:m__default.default.string()})]).array().optional(),Lu=m__default.default.object({phase:m__default.default.literal("start"),redirectOrigin:m__default.default.url(),signer:m__default.default.string().optional(),rid:m__default.default.string(),validTill:m__default.default.number(),data:m__default.default.object({type:m__default.default.literal("message"),payload:m__default.default.string()}).strict()}).strict(),Ou=m__default.default.object({phase:m__default.default.literal("start"),redirectOrigin:m__default.default.url(),signer:m__default.default.string().optional(),rid:m__default.default.string(),validTill:m__default.default.number(),data:m__default.default.object({type:m__default.default.literal("transaction"),payload:uP,sendTx:m__default.default.boolean(),additionalSigners:AP}).strict()}).strict(),Bu=m__default.default.object({startRequest:m__default.default.union([Lu,Ou]),authResponse:m__default.default.custom(),client:m__default.default.object({clientOrigin:m__default.default.url(),jws:m__default.default.string()}).strict(),device:m__default.default.object({jwk:m__default.default.base64(),jws:m__default.default.string()}).strict(),authProvider:m__default.default.object({jwk:m__default.default.base64(),jws:m__default.default.string()}).strict().optional()}).strict(),Nu=m__default.default.object({signer:m__default.default.string(),userAddressTreeIndex:m__default.default.number().optional(),additionalInfo:m__default.default.looseObject({}).optional()}).strict(),gP=m__default.default.object({slotHash:m__default.default.string(),slotNumber:m__default.default.string(),originIndex:m__default.default.number(),crossOrigin:m__default.default.boolean()}).strict(),Cw=m__default.default.object({phase:m__default.default.literal("complete"),data:m__default.default.object({type:m__default.default.literal("message"),payload:Nu.extend(Bu.shape).extend({id:m__default.default.string().optional(),client:m__default.default.object({clientOrigin:m__default.default.url()}).strict()})}).strict()}).strict(),Ew=m__default.default.object({phase:m__default.default.literal("complete"),data:m__default.default.object({type:m__default.default.literal("transaction"),payload:Nu.extend(Bu.shape).extend(gP.shape).extend({client:m__default.default.object({clientOrigin:m__default.default.url()}).strict()})}).strict()}).strict(),Dw=m__default.default.object({phase:m__default.default.literal("complete"),data:m__default.default.object({type:m__default.default.literal("transaction"),payload:m__default.default.object({startRequest:m__default.default.union([Ou,Lu]),txSig:m__default.default.string()})}).strict()}).strict();var We={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},we=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,o)=>r|o,0))}static all(){return new e(Object.values(We).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var qo=33,He=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==qo)throw new Error(`Invalid public key length, expected ${qo} bytes but got ${n.length}`)}toBase58(){return gill.getBase58Decoder().decode(this.toBytes())}toTruncatedBuffer(){let n=this.toBuffer();return n.subarray(1,n.length)}toBuffer(){if(!this._bn)throw new Error("Invalid public key input");let n=this._bn;if(n.byteLength===qo)return n;throw new Error("Invalid public key input")}toBytes(){let n=this.toBuffer();return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}toString(){return this.toBase58()}toJSON(){return this.toBase58()}},M=class extends He{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function lP(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function TP(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Hu=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(lP())],["addressTableLookups",gill.getArrayCodec(TP())]]);function Vu(e){return Hu.encode({numSigners:e.header.numSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,accountKeys:e.staticAccounts,instructions:e.instructions.map(r=>({programAddressIndex:r.programAddressIndex,accountIndices:r.accountIndices??[],data:Array.from(r.data??[])})),addressTableLookups:e.version!=="legacy"?e.addressTableLookups?.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes,writableIndexes:r.writableIndexes}))??[]:[]})}function Fu(e){let n=Hu.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}var Ae={};function Gu(){if(!Ae.solanaRpcEndpoint)throw new nt("RPC endpoint");return Ae.solanaRpcEndpoint}function Fe(){if(!Ae.lightProtocolRpc)throw new nt("Light Protocol RPC");return Ae.lightProtocolRpc}function ee(){if(!Ae.solanaRpc)throw new nt("Solana RPC");return Ae.solanaRpc}function zu(){if(!Ae.sendAndConfirm)throw new nt("Send and confirm transaction function");return Ae.sendAndConfirm}function Yo(){return Ae.jitoTipsConfig?Ae.jitoTipsConfig:{blockEngineUrl:vu,getJitoTipsUrl:Uu,priority:ku}}function qw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:o}){Ae.solanaRpcEndpoint=e,Ae.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});Ae.solanaRpc=t,Ae.sendAndConfirm=c,Ae.jitoTipsConfig=o??null;}async function er(e,n){if(!e.ok)throw new De(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function tr(e){try{return await e.json()}catch(n){throw new De(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function i2(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Hr(n.get(-2))),y:BigInt("0x"+Hr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function d2(e){let r=nist_js.p256.Point.fromBytes(gill.getBase58Encoder().encode(e)).toBytes(false),o=new Map;return o.set(1,2),o.set(3,-7),o.set(-1,1),o.set(-2,r.slice(1,33)),o.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(o))}async function u2(e){let{authenticatorData:n,clientDataJSON:r,signature:o}=e.authResponse.response,t=Ce(n),c=JSON.parse(gill.getUtf8Decoder().decode(Ce(r))),i=Ju(c),a=Zu(Ce(o)),s=await mt({rpIdHash:t.subarray(0,32)});return new M(e.signer.toString(),{verifyArgs:{clientDataJson:Ce(r),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:Zo(e.client.clientOrigin,e.device.jwk,e.startRequest.rid),domainConfig:s,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function Zo(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase64Encoder().encode(n),...gill.getBase64Encoder().encode(r)]))}function A2(e){return sha2_js.sha256(gill.getUtf8Encoder().encode(JSON.stringify(e)))}function g2(e){return Xo(e.data.payload.authResponse)}function p2(e,n,r,o){let t=Zo(n,r,o);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function m2(e,n,r,o,t,c){let i;if(!t||!c){let u=(await ee().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!u)throw new oe("Slot sysvar","Unable to fetch slot sysvar data");let g=gill.getBase64Encoder().encode(u[0]);c=gill.getU64Decoder().decode(g.subarray(0,8)).toString(),i=g.subarray(8,40),t=gill.getBase58Decoder().decode(i);}else i=gill.getBase58Encoder().encode(t);let a=sha2_js.sha256(typeof e.transactionMessageBytes=="string"?gill.getBase64Encoder().encode(e.transactionMessageBytes):e.transactionMessageBytes),s=Zo(n,r,o),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...a,...i,...s]));return {slotNumber:c,slotHash:t,challenge:d}}function Xo(e){let n=Vr(e);return sha2_js.sha256(n)}function l2(e){let n="";for(let o of e)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ce(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,o=n.padEnd(n.length+r,"="),t=atob(o),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return i}async function T2(e,n){let{data:r}=await Ps(ee(),e),t=Yu(r.origins,r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new oe("Origin","Origin not found in domain config");return t}function y2(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function f2(e){return JSON.parse(gill.getUtf8Decoder().decode(gill.getBase64Encoder().encode(e)))}function Hr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function MP(e){let n=new Uint8Array(e.length/2);for(let r=0;r<n.length;r++)n[r]=parseInt(e.slice(r*2,r*2+2),16);return n}function Ju(e){let n=new Set(["type","challenge","origin","crossOrigin"]),r={};for(let t in e)n.has(t)||(r[t]=e[t]);if(Object.keys(r).length===0)return new Uint8Array([]);let o=JSON.stringify(r);return new TextEncoder().encode(o.slice(1,-1))}function Yu(e,n){let r=[],o=0,t=new TextDecoder;for(let c=0;c<n;c++){if(o+2>e.length)throw new Error("MaxLengthExceeded");let i=e[o]|e[o+1]<<8;if(o+=2,o+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(o,o+i),s=t.decode(a);r.push(s),o+=i;}return r}function Zu(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let _=n&127;r+=_;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let o=e[r+1],t=r+2,c=e.slice(t,t+o);if(r=t+o,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,s=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,u=s[0]===0&&s.length>32?s.slice(1):s;if(d.length>32||u.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(d,32-d.length);let p=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+Hr(u)),I=(f>p?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=MP(I);return new Uint8Array([...g,...x])}function Vr(e){let n=Ce(e.response.clientDataJSON),r=Ce(e.response.authenticatorData),o=sha2_js.sha256(n);return new Uint8Array([...r,...o])}var $u={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true,initialDelayMs:500,maxRetries:3};function eA(e){return e===429}function tA(e){return e>=500}function kP(e){return e>=400&&e<500}function WP(e){return eA(e)||tA(e)}function LP(e,n,r){return e instanceof Response?eA(e.status)?r.retryOnRateLimit??true:kP(e.status)?false:tA(e.status):e instanceof TypeError||e instanceof Error}function OP(e,n,r,o){let t=n*Math.pow(r,e-1);return Math.min(t,o)}function BP(e){return new Promise(n=>setTimeout(n,e))}async function or(e,n){let{maxRetries:r,initialDelayMs:o,backoffBase:t,maxDelayMs:c,shouldRetry:i}={...$u,...n},a;for(let s=1;s<=r;s++)try{return await e()}catch(d){if(a=d,i&&!i(d,s))throw d;if(s>=r)break;let u=OP(s,o,t,c);await BP(u);}throw new Br(e.name||"retryWithBackoff",r,a)}async function lt(e,n){let r={...$u,...n},o=(c,i)=>LP(c,i,r);return or(async()=>{let c=await e();if(!c.ok&&WP(c.status))throw c;return c},{...r,shouldRetry:n?.shouldRetry??o})}function rA(...e){return n=>e.some(r=>n instanceof r)}function nA(e,n,r,o){if(e<n||e>r)throw new z(`${o} must be between ${n} and ${r} (inclusive), got ${e}`)}function oA(e,n){if(e<0)throw new z(`${n} must be non-negative, got ${e}`)}function sr(e,n){if(e.length===0)throw new z(`${n} cannot be empty`)}function sA(e,n){if(e.trim().length===0)throw new z(`${n} cannot be empty`)}async function $o(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await ee().getLatestBlockhash().send()).value;return await Promise.all(e.map(async o=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(o.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(o.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>o.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,o.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((o.unitsConsumed??0)*1.1);return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function AA(e){let n=gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:8e5}),programs.getSetComputeUnitPriceInstruction({microLamports:1e4})],e),r=gill.getBase64EncodedWireTransaction(gill.compileTransaction(n));if(r.length>1644)throw new z(`Transaction exceeds maximum length of ${1644} bytes (actual: ${r.length} bytes)`);let o=await ee().simulateTransaction(r,{encoding:"base64"}).send();if(o.value.err){if(o.value.logs){let c=["Transaction simulation failed:","",...o.value.logs].join(`
|
|
1
|
+
'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),p=require('zod'),superstruct=require('superstruct'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),jsonCanonicalize=require('json-canonicalize'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);var ds=new Uint8Array([201,232,212,229,59,241,106,197]);function xM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ds)}function og(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["numOrigins",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),515)]]),e=>({...e,discriminator:ds}))}function us(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["numOrigins",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),515)]])}function IM(){return gill.combineCodec(og(),us())}function As(e){return gill.decodeAccount(e,us())}async function gs(e,n,r){let o=await sg(e,n,r);return gill.assertAccountExists(o),o}async function sg(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return As(o)}async function CM(e,n,r){let o=await cg(e,n,r);return gill.assertAccountsExist(o),o}async function cg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>As(t))}function EM(){return 846}var ls=new Uint8Array([42,206,176,58,175,129,130,233]);function hM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ls)}function xg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:ls}))}function Ts(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function MM(){return gill.combineCodec(xg(),Ts())}function ys(e){return gill.decodeAccount(e,Ts())}async function RM(e,n,r){let o=await Ig(e,n,r);return gill.assertAccountExists(o),o}async function Ig(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return ys(o)}async function bM(e,n,r){let o=await Cg(e,n,r);return gill.assertAccountsExist(o),o}async function Cg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ys(t))}function _M(){return 24}function Jr(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Yr(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function kM(){return gill.combineCodec(Jr(),Yr())}function Zr(){return gill.getStructEncoder([["memberKey",H()],["permissions",Ne()],["userArgs",He()]])}function Xr(){return gill.getStructDecoder([["memberKey",$()],["permissions",we()],["userArgs",Ve()]])}function BM(){return gill.combineCodec(Zr(),Xr())}function Qr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function $r(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function HM(){return gill.combineCodec(Qr(),$r())}function Tt(){return gill.getStructEncoder([["treeInfo",ft()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function yt(){return gill.getStructDecoder([["treeInfo",St()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function zM(){return gill.combineCodec(Tt(),yt())}function xt(){return gill.getStructEncoder([["treeInfo",ft()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function It(){return gill.getStructDecoder([["treeInfo",St()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function JM(){return gill.combineCodec(xt(),It())}function en(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function tn(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function XM(){return gill.combineCodec(en(),tn())}function cn(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function an(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function eR(){return gill.combineCodec(cn(),an())}function Ct(){return gill.getStructEncoder([["data",gill.getOptionEncoder(dn())]])}function j(){return gill.getStructDecoder([["data",gill.getOptionDecoder(un())]])}function oR(){return gill.combineCodec(Ct(),j())}function dn(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Et())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function un(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Dt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function iR(){return gill.combineCodec(dn(),un())}function Pt(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",gn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(An()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function ht(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",pn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Mt()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function gR(){return gill.combineCodec(Pt(),ht())}function Tn(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",fn()]])}function yn(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Sn()]])}function TR(){return gill.combineCodec(Tn(),yn())}function fn(){return gill.getStructEncoder([["configAccountVersion",gill.getU16Encoder()],["compressToPubkey",gill.getU8Encoder()],["accountVersion",gill.getU8Encoder()],["lamportsPerWrite",gill.getU32Encoder()],["compressionAuthority",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["rentSponsor",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["lastClaimedSlot",gill.getU64Encoder()],["rentExemptionPaid",gill.getU32Encoder()],["reserved",gill.getU32Encoder()],["rentConfig",Cn()]])}function Sn(){return gill.getStructDecoder([["configAccountVersion",gill.getU16Decoder()],["compressToPubkey",gill.getU8Decoder()],["accountVersion",gill.getU8Decoder()],["lamportsPerWrite",gill.getU32Decoder()],["compressionAuthority",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["rentSponsor",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["lastClaimedSlot",gill.getU64Decoder()],["rentExemptionPaid",gill.getU32Decoder()],["reserved",gill.getU32Decoder()],["rentConfig",En()]])}function xR(){return gill.combineCodec(fn(),Sn())}function Fe(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(hn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Zr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Rn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Ge(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Mn())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Xr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(bn())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function DR(){return gill.combineCodec(Fe(),Ge())}function PR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function hR(e,n){return n.__kind===e}function _n(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",ze()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Pe()]])}function vn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Ke()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",he()]])}function _R(){return gill.combineCodec(_n(),vn())}function hn(){return gill.getStructEncoder([["memberKey",H()],["permissions",Ne()]])}function Mn(){return gill.getStructDecoder([["memberKey",$()],["permissions",we()]])}function WR(){return gill.combineCodec(hn(),Mn())}function Rt(){return gill.getStructEncoder([["memberKey",H()],["messageHash",gill.getOptionEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))]])}function bt(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.getOptionDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))]])}function NR(){return gill.combineCodec(Rt(),bt())}function An(){return gill.getDiscriminatedUnionEncoder([["Placeholder0",gill.getUnitEncoder()],["Placeholder1",gill.getUnitEncoder()],["Placeholder2",gill.getUnitEncoder()],["Placeholder3",gill.getUnitEncoder()],["Placeholder4",gill.getUnitEncoder()],["Placeholder5",gill.getUnitEncoder()],["Placeholder6",gill.getUnitEncoder()],["Placeholder7",gill.getUnitEncoder()],["Placeholder8",gill.getUnitEncoder()],["Placeholder9",gill.getUnitEncoder()],["Placeholder10",gill.getUnitEncoder()],["Placeholder11",gill.getUnitEncoder()],["Placeholder12",gill.getUnitEncoder()],["Placeholder13",gill.getUnitEncoder()],["Placeholder14",gill.getUnitEncoder()],["Placeholder15",gill.getUnitEncoder()],["Placeholder16",gill.getUnitEncoder()],["Placeholder17",gill.getUnitEncoder()],["Placeholder18",gill.getUnitEncoder()],["TokenMetadata",gill.getStructEncoder([["fields",gill.getTupleEncoder([On()])]])],["Placeholder20",gill.getUnitEncoder()],["Placeholder21",gill.getUnitEncoder()],["Placeholder22",gill.getUnitEncoder()],["Placeholder23",gill.getUnitEncoder()],["Placeholder24",gill.getUnitEncoder()],["Placeholder25",gill.getUnitEncoder()],["Placeholder26",gill.getUnitEncoder()],["PausableAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Un()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Wn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Nn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Hn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([en()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([Tn()])]])]])}function Mt(){return gill.getDiscriminatedUnionDecoder([["Placeholder0",gill.getUnitDecoder()],["Placeholder1",gill.getUnitDecoder()],["Placeholder2",gill.getUnitDecoder()],["Placeholder3",gill.getUnitDecoder()],["Placeholder4",gill.getUnitDecoder()],["Placeholder5",gill.getUnitDecoder()],["Placeholder6",gill.getUnitDecoder()],["Placeholder7",gill.getUnitDecoder()],["Placeholder8",gill.getUnitDecoder()],["Placeholder9",gill.getUnitDecoder()],["Placeholder10",gill.getUnitDecoder()],["Placeholder11",gill.getUnitDecoder()],["Placeholder12",gill.getUnitDecoder()],["Placeholder13",gill.getUnitDecoder()],["Placeholder14",gill.getUnitDecoder()],["Placeholder15",gill.getUnitDecoder()],["Placeholder16",gill.getUnitDecoder()],["Placeholder17",gill.getUnitDecoder()],["Placeholder18",gill.getUnitDecoder()],["TokenMetadata",gill.getStructDecoder([["fields",gill.getTupleDecoder([Bn()])]])],["Placeholder20",gill.getUnitDecoder()],["Placeholder21",gill.getUnitDecoder()],["Placeholder22",gill.getUnitDecoder()],["Placeholder23",gill.getUnitDecoder()],["Placeholder24",gill.getUnitDecoder()],["Placeholder25",gill.getUnitDecoder()],["Placeholder26",gill.getUnitDecoder()],["PausableAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([kn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Ln()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([wn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Vn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([tn()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([yn()])]])]])}function FR(){return gill.combineCodec(An(),Mt())}function GR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function zR(e,n){return n.__kind===e}function Fn(){return gill.getStructEncoder([["settingsMutArgs",z()],["transactionManager",gill.getOptionEncoder(_t())]])}function Gn(){return gill.getStructDecoder([["settingsMutArgs",K()],["transactionManager",gill.getOptionDecoder(vt())]])}function JR(){return gill.combineCodec(Fn(),Gn())}function Et(){return gill.getStructEncoder([["pubkey",H()],["role",gill.getU8Encoder()],["permissions",Ne()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function Dt(){return gill.getStructDecoder([["pubkey",$()],["role",gill.getU8Decoder()],["permissions",we()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function QR(){return gill.combineCodec(Et(),Dt())}function H(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function $(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function tb(){return gill.combineCodec(H(),$())}function jn(){return gill.getStructEncoder([["authorityCreationArgs",Pe()],["compressedProofArgs",E()]])}function qn(){return gill.getStructDecoder([["authorityCreationArgs",he()],["compressedProofArgs",D()]])}function sb(){return gill.combineCodec(jn(),qn())}function Ut(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function kt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function ib(){return gill.combineCodec(Ut(),kt())}function gn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function pn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function Ab(){return gill.combineCodec(gn(),pn())}function ft(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function St(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function mb(){return gill.combineCodec(ft(),St())}function Un(){return gill.getStructEncoder([])}function kn(){return gill.getStructDecoder([])}function yb(){return gill.combineCodec(Un(),kn())}function Wn(){return gill.getStructEncoder([])}function Ln(){return gill.getStructDecoder([])}function xb(){return gill.combineCodec(Wn(),Ln())}function Ne(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function we(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function Eb(){return gill.combineCodec(Ne(),we())}function E(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(cn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function D(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(an())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function Mb(){return gill.combineCodec(E(),D())}function Rn(){return gill.getStructEncoder([["memberKey",H()],["userArgs",He()]])}function bn(){return gill.getStructDecoder([["memberKey",$()],["userArgs",Ve()]])}function vb(){return gill.combineCodec(Rn(),bn())}function Cn(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function En(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function Wb(){return gill.combineCodec(Cn(),En())}function Zn(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Wt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function Bb(){return gill.combineCodec(Zn(),Wt())}function V(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function F(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function Hb(){return gill.combineCodec(V(),F())}function Xn(){return gill.getStructEncoder([["verifyArgs",V()],["domainConfigIndex",gill.getU8Encoder()]])}function Qn(){return gill.getStructDecoder([["verifyArgs",F()],["domainConfigIndex",gill.getU8Decoder()]])}function zb(){return gill.combineCodec(Xn(),Qn())}function $n(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function eo(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function qb(){return gill.combineCodec($n(),eo())}function to(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function ro(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function Zb(){return gill.combineCodec(to(),ro())}function z(){return gill.getStructEncoder([["accountMeta",Tt()],["data",Ct()]])}function K(){return gill.getStructDecoder([["accountMeta",yt()],["data",j()]])}function e_(){return gill.combineCodec(z(),K())}function Lt(){return gill.getStructEncoder([["accountMeta",xt()],["data",Ct()]])}function Ot(){return gill.getStructDecoder([["accountMeta",It()],["data",j()]])}function o_(){return gill.combineCodec(Lt(),Ot())}function Bt(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function Nt(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function a_(){return gill.combineCodec(Bt(),Nt())}function On(){return gill.getStructEncoder([["updateAuthority",gill.getAddressEncoder()],["mint",gill.getAddressEncoder()],["name",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["symbol",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["uri",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["additionalMetadata",gill.getArrayEncoder(Jr())]])}function Bn(){return gill.getStructDecoder([["updateAuthority",gill.getAddressDecoder()],["mint",gill.getAddressDecoder()],["name",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["symbol",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["uri",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["additionalMetadata",gill.getArrayDecoder(Yr())]])}function A_(){return gill.combineCodec(On(),Bn())}function wt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(Rt())]])}function Ht(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(bt())]])}function l_(){return gill.combineCodec(wt(),Ht())}function Vt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(Qr())],["addressTableLookups",gill.getArrayEncoder(uo())]])}function Ft(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder($r())],["addressTableLookups",gill.getArrayDecoder(Ao())]])}function S_(){return gill.combineCodec(Vt(),Ft())}function uo(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Ao(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function C_(){return gill.combineCodec(uo(),Ao())}function q(){return gill.getDiscriminatedUnionEncoder([["Ed25519",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])],["Secp256r1",gill.getStructEncoder([["fields",gill.getTupleEncoder([Xn()])]])]])}function J(){return gill.getDiscriminatedUnionDecoder([["Ed25519",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])],["Secp256r1",gill.getStructDecoder([["fields",gill.getTupleDecoder([Qn()])]])]])}function h_(){return gill.combineCodec(q(),J())}function M_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function R_(e,n){return n.__kind===e}function Nn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function wn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function v_(){return gill.combineCodec(Nn(),wn())}function Hn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function Vn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function W_(){return gill.combineCodec(Hn(),Vn())}var go=(i=>(i[i.Ble=0]="Ble",i[i.Cable=1]="Cable",i[i.Hybrid=2]="Hybrid",i[i.Internal=3]="Internal",i[i.Nfc=4]="Nfc",i[i.SmartCard=5]="SmartCard",i[i.Usb=6]="Usb",i))(go||{});function Gt(){return gill.getEnumEncoder(go)}function zt(){return gill.getEnumDecoder(go)}function B_(){return gill.combineCodec(Gt(),zt())}function Kt(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",H()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Gt()))],["wallets",gill.getArrayEncoder(to())],["role",ze()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function X(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",$()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(zt()))],["wallets",gill.getArrayDecoder(ro())],["role",Ke()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function V_(){return gill.combineCodec(Kt(),X())}function Pe(){return gill.getStructEncoder([["addressTreeInfo",Ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function he(){return gill.getStructDecoder([["addressTreeInfo",kt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function K_(){return gill.combineCodec(Pe(),he())}function Ze(){return gill.getStructEncoder([["accountMeta",Tt()],["data",Kt()]])}function Xe(){return gill.getStructDecoder([["accountMeta",yt()],["data",X()]])}function Y_(){return gill.combineCodec(Ze(),Xe())}function _t(){return gill.getStructEncoder([["accountMeta",xt()],["data",Kt()]])}function vt(){return gill.getStructDecoder([["accountMeta",It()],["data",X()]])}function $_(){return gill.combineCodec(_t(),vt())}function He(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([_t()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Ze()])]])]])}function Ve(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([vt()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([Xe()])]])]])}function nv(){return gill.combineCodec(He(),Ve())}function ov(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function sv(e,n){return n.__kind===e}var _e=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(_e||{});function ze(){return gill.getEnumEncoder(_e)}function Ke(){return gill.getEnumDecoder(_e)}function iv(){return gill.combineCodec(ze(),Ke())}var _c=new Uint8Array([223,179,163,190,177,224,67,173]);function AU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(_c)}function u1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Et())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:_c}))}function Ir(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Dt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function gU(){return gill.combineCodec(u1(),Ir())}function vc(e){return gill.decodeAccount(e,Ir())}async function pU(e,n,r){let o=await po(e,n,r);return gill.assertAccountExists(o),o}async function po(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return vc(o)}async function mU(e,n,r){let o=await A1(e,n,r);return gill.assertAccountsExist(o),o}async function A1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>vc(t))}var Oc=new Uint8Array([90,36,35,219,93,225,110,96]);function fU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Oc)}function b1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["multiWalletSettings",gill.getAddressEncoder()],["multiWalletBump",gill.getU8Encoder()],["canExecute",gill.getBooleanEncoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["validTill",gill.getU64Encoder()],["payer",gill.getAddressEncoder()],["bump",gill.getU8Encoder()],["bufferIndex",gill.getU8Encoder()],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["creator",H()],["executor",H()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(H())],["expectedSigners",gill.getArrayEncoder(Rt())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Oc}))}function Bc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",$()],["executor",$()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder($())],["expectedSigners",gill.getArrayDecoder(bt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function SU(){return gill.combineCodec(b1(),Bc())}function Nc(e){return gill.decodeAccount(e,Bc())}async function wc(e,n,r){let o=await _1(e,n,r);return gill.assertAccountExists(o),o}async function _1(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Nc(o)}async function xU(e,n,r){let o=await v1(e,n,r);return gill.assertAccountsExist(o),o}async function v1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Nc(t))}var Fc=new Uint8Array([105,23,173,2,197,255,80,87]);function EU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Fc)}function Y1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Fc}))}function Gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function DU(){return gill.combineCodec(Y1(),Gc())}function zc(e){return gill.decodeAccount(e,Gc())}async function Kc(e,n,r){let o=await Z1(e,n,r);return gill.assertAccountExists(o),o}async function Z1(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return zc(o)}async function PU(e,n,r){let o=await X1(e,n,r);return gill.assertAccountsExist(o),o}async function X1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zc(t))}function l({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function O(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function T(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let o=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:O(r.value),role:jc(r.value)?gill.upgradeRoleToSigner(o):o,...jc(r.value)?{signer:r.value}:{}})}}function jc(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Jc=new Uint8Array([8]);function FU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function Io(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Jc}))}function Yc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function GU(){return gill.combineCodec(Io(),Yc())}async function Zc(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...i],data:Io().encode(c),programAddress:r})}function zU(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...i],data:Io().encode(c),programAddress:r})}function KU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:Yc().decode(e.data)}}var ta=new Uint8Array([9]);function QU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ta)}function ra(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Fe())],["signers",gill.getArrayEncoder(q())],["compressedProofArgs",gill.getOptionEncoder(E())]]),e=>({...e,discriminator:ta}))}function na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Ge())],["signers",gill.getArrayDecoder(J())],["compressedProofArgs",gill.getOptionDecoder(D())]])}function $U(){return gill.combineCodec(ra(),na())}function oa(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:ra().encode(c),programAddress:r})}function ek(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:na().decode(e.data)}}var da=new Uint8Array([19]);function ak(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Fe())],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:da}))}function Aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Ge())],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function ik(){return gill.combineCodec(ua(),Aa())}function ga(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:ua().encode(c),programAddress:r})}function dk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Aa().decode(e.data)}}var la=new Uint8Array([18]);function Tk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(la)}function Co(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["addressTreeInfo",Ut()],["outputStateTreeIndex",gill.getU8Encoder()],["userArgs",He()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:la}))}function Ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["addressTreeInfo",kt()],["outputStateTreeIndex",gill.getU8Decoder()],["userArgs",Ve()],["settingsIndex",gill.getU128Decoder()]])}function yk(){return gill.combineCodec(Co(),Ta())}async function ya(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...i],data:Co().encode(c),programAddress:r})}function fk(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...i],data:Co().encode(c),programAddress:r})}function Sk(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Ta().decode(e.data)}}var Pa=new Uint8Array([0]);function hk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pa)}function Do(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",Pe()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Pa}))}function ha(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",he()],["compressedProofArgs",D()]])}function Mk(){return gill.combineCodec(Do(),ha())}async function Ma(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...i],data:Do().encode(c),programAddress:r})}function Rk(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...i],data:Do().encode(c),programAddress:r})}function bk(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:ha().decode(e.data)}}var _a=new Uint8Array([4]);function Ok(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_a)}function Po(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["member",Zn()],["role",ze()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Gt())],["userAccountCreationArgs",Pe()],["linkWalletArgs",gill.getOptionEncoder(Fn())]]),e=>({...e,discriminator:_a}))}function va(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["member",Wt()],["role",Ke()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(zt())],["userAccountCreationArgs",he()],["linkWalletArgs",gill.getOptionDecoder(Gn())]])}function Bk(){return gill.combineCodec(Po(),va())}async function Ua(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...i],data:Po().encode(c),programAddress:r})}function Nk(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...i],data:Po().encode(c),programAddress:r})}function wk(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:va().decode(e.data)}}var Wa=new Uint8Array([3]);function Kk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wa)}function Mo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Wa}))}function La(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function jk(){return gill.combineCodec(Mo(),La())}async function Oa(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(c),i=T(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:Mo().encode({}),programAddress:r})}function qk(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(c),i=T(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:Mo().encode({}),programAddress:r})}function Jk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:La().decode(e.data)}}var Na=new Uint8Array([5]);function tW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Na)}function bo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayEncoder(_n())]]),e=>({...e,discriminator:Na}))}function wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayDecoder(vn())]])}function rW(){return gill.combineCodec(bo(),wa())}async function Ha(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...i],data:bo().encode(c),programAddress:r})}function nW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...i],data:bo().encode(c),programAddress:r})}function oW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:wa().decode(e.data)}}var Ga=new Uint8Array([17]);function AW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function za(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",z()],["compressedProofArgs",E()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:Ga}))}function Ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",K()],["compressedProofArgs",D()],["signers",gill.getArrayDecoder(J())]])}function gW(){return gill.combineCodec(za(),Ka())}function ja(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:za().encode(c),programAddress:r})}function pW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Ka().decode(e.data)}}var Ya=new Uint8Array([2]);function SW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ya)}function Za(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Ya}))}function Xa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function xW(){return gill.combineCodec(Za(),Xa())}function Qa(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.admin),...i],data:Za().encode(c),programAddress:r})}function IW(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:Xa().decode(e.data)}}var ri=new Uint8Array([1]);function RW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function vo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder(jn())]]),e=>({...e,discriminator:ri}))}function ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(qn())]])}function bW(){return gill.combineCodec(vo(),ni())}async function _W(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...i],data:vo().encode(c),programAddress:r})}function oi(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...i],data:vo().encode(c),programAddress:r})}function vW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:o(),whitelistedAddressTrees:o(),systemProgram:r()},data:ni().decode(e.data)}}var ai=new Uint8Array([6]);function NW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ai)}function ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Ze()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",E()]]),e=>({...e,discriminator:ai}))}function di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Xe()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",D()]])}function wW(){return gill.combineCodec(ii(),di())}function ui(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.authority),...i],data:ii().encode(c),programAddress:r})}function HW(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{authority:r()},data:di().decode(e.data)}}var pi=new Uint8Array([7]);function qW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pi)}function mi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Ze()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["delegateTo",gill.getOptionEncoder($n())],["oldSettingsMutArgs",gill.getOptionEncoder(z())],["newSettingsMutArgs",gill.getOptionEncoder(z())],["compressedProofArgs",E()]]),e=>({...e,discriminator:pi}))}function li(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Xe()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["delegateTo",gill.getOptionDecoder(eo())],["oldSettingsMutArgs",gill.getOptionDecoder(K())],["newSettingsMutArgs",gill.getOptionDecoder(K())],["compressedProofArgs",D()]])}function JW(){return gill.combineCodec(mi(),li())}function Ti(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.feePayer),s(t.signer),s(t.oldSettings),s(t.newSettings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.domainConfig),...i],data:mi().encode(c),programAddress:r})}function YW(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:o(),oldSettings:o(),newSettings:o(),slotHashSysvar:o(),instructionsSysvar:o(),domainConfig:o()},data:li().decode(e.data)}}var fi=new Uint8Array([29]);function rL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fi)}function Uo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:fi}))}function Si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(J())]])}function nL(){return gill.combineCodec(Uo(),Si())}async function oL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...i],data:Uo().encode(c),programAddress:r})}function xi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...i],data:Uo().encode(c),programAddress:r})}function sL(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Si().decode(e.data)}}var Ei=new Uint8Array([27]);function gL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ei)}function Di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ei}))}function Pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function pL(){return gill.combineCodec(Di(),Pi())}function hi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...i],data:Di().encode(c),programAddress:r})}function mL(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Pi().decode(e.data)}}var _i=new Uint8Array([30]);function IL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_i)}function Lo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Bt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(Pt()))],["compressedProofArgs",gill.getOptionEncoder(E())],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:_i}))}function vi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Nt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(ht()))],["compressedProofArgs",gill.getOptionDecoder(D())],["signers",gill.getArrayDecoder(J())]])}function CL(){return gill.combineCodec(Lo(),vi())}async function EL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...i],data:Lo().encode(c),programAddress:r})}function Ui(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...i],data:Lo().encode(c),programAddress:r})}function DL(e){if(e.accounts.length<18)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:vi().decode(e.data)}}var Ni=new Uint8Array([28]);function vL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ni)}function Oo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Bt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(Pt()))],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ni}))}function wi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Nt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(ht()))],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function UL(){return gill.combineCodec(Oo(),wi())}async function kL(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...i],data:Oo().encode(c),programAddress:r})}function Hi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...i],data:Oo().encode(c),programAddress:r})}function WL(e){if(e.accounts.length<17)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:wi().decode(e.data)}}var Gi=new Uint8Array([13]);function VL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gi)}function zi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Gi}))}function Ki(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function FL(){return gill.combineCodec(zi(),Ki())}function ji(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:zi().encode(c),programAddress:r})}function GL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:Ki().decode(e.data)}}var Yi=new Uint8Array([23]);function ZL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yi)}function Zi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Yi}))}function Xi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function XL(){return gill.combineCodec(Zi(),Xi())}function Qi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.rentCollector),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:Zi().encode(c),programAddress:r})}function QL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:Xi().decode(e.data)}}var td=new Uint8Array([10]);function sO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(td)}function rd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",wt()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:td}))}function nd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ht()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function cO(){return gill.combineCodec(rd(),nd())}function od(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...i],data:rd().encode(c),programAddress:r})}function aO(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:nd().decode(e.data)}}var ad=new Uint8Array([20]);function mO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ad)}function id(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",wt()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",Lt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:ad}))}function dd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ht()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsReadonlyArgs",Ot()],["compressedProofArgs",D()]])}function lO(){return gill.combineCodec(id(),dd())}function ud(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...i],data:id().encode(c),programAddress:r})}function TO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:dd().decode(e.data)}}var pd=new Uint8Array([14]);function EO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pd)}function md(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:pd}))}function ld(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function DO(){return gill.combineCodec(md(),ld())}function Td(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:md().encode(c),programAddress:r})}function PO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:ld().decode(e.data)}}var Sd=new Uint8Array([24]);function UO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sd)}function xd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Sd}))}function Id(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function kO(){return gill.combineCodec(xd(),Id())}function Cd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:xd().encode(c),programAddress:r})}function WO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:Id().decode(e.data)}}var Pd=new Uint8Array([12]);function HO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pd)}function hd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Pd}))}function Md(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function VO(){return gill.combineCodec(hd(),Md())}function Rd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.transactionBuffer),...i],data:hd().encode(c),programAddress:r})}function FO(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:Md().decode(e.data)}}var vd=new Uint8Array([22]);function JO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(vd)}function Ud(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:vd}))}function kd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function YO(){return gill.combineCodec(Ud(),kd())}function Wd(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.transactionBuffer),...i],data:Ud().encode(c),programAddress:r})}function ZO(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:kd().decode(e.data)}}var Bd=new Uint8Array([11]);function nB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bd)}function Nd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Bd}))}function wd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function oB(){return gill.combineCodec(Nd(),wd())}function Hd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:Nd().encode(c),programAddress:r})}function sB(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:wd().decode(e.data)}}var Gd=new Uint8Array([21]);function gB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gd)}function zd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",Lt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Gd}))}function Kd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsReadonlyArgs",Ot()],["compressedProofArgs",D()]])}function pB(){return gill.combineCodec(zd(),Kd())}function jd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:zd().encode(c),programAddress:r})}function mB(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:Kd().decode(e.data)}}var Yd=new Uint8Array([15]);function xB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yd)}function Zd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Yd}))}function Xd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function IB(){return gill.combineCodec(Zd(),Xd())}function Qd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=l({}),i=T(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:Zd().encode({}),programAddress:r})}function CB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:Xd().decode(e.data)}}var tu=new Uint8Array([25]);function RB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tu)}function ru(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:tu}))}function nu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function bB(){return gill.combineCodec(ru(),nu())}function ou(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.transactionBuffer),...i],data:ru().encode(c),programAddress:r})}function _B(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:nu().decode(e.data)}}var au=new Uint8Array([16]);function BB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(au)}function iu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Vt()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:au}))}function du(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Ft()],["signers",gill.getArrayDecoder(J())]])}function NB(){return gill.combineCodec(iu(),du())}function uu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:iu().encode(c),programAddress:r})}function wB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:du().decode(e.data)}}var pu=new Uint8Array([26]);function jB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pu)}function mu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Vt()],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:pu}))}function lu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Ft()],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function qB(){return gill.combineCodec(mu(),lu())}function Tu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=l(a),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...i],data:mu().encode(c),programAddress:r})}function JB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:lu().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",oE=(c=>(c[c.DomainConfig=0]="DomainConfig",c[c.GlobalCounter=1]="GlobalCounter",c[c.Settings=2]="Settings",c[c.TransactionBuffer=3]="TransactionBuffer",c[c.WhitelistedAddressTree=4]="WhitelistedAddressTree",c))(oE||{});function _N(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([201,232,212,229,59,241,106,197])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([42,206,176,58,175,129,130,233])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([223,179,163,190,177,224,67,173])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([90,36,35,219,93,225,110,96])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([105,23,173,2,197,255,80,87])),0))return 4;throw new Error("The provided account could not be identified as a multiWallet account.")}var sE=(y=>(y[y.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",y[y.ChangeConfig=1]="ChangeConfig",y[y.ChangeConfigCompressed=2]="ChangeConfigCompressed",y[y.CreateCompressedWallet=3]="CreateCompressedWallet",y[y.CreateDomainConfig=4]="CreateDomainConfig",y[y.CreateDomainUserAccount=5]="CreateDomainUserAccount",y[y.CreateGlobalCounter=6]="CreateGlobalCounter",y[y.CreateUserAccounts=7]="CreateUserAccounts",y[y.DecompressSettingsAccount=8]="DecompressSettingsAccount",y[y.DisableDomainConfig=9]="DisableDomainConfig",y[y.EditDomainConfig=10]="EditDomainConfig",y[y.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",y[y.EditUserDelegate=12]="EditUserDelegate",y[y.NativeTransferIntent=13]="NativeTransferIntent",y[y.NativeTransferIntentCompressed=14]="NativeTransferIntentCompressed",y[y.TokenTransferIntent=15]="TokenTransferIntent",y[y.TokenTransferIntentCompressed=16]="TokenTransferIntentCompressed",y[y.TransactionBufferClose=17]="TransactionBufferClose",y[y.TransactionBufferCloseCompressed=18]="TransactionBufferCloseCompressed",y[y.TransactionBufferCreate=19]="TransactionBufferCreate",y[y.TransactionBufferCreateCompressed=20]="TransactionBufferCreateCompressed",y[y.TransactionBufferExecute=21]="TransactionBufferExecute",y[y.TransactionBufferExecuteCompressed=22]="TransactionBufferExecuteCompressed",y[y.TransactionBufferExtend=23]="TransactionBufferExtend",y[y.TransactionBufferExtendCompressed=24]="TransactionBufferExtendCompressed",y[y.TransactionBufferVote=25]="TransactionBufferVote",y[y.TransactionBufferVoteCompressed=26]="TransactionBufferVoteCompressed",y[y.TransactionExecute=27]="TransactionExecute",y[y.TransactionExecuteCompressed=28]="TransactionExecuteCompressed",y[y.TransactionExecuteSync=29]="TransactionExecuteSync",y[y.TransactionExecuteSyncCompressed=30]="TransactionExecuteSyncCompressed",y))(sE||{});function vN(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 30;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var aE=6e3,iE=6001,dE=6002,uE=6003,AE=6004,gE=6005,pE=6006,mE=6007,lE=6008,TE=6009,yE=6010,fE=6011,SE=6012,xE=6013,IE=6014,CE=6015,EE=6016,DE=6017,PE=6018,hE=6019,ME=6020,RE=6021,bE=6022,_E=6023,vE=6024,UE=6025,kE=6026,WE=6027,LE=6028,OE=6029,BE=6030,NE=6031,wE=6032,HE=6033,VE=6034,FE=6035,GE=6036,zE=6037,KE=6038,jE=6039,qE=6040,JE=6041,YE=6042,ZE=6043,XE=6044,QE=6045,$E=6046,eD=6047,tD=6048,rD=6049,nD=6050,oD=6051,sD=6052,cD=6053,aD=6054,iD=6055,dD=6056,uD=6057,AD=6058,gD=6059,pD=6060,mD=6061,lD=6062,TD=6063,yD=6064,fD=6065,SD=6066,xD=6067,ID=6068,CD=6069,ED=6070,DD=6071,PD=6072,hD=6073,MD=6074,RD=6075,bD=6076,_D=6077,vD=6078,UD=6079,kD=6080,WD=6081,LD=6082,OD=6083,BD=6084,ND=6085,wD=6086,yu;process.env.NODE_ENV!=="production"&&(yu={[NE]:"This member is already delegated to another wallet.",[mE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[_D]:"Clock sysvar access failed. This may indicate a system error.",[oD]:"Missing credential id.",[cD]:"The domain configuration account is disabled. Please contact support or try again later.",[aD]:"Missing domain configuration account.",[RD]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[wD]:"Duplicate address tree detected. This address tree is already in the whitelist.",[yE]:"Duplicate public keys detected among members. Each member must have a unique key.",[TE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[RE]:"No members provided. A multisig wallet must contain at least one member.",[pD]:"Slot numbers list is empty. At least one slot number is required for validation.",[PE]:"Expected a User with Administrator role for this instruction.",[lE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[EE]:"Expected a User with Transaction Manager role for this instruction.",[qE]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[JE]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[YE]:"Declared buffer size does not match the actual serialized size.",[gD]:"Failed to compute hash. This may indicate a system error.",[VE]:"Not enough members with vote permission to meet the approval threshold.",[wE]:"At least one signer with execute permission is required to proceed.",[HE]:"At least one signer with initiate permission is required to perform this action.",[kE]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[MD]:"Invalid account index in transaction message. The account index is out of bounds.",[uD]:"Address Tree supplied is not part of the whitelisted address trees.",[hE]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[LE]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[jE]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[mD]:"Member key conversion failed. The provided key format is invalid.",[FE]:"Only delegated members are allowed for this transaction.",[UE]:"Unexpected number of accounts provided for this instruction.",[xE]:"User with Permanent Member role must have a delegated wallet.",[iE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[AE]:"The extracted public key has an invalid length or encoding.",[aE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[uE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[nD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[tD]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[_E]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[DD]:"Invalid source type for token transfer. The source account type is not supported.",[DE]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[CE]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[vE]:"Malformed transaction message: structure or formatting does not match the expected layout.",[kD]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[WE]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[UD]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[ED]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[gE]:"The extracted WebAuthn signed message payload is malformed.",[$E]:"An input string exceeds the maximum allowed character length.",[iD]:"This member is not registered under the provided domain configuration.",[yD]:"Member not found in settings. Cannot remove a member that does not exist.",[hD]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[OE]:"A required account is missing from the instruction context.",[lD]:"Compressed proof arguments are missing. Required for compressed account operations.",[xD]:"Missing compressed token account. Required for token transfer operations.",[WD]:"Missing destination token account. Required for token transfer operations.",[CD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[TD]:"Light CPI accounts are missing. Required for compressed account operations.",[BE]:"User mutation arguments are required when performing add or remove delegate operations.",[BD]:"Missing new authority account. Required for domain configuration updates.",[OD]:"Missing settings account. Required for delegate operations on compressed wallets.",[AD]:"Compressed settings data is missing. The settings account must be initialized with data.",[LD]:"Missing source token account. Required for token transfer operations.",[ID]:"Missing SPL interface PDA. Required for token transfer operations.",[eD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[bD]:"User account address is missing. Required for secp256r1 signature verification.",[ND]:"Missing whitelisted address trees account. Required for domain configuration updates.",[zE]:"No valid signer found in this transaction.",[ME]:"Only one administrator is allowed per wallet.",[SE]:"Only one permanent member is allowed per wallet.",[IE]:"Only one transaction manager is allowed per wallet.",[dD]:"The given origin index is not in the whitelisted origins.",[SD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[fE]:"Permanent members cannot be removed from a wallet.",[QE]:"Writable CPI calls to protected accounts are not permitted.",[pE]:"The rpIdHash extracted from the signed message does not match the expected value.",[fD]:"Settings key mismatch. The provided settings key does not match the expected value.",[dE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[rD]:"The specified slot number was not found in the provided slot history.",[PD]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[bE]:"Too many members: a maximum of 4 members are supported.",[ZE]:"This transaction has expired. It must be executed within 3 minutes of approval.",[XE]:"This transaction has not yet reached the required approval threshold.",[sD]:"Missing transports.",[KE]:"Only the transaction creator or rent payer may close this transaction buffer.",[vD]:"Unauthorized: Only the admin account is allowed to perform this action.",[GE]:"Member is not part of the expected signers for this transaction."});function BN(e){return process.env.NODE_ENV!=="production"?yu[e]:"Error message not available in production bundles."}function NN(e,n,r){return gill.isProgramError(e,n,A,r)}async function YN({admin:e,addressTree:n}){return Zc({payer:e,addressTree:n,remainingAccounts:[]})}var Me=class extends Error{constructor(r,o,t){super(r);this.code=o;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},Qe=class extends Me{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},Q=class extends Me{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},I=class extends Me{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},ye=class extends Me{constructor(r,o,t){super(r,"NETWORK_ERROR",{statusCode:o,url:t});this.statusCode=o;this.url=t;}};var ae=class extends Me{constructor(r,o,t){super(r,"BUNDLE_ERROR",{bundleId:o,attempt:t});this.bundleId=o;this.attempt=t;}},vr=class extends Me{constructor(r,o,t){super(`Operation "${r}" failed after ${o} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=o;this.lastError=t;}},Ur=class extends Me{constructor(r,o,t){super(r,"PERMISSION_ERROR",{required:o,actual:t});this.required=o;this.actual=t;}};var Jt={Ed25519:1,Secp256r1:2};var HD=p__default.default.looseObject({publicKey:p__default.default.string(),walletAddress:p__default.default.string(),settingsIndexWithAddress:p__default.default.object({index:p__default.default.union([p__default.default.number(),p__default.default.bigint()]),settingsAddressTreeIndex:p__default.default.number()}),username:p__default.default.string().optional(),profilePictureUrl:p__default.default.string().optional()}),fu=p__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),rw=p__default.default.object({transactionActionType:fu,transactionAddress:p__default.default.string(),transactionMessageBytes:p__default.default.array(p__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),VD=p__default.default.object({transactionActionType:fu,transactionAddress:p__default.default.string(),transactionMessageBytes:p__default.default.base64()}).strict(),FD=p__default.default.union([p__default.default.object({type:p__default.default.literal("Ephemeral"),secretKey:p__default.default.string()}),p__default.default.object({type:p__default.default.literal("Default"),publickey:p__default.default.string(),endpoint:p__default.default.string()})]).array().optional(),Su=p__default.default.object({phase:p__default.default.literal("start"),redirectOrigin:p__default.default.url(),signer:p__default.default.string().optional(),rid:p__default.default.string(),validTill:p__default.default.number(),data:p__default.default.object({type:p__default.default.literal("message"),payload:p__default.default.string()}).strict()}).strict(),xu=p__default.default.object({phase:p__default.default.literal("start"),redirectOrigin:p__default.default.url(),signer:p__default.default.string().optional(),rid:p__default.default.string(),validTill:p__default.default.number(),data:p__default.default.object({type:p__default.default.literal("transaction"),payload:VD,sendTx:p__default.default.boolean(),additionalSigners:FD}).strict()}).strict(),Iu=p__default.default.object({startRequest:p__default.default.union([Su,xu]),authResponse:p__default.default.custom(),client:p__default.default.object({clientOrigin:p__default.default.url(),jws:p__default.default.string()}).strict(),device:p__default.default.object({jwk:p__default.default.base64(),jws:p__default.default.string()}).strict(),authProvider:p__default.default.object({jwk:p__default.default.base64(),jws:p__default.default.string()}).strict().optional()}).strict(),Cu=p__default.default.object({signer:p__default.default.string(),userAddressTreeIndex:p__default.default.number().optional(),additionalInfo:p__default.default.looseObject({}).optional()}).strict(),GD=p__default.default.object({slotHash:p__default.default.string(),slotNumber:p__default.default.string(),originIndex:p__default.default.number(),crossOrigin:p__default.default.boolean()}).strict(),nw=p__default.default.object({phase:p__default.default.literal("complete"),data:p__default.default.object({type:p__default.default.literal("message"),payload:Cu.extend(Iu.shape).extend({id:p__default.default.string().optional(),client:p__default.default.object({clientOrigin:p__default.default.url()}).strict()})}).strict()}).strict(),ow=p__default.default.object({phase:p__default.default.literal("complete"),data:p__default.default.object({type:p__default.default.literal("transaction"),payload:Cu.extend(Iu.shape).extend(GD.shape).extend({client:p__default.default.object({clientOrigin:p__default.default.url()}).strict()})}).strict()}).strict(),sw=p__default.default.object({phase:p__default.default.literal("complete"),data:p__default.default.object({type:p__default.default.literal("transaction"),payload:p__default.default.object({startRequest:p__default.default.union([xu,Su]),txSig:p__default.default.string(),user:HD})}).strict()}).strict();var Re={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},ve=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,o)=>r|o,0))}static all(){return new e(Object.values(Re).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var wo=33,Ue=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==wo)throw new Error(`Invalid public key length, expected ${wo} bytes but got ${n.length}`)}toBase58(){return gill.getBase58Decoder().decode(this.toBytes())}toTruncatedBuffer(){let n=this.toBuffer();return n.subarray(1,n.length)}toBuffer(){if(!this._bn)throw new Error("Invalid public key input");let n=this._bn;if(n.byteLength===wo)return n;throw new Error("Invalid public key input")}toBytes(){let n=this.toBuffer();return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}toString(){return this.toBase58()}toJSON(){return this.toBase58()}},_=class extends Ue{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function jD(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function qD(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Du=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(jD())],["addressTableLookups",gill.getArrayCodec(qD())]]);function Pu(e){return Du.encode({numSigners:e.header.numSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,accountKeys:e.staticAccounts,instructions:e.instructions.map(r=>({programAddressIndex:r.programAddressIndex,accountIndices:r.accountIndices??[],data:Array.from(r.data??[])})),addressTableLookups:e.version!=="legacy"?e.addressTableLookups?.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes,writableIndexes:r.writableIndexes}))??[]:[]})}function hu(e){let n=Du.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}var Vo=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Mu="https://mainnet.block-engine.jito.wtf/api/v1",Ru="https://bundles.jito.wtf/api/v1/bundles/tip_floor",bu="landed_tips_75th_percentile";var ne={};function _u(){if(!ne.solanaRpcEndpoint)throw new Qe("RPC endpoint");return ne.solanaRpcEndpoint}function We(){if(!ne.lightProtocolRpc)throw new Qe("Light Protocol RPC");return ne.lightProtocolRpc}function Y(){if(!ne.solanaRpc)throw new Qe("Solana RPC");return ne.solanaRpc}function vu(){if(!ne.sendAndConfirm)throw new Qe("Send and confirm transaction function");return ne.sendAndConfirm}function Fo(){return ne.jitoTipsConfig?ne.jitoTipsConfig:{blockEngineUrl:Mu,getJitoTipsUrl:Ru,priority:bu}}function bw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:o}){ne.solanaRpcEndpoint=e,ne.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});ne.solanaRpc=t,ne.sendAndConfirm=c,ne.jitoTipsConfig=o??null;}async function Yt(e,n){if(!e.ok)throw new ye(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function Zt(e){try{return await e.json()}catch(n){throw new ye(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function zw(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Wr(n.get(-2))),y:BigInt("0x"+Wr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Kw(e){let r=nist_js.p256.Point.fromBytes(gill.getBase58Encoder().encode(e)).toBytes(false),o=new Map;return o.set(1,2),o.set(3,-7),o.set(-1,1),o.set(-2,r.slice(1,33)),o.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(o))}async function jw(e){let{authenticatorData:n,clientDataJSON:r,signature:o}=e.authResponse.response,t=me(n),c=JSON.parse(gill.getUtf8Decoder().decode(me(r))),a=Lu(c),i=Bu(me(o)),s=await dt({rpIdHash:t.subarray(0,32)});return new _(e.signer.toString(),{verifyArgs:{clientDataJson:me(r),truncatedClientDataJson:a,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:Go(e.client.clientOrigin,e.device.jwk,e.startRequest.rid),domainConfig:s,authData:t,signature:i,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function Go(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase64Encoder().encode(n),...gill.getBase64Encoder().encode(r)]))}function qw(e){return sha2_js.sha256(gill.getUtf8Encoder().encode(JSON.stringify(e)))}function Jw(e){return zo(e.data.payload.authResponse)}function Yw(e,n,r,o){let t=Go(n,r,o);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function Zw(e,n,r,o,t,c){let a;if(!t||!c){let u=(await Y().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!u)throw new Q("Slot sysvar","Unable to fetch slot sysvar data");let g=gill.getBase64Encoder().encode(u[0]);c=gill.getU64Decoder().decode(g.subarray(0,8)).toString(),a=g.subarray(8,40),t=gill.getBase58Decoder().decode(a);}else a=gill.getBase58Encoder().encode(t);let i=sha2_js.sha256(typeof e.transactionMessageBytes=="string"?gill.getBase64Encoder().encode(e.transactionMessageBytes):e.transactionMessageBytes),s=Go(n,r,o),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...i,...a,...s]));return {slotNumber:c,slotHash:t,challenge:d}}function zo(e){let n=Lr(e);return sha2_js.sha256(n)}function Xw(e){let n="";for(let o of e)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function me(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,o=n.padEnd(n.length+r,"="),t=atob(o),c=new ArrayBuffer(t.length),a=new Uint8Array(c);for(let i=0;i<t.length;i++)a[i]=t.charCodeAt(i);return a}async function Qw(e,n){let{data:r}=await gs(Y(),e),t=Ou(r.origins,r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Q("Origin","Origin not found in domain config");return t}function $w(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function e2(e){return JSON.parse(gill.getUtf8Decoder().decode(gill.getBase64Encoder().encode(e)))}function Wr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function nP(e){let n=new Uint8Array(e.length/2);for(let r=0;r<n.length;r++)n[r]=parseInt(e.slice(r*2,r*2+2),16);return n}function Lu(e){let n=new Set(["type","challenge","origin","crossOrigin"]),r={};for(let t in e)n.has(t)||(r[t]=e[t]);if(Object.keys(r).length===0)return new Uint8Array([]);let o=JSON.stringify(r);return new TextEncoder().encode(o.slice(1,-1))}function Ou(e,n){let r=[],o=0,t=new TextDecoder;for(let c=0;c<n;c++){if(o+2>e.length)throw new Error("MaxLengthExceeded");let a=e[o]|e[o+1]<<8;if(o+=2,o+a>e.length)throw new Error("MaxLengthExceeded");let i=e.slice(o,o+a),s=t.decode(i);r.push(s),o+=a;}return r}function Bu(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let b=n&127;r+=b;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let o=e[r+1],t=r+2,c=e.slice(t,t+o);if(r=t+o,e[r]!==2)throw new Error("Expected INTEGER for s");let a=e[r+1],i=r+2,s=e.slice(i,i+a),d=c[0]===0&&c.length>32?c.slice(1):c,u=s[0]===0&&s.length>32?s.slice(1):s;if(d.length>32||u.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(d,32-d.length);let m=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+Wr(u)),C=(f>m?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=nP(C);return new Uint8Array([...g,...x])}function Lr(e){let n=me(e.response.clientDataJSON),r=me(e.response.authenticatorData),o=sha2_js.sha256(n);return new Uint8Array([...r,...o])}var oP=400,sP=429,wu=500,cP=3,aP=500,iP=2,dP=3e4,Hu={backoffBase:iP,maxDelayMs:dP,retryOnRateLimit:true,initialDelayMs:aP,maxRetries:cP};function Vu(e){return e===sP}function Fu(e){return e>=wu}function uP(e){return e>=oP&&e<wu}function AP(e){return Vu(e)||Fu(e)}function gP(e,n,r){return e instanceof Response?Vu(e.status)?r.retryOnRateLimit??true:uP(e.status)?false:Fu(e.status):e instanceof TypeError||e instanceof Error}function pP(e,n,r,o){let t=n*Math.pow(r,e-1);return Math.min(t,o)}function mP(e){return new Promise(n=>setTimeout(n,e))}async function $t(e,n){let{maxRetries:r,initialDelayMs:o,backoffBase:t,maxDelayMs:c,shouldRetry:a}={...Hu,...n},i;for(let s=1;s<=r;s++)try{return await e()}catch(d){if(i=d,a&&!a(d,s))throw d;if(s>=r)break;let u=pP(s,o,t,c);await mP(u);}throw new vr(e.name||"retryWithBackoff",r,i)}async function ut(e,n){let r={...Hu,...n},o=(c,a)=>gP(c,a,r);return $t(async()=>{let c=await e();if(!c.ok&&AP(c.status))throw c;return c},{...r,shouldRetry:n?.shouldRetry??o})}function Gu(...e){return n=>e.some(r=>n instanceof r)}function zu(e,n,r,o){if(e<n||e>r)throw new I(`${o} must be between ${n} and ${r} (inclusive), got ${e}`)}function Ku(e,n){if(e<0)throw new I(`${n} must be non-negative, got ${e}`)}function er(e,n){if(e.length===0)throw new I(`${n} cannot be empty`)}function ju(e,n){if(e.trim().length===0)throw new I(`${n} cannot be empty`)}async function jo(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await Y().getLatestBlockhash().send()).value;return await Promise.all(e.map(async o=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(o.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(o.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>o.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,o.addressesByLookupTableAddress):c,async c=>{let a=Math.ceil((o.unitsConsumed??0)*1.1);return a>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:a})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function Xu(e){let n=gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:8e5}),programs.getSetComputeUnitPriceInstruction({microLamports:1e4})],e),r=gill.getBase64EncodedWireTransaction(gill.compileTransaction(n));if(r.length>1644)throw new I(`Transaction exceeds maximum length of ${1644} bytes (actual: ${r.length} bytes)`);let o=await Y().simulateTransaction(r,{encoding:"base64"}).send();if(o.value.err){if(o.value.logs){let c=["Transaction simulation failed:","",...o.value.logs].join(`
|
|
2
2
|
`);throw new Error(c)}let t=["Transaction simulation failed:","",o.value.err.toString()].join(`
|
|
3
|
-
`);throw new Error(t)}return o.value.unitsConsumed}async function gA(e,n){let o=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));o.sort((c,i)=>c-i);let t=Math.floor(o.length/2);return o.length%2===0?Math.round((o[t-1]+o[t])/2):o[t]}async function pA(e,n){sr(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new z(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await lt(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})}));await er(r,n);let o=await tr(r);if(!o.result||o.error)throw new le(`Unable to simulate bundle: ${JSON.stringify(o.error??o.result)}`);if(typeof o.result.value.summary!="string"&&o.result.value.summary.failed){let{TransactionFailure:t}=o.result.value.summary.failed.error,[,c]=t;throw new le(`Simulation failed: ${c}`)}return o.result.value.transactionResults.map(t=>t.unitsConsumed)}function X(e,n=0){let r=e instanceof M?e:void 0,o=r?.verifyArgs&&n!==-1?gill.some({signedMessageIndex:n,truncatedClientDataJson:r.verifyArgs.truncatedClientDataJson,slotNumber:r.verifyArgs.slotNumber,originIndex:r.originIndex,crossOrigin:r.crossOrigin,clientAndDeviceHash:r.clientAndDeviceHash}):gill.none(),t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs.clientDataJson?Vr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:o,signature:c,message:i,publicKey:a}}function Pe(e){if(e instanceof He)return {keyType:$t.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:$t.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function aA(e){return e instanceof M?e.toString():e.address.toString()}function Se(e){let n=new Set,r=[];for(let t of e)n.has(aA(t))||(r.push(t),n.add(aA(t)));let o=r.filter(t=>t instanceof M);if(o.length>1)throw new z(`More than 1 Secp256r1 signers in an instruction is not supported (found ${o.length})`);return r}function mA({payer:e,tipAmount:n}){let r=jo[Math.floor(Math.random()*jo.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function lA(e){return typeof e=="string"?e:e.toString()}function TA(e){return e.toString()}async function es(e,n,r){let o=e?.get(n);if(o)return o;let t=await r();return t&&e&&e.set(n,t),t}var ts=[{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree1),queue:new web3_js.PublicKey(stateless_js.batchQueue1),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext1),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree2),queue:new web3_js.PublicKey(stateless_js.batchQueue2),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext2),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree3),queue:new web3_js.PublicKey(stateless_js.batchQueue3),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext3),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree4),queue:new web3_js.PublicKey(stateless_js.batchQueue4),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext4),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree5),queue:new web3_js.PublicKey(stateless_js.batchQueue5),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext5),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2}],N=class{systemAccounts;nextPreIndex;preMap;nextPackedIndex;packedMap;outputTreeIndex;constructor(){this.systemAccounts=[],this.nextPreIndex=0,this.preMap=new Map,this.nextPackedIndex=0,this.packedMap=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){for(let r of n)this.insertOrGet(r.address.toString(),r,false);return this.preMap}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n,r={address:gill.address(n),role:gill.AccountRole.WRITABLE},o=true){let t=o?this.packedMap:this.preMap;if(!t.has(n)){let c=o?this.nextPackedIndex++:this.nextPreIndex++;t.set(n,{index:c,accountMeta:r});}return t.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=stateless_js.selectStateTreeInfo(ts);return this.packOutputTreeIndex(n)}packTreeInfos(n,r){let o=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());o.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let s=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(s);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:o.length>0?{packedTreeInfos:o,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(n){return Array.from(n.entries()).sort((o,t)=>o[1].index-t[1].index).map(([,{accountMeta:o}])=>({...o}))}getOffsets(n){let r=n,o=r+this.systemAccounts.length;return [r,o]}toAccountMetas(){let n=this.hashSetAccountsToMetas(this.preMap),r=this.hashSetAccountsToMetas(this.packedMap),[o,t]=this.getOffsets(n.length);return {remainingAccounts:[...n,...this.systemAccounts,...r],systemOffset:o,packedOffset:t}}};async function Gr(e,n){let r=lA(e);return es(n,r,()=>SA(e))}async function ct(e,n){let r=TA(e);return es(n,r,()=>ee().getAccountInfo(e,{encoding:"base64"}).send())}async function Te(e,n){let r=(await Promise.all(e.map(o=>Gr(o.address,n)))).filter(o=>o!==null).filter(o=>o.data!==null&&o.address!==null);if(r.length!==e.length)throw new oe("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((o,t)=>({...o,type:e[t].type,tree:o.treeInfo.tree,queue:o.treeInfo.queue}))}function k(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function Me(e,n,r,o,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:o[u],address:d.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],c),a=await e.getOutputTreeIndex();return t.map((d,u)=>({addressTreeInfo:i[u],outputStateTreeIndex:a,address:d.address,type:d.type}))}function ue(e,n,r,o,t,c,i){let a=[];for(let u=0;u<n.length;u++)a.push({treeInfo:n[u],rootIndex:o[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let s=e.packTreeInfos(a,[]).stateTrees;if(!s)throw new z("Unable to parse state tree data");return c.map((u,g)=>({data:i.decode(u.data.data),accountMeta:{treeInfo:s.packedTreeInfos[g],address:new Uint8Array(u.address),outputStateTreeIndex:s.outputTreeIndex}}))}async function he(e,n,r,o,t){let c=null,i=null,a=null,s=new N;if(e){await s.addSystemAccounts();let{address:d}=await ge(n,r),u=(await Te([{address:d,type:"Settings"}],t))[0];o?a={rootIndices:[0],roots:[],leafIndices:[u.leafIndex],leaves:[],treeInfos:[u.treeInfo],proveByIndices:[u.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:a=await te([u],[]);let g=s.packTreeInfos([{treeInfo:a.treeInfos[0],rootIndex:a.rootIndices[0],leafIndex:a.leafIndices[0],proveByIndex:a.proveByIndices[0],hash:u.hash}],[]).stateTrees;if(!g)throw new z("Unable to parse state tree data");c={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0]},data:J().decode(u.data?.data)},i={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:J().decode(u.data?.data)};}return {settingsReadonlyArgs:c,proof:a,packedAccounts:s,settingsMutArgs:i}}async function te(e,n){return or(()=>Fe().getValidityProofV0(e,n))}async function Re(){return (await zr()).length-1}var rs;async function zr(){if(!rs){let{data:e}=await oa(ee(),await xA());rs=e.whitelistedAddressTrees;}return rs}function fA(e){if(!e||e.length<8)return 3;if(e[0]===2)return 1;let n=e[7];return n===3?2:3}async function ar(e,n,r){let o=await bM(e,n,r);if(!o)throw new oe("User account");return o}async function bM(e,n,r){let{address:o}=await w(e,n),t=await Gr(o,r);return t?.data?.data?ne().decode(t.data.data):null}async function l8(e,{member:n,credentialId:r}){let o=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)o.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(V().encode(Pe(n)))}});else if(r)o.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(Ce(r))}});else return null;let t=await Fe().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:o});return t.items.filter(c=>!!c.data).length?t.items.map(c=>ne().decode(c.data?.data))[0]:null}async function Kr(e,n,r){let o=await _M(e,n,r);if(!o)throw new oe("Settings account");return o}async function _M(e,n,r){try{let{address:o}=await ge(e,n),t=await Gr(o,r);if(!t?.data?.data)throw new oe("Compressed settings account");let c=J().decode(t.data.data);if(c.data.__option==="None")throw new oe("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let o=await xo(ee(),e);return o.exists?{...o.data,isCompressed:false}:null}}async function T8(e,n,r){let o=await ar(e,n,r);if(o.role===1||o.role===0){let t=[],[c,i]=await Promise.all([Fe().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(V().encode(Pe(e)))}}]}),ee().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(V().encode(Pe(e)))}}]}).send()]);return c.items.forEach(a=>{if(a.data?.data){let s=J().decode(a.data.data);s.data.__option==="Some"&&t.push({...s.data.value,isCompressed:true});}}),i.forEach(a=>{let s=hr().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...s,isCompressed:false});}),t}else return await Promise.all(o.wallets.map(async t=>Kr(await be(t.index),t.settingsAddressTreeIndex,r)))}async function os(e){oA(e,"index");let n=await zr();if(e>=n.length)throw new z(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function y8(e){let r=(await zr()).findIndex(o=>o.toString()===e);if(r===-1)throw new oe("Address tree",`Address ${e} not found in whitelist`);return r}async function SA(e,n){if(!n&&!e)throw new Error("Either hash or address must be provided");if(n&&e)throw new Error("Only one of hash or address must be provided");let r=await stateless_js.rpcRequest(Fe().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:n?stateless_js.encodeBN254toBase58(n):void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),o;if(stateless_js.featureFlags.isV2()?o=superstruct.create(r,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):o=superstruct.create(r,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in o)throw new web3_js.SolanaJSONRPCError(o.error,`failed to get info for compressed account ${n?n.toString():e?e.toString():""}`);if(o.result.value===null)return null;let t=stateless_js.featureFlags.isV2()?o.result.value.merkleContext.tree:o.result.value.tree,c=stateless_js.getStateTreeInfoByPubkey(ts,t),i=o.result.value;return stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(c,i.hash,i.leafIndex),i.owner,stateless_js.bn(i.lamports),i.data?stateless_js.parseAccountData(i.data):void 0,i.address||void 0)}async function ge(e,n=0){let r=await os(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function w(e,n=0){let r=await os(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof He?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function mt({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new z("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function _A(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function xA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function vA(e,n,r){nA(r,0,255,"buffer_index");let[o]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof He?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return o}async function Le(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function be(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function b8(e){let n=await be(e);return await Le(n)}async function _8(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function H8(e){sr(e,"bundle");let n=await $o(e,true),r=await pA(n.map(gill.getBase64EncodedWireTransaction),Gu()),o=await $o(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await BM(o.map(gill.getBase64EncodedWireTransaction))}async function BM(e,n=Yo(),r){sr(e,"serializedTransactions");let{blockEngineUrl:o}=n,t=`${o}/bundles`,c=await lt(()=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),r);await er(c,t);let i=await tr(c);if(i.error)throw new le(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new le("No bundle ID returned from Jito");return i.result}async function V8(e,n=30,r=3e3,o=Yo()){sA(e,"bundleId");let{blockEngineUrl:t}=o,c=`${t}/getBundleStatuses`;return or(async()=>{let i=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await er(i,c);let a=await tr(i);if(a.error)throw new le(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new le("Bundle not yet confirmed",e);let s=a.result.value[0];if(s.confirmation_status==="confirmed"||s.confirmation_status==="finalized"){let d=s.transactions[s.transactions.length-1];if(!d)throw new le("No transactions in confirmed bundle",e);return d}throw new le(`Bundle status: ${s.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:rA(le,De)})}async function J8({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=await ee().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(e,c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(o.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([AA(c),gA(ee(),c.instructions.flatMap(d=>d.accounts??[]))]),s=Math.ceil((Number(i)??0)*1.1);return gill.prependTransactionMessageInstructions([...s>2e5?[programs.getSetComputeUnitLimitInstruction({units:s})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await zu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function dH(e,n){if(n.threshold>1)throw new z("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(s=>LA(s.pubkey)===e);if(!r)throw new oe("Member",`Signer ${e} not found in settings`);let{permissions:o}=r;if(!o)throw new oe("Permissions","No permissions found for the current member");let t=we.has(o,We.InitiateTransaction),c=we.has(o,We.VoteTransaction),i=we.has(o,We.ExecuteTransaction);if(t&&c&&i)return {};if(!c||!i)throw new Nr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(s=>s.role===0);if(!a)throw new oe("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(LA(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function uH({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:o,cachedAccounts:t}){if(!n)return null;let c=await ar(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new oe("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return eh(n,c.transactionManagerUrl.value,e,o)}function eh(e,n,r,o){return {address:e,async signTransactions(t){let c=await lt(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicKey:e.toString(),payload:t.map(a=>({transaction:gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)),transactionMessageBytes:o?gill.getBase64Decoder().decode(o):void 0,authResponses:r}))})}));if(!c.ok)throw new De(`Transaction manager request failed: ${c.statusText}`,c.status,n);let i=await c.json();if("error"in i)throw new De(`Transaction manager error: ${i.error}`,c.status,n);return i.signatures.map(a=>({[e]:gill.getBase58Encoder().encode(a)}))}}}function LA(e){return e.keyType===$t.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function AH(e){let n=e.map(c=>qe().encode(c)),r=4+n.reduce((c,i)=>c+i.length,0),o=new Uint8Array(r),t=0;o.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)o.set(c,t),t+=c.length;return o}function gH(e){let n=0,[r,o]=gill.getU32Decoder().read(e,n);n=o;let t=new Array(r);for(let c=0;c<r;c++){let i=Je().read(e,n);t[c]=i[0],n=i[1];}if(n!==e.length)throw new z(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function RH({payer:e,rpId:n,origins:r,authority:o}){let t=await mt({rpId:n}),c=new N;await c.addSystemAccounts();let i=await Re(),{address:a,addressTree:s}=await w(o.address,i),d=[{address:a,tree:s,queue:s,type:"User"}],u=await te([],d),g=(await Me(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:p,systemOffset:f}=c.toAccountMetas(),S=k(u,f);return await Ha({origins:r,authorityCreationArgs:g,authority:o,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function wH({authority:e,payer:n,createUserArgs:r,domainConfig:o,cachedAccounts:t}){let c=new N;await c.addSystemAccounts();let i=[];r.settings&&(i.push({address:(await ge(r.settings,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await w(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await Te(i,t):[],s=await Re(),{address:d,addressTree:u}=await w(r.member,s),g=[{address:d,type:"User",tree:u,queue:u}],p=await te(a,g),f=null,S=null,I=a.filter(B=>B.type==="Settings"),x=a.filter(B=>B.type==="User");I.length&&(f=ue(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),I,J())[0]),x.length&&(S=ue(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,ne())[0]);let _=await Me(c,p.treeInfos.slice(a.length),p.roots.slice(a.length),p.rootIndices.slice(a.length),g),{remainingAccounts:E,systemOffset:C}=c.toAccountMetas(),v=k(p,C);return await Ka({payer:n,authority:e,compressedProofArgs:v,member:wt().decode(r.member.toBuffer()),credentialId:Ce(r.credentialId),transports:r.transports,role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:_[0],domainConfig:o,remainingAccounts:E})}async function GH({payer:e}){let n=await _A();return Ya({payer:e,globalCounter:n})}async function qH({admin:e,rpId:n,disable:r}){let o=await mt({rpId:n});return Ai({domainConfig:o,admin:e,disable:r,remainingAccounts:[]})}function rh(e,n,r,o){let t=nh(e,n),c=oh(e,n)&&r!==o;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function nh(e,n){let r=e.staticAccounts.length,{numSignerAccounts:o,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=o-t,a=r-o-c;return n>=r?false:n<i?true:n>=o?n-o<a:false}function oh(e,n){return n<e.header.numSignerAccounts}async function jr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:o}){let t=Fu(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(a=>a.lookupTableAddress),ee()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,s]of t.staticAccounts.entries())i.push({address:s,role:rh(t,a,s,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let s=c[a.lookupTableAddress];if(!s)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:u,role:gill.AccountRole.WRITABLE});}for(let d of a.readonlyIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:u,role:gill.AccountRole.READONLY});}}for(let a of o?.filter(s=>s.address!==e)??[]){let s=i.findIndex(d=>d.address===a.address);s===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[s].role===gill.AccountRole.READONLY||i[s].role===gill.AccountRole.READONLY_SIGNER?i[s]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[s].role===gill.AccountRole.WRITABLE||i[s].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[s]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}var yt=33,ft=64,is=14,Ah=2,gh=gill.address("Secp256r1SigVerify1111111111111111111111111");function ph(){return gill.getStructEncoder([["signatureOffset",gill.getU16Encoder()],["signatureInstructionIndex",gill.getU16Encoder()],["publicKeyOffset",gill.getU16Encoder()],["publicKeyInstructionIndex",gill.getU16Encoder()],["messageDataOffset",gill.getU16Encoder()],["messageDataSize",gill.getU16Encoder()],["messageInstructionIndex",gill.getU16Encoder()]])}function mh(){return gill.getStructDecoder([["signatureOffset",gill.getU16Decoder()],["signatureInstructionIndex",gill.getU16Decoder()],["publicKeyOffset",gill.getU16Decoder()],["publicKeyInstructionIndex",gill.getU16Decoder()],["messageDataOffset",gill.getU16Decoder()],["messageDataSize",gill.getU16Decoder()],["messageInstructionIndex",gill.getU16Decoder()]])}function VA(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let o=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=mh();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=is;let i=[];for(let a=0;a<r;a++){let s=gill.fixDecoderSize(gill.getBytesDecoder(),yt).decode(e,n);n+=yt;let d=gill.fixDecoderSize(gill.getBytesDecoder(),ft).decode(e,n);n+=ft;let u=t[a].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,i.push({publicKey:s,signature:d,message:g});}return [{numSignatures:r,padding:o,offsets:t,payload:i},n]}})}function FA(){return gill.createEncoder({getSizeFromValue:e=>{let n=is*e.offsets.length,r=e.payload.reduce((o,t)=>o+yt+ft+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let o=ph();for(let t of e.offsets)r=o.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),yt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),ft).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function c5(){return gill.combineCodec(FA(),VA())}function H(e,n){let r=e.length,o=Ah+r*is,t=[];for(let s=0;s<r;s++){let{message:d}=e[s],u=o,g=u+yt,p=g+ft;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:d.length,messageInstructionIndex:65535}),o+=yt+ft+d.length;}let c=n?.programAddress??gh,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:FA().encode(i)}}function a5(e){return {programAddress:e.programAddress,accounts:{},data:VA().decode(e.data)}}async function GA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:o,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:s=false}){let d=await Le(e),{accountMetas:u,addressLookupTableAccounts:g}=await jr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(H(c)),p.push(s?yu({transactionBuffer:n,payer:o.address,remainingAccounts:u,settingsKey:e}):Au({transactionBuffer:n,payer:o.address,settings:e})),a&&p.push(mA({payer:o,tipAmount:a})),{instructions:p,addressLookupTableAccounts:g}}async function KA({settings:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,additionalSigners:o,signers:t,payer:c,addressesByLookupTableAddress:i,secp256r1VerifyInput:a=[],compressed:s=false,simulateProof:d=false,cachedAccounts:u}){let g=Se(t),p=await Le(e),[{accountMetas:f,addressLookupTableAccounts:S,transactionMessage:I},{settingsMutArgs:x,proof:_,packedAccounts:E}]=await Promise.all([jr({transactionMessageBytes:r,walletAddress:p,additionalSigners:o,addressesByLookupTableAddress:i}),he(s,e,n,d,u)]);E.addPreAccounts(f);let C=[];for(let j of g)if(j instanceof M){let ce=a.length,{domainConfig:ye,verifyArgs:fe,signature:ae,publicKey:_e,message:ut}=X(j,ce);if(ut&&ae&&_e&&a.push({message:ut,signature:ae,publicKey:_e}),ye){let y=E.addPreAccounts([{address:ye,role:gill.AccountRole.READONLY}]).get(ye)?.index;fe.__option==="Some"&&y!==void 0&&C.push({__kind:"Secp256r1",fields:[{domainConfigIndex:y,verifyArgs:fe.value}]});}}else {let ce=E.addPreAccounts([{address:j.address,role:gill.AccountRole.READONLY_SIGNER,signer:j}]).get(j.address)?.index;ce!==void 0&&C.push({__kind:"Ed25519",fields:[ce]});}let{remainingAccounts:v,systemOffset:B}=E.toAccountMetas(),K=[];a.length>0&&K.push(H(a));let se=lh(I,f);if(s){if(!c||!x)throw new Error("Payer not found or proof args is missing.");let j=k(_,B);K.push(bu({signers:C,transactionMessage:se,settingsMutArgs:x,compressedProofArgs:j,payer:c,remainingAccounts:v}));}else K.push(Eu({signers:C,settings:e,transactionMessage:se,remainingAccounts:v}));return {instructions:K,addressLookupTableAccounts:S}}function lh(e,n){if(e.version==="legacy")throw new Error("Only versioned transaction is allowed.");return {numSigners:e.header.numSignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numAccountKeys:e.staticAccounts.length,instructions:e.instructions.map(r=>({...r,accountIndices:new Uint8Array(r.accountIndices??[]),data:r.data??[]})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(o=>o.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function v5({settings:e,settingsAddressTreeIndex:n,destination:r,signers:o,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let s=Se(o),d=await Le(e),[{packedAccounts:u,proof:g,settingsMutArgs:p},{value:f}]=await Promise.all([he(a,e,n,false,t),ct(d,t)]);if((f?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let S=[],I=[];for(let C of s)if(C instanceof M){let v=S.length,{domainConfig:B,verifyArgs:K,signature:se,publicKey:j,message:ce}=X(C,v);if(ce&&se&&j&&S.push({message:ce,signature:se,publicKey:j}),B){let ye=u.addPreAccounts([{address:B,role:gill.AccountRole.READONLY}]).get(B)?.index;K.__option==="Some"&&ye!==void 0&&I.push({__kind:"Secp256r1",fields:[{domainConfigIndex:ye,verifyArgs:K.value}]});}}else {let v=u.addPreAccounts([{address:C.address,role:gill.AccountRole.READONLY_SIGNER,signer:C}]).get(C.address)?.index;v!==void 0&&I.push({__kind:"Ed25519",fields:[v]});}let{remainingAccounts:x,systemOffset:_}=u.toAccountMetas(),E=[];if(S.length>0&&E.push(H(S)),a){if(!i||!p)throw new Error("Payer not found or proof args is missing.");let C=k(g,_);E.push(wi({amount:c,settingsMutArgs:p,compressedProofArgs:C,payer:i,signers:I,source:d,destination:r,remainingAccounts:x}));}else E.push(ki({amount:c,signers:I,source:d,destination:r,settings:e,remainingAccounts:x}));return E}var Ih=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),Ch=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),Jr=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function z5({settings:e,settingsAddressTreeIndex:n,destination:r,mint:o,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:s,splInterfacePdaArgs:d={index:0,restricted:false},compressed:u=false}){let g=Se(t),p=await Le(e),f=U=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(U),gill.getAddressEncoder().encode(Jr),gill.getAddressEncoder().encode(o)],programAddress:Jr}),S=()=>{let U=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(o)];return d.restricted&&U.push(gill.getUtf8Encoder().encode("restricted")),d.index>0&&U.push(gill.getU8Encoder().encode(d.index)),U},[I,[x],_,[E],[C]]=await Promise.all([programs.getAssociatedTokenAccountAddress(o,p,s),f(p),programs.getAssociatedTokenAccountAddress(o,r,s),f(r),gill.getProgramDerivedAddress({seeds:S(),programAddress:Jr})]),[v,B,K,se]=await Promise.all([ct(_,c),ct(I,c),ct(x,c),Ph(u,e,n,c)]),j=!!v.value,ce=!!B.value,ye=!!K.value,fe=ce?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(B.value.data[0])).amount:BigInt(0),ae=BigInt(ye?Mh(gill.getBase64Encoder().encode(K.value.data[0]))?.amount??0:0),_e=j?_:void 0,ut=j?void 0:E,y=ce&&(fe+ae<BigInt(i)||ae>BigInt(0)||!j)||!ce&&j,Qr=!j,[me,ls]=await Promise.all([Dh(p,o,fe,ae,BigInt(i),u?3:4),Eh(y,C,c)]),re=me.reduce((U,q)=>U+q.parsed.amount.toNumber(),0);if(fe+ae+BigInt(re)<BigInt(i))throw new Error("Insufficient balance");let At=null,Oe=null,Be=new N;if(ls&&Be.addPreAccounts([{address:o,role:gill.AccountRole.WRITABLE}]),se||me.length){await Be.addSystemAccounts();let U=[];if(me.length&&U.push(...me.map(q=>({hash:q.compressedAccount.hash,tree:q.compressedAccount.treeInfo.tree,queue:q.compressedAccount.treeInfo.queue,data:q.compressedAccount.data,address:q.compressedAccount.address}))),se&&U.push(se),Oe=await te(U,[]),se){let q=me.length;At=ue(Be,Oe.treeInfos.slice(q),Oe.leafIndices.slice(q),Oe.rootIndices.slice(q),Oe.proveByIndices.slice(q),U.slice(q),J())[0];}}let ug=me.length&&Oe?gill.some(me.map((U,q)=>({isFrozen:U.parsed.state===programs.AccountState.Frozen,hasDelegate:U.parsed.delegate!=null,amount:U.parsed.amount.toNumber(),merkleContext:{leafIndex:U.compressedAccount.leafIndex,merkleTreePubkeyIndex:Be.insertOrGet(U.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:Be.insertOrGet(U.compressedAccount.treeInfo.queue.toString()),proveByIndex:U.compressedAccount.proveByIndex},rootIndex:Oe.rootIndices[q],version:fA(U.compressedAccount.data?.discriminator),tlv:U.parsed.tlv?gill.some(gill.getArrayDecoder(Ut()).decode(U.parsed.tlv)):gill.none()}))):gill.none(),dr=[],$r=[];for(let U of g)if(U instanceof M){let q=dr.length,{domainConfig:en,verifyArgs:ys,signature:fs,publicKey:Ss,message:xs}=X(U,q);if(xs&&fs&&Ss&&dr.push({message:xs,signature:fs,publicKey:Ss}),en){let Is=Be.addPreAccounts([{address:en,role:gill.AccountRole.READONLY}]).get(en)?.index;ys.__option==="Some"&&Is!==void 0&&$r.push({__kind:"Secp256r1",fields:[{domainConfigIndex:Is,verifyArgs:ys.value}]});}}else {let q=Be.addPreAccounts([{address:U.address,role:gill.AccountRole.READONLY_SIGNER,signer:U}]).get(U.address)?.index;q!==void 0&&$r.push({__kind:"Ed25519",fields:[q]});}let{remainingAccounts:Ag,systemOffset:gg}=Be.toAccountMetas(),ur=[];dr.length>0&&ur.push(H(dr));let pg=k(Oe,gg),mg=y?C:void 0,lg=Qr?Ch:void 0,Tg=y?gill.some(d):gill.none(),Ts={amount:i,signers:$r,source:p,destination:r,sourceCtokenTokenAccount:x,sourceSplTokenAccount:I,destinationCtokenTokenAccount:ut,destinationSplTokenAccount:_e,mint:o,tokenProgram:s,remainingAccounts:Ag,payer:a,sourceCompressedTokenAccounts:ug,compressedProofArgs:pg,compressibleConfig:Ih,splInterfacePda:mg,rentSponsor:lg,splInterfacePdaArgs:Tg};if(u){if(!At)throw new Error("Payer not found or proof args is missing.");ur.push($i({...Ts,settingsMutArgs:At}));}else ur.push(Ki({...Ts,settings:e}));return ur}async function Eh(e,n,r){if(!e)return false;let{value:o}=await ct(n,r);return !o}async function Dh(e,n,r,o,t,c){let i=t-r-o;if(i<=0)return [];let s=(await Fe().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.toString()===Jr.toString()&&!g.parsed.amount.isZero()).sort((g,p)=>p.parsed.amount.cmp(g.parsed.amount));if(s.length===0)return [];let d=BigInt(0),u=[];for(let g of s){if(u.length>=c||d>=i)break;d+=BigInt(g.parsed.amount.toNumber()),u.push(g);}if(d<i)throw u.length>=c?new Error("Transaction size limit exceeded. Consider multiple transfers to transfer full balance."):new Error("Insufficient balance.");return u}async function Ph(e,n,r,o){if(!e)return null;let{address:t}=await ge(n,r);return (await Te([{address:t,type:"Settings"}],o))[0]}function Mh(e){if(!e||e.length===0)return null;try{return {amount:gill.getU64Decoder().decode(e.slice(64,72))}}catch(n){return console.error("Token data parsing error:",n),null}}async function t6({signers:e,payer:n,changeConfigArgs:r}){let{settings:o,configActions:t,compressed:c,packedAccounts:i,proof:a,settingsMutArgs:s}=r,d=Se(e),u=[],g=[];for(let x of d)if(x instanceof M){let _=g.length,{domainConfig:E,verifyArgs:C,signature:v,publicKey:B,message:K}=X(x,_);if(K&&v&&B&&g.push({message:K,signature:v,publicKey:B}),E){let se=i.addPreAccounts([{address:E,role:gill.AccountRole.READONLY}]).get(E)?.index;C.__option==="Some"&&se!==void 0&&u.push({__kind:"Secp256r1",fields:[{domainConfigIndex:se,verifyArgs:C.value}]});}}else {let _=i.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]).get(x.address)?.index;_!==void 0&&u.push({__kind:"Ed25519",fields:[_]});}let{remainingAccounts:p,systemOffset:f}=i.toAccountMetas(),S=k(a,f),I=[];if(g.length>0&&I.push(H(g)),c){if(!s)throw new Error("Payer not found or proof args is missing.");I.push(Pa({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:s,remainingAccounts:p,signers:u}));}else I.push(ya({settings:o,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:p,signers:u}));return I}async function i6({createUserArgs:e,payer:n}){let r=new N;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let o=await Re(),t=await Promise.all(e.map(async u=>{let{address:g,addressTree:p}=await w(u.member.address,o);return {address:g,tree:p,queue:p,type:"User"}})),c=await te([],t),i=await Me(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:s}=r.toAccountMetas(),d=k(c,s);return await $a({compressedProofArgs:d,payer:n,createUserArgs:e.map((u,g)=>({member:u.member.address,role:u.role,userCreationArgs:i[g],transactionManagerUrl:u.role===0?u.transactionManagerUrl:null})),remainingAccounts:a})}async function l6({index:e,payer:n,initialMember:r,userAddressTreeIndex:o,cachedAccounts:t}){let c=new N;await c.addSystemAccounts();let i=[],a=[];a.push(...await Te([{address:(await w(r.address,o)).address,type:"User"}],t));let s=await Re(),{address:d,addressTree:u}=await ge(await be(e),s);i.push({address:d,queue:u,tree:u,type:"Settings"});let g=a.length,p=await te(a,i),f=ue(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),a.filter(C=>C.type==="User"),ne())[0],I=(await Me(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),i)).find(C=>C.type==="Settings")??null,{remainingAccounts:x,systemOffset:_}=c.toAccountMetas(),E=k(p,_);if(!I)throw new Error("Settings creation args is missing.");return await _a({settingsIndex:e,payer:n,initialMember:r,userArgs:f.data.role===3?{__kind:"Mutate",fields:[f]}:{__kind:"Read",fields:[f]},compressedProofArgs:E,...I,remainingAccounts:x})}async function E6({settings:e,settingsAddressTreeIndex:n,payer:r,signers:o,cachedAccounts:t}){let{packedAccounts:c,proof:i,settingsMutArgs:a}=await he(true,e,n,false,t);if(!a)throw new Error("Proof args is missing");let s=Se(o),d=[],u=[];for(let I of s)if(I instanceof M){let x=d.length,{domainConfig:_,verifyArgs:E,signature:C,publicKey:v,message:B}=X(I,x);if(B&&C&&v&&d.push({message:B,signature:C,publicKey:v}),_){let K=c.addPreAccounts([{address:_,role:gill.AccountRole.READONLY}]).get(_)?.index;E.__option==="Some"&&K!==void 0&&u.push({__kind:"Secp256r1",fields:[{domainConfigIndex:K,verifyArgs:E.value}]});}}else {let x=c.addPreAccounts([{address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I}]).get(I.address)?.index;x!==void 0&&u.push({__kind:"Ed25519",fields:[x]});}let{remainingAccounts:g,systemOffset:p}=c.toAccountMetas(),f=k(i,p),S=[];return d.length>0&&S.push(H(d)),S.push(si({settings:e,payer:r,settingsMutArgs:a,compressedProofArgs:f,signers:u,remainingAccounts:g})),S}async function _6({authority:e,domainConfig:n,newAuthority:r,newOrigins:o}){let t=null,c=[];if(r){let i=new N;await i.addSystemAccounts();let a=await Re(),{address:s,addressTree:d}=await w(r.address,a),u=[{address:s,tree:d,queue:d,type:"User"}],g=await te([],u),p=(await Me(i,g.treeInfos,g.roots,g.rootIndices,u))[0],f=i.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:k(g,f.systemOffset),authorityCreationArgs:p};}return yi({domainConfig:n,authority:e,newOrigins:o?gill.some(o):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function O6({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let o=new N;await o.addSystemAccounts();let t=await Te([{address:(await w(e.address,n)).address,type:"User"}]),c=await te(t,[]),i=ue(o,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,ne())[0],{remainingAccounts:a,systemOffset:s}=o.toAccountMetas(),d=k(c,s);return Ei({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function j6({payer:e,user:n,userAddressTreeIndex:r,newDelegate:o,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:s,publicKey:d}=X(n),u=[];a&&s&&d&&u.push({message:a,signature:s,publicKey:d});let g=await ar(n instanceof M?n:n.address,r,t),p=[];p.push({address:(await w(n instanceof M?n:n.address,r)).address,type:"User"});let f,S=null,I,x=null,_=g.wallets.find(ae=>ae.isDelegate);if(_){let ae=await be(_.index);(await Kr(ae,_.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ge(ae,_.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):f=await be(_.index);}if(o){let ae=await be(o.index);(await Kr(ae,o.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ge(ae,o.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):I=await be(o.index);}let E=new N;await E.addSystemAccounts();let C=await Te(p,t),v=await te(C,[]),B=ue(E,v.treeInfos.slice(0,1),v.leafIndices.slice(0,1),v.rootIndices.slice(0,1),v.proveByIndices.slice(0,1),C.slice(0,1),ne())[0],K=S?gill.some(ue(E,v.treeInfos.slice(S.start,S.end),v.leafIndices.slice(S.start,S.end),v.rootIndices.slice(S.start,S.end),v.proveByIndices.slice(S.start,S.end),C.slice(S.start,S.end),J())[0]):gill.none(),se=x?gill.some(ue(E,v.treeInfos.slice(x.start,x.end),v.leafIndices.slice(x.start,x.end),v.rootIndices.slice(x.start,x.end),v.proveByIndices.slice(x.start,x.end),C.slice(x.start,x.end),J())[0]):gill.none(),{remainingAccounts:j,systemOffset:ce}=E.toAccountMetas(),ye=k(v,ce),fe=[];return u.length>0&&fe.push(H(u)),fe.push(bi({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:o?gill.some(o):gill.none(),feePayer:e,signer:n instanceof M?void 0:n,oldSettings:f,oldSettingsMutArgs:K,newSettings:I,newSettingsMutArgs:se,compressedProofArgs:ye,userMutArgs:B,remainingAccounts:j})),fe}async function iV({settingsAddressTreeIndex:e,closer:n,transactionBufferAddress:r,payer:o,compressed:t=false,cachedAccounts:c}){let i=await Qc(ee(),r),a=i.data.multiWalletSettings,{packedAccounts:s,proof:d,settingsMutArgs:u}=await he(t,a,e,false,c),{remainingAccounts:g,systemOffset:p}=s.toAccountMetas(),{domainConfig:f,verifyArgs:S,message:I,signature:x,publicKey:_}=X(n),E=[];if(I&&x&&_&&E.push(H([{message:I,signature:x,publicKey:_}])),t){if(!o||!u)throw new Error("Payer not found or proof args is missing.");let C=k(d,p);E.push(Ad({transactionBuffer:r,domainConfig:f,closer:n instanceof M?void 0:n,rentCollector:i.data.payer,secp256r1VerifyArgs:S,settingsMutArgs:u,payer:o,compressedProofArgs:C,remainingAccounts:g}));}else E.push(sd({transactionBuffer:r,domainConfig:f,closer:n instanceof M?void 0:n,settings:a,payer:i.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return E}function eg({payer:e,creator:n,bufferIndex:r,settings:o,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:s,compressedArgs:d,expectedSigners:u}){let{domainConfig:g,verifyArgs:p,message:f,signature:S,publicKey:I}=X(n),x=[];if(f&&S&&I&&x.push(H([{message:f,signature:S,publicKey:I}])),d){let{settingsReadonlyArgs:_,compressedProofArgs:E,remainingAccounts:C}=d;x.push(Ed({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof M?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:s,preauthorizeExecution:a,expectedSigners:u},settingsReadonlyArgs:_,compressedProofArgs:E,remainingAccounts:C}));}else x.push(yd({settings:o,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof M?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:s,preauthorizeExecution:a,expectedSigners:u},remainingAccounts:[]}));return x}function tg({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:s}=X(e),d=[];return a&&i&&s&&d.push(H([{message:a,signature:i,publicKey:s}])),o?d.push(Ld({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,settingsMutArgs:o.settingsMutArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push(bd({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,remainingAccounts:[]})),d}function rg({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:o=false}){return o?qd({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Vd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function ng({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:s}=X(n),d=[];return s&&i&&a&&d.push(H([{message:s,signature:i,publicKey:a}])),o?d.push(su({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,settingsReadonlyArgs:o.settingsReadonlyArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push($d({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,remainingAccounts:[]})),d}async function XV({settings:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:o,compressed:t=false}){let c=await _h(r),i=new N,a=null,s=null,d=[];if(c.length||t){let g=await vh({packedAccounts:i,userAccounts:c,compressed:t,settings:e,settingsAddressTreeIndex:n,cachedAccounts:o});a=g.proof,s=g.settingsMutArgs??null,d=g.userMutArgs??[];}return {configActions:await Uh({configActionsArgs:r,userMutArgs:d}),settings:e,proof:a,settingsMutArgs:s,packedAccounts:i,compressed:t}}async function _h(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let o=await Promise.all(r.members.map(t=>w(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let o=await Promise.all(r.members.map(t=>w(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}}return n}async function vh({packedAccounts:e,userAccounts:n,compressed:r,settings:o,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let f=(await ge(o,t)).address;i.push({address:f,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await Te(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let s=await te(a,[]),d=[],u=[];for(let f of a)f.type==="Settings"?d.push(f):f.type==="User"&&u.push(f);let g,p=[];if(r&&s&&(g=ue(e,s.treeInfos.slice(0,1),s.leafIndices.slice(0,1),s.rootIndices.slice(0,1),s.proveByIndices.slice(0,1),d,J())[0]),u.length&&s){let f=r?1:0;p=ue(e,s.treeInfos.slice(f),s.leafIndices.slice(f),s.rootIndices.slice(f),s.proveByIndices.slice(f),u,ne());}return {proof:s,settingsMutArgs:g,userMutArgs:p}}async function Uh({configActionsArgs:e,userMutArgs:n}){let r=[];for(let o of e)switch(o.type){case "AddMembers":{let t=[];for(let c of o.members){let i=await w(c.member,c.userAddressTreeIndex).then(a=>n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address)))));if(!i)throw new Error("Unable to find user account");t.push(Lh({permissionArgs:c.permissions,userMutArgs:i,pubkey:c.member}));}r.push({__kind:o.type,fields:[t]});break}case "RemoveMembers":{let t=await Promise.all(o.members.map(c=>w(c.member,c.userAddressTreeIndex).then(i=>{let a=n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address))));if(!a)throw new Error("Unable to find user account");return Wh({pubkey:c.member,userMutArgs:a})})));r.push({__kind:o.type,fields:[t]});break}case "EditPermissions":{let t=o.members.map(c=>kh({permissionArgs:c.permissions,pubkey:c.member}));r.push({__kind:o.type,fields:[t]});break}default:r.push({__kind:o.type,fields:[o.threshold]});}return r}function kh({pubkey:e,permissionArgs:n}){return {memberKey:Pe(e),permissions:ag(n)}}function Wh({pubkey:e,userMutArgs:n}){let r=n.data.role;if(r===2)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:Pe(e),userArgs:r===3?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function Lh({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===2)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===0&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:Pe(e),permissions:ag(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function ag(e){let n=[];return e.initiate&&n.push(We.InitiateTransaction),e.vote&&n.push(We.VoteTransaction),e.execute&&n.push(We.ExecuteTransaction),we.fromPermissions(n)}async function sF({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:s,compressed:d=false,additionalVoters:u=[],additionalSigners:g=[],chunkSize:p=Math.ceil(o.length/2),cachedAccounts:f}){let S=Math.floor(Math.random()*255),I=await vA(n,t instanceof M?t:t.address,S),x=[],_=[];for(let re=0;re<o.length;re+=p){let At=o.subarray(re,re+p);x.push(At),_.push(sha2_js.sha256(At));}let E=sha2_js.sha256(o),{settingsReadonlyArgs:C,settingsMutArgs:v,proof:B,packedAccounts:K}=await he(d,n,r,false,f),{remainingAccounts:se,systemOffset:j}=K.toAccountMetas(),ce=B&&C&&v?{settingsReadonlyArgs:C,settingsMutArgs:v,compressedProofArgs:k(B,j),remainingAccounts:se,payer:e}:null,ye=Se([t,...c?[c]:[],...u]).map(re=>({memberKey:Pe(re),messageHash:re instanceof M?Xo(re.authResponse):null})),fe=eg({finalBufferHash:E,finalBufferSize:o.length,bufferIndex:S,payer:e,transactionBufferAddress:I,settings:n,creator:t,preauthorizeExecution:!c,bufferExtendHashes:_,compressedArgs:ce,expectedSigners:ye}),ae=x.map(re=>rg({transactionMessageBytes:re,transactionBufferAddress:I,settings:n,compressed:d})),_e=u.map(re=>ng({voter:re,transactionBufferAddress:I,settings:n,compressedArgs:ce})),ut=tg({compressedArgs:ce,settings:n,executor:c,transactionBufferAddress:I}),{instructions:y,addressLookupTableAccounts:Qr}=await GA({compressed:d,settings:n,transactionMessageBytes:o,transactionBufferAddress:I,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:s}),me=re=>({payer:e,instructions:re,addressesByLookupTableAddress:Qr});return [me(fe),...ae.map(re=>me([re])),..._e.length?[me(_e.flat())]:[],me(ut),me(y)]}var Zr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let o=new Map,t=i=>{let a=o.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},o.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let s=t(a.address);s.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,s.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,o)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,d])=>d.isSigner&&d.isWritable),o=n.filter(([,d])=>d.isSigner&&!d.isWritable),t=n.filter(([,d])=>!d.isSigner&&d.isWritable),c=n.filter(([,d])=>!d.isSigner&&!d.isWritable),i={numSignerAccounts:r.length+o.length,numReadonlySignerAccounts:o.length,numReadonlyNonSignerAccounts:c.length};if(r.length===0)throw new Error("Expected at least one writable signer key");let[a]=r[0];if(a!==this.payer)throw new Error("Expected first writable signer key to be the fee payer");let s=[...r.map(([d])=>d),...o.map(([d])=>d),...t.map(([d])=>d),...c.map(([d])=>d)];return [i,s]}extractTableLookup(n){let[r,o]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:o,readonly:c}}}drainKeysFoundInLookupTable(n,r){let o=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,s=n.findIndex(d=>d===a);if(s>=0){if(s>=256)throw new Error("Max lookup table index exceeded");o.push(s),t.push(a),this.keyMetaMap.delete(c);}}return [o,t]}};var Xr=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((c,i)=>{o.set(c,i);});let t=c=>{let i=o.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function dg({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:o}){let t=Zr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(o??{});for(let p of a){let f=t.extractTableLookup(p);if(f!==void 0){let{addressTableLookup:S,drainedKeys:I}=f;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),i.writable.push(...I.writable),i.readonly.push(...I.readonly);}}let[s,d]=t.getMessageComponents(),g=new Xr(d,i).compileInstructions(r);return {version:0,header:s,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function fF({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=dg({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return new Uint8Array(Vu(o))}async function EF({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,signers:t,additionalSigners:c,secp256r1VerifyInput:i,addressesByLookupTableAddress:a,cachedAccounts:s,compressed:d=false,simulateProof:u=false}){let{instructions:g,addressLookupTableAccounts:p}=await KA({settings:n,settingsAddressTreeIndex:r,payer:e,signers:t,additionalSigners:c,transactionMessageBytes:o,secp256r1VerifyInput:i,compressed:d,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:s});return {payer:e,instructions:g,addressesByLookupTableAddress:p}}exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=aa;exports.AdditionalSignersSchema=AP;exports.AuthenticationContextSchema=Bu;exports.BaseResponseSchema=Nu;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=Ca;exports.CHANGE_CONFIG_DISCRIMINATOR=ma;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=Ra;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Na;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Ga;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=qa;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Xa;exports.CompleteMessageRequestSchema=Cw;exports.CompleteSendTransactionRequestSchema=Dw;exports.CompleteTransactionRequestSchema=Ew;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=ri;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=ii;exports.DOMAIN_CONFIG_DISCRIMINATOR=Cs;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=li;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=xi;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=Mi;exports.GLOBAL_COUNTER_DISCRIMINATOR=Rs;exports.KeyType=$t;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=iD;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=NE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=eP;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=RD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=_D;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=vD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=QD;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=dP;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=VE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=HE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=QE;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=BD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=YE;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=wE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=qE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=yD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=fD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=SD;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=OD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=AD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=dD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=uD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=nD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=XD;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=WD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=ZE;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=sD;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=TD;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=ND;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=gD;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=rD;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=zE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=UE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=LE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=vE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=WE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=hD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=PD;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=eD;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=JD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=JE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=jE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=tD;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=nP;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=oD;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=rP;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=qD;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=OE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=ED;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=UD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=VD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=ZD;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=cD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=wD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=zD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=oP;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=jD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=HD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=aD;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=aP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=cP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=LD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=sP;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=KD;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=DD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=$D;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=iP;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=mD;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=XE;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=GE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=KE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=kD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=GD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=FE;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=CD;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=BE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=FD;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=kE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=MD;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=YD;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=$E;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=xD;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=ID;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=bD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=lD;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=tP;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=pD;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=RE;exports.MultiWalletInstruction=bE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Oi;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=vi;exports.Permission=We;exports.Permissions=we;exports.SETTINGS_DISCRIMINATOR=Gc;exports.Secp256r1Key=He;exports.SignedSecp256r1Key=M;exports.StartMessageRequestSchema=Lu;exports.StartTransactionRequestSchema=Ou;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Xi;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Gi;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=id;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=rd;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=xd;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=md;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Yc;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ud;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Md;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=zd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Nd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=ru;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Zd;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=mu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=iu;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Mu;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=xu;exports.TransactionActionTypeSchema=Wu;exports.TransactionDetailsSchema=gP;exports.TransactionPayloadSchema=Iw;exports.TransactionPayloadWithBase64MessageBytesSchema=uP;exports.Transports=So;exports.UserRole=Ne;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=ta;exports.addWhitelistedAddressTrees=pw;exports.base64URLStringToBuffer=Ce;exports.bufferToBase64URLString=l2;exports.changeConfig=t6;exports.closeTransactionBuffer=iV;exports.configAction=GR;exports.convertBase64StringToJWK=f2;exports.convertJWKToBase64String=y2;exports.convertMemberKeyToString=LA;exports.convertPubkeyCompressedToCose=d2;exports.convertPubkeyCoseToCompressed=i2;exports.createClientAuthorizationCompleteRequestChallenge=g2;exports.createClientAuthorizationStartRequestChallenge=A2;exports.createDomainConfig=RH;exports.createDomainUserAccounts=wH;exports.createGlobalCounter=GH;exports.createMessageChallenge=p2;exports.createTransactionBuffer=eg;exports.createTransactionChallenge=m2;exports.createTransactionManagerSigner=eh;exports.createUserAccounts=i6;exports.createWallet=l6;exports.decodeDomainConfig=Ds;exports.decodeGlobalCounter=_s;exports.decodeSettings=zc;exports.decodeTransactionBuffer=Xc;exports.decodeWhitelistedAddressTree=na;exports.decompressSettingsAccount=E6;exports.deserializeConfigActions=gH;exports.disableDomainConfig=qH;exports.editDomainConfig=_6;exports.editTransactionManagerUrl=O6;exports.editUserDelegate=j6;exports.executeTransaction=GA;exports.executeTransactionBuffer=tg;exports.executeTransactionSync=KA;exports.extendTransactionBuffer=rg;exports.extensionStruct=ab;exports.fetchAllDomainConfig=Hh;exports.fetchAllGlobalCounter=qh;exports.fetchAllMaybeDomainConfig=_g;exports.fetchAllMaybeGlobalCounter=jg;exports.fetchAllMaybeSettings=L1;exports.fetchAllMaybeTransactionBuffer=tf;exports.fetchAllMaybeWhitelistedAddressTree=Cf;exports.fetchAllSettings=UU;exports.fetchAllSettingsAccountByMember=T8;exports.fetchAllTransactionBuffer=NU;exports.fetchAllWhitelistedAddressTree=GU;exports.fetchCompressedAccount=SA;exports.fetchDomainConfig=Ps;exports.fetchGlobalCounter=jh;exports.fetchMaybeDomainConfig=bg;exports.fetchMaybeGlobalCounter=Kg;exports.fetchMaybeSettings=xo;exports.fetchMaybeSettingsAccountData=_M;exports.fetchMaybeTransactionBuffer=ef;exports.fetchMaybeUserAccountData=bM;exports.fetchMaybeWhitelistedAddressTree=If;exports.fetchSettings=vU;exports.fetchSettingsAccountData=Kr;exports.fetchTransactionBuffer=Qc;exports.fetchUserAccountByFilters=l8;exports.fetchUserAccountData=ar;exports.fetchWhitelistedAddressTree=oa;exports.getAddMemberArgsCodec=tR;exports.getAddMemberArgsDecoder=on;exports.getAddMemberArgsEncoder=nn;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=ck;exports.getAddWhitelistedAddressTreesInstruction=ik;exports.getAddWhitelistedAddressTreesInstructionAsync=da;exports.getAddWhitelistedAddressTreesInstructionDataCodec=ak;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=ia;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Ro;exports.getAdditionalMetadataCodec=Xh;exports.getAdditionalMetadataDecoder=rn;exports.getAdditionalMetadataEncoder=tn;exports.getChangeConfigCompressedDiscriminatorBytes=Pk;exports.getChangeConfigCompressedInstruction=Pa;exports.getChangeConfigCompressedInstructionDataCodec=Mk;exports.getChangeConfigCompressedInstructionDataDecoder=Da;exports.getChangeConfigCompressedInstructionDataEncoder=Ea;exports.getChangeConfigDiscriminatorBytes=Tk;exports.getChangeConfigInstruction=ya;exports.getChangeConfigInstructionDataCodec=yk;exports.getChangeConfigInstructionDataDecoder=Ta;exports.getChangeConfigInstructionDataEncoder=la;exports.getClientAndDeviceHash=Zo;exports.getCompiledInstructionCodec=oR;exports.getCompiledInstructionDecoder=cn;exports.getCompiledInstructionEncoder=sn;exports.getCompressedAccountMetaCodec=iR;exports.getCompressedAccountMetaDecoder=Ct;exports.getCompressedAccountMetaEncoder=It;exports.getCompressedAccountMetaReadOnlyCodec=gR;exports.getCompressedAccountMetaReadOnlyDecoder=Mt;exports.getCompressedAccountMetaReadOnlyEncoder=Pt;exports.getCompressedOnlyExtensionCodec=lR;exports.getCompressedOnlyExtensionDecoder=dn;exports.getCompressedOnlyExtensionEncoder=an;exports.getCompressedProofCodec=fR;exports.getCompressedProofDecoder=ln;exports.getCompressedProofEncoder=mn;exports.getCompressedSettingsAddress=ge;exports.getCompressedSettingsCodec=CR;exports.getCompressedSettingsDataCodec=MR;exports.getCompressedSettingsDataDecoder=yn;exports.getCompressedSettingsDataEncoder=Tn;exports.getCompressedSettingsDecoder=J;exports.getCompressedSettingsEncoder=ht;exports.getCompressedTokenArgsCodec=_R;exports.getCompressedTokenArgsDecoder=vt;exports.getCompressedTokenArgsEncoder=_t;exports.getCompressibleExtensionCodec=WR;exports.getCompressibleExtensionDecoder=Dn;exports.getCompressibleExtensionEncoder=En;exports.getCompressionInfoCodec=NR;exports.getCompressionInfoDecoder=Mn;exports.getCompressionInfoEncoder=Pn;exports.getConfigActionCodec=FR;exports.getConfigActionDecoder=Je;exports.getConfigActionEncoder=qe;exports.getCreateCompressedWalletDiscriminatorBytes=Wk;exports.getCreateCompressedWalletInstruction=Ok;exports.getCreateCompressedWalletInstructionAsync=_a;exports.getCreateCompressedWalletInstructionDataCodec=Lk;exports.getCreateCompressedWalletInstructionDataDecoder=ba;exports.getCreateCompressedWalletInstructionDataEncoder=bo;exports.getCreateDomainConfigDiscriminatorBytes=zk;exports.getCreateDomainConfigInstruction=jk;exports.getCreateDomainConfigInstructionAsync=Ha;exports.getCreateDomainConfigInstructionDataCodec=Kk;exports.getCreateDomainConfigInstructionDataDecoder=wa;exports.getCreateDomainConfigInstructionDataEncoder=vo;exports.getCreateDomainUserAccountDiscriminatorBytes=eW;exports.getCreateDomainUserAccountInstruction=rW;exports.getCreateDomainUserAccountInstructionAsync=Ka;exports.getCreateDomainUserAccountInstructionDataCodec=tW;exports.getCreateDomainUserAccountInstructionDataDecoder=za;exports.getCreateDomainUserAccountInstructionDataEncoder=Uo;exports.getCreateGlobalCounterDiscriminatorBytes=dW;exports.getCreateGlobalCounterInstruction=AW;exports.getCreateGlobalCounterInstructionAsync=Ya;exports.getCreateGlobalCounterInstructionDataCodec=uW;exports.getCreateGlobalCounterInstructionDataDecoder=Ja;exports.getCreateGlobalCounterInstructionDataEncoder=Wo;exports.getCreateUserAccountArgsCodec=JR;exports.getCreateUserAccountArgsDecoder=Nn;exports.getCreateUserAccountArgsEncoder=Bn;exports.getCreateUserAccountsDiscriminatorBytes=SW;exports.getCreateUserAccountsInstruction=IW;exports.getCreateUserAccountsInstructionAsync=$a;exports.getCreateUserAccountsInstructionDataCodec=xW;exports.getCreateUserAccountsInstructionDataDecoder=Qa;exports.getCreateUserAccountsInstructionDataEncoder=Oo;exports.getDecompressSettingsAccountDiscriminatorBytes=bW;exports.getDecompressSettingsAccountInstruction=si;exports.getDecompressSettingsAccountInstructionDataCodec=_W;exports.getDecompressSettingsAccountInstructionDataDecoder=oi;exports.getDecompressSettingsAccountInstructionDataEncoder=ni;exports.getDisableDomainConfigDiscriminatorBytes=BW;exports.getDisableDomainConfigInstruction=Ai;exports.getDisableDomainConfigInstructionDataCodec=NW;exports.getDisableDomainConfigInstructionDataDecoder=ui;exports.getDisableDomainConfigInstructionDataEncoder=di;exports.getDomainConfigAddress=mt;exports.getDomainConfigCodec=wh;exports.getDomainConfigDecoder=Es;exports.getDomainConfigDiscriminatorBytes=Nh;exports.getDomainConfigEncoder=Rg;exports.getDomainConfigSize=Vh;exports.getEditDomainConfigDiscriminatorBytes=jW;exports.getEditDomainConfigInstruction=yi;exports.getEditDomainConfigInstructionAsync=JW;exports.getEditDomainConfigInstructionDataCodec=qW;exports.getEditDomainConfigInstructionDataDecoder=Ti;exports.getEditDomainConfigInstructionDataEncoder=No;exports.getEditMemberArgsCodec=QR;exports.getEditMemberArgsDecoder=Wn;exports.getEditMemberArgsEncoder=kn;exports.getEditTransactionManagerUrlDiscriminatorBytes=rL;exports.getEditTransactionManagerUrlInstruction=Ei;exports.getEditTransactionManagerUrlInstructionDataCodec=nL;exports.getEditTransactionManagerUrlInstructionDataDecoder=Ci;exports.getEditTransactionManagerUrlInstructionDataEncoder=Ii;exports.getEditUserDelegateDiscriminatorBytes=AL;exports.getEditUserDelegateInstruction=bi;exports.getEditUserDelegateInstructionDataCodec=gL;exports.getEditUserDelegateInstructionDataDecoder=Ri;exports.getEditUserDelegateInstructionDataEncoder=hi;exports.getExpectedSignerCodec=rb;exports.getExpectedSignerDecoder=Wt;exports.getExpectedSignerEncoder=kt;exports.getExtensionStructCodec=cb;exports.getExtensionStructDecoder=Ut;exports.getExtensionStructEncoder=fn;exports.getGlobalCounterAddress=_A;exports.getGlobalCounterCodec=Kh;exports.getGlobalCounterDecoder=bs;exports.getGlobalCounterDiscriminatorBytes=zh;exports.getGlobalCounterEncoder=zg;exports.getGlobalCounterSize=Jh;exports.getJitoTipsConfig=Yo;exports.getLightCpiSigner=_8;exports.getLightProtocolRpc=Fe;exports.getLinkWalletArgsCodec=gb;exports.getLinkWalletArgsDecoder=Zn;exports.getLinkWalletArgsEncoder=Yn;exports.getMemberCodec=Tb;exports.getMemberDecoder=bt;exports.getMemberEncoder=Rt;exports.getMemberKeyCodec=Sb;exports.getMemberKeyDecoder=ie;exports.getMemberKeyEncoder=V;exports.getMultiWalletErrorMessage=tw;exports.getNativeTransferIntentCompressedDiscriminatorBytes=_L;exports.getNativeTransferIntentCompressedInstruction=wi;exports.getNativeTransferIntentCompressedInstructionDataCodec=vL;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Ni;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Bi;exports.getNativeTransferIntentDiscriminatorBytes=xL;exports.getNativeTransferIntentInstruction=ki;exports.getNativeTransferIntentInstructionAsync=CL;exports.getNativeTransferIntentInstructionDataCodec=IL;exports.getNativeTransferIntentInstructionDataDecoder=Ui;exports.getNativeTransferIntentInstructionDataEncoder=wo;exports.getNewAuthorityArgsCodec=Eb;exports.getNewAuthorityArgsDecoder=eo;exports.getNewAuthorityArgsEncoder=$n;exports.getOriginIndex=T2;exports.getPackedAddressTreeInfoCodec=Mb;exports.getPackedAddressTreeInfoDecoder=Nt;exports.getPackedAddressTreeInfoEncoder=Bt;exports.getPackedMerkleContextCodec=bb;exports.getPackedMerkleContextDecoder=xn;exports.getPackedMerkleContextEncoder=Sn;exports.getPackedStateTreeInfoCodec=Ub;exports.getPackedStateTreeInfoDecoder=Dt;exports.getPackedStateTreeInfoEncoder=Et;exports.getPausableAccountExtensionCodec=Lb;exports.getPausableAccountExtensionDecoder=Hn;exports.getPausableAccountExtensionEncoder=wn;exports.getPermanentDelegateAccountExtensionCodec=Nb;exports.getPermanentDelegateAccountExtensionDecoder=Fn;exports.getPermanentDelegateAccountExtensionEncoder=Vn;exports.getPermissionsCodec=Vb;exports.getPermissionsDecoder=ze;exports.getPermissionsEncoder=Ge;exports.getProofArgsCodec=Kb;exports.getProofArgsDecoder=P;exports.getProofArgsEncoder=D;exports.getRemoveMemberArgsCodec=Yb;exports.getRemoveMemberArgsDecoder=On;exports.getRemoveMemberArgsEncoder=Ln;exports.getRentConfigCodec=Qb;exports.getRentConfigDecoder=_n;exports.getRentConfigEncoder=bn;exports.getSecp256r1MessageHash=Xo;exports.getSecp256r1PubkeyCodec=t_;exports.getSecp256r1PubkeyDecoder=wt;exports.getSecp256r1PubkeyEncoder=no;exports.getSecp256r1SignatureOffsetsDataDecoder=mh;exports.getSecp256r1SignatureOffsetsDataEncoder=ph;exports.getSecp256r1VerifyArgsCodec=o_;exports.getSecp256r1VerifyArgsDecoder=G;exports.getSecp256r1VerifyArgsEncoder=F;exports.getSecp256r1VerifyArgsWithDomainConfigIndexCodec=i_;exports.getSecp256r1VerifyArgsWithDomainConfigIndexDecoder=so;exports.getSecp256r1VerifyArgsWithDomainConfigIndexEncoder=oo;exports.getSecp256r1VerifyInstruction=H;exports.getSecp256r1VerifyInstructionDataCodec=c5;exports.getSecp256r1VerifyInstructionDataDecoder=VA;exports.getSecp256r1VerifyInstructionDataEncoder=FA;exports.getSendAndConfirmTransaction=zu;exports.getSettingsCodec=_U;exports.getSettingsDecoder=hr;exports.getSettingsDiscriminatorBytes=bU;exports.getSettingsEncoder=W1;exports.getSettingsFromIndex=be;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=m_;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=uo;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=io;exports.getSettingsIndexWithAddressCodec=A_;exports.getSettingsIndexWithAddressDecoder=ao;exports.getSettingsIndexWithAddressEncoder=co;exports.getSettingsMutArgsCodec=f_;exports.getSettingsMutArgsDecoder=Z;exports.getSettingsMutArgsEncoder=Y;exports.getSettingsReadonlyArgsCodec=C_;exports.getSettingsReadonlyArgsDecoder=Vt;exports.getSettingsReadonlyArgsEncoder=Ht;exports.getSignedSecp256r1Key=u2;exports.getSignedTransactionManager=uH;exports.getSolanaRpc=ee;exports.getSolanaRpcEndpoint=Gu;exports.getSplInterfacePdaArgsCodec=P_;exports.getSplInterfacePdaArgsDecoder=Gt;exports.getSplInterfacePdaArgsEncoder=Ft;exports.getTokenMetadataCodec=b_;exports.getTokenMetadataDecoder=zn;exports.getTokenMetadataEncoder=Gn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=YL;exports.getTokenTransferIntentCompressedInstruction=$i;exports.getTokenTransferIntentCompressedInstructionAsync=XL;exports.getTokenTransferIntentCompressedInstructionDataCodec=ZL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Qi;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Go;exports.getTokenTransferIntentDiscriminatorBytes=wL;exports.getTokenTransferIntentInstruction=Ki;exports.getTokenTransferIntentInstructionAsync=VL;exports.getTokenTransferIntentInstructionDataCodec=HL;exports.getTokenTransferIntentInstructionDataDecoder=zi;exports.getTokenTransferIntentInstructionDataEncoder=Fo;exports.getTransactionBufferAddress=vA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=mO;exports.getTransactionBufferCloseCompressedInstruction=Ad;exports.getTransactionBufferCloseCompressedInstructionDataCodec=lO;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ud;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=dd;exports.getTransactionBufferCloseDiscriminatorBytes=sO;exports.getTransactionBufferCloseInstruction=sd;exports.getTransactionBufferCloseInstructionDataCodec=cO;exports.getTransactionBufferCloseInstructionDataDecoder=od;exports.getTransactionBufferCloseInstructionDataEncoder=nd;exports.getTransactionBufferCodec=BU;exports.getTransactionBufferCreateArgsCodec=k_;exports.getTransactionBufferCreateArgsDecoder=Kt;exports.getTransactionBufferCreateArgsEncoder=zt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=UO;exports.getTransactionBufferCreateCompressedInstruction=Ed;exports.getTransactionBufferCreateCompressedInstructionDataCodec=kO;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=Cd;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Id;exports.getTransactionBufferCreateDiscriminatorBytes=EO;exports.getTransactionBufferCreateInstruction=yd;exports.getTransactionBufferCreateInstructionDataCodec=DO;exports.getTransactionBufferCreateInstructionDataDecoder=Td;exports.getTransactionBufferCreateInstructionDataEncoder=ld;exports.getTransactionBufferDecoder=Zc;exports.getTransactionBufferDiscriminatorBytes=OU;exports.getTransactionBufferEncoder=$1;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=ZO;exports.getTransactionBufferExecuteCompressedInstruction=Ld;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=XO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Wd;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=kd;exports.getTransactionBufferExecuteDiscriminatorBytes=VO;exports.getTransactionBufferExecuteInstruction=bd;exports.getTransactionBufferExecuteInstructionDataCodec=FO;exports.getTransactionBufferExecuteInstructionDataDecoder=Rd;exports.getTransactionBufferExecuteInstructionDataEncoder=hd;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=gB;exports.getTransactionBufferExtendCompressedInstruction=qd;exports.getTransactionBufferExtendCompressedInstructionDataCodec=pB;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=jd;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Kd;exports.getTransactionBufferExtendDiscriminatorBytes=oB;exports.getTransactionBufferExtendInstruction=Vd;exports.getTransactionBufferExtendInstructionDataCodec=sB;exports.getTransactionBufferExtendInstructionDataDecoder=Hd;exports.getTransactionBufferExtendInstructionDataEncoder=wd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=_B;exports.getTransactionBufferVoteCompressedInstruction=su;exports.getTransactionBufferVoteCompressedInstructionDataCodec=vB;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=ou;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=nu;exports.getTransactionBufferVoteDiscriminatorBytes=IB;exports.getTransactionBufferVoteInstruction=$d;exports.getTransactionBufferVoteInstructionDataCodec=CB;exports.getTransactionBufferVoteInstructionDataDecoder=Qd;exports.getTransactionBufferVoteInstructionDataEncoder=Xd;exports.getTransactionExecuteCompressedDiscriminatorBytes=jB;exports.getTransactionExecuteCompressedInstruction=yu;exports.getTransactionExecuteCompressedInstructionDataCodec=qB;exports.getTransactionExecuteCompressedInstructionDataDecoder=Tu;exports.getTransactionExecuteCompressedInstructionDataEncoder=lu;exports.getTransactionExecuteDiscriminatorBytes=NB;exports.getTransactionExecuteInstruction=Au;exports.getTransactionExecuteInstructionDataCodec=wB;exports.getTransactionExecuteInstructionDataDecoder=uu;exports.getTransactionExecuteInstructionDataEncoder=du;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=uN;exports.getTransactionExecuteSyncCompressedInstruction=bu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=AN;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ru;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=hu;exports.getTransactionExecuteSyncDiscriminatorBytes=tN;exports.getTransactionExecuteSyncInstruction=Eu;exports.getTransactionExecuteSyncInstructionDataCodec=rN;exports.getTransactionExecuteSyncInstructionDataDecoder=Cu;exports.getTransactionExecuteSyncInstructionDataEncoder=Iu;exports.getTransactionMessageAddressTableLookupCodec=H_;exports.getTransactionMessageAddressTableLookupDecoder=fo;exports.getTransactionMessageAddressTableLookupEncoder=yo;exports.getTransactionMessageCodec=B_;exports.getTransactionMessageDecoder=qt;exports.getTransactionMessageEncoder=jt;exports.getTransactionSyncSignersCodec=z_;exports.getTransactionSyncSignersDecoder=$;exports.getTransactionSyncSignersEncoder=Q;exports.getTransferFeeAccountExtensionCodec=Y_;exports.getTransferFeeAccountExtensionDecoder=jn;exports.getTransferFeeAccountExtensionEncoder=Kn;exports.getTransferHookAccountExtensionCodec=Q_;exports.getTransferHookAccountExtensionDecoder=Jn;exports.getTransferHookAccountExtensionEncoder=qn;exports.getTransportsCodec=tv;exports.getTransportsDecoder=Yt;exports.getTransportsEncoder=Jt;exports.getUserAccountAddress=w;exports.getUserCodec=sv;exports.getUserCreationArgsCodec=dv;exports.getUserCreationArgsDecoder=Ue;exports.getUserCreationArgsEncoder=ve;exports.getUserDecoder=ne;exports.getUserEncoder=Zt;exports.getUserMutArgsCodec=pv;exports.getUserMutArgsDecoder=rt;exports.getUserMutArgsEncoder=tt;exports.getUserReadOnlyArgsCodec=yv;exports.getUserReadOnlyArgsDecoder=Ot;exports.getUserReadOnlyArgsEncoder=Lt;exports.getUserReadOnlyOrMutateArgsCodec=Iv;exports.getUserReadOnlyOrMutateArgsDecoder=je;exports.getUserReadOnlyOrMutateArgsEncoder=Ke;exports.getUserRoleCodec=Mv;exports.getUserRoleDecoder=Ze;exports.getUserRoleEncoder=Ye;exports.getWalletAddressFromIndex=b8;exports.getWalletAddressFromSettings=Le;exports.getWhitelistedAddressTreeCodec=FU;exports.getWhitelistedAddressTreeDecoder=ra;exports.getWhitelistedAddressTreeDiscriminatorBytes=VU;exports.getWhitelistedAddressTreeEncoder=xf;exports.getWhitelistedAddressTreeFromIndex=os;exports.getWhitelistedAddressTreeIndexFromAddress=y8;exports.getWhitelistedAddressTreesAddress=xA;exports.identifyMultiWalletAccount=JN;exports.identifyMultiWalletInstruction=YN;exports.initialize=qw;exports.isConfigAction=zR;exports.isExtensionStruct=ib;exports.isMultiWalletError=rw;exports.isTransactionSyncSigners=j_;exports.isUserReadOnlyOrMutateArgs=Ev;exports.nativeTransferIntent=v5;exports.parseAddWhitelistedAddressTreesInstruction=dk;exports.parseChangeConfigCompressedInstruction=hk;exports.parseChangeConfigInstruction=fk;exports.parseCreateCompressedWalletInstruction=Bk;exports.parseCreateDomainConfigInstruction=qk;exports.parseCreateDomainUserAccountInstruction=nW;exports.parseCreateGlobalCounterInstruction=gW;exports.parseCreateUserAccountsInstruction=CW;exports.parseDecompressSettingsAccountInstruction=vW;exports.parseDisableDomainConfigInstruction=wW;exports.parseEditDomainConfigInstruction=YW;exports.parseEditTransactionManagerUrlInstruction=oL;exports.parseEditUserDelegateInstruction=pL;exports.parseNativeTransferIntentCompressedInstruction=UL;exports.parseNativeTransferIntentInstruction=EL;exports.parseSecp256r1VerifyInstruction=a5;exports.parseTokenTransferIntentCompressedInstruction=QL;exports.parseTokenTransferIntentInstruction=FL;exports.parseTransactionBufferCloseCompressedInstruction=TO;exports.parseTransactionBufferCloseInstruction=aO;exports.parseTransactionBufferCreateCompressedInstruction=WO;exports.parseTransactionBufferCreateInstruction=PO;exports.parseTransactionBufferExecuteCompressedInstruction=QO;exports.parseTransactionBufferExecuteInstruction=GO;exports.parseTransactionBufferExtendCompressedInstruction=mB;exports.parseTransactionBufferExtendInstruction=cB;exports.parseTransactionBufferVoteCompressedInstruction=UB;exports.parseTransactionBufferVoteInstruction=EB;exports.parseTransactionExecuteCompressedInstruction=JB;exports.parseTransactionExecuteInstruction=HB;exports.parseTransactionExecuteSyncCompressedInstruction=gN;exports.parseTransactionExecuteSyncInstruction=nN;exports.pollJitoBundleConfirmation=V8;exports.prepareChangeConfigArgs=XV;exports.prepareTransactionBundle=sF;exports.prepareTransactionMessage=fF;exports.prepareTransactionSync=EF;exports.retrieveTransactionManager=dH;exports.sendJitoBundle=BM;exports.serializeConfigActions=AH;exports.signAndSendBundledTransactions=H8;exports.signAndSendTransaction=J8;exports.tokenTransferIntent=z5;exports.transactionSyncSigners=K_;exports.userReadOnlyOrMutateArgs=Cv;exports.vaultTransactionMessageDeserialize=Fu;exports.vaultTransactionMessageSerialize=Vu;exports.voteTransactionBuffer=ng;//# sourceMappingURL=index.cjs.map
|
|
3
|
+
`);throw new Error(t)}return o.value.unitsConsumed}async function Qu(e,n){let o=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));o.sort((c,a)=>c-a);let t=Math.floor(o.length/2);return o.length%2===0?Math.round((o[t-1]+o[t])/2):o[t]}async function $u(e,n){er(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new I(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await ut(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})}));await Yt(r,n);let o=await Zt(r);if(!o.result||o.error)throw new ae(`Unable to simulate bundle: ${JSON.stringify(o.error??o.result)}`);if(typeof o.result.value.summary!="string"&&o.result.value.summary.failed){let{TransactionFailure:t}=o.result.value.summary.failed.error,[,c]=t;throw new ae(`Simulation failed: ${c}`)}return o.result.value.transactionResults.map(t=>t.unitsConsumed)}function ie(e,n=0){let r=e instanceof _?e:void 0,o=r?.verifyArgs&&n!==-1?gill.some({signedMessageIndex:n,truncatedClientDataJson:r.verifyArgs.truncatedClientDataJson,slotNumber:r.verifyArgs.slotNumber,originIndex:r.originIndex,crossOrigin:r.crossOrigin,clientAndDeviceHash:r.clientAndDeviceHash}):gill.none(),t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,a=r?.authData&&r.verifyArgs.clientDataJson?Lr(r.authResponse):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:o,signature:c,message:a,publicKey:i}}function Le(e,n,r=[]){let o=[];for(let t of e)if(t instanceof _){let c=r.length,{domainConfig:a,verifyArgs:i,signature:s,publicKey:d,message:u}=ie(t,c);if(u&&s&&d&&r.push({message:u,signature:s,publicKey:d}),a){let g=n.addPreAccounts([{address:a,role:gill.AccountRole.READONLY}]).get(a)?.index;i.__option==="Some"&&g!==void 0&&o.push({__kind:"Secp256r1",fields:[{domainConfigIndex:g,verifyArgs:i.value}]});}}else {let c=n.addPreAccounts([{address:t.address,role:gill.AccountRole.READONLY_SIGNER,signer:t}]).get(t.address)?.index;c!==void 0&&o.push({__kind:"Ed25519",fields:[c]});}return {secp256r1VerifyInput:r,transactionSyncSigners:o}}function fe(e){if(e instanceof Ue)return {keyType:Jt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:Jt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function qu(e){return e instanceof _?e.toString():e.address.toString()}function ue(e){let n=new Set,r=[];for(let t of e)n.has(qu(t))||(r.push(t),n.add(qu(t)));let o=r.filter(t=>t instanceof _);if(o.length>1)throw new I(`More than 1 Secp256r1 signers in an instruction is not supported (found ${o.length})`);return r}function eA({payer:e,tipAmount:n}){let r=Vo[Math.floor(Math.random()*Vo.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function tA(e){return typeof e=="string"?e:e.toString()}function rA(e){return e.toString()}async function qo(e,n,r){let o=e?.get(n);if(o)return o;let t=await r();return t&&e&&e.set(n,t),t}var Jo=[{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree1),queue:new web3_js.PublicKey(stateless_js.batchQueue1),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext1),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree2),queue:new web3_js.PublicKey(stateless_js.batchQueue2),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext2),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree3),queue:new web3_js.PublicKey(stateless_js.batchQueue3),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext3),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree4),queue:new web3_js.PublicKey(stateless_js.batchQueue4),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext4),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2},{tree:new web3_js.PublicKey(stateless_js.batchMerkleTree5),queue:new web3_js.PublicKey(stateless_js.batchQueue5),cpiContext:new web3_js.PublicKey(stateless_js.batchCpiContext5),nextTreeInfo:null,treeType:stateless_js.TreeType.StateV2}],B=class{systemAccounts;nextPreIndex;preMap;nextPackedIndex;packedMap;outputTreeIndex;constructor(){this.systemAccounts=[],this.nextPreIndex=0,this.preMap=new Map,this.nextPackedIndex=0,this.packedMap=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){for(let r of n)this.insertOrGet(r.address.toString(),r,false);return this.preMap}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n,r={address:gill.address(n),role:gill.AccountRole.WRITABLE},o=true){let t=o?this.packedMap:this.preMap;if(!t.has(n)){let c=o?this.nextPackedIndex++:this.nextPreIndex++;t.set(n,{index:c,accountMeta:r});}return t.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=stateless_js.selectStateTreeInfo(Jo);return this.packOutputTreeIndex(n)}packTreeInfos(n,r){let o=[],t=[];for(let c of n){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());o.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:a,queuePubkeyIndex:i,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let s=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(s);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:a,addressQueuePubkeyIndex:i});}return {stateTrees:o.length>0?{packedTreeInfos:o,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(n){return Array.from(n.entries()).sort((o,t)=>o[1].index-t[1].index).map(([,{accountMeta:o}])=>({...o}))}getOffsets(n){let r=n,o=r+this.systemAccounts.length;return [r,o]}toAccountMetas(){let n=this.hashSetAccountsToMetas(this.preMap),r=this.hashSetAccountsToMetas(this.packedMap),[o,t]=this.getOffsets(n.length);return {remainingAccounts:[...n,...this.systemAccounts,...r],systemOffset:o,packedOffset:t}}};async function Nr(e,n){let r=tA(e);return qo(n,r,()=>sA(e))}async function tt(e,n){let r=rA(e);return qo(n,r,()=>Y().getAccountInfo(e,{encoding:"base64"}).send())}async function de(e,n){let r=(await Promise.all(e.map(o=>Nr(o.address,n)))).filter(o=>o!==null).filter(o=>o.data!==null&&o.address!==null);if(r.length!==e.length)throw new Q("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((o,t)=>({...o,type:e[t].type,tree:o.treeInfo.tree,queue:o.treeInfo.queue}))}function v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function Se(e,n,r,o,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:o[u],address:d.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((d,u)=>({addressTreeInfo:a[u],outputStateTreeIndex:i,address:d.address,type:d.type}))}function re(e,n,r,o,t,c,a){let i=[];for(let u=0;u<n.length;u++)i.push({treeInfo:n[u],rootIndex:o[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let s=e.packTreeInfos(i,[]).stateTrees;if(!s)throw new I("Unable to parse state tree data");return c.map((u,g)=>({data:a.decode(u.data.data),accountMeta:{treeInfo:s.packedTreeInfos[g],address:new Uint8Array(u.address),outputStateTreeIndex:s.outputTreeIndex}}))}async function xe(e,n,r,o,t){let c=null,a=null,i=null,s=new B;if(e){await s.addSystemAccounts();let{address:d}=await oe(n,r),u=(await de([{address:d,type:"Settings"}],t))[0];o?i={rootIndices:[0],roots:[],leafIndices:[u.leafIndex],leaves:[],treeInfos:[u.treeInfo],proveByIndices:[u.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await Z([u],[]);let g=s.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:u.hash}],[]).stateTrees;if(!g)throw new I("Unable to parse state tree data");let m=j().decode(u.data?.data);c={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0]},data:m},a={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:m};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:s,settingsMutArgs:a}}async function Z(e,n){return $t(()=>We().getValidityProofV0(e,n))}async function Ie(){return (await wr()).length-1}var Yo;async function wr(){if(!Yo){let{data:e}=await Kc(Y(),await cA());Yo=e.whitelistedAddressTrees;}return Yo}function oA(e){if(!e||e.length<8)return 3;if(e[0]===2)return 1;let n=e[7];return n===3?2:3}async function rr(e,n,r){let o=await ch(e,n,r);if(!o)throw new Q("User account");return o}async function ch(e,n,r){let{address:o}=await N(e,n),t=await Nr(o,r);return t?.data?.data?X().decode(t.data.data):null}async function Z2(e,{member:n,credentialId:r}){let o=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)o.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(fe(n)))}});else if(r)o.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(me(r))}});else return null;let t=await We().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:o});return t.items.filter(c=>!!c.data).length?t.items.map(c=>X().decode(c.data?.data))[0]:null}async function Hr(e,n,r){let o=await ah(e,n,r);if(!o)throw new Q("Settings account");return o}async function ah(e,n,r){try{let{address:o}=await oe(e,n),t=await Nr(o,r);if(!t?.data?.data)throw new Q("Compressed settings account");let c=j().decode(t.data.data);if(c.data.__option==="None")throw new Q("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let o=await po(Y(),e);return o.exists?{...o.data,isCompressed:false}:null}}async function X2(e,n,r){let o=await rr(e,n,r);if(o.role===1||o.role===0){let t=[],[c,a]=await Promise.all([We().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(fe(e)))}}]}),Y().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(H().encode(fe(e)))}}]}).send()]);return c.items.forEach(i=>{if(i.data?.data){let s=j().decode(i.data.data);s.data.__option==="Some"&&t.push({...s.data.value,isCompressed:true});}}),a.forEach(i=>{let s=Ir().decode(gill.getBase64Encoder().encode(i.account.data[0]));t.push({...s,isCompressed:false});}),t}else return await Promise.all(o.wallets.map(async t=>Hr(await Ce(t.index),t.settingsAddressTreeIndex,r)))}async function Xo(e){Ku(e,"index");let n=await wr();if(e>=n.length)throw new I(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function Q2(e){let r=(await wr()).findIndex(o=>o.toString()===e);if(r===-1)throw new Q("Address tree",`Address ${e} not found in whitelist`);return r}async function sA(e,n){if(!n&&!e)throw new I("Either hash or address must be provided to fetchCompressedAccount.");if(n&&e)throw new I("Only one of hash or address must be provided to fetchCompressedAccount.");let r=await stateless_js.rpcRequest(We().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:n?stateless_js.encodeBN254toBase58(n):void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),o;if(stateless_js.featureFlags.isV2()?o=superstruct.create(r,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):o=superstruct.create(r,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in o)throw new web3_js.SolanaJSONRPCError(o.error,`failed to get info for compressed account ${n?n.toString():e?e.toString():""}`);if(o.result.value===null)return null;let t=stateless_js.featureFlags.isV2()?o.result.value.merkleContext.tree:o.result.value.tree,c=stateless_js.getStateTreeInfoByPubkey(Jo,t),a=o.result.value;return stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(c,a.hash,a.leafIndex),a.owner,stateless_js.bn(a.lamports),a.data?stateless_js.parseAccountData(a.data):void 0,a.address||void 0)}async function oe(e,n=0){let r=await Xo(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function N(e,n=0){let r=await Xo(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof Ue?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function dt({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new I("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function TA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function cA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function yA(e,n,r){zu(r,0,255,"buffer_index");let[o]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Ue?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return o}async function be(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function Ce(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function d8(e){let n=await Ce(e);return await be(n)}async function u8(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function S8(e){er(e,"bundle");let n=await jo(e,true),r=await $u(n.map(gill.getBase64EncodedWireTransaction),_u()),o=await jo(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await Ah(o.map(gill.getBase64EncodedWireTransaction))}async function Ah(e,n=Fo(),r){er(e,"serializedTransactions");let{blockEngineUrl:o}=n,t=`${o}/bundles`,c=await ut(()=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),r);await Yt(c,t);let a=await Zt(c);if(a.error)throw new ae(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);if(!a.result)throw new ae("No bundle ID returned from Jito");return a.result}async function x8(e,n=30,r=3e3,o=Fo()){ju(e,"bundleId");let{blockEngineUrl:t}=o,c=`${t}/getBundleStatuses`;return $t(async()=>{let a=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await Yt(a,c);let i=await Zt(a);if(i.error)throw new ae(`Error getting bundle status: ${JSON.stringify(i.error,null,2)}`,e);if(!i.result?.value?.length)throw new ae("Bundle not yet confirmed",e);let s=i.result.value[0];if(s.confirmation_status==="confirmed"||s.confirmation_status==="finalized"){let d=s.transactions[s.transactions.length-1];if(!d)throw new ae("No transactions in confirmed bundle",e);return d}throw new ae(`Bundle status: ${s.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:Gu(ae,ye)})}async function M8({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=await Y().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(e,c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(o.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[a,i]=await Promise.all([Xu(c),Qu(Y(),c.instructions.flatMap(d=>d.accounts??[]))]),s=Math.ceil((Number(a)??0)*1.1);return gill.prependTransactionMessageInstructions([...s>2e5?[programs.getSetComputeUnitLimitInstruction({units:s})]:[],...i>0?[programs.getSetComputeUnitPriceInstruction({microLamports:i})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await vu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function F8(e,n){if(n.threshold>1)throw new I("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(s=>IA(s.pubkey)===e);if(!r)throw new Q("Member",`Signer ${e} not found in settings`);let{permissions:o}=r;if(!o)throw new Q("Permissions","No permissions found for the current member");let t=ve.has(o,Re.InitiateTransaction),c=ve.has(o,Re.VoteTransaction),a=ve.has(o,Re.ExecuteTransaction);if(t&&c&&a)return {};if(!c||!a)throw new Ur("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,a?"ExecuteTransaction":void 0].filter(Boolean));let i=n.members.find(s=>s.role===0);if(!i)throw new Q("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(IA(i.pubkey)),userAddressTreeIndex:i.userAddressTreeIndex}}async function G8({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:o,cachedAccounts:t}){if(!n)return null;let c=await rr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Q("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return Rh(n,c.transactionManagerUrl.value,e,o)}function Rh(e,n,r,o){return {address:e,async signTransactions(t){let c=await ut(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicKey:e.toString(),payload:t.map(i=>({transaction:gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(i)),transactionMessageBytes:o?gill.getBase64Decoder().decode(o):void 0,authResponses:r}))})}));if(!c.ok)throw new ye(`Transaction manager request failed: ${c.statusText}`,c.status,n);let a=await c.json();if("error"in a)throw new ye(`Transaction manager error: ${a.error}`,c.status,n);return a.signatures.map(i=>({[e]:gill.getBase58Encoder().encode(i)}))}}}function IA(e){return e.keyType===Jt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function z8(e){let n=e.map(c=>Fe().encode(c)),r=4+n.reduce((c,a)=>c+a.length,0),o=new Uint8Array(r),t=0;o.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)o.set(c,t),t+=c.length;return o}function K8(e){let n=0,[r,o]=gill.getU32Decoder().read(e,n);n=o;let t=new Array(r);for(let c=0;c<r;c++){let a=Ge().read(e,n);t[c]=a[0],n=a[1];}if(n!==e.length)throw new I(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function aH({payer:e,rpId:n,origins:r,authority:o}){let t=await dt({rpId:n}),c=new B;await c.addSystemAccounts();let a=await Ie(),{address:i,addressTree:s}=await N(o.address,a),d=[{address:i,tree:s,queue:s,type:"User"}],u=await Z([],d),g=(await Se(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:m,systemOffset:f}=c.toAccountMetas(),S=v(u,f);return await Ma({origins:r,authorityCreationArgs:g,authority:o,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:m})}async function fH({authority:e,payer:n,createUserArgs:r,domainConfig:o,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let a=[];r.settings&&(a.push({address:(await oe(r.settings,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await de(a,t):[],s=await Ie(),{address:d,addressTree:u}=await N(r.member,s),g=[{address:d,type:"User",tree:u,queue:u}],m=await Z(i,g),f=null,S=null,C=i.filter(G=>G.type==="Settings"),x=i.filter(G=>G.type==="User");C.length&&(f=re(c,m.treeInfos.slice(0,1),m.leafIndices.slice(0,1),m.rootIndices.slice(0,1),m.proveByIndices.slice(0,1),C,j())[0]),x.length&&(S=re(c,m.treeInfos.slice(1,2),m.leafIndices.slice(1,2),m.rootIndices.slice(1,2),m.proveByIndices.slice(1,2),x,X())[0]);let b=await Se(c,m.treeInfos.slice(i.length),m.roots.slice(i.length),m.rootIndices.slice(i.length),g),{remainingAccounts:P,systemOffset:U}=c.toAccountMetas(),k=v(m,U);return await Ua({payer:n,authority:e,compressedProofArgs:k,member:Wt().decode(r.member.toBuffer()),credentialId:me(r.credentialId),transports:r.transports,role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:b[0],domainConfig:o,remainingAccounts:P})}async function CH({payer:e}){let n=await TA();return Oa({payer:e,globalCounter:n})}async function hH({admin:e,rpId:n,disable:r}){let o=await dt({rpId:n});return Qa({domainConfig:o,admin:e,disable:r,remainingAccounts:[]})}function _h(e,n,r,o){let t=vh(e,n),c=Uh(e,n)&&r!==o;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function vh(e,n){let r=e.staticAccounts.length,{numSignerAccounts:o,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,a=o-t,i=r-o-c;return n>=r?false:n<a?true:n>=o?n-o<i:false}function Uh(e,n){return n<e.header.numSignerAccounts}async function Vr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:o}){let t=hu(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(i=>i.lookupTableAddress),Y()):{}),a=[];a.push(...t.addressTableLookups?.map(i=>({role:gill.AccountRole.READONLY,address:i.lookupTableAddress}))??[]);for(let[i,s]of t.staticAccounts.entries())a.push({address:s,role:_h(t,i,s,e)});if(t.addressTableLookups)for(let i of t.addressTableLookups){let s=c[i.lookupTableAddress];if(!s)throw new Error(`Address lookup table account ${i.lookupTableAddress} not found`);for(let d of i.writableIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${d}`);a.push({address:u,role:gill.AccountRole.WRITABLE});}for(let d of i.readonlyIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${d}`);a.push({address:u,role:gill.AccountRole.READONLY});}}for(let i of o?.filter(s=>s.address!==e)??[]){let s=a.findIndex(d=>d.address===i.address);s===-1?a.push({address:i.address,role:gill.AccountRole.READONLY_SIGNER,signer:i}):a[s].role===gill.AccountRole.READONLY||a[s].role===gill.AccountRole.READONLY_SIGNER?a[s]={address:i.address,role:gill.AccountRole.READONLY_SIGNER,signer:i}:(a[s].role===gill.AccountRole.WRITABLE||a[s].role===gill.AccountRole.WRITABLE_SIGNER)&&(a[s]={address:i.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:i});}return {accountMetas:a,addressLookupTableAccounts:c,transactionMessage:t}}var gt=33,pt=64,ts=14,wh=2,Hh=gill.address("Secp256r1SigVerify1111111111111111111111111");function Vh(){return gill.getStructEncoder([["signatureOffset",gill.getU16Encoder()],["signatureInstructionIndex",gill.getU16Encoder()],["publicKeyOffset",gill.getU16Encoder()],["publicKeyInstructionIndex",gill.getU16Encoder()],["messageDataOffset",gill.getU16Encoder()],["messageDataSize",gill.getU16Encoder()],["messageInstructionIndex",gill.getU16Encoder()]])}function Fh(){return gill.getStructDecoder([["signatureOffset",gill.getU16Decoder()],["signatureInstructionIndex",gill.getU16Decoder()],["publicKeyOffset",gill.getU16Decoder()],["publicKeyInstructionIndex",gill.getU16Decoder()],["messageDataOffset",gill.getU16Decoder()],["messageDataSize",gill.getU16Decoder()],["messageInstructionIndex",gill.getU16Decoder()]])}function MA(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let o=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=Fh();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=ts;let a=[];for(let i=0;i<r;i++){let s=gill.fixDecoderSize(gill.getBytesDecoder(),gt).decode(e,n);n+=gt;let d=gill.fixDecoderSize(gill.getBytesDecoder(),pt).decode(e,n);n+=pt;let u=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,a.push({publicKey:s,signature:d,message:g});}return [{numSignatures:r,padding:o,offsets:t,payload:a},n]}})}function RA(){return gill.createEncoder({getSizeFromValue:e=>{let n=ts*e.offsets.length,r=e.payload.reduce((o,t)=>o+gt+pt+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let o=Vh();for(let t of e.offsets)r=o.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),gt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),pt).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function wH(){return gill.combineCodec(RA(),MA())}function w(e,n){let r=e.length,o=wh+r*ts,t=[];for(let s=0;s<r;s++){let{message:d}=e[s],u=o,g=u+gt,m=g+pt;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:m,messageDataSize:d.length,messageInstructionIndex:65535}),o+=gt+pt+d.length;}let c=n?.programAddress??Hh,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:RA().encode(a)}}function HH(e){return {programAddress:e.programAddress,accounts:{},data:MA().decode(e.data)}}async function bA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:o,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:s=false}){let d=await be(e),{accountMetas:u,addressLookupTableAccounts:g}=await Vr({transactionMessageBytes:r,walletAddress:d,additionalSigners:a,addressesByLookupTableAddress:t}),m=[];return c.length>0&&m.push(w(c)),m.push(s?ou({transactionBuffer:n,payer:o.address,remainingAccounts:u,settingsKey:e}):Qd({transactionBuffer:n,payer:o.address,settings:e})),i&&m.push(eA({payer:o,tipAmount:i})),{instructions:m,addressLookupTableAccounts:g}}async function _A({settings:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,additionalSigners:o,signers:t,payer:c,addressesByLookupTableAddress:a,secp256r1VerifyInput:i=[],compressed:s=false,simulateProof:d=false,cachedAccounts:u}){let g=ue(t),m=await be(e),[{accountMetas:f,addressLookupTableAccounts:S,transactionMessage:C},{settingsMutArgs:x,proof:b,packedAccounts:P}]=await Promise.all([Vr({transactionMessageBytes:r,walletAddress:m,additionalSigners:o,addressesByLookupTableAddress:a}),xe(s,e,n,d,u)]);P.addPreAccounts(f);let{secp256r1VerifyInput:U,transactionSyncSigners:k}=Le(g,P,i),{remainingAccounts:G,systemOffset:le}=P.toAccountMetas(),se=[];U.length>0&&se.push(w(U));let Ee=Gh(C,f);if(s){if(!c||!x)throw new I("Payer not found or proof args are missing for executeTransactionSync.");let De=v(b,le);se.push(Tu({signers:k,transactionMessage:Ee,settingsMutArgs:x,compressedProofArgs:De,payer:c,remainingAccounts:G}));}else se.push(uu({signers:k,settings:e,transactionMessage:Ee,remainingAccounts:G}));return {instructions:se,addressLookupTableAccounts:S}}function Gh(e,n){if(e.version==="legacy")throw new I("Only versioned transaction is allowed.");return {numSigners:e.header.numSignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numAccountKeys:e.staticAccounts.length,instructions:e.instructions.map(r=>({...r,accountIndices:new Uint8Array(r.accountIndices??[]),data:r.data??[]})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(o=>o.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function l5({settings:e,settingsAddressTreeIndex:n,destination:r,signers:o,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let s=ue(o),d=await be(e),[{packedAccounts:u,proof:g,settingsMutArgs:m},{value:f}]=await Promise.all([xe(i,e,n,false,t),tt(d,t)]);if((f?.lamports??0)<BigInt(c))throw new I("Insufficient balance for native transfer.");let{secp256r1VerifyInput:S,transactionSyncSigners:C}=Le(s,u),{remainingAccounts:x,systemOffset:b}=u.toAccountMetas(),P=[];if(S.length>0&&P.push(w(S)),i){if(!a||!m)throw new Error("Payer not found or proof args is missing.");let U=v(g,b);P.push(hi({amount:c,settingsMutArgs:m,compressedProofArgs:U,payer:a,signers:C,source:d,destination:r,remainingAccounts:x}));}else P.push(xi({amount:c,signers:C,source:d,destination:r,settings:e,remainingAccounts:x}));return P}var Zh=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),Xh=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),Gr=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function _5({settings:e,settingsAddressTreeIndex:n,destination:r,mint:o,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:s,splInterfacePdaArgs:d={index:0,restricted:false},compressed:u=false,useDestinationSplAccount:g=false}){let m=ue(t),f=await be(e),S=await Qh(o,r,f,s,d),[C,x]=await Promise.all([$h(S,c),aM(u,e,n,c)]),b=eM(C,S,a,g),[P,U]=await Promise.all([cM(f,o,b.splBalance,b.cTokenBalance,BigInt(a),u?3:4),sM(b.requireSplInterface,S.splInterfacePda,c)]),k=P.reduce((Be,as)=>Be+as.parsed.amount.toNumber(),0);if(b.splBalance+b.cTokenBalance+BigInt(k)<BigInt(a))throw new I("Insufficient balance for token transfer.");let G=new B;U&&G.addPreAccounts([{address:o,role:gill.AccountRole.WRITABLE}]);let le=tM(P,x),{proof:se,settingsMutArgs:Ee}=await rM(G,le,P.length,x),De=nM(P,se,G),{secp256r1VerifyInput:st,transactionSyncSigners:Oe}=Le(m,G),{remainingAccounts:ge,systemOffset:ct}=G.toAccountMetas(),qr=v(se,ct),y=[];st.length>0&&y.push(w(st));let or=oM({amount:a,transactionSyncSigners:Oe,walletAddress:f,destination:r,addresses:S,balances:b,mint:o,tokenProgram:s,remainingAccounts:ge,payer:i,sourceCompressedTokenAccounts:De,compressedProofArgs:qr,splInterfacePdaArgs:d});if(u){if(!Ee)throw new Error("Payer not found or proof args is missing.");y.push(Hi({...or,settingsMutArgs:Ee}));}else y.push(Ui({...or,settings:e}));return y}async function Qh(e,n,r,o,t){let c=m=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(m),gill.getAddressEncoder().encode(Gr),gill.getAddressEncoder().encode(e)],programAddress:Gr}),a=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(e)];t.restricted&&a.push(gill.getUtf8Encoder().encode("restricted")),t.index>0&&a.push(gill.getU8Encoder().encode(t.index));let[i,[s],d,[u],[g]]=await Promise.all([programs.getAssociatedTokenAccountAddress(e,r,o),c(r),programs.getAssociatedTokenAccountAddress(e,n,o),c(n),gill.getProgramDerivedAddress({seeds:a,programAddress:Gr})]);return {sourceSplAta:i,sourceCtokenAta:s,destinationSplAta:d,destinationCTokenAta:u,splInterfacePda:g}}async function $h(e,n){let[r,o,t]=await Promise.all([tt(e.destinationSplAta,n),tt(e.sourceSplAta,n),tt(e.sourceCtokenAta,n)]);return {destinationSplAtaInfo:r,sourceSplAtaInfo:o,sourceCTokenAtaInfo:t}}function eM(e,n,r,o){let t=!!e.destinationSplAtaInfo.value,c=!!e.sourceSplAtaInfo.value,a=!!e.sourceCTokenAtaInfo.value,i=c?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(e.sourceSplAtaInfo.value.data[0])).amount:BigInt(0),s=BigInt(a?iM(gill.getBase64Encoder().encode(e.sourceCTokenAtaInfo.value.data[0]))?.amount??0:0),d=t||o?n.destinationSplAta:void 0,u=t||o?void 0:n.destinationCTokenAta,g=c&&(i+s<BigInt(r)||s>BigInt(0)||!t)||!c&&t;return {splBalance:i,cTokenBalance:s,destinationSplTokenAccount:d,destinationCtokenTokenAccount:u,requireSplInterface:g,requireRentSponsor:!t}}function tM(e,n){let r=[];return e.length&&r.push(...e.map(o=>({hash:o.compressedAccount.hash,tree:o.compressedAccount.treeInfo.tree,queue:o.compressedAccount.treeInfo.queue,data:o.compressedAccount.data,address:o.compressedAccount.address}))),n&&r.push(n),r}async function rM(e,n,r,o){let t=null,c=null;if(n.length===0)return {proof:c,settingsMutArgs:t};if(await e.addSystemAccounts(),c=await Z(n,[]),o){let a=r;t=re(e,c.treeInfos.slice(a),c.leafIndices.slice(a),c.rootIndices.slice(a),c.proveByIndices.slice(a),n.slice(a),j())[0];}return {proof:c,settingsMutArgs:t}}function nM(e,n,r){return !e.length||!n?gill.none():gill.some(e.map((o,t)=>({isFrozen:o.parsed.state===programs.AccountState.Frozen,hasDelegate:o.parsed.delegate!=null,amount:o.parsed.amount.toNumber(),merkleContext:{leafIndex:o.compressedAccount.leafIndex,merkleTreePubkeyIndex:r.insertOrGet(o.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:r.insertOrGet(o.compressedAccount.treeInfo.queue.toString()),proveByIndex:o.compressedAccount.proveByIndex},rootIndex:n.rootIndices[t],version:oA(o.compressedAccount.data?.discriminator),tlv:o.parsed.tlv?gill.some(gill.getArrayDecoder(Mt()).decode(o.parsed.tlv)):gill.none()})))}function oM({amount:e,transactionSyncSigners:n,walletAddress:r,destination:o,addresses:t,balances:c,mint:a,tokenProgram:i,remainingAccounts:s,payer:d,sourceCompressedTokenAccounts:u,compressedProofArgs:g,splInterfacePdaArgs:m}){return {amount:e,signers:n,source:r,destination:o,sourceCtokenTokenAccount:t.sourceCtokenAta,sourceSplTokenAccount:t.sourceSplAta,destinationCtokenTokenAccount:c.destinationCtokenTokenAccount,destinationSplTokenAccount:c.destinationSplTokenAccount,mint:a,tokenProgram:i,remainingAccounts:s,payer:d,sourceCompressedTokenAccounts:u,compressedProofArgs:g,compressibleConfig:Zh,splInterfacePda:c.requireSplInterface?t.splInterfacePda:void 0,rentSponsor:c.requireRentSponsor?Xh:void 0,splInterfacePdaArgs:c.requireSplInterface?gill.some(m):gill.none()}}async function sM(e,n,r){if(!e)return false;let{value:o}=await tt(n,r);return !o}async function cM(e,n,r,o,t,c){let a=t-r-o;if(a<=0)return [];let s=(await We().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.toString()===Gr.toString()&&!g.parsed.amount.isZero()).sort((g,m)=>m.parsed.amount.cmp(g.parsed.amount));if(s.length===0)return [];let d=BigInt(0),u=[];for(let g of s){if(u.length>=c||d>=a)break;d+=BigInt(g.parsed.amount.toNumber()),u.push(g);}if(d<a)throw u.length>=c?new I("Transaction size limit exceeded. Consider multiple transfers to transfer full balance."):new I("Insufficient compressed balance.");return u}async function aM(e,n,r,o){if(!e)return null;let{address:t}=await oe(n,r);return (await de([{address:t,type:"Settings"}],o))[0]??null}function iM(e){if(!e||e.length===0)return null;try{return {amount:gill.getU64Decoder().decode(e.slice(64,72))}}catch(n){return console.error("Token data parsing error:",n),null}}async function F5({signers:e,payer:n,changeConfigArgs:r}){let{settings:o,configActions:t,compressed:c,packedAccounts:a,proof:i,settingsMutArgs:s}=r,d=ue(e),u=[],g=[];for(let x of d)if(x instanceof _){let b=g.length,{domainConfig:P,verifyArgs:U,signature:k,publicKey:G,message:le}=ie(x,b);if(le&&k&&G&&g.push({message:le,signature:k,publicKey:G}),P){let se=a.addPreAccounts([{address:P,role:gill.AccountRole.READONLY}]).get(P)?.index;U.__option==="Some"&&se!==void 0&&u.push({__kind:"Secp256r1",fields:[{domainConfigIndex:se,verifyArgs:U.value}]});}}else {let b=a.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]).get(x.address)?.index;b!==void 0&&u.push({__kind:"Ed25519",fields:[b]});}let{remainingAccounts:m,systemOffset:f}=a.toAccountMetas(),S=v(i,f),C=[];if(g.length>0&&C.push(w(g)),c){if(!s)throw new I("Proof args are missing for compressed changeConfig.");C.push(ga({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:s,remainingAccounts:m,signers:u}));}else C.push(oa({settings:o,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:m,signers:u}));return C}async function Y5({createUserArgs:e,payer:n}){let r=new B;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let o=await Ie(),t=await Promise.all(e.map(async u=>{let{address:g,addressTree:m}=await N(u.member.address,o);return {address:g,tree:m,queue:m,type:"User"}})),c=await Z([],t),a=await Se(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:s}=r.toAccountMetas(),d=v(c,s);return await Ha({compressedProofArgs:d,payer:n,createUserArgs:e.map((u,g)=>({member:u.member.address,role:u.role,userCreationArgs:a[g],transactionManagerUrl:u.role===0?u.transactionManagerUrl:null})),remainingAccounts:i})}async function r6({index:e,payer:n,initialMember:r,userAddressTreeIndex:o,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let a=[],i=[];i.push(...await de([{address:(await N(r.address,o)).address,type:"User"}],t));let s=await Ie(),{address:d,addressTree:u}=await oe(await Ce(e),s);a.push({address:d,queue:u,tree:u,type:"Settings"});let g=i.length,m=await Z(i,a),f=re(c,m.treeInfos.slice(0,g),m.leafIndices.slice(0,g),m.rootIndices.slice(0,g),m.proveByIndices.slice(0,g),i.filter(U=>U.type==="User"),X())[0],C=(await Se(c,m.treeInfos.slice(g),m.roots.slice(g),m.rootIndices.slice(g),a)).find(U=>U.type==="Settings")??null,{remainingAccounts:x,systemOffset:b}=c.toAccountMetas(),P=v(m,b);if(!C)throw new Error("Settings creation args is missing.");return await ya({settingsIndex:e,payer:n,initialMember:r,userArgs:f.data.role===3?{__kind:"Mutate",fields:[f]}:{__kind:"Read",fields:[f]},compressedProofArgs:P,...C,remainingAccounts:x})}async function g6({settings:e,settingsAddressTreeIndex:n,payer:r,signers:o,cachedAccounts:t}){let{packedAccounts:c,proof:a,settingsMutArgs:i}=await xe(true,e,n,false,t);if(!i)throw new I("Proof args are missing for settings account.");let s=ue(o),{secp256r1VerifyInput:d,transactionSyncSigners:u}=Le(s,c),{remainingAccounts:g,systemOffset:m}=c.toAccountMetas(),f=v(a,m),S=[];return d.length>0&&S.push(w(d)),S.push(ja({settings:e,payer:r,settingsMutArgs:i,compressedProofArgs:f,signers:u,remainingAccounts:g})),S}async function S6({authority:e,domainConfig:n,newAuthority:r,newOrigins:o}){let t=null,c=[];if(r){let a=new B;await a.addSystemAccounts();let i=await Ie(),{address:s,addressTree:d}=await N(r.address,i),u=[{address:s,tree:d,queue:d,type:"User"}],g=await Z([],u),m=(await Se(a,g.treeInfos,g.roots,g.rootIndices,u))[0],f=a.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(g,f.systemOffset),authorityCreationArgs:m};}return oi({domainConfig:n,authority:e,newOrigins:o?gill.some(o):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function P6({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let o=new B;await o.addSystemAccounts();let t=await de([{address:(await N(e.address,n)).address,type:"User"}]),c=await Z(t,[]),a=re(o,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,X())[0],{remainingAccounts:i,systemOffset:s}=o.toAccountMetas(),d=v(c,s);return ui({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:a,remainingAccounts:i})}async function L6({payer:e,user:n,userAddressTreeIndex:r,newDelegate:o,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:s,publicKey:d}=ie(n),u=[];i&&s&&d&&u.push({message:i,signature:s,publicKey:d});let g=await rr(n instanceof _?n:n.address,r,t),m=[];m.push({address:(await N(n instanceof _?n:n.address,r)).address,type:"User"});let f,S=null,C,x=null,b=g.wallets.find(ge=>ge.isDelegate);if(b){let ge=await Ce(b.index);(await Hr(ge,b.settingsAddressTreeIndex,t)).isCompressed?(m.push({address:(await oe(ge,b.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:m.length-1,end:m.length}):f=await Ce(b.index);}if(o){let ge=await Ce(o.index);(await Hr(ge,o.settingsAddressTreeIndex,t)).isCompressed?(m.push({address:(await oe(ge,o.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:m.length-1,end:m.length}):C=await Ce(o.index);}let P=new B;await P.addSystemAccounts();let U=await de(m,t),k=await Z(U,[]),G=re(P,k.treeInfos.slice(0,1),k.leafIndices.slice(0,1),k.rootIndices.slice(0,1),k.proveByIndices.slice(0,1),U.slice(0,1),X())[0],le=S?gill.some(re(P,k.treeInfos.slice(S.start,S.end),k.leafIndices.slice(S.start,S.end),k.rootIndices.slice(S.start,S.end),k.proveByIndices.slice(S.start,S.end),U.slice(S.start,S.end),j())[0]):gill.none(),se=x?gill.some(re(P,k.treeInfos.slice(x.start,x.end),k.leafIndices.slice(x.start,x.end),k.rootIndices.slice(x.start,x.end),k.proveByIndices.slice(x.start,x.end),U.slice(x.start,x.end),j())[0]):gill.none(),{remainingAccounts:Ee,systemOffset:De}=P.toAccountMetas(),st=v(k,De),Oe=[];return u.length>0&&Oe.push(w(u)),Oe.push(Ti({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:o?gill.some(o):gill.none(),feePayer:e,signer:n instanceof _?void 0:n,oldSettings:f,oldSettingsMutArgs:le,newSettings:C,newSettingsMutArgs:se,compressedProofArgs:st,userMutArgs:G,remainingAccounts:Ee})),Oe}async function Q6({settingsAddressTreeIndex:e,closer:n,transactionBufferAddress:r,payer:o,compressed:t=false,cachedAccounts:c}){let a=await wc(Y(),r),i=a.data.multiWalletSettings,{packedAccounts:s,proof:d,settingsMutArgs:u}=await xe(t,i,e,false,c),{remainingAccounts:g,systemOffset:m}=s.toAccountMetas(),{domainConfig:f,verifyArgs:S,message:C,signature:x,publicKey:b}=ie(n),P=[];if(C&&x&&b&&P.push(w([{message:C,signature:x,publicKey:b}])),t){if(!o||!u)throw new I("Payer not found or proof args are missing for closing buffer.");let U=v(d,m);P.push(Qi({transactionBuffer:r,domainConfig:f,closer:n instanceof _?void 0:n,rentCollector:a.data.payer,secp256r1VerifyArgs:S,settingsMutArgs:u,payer:o,compressedProofArgs:U,remainingAccounts:g}));}else P.push(ji({transactionBuffer:r,domainConfig:f,closer:n instanceof _?void 0:n,settings:i,payer:a.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return P}function BA({payer:e,creator:n,bufferIndex:r,settings:o,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:s,compressedArgs:d,expectedSigners:u}){let{domainConfig:g,verifyArgs:m,message:f,signature:S,publicKey:C}=ie(n),x=[];if(f&&S&&C&&x.push(w([{message:f,signature:S,publicKey:C}])),d){let{settingsReadonlyArgs:b,compressedProofArgs:P,remainingAccounts:U}=d;x.push(ud({transactionBuffer:t,payer:e,secp256r1VerifyArgs:m,creator:n instanceof _?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:s,preauthorizeExecution:i,expectedSigners:u},settingsReadonlyArgs:b,compressedProofArgs:P,remainingAccounts:U}));}else x.push(od({settings:o,transactionBuffer:t,payer:e,secp256r1VerifyArgs:m,creator:n instanceof _?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:s,preauthorizeExecution:i,expectedSigners:u},remainingAccounts:[]}));return x}function NA({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:s}=ie(e),d=[];return i&&a&&s&&d.push(w([{message:i,signature:a,publicKey:s}])),o?d.push(Cd({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof _?void 0:e,settingsMutArgs:o.settingsMutArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push(Td({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof _?void 0:e,remainingAccounts:[]})),d}function wA({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:o=false}){return o?Wd({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Rd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function HA({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:s}=ie(n),d=[];return s&&a&&i&&d.push(w([{message:s,signature:a,publicKey:i}])),o?d.push(jd({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof _?void 0:n,settingsReadonlyArgs:o.settingsReadonlyArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push(Hd({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof _?void 0:n,remainingAccounts:[]})),d}async function VV({settings:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:o,compressed:t=false}){let c=await gM(r),a=new B,i=null,s=null,d=[];if(c.length||t){let g=await pM({packedAccounts:a,userAccounts:c,compressed:t,settings:e,settingsAddressTreeIndex:n,cachedAccounts:o});i=g.proof,s=g.settingsMutArgs??null,d=g.userMutArgs??[];}return {configActions:await mM({configActionsArgs:r,userMutArgs:d}),settings:e,proof:i,settingsMutArgs:s,packedAccounts:a,compressed:t}}async function gM(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let o=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let o=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}}return n}async function pM({packedAccounts:e,userAccounts:n,compressed:r,settings:o,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let a=[];if(r){let f=(await oe(o,t)).address;a.push({address:f,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await de(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let s=await Z(i,[]),d=[],u=[];for(let f of i)f.type==="Settings"?d.push(f):f.type==="User"&&u.push(f);let g,m=[];if(r&&s&&(g=re(e,s.treeInfos.slice(0,1),s.leafIndices.slice(0,1),s.rootIndices.slice(0,1),s.proveByIndices.slice(0,1),d,j())[0]),u.length&&s){let f=r?1:0;m=re(e,s.treeInfos.slice(f),s.leafIndices.slice(f),s.rootIndices.slice(f),s.proveByIndices.slice(f),u,X());}return {proof:s,settingsMutArgs:g,userMutArgs:m}}async function mM({configActionsArgs:e,userMutArgs:n}){let r=[];for(let o of e)switch(o.type){case "AddMembers":{let t=[];for(let c of o.members){let a=await N(c.member,c.userAddressTreeIndex).then(i=>n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address)))));if(!a)throw new Error("Unable to find user account");t.push(yM({permissionArgs:c.permissions,userMutArgs:a,pubkey:c.member}));}r.push({__kind:o.type,fields:[t]});break}case "RemoveMembers":{let t=await Promise.all(o.members.map(c=>N(c.member,c.userAddressTreeIndex).then(a=>{let i=n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address))));if(!i)throw new Error("Unable to find user account");return TM({pubkey:c.member,userMutArgs:i})})));r.push({__kind:o.type,fields:[t]});break}case "EditPermissions":{let t=o.members.map(c=>lM({permissionArgs:c.permissions,pubkey:c.member}));r.push({__kind:o.type,fields:[t]});break}default:r.push({__kind:o.type,fields:[o.threshold]});}return r}function lM({pubkey:e,permissionArgs:n}){return {memberKey:fe(e),permissions:zA(n)}}function TM({pubkey:e,userMutArgs:n}){let r=n.data.role;if(r===2)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:fe(e),userArgs:r===3?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function yM({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===2)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===0&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:fe(e),permissions:zA(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function zA(e){let n=[];return e.initiate&&n.push(Re.InitiateTransaction),e.vote&&n.push(Re.VoteTransaction),e.execute&&n.push(Re.ExecuteTransaction),ve.fromPermissions(n)}async function YV({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:s,compressed:d=false,additionalVoters:u=[],additionalSigners:g=[],chunkSize:m=Math.ceil(o.length/2),cachedAccounts:f}){let S=Math.floor(Math.random()*255),C=await yA(n,t instanceof _?t:t.address,S),x=[],b=[];for(let ee=0;ee<o.length;ee+=m){let is=o.subarray(ee,ee+m);x.push(is),b.push(sha2_js.sha256(is));}let P=sha2_js.sha256(o),{settingsReadonlyArgs:U,settingsMutArgs:k,proof:G,packedAccounts:le}=await xe(d,n,r,false,f),{remainingAccounts:se,systemOffset:Ee}=le.toAccountMetas(),De=G&&U&&k?{settingsReadonlyArgs:U,settingsMutArgs:k,compressedProofArgs:v(G,Ee),remainingAccounts:se,payer:e}:null,st=ue([t,...c?[c]:[],...u]).map(ee=>({memberKey:fe(ee),messageHash:ee instanceof _?zo(ee.authResponse):null})),Oe=BA({finalBufferHash:P,finalBufferSize:o.length,bufferIndex:S,payer:e,transactionBufferAddress:C,settings:n,creator:t,preauthorizeExecution:!c,bufferExtendHashes:b,compressedArgs:De,expectedSigners:st}),ge=x.map(ee=>wA({transactionMessageBytes:ee,transactionBufferAddress:C,settings:n,compressed:d})),ct=u.map(ee=>HA({voter:ee,transactionBufferAddress:C,settings:n,compressedArgs:De})),qr=NA({compressedArgs:De,settings:n,executor:c,transactionBufferAddress:C}),{instructions:y,addressLookupTableAccounts:or}=await bA({compressed:d,settings:n,transactionMessageBytes:o,transactionBufferAddress:C,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:s}),Be=ee=>({payer:e,instructions:ee,addressesByLookupTableAddress:or});return [Be(Oe),...ge.map(ee=>Be([ee])),...ct.length?[Be(ct.flat())]:[],Be(qr),Be(y)]}var Kr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let o=new Map,t=a=>{let i=o.get(a);return i===void 0&&(i={isSigner:false,isWritable:false,isInvoked:false},o.set(a,i)),i},c=t(r);c.isSigner=true,c.isWritable=true;for(let a of n){t(a.programAddress).isInvoked=false;for(let i of a.accounts??[]){let s=t(i.address);s.isSigner||=i.role===gill.AccountRole.READONLY_SIGNER||i.role===gill.AccountRole.WRITABLE_SIGNER,s.isWritable||=i.role===gill.AccountRole.WRITABLE||i.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,o)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,d])=>d.isSigner&&d.isWritable),o=n.filter(([,d])=>d.isSigner&&!d.isWritable),t=n.filter(([,d])=>!d.isSigner&&d.isWritable),c=n.filter(([,d])=>!d.isSigner&&!d.isWritable),a={numSignerAccounts:r.length+o.length,numReadonlySignerAccounts:o.length,numReadonlyNonSignerAccounts:c.length};if(r.length===0)throw new Error("Expected at least one writable signer key");let[i]=r[0];if(i!==this.payer)throw new Error("Expected first writable signer key to be the fee payer");let s=[...r.map(([d])=>d),...o.map(([d])=>d),...t.map(([d])=>d),...c.map(([d])=>d)];return [a,s]}extractTableLookup(n){let[r,o]=this.drainKeysFoundInLookupTable(n[1],a=>!a.isSigner&&!a.isInvoked&&a.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],a=>!a.isSigner&&!a.isInvoked&&!a.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:o,readonly:c}}}drainKeysFoundInLookupTable(n,r){let o=new Array,t=new Array;for(let[c,a]of this.keyMetaMap.entries())if(r(a)){let i=c,s=n.findIndex(d=>d===i);if(s>=0){if(s>=256)throw new Error("Max lookup table index exceeded");o.push(s),t.push(i),this.keyMetaMap.delete(c);}}return [o,t]}};var jr=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((c,a)=>{o.set(c,a);});let t=c=>{let a=o.get(c);if(a===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return a};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(a=>t(a.address))??[],data:c.data}))}};function jA({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:o}){let t=Kr.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(o??{});for(let m of i){let f=t.extractTableLookup(m);if(f!==void 0){let{addressTableLookup:S,drainedKeys:C}=f;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),a.writable.push(...C.writable),a.readonly.push(...C.readonly);}}let[s,d]=t.getMessageComponents(),g=new jr(d,a).compileInstructions(r);return {version:0,header:s,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function i0({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=jA({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return new Uint8Array(Pu(o))}async function p0({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,signers:t,additionalSigners:c,secp256r1VerifyInput:a,addressesByLookupTableAddress:i,cachedAccounts:s,compressed:d=false,simulateProof:u=false}){let{instructions:g,addressLookupTableAccounts:m}=await _A({settings:n,settingsAddressTreeIndex:r,payer:e,signers:t,additionalSigners:c,transactionMessageBytes:o,secp256r1VerifyInput:a,compressed:d,addressesByLookupTableAddress:i,simulateProof:u,cachedAccounts:s});return {payer:e,instructions:g,addressesByLookupTableAddress:m}}exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Jc;exports.AdditionalSignersSchema=FD;exports.AuthenticationContextSchema=Iu;exports.BaseResponseSchema=Cu;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=da;exports.CHANGE_CONFIG_DISCRIMINATOR=ta;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=la;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Pa;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=_a;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Wa;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Na;exports.CompleteMessageRequestSchema=nw;exports.CompleteSendTransactionRequestSchema=sw;exports.CompleteTransactionRequestSchema=ow;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Ga;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Ya;exports.DOMAIN_CONFIG_DISCRIMINATOR=ds;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=ri;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=ai;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=pi;exports.GLOBAL_COUNTER_DISCRIMINATOR=ls;exports.KeyType=Jt;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=NE;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=mE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=_D;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=oD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=cD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=aD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=RD;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=wD;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=yE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=TE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=RE;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=pD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=PE;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=lE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=EE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=qE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=JE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=YE;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=gD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=VE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=wE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=HE;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=kE;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=MD;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=uD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=hE;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=LE;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=jE;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=mD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=FE;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=UE;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=xE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=iE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=AE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=aE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=uE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=nD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=tD;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=_E;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=DD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=DE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=CE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=vE;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=kD;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=WE;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=UD;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=ED;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=gE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=$E;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=iD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=yD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=hD;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=OE;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=lD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=xD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=WD;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=CD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=TD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=BE;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=BD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=OD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=AD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=LD;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=ID;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=eD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=bD;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=ND;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=zE;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=ME;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=SE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=IE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=dD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=SD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=fE;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=QE;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=pE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=fD;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=dE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=rD;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=PD;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=bE;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=ZE;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=XE;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=sD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=KE;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=vD;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=GE;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=oE;exports.MultiWalletInstruction=sE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Ei;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=fi;exports.Permission=Re;exports.Permissions=ve;exports.SETTINGS_DISCRIMINATOR=_c;exports.Secp256r1Key=Ue;exports.SignedSecp256r1Key=_;exports.StartMessageRequestSchema=Su;exports.StartTransactionRequestSchema=xu;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Ni;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=_i;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Yi;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Gi;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=ad;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=td;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Oc;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Sd;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=pd;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=vd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Pd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Gd;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Bd;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=tu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Yd;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=pu;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=au;exports.TransactionActionTypeSchema=fu;exports.TransactionDetailsSchema=GD;exports.TransactionPayloadSchema=rw;exports.TransactionPayloadWithBase64MessageBytesSchema=VD;exports.Transports=go;exports.UserInfoSchema=HD;exports.UserRole=_e;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Fc;exports.addWhitelistedAddressTrees=YN;exports.base64URLStringToBuffer=me;exports.bufferToBase64URLString=Xw;exports.changeConfig=F5;exports.closeTransactionBuffer=Q6;exports.configAction=PR;exports.convertBase64StringToJWK=e2;exports.convertJWKToBase64String=$w;exports.convertMemberKeyToString=IA;exports.convertPubkeyCompressedToCose=Kw;exports.convertPubkeyCoseToCompressed=zw;exports.createClientAuthorizationCompleteRequestChallenge=Jw;exports.createClientAuthorizationStartRequestChallenge=qw;exports.createDomainConfig=aH;exports.createDomainUserAccounts=fH;exports.createGlobalCounter=CH;exports.createMessageChallenge=Yw;exports.createTransactionBuffer=BA;exports.createTransactionChallenge=Zw;exports.createTransactionManagerSigner=Rh;exports.createUserAccounts=Y5;exports.createWallet=r6;exports.decodeDomainConfig=As;exports.decodeGlobalCounter=ys;exports.decodeSettings=vc;exports.decodeTransactionBuffer=Nc;exports.decodeWhitelistedAddressTree=zc;exports.decompressSettingsAccount=g6;exports.deserializeConfigActions=K8;exports.disableDomainConfig=hH;exports.editDomainConfig=S6;exports.editTransactionManagerUrl=P6;exports.editUserDelegate=L6;exports.executeTransaction=bA;exports.executeTransactionBuffer=NA;exports.executeTransactionSync=_A;exports.extendTransactionBuffer=wA;exports.extensionStruct=GR;exports.fetchAllDomainConfig=CM;exports.fetchAllGlobalCounter=bM;exports.fetchAllMaybeDomainConfig=cg;exports.fetchAllMaybeGlobalCounter=Cg;exports.fetchAllMaybeSettings=A1;exports.fetchAllMaybeTransactionBuffer=v1;exports.fetchAllMaybeWhitelistedAddressTree=X1;exports.fetchAllSettings=mU;exports.fetchAllSettingsAccountByMember=X2;exports.fetchAllTransactionBuffer=xU;exports.fetchAllWhitelistedAddressTree=PU;exports.fetchCompressedAccount=sA;exports.fetchDomainConfig=gs;exports.fetchGlobalCounter=RM;exports.fetchMaybeDomainConfig=sg;exports.fetchMaybeGlobalCounter=Ig;exports.fetchMaybeSettings=po;exports.fetchMaybeSettingsAccountData=ah;exports.fetchMaybeTransactionBuffer=_1;exports.fetchMaybeUserAccountData=ch;exports.fetchMaybeWhitelistedAddressTree=Z1;exports.fetchSettings=pU;exports.fetchSettingsAccountData=Hr;exports.fetchTransactionBuffer=wc;exports.fetchUserAccountByFilters=Z2;exports.fetchUserAccountData=rr;exports.fetchWhitelistedAddressTree=Kc;exports.getAddMemberArgsCodec=BM;exports.getAddMemberArgsDecoder=Xr;exports.getAddMemberArgsEncoder=Zr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=FU;exports.getAddWhitelistedAddressTreesInstruction=zU;exports.getAddWhitelistedAddressTreesInstructionAsync=Zc;exports.getAddWhitelistedAddressTreesInstructionDataCodec=GU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Yc;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Io;exports.getAdditionalMetadataCodec=kM;exports.getAdditionalMetadataDecoder=Yr;exports.getAdditionalMetadataEncoder=Jr;exports.getChangeConfigCompressedDiscriminatorBytes=ak;exports.getChangeConfigCompressedInstruction=ga;exports.getChangeConfigCompressedInstructionDataCodec=ik;exports.getChangeConfigCompressedInstructionDataDecoder=Aa;exports.getChangeConfigCompressedInstructionDataEncoder=ua;exports.getChangeConfigDiscriminatorBytes=QU;exports.getChangeConfigInstruction=oa;exports.getChangeConfigInstructionDataCodec=$U;exports.getChangeConfigInstructionDataDecoder=na;exports.getChangeConfigInstructionDataEncoder=ra;exports.getClientAndDeviceHash=Go;exports.getCompiledInstructionCodec=HM;exports.getCompiledInstructionDecoder=$r;exports.getCompiledInstructionEncoder=Qr;exports.getCompressedAccountMetaCodec=zM;exports.getCompressedAccountMetaDecoder=yt;exports.getCompressedAccountMetaEncoder=Tt;exports.getCompressedAccountMetaReadOnlyCodec=JM;exports.getCompressedAccountMetaReadOnlyDecoder=It;exports.getCompressedAccountMetaReadOnlyEncoder=xt;exports.getCompressedOnlyExtensionCodec=XM;exports.getCompressedOnlyExtensionDecoder=tn;exports.getCompressedOnlyExtensionEncoder=en;exports.getCompressedProofCodec=eR;exports.getCompressedProofDecoder=an;exports.getCompressedProofEncoder=cn;exports.getCompressedSettingsAddress=oe;exports.getCompressedSettingsCodec=oR;exports.getCompressedSettingsDataCodec=iR;exports.getCompressedSettingsDataDecoder=un;exports.getCompressedSettingsDataEncoder=dn;exports.getCompressedSettingsDecoder=j;exports.getCompressedSettingsEncoder=Ct;exports.getCompressedTokenArgsCodec=gR;exports.getCompressedTokenArgsDecoder=ht;exports.getCompressedTokenArgsEncoder=Pt;exports.getCompressibleExtensionCodec=TR;exports.getCompressibleExtensionDecoder=yn;exports.getCompressibleExtensionEncoder=Tn;exports.getCompressionInfoCodec=xR;exports.getCompressionInfoDecoder=Sn;exports.getCompressionInfoEncoder=fn;exports.getConfigActionCodec=DR;exports.getConfigActionDecoder=Ge;exports.getConfigActionEncoder=Fe;exports.getCreateCompressedWalletDiscriminatorBytes=Tk;exports.getCreateCompressedWalletInstruction=fk;exports.getCreateCompressedWalletInstructionAsync=ya;exports.getCreateCompressedWalletInstructionDataCodec=yk;exports.getCreateCompressedWalletInstructionDataDecoder=Ta;exports.getCreateCompressedWalletInstructionDataEncoder=Co;exports.getCreateDomainConfigDiscriminatorBytes=hk;exports.getCreateDomainConfigInstruction=Rk;exports.getCreateDomainConfigInstructionAsync=Ma;exports.getCreateDomainConfigInstructionDataCodec=Mk;exports.getCreateDomainConfigInstructionDataDecoder=ha;exports.getCreateDomainConfigInstructionDataEncoder=Do;exports.getCreateDomainUserAccountDiscriminatorBytes=Ok;exports.getCreateDomainUserAccountInstruction=Nk;exports.getCreateDomainUserAccountInstructionAsync=Ua;exports.getCreateDomainUserAccountInstructionDataCodec=Bk;exports.getCreateDomainUserAccountInstructionDataDecoder=va;exports.getCreateDomainUserAccountInstructionDataEncoder=Po;exports.getCreateGlobalCounterDiscriminatorBytes=Kk;exports.getCreateGlobalCounterInstruction=qk;exports.getCreateGlobalCounterInstructionAsync=Oa;exports.getCreateGlobalCounterInstructionDataCodec=jk;exports.getCreateGlobalCounterInstructionDataDecoder=La;exports.getCreateGlobalCounterInstructionDataEncoder=Mo;exports.getCreateUserAccountArgsCodec=_R;exports.getCreateUserAccountArgsDecoder=vn;exports.getCreateUserAccountArgsEncoder=_n;exports.getCreateUserAccountsDiscriminatorBytes=tW;exports.getCreateUserAccountsInstruction=nW;exports.getCreateUserAccountsInstructionAsync=Ha;exports.getCreateUserAccountsInstructionDataCodec=rW;exports.getCreateUserAccountsInstructionDataDecoder=wa;exports.getCreateUserAccountsInstructionDataEncoder=bo;exports.getDecompressSettingsAccountDiscriminatorBytes=AW;exports.getDecompressSettingsAccountInstruction=ja;exports.getDecompressSettingsAccountInstructionDataCodec=gW;exports.getDecompressSettingsAccountInstructionDataDecoder=Ka;exports.getDecompressSettingsAccountInstructionDataEncoder=za;exports.getDisableDomainConfigDiscriminatorBytes=SW;exports.getDisableDomainConfigInstruction=Qa;exports.getDisableDomainConfigInstructionDataCodec=xW;exports.getDisableDomainConfigInstructionDataDecoder=Xa;exports.getDisableDomainConfigInstructionDataEncoder=Za;exports.getDomainConfigAddress=dt;exports.getDomainConfigCodec=IM;exports.getDomainConfigDecoder=us;exports.getDomainConfigDiscriminatorBytes=xM;exports.getDomainConfigEncoder=og;exports.getDomainConfigSize=EM;exports.getEditDomainConfigDiscriminatorBytes=RW;exports.getEditDomainConfigInstruction=oi;exports.getEditDomainConfigInstructionAsync=_W;exports.getEditDomainConfigInstructionDataCodec=bW;exports.getEditDomainConfigInstructionDataDecoder=ni;exports.getEditDomainConfigInstructionDataEncoder=vo;exports.getEditMemberArgsCodec=WR;exports.getEditMemberArgsDecoder=Mn;exports.getEditMemberArgsEncoder=hn;exports.getEditTransactionManagerUrlDiscriminatorBytes=NW;exports.getEditTransactionManagerUrlInstruction=ui;exports.getEditTransactionManagerUrlInstructionDataCodec=wW;exports.getEditTransactionManagerUrlInstructionDataDecoder=di;exports.getEditTransactionManagerUrlInstructionDataEncoder=ii;exports.getEditUserDelegateDiscriminatorBytes=qW;exports.getEditUserDelegateInstruction=Ti;exports.getEditUserDelegateInstructionDataCodec=JW;exports.getEditUserDelegateInstructionDataDecoder=li;exports.getEditUserDelegateInstructionDataEncoder=mi;exports.getExpectedSignerCodec=NR;exports.getExpectedSignerDecoder=bt;exports.getExpectedSignerEncoder=Rt;exports.getExtensionStructCodec=FR;exports.getExtensionStructDecoder=Mt;exports.getExtensionStructEncoder=An;exports.getGlobalCounterAddress=TA;exports.getGlobalCounterCodec=MM;exports.getGlobalCounterDecoder=Ts;exports.getGlobalCounterDiscriminatorBytes=hM;exports.getGlobalCounterEncoder=xg;exports.getGlobalCounterSize=_M;exports.getJitoTipsConfig=Fo;exports.getLightCpiSigner=u8;exports.getLightProtocolRpc=We;exports.getLinkWalletArgsCodec=JR;exports.getLinkWalletArgsDecoder=Gn;exports.getLinkWalletArgsEncoder=Fn;exports.getMemberCodec=QR;exports.getMemberDecoder=Dt;exports.getMemberEncoder=Et;exports.getMemberKeyCodec=tb;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=H;exports.getMultiWalletErrorMessage=BN;exports.getNativeTransferIntentCompressedDiscriminatorBytes=gL;exports.getNativeTransferIntentCompressedInstruction=hi;exports.getNativeTransferIntentCompressedInstructionDataCodec=pL;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Pi;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Di;exports.getNativeTransferIntentDiscriminatorBytes=rL;exports.getNativeTransferIntentInstruction=xi;exports.getNativeTransferIntentInstructionAsync=oL;exports.getNativeTransferIntentInstructionDataCodec=nL;exports.getNativeTransferIntentInstructionDataDecoder=Si;exports.getNativeTransferIntentInstructionDataEncoder=Uo;exports.getNewAuthorityArgsCodec=sb;exports.getNewAuthorityArgsDecoder=qn;exports.getNewAuthorityArgsEncoder=jn;exports.getOriginIndex=Qw;exports.getPackedAddressTreeInfoCodec=ib;exports.getPackedAddressTreeInfoDecoder=kt;exports.getPackedAddressTreeInfoEncoder=Ut;exports.getPackedMerkleContextCodec=Ab;exports.getPackedMerkleContextDecoder=pn;exports.getPackedMerkleContextEncoder=gn;exports.getPackedStateTreeInfoCodec=mb;exports.getPackedStateTreeInfoDecoder=St;exports.getPackedStateTreeInfoEncoder=ft;exports.getPausableAccountExtensionCodec=yb;exports.getPausableAccountExtensionDecoder=kn;exports.getPausableAccountExtensionEncoder=Un;exports.getPermanentDelegateAccountExtensionCodec=xb;exports.getPermanentDelegateAccountExtensionDecoder=Ln;exports.getPermanentDelegateAccountExtensionEncoder=Wn;exports.getPermissionsCodec=Eb;exports.getPermissionsDecoder=we;exports.getPermissionsEncoder=Ne;exports.getProofArgsCodec=Mb;exports.getProofArgsDecoder=D;exports.getProofArgsEncoder=E;exports.getRemoveMemberArgsCodec=vb;exports.getRemoveMemberArgsDecoder=bn;exports.getRemoveMemberArgsEncoder=Rn;exports.getRentConfigCodec=Wb;exports.getRentConfigDecoder=En;exports.getRentConfigEncoder=Cn;exports.getSecp256r1MessageHash=zo;exports.getSecp256r1PubkeyCodec=Bb;exports.getSecp256r1PubkeyDecoder=Wt;exports.getSecp256r1PubkeyEncoder=Zn;exports.getSecp256r1SignatureOffsetsDataDecoder=Fh;exports.getSecp256r1SignatureOffsetsDataEncoder=Vh;exports.getSecp256r1VerifyArgsCodec=Hb;exports.getSecp256r1VerifyArgsDecoder=F;exports.getSecp256r1VerifyArgsEncoder=V;exports.getSecp256r1VerifyArgsWithDomainConfigIndexCodec=zb;exports.getSecp256r1VerifyArgsWithDomainConfigIndexDecoder=Qn;exports.getSecp256r1VerifyArgsWithDomainConfigIndexEncoder=Xn;exports.getSecp256r1VerifyInstruction=w;exports.getSecp256r1VerifyInstructionDataCodec=wH;exports.getSecp256r1VerifyInstructionDataDecoder=MA;exports.getSecp256r1VerifyInstructionDataEncoder=RA;exports.getSendAndConfirmTransaction=vu;exports.getSettingsCodec=gU;exports.getSettingsDecoder=Ir;exports.getSettingsDiscriminatorBytes=AU;exports.getSettingsEncoder=u1;exports.getSettingsFromIndex=Ce;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=Zb;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=ro;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=to;exports.getSettingsIndexWithAddressCodec=qb;exports.getSettingsIndexWithAddressDecoder=eo;exports.getSettingsIndexWithAddressEncoder=$n;exports.getSettingsMutArgsCodec=e_;exports.getSettingsMutArgsDecoder=K;exports.getSettingsMutArgsEncoder=z;exports.getSettingsReadonlyArgsCodec=o_;exports.getSettingsReadonlyArgsDecoder=Ot;exports.getSettingsReadonlyArgsEncoder=Lt;exports.getSignedSecp256r1Key=jw;exports.getSignedTransactionManager=G8;exports.getSolanaRpc=Y;exports.getSolanaRpcEndpoint=_u;exports.getSplInterfacePdaArgsCodec=a_;exports.getSplInterfacePdaArgsDecoder=Nt;exports.getSplInterfacePdaArgsEncoder=Bt;exports.getTokenMetadataCodec=A_;exports.getTokenMetadataDecoder=Bn;exports.getTokenMetadataEncoder=On;exports.getTokenTransferIntentCompressedDiscriminatorBytes=vL;exports.getTokenTransferIntentCompressedInstruction=Hi;exports.getTokenTransferIntentCompressedInstructionAsync=kL;exports.getTokenTransferIntentCompressedInstructionDataCodec=UL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=wi;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Oo;exports.getTokenTransferIntentDiscriminatorBytes=IL;exports.getTokenTransferIntentInstruction=Ui;exports.getTokenTransferIntentInstructionAsync=EL;exports.getTokenTransferIntentInstructionDataCodec=CL;exports.getTokenTransferIntentInstructionDataDecoder=vi;exports.getTokenTransferIntentInstructionDataEncoder=Lo;exports.getTransactionBufferAddress=yA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=ZL;exports.getTransactionBufferCloseCompressedInstruction=Qi;exports.getTransactionBufferCloseCompressedInstructionDataCodec=XL;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=Xi;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=Zi;exports.getTransactionBufferCloseDiscriminatorBytes=VL;exports.getTransactionBufferCloseInstruction=ji;exports.getTransactionBufferCloseInstructionDataCodec=FL;exports.getTransactionBufferCloseInstructionDataDecoder=Ki;exports.getTransactionBufferCloseInstructionDataEncoder=zi;exports.getTransactionBufferCodec=SU;exports.getTransactionBufferCreateArgsCodec=l_;exports.getTransactionBufferCreateArgsDecoder=Ht;exports.getTransactionBufferCreateArgsEncoder=wt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=mO;exports.getTransactionBufferCreateCompressedInstruction=ud;exports.getTransactionBufferCreateCompressedInstructionDataCodec=lO;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=dd;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=id;exports.getTransactionBufferCreateDiscriminatorBytes=sO;exports.getTransactionBufferCreateInstruction=od;exports.getTransactionBufferCreateInstructionDataCodec=cO;exports.getTransactionBufferCreateInstructionDataDecoder=nd;exports.getTransactionBufferCreateInstructionDataEncoder=rd;exports.getTransactionBufferDecoder=Bc;exports.getTransactionBufferDiscriminatorBytes=fU;exports.getTransactionBufferEncoder=b1;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=UO;exports.getTransactionBufferExecuteCompressedInstruction=Cd;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=kO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Id;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=xd;exports.getTransactionBufferExecuteDiscriminatorBytes=EO;exports.getTransactionBufferExecuteInstruction=Td;exports.getTransactionBufferExecuteInstructionDataCodec=DO;exports.getTransactionBufferExecuteInstructionDataDecoder=ld;exports.getTransactionBufferExecuteInstructionDataEncoder=md;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=JO;exports.getTransactionBufferExtendCompressedInstruction=Wd;exports.getTransactionBufferExtendCompressedInstructionDataCodec=YO;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=kd;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Ud;exports.getTransactionBufferExtendDiscriminatorBytes=HO;exports.getTransactionBufferExtendInstruction=Rd;exports.getTransactionBufferExtendInstructionDataCodec=VO;exports.getTransactionBufferExtendInstructionDataDecoder=Md;exports.getTransactionBufferExtendInstructionDataEncoder=hd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=gB;exports.getTransactionBufferVoteCompressedInstruction=jd;exports.getTransactionBufferVoteCompressedInstructionDataCodec=pB;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Kd;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=zd;exports.getTransactionBufferVoteDiscriminatorBytes=nB;exports.getTransactionBufferVoteInstruction=Hd;exports.getTransactionBufferVoteInstructionDataCodec=oB;exports.getTransactionBufferVoteInstructionDataDecoder=wd;exports.getTransactionBufferVoteInstructionDataEncoder=Nd;exports.getTransactionExecuteCompressedDiscriminatorBytes=RB;exports.getTransactionExecuteCompressedInstruction=ou;exports.getTransactionExecuteCompressedInstructionDataCodec=bB;exports.getTransactionExecuteCompressedInstructionDataDecoder=nu;exports.getTransactionExecuteCompressedInstructionDataEncoder=ru;exports.getTransactionExecuteDiscriminatorBytes=xB;exports.getTransactionExecuteInstruction=Qd;exports.getTransactionExecuteInstructionDataCodec=IB;exports.getTransactionExecuteInstructionDataDecoder=Xd;exports.getTransactionExecuteInstructionDataEncoder=Zd;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=jB;exports.getTransactionExecuteSyncCompressedInstruction=Tu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=qB;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=lu;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=mu;exports.getTransactionExecuteSyncDiscriminatorBytes=BB;exports.getTransactionExecuteSyncInstruction=uu;exports.getTransactionExecuteSyncInstructionDataCodec=NB;exports.getTransactionExecuteSyncInstructionDataDecoder=du;exports.getTransactionExecuteSyncInstructionDataEncoder=iu;exports.getTransactionMessageAddressTableLookupCodec=C_;exports.getTransactionMessageAddressTableLookupDecoder=Ao;exports.getTransactionMessageAddressTableLookupEncoder=uo;exports.getTransactionMessageCodec=S_;exports.getTransactionMessageDecoder=Ft;exports.getTransactionMessageEncoder=Vt;exports.getTransactionSyncSignersCodec=h_;exports.getTransactionSyncSignersDecoder=J;exports.getTransactionSyncSignersEncoder=q;exports.getTransferFeeAccountExtensionCodec=v_;exports.getTransferFeeAccountExtensionDecoder=wn;exports.getTransferFeeAccountExtensionEncoder=Nn;exports.getTransferHookAccountExtensionCodec=W_;exports.getTransferHookAccountExtensionDecoder=Vn;exports.getTransferHookAccountExtensionEncoder=Hn;exports.getTransportsCodec=B_;exports.getTransportsDecoder=zt;exports.getTransportsEncoder=Gt;exports.getUserAccountAddress=N;exports.getUserCodec=V_;exports.getUserCreationArgsCodec=K_;exports.getUserCreationArgsDecoder=he;exports.getUserCreationArgsEncoder=Pe;exports.getUserDecoder=X;exports.getUserEncoder=Kt;exports.getUserMutArgsCodec=Y_;exports.getUserMutArgsDecoder=Xe;exports.getUserMutArgsEncoder=Ze;exports.getUserReadOnlyArgsCodec=$_;exports.getUserReadOnlyArgsDecoder=vt;exports.getUserReadOnlyArgsEncoder=_t;exports.getUserReadOnlyOrMutateArgsCodec=nv;exports.getUserReadOnlyOrMutateArgsDecoder=Ve;exports.getUserReadOnlyOrMutateArgsEncoder=He;exports.getUserRoleCodec=iv;exports.getUserRoleDecoder=Ke;exports.getUserRoleEncoder=ze;exports.getWalletAddressFromIndex=d8;exports.getWalletAddressFromSettings=be;exports.getWhitelistedAddressTreeCodec=DU;exports.getWhitelistedAddressTreeDecoder=Gc;exports.getWhitelistedAddressTreeDiscriminatorBytes=EU;exports.getWhitelistedAddressTreeEncoder=Y1;exports.getWhitelistedAddressTreeFromIndex=Xo;exports.getWhitelistedAddressTreeIndexFromAddress=Q2;exports.getWhitelistedAddressTreesAddress=cA;exports.identifyMultiWalletAccount=_N;exports.identifyMultiWalletInstruction=vN;exports.initialize=bw;exports.isConfigAction=hR;exports.isExtensionStruct=zR;exports.isMultiWalletError=NN;exports.isTransactionSyncSigners=R_;exports.isUserReadOnlyOrMutateArgs=sv;exports.nativeTransferIntent=l5;exports.parseAddWhitelistedAddressTreesInstruction=KU;exports.parseChangeConfigCompressedInstruction=dk;exports.parseChangeConfigInstruction=ek;exports.parseCreateCompressedWalletInstruction=Sk;exports.parseCreateDomainConfigInstruction=bk;exports.parseCreateDomainUserAccountInstruction=wk;exports.parseCreateGlobalCounterInstruction=Jk;exports.parseCreateUserAccountsInstruction=oW;exports.parseDecompressSettingsAccountInstruction=pW;exports.parseDisableDomainConfigInstruction=IW;exports.parseEditDomainConfigInstruction=vW;exports.parseEditTransactionManagerUrlInstruction=HW;exports.parseEditUserDelegateInstruction=YW;exports.parseNativeTransferIntentCompressedInstruction=mL;exports.parseNativeTransferIntentInstruction=sL;exports.parseSecp256r1VerifyInstruction=HH;exports.parseTokenTransferIntentCompressedInstruction=WL;exports.parseTokenTransferIntentInstruction=DL;exports.parseTransactionBufferCloseCompressedInstruction=QL;exports.parseTransactionBufferCloseInstruction=GL;exports.parseTransactionBufferCreateCompressedInstruction=TO;exports.parseTransactionBufferCreateInstruction=aO;exports.parseTransactionBufferExecuteCompressedInstruction=WO;exports.parseTransactionBufferExecuteInstruction=PO;exports.parseTransactionBufferExtendCompressedInstruction=ZO;exports.parseTransactionBufferExtendInstruction=FO;exports.parseTransactionBufferVoteCompressedInstruction=mB;exports.parseTransactionBufferVoteInstruction=sB;exports.parseTransactionExecuteCompressedInstruction=_B;exports.parseTransactionExecuteInstruction=CB;exports.parseTransactionExecuteSyncCompressedInstruction=JB;exports.parseTransactionExecuteSyncInstruction=wB;exports.pollJitoBundleConfirmation=x8;exports.prepareChangeConfigArgs=VV;exports.prepareTransactionBundle=YV;exports.prepareTransactionMessage=i0;exports.prepareTransactionSync=p0;exports.retrieveTransactionManager=F8;exports.sendJitoBundle=Ah;exports.serializeConfigActions=z8;exports.signAndSendBundledTransactions=S8;exports.signAndSendTransaction=M8;exports.tokenTransferIntent=_5;exports.transactionSyncSigners=M_;exports.userReadOnlyOrMutateArgs=ov;exports.vaultTransactionMessageDeserialize=hu;exports.vaultTransactionMessageSerialize=Pu;exports.voteTransactionBuffer=HA;//# sourceMappingURL=index.cjs.map
|
|
4
4
|
//# sourceMappingURL=index.cjs.map
|