@revibase/core 0.0.49 → 0.0.51
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +539 -434
- package/dist/index.d.ts +539 -434
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,3 +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'),f=require('zod'),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 f__default=/*#__PURE__*/_interopDefault(f);var xo=new Uint8Array([201,232,212,229,59,241,106,197]);function Sh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(xo)}function Eg(){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:xo}))}function Io(){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 xh(){return gill.combineCodec(Eg(),Io())}function Co(e){return gill.decodeAccount(e,Io())}async function Eo(e,n,r){let s=await Dg(e,n,r);return gill.assertAccountExists(s),s}async function Dg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Co(s)}async function Ih(e,n,r){let s=await Pg(e,n,r);return gill.assertAccountsExist(s),s}async function Pg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Co(t))}function Ch(){return 846}var Mo=new Uint8Array([42,206,176,58,175,129,130,233]);function Ph(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Mo)}function wg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Mo}))}function ho(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function Mh(){return gill.combineCodec(wg(),ho())}function Ro(e){return gill.decodeAccount(e,ho())}async function hh(e,n,r){let s=await Vg(e,n,r);return gill.assertAccountExists(s),s}async function Vg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ro(s)}async function Rh(e,n,r){let s=await Hg(e,n,r);return gill.assertAccountsExist(s),s}async function Hg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ro(t))}function bh(){return 24}function rn(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function nn(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Uh(){return gill.combineCodec(rn(),nn())}function sn(){return gill.getStructEncoder([["memberKey",H()],["permissions",Fe()],["userArgs",ze()]])}function on(){return gill.getStructDecoder([["memberKey",ce()],["permissions",Ge()],["userArgs",Ke()]])}function Oh(){return gill.combineCodec(sn(),on())}function cn(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function an(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function wh(){return gill.combineCodec(cn(),an())}function xt(){return gill.getStructEncoder([["treeInfo",Ct()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function It(){return gill.getStructDecoder([["treeInfo",Et()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function Gh(){return gill.combineCodec(xt(),It())}function Dt(){return gill.getStructEncoder([["treeInfo",Ct()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Pt(){return gill.getStructDecoder([["treeInfo",Et()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function Jh(){return gill.combineCodec(Dt(),Pt())}function dn(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function un(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function Zh(){return gill.combineCodec(dn(),un())}function yn(){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 $h(){return gill.combineCodec(yn(),ln())}function Mt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(ht())]])}function K(){return gill.getStructDecoder([["data",gill.getOptionDecoder(Rt())]])}function nR(){return gill.combineCodec(Mt(),K())}function ht(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(bt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function Rt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(_t())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function aR(){return gill.combineCodec(ht(),Rt())}function vt(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",fn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(Tn()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function Ut(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",Sn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Wt()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function AR(){return gill.combineCodec(vt(),Ut())}function Cn(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",Dn()]])}function En(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Pn()]])}function yR(){return gill.combineCodec(Cn(),En())}function Dn(){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",Rn()]])}function Pn(){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",bn()]])}function SR(){return gill.combineCodec(Dn(),Pn())}function je(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Un())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(sn())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(kn())])]])],["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(Ln())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function ER(){return gill.combineCodec(je(),Je())}function DR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function PR(e,n){return n.__kind===e}function On(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",qe()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",xe()]])}function Bn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Ye()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Ie()]])}function bR(){return gill.combineCodec(On(),Bn())}function Un(){return gill.getStructEncoder([["memberKey",H()],["permissions",Fe()]])}function Wn(){return gill.getStructDecoder([["memberKey",ce()],["permissions",Ge()]])}function WR(){return gill.combineCodec(Un(),Wn())}function kt(){return gill.getStructEncoder([["memberKey",H()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Lt(){return gill.getStructDecoder([["memberKey",ce()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function BR(){return gill.combineCodec(kt(),Lt())}function Tn(){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([Fn()])]])],["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([Nn()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Vn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([zn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([jn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([dn()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([Cn()])]])]])}function Wt(){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([Gn()])]])],["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([wn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Hn()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Kn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Jn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([un()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([En()])]])]])}function HR(){return gill.combineCodec(Tn(),Wt())}function FR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function GR(e,n){return n.__kind===e}function qn(){return gill.getStructEncoder([["settingsMutArgs",j()],["transactionManager",gill.getOptionEncoder(Ot())]])}function Yn(){return gill.getStructDecoder([["settingsMutArgs",J()],["transactionManager",gill.getOptionDecoder(Bt())]])}function JR(){return gill.combineCodec(qn(),Yn())}function bt(){return gill.getStructEncoder([["pubkey",H()],["role",gill.getU8Encoder()],["permissions",Fe()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function _t(){return gill.getStructDecoder([["pubkey",ce()],["role",gill.getU8Decoder()],["permissions",Ge()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function XR(){return gill.combineCodec(bt(),_t())}function H(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function ce(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function eb(){return gill.combineCodec(H(),ce())}function Qn(){return gill.getStructEncoder([["authorityCreationArgs",xe()],["compressedProofArgs",C()]])}function $n(){return gill.getStructDecoder([["authorityCreationArgs",Ie()],["compressedProofArgs",E()]])}function sb(){return gill.combineCodec(Qn(),$n())}function Nt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function wt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function ab(){return gill.combineCodec(Nt(),wt())}function fn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function Sn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function ub(){return gill.combineCodec(fn(),Sn())}function Ct(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Et(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function pb(){return gill.combineCodec(Ct(),Et())}function Nn(){return gill.getStructEncoder([])}function wn(){return gill.getStructDecoder([])}function lb(){return gill.combineCodec(Nn(),wn())}function Vn(){return gill.getStructEncoder([])}function Hn(){return gill.getStructDecoder([])}function Sb(){return gill.combineCodec(Vn(),Hn())}function Fe(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Ge(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function Cb(){return gill.combineCodec(Fe(),Ge())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(yn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(ln())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function Mb(){return gill.combineCodec(C(),E())}function kn(){return gill.getStructEncoder([["memberKey",H()],["userArgs",ze()]])}function Ln(){return gill.getStructDecoder([["memberKey",ce()],["userArgs",Ke()]])}function _b(){return gill.combineCodec(kn(),Ln())}function Rn(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function bn(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function Wb(){return gill.combineCodec(Rn(),bn())}function rs(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Vt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function Ob(){return gill.combineCodec(rs(),Vt())}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 wb(){return gill.combineCodec(F(),G())}function $(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",F()]])}function ee(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",G()]])}function Gb(){return gill.combineCodec($(),ee())}function Ht(){return gill.getStructEncoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ft(){return gill.getStructDecoder([["addressTreeInfo",wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function Jb(){return gill.combineCodec(Ht(),Ft())}function ns(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ss(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function Zb(){return gill.combineCodec(ns(),ss())}function os(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function cs(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function $b(){return gill.combineCodec(os(),cs())}function j(){return gill.getStructEncoder([["accountMeta",xt()],["data",Mt()]])}function J(){return gill.getStructDecoder([["accountMeta",It()],["data",K()]])}function n_(){return gill.combineCodec(j(),J())}function Gt(){return gill.getStructEncoder([["accountMeta",Dt()],["data",Mt()]])}function zt(){return gill.getStructDecoder([["accountMeta",Pt()],["data",K()]])}function a_(){return gill.combineCodec(Gt(),zt())}function Kt(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function jt(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function u_(){return gill.combineCodec(Kt(),jt())}function Fn(){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(rn())]])}function Gn(){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(nn())]])}function m_(){return gill.combineCodec(Fn(),Gn())}function Jt(){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()],["expectedSecp256r1Signers",gill.getArrayEncoder(kt())]])}function qt(){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()],["expectedSecp256r1Signers",gill.getArrayDecoder(Lt())]])}function f_(){return gill.combineCodec(Jt(),qt())}function Yt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(cn())],["addressTableLookups",gill.getArrayEncoder(ps())]])}function Zt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(an())],["addressTableLookups",gill.getArrayDecoder(ms())]])}function C_(){return gill.combineCodec(Yt(),Zt())}function ps(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function ms(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function P_(){return gill.combineCodec(ps(),ms())}function zn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function Kn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function R_(){return gill.combineCodec(zn(),Kn())}function jn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function Jn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function v_(){return gill.combineCodec(jn(),Jn())}var ys=(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))(ys||{});function Xt(){return gill.getEnumEncoder(ys)}function Qt(){return gill.getEnumDecoder(ys)}function k_(){return gill.combineCodec(Xt(),Qt())}function et(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",H()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Xt()))],["wallets",gill.getArrayEncoder(os())],["role",qe()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function q(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",ce()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(Qt()))],["wallets",gill.getArrayDecoder(cs())],["role",Ye()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function N_(){return gill.combineCodec(et(),q())}function xe(){return gill.getStructEncoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ie(){return gill.getStructDecoder([["addressTreeInfo",wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function F_(){return gill.combineCodec(xe(),Ie())}function tt(){return gill.getStructEncoder([["accountMeta",xt()],["data",et()]])}function rt(){return gill.getStructDecoder([["accountMeta",It()],["data",q()]])}function j_(){return gill.combineCodec(tt(),rt())}function Ot(){return gill.getStructEncoder([["accountMeta",Dt()],["data",et()]])}function Bt(){return gill.getStructDecoder([["accountMeta",Pt()],["data",q()]])}function Z_(){return gill.combineCodec(Ot(),Bt())}function ze(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Ot()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([tt()])]])]])}function Ke(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Bt()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([rt()])]])]])}function ev(){return gill.combineCodec(ze(),Ke())}function tv(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function rv(e,n){return n.__kind===e}var Oe=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(Oe||{});function qe(){return gill.getEnumEncoder(Oe)}function Ye(){return gill.getEnumDecoder(Oe)}function ov(){return gill.combineCodec(qe(),Ye())}var Bc=new Uint8Array([223,179,163,190,177,224,67,173]);function iU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Bc)}function hT(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(bt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Bc}))}function br(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(_t())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function dU(){return gill.combineCodec(hT(),br())}function Nc(e){return gill.decodeAccount(e,br())}async function uU(e,n,r){let s=await ls(e,n,r);return gill.assertAccountExists(s),s}async function ls(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Nc(s)}async function AU(e,n,r){let s=await RT(e,n,r);return gill.assertAccountsExist(s),s}async function RT(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Nc(t))}var Gc=new Uint8Array([90,36,35,219,93,225,110,96]);function yU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gc)}function jT(){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())],["expectedSecp256r1Signers",gill.getArrayEncoder(kt())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Gc}))}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",ce()],["executor",ce()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(ce())],["expectedSecp256r1Signers",gill.getArrayDecoder(Lt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function lU(){return gill.combineCodec(jT(),zc())}function Kc(e){return gill.decodeAccount(e,zc())}async function jc(e,n,r){let s=await JT(e,n,r);return gill.assertAccountExists(s),s}async function JT(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Kc(s)}async function TU(e,n,r){let s=await qT(e,n,r);return gill.assertAccountsExist(s),s}async function qT(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Kc(t))}var Yc=new Uint8Array([105,23,173,2,197,255,80,87]);function xU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Yc)}function pf(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Yc}))}function Zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function IU(){return gill.combineCodec(pf(),Zc())}function Xc(e){return gill.decodeAccount(e,Zc())}async function Qc(e,n,r){let s=await mf(e,n,r);return gill.assertAccountExists(s),s}async function mf(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Xc(s)}async function CU(e,n,r){let s=await yf(e,n,r);return gill.assertAccountsExist(s),s}async function yf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Xc(t))}function m({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 ea(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}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 y(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:O(r.value),role:$c(r.value)?gill.upgradeRoleToSigner(s):s,...$c(r.value)?{signer:r.value}:{}})}}function $c(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var ra=new Uint8Array([8]);function wU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ra)}function Ds(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:ra}))}function na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function VU(){return gill.combineCodec(Ds(),na())}async function sa(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Ds().encode(c),programAddress:r})}function HU(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Ds().encode(c),programAddress:r})}function FU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:na().decode(e.data)}}var da=new Uint8Array([9]);function YU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function Ms(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(je())],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["compressedProofArgs",gill.getOptionEncoder(C())]]),e=>({...e,discriminator:da}))}function ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(Je())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function ZU(){return gill.combineCodec(Ms(),ua())}async function Aa(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.settings.value||(t.settings.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.getU128Encoder().encode(ea(c.settingsIndex))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ms().encode(c),programAddress:r})}function XU(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ms().encode(c),programAddress:r})}function QU(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ua().decode(e.data)}}var la=new Uint8Array([19]);function oW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(la)}function Ta(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(je())],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:la}))}function fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Je())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function cW(){return gill.combineCodec(Ta(),fa())}function Sa(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ta().encode(c),programAddress:r})}function aW(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:fa().decode(e.data)}}var Ca=new Uint8Array([18]);function mW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function hs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["settingsCreation",Ht()],["userArgs",ze()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Ca}))}function Ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["settingsCreation",Ft()],["userArgs",Ke()],["settingsIndex",gill.getU128Decoder()]])}function yW(){return gill.combineCodec(hs(),Ea())}async function Da(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:hs().encode(c),programAddress:r})}function lW(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:hs().encode(c),programAddress:r})}function TW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Ea().decode(e.data)}}var Ua=new Uint8Array([0]);function DW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ua)}function bs(){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",xe()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Ua}))}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",Ie()],["compressedProofArgs",E()]])}function PW(){return gill.combineCodec(bs(),Wa())}async function ka(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:bs().encode(c),programAddress:r})}function MW(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:bs().encode(c),programAddress:r})}function hW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Wa().decode(e.data)}}var Ba=new Uint8Array([4]);function kW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ba)}function _s(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",rs()],["role",qe()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Xt())],["userAccountCreationArgs",xe()],["linkWalletArgs",gill.getOptionEncoder(qn())]]),e=>({...e,discriminator:Ba}))}function Na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",Vt()],["role",Ye()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(Qt())],["userAccountCreationArgs",Ie()],["linkWalletArgs",gill.getOptionDecoder(Yn())]])}function LW(){return gill.combineCodec(_s(),Na())}async function wa(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:_s().encode(c),programAddress:r})}function OW(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=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:_s().encode(c),programAddress:r})}function BW(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:Na().decode(e.data)}}var Ha=new Uint8Array([3]);function GW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ha)}function Us(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ha}))}function Fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function zW(){return gill.combineCodec(Us(),Fa())}async function Ga(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=m(c),a=y(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Us().encode({}),programAddress:r})}function KW(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=m(c),a=y(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Us().encode({}),programAddress:r})}function jW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:Fa().decode(e.data)}}var Ka=new Uint8Array([5]);function $W(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ka)}function ks(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(On())]]),e=>({...e,discriminator:Ka}))}function ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(Bn())]])}function ek(){return gill.combineCodec(ks(),ja())}async function Ja(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:ks().encode(c),programAddress:r})}function tk(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:ks().encode(c),programAddress:r})}function rk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:ja().decode(e.data)}}var Za=new Uint8Array([17]);function dk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Za)}function Xa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",j()],["compressedProofArgs",C()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Za}))}function Qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",J()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function uk(){return gill.combineCodec(Xa(),Qa())}function $a(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Xa().encode(c),programAddress:r})}function Ak(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Qa().decode(e.data)}}var ri=new Uint8Array([2]);function Tk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function ni(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:ri}))}function si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function fk(){return gill.combineCodec(ni(),si())}function oi(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=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:ni().encode(c),programAddress:r})}function Sk(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:si().decode(e.data)}}var di=new Uint8Array([1]);function Mk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(di)}function Os(){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(Qn())]]),e=>({...e,discriminator:di}))}function ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder($n())]])}function hk(){return gill.combineCodec(Os(),ui())}async function Rk(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Os().encode(c),programAddress:r})}function Ai(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Os().encode(c),programAddress:r})}function bk(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:ui().decode(e.data)}}var mi=new Uint8Array([6]);function Ok(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mi)}function yi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",tt()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",C()]]),e=>({...e,discriminator:mi}))}function li(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",rt()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function Bk(){return gill.combineCodec(yi(),li())}function Ti(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:yi().encode(c),programAddress:r})}function Nk(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:li().decode(e.data)}}var xi=new Uint8Array([7]);function Kk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xi)}function Ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",tt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["delegateTo",gill.getOptionEncoder(ns())],["oldSettingsMutArgs",gill.getOptionEncoder(j())],["newSettingsMutArgs",gill.getOptionEncoder(j())],["compressedProofArgs",C()]]),e=>({...e,discriminator:xi}))}function Ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",rt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["delegateTo",gill.getOptionDecoder(ss())],["oldSettingsMutArgs",gill.getOptionDecoder(J())],["newSettingsMutArgs",gill.getOptionDecoder(J())],["compressedProofArgs",E()]])}function jk(){return gill.combineCodec(Ii(),Ci())}function Ei(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...a],data:Ii().encode(c),programAddress:r})}function Jk(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:Ci().decode(e.data)}}var Mi=new Uint8Array([32]);function eL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mi)}function hi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",ht()],["compressedProofArgs",C()],["settingsCreationArgs",Ht()]]),e=>({...e,discriminator:Mi}))}function Ri(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Rt()],["compressedProofArgs",E()],["settingsCreationArgs",Ft()]])}function tL(){return gill.combineCodec(hi(),Ri())}function bi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:hi().encode(c),programAddress:r})}function rL(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:Ri().decode(e.data)}}var Ui=new Uint8Array([31]);function dL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ui)}function Wi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",et()],["compressedProofArgs",C()],["userCreationArgs",xe()]]),e=>({...e,discriminator:Ui}))}function ki(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",q()],["compressedProofArgs",E()],["userCreationArgs",Ie()]])}function uL(){return gill.combineCodec(Wi(),ki())}function Li(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:Wi().encode(c),programAddress:r})}function AL(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:ki().decode(e.data)}}var Bi=new Uint8Array([29]);function fL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bi)}function Bs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Bi}))}function Ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function SL(){return gill.combineCodec(Bs(),Ni())}async function xL(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Bs().encode(c),programAddress:r})}function wi(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Bs().encode(c),programAddress:r})}function IL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Ni().decode(e.data)}}var Fi=new Uint8Array([27]);function RL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fi)}function Gi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Fi}))}function zi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function bL(){return gill.combineCodec(Gi(),zi())}function Ki(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Gi().encode(c),programAddress:r})}function _L(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:zi().decode(e.data)}}var Yi=new Uint8Array([30]);function BL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yi)}function Vs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Kt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(vt()))],["compressedProofArgs",gill.getOptionEncoder(C())],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Yi}))}function Zi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(jt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(Ut()))],["compressedProofArgs",gill.getOptionDecoder(E())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function NL(){return gill.combineCodec(Vs(),Zi())}async function wL(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Vs().encode(c),programAddress:r})}function Xi(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Vs().encode(c),programAddress:r})}function VL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:Zi().decode(e.data)}}var nd=new Uint8Array([28]);function JL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(nd)}function Hs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Kt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(vt()))],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:nd}))}function sd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(jt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(Ut()))],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function qL(){return gill.combineCodec(Hs(),sd())}async function YL(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Hs().encode(c),programAddress:r})}function od(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Hs().encode(c),programAddress:r})}function ZL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:sd().decode(e.data)}}var id=new Uint8Array([13]);function nO(){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())]]),e=>({...e,discriminator:id}))}function ud(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function sO(){return gill.combineCodec(dd(),ud())}function Ad(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:dd().encode(c),programAddress:r})}function oO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ud().decode(e.data)}}var md=new Uint8Array([23]);function gO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(md)}function yd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:md}))}function ld(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function pO(){return gill.combineCodec(yd(),ld())}function Td(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:yd().encode(c),programAddress:r})}function mO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ld().decode(e.data)}}var xd=new Uint8Array([10]);function IO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xd)}function Id(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Jt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:xd}))}function Cd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",qt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function CO(){return gill.combineCodec(Id(),Cd())}function Ed(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Id().encode(c),programAddress:r})}function EO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Cd().decode(e.data)}}var Md=new Uint8Array([20]);function _O(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Md)}function hd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Jt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Gt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Md}))}function Rd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",qt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",zt()],["compressedProofArgs",E()]])}function vO(){return gill.combineCodec(hd(),Rd())}function bd(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:hd().encode(c),programAddress:r})}function UO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Rd().decode(e.data)}}var Ud=new Uint8Array([14]);function wO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ud)}function Wd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Ud}))}function kd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function VO(){return gill.combineCodec(Wd(),kd())}function Ld(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Wd().encode(c),programAddress:r})}function HO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:kd().decode(e.data)}}var Nd=new Uint8Array([24]);function qO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Nd)}function wd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Nd}))}function Vd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function YO(){return gill.combineCodec(wd(),Vd())}function Hd(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:wd().encode(c),programAddress:r})}function ZO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Vd().decode(e.data)}}var zd=new Uint8Array([12]);function rB(){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())]]),e=>({...e,discriminator:zd}))}function jd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function nB(){return gill.combineCodec(Kd(),jd())}function Jd(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=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:Kd().encode(c),programAddress:r})}function sB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:jd().decode(e.data)}}var Zd=new Uint8Array([22]);function uB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zd)}function Xd(){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 Qd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function AB(){return gill.combineCodec(Xd(),Qd())}function $d(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Xd().encode(c),programAddress:r})}function gB(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:Qd().decode(e.data)}}var ru=new Uint8Array([11]);function SB(){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())]]),e=>({...e,discriminator:ru}))}function su(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function xB(){return gill.combineCodec(nu(),su())}function ou(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:nu().encode(c),programAddress:r})}function IB(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:su().decode(e.data)}}var iu=new Uint8Array([21]);function RB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(iu)}function du(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Gt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:iu}))}function uu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",zt()],["compressedProofArgs",E()]])}function bB(){return gill.combineCodec(du(),uu())}function Au(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:du().encode(c),programAddress:r})}function _B(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:uu().decode(e.data)}}var mu=new Uint8Array([15]);function OB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mu)}function yu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:mu}))}function lu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function BB(){return gill.combineCodec(yu(),lu())}function Tu(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=m({}),a=y(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:yu().encode({}),programAddress:r})}function NB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:lu().decode(e.data)}}var xu=new Uint8Array([25]);function zB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xu)}function Iu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:xu}))}function Cu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function KB(){return gill.combineCodec(Iu(),Cu())}function Eu(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=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:Iu().encode(c),programAddress:r})}function jB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:Cu().decode(e.data)}}var Mu=new Uint8Array([16]);function $B(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mu)}function hu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Yt()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Mu}))}function Ru(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Zt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function eN(){return gill.combineCodec(hu(),Ru())}function bu(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:hu().encode(c),programAddress:r})}function tN(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ru().decode(e.data)}}var Uu=new Uint8Array([26]);function iN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uu)}function Wu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Yt()],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",j()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Uu}))}function ku(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Zt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",J()],["compressedProofArgs",E()]])}function dN(){return gill.combineCodec(Wu(),ku())}function Lu(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=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Wu().encode(c),programAddress:r})}function uN(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ku().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",WE=(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))(WE||{});function qN(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 kE=(l=>(l[l.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",l[l.ChangeConfig=1]="ChangeConfig",l[l.ChangeConfigCompressed=2]="ChangeConfigCompressed",l[l.CreateCompressedWallet=3]="CreateCompressedWallet",l[l.CreateDomainConfig=4]="CreateDomainConfig",l[l.CreateDomainUserAccount=5]="CreateDomainUserAccount",l[l.CreateGlobalCounter=6]="CreateGlobalCounter",l[l.CreateUserAccounts=7]="CreateUserAccounts",l[l.DecompressSettingsAccount=8]="DecompressSettingsAccount",l[l.DisableDomainConfig=9]="DisableDomainConfig",l[l.EditDomainConfig=10]="EditDomainConfig",l[l.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",l[l.EditUserDelegate=12]="EditUserDelegate",l[l.MigrateCompressedSettings=13]="MigrateCompressedSettings",l[l.MigrateCompressedUsers=14]="MigrateCompressedUsers",l[l.NativeTransferIntent=15]="NativeTransferIntent",l[l.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",l[l.TokenTransferIntent=17]="TokenTransferIntent",l[l.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",l[l.TransactionBufferClose=19]="TransactionBufferClose",l[l.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",l[l.TransactionBufferCreate=21]="TransactionBufferCreate",l[l.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",l[l.TransactionBufferExecute=23]="TransactionBufferExecute",l[l.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",l[l.TransactionBufferExtend=25]="TransactionBufferExtend",l[l.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",l[l.TransactionBufferVote=27]="TransactionBufferVote",l[l.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",l[l.TransactionExecute=29]="TransactionExecute",l[l.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",l[l.TransactionExecuteSync=31]="TransactionExecuteSync",l[l.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",l))(kE||{});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([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var OE=6e3,BE=6001,NE=6002,wE=6003,VE=6004,HE=6005,FE=6006,GE=6007,zE=6008,KE=6009,jE=6010,JE=6011,qE=6012,YE=6013,ZE=6014,XE=6015,QE=6016,$E=6017,eD=6018,tD=6019,rD=6020,nD=6021,sD=6022,oD=6023,cD=6024,aD=6025,iD=6026,dD=6027,uD=6028,AD=6029,gD=6030,pD=6031,mD=6032,yD=6033,lD=6034,TD=6035,fD=6036,SD=6037,xD=6038,ID=6039,CD=6040,ED=6041,DD=6042,PD=6043,MD=6044,hD=6045,RD=6046,bD=6047,_D=6048,vD=6049,UD=6050,WD=6051,kD=6052,LD=6053,OD=6054,BD=6055,ND=6056,wD=6057,VD=6058,HD=6059,FD=6060,GD=6061,zD=6062,KD=6063,jD=6064,JD=6065,qD=6066,YD=6067,ZD=6068,XD=6069,QD=6070,$D=6071,eP=6072,tP=6073,rP=6074,nP=6075,sP=6076,oP=6077,cP=6078,aP=6079,iP=6080,dP=6081,uP=6082,AP=6083,gP=6084,pP=6085,mP=6086,Ou;process.env.NODE_ENV!=="production"&&(Ou={[pD]:"This member is already delegated to another wallet.",[GE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[oP]:"Clock sysvar access failed. This may indicate a system error.",[WD]:"Missing credential id.",[LD]:"The domain configuration account is disabled. Please contact support or try again later.",[OD]:"Missing domain configuration account.",[nP]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[mP]:"Duplicate address tree detected. This address tree is already in the whitelist.",[jE]:"Duplicate public keys detected among members. Each member must have a unique key.",[KE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[nD]:"No members provided. A multisig wallet must contain at least one member.",[FD]:"Slot numbers list is empty. At least one slot number is required for validation.",[eD]:"Expected a User with Administrator role for this instruction.",[zE]:"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.",[CD]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[ED]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[DD]:"Declared buffer size does not match the actual serialized size.",[HD]:"Failed to compute hash. This may indicate a system error.",[lD]:"Not enough members with vote permission to meet the approval threshold.",[mD]:"At least one signer with execute permission is required to proceed.",[yD]:"At least one signer with initiate permission is required to perform this action.",[iD]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[rP]:"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.",[tD]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[uD]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[ID]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[GD]:"Member key conversion failed. The provided key format is invalid.",[TD]:"Only delegated members are allowed for this transaction.",[aD]:"Unexpected number of accounts provided for this instruction.",[YE]:"User with Permanent Member role must have a delegated wallet.",[BE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[VE]:"The extracted public key has an invalid length or encoding.",[OE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[wE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[UD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[_D]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[oD]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[$D]:"Invalid source type for token transfer. The source account type is not supported.",[$E]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[XE]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[cD]:"Malformed transaction message: structure or formatting does not match the expected layout.",[iP]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[dD]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[aP]:"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.",[HE]:"The extracted WebAuthn signed message payload is malformed.",[RD]:"An input string exceeds the maximum allowed character length.",[BD]:"This member is not registered under the provided domain configuration.",[jD]:"Member not found in settings. Cannot remove a member that does not exist.",[tP]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[AD]:"A required account is missing from the instruction context.",[zD]:"Compressed proof arguments are missing. Required for compressed account operations.",[YD]:"Missing compressed token account. Required for token transfer operations.",[dP]:"Missing destination token account. Required for token transfer operations.",[XD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[KD]:"Light CPI accounts are missing. Required for compressed account operations.",[gD]:"User mutation arguments are required when performing add or remove delegate operations.",[gP]:"Missing new authority account. Required for domain configuration updates.",[AP]:"Missing settings account. Required for delegate operations on compressed wallets.",[VD]:"Compressed settings data is missing. The settings account must be initialized with data.",[uP]:"Missing source token account. Required for token transfer operations.",[ZD]:"Missing SPL interface PDA. Required for token transfer operations.",[bD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[sP]:"User account address is missing. Required for secp256r1 signature verification.",[pP]:"Missing whitelisted address trees account. Required for domain configuration updates.",[SD]:"No valid signer found in this transaction.",[rD]:"Only one administrator is allowed per wallet.",[qE]:"Only one permanent member is allowed per wallet.",[ZE]:"Only one transaction manager is allowed per wallet.",[ND]:"The given origin index is not in the whitelisted origins.",[qD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[JE]:"Permanent members cannot be removed from a wallet.",[hD]:"Writable CPI calls to protected accounts are not permitted.",[FE]:"The rpIdHash extracted from the signed message does not match the expected value.",[JD]:"Settings key mismatch. The provided settings key does not match the expected value.",[NE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[vD]:"The specified slot number was not found in the provided slot history.",[eP]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[sD]:"Too many members: a maximum of 4 members are supported.",[PD]:"This transaction has expired. It must be executed within 3 minutes of approval.",[MD]:"This transaction has not yet reached the required approval threshold.",[kD]:"Missing transports.",[xD]:"Only the transaction creator or rent payer may close this transaction buffer.",[cP]:"Unauthorized: Only the admin account is allowed to perform this action.",[fD]:"Member is not part of the expected signers for this transaction."});function tw(e){return process.env.NODE_ENV!=="production"?Ou[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 sa({payer:e,addressTree:n,remainingAccounts:[]})}var zs=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Bu="https://mainnet.block-engine.jito.wtf/api/v1",Nu="https://bundles.jito.wtf/api/v1/bundles/tip_floor",wu="landed_tips_75th_percentile";var ve=class extends Error{constructor(r,s,t){super(r);this.code=s;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},Be=class extends ve{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},re=class extends ve{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},Y=class extends ve{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},Pe=class extends ve{constructor(r,s,t){super(r,"NETWORK_ERROR",{statusCode:s,url:t});this.statusCode=s;this.url=t;}};var me=class extends ve{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},wr=class extends ve{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},Vr=class extends ve{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var tr={Ed25519:1,Secp256r1:2};var Vu=f__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),Iw=f__default.default.object({transactionActionType:Vu,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.array(f__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),Hu=f__default.default.object({transactionActionType:Vu,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.base64()}).strict(),Fu=f__default.default.object({authResponse:f__default.default.custom(),nonce:f__default.default.base64(),client:f__default.default.object({clientOrigin:f__default.default.url(),jws:f__default.default.base64url()}).strict(),device:f__default.default.object({jwk:f__default.default.base64(),jws:f__default.default.base64url()}).strict(),authProvider:f__default.default.object({jwk:f__default.default.base64(),jws:f__default.default.base64url()}).strict().optional()}).strict(),Gu=f__default.default.object({signer:f__default.default.string(),userAddressTreeIndex:f__default.default.number().optional(),additionalInfo:f__default.default.looseObject({}).optional()}).strict(),yP=f__default.default.object({transactionPayload:Hu,slotHash:f__default.default.string(),slotNumber:f__default.default.string(),originIndex:f__default.default.number(),crossOrigin:f__default.default.boolean()}).strict(),Cw=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("message"),payload:f__default.default.string().optional()}).strict()}).strict(),Ew=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Hu}).strict()}).strict(),Dw=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("message"),payload:Gu.extend(Fu.shape).extend({id:f__default.default.string().optional(),message:f__default.default.string(),client:f__default.default.object({clientOrigin:f__default.default.url()}).strict()})}).strict()}).strict(),Pw=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Gu.extend(Fu.shape).extend(yP.shape).extend({client:f__default.default.object({clientOrigin:f__default.default.url()}).strict()})}).strict()}).strict();var Ue={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Ne=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,s)=>r|s,0))}static all(){return new e(Object.values(Ue).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Ks=33,we=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!==Ks)throw new Error(`Invalid public key length, expected ${Ks} 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===Ks)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()}},P=class extends we{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 fP(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function SP(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ku=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(fP())],["addressTableLookups",gill.getArrayCodec(SP())]]);function ju(e){return Ku.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 Ju(e){let n=Ku.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 ne={};function qu(){if(!ne.solanaRpcEndpoint)throw new Be("RPC endpoint");return ne.solanaRpcEndpoint}function Me(){if(!ne.lightProtocolRpc)throw new Be("Light Protocol RPC");return ne.lightProtocolRpc}function se(){if(!ne.solanaRpc)throw new Be("Solana RPC");return ne.solanaRpc}function Yu(){if(!ne.sendAndConfirm)throw new Be("Send and confirm transaction function");return ne.sendAndConfirm}function Zu(){if(!ne.computeEstimate)throw new Be("Compute budget estimate function");return ne.computeEstimate}function Js(){return ne.jitoTipsConfig?ne.jitoTipsConfig:{blockEngineUrl:Bu,getJitoTipsUrl:Nu,priority:wu}}function Yw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){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.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),ne.jitoTipsConfig=s??null;}async function rr(e,n){if(!e.ok)throw new Pe(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function nr(e){try{return await e.json()}catch(n){throw new Pe(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function u2(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Fr(n.get(-2))),y:BigInt("0x"+Fr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function A2(e){let r=nist_js.p256.Point.fromBytes(gill.getBase58Encoder().encode(e)).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function g2(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=Ee(n),c=JSON.parse(gill.getUtf8Decoder().decode(Ee(r))),i=eA(c),a=rA(Ee(s)),o=await gt({rpIdHash:t.subarray(0,32)});return new P(e.signer.toString(),{verifyArgs:{clientDataJson:Ee(r),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:qs(e.client.clientOrigin,e.device.jwk,e.nonce),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function qs(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase64Encoder().encode(n),...gill.getBase64Encoder().encode(r)]))}function p2(e){return sha2_js.sha256(gill.getUtf8Encoder().encode(JSON.stringify(e)))}function m2(e){return Ys(e.data.payload.authResponse)}function y2(e,n,r,s){let t=qs(n,r,s);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function l2(e,n,r,s,t,c){let i;if(!t||!c){let u=(await se().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!u)throw new re("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),o=qs(n,r,s),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...a,...i,...o]));return {slotNumber:c,slotHash:t,challenge:d}}function Ys(e){let n=Gr(e);return sha2_js.sha256(n)}function T2(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ee(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),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 f2(e,n){let{data:r}=await Eo(se(),e),t=tA(r.origins,r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new re("Origin","Origin not found in domain config");return t}function S2(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function x2(e){return JSON.parse(gill.getUtf8Decoder().decode(gill.getBase64Encoder().encode(e)))}function Fr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function _P(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 eA(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 s=JSON.stringify(r);return new TextEncoder().encode(s.slice(1,-1))}function tA(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function rA(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 I=n&127;r+=I;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,u=o[0]===0&&o.length>32?o.slice(1):o;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,T=BigInt("0x"+Fr(u)),b=(T>p?nist_js.p256.Point.CURVE().n-T:T).toString(16).padStart(64,"0"),x=_P(b);return new Uint8Array([...g,...x])}function Gr(e){let n=Ee(e.response.clientDataJSON),r=Ee(e.response.authenticatorData),s=sha2_js.sha256(n);return new Uint8Array([...r,...s])}var OP={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true,initialDelayMs:500,maxRetries:3};function BP(e,n,r,s){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function NP(e){return new Promise(n=>setTimeout(n,e))}async function cr(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t,maxDelayMs:c,shouldRetry:i}={...OP,...n},a;for(let o=1;o<=r;o++)try{return await e()}catch(d){if(a=d,i&&!i(d,o))throw d;if(o>=r)break;let u=BP(o,s,t,c);await NP(u);}throw new wr(e.name||"retryWithBackoff",r,a)}async function pt(e,n){let r=(s,t)=>t>(n?.maxRetries??3)?false:s instanceof Response?s.status===429?n?.retryOnRateLimit??true:s.status>=400&&s.status<500?false:s.status>=500:s instanceof TypeError||s instanceof Error;return cr(e,{...n,shouldRetry:n?.shouldRetry??r})}function cA(e,n,r,s){if(e<n||e>r)throw new Y(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function aA(e,n){if(e<0)throw new Y(`${n} must be non-negative, got ${e}`)}function ar(e,n){if(e.length===0)throw new Y(`${n} cannot be empty`)}function iA(e,n){if(e.trim().length===0)throw new Y(`${n} cannot be empty`)}async function Xs(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await se().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((s.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 gA(e,n){let s=(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));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function pA(e,n){ar(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new Y(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await pt(()=>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 rr(r,n);let s=await nr(r);if(!s.result||s.error)throw new me(`Unable to simulate bundle: ${JSON.stringify(s.error??s.result)}`);if(typeof s.result.value.summary!="string"&&s.result.value.summary.failed){let{TransactionFailure:t}=s.result.value.summary.failed.error,[,c]=t;throw new me(`Simulation failed: ${c}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function Z(e,n=0){let r=e instanceof P?e:void 0,s=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?Gr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function he(e){if(e instanceof we)return {keyType:tr.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:tr.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function AA(e){return e instanceof P?e.toString():e.address.toString()}function fe(e){let n=new Set,r=[];for(let t of e)n.has(AA(t))||(r.push(t),n.add(AA(t)));let s=r.filter(t=>t instanceof P);if(s.length>1)throw new Y(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function mA({payer:e,tipAmount:n}){let r=zs[Math.floor(Math.random()*zs.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function yA(e){return typeof e=="string"?e:e.toString()}function lA(e){return e.toString()}async function Qs(e,n,r){let s=e?.get(n);if(s)return s;let t=await r();return t&&e&&e.set(n,t),t}var B=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}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){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.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=await Me().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(o);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:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function zr(e,n){let r=yA(e);return Qs(n,r,()=>Me().getCompressedAccount(e))}async function st(e,n){let r=lA(e);return Qs(n,r,()=>se().getAccountInfo(e,{encoding:"base64"}).send())}async function ye(e,n){let r=(await Promise.all(e.map(s=>zr(s.address,n)))).filter(s=>s!==null).filter(s=>s.data!==null&&s.address!==null);if(r.length!==e.length)throw new re("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((s,t)=>({...s,type:e[t].type,tree:s.treeInfo.tree,queue:s.treeInfo.queue}))}function U(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 Ae(e,n,r,s,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:s[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 de(e,n,r,s,t,c,i){let a=[];for(let u=0;u<n.length;u++)a.push({treeInfo:n[u],rootIndex:s[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new Y("Unable to parse state tree data");return c.map((u,g)=>({data:i.decode(u.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(u.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Re(e,n,r,s,t){let c=null,i=null,a=null,o=new B;if(e){await o.addSystemAccounts();let{address:d}=await ae(n,r),u=(await ye([{address:d,type:"Settings"}],t))[0];s?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 w([u],[]);let g=o.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 Y("Unable to parse state tree data");c={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0]},data:K().decode(u.data?.data)},i={accountMeta:{address:new Uint8Array(u.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:K().decode(u.data?.data)};}return {settingsReadonlyArgs:c,proof:a,packedAccounts:o,settingsMutArgs:i}}async function w(e,n){return cr(()=>Me().getValidityProofV0(e,n))}async function be(){return (await Kr()).length-1}var $s;async function Kr(){if(!$s){let{data:e}=await Qc(se(),await xA());$s=e.whitelistedAddressTrees;}return $s}function SA(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 dr(e,n,r){let s=await aM(e,n,r);if(!s)throw new re("User account");return s}async function aM(e,n,r){let{address:s}=await N(e,n),t=await zr(s,r);return t?.data?.data?q().decode(t.data.data):null}async function y5(e,{member:n,credentialId:r}){let s=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)s.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(he(n)))}});else if(r)s.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(Ee(r))}});else return null;let t=await Me().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:s});return t.items.filter(c=>!!c.data).length?t.items.map(c=>q().decode(c.data?.data))[0]:null}async function jr(e,n,r){let s=await iM(e,n,r);if(!s)throw new re("Settings account");return s}async function iM(e,n,r){try{let{address:s}=await ae(e,n),t=await zr(s,r);if(!t?.data?.data)throw new re("Compressed settings account");let c=K().decode(t.data.data);if(c.data.__option==="None")throw new re("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let s=await ls(se(),await ue(e));return s.exists?{...s.data,isCompressed:false}:null}}async function l5(e,n,r){let s=await dr(e,n,r);if(s.role===1||s.role===0){let t=[],[c,i]=await Promise.all([Me().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(he(e)))}}]}),se().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(H().encode(he(e)))}}]}).send()]);return c.items.forEach(a=>{if(a.data?.data){let o=K().decode(a.data.data);o.data.__option==="Some"&&t.push({...o.data.value,isCompressed:true});}}),i.forEach(a=>{let o=br().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...o,isCompressed:false});}),t}else return await Promise.all(s.wallets.map(t=>jr(t.index,t.settingsAddressTreeIndex,r)))}async function to(e){aA(e,"index");let n=await Kr();if(e>=n.length)throw new Y(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function T5(e){let r=(await Kr()).findIndex(s=>s.toString()===e);if(r===-1)throw new re("Address tree",`Address ${e} not found in whitelist`);return r}async function ae(e,n=0){let r=await to(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,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 to(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof we?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function gt({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new Y("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 MA(){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 hA(e,n,r){cA(r,0,255,"buffer_index");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof we?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function We(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 ue(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function b5(e){let n=await ue(e);return await We(n)}async function _5(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function V5(e){ar(e,"bundle");let n=await Xs(e,true),r=await pA(n.map(gill.getBase64EncodedWireTransaction),qu()),s=await Xs(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await mM(s.map(gill.getBase64EncodedWireTransaction))}async function mM(e,n=Js(),r){ar(e,"serializedTransactions");let{blockEngineUrl:s}=n,t=`${s}/bundles`,c=await pt(()=>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 rr(c,t);let i=await nr(c);if(i.error)throw new me(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new me("No bundle ID returned from Jito");return i.result}async function H5(e,n=30,r=3e3,s=Js()){iA(e,"bundleId");let{blockEngineUrl:t}=s,c=`${t}/getBundleStatuses`;return cr(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 rr(i,c);let a=await nr(i);if(a.error)throw new me(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new me("Bundle not yet confirmed",e);let o=a.result.value[0];if(o.confirmation_status==="confirmed"||o.confirmation_status==="finalized"){let d=o.transactions[o.transactions.length-1];if(!d)throw new me("No transactions in confirmed bundle",e);return d}throw new me(`Bundle status: ${o.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:i=>i instanceof me||i instanceof Pe})}async function q5({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await se().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(e,c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(s.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([Zu()(c),gA(se(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil(i*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await Yu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function d6(e,n){if(n.threshold>1)throw new Y("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(o=>vA(o.pubkey)===e);if(!r)throw new re("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new re("Permissions","No permissions found for the current member");let t=Ne.has(s,Ue.InitiateTransaction),c=Ne.has(s,Ue.VoteTransaction),i=Ne.has(s,Ue.ExecuteTransaction);if(t&&c&&i)return {};if(!c||!i)throw new Vr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(o=>o.role===0);if(!a)throw new re("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(vA(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function u6({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await dr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new re("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return UM(n,c.transactionManagerUrl.value,e,s)}function UM(e,n,r,s){return {address:e,async signTransactions(t){let c=await pt(()=>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:s?gill.getBase64Decoder().decode(s):void 0,authResponses:r}))})}));if(!c.ok)throw new Pe(`Transaction manager request failed: ${c.statusText}`,c.status,n);let i=await c.json();if("error"in i)throw new Pe(`Transaction manager error: ${i.error}`,c.status,n);return i.signatures.map(a=>({[e]:gill.getBase58Encoder().encode(a)}))}}}function vA(e){return e.keyType===tr.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function A6(e){let n=e.map(c=>je().encode(c)),r=4+n.reduce((c,i)=>c+i.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function g6(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;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 Y(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function R6({payer:e,rpId:n,origins:r,authority:s}){let t=await gt({rpId:n}),c=new B;await c.addSystemAccounts();let i=await be(),{address:a,addressTree:o}=await N(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],u=await w([],d),g=(await Ae(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:p,systemOffset:T}=c.toAccountMetas(),S=U(u,T);return await ka({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function w6({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await ae(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await ye(i,t):[],o=await be(),{address:d,addressTree:u}=await N(r.member,o),g=[{address:d,type:"User",tree:u,queue:u}],p=await w(a,g),T=null,S=null,b=a.filter(z=>z.type==="Settings"),x=a.filter(z=>z.type==="User");b.length&&(T=de(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),b,K())[0]),x.length&&(S=de(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,q())[0]);let I=await Ae(c,p.treeInfos.slice(a.length),p.roots.slice(a.length),p.rootIndices.slice(a.length),g),{remainingAccounts:_,systemOffset:v}=c.toAccountMetas(),D=U(p,v);return await wa({payer:n,authority:e,compressedProofArgs:D,member:Vt().decode(r.member.toBuffer()),credentialId:Ee(r.credentialId),transports:r.transports,role:r.role,linkWalletArgs:T?gill.some({settingsMutArgs:T,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:I[0],domainConfig:s,remainingAccounts:_})}async function G6({payer:e}){let n=await MA();return Ga({payer:e,globalCounter:n})}async function J6({admin:e,rpId:n,disable:r}){let s=await gt({rpId:n});return oi({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function eV({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await ae(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await w([],a),d=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),p=U(o,g);return bi({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:u})}async function aV({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await N(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await w([],a),d=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),p=U(o,g);return Li({compressedProofArgs:p,args:e,authority:n,userCreationArgs:d,remainingAccounts:u})}function kM(e,n,r,s){let t=LM(e,n),c=OM(e,n)&&r!==s;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function LM(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function OM(e,n){return n<e.header.numSignerAccounts}async function qr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ju(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),se()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,o]of t.staticAccounts.entries())i.push({address:o,role:kM(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let u=o[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=o[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 s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(d=>d.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}var yt=33,lt=64,oo=14,GM=2,zM=gill.address("Secp256r1SigVerify1111111111111111111111111");function KM(){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 jM(){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 BA(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let s=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=jM();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=oo;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),yt).decode(e,n);n+=yt;let d=gill.fixDecoderSize(gill.getBytesDecoder(),lt).decode(e,n);n+=lt;let u=t[a].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,i.push({publicKey:o,signature:d,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function NA(){return gill.createEncoder({getSizeFromValue:e=>{let n=oo*e.offsets.length,r=e.payload.reduce((s,t)=>s+yt+lt+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 s=KM();for(let t of e.offsets)r=s.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(),lt).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function CV(){return gill.combineCodec(NA(),BA())}function V(e,n){let r=e.length,s=GM+r*oo,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],u=s,g=u+yt,p=g+lt;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:d.length,messageInstructionIndex:65535}),s+=yt+lt+d.length;}let c=n?.programAddress??zM,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:NA().encode(i)}}function EV(e){return {programAddress:e.programAddress,accounts:{},data:BA().decode(e.data)}}async function wA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await We(e),{accountMetas:u,addressLookupTableAccounts:g}=await qr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(V(c)),p.push(o?Eu({transactionBuffer:n,payer:s.address,remainingAccounts:u,settingsKey:e}):Tu({transactionBuffer:n,payer:s.address,settings:e})),a&&p.push(mA({payer:s,tipAmount:a})),{instructions:p,addressLookupTableAccounts:g}}async function VA({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let u=fe(s),g=await ue(e),p=await We(g),[{accountMetas:T,addressLookupTableAccounts:S,transactionMessage:b},{settingsMutArgs:x,proof:I,packedAccounts:_}]=await Promise.all([qr({transactionMessageBytes:r,walletAddress:p,additionalSigners:u.filter(te=>!(te instanceof P)),addressesByLookupTableAddress:c}),Re(a,e,n,o,d)]);_.addPreAccounts(T);let v=u.filter(te=>te instanceof P),{secp256r1VerifyArgs:D}=qM(v,i,_),{remainingAccounts:z,systemOffset:X}=_.toAccountMetas();return {instructions:YM({secp256r1VerifyInput:i,transactionMessage:b,accountMetas:T,compressed:a,payer:t,settingsMutArgs:x,proof:I,systemOffset:X,secp256r1VerifyArgs:D,settings:g,remainingAccounts:z}),addressLookupTableAccounts:S}}function qM(e,n,r){let s=[];for(let t of e){let c=n.length,{domainConfig:i,verifyArgs:a,signature:o,publicKey:d,message:u}=Z(t,c);u&&o&&d&&n.push({message:u,signature:o,publicKey:d}),i&&(r.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]),a.__option==="Some"&&s.push({domainConfigKey:i,verifyArgs:a.value}));}return {secp256r1VerifyArgs:s}}function YM({secp256r1VerifyInput:e,transactionMessage:n,accountMetas:r,compressed:s,payer:t,settingsMutArgs:c,proof:i,systemOffset:a,secp256r1VerifyArgs:o,settings:d,remainingAccounts:u}){let g=[];e.length>0&&g.push(V(e));let p=ZM(n,r);if(s){if(!t||!c)throw new Error("Payer not found or proof args is missing.");let T=U(i,a);g.push(Lu({secp256r1VerifyArgs:o,transactionMessage:p,settingsMutArgs:c,compressedProofArgs:T,payer:t,remainingAccounts:u}));}else g.push(bu({secp256r1VerifyArgs:o,settings:d,transactionMessage:p,remainingAccounts:u}));return g}function ZM(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:new Uint8Array(r.data??[])})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(s=>s.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function JV({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=fe(s),d=await ue(e),u=await We(d),[{packedAccounts:g,proof:p,settingsMutArgs:T},{value:S}]=await Promise.all([Re(a,e,n,false,t),st(u,t)]);if((S?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let b=[],x=[];for(let D of o)if(D instanceof P){let z=b.length,{domainConfig:X,verifyArgs:ie,signature:te,publicKey:le,message:Te}=Z(D,z);Te&&te&&le&&b.push({message:Te,signature:te,publicKey:le}),X&&(g.addPreAccounts([{address:X,role:gill.AccountRole.READONLY}]),ie.__option==="Some"&&x.push({domainConfigKey:X,verifyArgs:ie.value}));}else g.addPreAccounts([{address:D.address,role:gill.AccountRole.READONLY_SIGNER,signer:D}]);let{remainingAccounts:I,systemOffset:_}=g.toAccountMetas(),v=[];if(b.length>0&&v.push(V(b)),a){if(!i||!T)throw new Error("Payer not found or proof args is missing.");let D=U(p,_);v.push(Ki({amount:c,settingsMutArgs:T,compressedProofArgs:D,payer:i,secp256r1VerifyArgs:x,source:u,destination:r,remainingAccounts:I}));}else v.push(wi({amount:c,secp256r1VerifyArgs:x,source:u,destination:r,settings:d,remainingAccounts:I}));return v}var rh=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),nh=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),Zr=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function c8({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,splInterfacePdaArgs:d={index:0,restricted:false},compressed:u=false}){let g=fe(t),p=await ue(e),T=await We(p),S=W=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(W),gill.getAddressEncoder().encode(Zr),gill.getAddressEncoder().encode(s)],programAddress:Zr}),b=()=>{let W=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(s)];return d.restricted&&W.push(gill.getUtf8Encoder().encode("restricted")),d.index>0&&W.push(gill.getU8Encoder().encode(d.index)),W},[x,[I],_,[v],[D]]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,T,o),S(T),programs.getAssociatedTokenAccountAddress(s,r,o),S(r),gill.getProgramDerivedAddress({seeds:b(),programAddress:Zr})]),[z,X,ie,te]=await Promise.all([st(_,c),st(x,c),st(I,c),ch(u,e,n,c)]),le=!!z.value,Te=!!X.value,He=!!ie.value,_e=Te?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(X.value.data[0])).amount:BigInt(0),it=BigInt(He?ah(gill.getBase64Encoder().encode(ie.value.data[0]))?.amount??0:0),ur=le?_:void 0,en=le?void 0:v,Tt=Te&&(_e+it<BigInt(i)||it>BigInt(0)||!le)||!Te&&le,l=!le,[pe,po]=await Promise.all([oh(T,s,_e,it,BigInt(i),u?3:4),sh(Tt,D,c)]),Q=pe.reduce((W,oe)=>W+oe.parsed.amount.toNumber(),0);if(_e+it+BigInt(Q)<BigInt(i))throw new Error("Insufficient balance");let dt=null,ke=null,Le=new B;if(po&&Le.addPreAccounts([{address:s,role:gill.AccountRole.WRITABLE}]),te||pe.length){await Le.addSystemAccounts();let W=[];if(pe.length&&W.push(...pe.map(oe=>({hash:oe.compressedAccount.hash,tree:oe.compressedAccount.treeInfo.tree,queue:oe.compressedAccount.treeInfo.queue,data:oe.compressedAccount.data,address:oe.compressedAccount.address}))),te&&W.push(te),ke=await w(W,[]),te){let oe=pe.length;dt=de(Le,ke.treeInfos.slice(oe),ke.leafIndices.slice(oe),ke.rootIndices.slice(oe),ke.proveByIndices.slice(oe),W.slice(oe),K())[0];}}let og=pe.length&&ke?gill.some(pe.map((W,oe)=>({isFrozen:W.parsed.state===programs.AccountState.Frozen,hasDelegate:W.parsed.delegate!=null,amount:W.parsed.amount.toNumber(),merkleContext:{leafIndex:W.compressedAccount.leafIndex,merkleTreePubkeyIndex:Le.insertOrGet(W.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:Le.insertOrGet(W.compressedAccount.treeInfo.queue.toString()),proveByIndex:W.compressedAccount.proveByIndex},rootIndex:ke.rootIndices[oe],version:SA(W.compressedAccount.data?.discriminator),tlv:W.parsed.tlv?gill.some(gill.getArrayDecoder(Wt()).decode(W.parsed.tlv)):gill.none()}))):gill.none(),Ar=[],mo=[];for(let W of g)if(W instanceof P){let oe=Ar.length,{domainConfig:tn,verifyArgs:lo,signature:To,publicKey:fo,message:So}=Z(W,oe);So&&To&&fo&&Ar.push({message:So,signature:To,publicKey:fo}),tn&&(Le.addPreAccounts([{address:tn,role:gill.AccountRole.READONLY}]),lo.__option==="Some"&&mo.push({domainConfigKey:tn,verifyArgs:lo.value}));}else Le.addPreAccounts([{address:W.address,role:gill.AccountRole.READONLY_SIGNER,signer:W}]);let{remainingAccounts:cg,systemOffset:ag}=Le.toAccountMetas(),gr=[];Ar.length>0&&gr.push(V(Ar));let ig=U(ke,ag),dg=Tt?D:void 0,ug=l?nh:void 0,Ag=Tt?gill.some(d):gill.none(),yo={amount:i,secp256r1VerifyArgs:mo,source:T,destination:r,sourceCtokenTokenAccount:I,sourceSplTokenAccount:x,destinationCtokenTokenAccount:en,destinationSplTokenAccount:ur,mint:s,tokenProgram:o,remainingAccounts:cg,payer:a,sourceCompressedTokenAccounts:og,compressedProofArgs:ig,compressibleConfig:rh,splInterfacePda:dg,rentSponsor:ug,splInterfacePdaArgs:Ag};if(u){if(!dt)throw new Error("Payer not found or proof args is missing.");gr.push(od({...yo,settingsMutArgs:dt}));}else gr.push(Xi({...yo,settings:p}));return gr}async function sh(e,n,r){if(!e)return false;let{value:s}=await st(n,r);return !s}async function oh(e,n,r,s,t,c){let i=t-r-s;if(i<=0)return [];let o=(await Me().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.toString()===Zr.toString()&&!g.parsed.amount.isZero()).sort((g,p)=>p.parsed.amount.cmp(g.parsed.amount));if(o.length===0)return [];let d=BigInt(0),u=[];for(let g of o){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 ch(e,n,r,s){if(!e)return null;let{address:t}=await ae(n,r);return (await ye([{address:t,type:"Settings"}],s))[0]}function ah(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 T8({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:i,proof:a,settingsMutArgs:o}=r,d=fe(e),u=d.filter(_=>!(_ instanceof P));i.addPreAccounts(u.map(_=>({address:_.address,role:gill.AccountRole.READONLY_SIGNER,signer:_})));let g=d.filter(_=>_ instanceof P),p=[],T=[];for(let _ of g){let v=T.length,{domainConfig:D,verifyArgs:z,signature:X,publicKey:ie,message:te}=Z(_,v);te&&X&&ie&&T.push({message:te,signature:X,publicKey:ie}),D&&(i.addPreAccounts([{address:D,role:gill.AccountRole.READONLY}]),z.__option==="Some"&&p.push({domainConfigKey:D,verifyArgs:z.value}));}let{remainingAccounts:S,systemOffset:b}=i.toAccountMetas(),x=U(a,b),I=[];if(T.length>0&&I.push(V(T)),c){if(!o)throw new Error("Payer not found or proof args is missing.");I.push(Sa({configActions:t,payer:n,compressedProofArgs:x,settingsMutArgs:o,remainingAccounts:S,secp256r1VerifyArgs:p}));}else I.push(await Aa({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:x,remainingAccounts:S,secp256r1VerifyArgs:p}));return I}async function D8({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 s=await be(),t=await Promise.all(e.map(async u=>{let{address:g,addressTree:p}=await N(u.member.address,s);return {address:g,tree:p,queue:p,type:"User"}})),c=await w([],t),i=await Ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=U(c,o);return await Ja({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 v8({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[],a=[];a.push(...await ye([{address:(await N(r.address,s)).address,type:"User"}],t));let o=await be(),{address:d,addressTree:u}=await ae(e,o);i.push({address:d,queue:u,tree:u,type:"Settings"});let g=a.length,p=await w(a,i),T=de(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),a.filter(v=>v.type==="User"),q())[0],b=(await Ae(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),i)).find(v=>v.type==="Settings")??null,{remainingAccounts:x,systemOffset:I}=c.toAccountMetas(),_=U(p,I);if(!b)throw new Error("Settings creation args is missing.");return await Da({settingsIndex:e,payer:n,initialMember:r,userArgs:T.data.role===3?{__kind:"Mutate",fields:[T]}:{__kind:"Read",fields:[T]},compressedProofArgs:_,settingsCreation:b,remainingAccounts:x})}async function V8({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:i,settingsMutArgs:a}=await Re(true,e,n,false,t);if(!a)throw new Error("Proof args is missing");let o=fe(s),d=o.filter(I=>I instanceof P),u=[],g=[];for(let I of d){let _=u.length,{domainConfig:v,verifyArgs:D,signature:z,publicKey:X,message:ie}=Z(I,_);ie&&z&&X&&u.push({message:ie,signature:z,publicKey:X}),v&&(c.addPreAccounts([{address:v,role:gill.AccountRole.READONLY}]),D.__option==="Some"&&g.push({domainConfigKey:v,verifyArgs:D.value}));}c.addPreAccounts(o.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:p,systemOffset:T}=c.toAccountMetas(),S=U(i,T),b=[];u.length>0&&b.push(V(u));let x=await ue(e);return b.push($a({settings:x,payer:r,settingsMutArgs:a,compressedProofArgs:S,secp256r1VerifyArgs:g,remainingAccounts:p})),b}async function J8({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new B;await i.addSystemAccounts();let a=await be(),{address:o,addressTree:d}=await N(r.address,a),u=[{address:o,tree:d,queue:d,type:"User"}],g=await w([],u),p=(await Ae(i,g.treeInfos,g.roots,g.rootIndices,u))[0],T=i.toAccountMetas();c=T.remainingAccounts,t={compressedProofArgs:U(g,T.systemOffset),authorityCreationArgs:p};}return Ai({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function $8({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new B;await s.addSystemAccounts();let t=await ye([{address:(await N(e.address,n)).address,type:"User"}]),c=await w(t,[]),i=de(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,q())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=U(c,o);return Ti({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function dH({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=Z(n),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let g=await dr(n instanceof P?n:n.address,r,t),p=[];p.push({address:(await N(n instanceof P?n:n.address,r)).address,type:"User"});let T,S=null,b,x=null,I=g.wallets.find(_e=>_e.isDelegate);I&&((await jr(I.index,I.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(I.index,I.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):T=await ue(I.index)),s&&((await jr(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):b=await ue(s.index));let _=new B;await _.addSystemAccounts();let v=await ye(p,t),D=await w(v,[]),z=de(_,D.treeInfos.slice(0,1),D.leafIndices.slice(0,1),D.rootIndices.slice(0,1),D.proveByIndices.slice(0,1),v.slice(0,1),q())[0],X=S?gill.some(de(_,D.treeInfos.slice(S.start,S.end),D.leafIndices.slice(S.start,S.end),D.rootIndices.slice(S.start,S.end),D.proveByIndices.slice(S.start,S.end),v.slice(S.start,S.end),K())[0]):gill.none(),ie=x?gill.some(de(_,D.treeInfos.slice(x.start,x.end),D.leafIndices.slice(x.start,x.end),D.rootIndices.slice(x.start,x.end),D.proveByIndices.slice(x.start,x.end),v.slice(x.start,x.end),K())[0]):gill.none(),{remainingAccounts:te,systemOffset:le}=_.toAccountMetas(),Te=U(D,le),He=[];return u.length>0&&He.push(V(u)),He.push(Ei({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof P?void 0:n,oldSettings:T,oldSettingsMutArgs:X,newSettings:b,newSettingsMutArgs:ie,compressedProofArgs:Te,userMutArgs:z,remainingAccounts:te})),He}async function PH({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await jc(se(),s),o=a.data.multiWalletSettings,{packedAccounts:d,proof:u,settingsMutArgs:g}=await Re(c,e,n,false,i),{remainingAccounts:p,systemOffset:T}=d.toAccountMetas(),{domainConfig:S,verifyArgs:b,message:x,signature:I,publicKey:_}=Z(r),v=[];if(x&&I&&_&&v.push(V([{message:x,signature:I,publicKey:_}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let D=U(u,T);v.push(Td({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:b,settingsMutArgs:g,payer:t,compressedProofArgs:D,remainingAccounts:p}));}else v.push(Ad({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:b,remainingAccounts:[]}));return v}function YA({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:d,expectedSecp256r1Signers:u}){let{domainConfig:g,verifyArgs:p,message:T,signature:S,publicKey:b}=Z(n),x=[];if(T&&S&&b&&x.push(V([{message:T,signature:S,publicKey:b}])),d){let{settingsReadonlyArgs:I,compressedProofArgs:_,remainingAccounts:v}=d;x.push(bd({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},settingsReadonlyArgs:I,compressedProofArgs:_,remainingAccounts:v}));}else x.push(Ed({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},remainingAccounts:[]}));return x}function ZA({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=Z(e),d=[];return a&&i&&o&&d.push(V([{message:a,signature:i,publicKey:o}])),s?d.push(Hd({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Ld({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,remainingAccounts:[]})),d}function XA({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?$d({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Jd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function QA({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=Z(n),d=[];return o&&i&&a&&d.push(V([{message:o,signature:i,publicKey:a}])),s?d.push(Au({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(ou({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,remainingAccounts:[]})),d}async function mF({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await Ah(r),i=new B,a=null,o=null,d=[];if(c.length||t){let g=await gh({packedAccounts:i,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});a=g.proof,o=g.settingsMutArgs??null,d=g.userMutArgs??[];}return {configActions:await ph({configActionsArgs:r,userMutArgs:d,index:e}),index:e,proof:a,settingsMutArgs:o,packedAccounts:i,compressed:t}}async function Ah(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function gh({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let T=(await ae(s,t)).address;i.push({address:T,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await ye(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await w(a,[]),d=[],u=[];for(let T of a)T.type==="Settings"?d.push(T):T.type==="User"&&u.push(T);let g,p=[];if(r&&o&&(g=de(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),d,K())[0]),u.length&&o){let T=r?1:0;p=de(e,o.treeInfos.slice(T),o.leafIndices.slice(T),o.rootIndices.slice(T),o.proveByIndices.slice(T),u,q());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function ph({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let i of t.members){let a=await N(i.member,i.userAddressTreeIndex).then(o=>r.find(d=>utils_js.equalBytes(d.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(o.address)))));if(!a)throw new Error("Unable to find user account");c.push(lh({permissionArgs:i.permissions,userMutArgs:a,pubkey:i.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(i=>N(i.member,i.userAddressTreeIndex).then(a=>{let o=r.find(d=>utils_js.equalBytes(d.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address))));if(!o)throw new Error("Unable to find user account");return yh({pubkey:i.member,userMutArgs:o})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(i=>mh({permissionArgs:i.permissions,pubkey:i.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function mh({pubkey:e,permissionArgs:n}){return {memberKey:he(e),permissions:rg(n)}}function yh({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:he(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:he(e),permissions:rg(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function rg(e){let n=[];return e.initiate&&n.push(Ue.InitiateTransaction),e.vote&&n.push(Ue.VoteTransaction),e.execute&&n.push(Ue.ExecuteTransaction),Ne.fromPermissions(n)}async function CF({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o,compressed:d=false,additionalVoters:u=[],additionalSigners:g=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:T}){let S=await ue(n),b=Math.floor(Math.random()*255),x=await hA(S,t instanceof P?t:t.address,b),I=[],_=[];for(let Q=0;Q<s.length;Q+=p){let dt=s.subarray(Q,Q+p);I.push(dt),_.push(sha2_js.sha256(dt));}let v=sha2_js.sha256(s),{settingsReadonlyArgs:D,settingsMutArgs:z,proof:X,packedAccounts:ie}=await Re(d,n,r,false,T),{remainingAccounts:te,systemOffset:le}=ie.toAccountMetas(),Te=X&&D&&z?{settingsReadonlyArgs:D,settingsMutArgs:z,compressedProofArgs:U(X,le),remainingAccounts:te,payer:e}:null,He=fe([t,...c?[c]:[],...u]).filter(Q=>Q instanceof P).map(Q=>({memberKey:he(Q),messageHash:Ys(Q.authResponse)})),_e=YA({finalBufferHash:v,finalBufferSize:s.length,bufferIndex:b,payer:e,transactionBufferAddress:x,settings:S,creator:t,preauthorizeExecution:!c,bufferExtendHashes:_,compressedArgs:Te,expectedSecp256r1Signers:He}),it=I.map(Q=>XA({transactionMessageBytes:Q,transactionBufferAddress:x,settings:S,compressed:d})),ur=u.map(Q=>QA({voter:Q,transactionBufferAddress:x,settings:S,compressedArgs:Te})),en=ZA({compressedArgs:Te,settings:S,executor:c,transactionBufferAddress:x}),{instructions:Tt,addressLookupTableAccounts:l}=await wA({compressed:d,settings:S,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),pe=Q=>({payer:e,instructions:Q,addressesByLookupTableAddress:l});return [pe(_e),...it.map(Q=>pe([Q])),...ur.length?[pe(ur.flat())]:[],pe(en),pe(Tt)]}var Qr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.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 o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}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),s=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+s.length,numReadonlySignerAccounts:s.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 o=[...r.map(([d])=>d),...s.map(([d])=>d),...t.map(([d])=>d),...c.map(([d])=>d)];return [i,o]}extractTableLookup(n){let[r,s]=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:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var $r=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 s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.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 sg({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=Qr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let p of a){let T=t.extractTableLookup(p);if(T!==void 0){let{addressTableLookup:S,drainedKeys:b}=T;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),i.writable.push(...b.writable),i.readonly.push(...b.readonly);}}let[o,d]=t.getMessageComponents(),g=new $r(d,i).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function LF({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=sg({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return ju(s)}async function VF({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:d=false}){let{instructions:u,addressLookupTableAccounts:g}=await VA({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:d,cachedAccounts:a});return {payer:e,instructions:u,addressesByLookupTableAddress:g}}
|
|
2
|
-
exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=ra;exports.AuthenticationContextSchema=Fu;exports.BaseResponseSchema=Gu;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=la;exports.CHANGE_CONFIG_DISCRIMINATOR=da;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=Ca;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Ua;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Ba;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ha;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Ka;exports.CompleteMessageRequestSchema=Dw;exports.CompleteTransactionRequestSchema=Pw;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Za;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=ri;exports.DOMAIN_CONFIG_DISCRIMINATOR=xo;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=di;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=mi;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=xi;exports.GLOBAL_COUNTER_DISCRIMINATOR=Mo;exports.KeyType=tr;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Mi;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Ui;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=pD;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=GE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=oP;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=WD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=LD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=OD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=nP;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=mP;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=jE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=KE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=nD;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=FD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=eD;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=zE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=QE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=CD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=ED;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=DD;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=HD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=lD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=mD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=yD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=iD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=rP;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=wD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=tD;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=uD;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=ID;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=GD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=TD;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=aD;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=YE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=BE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=VE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=OE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=wE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=UD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=_D;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=oD;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=$D;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=$E;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=XE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=cD;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=iP;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=dD;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=aP;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=QD;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=HE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=RD;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=BD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=jD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=tP;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=AD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=zD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=YD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=dP;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=XD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=KD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=gD;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=gP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=AP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=VD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=uP;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=ZD;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=bD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=sP;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=pP;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=SD;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=rD;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=qE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ZE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=ND;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=qD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=JE;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=hD;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=FE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=JD;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=NE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=vD;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=eP;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=sD;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=PD;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=MD;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=kD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=xD;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=cP;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=fD;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=WE;exports.MultiWalletInstruction=kE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Fi;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Bi;exports.Permission=Ue;exports.Permissions=Ne;exports.SETTINGS_DISCRIMINATOR=Bc;exports.Secp256r1Key=we;exports.SignedSecp256r1Key=P;exports.StartMessageRequestSchema=Cw;exports.StartTransactionRequestSchema=Ew;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=nd;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Yi;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=md;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=id;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Md;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=xd;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Gc;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Nd;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Ud;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Zd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=zd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=iu;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=ru;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=xu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=mu;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Uu;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Mu;exports.TransactionActionTypeSchema=Vu;exports.TransactionDetailsSchema=yP;exports.TransactionPayloadSchema=Iw;exports.TransactionPayloadWithBase64MessageBytesSchema=Hu;exports.Transports=ys;exports.UserRole=Oe;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Yc;exports.addWhitelistedAddressTrees=pw;exports.base64URLStringToBuffer=Ee;exports.bufferToBase64URLString=T2;exports.changeConfig=T8;exports.closeTransactionBuffer=PH;exports.configAction=DR;exports.convertBase64StringToJWK=x2;exports.convertJWKToBase64String=S2;exports.convertMemberKeyToString=vA;exports.convertPubkeyCompressedToCose=A2;exports.convertPubkeyCoseToCompressed=u2;exports.createClientAuthorizationCompleteRequestChallenge=m2;exports.createClientAuthorizationStartRequestChallenge=p2;exports.createDomainConfig=R6;exports.createDomainUserAccounts=w6;exports.createGlobalCounter=G6;exports.createMessageChallenge=y2;exports.createTransactionBuffer=YA;exports.createTransactionChallenge=l2;exports.createTransactionManagerSigner=UM;exports.createUserAccounts=D8;exports.createWallet=v8;exports.decodeDomainConfig=Co;exports.decodeGlobalCounter=Ro;exports.decodeSettings=Nc;exports.decodeTransactionBuffer=Kc;exports.decodeWhitelistedAddressTree=Xc;exports.decompressSettingsAccount=V8;exports.deserializeConfigActions=g6;exports.disableDomainConfig=J6;exports.editDomainConfig=J8;exports.editTransactionManagerUrl=$8;exports.editUserDelegate=dH;exports.executeTransaction=wA;exports.executeTransactionBuffer=ZA;exports.executeTransactionSync=VA;exports.extendTransactionBuffer=XA;exports.extensionStruct=FR;exports.fetchAllDomainConfig=Ih;exports.fetchAllGlobalCounter=Rh;exports.fetchAllMaybeDomainConfig=Pg;exports.fetchAllMaybeGlobalCounter=Hg;exports.fetchAllMaybeSettings=RT;exports.fetchAllMaybeTransactionBuffer=qT;exports.fetchAllMaybeWhitelistedAddressTree=yf;exports.fetchAllSettings=AU;exports.fetchAllSettingsAccountByMember=l5;exports.fetchAllTransactionBuffer=TU;exports.fetchAllWhitelistedAddressTree=CU;exports.fetchDomainConfig=Eo;exports.fetchGlobalCounter=hh;exports.fetchMaybeDomainConfig=Dg;exports.fetchMaybeGlobalCounter=Vg;exports.fetchMaybeSettings=ls;exports.fetchMaybeSettingsAccountData=iM;exports.fetchMaybeTransactionBuffer=JT;exports.fetchMaybeUserAccountData=aM;exports.fetchMaybeWhitelistedAddressTree=mf;exports.fetchSettings=uU;exports.fetchSettingsAccountData=jr;exports.fetchTransactionBuffer=jc;exports.fetchUserAccountByFilters=y5;exports.fetchUserAccountData=dr;exports.fetchWhitelistedAddressTree=Qc;exports.getAddMemberArgsCodec=Oh;exports.getAddMemberArgsDecoder=on;exports.getAddMemberArgsEncoder=sn;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=wU;exports.getAddWhitelistedAddressTreesInstruction=HU;exports.getAddWhitelistedAddressTreesInstructionAsync=sa;exports.getAddWhitelistedAddressTreesInstructionDataCodec=VU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=na;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Ds;exports.getAdditionalMetadataCodec=Uh;exports.getAdditionalMetadataDecoder=nn;exports.getAdditionalMetadataEncoder=rn;exports.getChangeConfigCompressedDiscriminatorBytes=oW;exports.getChangeConfigCompressedInstruction=Sa;exports.getChangeConfigCompressedInstructionDataCodec=cW;exports.getChangeConfigCompressedInstructionDataDecoder=fa;exports.getChangeConfigCompressedInstructionDataEncoder=Ta;exports.getChangeConfigDiscriminatorBytes=YU;exports.getChangeConfigInstruction=XU;exports.getChangeConfigInstructionAsync=Aa;exports.getChangeConfigInstructionDataCodec=ZU;exports.getChangeConfigInstructionDataDecoder=ua;exports.getChangeConfigInstructionDataEncoder=Ms;exports.getClientAndDeviceHash=qs;exports.getCompiledInstructionCodec=wh;exports.getCompiledInstructionDecoder=an;exports.getCompiledInstructionEncoder=cn;exports.getCompressedAccountMetaCodec=Gh;exports.getCompressedAccountMetaDecoder=It;exports.getCompressedAccountMetaEncoder=xt;exports.getCompressedAccountMetaReadOnlyCodec=Jh;exports.getCompressedAccountMetaReadOnlyDecoder=Pt;exports.getCompressedAccountMetaReadOnlyEncoder=Dt;exports.getCompressedOnlyExtensionCodec=Zh;exports.getCompressedOnlyExtensionDecoder=un;exports.getCompressedOnlyExtensionEncoder=dn;exports.getCompressedProofCodec=$h;exports.getCompressedProofDecoder=ln;exports.getCompressedProofEncoder=yn;exports.getCompressedSettingsAddressFromIndex=ae;exports.getCompressedSettingsCodec=nR;exports.getCompressedSettingsDataCodec=aR;exports.getCompressedSettingsDataDecoder=Rt;exports.getCompressedSettingsDataEncoder=ht;exports.getCompressedSettingsDecoder=K;exports.getCompressedSettingsEncoder=Mt;exports.getCompressedTokenArgsCodec=AR;exports.getCompressedTokenArgsDecoder=Ut;exports.getCompressedTokenArgsEncoder=vt;exports.getCompressibleExtensionCodec=yR;exports.getCompressibleExtensionDecoder=En;exports.getCompressibleExtensionEncoder=Cn;exports.getCompressionInfoCodec=SR;exports.getCompressionInfoDecoder=Pn;exports.getCompressionInfoEncoder=Dn;exports.getComputeBudgetEstimate=Zu;exports.getConfigActionCodec=ER;exports.getConfigActionDecoder=Je;exports.getConfigActionEncoder=je;exports.getCreateCompressedWalletDiscriminatorBytes=mW;exports.getCreateCompressedWalletInstruction=lW;exports.getCreateCompressedWalletInstructionAsync=Da;exports.getCreateCompressedWalletInstructionDataCodec=yW;exports.getCreateCompressedWalletInstructionDataDecoder=Ea;exports.getCreateCompressedWalletInstructionDataEncoder=hs;exports.getCreateDomainConfigDiscriminatorBytes=DW;exports.getCreateDomainConfigInstruction=MW;exports.getCreateDomainConfigInstructionAsync=ka;exports.getCreateDomainConfigInstructionDataCodec=PW;exports.getCreateDomainConfigInstructionDataDecoder=Wa;exports.getCreateDomainConfigInstructionDataEncoder=bs;exports.getCreateDomainUserAccountDiscriminatorBytes=kW;exports.getCreateDomainUserAccountInstruction=OW;exports.getCreateDomainUserAccountInstructionAsync=wa;exports.getCreateDomainUserAccountInstructionDataCodec=LW;exports.getCreateDomainUserAccountInstructionDataDecoder=Na;exports.getCreateDomainUserAccountInstructionDataEncoder=_s;exports.getCreateGlobalCounterDiscriminatorBytes=GW;exports.getCreateGlobalCounterInstruction=KW;exports.getCreateGlobalCounterInstructionAsync=Ga;exports.getCreateGlobalCounterInstructionDataCodec=zW;exports.getCreateGlobalCounterInstructionDataDecoder=Fa;exports.getCreateGlobalCounterInstructionDataEncoder=Us;exports.getCreateUserAccountArgsCodec=bR;exports.getCreateUserAccountArgsDecoder=Bn;exports.getCreateUserAccountArgsEncoder=On;exports.getCreateUserAccountsDiscriminatorBytes=$W;exports.getCreateUserAccountsInstruction=tk;exports.getCreateUserAccountsInstructionAsync=Ja;exports.getCreateUserAccountsInstructionDataCodec=ek;exports.getCreateUserAccountsInstructionDataDecoder=ja;exports.getCreateUserAccountsInstructionDataEncoder=ks;exports.getDecompressSettingsAccountDiscriminatorBytes=dk;exports.getDecompressSettingsAccountInstruction=$a;exports.getDecompressSettingsAccountInstructionDataCodec=uk;exports.getDecompressSettingsAccountInstructionDataDecoder=Qa;exports.getDecompressSettingsAccountInstructionDataEncoder=Xa;exports.getDisableDomainConfigDiscriminatorBytes=Tk;exports.getDisableDomainConfigInstruction=oi;exports.getDisableDomainConfigInstructionDataCodec=fk;exports.getDisableDomainConfigInstructionDataDecoder=si;exports.getDisableDomainConfigInstructionDataEncoder=ni;exports.getDomainConfigAddress=gt;exports.getDomainConfigCodec=xh;exports.getDomainConfigDecoder=Io;exports.getDomainConfigDiscriminatorBytes=Sh;exports.getDomainConfigEncoder=Eg;exports.getDomainConfigSize=Ch;exports.getEditDomainConfigDiscriminatorBytes=Mk;exports.getEditDomainConfigInstruction=Ai;exports.getEditDomainConfigInstructionAsync=Rk;exports.getEditDomainConfigInstructionDataCodec=hk;exports.getEditDomainConfigInstructionDataDecoder=ui;exports.getEditDomainConfigInstructionDataEncoder=Os;exports.getEditMemberArgsCodec=WR;exports.getEditMemberArgsDecoder=Wn;exports.getEditMemberArgsEncoder=Un;exports.getEditTransactionManagerUrlDiscriminatorBytes=Ok;exports.getEditTransactionManagerUrlInstruction=Ti;exports.getEditTransactionManagerUrlInstructionDataCodec=Bk;exports.getEditTransactionManagerUrlInstructionDataDecoder=li;exports.getEditTransactionManagerUrlInstructionDataEncoder=yi;exports.getEditUserDelegateDiscriminatorBytes=Kk;exports.getEditUserDelegateInstruction=Ei;exports.getEditUserDelegateInstructionDataCodec=jk;exports.getEditUserDelegateInstructionDataDecoder=Ci;exports.getEditUserDelegateInstructionDataEncoder=Ii;exports.getExpectedSecp256r1SignersCodec=BR;exports.getExpectedSecp256r1SignersDecoder=Lt;exports.getExpectedSecp256r1SignersEncoder=kt;exports.getExtensionStructCodec=HR;exports.getExtensionStructDecoder=Wt;exports.getExtensionStructEncoder=Tn;exports.getGlobalCounterAddress=MA;exports.getGlobalCounterCodec=Mh;exports.getGlobalCounterDecoder=ho;exports.getGlobalCounterDiscriminatorBytes=Ph;exports.getGlobalCounterEncoder=wg;exports.getGlobalCounterSize=bh;exports.getJitoTipsConfig=Js;exports.getLightCpiSigner=_5;exports.getLightProtocolRpc=Me;exports.getLinkWalletArgsCodec=JR;exports.getLinkWalletArgsDecoder=Yn;exports.getLinkWalletArgsEncoder=qn;exports.getMemberCodec=XR;exports.getMemberDecoder=_t;exports.getMemberEncoder=bt;exports.getMemberKeyCodec=eb;exports.getMemberKeyDecoder=ce;exports.getMemberKeyEncoder=H;exports.getMigrateCompressedSettingsDiscriminatorBytes=eL;exports.getMigrateCompressedSettingsInstruction=bi;exports.getMigrateCompressedSettingsInstructionDataCodec=tL;exports.getMigrateCompressedSettingsInstructionDataDecoder=Ri;exports.getMigrateCompressedSettingsInstructionDataEncoder=hi;exports.getMigrateCompressedUsersDiscriminatorBytes=dL;exports.getMigrateCompressedUsersInstruction=Li;exports.getMigrateCompressedUsersInstructionDataCodec=uL;exports.getMigrateCompressedUsersInstructionDataDecoder=ki;exports.getMigrateCompressedUsersInstructionDataEncoder=Wi;exports.getMultiWalletErrorMessage=tw;exports.getNativeTransferIntentCompressedDiscriminatorBytes=RL;exports.getNativeTransferIntentCompressedInstruction=Ki;exports.getNativeTransferIntentCompressedInstructionDataCodec=bL;exports.getNativeTransferIntentCompressedInstructionDataDecoder=zi;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Gi;exports.getNativeTransferIntentDiscriminatorBytes=fL;exports.getNativeTransferIntentInstruction=wi;exports.getNativeTransferIntentInstructionAsync=xL;exports.getNativeTransferIntentInstructionDataCodec=SL;exports.getNativeTransferIntentInstructionDataDecoder=Ni;exports.getNativeTransferIntentInstructionDataEncoder=Bs;exports.getNewAuthorityArgsCodec=sb;exports.getNewAuthorityArgsDecoder=$n;exports.getNewAuthorityArgsEncoder=Qn;exports.getOriginIndex=f2;exports.getPackedAddressTreeInfoCodec=ab;exports.getPackedAddressTreeInfoDecoder=wt;exports.getPackedAddressTreeInfoEncoder=Nt;exports.getPackedMerkleContextCodec=ub;exports.getPackedMerkleContextDecoder=Sn;exports.getPackedMerkleContextEncoder=fn;exports.getPackedStateTreeInfoCodec=pb;exports.getPackedStateTreeInfoDecoder=Et;exports.getPackedStateTreeInfoEncoder=Ct;exports.getPausableAccountExtensionCodec=lb;exports.getPausableAccountExtensionDecoder=wn;exports.getPausableAccountExtensionEncoder=Nn;exports.getPermanentDelegateAccountExtensionCodec=Sb;exports.getPermanentDelegateAccountExtensionDecoder=Hn;exports.getPermanentDelegateAccountExtensionEncoder=Vn;exports.getPermissionsCodec=Cb;exports.getPermissionsDecoder=Ge;exports.getPermissionsEncoder=Fe;exports.getProofArgsCodec=Mb;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=_b;exports.getRemoveMemberArgsDecoder=Ln;exports.getRemoveMemberArgsEncoder=kn;exports.getRentConfigCodec=Wb;exports.getRentConfigDecoder=bn;exports.getRentConfigEncoder=Rn;exports.getSecp256r1MessageHash=Ys;exports.getSecp256r1PubkeyCodec=Ob;exports.getSecp256r1PubkeyDecoder=Vt;exports.getSecp256r1PubkeyEncoder=rs;exports.getSecp256r1SignatureOffsetsDataDecoder=jM;exports.getSecp256r1SignatureOffsetsDataEncoder=KM;exports.getSecp256r1VerifyArgsCodec=wb;exports.getSecp256r1VerifyArgsDecoder=G;exports.getSecp256r1VerifyArgsEncoder=F;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=Gb;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=ee;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=$;exports.getSecp256r1VerifyInstruction=V;exports.getSecp256r1VerifyInstructionDataCodec=CV;exports.getSecp256r1VerifyInstructionDataDecoder=BA;exports.getSecp256r1VerifyInstructionDataEncoder=NA;exports.getSendAndConfirmTransaction=Yu;exports.getSettingsCodec=dU;exports.getSettingsCreationArgsCodec=Jb;exports.getSettingsCreationArgsDecoder=Ft;exports.getSettingsCreationArgsEncoder=Ht;exports.getSettingsDecoder=br;exports.getSettingsDiscriminatorBytes=iU;exports.getSettingsEncoder=hT;exports.getSettingsFromIndex=ue;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=$b;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=cs;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=os;exports.getSettingsIndexWithAddressCodec=Zb;exports.getSettingsIndexWithAddressDecoder=ss;exports.getSettingsIndexWithAddressEncoder=ns;exports.getSettingsMutArgsCodec=n_;exports.getSettingsMutArgsDecoder=J;exports.getSettingsMutArgsEncoder=j;exports.getSettingsReadonlyArgsCodec=a_;exports.getSettingsReadonlyArgsDecoder=zt;exports.getSettingsReadonlyArgsEncoder=Gt;exports.getSignedSecp256r1Key=g2;exports.getSignedTransactionManager=u6;exports.getSolanaRpc=se;exports.getSolanaRpcEndpoint=qu;exports.getSplInterfacePdaArgsCodec=u_;exports.getSplInterfacePdaArgsDecoder=jt;exports.getSplInterfacePdaArgsEncoder=Kt;exports.getTokenMetadataCodec=m_;exports.getTokenMetadataDecoder=Gn;exports.getTokenMetadataEncoder=Fn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=JL;exports.getTokenTransferIntentCompressedInstruction=od;exports.getTokenTransferIntentCompressedInstructionAsync=YL;exports.getTokenTransferIntentCompressedInstructionDataCodec=qL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=sd;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Hs;exports.getTokenTransferIntentDiscriminatorBytes=BL;exports.getTokenTransferIntentInstruction=Xi;exports.getTokenTransferIntentInstructionAsync=wL;exports.getTokenTransferIntentInstructionDataCodec=NL;exports.getTokenTransferIntentInstructionDataDecoder=Zi;exports.getTokenTransferIntentInstructionDataEncoder=Vs;exports.getTransactionBufferAddress=hA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=gO;exports.getTransactionBufferCloseCompressedInstruction=Td;exports.getTransactionBufferCloseCompressedInstructionDataCodec=pO;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ld;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=yd;exports.getTransactionBufferCloseDiscriminatorBytes=nO;exports.getTransactionBufferCloseInstruction=Ad;exports.getTransactionBufferCloseInstructionDataCodec=sO;exports.getTransactionBufferCloseInstructionDataDecoder=ud;exports.getTransactionBufferCloseInstructionDataEncoder=dd;exports.getTransactionBufferCodec=lU;exports.getTransactionBufferCreateArgsCodec=f_;exports.getTransactionBufferCreateArgsDecoder=qt;exports.getTransactionBufferCreateArgsEncoder=Jt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=_O;exports.getTransactionBufferCreateCompressedInstruction=bd;exports.getTransactionBufferCreateCompressedInstructionDataCodec=vO;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=Rd;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=hd;exports.getTransactionBufferCreateDiscriminatorBytes=IO;exports.getTransactionBufferCreateInstruction=Ed;exports.getTransactionBufferCreateInstructionDataCodec=CO;exports.getTransactionBufferCreateInstructionDataDecoder=Cd;exports.getTransactionBufferCreateInstructionDataEncoder=Id;exports.getTransactionBufferDecoder=zc;exports.getTransactionBufferDiscriminatorBytes=yU;exports.getTransactionBufferEncoder=jT;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=qO;exports.getTransactionBufferExecuteCompressedInstruction=Hd;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=YO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Vd;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=wd;exports.getTransactionBufferExecuteDiscriminatorBytes=wO;exports.getTransactionBufferExecuteInstruction=Ld;exports.getTransactionBufferExecuteInstructionDataCodec=VO;exports.getTransactionBufferExecuteInstructionDataDecoder=kd;exports.getTransactionBufferExecuteInstructionDataEncoder=Wd;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=uB;exports.getTransactionBufferExtendCompressedInstruction=$d;exports.getTransactionBufferExtendCompressedInstructionDataCodec=AB;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Qd;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Xd;exports.getTransactionBufferExtendDiscriminatorBytes=rB;exports.getTransactionBufferExtendInstruction=Jd;exports.getTransactionBufferExtendInstructionDataCodec=nB;exports.getTransactionBufferExtendInstructionDataDecoder=jd;exports.getTransactionBufferExtendInstructionDataEncoder=Kd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=RB;exports.getTransactionBufferVoteCompressedInstruction=Au;exports.getTransactionBufferVoteCompressedInstructionDataCodec=bB;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=uu;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=du;exports.getTransactionBufferVoteDiscriminatorBytes=SB;exports.getTransactionBufferVoteInstruction=ou;exports.getTransactionBufferVoteInstructionDataCodec=xB;exports.getTransactionBufferVoteInstructionDataDecoder=su;exports.getTransactionBufferVoteInstructionDataEncoder=nu;exports.getTransactionExecuteCompressedDiscriminatorBytes=zB;exports.getTransactionExecuteCompressedInstruction=Eu;exports.getTransactionExecuteCompressedInstructionDataCodec=KB;exports.getTransactionExecuteCompressedInstructionDataDecoder=Cu;exports.getTransactionExecuteCompressedInstructionDataEncoder=Iu;exports.getTransactionExecuteDiscriminatorBytes=OB;exports.getTransactionExecuteInstruction=Tu;exports.getTransactionExecuteInstructionDataCodec=BB;exports.getTransactionExecuteInstructionDataDecoder=lu;exports.getTransactionExecuteInstructionDataEncoder=yu;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=iN;exports.getTransactionExecuteSyncCompressedInstruction=Lu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=dN;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=ku;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Wu;exports.getTransactionExecuteSyncDiscriminatorBytes=$B;exports.getTransactionExecuteSyncInstruction=bu;exports.getTransactionExecuteSyncInstructionDataCodec=eN;exports.getTransactionExecuteSyncInstructionDataDecoder=Ru;exports.getTransactionExecuteSyncInstructionDataEncoder=hu;exports.getTransactionMessageAddressTableLookupCodec=P_;exports.getTransactionMessageAddressTableLookupDecoder=ms;exports.getTransactionMessageAddressTableLookupEncoder=ps;exports.getTransactionMessageCodec=C_;exports.getTransactionMessageDecoder=Zt;exports.getTransactionMessageEncoder=Yt;exports.getTransferFeeAccountExtensionCodec=R_;exports.getTransferFeeAccountExtensionDecoder=Kn;exports.getTransferFeeAccountExtensionEncoder=zn;exports.getTransferHookAccountExtensionCodec=v_;exports.getTransferHookAccountExtensionDecoder=Jn;exports.getTransferHookAccountExtensionEncoder=jn;exports.getTransportsCodec=k_;exports.getTransportsDecoder=Qt;exports.getTransportsEncoder=Xt;exports.getUserAccountAddress=N;exports.getUserCodec=N_;exports.getUserCreationArgsCodec=F_;exports.getUserCreationArgsDecoder=Ie;exports.getUserCreationArgsEncoder=xe;exports.getUserDecoder=q;exports.getUserEncoder=et;exports.getUserMutArgsCodec=j_;exports.getUserMutArgsDecoder=rt;exports.getUserMutArgsEncoder=tt;exports.getUserReadOnlyArgsCodec=Z_;exports.getUserReadOnlyArgsDecoder=Bt;exports.getUserReadOnlyArgsEncoder=Ot;exports.getUserReadOnlyOrMutateArgsCodec=ev;exports.getUserReadOnlyOrMutateArgsDecoder=Ke;exports.getUserReadOnlyOrMutateArgsEncoder=ze;exports.getUserRoleCodec=ov;exports.getUserRoleDecoder=Ye;exports.getUserRoleEncoder=qe;exports.getWalletAddressFromIndex=b5;exports.getWalletAddressFromSettings=We;exports.getWhitelistedAddressTreeCodec=IU;exports.getWhitelistedAddressTreeDecoder=Zc;exports.getWhitelistedAddressTreeDiscriminatorBytes=xU;exports.getWhitelistedAddressTreeEncoder=pf;exports.getWhitelistedAddressTreeFromIndex=to;exports.getWhitelistedAddressTreeIndexFromAddress=T5;exports.getWhitelistedAddressTreesAddress=xA;exports.identifyMultiWalletAccount=qN;exports.identifyMultiWalletInstruction=YN;exports.initialize=Yw;exports.isConfigAction=PR;exports.isExtensionStruct=GR;exports.isMultiWalletError=rw;exports.isUserReadOnlyOrMutateArgs=rv;exports.migrateSettings=eV;exports.migrateUsers=aV;exports.nativeTransferIntent=JV;exports.parseAddWhitelistedAddressTreesInstruction=FU;exports.parseChangeConfigCompressedInstruction=aW;exports.parseChangeConfigInstruction=QU;exports.parseCreateCompressedWalletInstruction=TW;exports.parseCreateDomainConfigInstruction=hW;exports.parseCreateDomainUserAccountInstruction=BW;exports.parseCreateGlobalCounterInstruction=jW;exports.parseCreateUserAccountsInstruction=rk;exports.parseDecompressSettingsAccountInstruction=Ak;exports.parseDisableDomainConfigInstruction=Sk;exports.parseEditDomainConfigInstruction=bk;exports.parseEditTransactionManagerUrlInstruction=Nk;exports.parseEditUserDelegateInstruction=Jk;exports.parseMigrateCompressedSettingsInstruction=rL;exports.parseMigrateCompressedUsersInstruction=AL;exports.parseNativeTransferIntentCompressedInstruction=_L;exports.parseNativeTransferIntentInstruction=IL;exports.parseSecp256r1VerifyInstruction=EV;exports.parseTokenTransferIntentCompressedInstruction=ZL;exports.parseTokenTransferIntentInstruction=VL;exports.parseTransactionBufferCloseCompressedInstruction=mO;exports.parseTransactionBufferCloseInstruction=oO;exports.parseTransactionBufferCreateCompressedInstruction=UO;exports.parseTransactionBufferCreateInstruction=EO;exports.parseTransactionBufferExecuteCompressedInstruction=ZO;exports.parseTransactionBufferExecuteInstruction=HO;exports.parseTransactionBufferExtendCompressedInstruction=gB;exports.parseTransactionBufferExtendInstruction=sB;exports.parseTransactionBufferVoteCompressedInstruction=_B;exports.parseTransactionBufferVoteInstruction=IB;exports.parseTransactionExecuteCompressedInstruction=jB;exports.parseTransactionExecuteInstruction=NB;exports.parseTransactionExecuteSyncCompressedInstruction=uN;exports.parseTransactionExecuteSyncInstruction=tN;exports.pollJitoBundleConfirmation=H5;exports.prepareChangeConfigArgs=mF;exports.prepareTransactionBundle=CF;exports.prepareTransactionMessage=LF;exports.prepareTransactionSync=VF;exports.retrieveTransactionManager=d6;exports.sendJitoBundle=mM;exports.serializeConfigActions=A6;exports.signAndSendBundledTransactions=V5;exports.signAndSendTransaction=q5;exports.tokenTransferIntent=c8;exports.userReadOnlyOrMutateArgs=tv;exports.vaultTransactionMessageDeserialize=Ju;exports.vaultTransactionMessageSerialize=ju;exports.voteTransactionBuffer=QA;//# sourceMappingURL=index.cjs.map
|
|
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'),T=require('zod'),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 T__default=/*#__PURE__*/_interopDefault(T);var fo=new Uint8Array([201,232,212,229,59,241,106,197]);function lh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(fo)}function Eg(){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:fo}))}function So(){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 Th(){return gill.combineCodec(Eg(),So())}function xo(e){return gill.decodeAccount(e,So())}async function Io(e,n,r){let s=await Dg(e,n,r);return gill.assertAccountExists(s),s}async function Dg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return xo(s)}async function fh(e,n,r){let s=await Pg(e,n,r);return gill.assertAccountsExist(s),s}async function Pg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>xo(t))}function Sh(){return 846}var Do=new Uint8Array([42,206,176,58,175,129,130,233]);function Ch(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Do)}function wg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Do}))}function Po(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function Eh(){return gill.combineCodec(wg(),Po())}function Mo(e){return gill.decodeAccount(e,Po())}async function Dh(e,n,r){let s=await Vg(e,n,r);return gill.assertAccountExists(s),s}async function Vg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Mo(s)}async function Ph(e,n,r){let s=await Hg(e,n,r);return gill.assertAccountsExist(s),s}async function Hg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Mo(t))}function Mh(){return 24}function rn(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function nn(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function bh(){return gill.combineCodec(rn(),nn())}function sn(){return gill.getStructEncoder([["memberKey",F()],["permissions",we()],["userArgs",He()]])}function on(){return gill.getStructDecoder([["memberKey",se()],["permissions",Ve()],["userArgs",Fe()]])}function Wh(){return gill.combineCodec(sn(),on())}function cn(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function an(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Oh(){return gill.combineCodec(cn(),an())}function St(){return gill.getStructEncoder([["treeInfo",It()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function xt(){return gill.getStructDecoder([["treeInfo",Ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function Vh(){return gill.combineCodec(St(),xt())}function Et(){return gill.getStructEncoder([["treeInfo",It()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Dt(){return gill.getStructDecoder([["treeInfo",Ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function zh(){return gill.combineCodec(Et(),Dt())}function dn(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function un(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function Jh(){return gill.combineCodec(dn(),un())}function yn(){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 Zh(){return gill.combineCodec(yn(),ln())}function Pt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(Mt())]])}function j(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ht())]])}function eR(){return gill.combineCodec(Pt(),j())}function Mt(){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 ht(){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 sR(){return gill.combineCodec(Mt(),ht())}function _t(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",fn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(Tn()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function vt(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",Sn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Ut()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function iR(){return gill.combineCodec(_t(),vt())}function Cn(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",Dn()]])}function En(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Pn()]])}function gR(){return gill.combineCodec(Cn(),En())}function Dn(){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",Rn()]])}function Pn(){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",bn()]])}function lR(){return gill.combineCodec(Dn(),Pn())}function Ge(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Un())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(sn())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(kn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function ze(){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(Ln())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function xR(){return gill.combineCodec(Ge(),ze())}function IR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function CR(e,n){return n.__kind===e}function On(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ke()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",fe()]])}function Bn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",je()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Se()]])}function MR(){return gill.combineCodec(On(),Bn())}function Un(){return gill.getStructEncoder([["memberKey",F()],["permissions",we()]])}function Wn(){return gill.getStructDecoder([["memberKey",se()],["permissions",Ve()]])}function _R(){return gill.combineCodec(Un(),Wn())}function Wt(){return gill.getStructEncoder([["memberKey",F()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function kt(){return gill.getStructDecoder([["memberKey",se()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function kR(){return gill.combineCodec(Wt(),kt())}function Tn(){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([Fn()])]])],["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([Nn()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Vn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([zn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([jn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([dn()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([Cn()])]])]])}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([Gn()])]])],["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([wn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Hn()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Kn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Jn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([un()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([En()])]])]])}function NR(){return gill.combineCodec(Tn(),Ut())}function wR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function VR(e,n){return n.__kind===e}function qn(){return gill.getStructEncoder([["settingsMutArgs",J()],["transactionManager",gill.getOptionEncoder(Lt())]])}function Yn(){return gill.getStructDecoder([["settingsMutArgs",q()],["transactionManager",gill.getOptionDecoder(Ot())]])}function zR(){return gill.combineCodec(qn(),Yn())}function Rt(){return gill.getStructEncoder([["pubkey",F()],["role",gill.getU8Encoder()],["permissions",we()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function bt(){return gill.getStructDecoder([["pubkey",se()],["role",gill.getU8Decoder()],["permissions",Ve()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function qR(){return gill.combineCodec(Rt(),bt())}function F(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function se(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function XR(){return gill.combineCodec(F(),se())}function Qn(){return gill.getStructEncoder([["authorityCreationArgs",fe()],["compressedProofArgs",I()]])}function $n(){return gill.getStructDecoder([["authorityCreationArgs",Se()],["compressedProofArgs",C()]])}function tb(){return gill.combineCodec(Qn(),$n())}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 sb(){return gill.combineCodec(Bt(),Nt())}function fn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function Sn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function ab(){return gill.combineCodec(fn(),Sn())}function It(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Ct(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function ub(){return gill.combineCodec(It(),Ct())}function Nn(){return gill.getStructEncoder([])}function wn(){return gill.getStructDecoder([])}function pb(){return gill.combineCodec(Nn(),wn())}function Vn(){return gill.getStructEncoder([])}function Hn(){return gill.getStructDecoder([])}function lb(){return gill.combineCodec(Vn(),Hn())}function we(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Ve(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function Sb(){return gill.combineCodec(we(),Ve())}function I(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(yn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function C(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(ln())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function Eb(){return gill.combineCodec(I(),C())}function kn(){return gill.getStructEncoder([["memberKey",F()],["userArgs",He()]])}function Ln(){return gill.getStructDecoder([["memberKey",se()],["userArgs",Fe()]])}function hb(){return gill.combineCodec(kn(),Ln())}function Rn(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function bn(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function _b(){return gill.combineCodec(Rn(),bn())}function rs(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function wt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function Wb(){return gill.combineCodec(rs(),wt())}function G(){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 z(){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 Ob(){return gill.combineCodec(G(),z())}function Q(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",G()]])}function $(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",z()]])}function Vb(){return gill.combineCodec(Q(),$())}function Vt(){return gill.getStructEncoder([["addressTreeInfo",Bt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ht(){return gill.getStructDecoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function zb(){return gill.combineCodec(Vt(),Ht())}function ns(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ss(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function Jb(){return gill.combineCodec(ns(),ss())}function os(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function cs(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function Zb(){return gill.combineCodec(os(),cs())}function J(){return gill.getStructEncoder([["accountMeta",St()],["data",Pt()]])}function q(){return gill.getStructDecoder([["accountMeta",xt()],["data",j()]])}function e_(){return gill.combineCodec(J(),q())}function Ft(){return gill.getStructEncoder([["accountMeta",Et()],["data",Pt()]])}function Gt(){return gill.getStructDecoder([["accountMeta",Dt()],["data",j()]])}function s_(){return gill.combineCodec(Ft(),Gt())}function zt(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function Kt(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function a_(){return gill.combineCodec(zt(),Kt())}function Fn(){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(rn())]])}function Gn(){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(nn())]])}function A_(){return gill.combineCodec(Fn(),Gn())}function jt(){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()],["expectedSecp256r1Signers",gill.getArrayEncoder(Wt())]])}function Jt(){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()],["expectedSecp256r1Signers",gill.getArrayDecoder(kt())]])}function y_(){return gill.combineCodec(jt(),Jt())}function qt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(cn())],["addressTableLookups",gill.getArrayEncoder(ps())]])}function Yt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(an())],["addressTableLookups",gill.getArrayDecoder(ms())]])}function S_(){return gill.combineCodec(qt(),Yt())}function ps(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function ms(){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(ps(),ms())}function zn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function Kn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function P_(){return gill.combineCodec(zn(),Kn())}function jn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function Jn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function R_(){return gill.combineCodec(jn(),Jn())}var ys=(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))(ys||{});function Zt(){return gill.getEnumEncoder(ys)}function Xt(){return gill.getEnumDecoder(ys)}function v_(){return gill.combineCodec(Zt(),Xt())}function Xe(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",F()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Zt()))],["wallets",gill.getArrayEncoder(os())],["role",Ke()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function Y(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",se()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(Xt()))],["wallets",gill.getArrayDecoder(cs())],["role",je()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function L_(){return gill.combineCodec(Xe(),Y())}function fe(){return gill.getStructEncoder([["addressTreeInfo",Bt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Se(){return gill.getStructDecoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function w_(){return gill.combineCodec(fe(),Se())}function Qe(){return gill.getStructEncoder([["accountMeta",St()],["data",Xe()]])}function $e(){return gill.getStructDecoder([["accountMeta",xt()],["data",Y()]])}function G_(){return gill.combineCodec(Qe(),$e())}function Lt(){return gill.getStructEncoder([["accountMeta",Et()],["data",Xe()]])}function Ot(){return gill.getStructDecoder([["accountMeta",Dt()],["data",Y()]])}function J_(){return gill.combineCodec(Lt(),Ot())}function He(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Lt()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Qe()])]])]])}function Fe(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Ot()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([$e()])]])]])}function X_(){return gill.combineCodec(He(),Fe())}function Q_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function $_(e,n){return n.__kind===e}var Le=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(Le||{});function Ke(){return gill.getEnumEncoder(Le)}function je(){return gill.getEnumDecoder(Le)}function rv(){return gill.combineCodec(Ke(),je())}var Lc=new Uint8Array([223,179,163,190,177,224,67,173]);function oU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Lc)}function h1(){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:Lc}))}function Rr(){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 cU(){return gill.combineCodec(h1(),Rr())}function Oc(e){return gill.decodeAccount(e,Rr())}async function aU(e,n,r){let s=await ls(e,n,r);return gill.assertAccountExists(s),s}async function ls(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Oc(s)}async function iU(e,n,r){let s=await R1(e,n,r);return gill.assertAccountsExist(s),s}async function R1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Oc(t))}var Hc=new Uint8Array([90,36,35,219,93,225,110,96]);function gU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hc)}function j1(){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",F()],["executor",F()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(F())],["expectedSecp256r1Signers",gill.getArrayEncoder(Wt())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Hc}))}function Fc(){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",se()],["executor",se()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(se())],["expectedSecp256r1Signers",gill.getArrayDecoder(kt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function pU(){return gill.combineCodec(j1(),Fc())}function Gc(e){return gill.decodeAccount(e,Fc())}async function zc(e,n,r){let s=await J1(e,n,r);return gill.assertAccountExists(s),s}async function J1(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gc(s)}async function mU(e,n,r){let s=await q1(e,n,r);return gill.assertAccountsExist(s),s}async function q1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gc(t))}var Jc=new Uint8Array([105,23,173,2,197,255,80,87]);function TU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Jc)}function pf(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Jc}))}function qc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function fU(){return gill.combineCodec(pf(),qc())}function Yc(e){return gill.decodeAccount(e,qc())}async function Zc(e,n,r){let s=await mf(e,n,r);return gill.assertAccountExists(s),s}async function mf(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Yc(s)}async function SU(e,n,r){let s=await yf(e,n,r);return gill.assertAccountsExist(s),s}async function yf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Yc(t))}function y({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 l(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:O(r.value),role:Xc(r.value)?gill.upgradeRoleToSigner(s):s,...Xc(r.value)?{signer:r.value}:{}})}}function Xc(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var $c=new Uint8Array([8]);function OU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($c)}function Ds(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:$c}))}function ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function BU(){return gill.combineCodec(Ds(),ea())}async function ta(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Ds().encode(c),programAddress:r})}function NU(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Ds().encode(c),programAddress:r})}function wU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:ea().decode(e.data)}}var ca=new Uint8Array([9]);function jU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ca)}function aa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["compressedProofArgs",gill.getOptionEncoder(I())]]),e=>({...e,discriminator:ca}))}function ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder($())],["compressedProofArgs",gill.getOptionDecoder(C())]])}function JU(){return gill.combineCodec(aa(),ia())}function da(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:aa().encode(c),programAddress:r})}function qU(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ia().decode(e.data)}}var ma=new Uint8Array([19]);function tW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ma)}function ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:ma}))}function la(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder($())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function rW(){return gill.combineCodec(ya(),la())}function Ta(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ya().encode(c),programAddress:r})}function nW(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:la().decode(e.data)}}var xa=new Uint8Array([18]);function uW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xa)}function Ps(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",I()],["settingsCreation",Vt()],["userArgs",He()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:xa}))}function Ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",C()],["settingsCreation",Ht()],["userArgs",Fe()],["settingsIndex",gill.getU128Decoder()]])}function AW(){return gill.combineCodec(Ps(),Ia())}async function Ca(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:Ps().encode(c),programAddress:r})}function gW(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:Ps().encode(c),programAddress:r})}function pW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Ia().decode(e.data)}}var _a=new Uint8Array([0]);function xW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_a)}function hs(){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",fe()],["compressedProofArgs",I()]]),e=>({...e,discriminator:_a}))}function va(){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",Se()],["compressedProofArgs",C()]])}function IW(){return gill.combineCodec(hs(),va())}async function Ua(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:hs().encode(c),programAddress:r})}function CW(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:hs().encode(c),programAddress:r})}function EW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:va().decode(e.data)}}var La=new Uint8Array([4]);function _W(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(La)}function Rs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",I()],["member",rs()],["role",Ke()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Zt())],["userAccountCreationArgs",fe()],["linkWalletArgs",gill.getOptionEncoder(qn())]]),e=>({...e,discriminator:La}))}function Oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",C()],["member",wt()],["role",je()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(Xt())],["userAccountCreationArgs",Se()],["linkWalletArgs",gill.getOptionDecoder(Yn())]])}function vW(){return gill.combineCodec(Rs(),Oa())}async function Ba(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:Rs().encode(c),programAddress:r})}function UW(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=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:Rs().encode(c),programAddress:r})}function WW(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:Oa().decode(e.data)}}var wa=new Uint8Array([3]);function wW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wa)}function _s(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:wa}))}function Va(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function VW(){return gill.combineCodec(_s(),Va())}async function Ha(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=y(c),a=l(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:_s().encode({}),programAddress:r})}function HW(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=y(c),a=l(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:_s().encode({}),programAddress:r})}function FW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:Va().decode(e.data)}}var Ga=new Uint8Array([5]);function YW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function Us(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",I()],["createUserArgs",gill.getArrayEncoder(On())]]),e=>({...e,discriminator:Ga}))}function za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayDecoder(Bn())]])}function ZW(){return gill.combineCodec(Us(),za())}async function Ka(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Us().encode(c),programAddress:r})}function XW(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Us().encode(c),programAddress:r})}function QW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:za().decode(e.data)}}var qa=new Uint8Array([17]);function ok(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qa)}function Ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",J()],["compressedProofArgs",I()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:qa}))}function Za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",q()],["compressedProofArgs",C()],["secp256r1VerifyArgs",gill.getArrayDecoder($())]])}function ck(){return gill.combineCodec(Ya(),Za())}function Xa(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ya().encode(c),programAddress:r})}function ak(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Za().decode(e.data)}}var ei=new Uint8Array([2]);function pk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ei)}function ti(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:ei}))}function ri(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function mk(){return gill.combineCodec(ti(),ri())}function ni(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=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:ti().encode(c),programAddress:r})}function yk(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:ri().decode(e.data)}}var ai=new Uint8Array([1]);function Ck(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ai)}function ks(){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(Qn())]]),e=>({...e,discriminator:ai}))}function ii(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder($n())]])}function Ek(){return gill.combineCodec(ks(),ii())}async function Dk(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:ks().encode(c),programAddress:r})}function di(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:ks().encode(c),programAddress:r})}function Pk(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:ii().decode(e.data)}}var gi=new Uint8Array([6]);function Uk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gi)}function pi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Qe()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",I()]]),e=>({...e,discriminator:gi}))}function mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",$e()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",C()]])}function Wk(){return gill.combineCodec(pi(),mi())}function yi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.authority),...a],data:pi().encode(c),programAddress:r})}function kk(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:mi().decode(e.data)}}var fi=new Uint8Array([7]);function Hk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fi)}function Si(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Qe()],["secp256r1VerifyArgs",gill.getOptionEncoder(G())],["delegateTo",gill.getOptionEncoder(ns())],["oldSettingsMutArgs",gill.getOptionEncoder(J())],["newSettingsMutArgs",gill.getOptionEncoder(J())],["compressedProofArgs",I()]]),e=>({...e,discriminator:fi}))}function xi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",$e()],["secp256r1VerifyArgs",gill.getOptionDecoder(z())],["delegateTo",gill.getOptionDecoder(ss())],["oldSettingsMutArgs",gill.getOptionDecoder(q())],["newSettingsMutArgs",gill.getOptionDecoder(q())],["compressedProofArgs",C()]])}function Fk(){return gill.combineCodec(Si(),xi())}function Ii(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...a],data:Si().encode(c),programAddress:r})}function Gk(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:xi().decode(e.data)}}var Di=new Uint8Array([32]);function Zk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Di)}function Pi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Mt()],["compressedProofArgs",I()],["settingsCreationArgs",Vt()]]),e=>({...e,discriminator:Di}))}function Mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ht()],["compressedProofArgs",C()],["settingsCreationArgs",Ht()]])}function Xk(){return gill.combineCodec(Pi(),Mi())}function hi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=y(i),o=l(r);return Object.freeze({accounts:[o(t.authority),...a],data:Pi().encode(c),programAddress:r})}function Qk(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:Mi().decode(e.data)}}var _i=new Uint8Array([31]);function oL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_i)}function vi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Xe()],["compressedProofArgs",I()],["userCreationArgs",fe()]]),e=>({...e,discriminator:_i}))}function Ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Y()],["compressedProofArgs",C()],["userCreationArgs",Se()]])}function cL(){return gill.combineCodec(vi(),Ui())}function Wi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=y(i),o=l(r);return Object.freeze({accounts:[o(t.authority),...a],data:vi().encode(c),programAddress:r})}function aL(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:Ui().decode(e.data)}}var Li=new Uint8Array([29]);function mL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Li)}function Ls(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Li}))}function Oi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder($())]])}function yL(){return gill.combineCodec(Ls(),Oi())}async function lL(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Ls().encode(c),programAddress:r})}function Bi(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Ls().encode(c),programAddress:r})}function TL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Oi().decode(e.data)}}var Vi=new Uint8Array([27]);function DL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vi)}function Hi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:Vi}))}function Fi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder($())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function PL(){return gill.combineCodec(Hi(),Fi())}function Gi(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:Hi().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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Fi().decode(e.data)}}var Ji=new Uint8Array([30]);function WL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ji)}function Ns(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(zt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(_t()))],["compressedProofArgs",gill.getOptionEncoder(I())],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Ji}))}function qi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Kt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(vt()))],["compressedProofArgs",gill.getOptionDecoder(C())],["secp256r1VerifyArgs",gill.getArrayDecoder($())]])}function kL(){return gill.combineCodec(Ns(),qi())}async function LL(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Ns().encode(c),programAddress:r})}function Yi(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Ns().encode(c),programAddress:r})}function OL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:qi().decode(e.data)}}var td=new Uint8Array([28]);function GL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(td)}function ws(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(zt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(_t()))],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:td}))}function rd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Kt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(vt()))],["secp256r1VerifyArgs",gill.getArrayDecoder($())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function zL(){return gill.combineCodec(ws(),rd())}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},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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:ws().encode(c),programAddress:r})}function nd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:ws().encode(c),programAddress:r})}function jL(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:rd().decode(e.data)}}var cd=new Uint8Array([13]);function $L(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(cd)}function ad(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())]]),e=>({...e,discriminator:cd}))}function id(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())]])}function eO(){return gill.combineCodec(ad(),id())}function dd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ad().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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:id().decode(e.data)}}var gd=new Uint8Array([23]);function iO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gd)}function pd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:gd}))}function md(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function dO(){return gill.combineCodec(pd(),md())}function yd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:pd().encode(c),programAddress:r})}function uO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:md().decode(e.data)}}var fd=new Uint8Array([10]);function TO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fd)}function Sd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",jt()],["secp256r1VerifyArgs",gill.getOptionEncoder(G())]]),e=>({...e,discriminator:fd}))}function xd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Jt()],["secp256r1VerifyArgs",gill.getOptionDecoder(z())]])}function fO(){return gill.combineCodec(Sd(),xd())}function Id(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Sd().encode(c),programAddress:r})}function SO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:xd().decode(e.data)}}var Dd=new Uint8Array([20]);function MO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Dd)}function Pd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",jt()],["secp256r1VerifyArgs",gill.getOptionEncoder(G())],["settingsReadonlyArgs",Ft()],["compressedProofArgs",I()]]),e=>({...e,discriminator:Dd}))}function Md(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Jt()],["secp256r1VerifyArgs",gill.getOptionDecoder(z())],["settingsReadonlyArgs",Gt()],["compressedProofArgs",C()]])}function hO(){return gill.combineCodec(Pd(),Md())}function hd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Pd().encode(c),programAddress:r})}function RO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Md().decode(e.data)}}var _d=new Uint8Array([14]);function LO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_d)}function vd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())]]),e=>({...e,discriminator:_d}))}function Ud(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())]])}function OO(){return gill.combineCodec(vd(),Ud())}function Wd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:vd().encode(c),programAddress:r})}function BO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ud().decode(e.data)}}var Od=new Uint8Array([24]);function zO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Od)}function Bd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:Od}))}function Nd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function KO(){return gill.combineCodec(Bd(),Nd())}function wd(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Bd().encode(c),programAddress:r})}function jO(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Nd().decode(e.data)}}var Fd=new Uint8Array([12]);function QO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fd)}function Gd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Fd}))}function zd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function $O(){return gill.combineCodec(Gd(),zd())}function Kd(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=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:Gd().encode(c),programAddress:r})}function eB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:zd().decode(e.data)}}var qd=new Uint8Array([22]);function cB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qd)}function Yd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:qd}))}function Zd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function aB(){return gill.combineCodec(Yd(),Zd())}function Xd(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Yd().encode(c),programAddress:r})}function iB(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:Zd().decode(e.data)}}var eu=new Uint8Array([11]);function yB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(eu)}function tu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())]]),e=>({...e,discriminator:eu}))}function ru(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())]])}function lB(){return gill.combineCodec(tu(),ru())}function nu(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:tu().encode(c),programAddress:r})}function TB(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ru().decode(e.data)}}var cu=new Uint8Array([21]);function DB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(cu)}function au(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(G())],["settingsReadonlyArgs",Ft()],["compressedProofArgs",I()]]),e=>({...e,discriminator:cu}))}function iu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(z())],["settingsReadonlyArgs",Gt()],["compressedProofArgs",C()]])}function PB(){return gill.combineCodec(au(),iu())}function du(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:au().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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:iu().decode(e.data)}}var gu=new Uint8Array([15]);function UB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gu)}function pu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:gu}))}function mu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function WB(){return gill.combineCodec(pu(),mu())}function yu(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=y({}),a=l(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:pu().encode({}),programAddress:r})}function kB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:mu().decode(e.data)}}var fu=new Uint8Array([25]);function VB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fu)}function Su(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:fu}))}function xu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function HB(){return gill.combineCodec(Su(),xu())}function Iu(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=y({args:c}),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:Su().encode(c),programAddress:r})}function FB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:xu().decode(e.data)}}var Du=new Uint8Array([16]);function YB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Du)}function Pu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",qt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Du}))}function Mu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Yt()],["secp256r1VerifyArgs",gill.getArrayDecoder($())]])}function ZB(){return gill.combineCodec(Pu(),Mu())}function hu(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Pu().encode(c),programAddress:r})}function XB(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Mu().decode(e.data)}}var _u=new Uint8Array([26]);function sN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_u)}function vu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",qt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsMutArgs",J()],["compressedProofArgs",I()]]),e=>({...e,discriminator:_u}))}function Uu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Yt()],["secp256r1VerifyArgs",gill.getArrayDecoder($())],["settingsMutArgs",q()],["compressedProofArgs",C()]])}function oN(){return gill.combineCodec(vu(),Uu())}function Wu(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=y(i),o=l(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:vu().encode(c),programAddress:r})}function cN(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},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Uu().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",vE=(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))(vE||{});function zN(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 UE=(m=>(m[m.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",m[m.ChangeConfig=1]="ChangeConfig",m[m.ChangeConfigCompressed=2]="ChangeConfigCompressed",m[m.CreateCompressedWallet=3]="CreateCompressedWallet",m[m.CreateDomainConfig=4]="CreateDomainConfig",m[m.CreateDomainUserAccount=5]="CreateDomainUserAccount",m[m.CreateGlobalCounter=6]="CreateGlobalCounter",m[m.CreateUserAccounts=7]="CreateUserAccounts",m[m.DecompressSettingsAccount=8]="DecompressSettingsAccount",m[m.DisableDomainConfig=9]="DisableDomainConfig",m[m.EditDomainConfig=10]="EditDomainConfig",m[m.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",m[m.EditUserDelegate=12]="EditUserDelegate",m[m.MigrateCompressedSettings=13]="MigrateCompressedSettings",m[m.MigrateCompressedUsers=14]="MigrateCompressedUsers",m[m.NativeTransferIntent=15]="NativeTransferIntent",m[m.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",m[m.TokenTransferIntent=17]="TokenTransferIntent",m[m.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",m[m.TransactionBufferClose=19]="TransactionBufferClose",m[m.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",m[m.TransactionBufferCreate=21]="TransactionBufferCreate",m[m.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",m[m.TransactionBufferExecute=23]="TransactionBufferExecute",m[m.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",m[m.TransactionBufferExtend=25]="TransactionBufferExtend",m[m.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",m[m.TransactionBufferVote=27]="TransactionBufferVote",m[m.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",m[m.TransactionExecute=29]="TransactionExecute",m[m.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",m[m.TransactionExecuteSync=31]="TransactionExecuteSync",m[m.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",m))(UE||{});function KN(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([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var kE=6e3,LE=6001,OE=6002,BE=6003,NE=6004,wE=6005,VE=6006,HE=6007,FE=6008,GE=6009,zE=6010,KE=6011,jE=6012,JE=6013,qE=6014,YE=6015,ZE=6016,XE=6017,QE=6018,$E=6019,eD=6020,tD=6021,rD=6022,nD=6023,sD=6024,oD=6025,cD=6026,aD=6027,iD=6028,dD=6029,uD=6030,AD=6031,gD=6032,pD=6033,mD=6034,yD=6035,lD=6036,TD=6037,fD=6038,SD=6039,xD=6040,ID=6041,CD=6042,ED=6043,DD=6044,PD=6045,MD=6046,hD=6047,RD=6048,bD=6049,_D=6050,vD=6051,UD=6052,WD=6053,kD=6054,LD=6055,OD=6056,BD=6057,ND=6058,wD=6059,VD=6060,HD=6061,FD=6062,GD=6063,zD=6064,KD=6065,jD=6066,JD=6067,qD=6068,YD=6069,ZD=6070,XD=6071,QD=6072,$D=6073,eP=6074,tP=6075,rP=6076,nP=6077,sP=6078,oP=6079,cP=6080,aP=6081,iP=6082,dP=6083,uP=6084,AP=6085,gP=6086,ku;process.env.NODE_ENV!=="production"&&(ku={[AD]:"This member is already delegated to another wallet.",[HE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[nP]:"Clock sysvar access failed. This may indicate a system error.",[vD]:"Missing credential id.",[WD]:"The domain configuration account is disabled. Please contact support or try again later.",[kD]:"Missing domain configuration account.",[tP]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[gP]:"Duplicate address tree detected. This address tree is already in the whitelist.",[zE]:"Duplicate public keys detected among members. Each member must have a unique key.",[GE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[tD]:"No members provided. A multisig wallet must contain at least one member.",[VD]:"Slot numbers list is empty. At least one slot number is required for validation.",[QE]:"Expected a User with Administrator role for this instruction.",[FE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[ZE]:"Expected a User with Transaction Manager role for this instruction.",[xD]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[ID]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[CD]:"Declared buffer size does not match the actual serialized size.",[wD]:"Failed to compute hash. This may indicate a system error.",[mD]:"Not enough members with vote permission to meet the approval threshold.",[gD]:"At least one signer with execute permission is required to proceed.",[pD]:"At least one signer with initiate permission is required to perform this action.",[cD]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[eP]:"Invalid account index in transaction message. The account index is out of bounds.",[BD]:"Address Tree supplied is not part of the whitelisted address trees.",[$E]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[iD]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[SD]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[HD]:"Member key conversion failed. The provided key format is invalid.",[yD]:"Only delegated members are allowed for this transaction.",[oD]:"Unexpected number of accounts provided for this instruction.",[JE]:"User with Permanent Member role must have a delegated wallet.",[LE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[NE]:"The extracted public key has an invalid length or encoding.",[kE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[BE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[_D]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[RD]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[nD]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[XD]:"Invalid source type for token transfer. The source account type is not supported.",[XE]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[YE]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[sD]:"Malformed transaction message: structure or formatting does not match the expected layout.",[cP]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[aD]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[oP]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[ZD]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[wE]:"The extracted WebAuthn signed message payload is malformed.",[MD]:"An input string exceeds the maximum allowed character length.",[LD]:"This member is not registered under the provided domain configuration.",[zD]:"Member not found in settings. Cannot remove a member that does not exist.",[$D]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[dD]:"A required account is missing from the instruction context.",[FD]:"Compressed proof arguments are missing. Required for compressed account operations.",[JD]:"Missing compressed token account. Required for token transfer operations.",[aP]:"Missing destination token account. Required for token transfer operations.",[YD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[GD]:"Light CPI accounts are missing. Required for compressed account operations.",[uD]:"User mutation arguments are required when performing add or remove delegate operations.",[uP]:"Missing new authority account. Required for domain configuration updates.",[dP]:"Missing settings account. Required for delegate operations on compressed wallets.",[ND]:"Compressed settings data is missing. The settings account must be initialized with data.",[iP]:"Missing source token account. Required for token transfer operations.",[qD]:"Missing SPL interface PDA. Required for token transfer operations.",[hD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[rP]:"User account address is missing. Required for secp256r1 signature verification.",[AP]:"Missing whitelisted address trees account. Required for domain configuration updates.",[TD]:"No valid signer found in this transaction.",[eD]:"Only one administrator is allowed per wallet.",[jE]:"Only one permanent member is allowed per wallet.",[qE]:"Only one transaction manager is allowed per wallet.",[OD]:"The given origin index is not in the whitelisted origins.",[jD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[KE]:"Permanent members cannot be removed from a wallet.",[PD]:"Writable CPI calls to protected accounts are not permitted.",[VE]:"The rpIdHash extracted from the signed message does not match the expected value.",[KD]:"Settings key mismatch. The provided settings key does not match the expected value.",[OE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[bD]:"The specified slot number was not found in the provided slot history.",[QD]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[rD]:"Too many members: a maximum of 4 members are supported.",[ED]:"This transaction has expired. It must be executed within 3 minutes of approval.",[DD]:"This transaction has not yet reached the required approval threshold.",[UD]:"Missing transports.",[fD]:"Only the transaction creator or rent payer may close this transaction buffer.",[sP]:"Unauthorized: Only the admin account is allowed to perform this action.",[lD]:"Member is not part of the expected signers for this transaction."});function XN(e){return process.env.NODE_ENV!=="production"?ku[e]:"Error message not available in production bundles."}function QN(e,n,r){return gill.isProgramError(e,n,A,r)}async function dw({admin:e,addressTree:n}){return ta({payer:e,addressTree:n,remainingAccounts:[]})}var Fs=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Lu="https://mainnet.block-engine.jito.wtf/api/v1",Ou="https://bundles.jito.wtf/api/v1/bundles/tip_floor",Bu="landed_tips_75th_percentile";var _e=class extends Error{constructor(r,s,t){super(r);this.code=s;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},et=class extends _e{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},re=class extends _e{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},K=class extends _e{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},Ee=class extends _e{constructor(r,s,t){super(r,"NETWORK_ERROR",{statusCode:s,url:t});this.statusCode=s;this.url=t;}};var pe=class extends _e{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},Nr=class extends _e{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},wr=class extends _e{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var er={Ed25519:1,Secp256r1:2};var Nu=T__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),Tw=T__default.default.object({transactionActionType:Nu,transactionAddress:T__default.default.string(),transactionMessageBytes:T__default.default.array(T__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),pP=T__default.default.object({transactionActionType:Nu,transactionAddress:T__default.default.string(),transactionMessageBytes:T__default.default.base64()}).strict(),wu=T__default.default.object({phase:T__default.default.literal("start"),redirectOrigin:T__default.default.url(),signer:T__default.default.string().optional(),rid:T__default.default.string(),validTill:T__default.default.number(),data:T__default.default.object({type:T__default.default.literal("message"),payload:T__default.default.string()}).strict()}).strict(),Vu=T__default.default.object({phase:T__default.default.literal("start"),redirectOrigin:T__default.default.url(),signer:T__default.default.string().optional(),rid:T__default.default.string(),validTill:T__default.default.number(),data:T__default.default.object({type:T__default.default.literal("transaction"),payload:pP,sendTx:T__default.default.boolean()}).strict()}).strict(),Hu=T__default.default.object({startRequest:T__default.default.union([wu,Vu]),authResponse:T__default.default.custom(),client:T__default.default.object({clientOrigin:T__default.default.url(),jws:T__default.default.string()}).strict(),device:T__default.default.object({jwk:T__default.default.base64(),jws:T__default.default.string()}).strict(),authProvider:T__default.default.object({jwk:T__default.default.base64(),jws:T__default.default.string()}).strict().optional()}).strict(),Fu=T__default.default.object({signer:T__default.default.string(),userAddressTreeIndex:T__default.default.number().optional(),additionalInfo:T__default.default.looseObject({}).optional()}).strict(),mP=T__default.default.object({slotHash:T__default.default.string(),slotNumber:T__default.default.string(),originIndex:T__default.default.number(),crossOrigin:T__default.default.boolean()}).strict(),fw=T__default.default.object({phase:T__default.default.literal("complete"),data:T__default.default.object({type:T__default.default.literal("message"),payload:Fu.extend(Hu.shape).extend({id:T__default.default.string().optional(),client:T__default.default.object({clientOrigin:T__default.default.url()}).strict()})}).strict()}).strict(),Sw=T__default.default.object({phase:T__default.default.literal("complete"),data:T__default.default.object({type:T__default.default.literal("transaction"),payload:Fu.extend(Hu.shape).extend(mP.shape).extend({client:T__default.default.object({clientOrigin:T__default.default.url()}).strict()})}).strict()}).strict(),xw=T__default.default.object({phase:T__default.default.literal("complete"),data:T__default.default.object({type:T__default.default.literal("transaction"),payload:T__default.default.object({startRequest:T__default.default.union([Vu,wu]),txSig:T__default.default.string()})}).strict()}).strict();var ve={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Oe=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,s)=>r|s,0))}static all(){return new e(Object.values(ve).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Gs=33,Be=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!==Gs)throw new Error(`Invalid public key length, expected ${Gs} 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===Gs)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()}},P=class extends Be{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 TP(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function fP(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var zu=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(TP())],["addressTableLookups",gill.getArrayCodec(fP())]]);function Ku(e){return zu.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 ju(e){let n=zu.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 de={};function Ju(){if(!de.solanaRpcEndpoint)throw new et("RPC endpoint");return de.solanaRpcEndpoint}function De(){if(!de.lightProtocolRpc)throw new et("Light Protocol RPC");return de.lightProtocolRpc}function ee(){if(!de.solanaRpc)throw new et("Solana RPC");return de.solanaRpc}function qu(){if(!de.sendAndConfirm)throw new et("Send and confirm transaction function");return de.sendAndConfirm}function Ks(){return de.jitoTipsConfig?de.jitoTipsConfig:{blockEngineUrl:Lu,getJitoTipsUrl:Ou,priority:Bu}}function Gw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){de.solanaRpcEndpoint=e,de.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});de.solanaRpc=t,de.sendAndConfirm=c,de.jitoTipsConfig=s??null;}async function tr(e,n){if(!e.ok)throw new Ee(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function rr(e){try{return await e.json()}catch(n){throw new Ee(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function s2(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 o2(e){let r=nist_js.p256.Point.fromBytes(gill.getBase58Encoder().encode(e)).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function c2(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=Ie(n),c=JSON.parse(gill.getUtf8Decoder().decode(Ie(r))),i=Qu(c),a=eA(Ie(s)),o=await ut({rpIdHash:t.subarray(0,32)});return new P(e.signer.toString(),{verifyArgs:{clientDataJson:Ie(r),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:js(e.client.clientOrigin,e.device.jwk,e.startRequest.rid),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function js(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 i2(e){return Js(e.data.payload.authResponse)}function d2(e,n,r,s){let t=js(n,r,s);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function u2(e,n,r,s,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 re("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),o=js(n,r,s),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...a,...i,...o]));return {slotNumber:c,slotHash:t,challenge:d}}function Js(e){let n=Fr(e);return sha2_js.sha256(n)}function A2(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ie(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),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 g2(e,n){let{data:r}=await Io(ee(),e),t=$u(r.origins,r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new re("Origin","Origin not found in domain config");return t}function p2(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function m2(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 RP(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 Qu(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 s=JSON.stringify(r);return new TextEncoder().encode(s.slice(1,-1))}function $u(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function eA(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 s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,u=o[0]===0&&o.length>32?o.slice(1):o;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)),E=(f>p?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=RP(E);return new Uint8Array([...g,...x])}function Fr(e){let n=Ie(e.response.clientDataJSON),r=Ie(e.response.authenticatorData),s=sha2_js.sha256(n);return new Uint8Array([...r,...s])}var kP={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true,initialDelayMs:500,maxRetries:3};function LP(e,n,r,s){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function OP(e){return new Promise(n=>setTimeout(n,e))}async function or(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t,maxDelayMs:c,shouldRetry:i}={...kP,...n},a;for(let o=1;o<=r;o++)try{return await e()}catch(d){if(a=d,i&&!i(d,o))throw d;if(o>=r)break;let u=LP(o,s,t,c);await OP(u);}throw new Nr(e.name||"retryWithBackoff",r,a)}async function At(e,n){let r=(s,t)=>t>(n?.maxRetries??3)?false:s instanceof Response?s.status===429?n?.retryOnRateLimit??true:s.status>=400&&s.status<500?false:s.status>=500:s instanceof TypeError||s instanceof Error;return or(e,{...n,shouldRetry:n?.shouldRetry??r})}function sA(e,n,r,s){if(e<n||e>r)throw new K(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function oA(e,n){if(e<0)throw new K(`${n} must be non-negative, got ${e}`)}function cr(e,n){if(e.length===0)throw new K(`${n} cannot be empty`)}function cA(e,n){if(e.trim().length===0)throw new K(`${n} cannot be empty`)}async function Ys(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 s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((s.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 gA(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 K(`Transaction exceeds maximum length of ${1644} bytes (actual: ${r.length} bytes)`);let s=await ee().simulateTransaction(r,{encoding:"base64"}).send();if(s.value.err){if(s.value.logs){let c=["Transaction simulation failed:","",...s.value.logs].join(`
|
|
2
|
+
`);throw new Error(c)}let t=["Transaction simulation failed:","",s.value.err.toString()].join(`
|
|
3
|
+
`);throw new Error(t)}return s.value.unitsConsumed}async function pA(e,n){let s=(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));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function mA(e,n){cr(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new K(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await At(()=>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 tr(r,n);let s=await rr(r);if(!s.result||s.error)throw new pe(`Unable to simulate bundle: ${JSON.stringify(s.error??s.result)}`);if(typeof s.result.value.summary!="string"&&s.result.value.summary.failed){let{TransactionFailure:t}=s.result.value.summary.failed.error,[,c]=t;throw new pe(`Simulation failed: ${c}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function Z(e,n=0){let r=e instanceof P?e:void 0,s=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?Fr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function Pe(e){if(e instanceof Be)return {keyType:er.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:er.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function iA(e){return e instanceof P?e.toString():e.address.toString()}function le(e){let n=new Set,r=[];for(let t of e)n.has(iA(t))||(r.push(t),n.add(iA(t)));let s=r.filter(t=>t instanceof P);if(s.length>1)throw new K(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function yA({payer:e,tipAmount:n}){let r=Fs[Math.floor(Math.random()*Fs.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 Zs(e,n,r){let s=e?.get(n);if(s)return s;let t=await r();return t&&e&&e.set(n,t),t}var B=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}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){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.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=await De().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(o);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:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function zr(e,n){let r=lA(e);return Zs(n,r,()=>De().getCompressedAccount(e))}async function rt(e,n){let r=TA(e);return Zs(n,r,()=>ee().getAccountInfo(e,{encoding:"base64"}).send())}async function me(e,n){let r=(await Promise.all(e.map(s=>zr(s.address,n)))).filter(s=>s!==null).filter(s=>s.data!==null&&s.address!==null);if(r.length!==e.length)throw new re("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((s,t)=>({...s,type:e[t].type,tree:s.treeInfo.tree,queue:s.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 Ae(e,n,r,s,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:s[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 ae(e,n,r,s,t,c,i){let a=[];for(let u=0;u<n.length;u++)a.push({treeInfo:n[u],rootIndex:s[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new K("Unable to parse state tree data");return c.map((u,g)=>({data:i.decode(u.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(u.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Me(e,n,r,s,t){let c=null,i=null,a=null,o=new B;if(e){await o.addSystemAccounts();let{address:d}=await oe(n,r),u=(await me([{address:d,type:"Settings"}],t))[0];s?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 V([u],[]);let g=o.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 K("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:o,settingsMutArgs:i}}async function V(e,n){return or(()=>De().getValidityProofV0(e,n))}async function he(){return (await Kr()).length-1}var Xs;async function Kr(){if(!Xs){let{data:e}=await Zc(ee(),await IA());Xs=e.whitelistedAddressTrees;}return Xs}function xA(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 ir(e,n,r){let s=await sM(e,n,r);if(!s)throw new re("User account");return s}async function sM(e,n,r){let{address:s}=await N(e,n),t=await zr(s,r);return t?.data?.data?Y().decode(t.data.data):null}async function i5(e,{member:n,credentialId:r}){let s=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)s.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(F().encode(Pe(n)))}});else if(r)s.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(Ie(r))}});else return null;let t=await De().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:s});return t.items.filter(c=>!!c.data).length?t.items.map(c=>Y().decode(c.data?.data))[0]:null}async function jr(e,n,r){let s=await oM(e,n,r);if(!s)throw new re("Settings account");return s}async function oM(e,n,r){try{let{address:s}=await oe(e,n),t=await zr(s,r);if(!t?.data?.data)throw new re("Compressed settings account");let c=j().decode(t.data.data);if(c.data.__option==="None")throw new re("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let s=await ls(ee(),e);return s.exists?{...s.data,isCompressed:false}:null}}async function d5(e,n,r){let s=await ir(e,n,r);if(s.role===1||s.role===0){let t=[],[c,i]=await Promise.all([De().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(F().encode(Pe(e)))}}]}),ee().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(F().encode(Pe(e)))}}]}).send()]);return c.items.forEach(a=>{if(a.data?.data){let o=j().decode(a.data.data);o.data.__option==="Some"&&t.push({...o.data.value,isCompressed:true});}}),i.forEach(a=>{let o=Rr().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...o,isCompressed:false});}),t}else return await Promise.all(s.wallets.map(async t=>jr(await Re(t.index),t.settingsAddressTreeIndex,r)))}async function $s(e){oA(e,"index");let n=await Kr();if(e>=n.length)throw new K(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function u5(e){let r=(await Kr()).findIndex(s=>s.toString()===e);if(r===-1)throw new re("Address tree",`Address ${e} not found in whitelist`);return r}async function oe(e,n=0){let r=await $s(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,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 $s(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof Be?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function ut({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new K("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 MA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function IA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function hA(e,n,r){sA(r,0,255,"buffer_index");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Be?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ue(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 Re(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function C5(e){let n=await Re(e);return await Ue(n)}async function E5(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function W5(e){cr(e,"bundle");let n=await Ys(e,true),r=await mA(n.map(gill.getBase64EncodedWireTransaction),Ju()),s=await Ys(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await gM(s.map(gill.getBase64EncodedWireTransaction))}async function gM(e,n=Ks(),r){cr(e,"serializedTransactions");let{blockEngineUrl:s}=n,t=`${s}/bundles`,c=await At(()=>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 tr(c,t);let i=await rr(c);if(i.error)throw new pe(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new pe("No bundle ID returned from Jito");return i.result}async function k5(e,n=30,r=3e3,s=Ks()){cA(e,"bundleId");let{blockEngineUrl:t}=s,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 tr(i,c);let a=await rr(i);if(a.error)throw new pe(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new pe("Bundle not yet confirmed",e);let o=a.result.value[0];if(o.confirmation_status==="confirmed"||o.confirmation_status==="finalized"){let d=o.transactions[o.transactions.length-1];if(!d)throw new pe("No transactions in confirmed bundle",e);return d}throw new pe(`Bundle status: ${o.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:i=>i instanceof pe||i instanceof Ee})}async function H5({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=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(s.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([gA(c),pA(ee(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil((Number(i)??0)*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await qu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function r6(e,n){if(n.threshold>1)throw new K("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(o=>vA(o.pubkey)===e);if(!r)throw new re("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new re("Permissions","No permissions found for the current member");let t=Oe.has(s,ve.InitiateTransaction),c=Oe.has(s,ve.VoteTransaction),i=Oe.has(s,ve.ExecuteTransaction);if(t&&c&&i)return {};if(!c||!i)throw new wr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(o=>o.role===0);if(!a)throw new re("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(vA(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function n6({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await ir(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new re("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return bM(n,c.transactionManagerUrl.value,e,s)}function bM(e,n,r,s){return {address:e,async signTransactions(t){let c=await At(()=>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:s?gill.getBase64Decoder().decode(s):void 0,authResponses:r}))})}));if(!c.ok)throw new Ee(`Transaction manager request failed: ${c.statusText}`,c.status,n);let i=await c.json();if("error"in i)throw new Ee(`Transaction manager error: ${i.error}`,c.status,n);return i.signatures.map(a=>({[e]:gill.getBase58Encoder().encode(a)}))}}}function vA(e){return e.keyType===er.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function s6(e){let n=e.map(c=>Ge().encode(c)),r=4+n.reduce((c,i)=>c+i.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function o6(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let i=ze().read(e,n);t[c]=i[0],n=i[1];}if(n!==e.length)throw new K(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function I6({payer:e,rpId:n,origins:r,authority:s}){let t=await ut({rpId:n}),c=new B;await c.addSystemAccounts();let i=await he(),{address:a,addressTree:o}=await N(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],u=await V([],d),g=(await Ae(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:p,systemOffset:f}=c.toAccountMetas(),S=v(u,f);return await Ua({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function U6({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[];r.settings&&(i.push({address:(await oe(r.settings,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await me(i,t):[],o=await he(),{address:d,addressTree:u}=await N(r.member,o),g=[{address:d,type:"User",tree:u,queue:u}],p=await V(a,g),f=null,S=null,E=a.filter(w=>w.type==="Settings"),x=a.filter(w=>w.type==="User");E.length&&(f=ae(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),E,j())[0]),x.length&&(S=ae(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,Y())[0]);let b=await Ae(c,p.treeInfos.slice(a.length),p.roots.slice(a.length),p.rootIndices.slice(a.length),g),{remainingAccounts:D,systemOffset:_}=c.toAccountMetas(),U=v(p,_);return await Ba({payer:n,authority:e,compressedProofArgs:U,member:wt().decode(r.member.toBuffer()),credentialId:Ie(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:s,remainingAccounts:D})}async function O6({payer:e}){let n=await MA();return Ha({payer:e,globalCounter:n})}async function V6({admin:e,rpId:n,disable:r}){let s=await ut({rpId:n});return ni({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function J6({args:e,authority:n,settings:r,settingsAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await oe(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await V([],a),d=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return hi({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:u})}async function eV({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await N(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await V([],a),d=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return Wi({compressedProofArgs:p,args:e,authority:n,userCreationArgs:d,remainingAccounts:u})}function vM(e,n,r,s){let t=UM(e,n),c=WM(e,n)&&r!==s;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function UM(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function WM(e,n){return n<e.header.numSignerAccounts}async function Jr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=ju(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,o]of t.staticAccounts.entries())i.push({address:o,role:vM(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let u=o[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=o[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 s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(d=>d.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}var pt=33,mt=64,no=14,VM=2,HM=gill.address("Secp256r1SigVerify1111111111111111111111111");function FM(){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 GM(){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 BA(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let s=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=GM();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=no;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),pt).decode(e,n);n+=pt;let d=gill.fixDecoderSize(gill.getBytesDecoder(),mt).decode(e,n);n+=mt;let u=t[a].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,i.push({publicKey:o,signature:d,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function NA(){return gill.createEncoder({getSizeFromValue:e=>{let n=no*e.offsets.length,r=e.payload.reduce((s,t)=>s+pt+mt+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 s=FM();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),pt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),mt).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function yV(){return gill.combineCodec(NA(),BA())}function H(e,n){let r=e.length,s=VM+r*no,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],u=s,g=u+pt,p=g+mt;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:d.length,messageInstructionIndex:65535}),s+=pt+mt+d.length;}let c=n?.programAddress??HM,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:NA().encode(i)}}function lV(e){return {programAddress:e.programAddress,accounts:{},data:BA().decode(e.data)}}async function wA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Ue(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(o?Iu({transactionBuffer:n,payer:s.address,remainingAccounts:u,settingsKey:e}):yu({transactionBuffer:n,payer:s.address,settings:e})),a&&p.push(yA({payer:s,tipAmount:a})),{instructions:p,addressLookupTableAccounts:g}}async function VA({settings:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let u=le(s),g=await Ue(e),[{accountMetas:p,addressLookupTableAccounts:f,transactionMessage:S},{settingsMutArgs:E,proof:x,packedAccounts:b}]=await Promise.all([Jr({transactionMessageBytes:r,walletAddress:g,additionalSigners:u.filter(te=>!(te instanceof P)),addressesByLookupTableAddress:c}),Me(a,e,n,o,d)]);b.addPreAccounts(p);let D=u.filter(te=>te instanceof P),{secp256r1VerifyArgs:_}=KM(D,i,b),{remainingAccounts:U,systemOffset:w}=b.toAccountMetas();return {instructions:jM({secp256r1VerifyInput:i,transactionMessage:S,accountMetas:p,compressed:a,payer:t,settingsMutArgs:E,proof:x,systemOffset:w,secp256r1VerifyArgs:_,settings:e,remainingAccounts:U}),addressLookupTableAccounts:f}}function KM(e,n,r){let s=[];for(let t of e){let c=n.length,{domainConfig:i,verifyArgs:a,signature:o,publicKey:d,message:u}=Z(t,c);u&&o&&d&&n.push({message:u,signature:o,publicKey:d}),i&&(r.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]),a.__option==="Some"&&s.push({domainConfigKey:i,verifyArgs:a.value}));}return {secp256r1VerifyArgs:s}}function jM({secp256r1VerifyInput:e,transactionMessage:n,accountMetas:r,compressed:s,payer:t,settingsMutArgs:c,proof:i,systemOffset:a,secp256r1VerifyArgs:o,settings:d,remainingAccounts:u}){let g=[];e.length>0&&g.push(H(e));let p=JM(n,r);if(s){if(!t||!c)throw new Error("Payer not found or proof args is missing.");let f=v(i,a);g.push(Wu({secp256r1VerifyArgs:o,transactionMessage:p,settingsMutArgs:c,compressedProofArgs:f,payer:t,remainingAccounts:u}));}else g.push(hu({secp256r1VerifyArgs:o,settings:d,transactionMessage:p,remainingAccounts:u}));return g}function JM(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(s=>s.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function VV({settings:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=le(s),d=await Ue(e),[{packedAccounts:u,proof:g,settingsMutArgs:p},{value:f}]=await Promise.all([Me(a,e,n,false,t),rt(d,t)]);if((f?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let S=[],E=[];for(let _ of o)if(_ instanceof P){let U=S.length,{domainConfig:w,verifyArgs:ce,signature:te,publicKey:ie,message:ye}=Z(_,U);ye&&te&&ie&&S.push({message:ye,signature:te,publicKey:ie}),w&&(u.addPreAccounts([{address:w,role:gill.AccountRole.READONLY}]),ce.__option==="Some"&&E.push({domainConfigKey:w,verifyArgs:ce.value}));}else u.addPreAccounts([{address:_.address,role:gill.AccountRole.READONLY_SIGNER,signer:_}]);let{remainingAccounts:x,systemOffset:b}=u.toAccountMetas(),D=[];if(S.length>0&&D.push(H(S)),a){if(!i||!p)throw new Error("Payer not found or proof args is missing.");let _=v(g,b);D.push(Gi({amount:c,settingsMutArgs:p,compressedProofArgs:_,payer:i,secp256r1VerifyArgs:E,source:d,destination:r,remainingAccounts:x}));}else D.push(Bi({amount:c,secp256r1VerifyArgs:E,source:d,destination:r,settings:e,remainingAccounts:x}));return D}var $M=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),eh=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),Yr=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function $V({settings:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,splInterfacePdaArgs:d={index:0,restricted:false},compressed:u=false}){let g=le(t),p=await Ue(e),f=W=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(W),gill.getAddressEncoder().encode(Yr),gill.getAddressEncoder().encode(s)],programAddress:Yr}),S=()=>{let W=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(s)];return d.restricted&&W.push(gill.getUtf8Encoder().encode("restricted")),d.index>0&&W.push(gill.getU8Encoder().encode(d.index)),W},[E,[x],b,[D],[_]]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,p,o),f(p),programs.getAssociatedTokenAccountAddress(s,r,o),f(r),gill.getProgramDerivedAddress({seeds:S(),programAddress:Yr})]),[U,w,ce,te]=await Promise.all([rt(b,c),rt(E,c),rt(x,c),nh(u,e,n,c)]),ie=!!U.value,ye=!!w.value,yt=!!ce.value,be=ye?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(w.value.data[0])).amount:BigInt(0),ue=BigInt(yt?sh(gill.getBase64Encoder().encode(ce.value.data[0]))?.amount??0:0),ct=ie?b:void 0,$r=ie?void 0:D,lt=ye&&(be+ue<BigInt(i)||ue>BigInt(0)||!ie)||!ye&&ie,en=!ie,[m,Ao]=await Promise.all([rh(p,s,be,ue,BigInt(i),u?3:4),th(lt,_,c)]),X=m.reduce((W,ne)=>W+ne.parsed.amount.toNumber(),0);if(be+ue+BigInt(X)<BigInt(i))throw new Error("Insufficient balance");let at=null,We=null,ke=new B;if(Ao&&ke.addPreAccounts([{address:s,role:gill.AccountRole.WRITABLE}]),te||m.length){await ke.addSystemAccounts();let W=[];if(m.length&&W.push(...m.map(ne=>({hash:ne.compressedAccount.hash,tree:ne.compressedAccount.treeInfo.tree,queue:ne.compressedAccount.treeInfo.queue,data:ne.compressedAccount.data,address:ne.compressedAccount.address}))),te&&W.push(te),We=await V(W,[]),te){let ne=m.length;at=ae(ke,We.treeInfos.slice(ne),We.leafIndices.slice(ne),We.rootIndices.slice(ne),We.proveByIndices.slice(ne),W.slice(ne),j())[0];}}let og=m.length&&We?gill.some(m.map((W,ne)=>({isFrozen:W.parsed.state===programs.AccountState.Frozen,hasDelegate:W.parsed.delegate!=null,amount:W.parsed.amount.toNumber(),merkleContext:{leafIndex:W.compressedAccount.leafIndex,merkleTreePubkeyIndex:ke.insertOrGet(W.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:ke.insertOrGet(W.compressedAccount.treeInfo.queue.toString()),proveByIndex:W.compressedAccount.proveByIndex},rootIndex:We.rootIndices[ne],version:xA(W.compressedAccount.data?.discriminator),tlv:W.parsed.tlv?gill.some(gill.getArrayDecoder(Ut()).decode(W.parsed.tlv)):gill.none()}))):gill.none(),ur=[],go=[];for(let W of g)if(W instanceof P){let ne=ur.length,{domainConfig:tn,verifyArgs:mo,signature:yo,publicKey:lo,message:To}=Z(W,ne);To&&yo&&lo&&ur.push({message:To,signature:yo,publicKey:lo}),tn&&(ke.addPreAccounts([{address:tn,role:gill.AccountRole.READONLY}]),mo.__option==="Some"&&go.push({domainConfigKey:tn,verifyArgs:mo.value}));}else ke.addPreAccounts([{address:W.address,role:gill.AccountRole.READONLY_SIGNER,signer:W}]);let{remainingAccounts:cg,systemOffset:ag}=ke.toAccountMetas(),Ar=[];ur.length>0&&Ar.push(H(ur));let ig=v(We,ag),dg=lt?_:void 0,ug=en?eh:void 0,Ag=lt?gill.some(d):gill.none(),po={amount:i,secp256r1VerifyArgs:go,source:p,destination:r,sourceCtokenTokenAccount:x,sourceSplTokenAccount:E,destinationCtokenTokenAccount:$r,destinationSplTokenAccount:ct,mint:s,tokenProgram:o,remainingAccounts:cg,payer:a,sourceCompressedTokenAccounts:og,compressedProofArgs:ig,compressibleConfig:$M,splInterfacePda:dg,rentSponsor:ug,splInterfacePdaArgs:Ag};if(u){if(!at)throw new Error("Payer not found or proof args is missing.");Ar.push(nd({...po,settingsMutArgs:at}));}else Ar.push(Yi({...po,settings:e}));return Ar}async function th(e,n,r){if(!e)return false;let{value:s}=await rt(n,r);return !s}async function rh(e,n,r,s,t,c){let i=t-r-s;if(i<=0)return [];let o=(await De().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.toString()===Yr.toString()&&!g.parsed.amount.isZero()).sort((g,p)=>p.parsed.amount.cmp(g.parsed.amount));if(o.length===0)return [];let d=BigInt(0),u=[];for(let g of o){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 nh(e,n,r,s){if(!e)return null;let{address:t}=await oe(n,r);return (await me([{address:t,type:"Settings"}],s))[0]}function sh(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 u8({signers:e,payer:n,changeConfigArgs:r}){let{settings:s,configActions:t,compressed:c,packedAccounts:i,proof:a,settingsMutArgs:o}=r,d=le(e),u=d.filter(D=>!(D instanceof P));i.addPreAccounts(u.map(D=>({address:D.address,role:gill.AccountRole.READONLY_SIGNER,signer:D})));let g=d.filter(D=>D instanceof P),p=[],f=[];for(let D of g){let _=f.length,{domainConfig:U,verifyArgs:w,signature:ce,publicKey:te,message:ie}=Z(D,_);ie&&ce&&te&&f.push({message:ie,signature:ce,publicKey:te}),U&&(i.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),w.__option==="Some"&&p.push({domainConfigKey:U,verifyArgs:w.value}));}let{remainingAccounts:S,systemOffset:E}=i.toAccountMetas(),x=v(a,E),b=[];if(f.length>0&&b.push(H(f)),c){if(!o)throw new Error("Payer not found or proof args is missing.");b.push(Ta({configActions:t,payer:n,compressedProofArgs:x,settingsMutArgs:o,remainingAccounts:S,secp256r1VerifyArgs:p}));}else b.push(da({settings:s,configActions:t,payer:n,compressedProofArgs:x,remainingAccounts:S,secp256r1VerifyArgs:p}));return b}async function T8({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 s=await he(),t=await Promise.all(e.map(async u=>{let{address:g,addressTree:p}=await N(u.member.address,s);return {address:g,tree:p,queue:p,type:"User"}})),c=await V([],t),i=await Ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=v(c,o);return await Ka({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 D8({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[],a=[];a.push(...await me([{address:(await N(r.address,s)).address,type:"User"}],t));let o=await he(),{address:d,addressTree:u}=await oe(await Re(e),o);i.push({address:d,queue:u,tree:u,type:"Settings"});let g=a.length,p=await V(a,i),f=ae(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),a.filter(_=>_.type==="User"),Y())[0],E=(await Ae(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),i)).find(_=>_.type==="Settings")??null,{remainingAccounts:x,systemOffset:b}=c.toAccountMetas(),D=v(p,b);if(!E)throw new Error("Settings creation args is missing.");return await Ca({settingsIndex:e,payer:n,initialMember:r,userArgs:f.data.role===3?{__kind:"Mutate",fields:[f]}:{__kind:"Read",fields:[f]},compressedProofArgs:D,settingsCreation:E,remainingAccounts:x})}async function U8({settings:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:i,settingsMutArgs:a}=await Me(true,e,n,false,t);if(!a)throw new Error("Proof args is missing");let o=le(s),d=o.filter(x=>x instanceof P),u=[],g=[];for(let x of d){let b=u.length,{domainConfig:D,verifyArgs:_,signature:U,publicKey:w,message:ce}=Z(x,b);ce&&U&&w&&u.push({message:ce,signature:U,publicKey:w}),D&&(c.addPreAccounts([{address:D,role:gill.AccountRole.READONLY}]),_.__option==="Some"&&g.push({domainConfigKey:D,verifyArgs:_.value}));}c.addPreAccounts(o.filter(x=>"address"in x).map(x=>({address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x})));let{remainingAccounts:p,systemOffset:f}=c.toAccountMetas(),S=v(i,f),E=[];return u.length>0&&E.push(H(u)),E.push(Xa({settings:e,payer:r,settingsMutArgs:a,compressedProofArgs:S,secp256r1VerifyArgs:g,remainingAccounts:p})),E}async function w8({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new B;await i.addSystemAccounts();let a=await he(),{address:o,addressTree:d}=await N(r.address,a),u=[{address:o,tree:d,queue:d,type:"User"}],g=await V([],u),p=(await Ae(i,g.treeInfos,g.roots,g.rootIndices,u))[0],f=i.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(g,f.systemOffset),authorityCreationArgs:p};}return di({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function K8({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new B;await s.addSystemAccounts();let t=await me([{address:(await N(e.address,n)).address,type:"User"}]),c=await V(t,[]),i=ae(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,Y())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=v(c,o);return yi({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function tH({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=Z(n),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let g=await ir(n instanceof P?n:n.address,r,t),p=[];p.push({address:(await N(n instanceof P?n:n.address,r)).address,type:"User"});let f,S=null,E,x=null,b=g.wallets.find(ue=>ue.isDelegate);if(b){let ue=await Re(b.index);(await jr(ue,b.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await oe(ue,b.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):f=await Re(b.index);}if(s){let ue=await Re(s.index);(await jr(ue,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await oe(ue,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):E=await Re(s.index);}let D=new B;await D.addSystemAccounts();let _=await me(p,t),U=await V(_,[]),w=ae(D,U.treeInfos.slice(0,1),U.leafIndices.slice(0,1),U.rootIndices.slice(0,1),U.proveByIndices.slice(0,1),_.slice(0,1),Y())[0],ce=S?gill.some(ae(D,U.treeInfos.slice(S.start,S.end),U.leafIndices.slice(S.start,S.end),U.rootIndices.slice(S.start,S.end),U.proveByIndices.slice(S.start,S.end),_.slice(S.start,S.end),j())[0]):gill.none(),te=x?gill.some(ae(D,U.treeInfos.slice(x.start,x.end),U.leafIndices.slice(x.start,x.end),U.rootIndices.slice(x.start,x.end),U.proveByIndices.slice(x.start,x.end),_.slice(x.start,x.end),j())[0]):gill.none(),{remainingAccounts:ie,systemOffset:ye}=D.toAccountMetas(),yt=v(U,ye),be=[];return u.length>0&&be.push(H(u)),be.push(Ii({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof P?void 0:n,oldSettings:f,oldSettingsMutArgs:ce,newSettings:E,newSettingsMutArgs:te,compressedProofArgs:yt,userMutArgs:w,remainingAccounts:ie})),be}async function TH({settingsAddressTreeIndex:e,closer:n,transactionBufferAddress:r,payer:s,compressed:t=false,cachedAccounts:c}){let i=await zc(ee(),r),a=i.data.multiWalletSettings,{packedAccounts:o,proof:d,settingsMutArgs:u}=await Me(t,a,e,false,c),{remainingAccounts:g,systemOffset:p}=o.toAccountMetas(),{domainConfig:f,verifyArgs:S,message:E,signature:x,publicKey:b}=Z(n),D=[];if(E&&x&&b&&D.push(H([{message:E,signature:x,publicKey:b}])),t){if(!s||!u)throw new Error("Payer not found or proof args is missing.");let _=v(d,p);D.push(yd({transactionBuffer:r,domainConfig:f,closer:n instanceof P?void 0:n,rentCollector:i.data.payer,secp256r1VerifyArgs:S,settingsMutArgs:u,payer:s,compressedProofArgs:_,remainingAccounts:g}));}else D.push(dd({transactionBuffer:r,domainConfig:f,closer:n instanceof P?void 0:n,settings:a,payer:i.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return D}function YA({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:d,expectedSecp256r1Signers:u}){let{domainConfig:g,verifyArgs:p,message:f,signature:S,publicKey:E}=Z(n),x=[];if(f&&S&&E&&x.push(H([{message:f,signature:S,publicKey:E}])),d){let{settingsReadonlyArgs:b,compressedProofArgs:D,remainingAccounts:_}=d;x.push(hd({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},settingsReadonlyArgs:b,compressedProofArgs:D,remainingAccounts:_}));}else x.push(Id({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},remainingAccounts:[]}));return x}function ZA({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=Z(e),d=[];return a&&i&&o&&d.push(H([{message:a,signature:i,publicKey:o}])),s?d.push(wd({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Wd({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,remainingAccounts:[]})),d}function XA({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Xd({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Kd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function QA({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=Z(n),d=[];return o&&i&&a&&d.push(H([{message:o,signature:i,publicKey:a}])),s?d.push(du({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(nu({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,remainingAccounts:[]})),d}async function cF({settings:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await ih(r),i=new B,a=null,o=null,d=[];if(c.length||t){let g=await dh({packedAccounts:i,userAccounts:c,compressed:t,settings:e,settingsAddressTreeIndex:n,cachedAccounts:s});a=g.proof,o=g.settingsMutArgs??null,d=g.userMutArgs??[];}return {configActions:await uh({configActionsArgs:r,userMutArgs:d}),settings:e,proof:a,settingsMutArgs:o,packedAccounts:i,compressed:t}}async function ih(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function dh({packedAccounts:e,userAccounts:n,compressed:r,settings:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let f=(await oe(s,t)).address;i.push({address:f,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await me(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await V(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&&o&&(g=ae(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),d,j())[0]),u.length&&o){let f=r?1:0;p=ae(e,o.treeInfos.slice(f),o.leafIndices.slice(f),o.rootIndices.slice(f),o.proveByIndices.slice(f),u,Y());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function uh({configActionsArgs:e,userMutArgs:n}){let r=[];for(let s of e)switch(s.type){case "AddMembers":{let t=[];for(let c of s.members){let i=await N(c.member,c.userAddressTreeIndex).then(a=>n.find(o=>utils_js.equalBytes(o.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address)))));if(!i)throw new Error("Unable to find user account");t.push(ph({permissionArgs:c.permissions,userMutArgs:i,pubkey:c.member}));}r.push({__kind:s.type,fields:[t]});break}case "RemoveMembers":{let t=await Promise.all(s.members.map(c=>N(c.member,c.userAddressTreeIndex).then(i=>{let a=n.find(o=>utils_js.equalBytes(o.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address))));if(!a)throw new Error("Unable to find user account");return gh({pubkey:c.member,userMutArgs:a})})));r.push({__kind:s.type,fields:[t]});break}case "EditPermissions":{let t=s.members.map(c=>Ah({permissionArgs:c.permissions,pubkey:c.member}));r.push({__kind:s.type,fields:[t]});break}default:r.push({__kind:s.type,fields:[s.threshold]});}return r}function Ah({pubkey:e,permissionArgs:n}){return {memberKey:Pe(e),permissions:rg(n)}}function gh({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 ph({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:rg(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function rg(e){let n=[];return e.initiate&&n.push(ve.InitiateTransaction),e.vote&&n.push(ve.VoteTransaction),e.execute&&n.push(ve.ExecuteTransaction),Oe.fromPermissions(n)}async function mF({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o,compressed:d=false,additionalVoters:u=[],additionalSigners:g=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:f}){let S=Math.floor(Math.random()*255),E=await hA(n,t instanceof P?t:t.address,S),x=[],b=[];for(let X=0;X<s.length;X+=p){let at=s.subarray(X,X+p);x.push(at),b.push(sha2_js.sha256(at));}let D=sha2_js.sha256(s),{settingsReadonlyArgs:_,settingsMutArgs:U,proof:w,packedAccounts:ce}=await Me(d,n,r,false,f),{remainingAccounts:te,systemOffset:ie}=ce.toAccountMetas(),ye=w&&_&&U?{settingsReadonlyArgs:_,settingsMutArgs:U,compressedProofArgs:v(w,ie),remainingAccounts:te,payer:e}:null,yt=le([t,...c?[c]:[],...u]).filter(X=>X instanceof P).map(X=>({memberKey:Pe(X),messageHash:Js(X.authResponse)})),be=YA({finalBufferHash:D,finalBufferSize:s.length,bufferIndex:S,payer:e,transactionBufferAddress:E,settings:n,creator:t,preauthorizeExecution:!c,bufferExtendHashes:b,compressedArgs:ye,expectedSecp256r1Signers:yt}),ue=x.map(X=>XA({transactionMessageBytes:X,transactionBufferAddress:E,settings:n,compressed:d})),ct=u.map(X=>QA({voter:X,transactionBufferAddress:E,settings:n,compressedArgs:ye})),$r=ZA({compressedArgs:ye,settings:n,executor:c,transactionBufferAddress:E}),{instructions:lt,addressLookupTableAccounts:en}=await wA({compressed:d,settings:n,transactionMessageBytes:s,transactionBufferAddress:E,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),m=X=>({payer:e,instructions:X,addressesByLookupTableAddress:en});return [m(be),...ue.map(X=>m([X])),...ct.length?[m(ct.flat())]:[],m($r),m(lt)]}var Xr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.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 o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}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),s=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+s.length,numReadonlySignerAccounts:s.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 o=[...r.map(([d])=>d),...s.map(([d])=>d),...t.map(([d])=>d),...c.map(([d])=>d)];return [i,o]}extractTableLookup(n){let[r,s]=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:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var Qr=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 s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.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 sg({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=Xr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let p of a){let f=t.extractTableLookup(p);if(f!==void 0){let{addressTableLookup:S,drainedKeys:E}=f;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),i.writable.push(...E.writable),i.readonly.push(...E.readonly);}}let[o,d]=t.getMessageComponents(),g=new Qr(d,i).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function hF({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=sg({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return new Uint8Array(Ku(s))}async function UF({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:d=false}){let{instructions:u,addressLookupTableAccounts:g}=await VA({settings:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:d,cachedAccounts:a});return {payer:e,instructions:u,addressesByLookupTableAddress:g}}exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=$c;exports.AuthenticationContextSchema=Hu;exports.BaseResponseSchema=Fu;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=ma;exports.CHANGE_CONFIG_DISCRIMINATOR=ca;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=xa;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=_a;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=La;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=wa;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Ga;exports.CompleteMessageRequestSchema=fw;exports.CompleteSendTransactionRequestSchema=xw;exports.CompleteTransactionRequestSchema=Sw;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=qa;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=ei;exports.DOMAIN_CONFIG_DISCRIMINATOR=fo;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=ai;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=gi;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=fi;exports.GLOBAL_COUNTER_DISCRIMINATOR=Do;exports.KeyType=er;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Di;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=_i;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=AD;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=HE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=nP;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=vD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=WD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=kD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=tP;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=gP;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=zE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=GE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=tD;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=VD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=QE;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=FE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=ZE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=xD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=ID;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=CD;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=wD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=mD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=gD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=pD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=cD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=eP;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=BD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=$E;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=iD;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=SD;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=HD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=yD;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=oD;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=JE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=LE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=NE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=kE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=BE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=_D;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=RD;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=nD;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=XD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=XE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=YE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=sD;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=cP;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=aD;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=oP;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=ZD;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=wE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=MD;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=LD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=zD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=$D;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=dD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=FD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=JD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=aP;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=YD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=GD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=uD;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=uP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=dP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=ND;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=iP;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=qD;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=hD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=rP;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=AP;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=TD;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=eD;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=jE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=qE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=OD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=jD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=KE;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=PD;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=VE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=KD;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=OE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=bD;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=QD;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=rD;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=ED;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=DD;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=UD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=fD;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=sP;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=lD;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=vE;exports.MultiWalletInstruction=UE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Vi;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Li;exports.Permission=ve;exports.Permissions=Oe;exports.SETTINGS_DISCRIMINATOR=Lc;exports.Secp256r1Key=Be;exports.SignedSecp256r1Key=P;exports.StartMessageRequestSchema=wu;exports.StartTransactionRequestSchema=Vu;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=td;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Ji;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=gd;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=cd;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Dd;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=fd;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Hc;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Od;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=_d;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=qd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Fd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=cu;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=eu;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=fu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=gu;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=_u;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Du;exports.TransactionActionTypeSchema=Nu;exports.TransactionDetailsSchema=mP;exports.TransactionPayloadSchema=Tw;exports.TransactionPayloadWithBase64MessageBytesSchema=pP;exports.Transports=ys;exports.UserRole=Le;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Jc;exports.addWhitelistedAddressTrees=dw;exports.base64URLStringToBuffer=Ie;exports.bufferToBase64URLString=A2;exports.changeConfig=u8;exports.closeTransactionBuffer=TH;exports.configAction=IR;exports.convertBase64StringToJWK=m2;exports.convertJWKToBase64String=p2;exports.convertMemberKeyToString=vA;exports.convertPubkeyCompressedToCose=o2;exports.convertPubkeyCoseToCompressed=s2;exports.createClientAuthorizationCompleteRequestChallenge=i2;exports.createClientAuthorizationStartRequestChallenge=a2;exports.createDomainConfig=I6;exports.createDomainUserAccounts=U6;exports.createGlobalCounter=O6;exports.createMessageChallenge=d2;exports.createTransactionBuffer=YA;exports.createTransactionChallenge=u2;exports.createTransactionManagerSigner=bM;exports.createUserAccounts=T8;exports.createWallet=D8;exports.decodeDomainConfig=xo;exports.decodeGlobalCounter=Mo;exports.decodeSettings=Oc;exports.decodeTransactionBuffer=Gc;exports.decodeWhitelistedAddressTree=Yc;exports.decompressSettingsAccount=U8;exports.deserializeConfigActions=o6;exports.disableDomainConfig=V6;exports.editDomainConfig=w8;exports.editTransactionManagerUrl=K8;exports.editUserDelegate=tH;exports.executeTransaction=wA;exports.executeTransactionBuffer=ZA;exports.executeTransactionSync=VA;exports.extendTransactionBuffer=XA;exports.extensionStruct=wR;exports.fetchAllDomainConfig=fh;exports.fetchAllGlobalCounter=Ph;exports.fetchAllMaybeDomainConfig=Pg;exports.fetchAllMaybeGlobalCounter=Hg;exports.fetchAllMaybeSettings=R1;exports.fetchAllMaybeTransactionBuffer=q1;exports.fetchAllMaybeWhitelistedAddressTree=yf;exports.fetchAllSettings=iU;exports.fetchAllSettingsAccountByMember=d5;exports.fetchAllTransactionBuffer=mU;exports.fetchAllWhitelistedAddressTree=SU;exports.fetchDomainConfig=Io;exports.fetchGlobalCounter=Dh;exports.fetchMaybeDomainConfig=Dg;exports.fetchMaybeGlobalCounter=Vg;exports.fetchMaybeSettings=ls;exports.fetchMaybeSettingsAccountData=oM;exports.fetchMaybeTransactionBuffer=J1;exports.fetchMaybeUserAccountData=sM;exports.fetchMaybeWhitelistedAddressTree=mf;exports.fetchSettings=aU;exports.fetchSettingsAccountData=jr;exports.fetchTransactionBuffer=zc;exports.fetchUserAccountByFilters=i5;exports.fetchUserAccountData=ir;exports.fetchWhitelistedAddressTree=Zc;exports.getAddMemberArgsCodec=Wh;exports.getAddMemberArgsDecoder=on;exports.getAddMemberArgsEncoder=sn;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=OU;exports.getAddWhitelistedAddressTreesInstruction=NU;exports.getAddWhitelistedAddressTreesInstructionAsync=ta;exports.getAddWhitelistedAddressTreesInstructionDataCodec=BU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=ea;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Ds;exports.getAdditionalMetadataCodec=bh;exports.getAdditionalMetadataDecoder=nn;exports.getAdditionalMetadataEncoder=rn;exports.getChangeConfigCompressedDiscriminatorBytes=tW;exports.getChangeConfigCompressedInstruction=Ta;exports.getChangeConfigCompressedInstructionDataCodec=rW;exports.getChangeConfigCompressedInstructionDataDecoder=la;exports.getChangeConfigCompressedInstructionDataEncoder=ya;exports.getChangeConfigDiscriminatorBytes=jU;exports.getChangeConfigInstruction=da;exports.getChangeConfigInstructionDataCodec=JU;exports.getChangeConfigInstructionDataDecoder=ia;exports.getChangeConfigInstructionDataEncoder=aa;exports.getClientAndDeviceHash=js;exports.getCompiledInstructionCodec=Oh;exports.getCompiledInstructionDecoder=an;exports.getCompiledInstructionEncoder=cn;exports.getCompressedAccountMetaCodec=Vh;exports.getCompressedAccountMetaDecoder=xt;exports.getCompressedAccountMetaEncoder=St;exports.getCompressedAccountMetaReadOnlyCodec=zh;exports.getCompressedAccountMetaReadOnlyDecoder=Dt;exports.getCompressedAccountMetaReadOnlyEncoder=Et;exports.getCompressedOnlyExtensionCodec=Jh;exports.getCompressedOnlyExtensionDecoder=un;exports.getCompressedOnlyExtensionEncoder=dn;exports.getCompressedProofCodec=Zh;exports.getCompressedProofDecoder=ln;exports.getCompressedProofEncoder=yn;exports.getCompressedSettingsAddress=oe;exports.getCompressedSettingsCodec=eR;exports.getCompressedSettingsDataCodec=sR;exports.getCompressedSettingsDataDecoder=ht;exports.getCompressedSettingsDataEncoder=Mt;exports.getCompressedSettingsDecoder=j;exports.getCompressedSettingsEncoder=Pt;exports.getCompressedTokenArgsCodec=iR;exports.getCompressedTokenArgsDecoder=vt;exports.getCompressedTokenArgsEncoder=_t;exports.getCompressibleExtensionCodec=gR;exports.getCompressibleExtensionDecoder=En;exports.getCompressibleExtensionEncoder=Cn;exports.getCompressionInfoCodec=lR;exports.getCompressionInfoDecoder=Pn;exports.getCompressionInfoEncoder=Dn;exports.getConfigActionCodec=xR;exports.getConfigActionDecoder=ze;exports.getConfigActionEncoder=Ge;exports.getCreateCompressedWalletDiscriminatorBytes=uW;exports.getCreateCompressedWalletInstruction=gW;exports.getCreateCompressedWalletInstructionAsync=Ca;exports.getCreateCompressedWalletInstructionDataCodec=AW;exports.getCreateCompressedWalletInstructionDataDecoder=Ia;exports.getCreateCompressedWalletInstructionDataEncoder=Ps;exports.getCreateDomainConfigDiscriminatorBytes=xW;exports.getCreateDomainConfigInstruction=CW;exports.getCreateDomainConfigInstructionAsync=Ua;exports.getCreateDomainConfigInstructionDataCodec=IW;exports.getCreateDomainConfigInstructionDataDecoder=va;exports.getCreateDomainConfigInstructionDataEncoder=hs;exports.getCreateDomainUserAccountDiscriminatorBytes=_W;exports.getCreateDomainUserAccountInstruction=UW;exports.getCreateDomainUserAccountInstructionAsync=Ba;exports.getCreateDomainUserAccountInstructionDataCodec=vW;exports.getCreateDomainUserAccountInstructionDataDecoder=Oa;exports.getCreateDomainUserAccountInstructionDataEncoder=Rs;exports.getCreateGlobalCounterDiscriminatorBytes=wW;exports.getCreateGlobalCounterInstruction=HW;exports.getCreateGlobalCounterInstructionAsync=Ha;exports.getCreateGlobalCounterInstructionDataCodec=VW;exports.getCreateGlobalCounterInstructionDataDecoder=Va;exports.getCreateGlobalCounterInstructionDataEncoder=_s;exports.getCreateUserAccountArgsCodec=MR;exports.getCreateUserAccountArgsDecoder=Bn;exports.getCreateUserAccountArgsEncoder=On;exports.getCreateUserAccountsDiscriminatorBytes=YW;exports.getCreateUserAccountsInstruction=XW;exports.getCreateUserAccountsInstructionAsync=Ka;exports.getCreateUserAccountsInstructionDataCodec=ZW;exports.getCreateUserAccountsInstructionDataDecoder=za;exports.getCreateUserAccountsInstructionDataEncoder=Us;exports.getDecompressSettingsAccountDiscriminatorBytes=ok;exports.getDecompressSettingsAccountInstruction=Xa;exports.getDecompressSettingsAccountInstructionDataCodec=ck;exports.getDecompressSettingsAccountInstructionDataDecoder=Za;exports.getDecompressSettingsAccountInstructionDataEncoder=Ya;exports.getDisableDomainConfigDiscriminatorBytes=pk;exports.getDisableDomainConfigInstruction=ni;exports.getDisableDomainConfigInstructionDataCodec=mk;exports.getDisableDomainConfigInstructionDataDecoder=ri;exports.getDisableDomainConfigInstructionDataEncoder=ti;exports.getDomainConfigAddress=ut;exports.getDomainConfigCodec=Th;exports.getDomainConfigDecoder=So;exports.getDomainConfigDiscriminatorBytes=lh;exports.getDomainConfigEncoder=Eg;exports.getDomainConfigSize=Sh;exports.getEditDomainConfigDiscriminatorBytes=Ck;exports.getEditDomainConfigInstruction=di;exports.getEditDomainConfigInstructionAsync=Dk;exports.getEditDomainConfigInstructionDataCodec=Ek;exports.getEditDomainConfigInstructionDataDecoder=ii;exports.getEditDomainConfigInstructionDataEncoder=ks;exports.getEditMemberArgsCodec=_R;exports.getEditMemberArgsDecoder=Wn;exports.getEditMemberArgsEncoder=Un;exports.getEditTransactionManagerUrlDiscriminatorBytes=Uk;exports.getEditTransactionManagerUrlInstruction=yi;exports.getEditTransactionManagerUrlInstructionDataCodec=Wk;exports.getEditTransactionManagerUrlInstructionDataDecoder=mi;exports.getEditTransactionManagerUrlInstructionDataEncoder=pi;exports.getEditUserDelegateDiscriminatorBytes=Hk;exports.getEditUserDelegateInstruction=Ii;exports.getEditUserDelegateInstructionDataCodec=Fk;exports.getEditUserDelegateInstructionDataDecoder=xi;exports.getEditUserDelegateInstructionDataEncoder=Si;exports.getExpectedSecp256r1SignersCodec=kR;exports.getExpectedSecp256r1SignersDecoder=kt;exports.getExpectedSecp256r1SignersEncoder=Wt;exports.getExtensionStructCodec=NR;exports.getExtensionStructDecoder=Ut;exports.getExtensionStructEncoder=Tn;exports.getGlobalCounterAddress=MA;exports.getGlobalCounterCodec=Eh;exports.getGlobalCounterDecoder=Po;exports.getGlobalCounterDiscriminatorBytes=Ch;exports.getGlobalCounterEncoder=wg;exports.getGlobalCounterSize=Mh;exports.getJitoTipsConfig=Ks;exports.getLightCpiSigner=E5;exports.getLightProtocolRpc=De;exports.getLinkWalletArgsCodec=zR;exports.getLinkWalletArgsDecoder=Yn;exports.getLinkWalletArgsEncoder=qn;exports.getMemberCodec=qR;exports.getMemberDecoder=bt;exports.getMemberEncoder=Rt;exports.getMemberKeyCodec=XR;exports.getMemberKeyDecoder=se;exports.getMemberKeyEncoder=F;exports.getMigrateCompressedSettingsDiscriminatorBytes=Zk;exports.getMigrateCompressedSettingsInstruction=hi;exports.getMigrateCompressedSettingsInstructionDataCodec=Xk;exports.getMigrateCompressedSettingsInstructionDataDecoder=Mi;exports.getMigrateCompressedSettingsInstructionDataEncoder=Pi;exports.getMigrateCompressedUsersDiscriminatorBytes=oL;exports.getMigrateCompressedUsersInstruction=Wi;exports.getMigrateCompressedUsersInstructionDataCodec=cL;exports.getMigrateCompressedUsersInstructionDataDecoder=Ui;exports.getMigrateCompressedUsersInstructionDataEncoder=vi;exports.getMultiWalletErrorMessage=XN;exports.getNativeTransferIntentCompressedDiscriminatorBytes=DL;exports.getNativeTransferIntentCompressedInstruction=Gi;exports.getNativeTransferIntentCompressedInstructionDataCodec=PL;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Fi;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Hi;exports.getNativeTransferIntentDiscriminatorBytes=mL;exports.getNativeTransferIntentInstruction=Bi;exports.getNativeTransferIntentInstructionAsync=lL;exports.getNativeTransferIntentInstructionDataCodec=yL;exports.getNativeTransferIntentInstructionDataDecoder=Oi;exports.getNativeTransferIntentInstructionDataEncoder=Ls;exports.getNewAuthorityArgsCodec=tb;exports.getNewAuthorityArgsDecoder=$n;exports.getNewAuthorityArgsEncoder=Qn;exports.getOriginIndex=g2;exports.getPackedAddressTreeInfoCodec=sb;exports.getPackedAddressTreeInfoDecoder=Nt;exports.getPackedAddressTreeInfoEncoder=Bt;exports.getPackedMerkleContextCodec=ab;exports.getPackedMerkleContextDecoder=Sn;exports.getPackedMerkleContextEncoder=fn;exports.getPackedStateTreeInfoCodec=ub;exports.getPackedStateTreeInfoDecoder=Ct;exports.getPackedStateTreeInfoEncoder=It;exports.getPausableAccountExtensionCodec=pb;exports.getPausableAccountExtensionDecoder=wn;exports.getPausableAccountExtensionEncoder=Nn;exports.getPermanentDelegateAccountExtensionCodec=lb;exports.getPermanentDelegateAccountExtensionDecoder=Hn;exports.getPermanentDelegateAccountExtensionEncoder=Vn;exports.getPermissionsCodec=Sb;exports.getPermissionsDecoder=Ve;exports.getPermissionsEncoder=we;exports.getProofArgsCodec=Eb;exports.getProofArgsDecoder=C;exports.getProofArgsEncoder=I;exports.getRemoveMemberArgsCodec=hb;exports.getRemoveMemberArgsDecoder=Ln;exports.getRemoveMemberArgsEncoder=kn;exports.getRentConfigCodec=_b;exports.getRentConfigDecoder=bn;exports.getRentConfigEncoder=Rn;exports.getSecp256r1MessageHash=Js;exports.getSecp256r1PubkeyCodec=Wb;exports.getSecp256r1PubkeyDecoder=wt;exports.getSecp256r1PubkeyEncoder=rs;exports.getSecp256r1SignatureOffsetsDataDecoder=GM;exports.getSecp256r1SignatureOffsetsDataEncoder=FM;exports.getSecp256r1VerifyArgsCodec=Ob;exports.getSecp256r1VerifyArgsDecoder=z;exports.getSecp256r1VerifyArgsEncoder=G;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=Vb;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=$;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Q;exports.getSecp256r1VerifyInstruction=H;exports.getSecp256r1VerifyInstructionDataCodec=yV;exports.getSecp256r1VerifyInstructionDataDecoder=BA;exports.getSecp256r1VerifyInstructionDataEncoder=NA;exports.getSendAndConfirmTransaction=qu;exports.getSettingsCodec=cU;exports.getSettingsCreationArgsCodec=zb;exports.getSettingsCreationArgsDecoder=Ht;exports.getSettingsCreationArgsEncoder=Vt;exports.getSettingsDecoder=Rr;exports.getSettingsDiscriminatorBytes=oU;exports.getSettingsEncoder=h1;exports.getSettingsFromIndex=Re;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=Zb;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=cs;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=os;exports.getSettingsIndexWithAddressCodec=Jb;exports.getSettingsIndexWithAddressDecoder=ss;exports.getSettingsIndexWithAddressEncoder=ns;exports.getSettingsMutArgsCodec=e_;exports.getSettingsMutArgsDecoder=q;exports.getSettingsMutArgsEncoder=J;exports.getSettingsReadonlyArgsCodec=s_;exports.getSettingsReadonlyArgsDecoder=Gt;exports.getSettingsReadonlyArgsEncoder=Ft;exports.getSignedSecp256r1Key=c2;exports.getSignedTransactionManager=n6;exports.getSolanaRpc=ee;exports.getSolanaRpcEndpoint=Ju;exports.getSplInterfacePdaArgsCodec=a_;exports.getSplInterfacePdaArgsDecoder=Kt;exports.getSplInterfacePdaArgsEncoder=zt;exports.getTokenMetadataCodec=A_;exports.getTokenMetadataDecoder=Gn;exports.getTokenMetadataEncoder=Fn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=GL;exports.getTokenTransferIntentCompressedInstruction=nd;exports.getTokenTransferIntentCompressedInstructionAsync=KL;exports.getTokenTransferIntentCompressedInstructionDataCodec=zL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=rd;exports.getTokenTransferIntentCompressedInstructionDataEncoder=ws;exports.getTokenTransferIntentDiscriminatorBytes=WL;exports.getTokenTransferIntentInstruction=Yi;exports.getTokenTransferIntentInstructionAsync=LL;exports.getTokenTransferIntentInstructionDataCodec=kL;exports.getTokenTransferIntentInstructionDataDecoder=qi;exports.getTokenTransferIntentInstructionDataEncoder=Ns;exports.getTransactionBufferAddress=hA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=iO;exports.getTransactionBufferCloseCompressedInstruction=yd;exports.getTransactionBufferCloseCompressedInstructionDataCodec=dO;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=md;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=pd;exports.getTransactionBufferCloseDiscriminatorBytes=$L;exports.getTransactionBufferCloseInstruction=dd;exports.getTransactionBufferCloseInstructionDataCodec=eO;exports.getTransactionBufferCloseInstructionDataDecoder=id;exports.getTransactionBufferCloseInstructionDataEncoder=ad;exports.getTransactionBufferCodec=pU;exports.getTransactionBufferCreateArgsCodec=y_;exports.getTransactionBufferCreateArgsDecoder=Jt;exports.getTransactionBufferCreateArgsEncoder=jt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=MO;exports.getTransactionBufferCreateCompressedInstruction=hd;exports.getTransactionBufferCreateCompressedInstructionDataCodec=hO;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=Md;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Pd;exports.getTransactionBufferCreateDiscriminatorBytes=TO;exports.getTransactionBufferCreateInstruction=Id;exports.getTransactionBufferCreateInstructionDataCodec=fO;exports.getTransactionBufferCreateInstructionDataDecoder=xd;exports.getTransactionBufferCreateInstructionDataEncoder=Sd;exports.getTransactionBufferDecoder=Fc;exports.getTransactionBufferDiscriminatorBytes=gU;exports.getTransactionBufferEncoder=j1;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=zO;exports.getTransactionBufferExecuteCompressedInstruction=wd;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=KO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Nd;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Bd;exports.getTransactionBufferExecuteDiscriminatorBytes=LO;exports.getTransactionBufferExecuteInstruction=Wd;exports.getTransactionBufferExecuteInstructionDataCodec=OO;exports.getTransactionBufferExecuteInstructionDataDecoder=Ud;exports.getTransactionBufferExecuteInstructionDataEncoder=vd;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=cB;exports.getTransactionBufferExtendCompressedInstruction=Xd;exports.getTransactionBufferExtendCompressedInstructionDataCodec=aB;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Zd;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Yd;exports.getTransactionBufferExtendDiscriminatorBytes=QO;exports.getTransactionBufferExtendInstruction=Kd;exports.getTransactionBufferExtendInstructionDataCodec=$O;exports.getTransactionBufferExtendInstructionDataDecoder=zd;exports.getTransactionBufferExtendInstructionDataEncoder=Gd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=DB;exports.getTransactionBufferVoteCompressedInstruction=du;exports.getTransactionBufferVoteCompressedInstructionDataCodec=PB;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=iu;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=au;exports.getTransactionBufferVoteDiscriminatorBytes=yB;exports.getTransactionBufferVoteInstruction=nu;exports.getTransactionBufferVoteInstructionDataCodec=lB;exports.getTransactionBufferVoteInstructionDataDecoder=ru;exports.getTransactionBufferVoteInstructionDataEncoder=tu;exports.getTransactionExecuteCompressedDiscriminatorBytes=VB;exports.getTransactionExecuteCompressedInstruction=Iu;exports.getTransactionExecuteCompressedInstructionDataCodec=HB;exports.getTransactionExecuteCompressedInstructionDataDecoder=xu;exports.getTransactionExecuteCompressedInstructionDataEncoder=Su;exports.getTransactionExecuteDiscriminatorBytes=UB;exports.getTransactionExecuteInstruction=yu;exports.getTransactionExecuteInstructionDataCodec=WB;exports.getTransactionExecuteInstructionDataDecoder=mu;exports.getTransactionExecuteInstructionDataEncoder=pu;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=sN;exports.getTransactionExecuteSyncCompressedInstruction=Wu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=oN;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Uu;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=vu;exports.getTransactionExecuteSyncDiscriminatorBytes=YB;exports.getTransactionExecuteSyncInstruction=hu;exports.getTransactionExecuteSyncInstructionDataCodec=ZB;exports.getTransactionExecuteSyncInstructionDataDecoder=Mu;exports.getTransactionExecuteSyncInstructionDataEncoder=Pu;exports.getTransactionMessageAddressTableLookupCodec=C_;exports.getTransactionMessageAddressTableLookupDecoder=ms;exports.getTransactionMessageAddressTableLookupEncoder=ps;exports.getTransactionMessageCodec=S_;exports.getTransactionMessageDecoder=Yt;exports.getTransactionMessageEncoder=qt;exports.getTransferFeeAccountExtensionCodec=P_;exports.getTransferFeeAccountExtensionDecoder=Kn;exports.getTransferFeeAccountExtensionEncoder=zn;exports.getTransferHookAccountExtensionCodec=R_;exports.getTransferHookAccountExtensionDecoder=Jn;exports.getTransferHookAccountExtensionEncoder=jn;exports.getTransportsCodec=v_;exports.getTransportsDecoder=Xt;exports.getTransportsEncoder=Zt;exports.getUserAccountAddress=N;exports.getUserCodec=L_;exports.getUserCreationArgsCodec=w_;exports.getUserCreationArgsDecoder=Se;exports.getUserCreationArgsEncoder=fe;exports.getUserDecoder=Y;exports.getUserEncoder=Xe;exports.getUserMutArgsCodec=G_;exports.getUserMutArgsDecoder=$e;exports.getUserMutArgsEncoder=Qe;exports.getUserReadOnlyArgsCodec=J_;exports.getUserReadOnlyArgsDecoder=Ot;exports.getUserReadOnlyArgsEncoder=Lt;exports.getUserReadOnlyOrMutateArgsCodec=X_;exports.getUserReadOnlyOrMutateArgsDecoder=Fe;exports.getUserReadOnlyOrMutateArgsEncoder=He;exports.getUserRoleCodec=rv;exports.getUserRoleDecoder=je;exports.getUserRoleEncoder=Ke;exports.getWalletAddressFromIndex=C5;exports.getWalletAddressFromSettings=Ue;exports.getWhitelistedAddressTreeCodec=fU;exports.getWhitelistedAddressTreeDecoder=qc;exports.getWhitelistedAddressTreeDiscriminatorBytes=TU;exports.getWhitelistedAddressTreeEncoder=pf;exports.getWhitelistedAddressTreeFromIndex=$s;exports.getWhitelistedAddressTreeIndexFromAddress=u5;exports.getWhitelistedAddressTreesAddress=IA;exports.identifyMultiWalletAccount=zN;exports.identifyMultiWalletInstruction=KN;exports.initialize=Gw;exports.isConfigAction=CR;exports.isExtensionStruct=VR;exports.isMultiWalletError=QN;exports.isUserReadOnlyOrMutateArgs=$_;exports.migrateSettings=J6;exports.migrateUsers=eV;exports.nativeTransferIntent=VV;exports.parseAddWhitelistedAddressTreesInstruction=wU;exports.parseChangeConfigCompressedInstruction=nW;exports.parseChangeConfigInstruction=qU;exports.parseCreateCompressedWalletInstruction=pW;exports.parseCreateDomainConfigInstruction=EW;exports.parseCreateDomainUserAccountInstruction=WW;exports.parseCreateGlobalCounterInstruction=FW;exports.parseCreateUserAccountsInstruction=QW;exports.parseDecompressSettingsAccountInstruction=ak;exports.parseDisableDomainConfigInstruction=yk;exports.parseEditDomainConfigInstruction=Pk;exports.parseEditTransactionManagerUrlInstruction=kk;exports.parseEditUserDelegateInstruction=Gk;exports.parseMigrateCompressedSettingsInstruction=Qk;exports.parseMigrateCompressedUsersInstruction=aL;exports.parseNativeTransferIntentCompressedInstruction=ML;exports.parseNativeTransferIntentInstruction=TL;exports.parseSecp256r1VerifyInstruction=lV;exports.parseTokenTransferIntentCompressedInstruction=jL;exports.parseTokenTransferIntentInstruction=OL;exports.parseTransactionBufferCloseCompressedInstruction=uO;exports.parseTransactionBufferCloseInstruction=tO;exports.parseTransactionBufferCreateCompressedInstruction=RO;exports.parseTransactionBufferCreateInstruction=SO;exports.parseTransactionBufferExecuteCompressedInstruction=jO;exports.parseTransactionBufferExecuteInstruction=BO;exports.parseTransactionBufferExtendCompressedInstruction=iB;exports.parseTransactionBufferExtendInstruction=eB;exports.parseTransactionBufferVoteCompressedInstruction=MB;exports.parseTransactionBufferVoteInstruction=TB;exports.parseTransactionExecuteCompressedInstruction=FB;exports.parseTransactionExecuteInstruction=kB;exports.parseTransactionExecuteSyncCompressedInstruction=cN;exports.parseTransactionExecuteSyncInstruction=XB;exports.pollJitoBundleConfirmation=k5;exports.prepareChangeConfigArgs=cF;exports.prepareTransactionBundle=mF;exports.prepareTransactionMessage=hF;exports.prepareTransactionSync=UF;exports.retrieveTransactionManager=r6;exports.sendJitoBundle=gM;exports.serializeConfigActions=s6;exports.signAndSendBundledTransactions=W5;exports.signAndSendTransaction=H5;exports.tokenTransferIntent=$V;exports.userReadOnlyOrMutateArgs=Q_;exports.vaultTransactionMessageDeserialize=ju;exports.vaultTransactionMessageSerialize=Ku;exports.voteTransactionBuffer=QA;//# sourceMappingURL=index.cjs.map
|
|
3
4
|
//# sourceMappingURL=index.cjs.map
|