@revibase/core 0.0.29 → 0.0.31
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -42
- package/dist/index.d.ts +41 -42
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var gill=require('gill'),Un=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),superstruct=require('superstruct'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Un__default=/*#__PURE__*/_interopDefault(Un);var Hn=new Uint8Array([201,232,212,229,59,241,106,197]);function FC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hn)}function Yd(){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:Hn}))}function Vn(){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 zC(){return gill.combineCodec(Yd(),Vn())}function Gn(e){return gill.decodeAccount(e,Vn())}async function Fn(e,n,r){let s=await Zd(e,n,r);return gill.assertAccountExists(s),s}async function Zd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gn(s)}async function KC(e,n,r){let s=await Xd(e,n,r);return gill.assertAccountsExist(s),s}async function Xd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gn(t))}function JC(){return 846}var Jn=new Uint8Array([42,206,176,58,175,129,130,233]);function YC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Jn)}function Au(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Jn}))}function jn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function ZC(){return gill.combineCodec(Au(),jn())}function qn(e){return gill.decodeAccount(e,jn())}async function XC(e,n,r){let s=await gu(e,n,r);return gill.assertAccountExists(s),s}async function gu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return qn(s)}async function $C(e,n,r){let s=await yu(e,n,r);return gill.assertAccountsExist(s),s}async function yu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>qn(t))}function QC(){return 24}function mr(){return gill.getStructEncoder([["memberKey",$()],["permissions",ve()],["verifyArgs",gill.getOptionEncoder(B())],["userArgs",_e()]])}function Tr(){return gill.getStructDecoder([["memberKey",Q()],["permissions",be()],["verifyArgs",gill.getOptionDecoder(w())],["userArgs",Ue()]])}function nD(){return gill.combineCodec(mr(),Tr())}function lr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function fr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function cD(){return gill.combineCodec(lr(),fr())}function rt(){return gill.getStructEncoder([["treeInfo",st()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function nt(){return gill.getStructDecoder([["treeInfo",ot()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function uD(){return gill.combineCodec(rt(),nt())}function ct(){return gill.getStructEncoder([["treeInfo",st()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function at(){return gill.getStructDecoder([["treeInfo",ot()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function pD(){return gill.combineCodec(ct(),at())}function Dr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Mr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function lD(){return gill.combineCodec(Dr(),Mr())}function it(){return gill.getStructEncoder([["data",gill.getOptionEncoder(dt())]])}function z(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ut())]])}function ID(){return gill.combineCodec(it(),z())}function dt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(At())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ut(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(gt())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function ED(){return gill.combineCodec(dt(),ut())}function yt(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Pr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(mr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(vr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function pt(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Rr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Tr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(br())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function vD(){return gill.combineCodec(yt(),pt())}function bD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function _D(e,n){return n.__kind===e}function _r(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",We()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",ye()]])}function Ur(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Le()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",pe()]])}function OD(){return gill.combineCodec(_r(),Ur())}function Pr(){return gill.getStructEncoder([["memberKey",$()],["permissions",ve()]])}function Rr(){return gill.getStructDecoder([["memberKey",Q()],["permissions",be()]])}function ND(){return gill.combineCodec(Pr(),Rr())}function mt(){return gill.getStructEncoder([["memberKey",$()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Tt(){return gill.getStructDecoder([["memberKey",Q()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function FD(){return gill.combineCodec(mt(),Tt())}function Wr(){return gill.getStructEncoder([["settingsMutArgs",de()],["transactionManager",gill.getOptionEncoder(fe())]])}function Lr(){return gill.getStructDecoder([["settingsMutArgs",ue()],["transactionManager",gill.getOptionDecoder(Se())]])}function jD(){return gill.combineCodec(Wr(),Lr())}function At(){return gill.getStructEncoder([["pubkey",$()],["permissions",ve()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function gt(){return gill.getStructDecoder([["pubkey",Q()],["permissions",be()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function XD(){return gill.combineCodec(At(),gt())}function $(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function Q(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function eM(){return gill.combineCodec($(),Q())}function wr(){return gill.getStructEncoder([["authorityCreationArgs",ye()],["compressedProofArgs",M()]])}function kr(){return gill.getStructDecoder([["authorityCreationArgs",pe()],["compressedProofArgs",E()]])}function sM(){return gill.combineCodec(wr(),kr())}function lt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function ft(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function aM(){return gill.combineCodec(lt(),ft())}function st(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function ot(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function uM(){return gill.combineCodec(st(),ot())}function ve(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function be(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function yM(){return gill.combineCodec(ve(),be())}function M(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Dr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Mr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function lM(){return gill.combineCodec(M(),E())}function vr(){return gill.getStructEncoder([["memberKey",$()],["userArgs",_e()]])}function br(){return gill.getStructDecoder([["memberKey",Q()],["userArgs",Ue()]])}function IM(){return gill.combineCodec(vr(),br())}function Nr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function St(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function MM(){return gill.combineCodec(Nr(),St())}function B(){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 w(){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 PM(){return gill.combineCodec(B(),w())}function ee(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",B()]])}function te(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",w()]])}function _M(){return gill.combineCodec(ee(),te())}function xt(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function It(){return gill.getStructDecoder([["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()]])}function OM(){return gill.combineCodec(xt(),It())}function Ct(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Dt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function kM(){return gill.combineCodec(Ct(),Dt())}function de(){return gill.getStructEncoder([["accountMeta",rt()],["data",it()]])}function ue(){return gill.getStructDecoder([["accountMeta",nt()],["data",z()]])}function GM(){return gill.combineCodec(de(),ue())}function se(){return gill.getStructEncoder([["accountMeta",ct()],["data",it()]])}function oe(){return gill.getStructDecoder([["accountMeta",at()],["data",z()]])}function JM(){return gill.combineCodec(se(),oe())}function Mt(){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.getOptionEncoder(gill.getArrayEncoder(mt()))]])}function Et(){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.getOptionDecoder(gill.getArrayDecoder(Tt()))]])}function ZM(){return gill.combineCodec(Mt(),Et())}function ht(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(lr())],["addressTableLookups",gill.getArrayEncoder(Hr())]])}function Pt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(fr())],["addressTableLookups",gill.getArrayDecoder(Vr())]])}function eE(){return gill.combineCodec(ht(),Pt())}function Hr(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Vr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function nE(){return gill.combineCodec(Hr(),Vr())}function Oe(){return gill.getStructEncoder([["member",$()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",We()],["delegatedTo",gill.getOptionEncoder(Ct())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function J(){return gill.getStructDecoder([["member",Q()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Le()],["delegatedTo",gill.getOptionDecoder(Dt())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function aE(){return gill.combineCodec(Oe(),J())}function ye(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function pe(){return gill.getStructDecoder([["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()]])}function AE(){return gill.combineCodec(ye(),pe())}function fe(){return gill.getStructEncoder([["accountMeta",rt()],["data",Oe()]])}function Se(){return gill.getStructDecoder([["accountMeta",nt()],["data",J()]])}function mE(){return gill.combineCodec(fe(),Se())}function zr(){return gill.getStructEncoder([["accountMeta",ct()],["data",Oe()]])}function Kr(){return gill.getStructDecoder([["accountMeta",at()],["data",J()]])}function SE(){return gill.combineCodec(zr(),Kr())}function _e(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([zr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([fe()])]])]])}function Ue(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Kr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([Se()])]])]])}function DE(){return gill.combineCodec(_e(),Ue())}function ME(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function EE(e,n){return n.__kind===e}var Be=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(Be||{});function We(){return gill.getEnumEncoder(Be)}function Le(){return gill.getEnumDecoder(Be)}function RE(){return gill.combineCodec(We(),Le())}var vs=new Uint8Array([223,179,163,190,177,224,67,173]);function mh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(vs)}function Iy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(At(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),3)]]),e=>({...e,discriminator:vs}))}function bs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(gt(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),3)]])}function Th(){return gill.combineCodec(Iy(),bs())}function _s(e){return gill.decodeAccount(e,bs())}async function lh(e,n,r){let s=await qr(e,n,r);return gill.assertAccountExists(s),s}async function qr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return _s(s)}async function fh(e,n,r){let s=await Cy(e,n,r);return gill.assertAccountsExist(s),s}async function Cy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>_s(t))}function Sh(){return 184}var Bs=new Uint8Array([90,36,35,219,93,225,110,96]);function Dh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Bs)}function Gy(){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",$()],["executor",$()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder($())],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(mt()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Bs}))}function ws(){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",Q()],["executor",Q()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(Q())],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(Tt()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Mh(){return gill.combineCodec(Gy(),ws())}function ks(e){return gill.decodeAccount(e,ws())}async function Ns(e,n,r){let s=await Fy(e,n,r);return gill.assertAccountExists(s),s}async function Fy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ks(s)}async function Eh(e,n,r){let s=await zy(e,n,r);return gill.assertAccountsExist(s),s}async function zy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ks(t))}var Gs=new Uint8Array([105,23,173,2,197,255,80,87]);function Rh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gs)}function ip(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Gs}))}function Fs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function vh(){return gill.combineCodec(ip(),Fs())}function zs(e){return gill.decodeAccount(e,Fs())}async function Ks(e,n,r){let s=await dp(e,n,r);return gill.assertAccountExists(s),s}async function dp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return zs(s)}async function bh(e,n,r){let s=await up(e,n,r);return gill.assertAccountsExist(s),s}async function up(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zs(t))}function p({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 js(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function K(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 m(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:K(r.value),role:Js(r.value)?gill.upgradeRoleToSigner(s):s,...Js(r.value)?{signer:r.value}:{}})}}function Js(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Ys=new Uint8Array([8]);function jh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ys)}function rn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ys}))}function Zs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function qh(){return gill.combineCodec(rn(),Zs())}async function Xs(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:rn().encode(c),programAddress:r})}function Yh(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:rn().encode(c),programAddress:r})}function Zh(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:Zs().decode(e.data)}}var to=new Uint8Array([9]);function nP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(to)}function nn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(yt())],["compressedProofArgs",gill.getOptionEncoder(M())]]),e=>({...e,discriminator:to}))}function ro(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(pt())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function sP(){return gill.combineCodec(nn(),ro())}async function no(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??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.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(js(c.settingsIndex))]})),t.authority.value||(t.authority.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(K(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:nn().encode(c),programAddress:r})}function oP(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:nn().encode(c),programAddress:r})}function cP(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(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ro().decode(e.data)}}var co=new Uint8Array([20]);function yP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(co)}function ao(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(yt())],["settingsMut",de()],["compressedProofArgs",M()]]),e=>({...e,discriminator:co}))}function io(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(pt())],["settingsMut",ue()],["compressedProofArgs",E()]])}function pP(){return gill.combineCodec(ao(),io())}function uo(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ao().encode(c),programAddress:r})}function mP(e){if(e.accounts.length<4)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(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:io().decode(e.data)}}var yo=new Uint8Array([17]);function CP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(yo)}function po(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",de()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:yo}))}function mo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["settingsMutArgs",ue()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function DP(){return gill.combineCodec(po(),mo())}function To(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}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:po().encode(c),programAddress:r})}function MP(e){if(e.accounts.length<4)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()},data:mo().decode(e.data)}}var Mo=new Uint8Array([0]);function _P(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function on(){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",ye()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Mo}))}function Eo(){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",pe()],["compressedProofArgs",E()]])}function UP(){return gill.combineCodec(on(),Eo())}async function ho(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:on().encode(c),programAddress:r})}function WP(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:on().encode(c),programAddress:r})}function LP(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:Eo().decode(e.data)}}var Ro=new Uint8Array([4]);function VP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["member",Nr()],["role",We()],["userAccountCreationArgs",ye()],["linkWalletArgs",gill.getOptionEncoder(Wr())]]),e=>({...e,discriminator:Ro}))}function vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",St()],["role",Le()],["userAccountCreationArgs",pe()],["linkWalletArgs",gill.getOptionDecoder(Lr())]])}function GP(){return gill.combineCodec(an(),vo())}async function bo(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function FP(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function zP(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:vo().decode(e.data)}}var Uo=new Uint8Array([3]);function ZP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uo)}function un(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Uo}))}function Wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function XP(){return gill.combineCodec(un(),Wo())}async function Lo(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=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:un().encode({}),programAddress:r})}function $P(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=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:un().encode({}),programAddress:r})}function QP(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:Wo().decode(e.data)}}var wo=new Uint8Array([19]);function cR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wo)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["compressedProofArgs",M()],["settingsCreation",xt()],["userArgs",_e()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:wo}))}function ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["compressedProofArgs",E()],["settingsCreation",It()],["userArgs",Ue()],["settingsIndex",gill.getU128Decoder()]])}function aR(){return gill.combineCodec(An(),ko())}async function No(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},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??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.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:An().encode(c),programAddress:r})}function iR(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},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??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.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:An().encode(c),programAddress:r})}function dR(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:{payer:r(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r(),whitelistedAddressTrees:r()},data:ko().decode(e.data)}}var Vo=new Uint8Array([5]);function TR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vo)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayEncoder(_r())]]),e=>({...e,discriminator:Vo}))}function Go(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(Ur())]])}function lR(){return gill.combineCodec(yn(),Go())}async function Fo(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:yn().encode(c),programAddress:r})}function fR(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:yn().encode(c),programAddress:r})}function SR(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:Go().decode(e.data)}}var Jo=new Uint8Array([18]);function hR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jo)}function jo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",de()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:Jo}))}function qo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",ue()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function PR(){return gill.combineCodec(jo(),qo())}function Yo(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:jo().encode(c),programAddress:r})}function RR(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:qo().decode(e.data)}}var $o=new Uint8Array([2]);function LR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($o)}function Qo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:$o}))}function ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function OR(){return gill.combineCodec(Qo(),ec())}function tc(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:Qo().encode(c),programAddress:r})}function BR(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:ec().decode(e.data)}}var oc=new Uint8Array([1]);function FR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oc)}function mn(){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(wr())]]),e=>({...e,discriminator:oc}))}function cc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(kr())]])}function zR(){return gill.combineCodec(mn(),cc())}async function KR(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:mn().encode(c),programAddress:r})}function ac(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:mn().encode(c),programAddress:r})}function JR(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:cc().decode(e.data)}}var uc=new Uint8Array([6]);function QR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(uc)}function Ac(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",fe()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",M()]]),e=>({...e,discriminator:uc}))}function gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Se()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function ev(){return gill.combineCodec(Ac(),gc())}function yc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:Ac().encode(c),programAddress:r})}function tv(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:gc().decode(e.data)}}var Tc=new Uint8Array([7]);function iv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Tc)}function lc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",fe()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["delegateTo",gill.getOptionEncoder(Ct())],["oldSettingsMutArgs",gill.getOptionEncoder(de())],["newSettingsMutArgs",gill.getOptionEncoder(de())],["compressedProofArgs",M()]]),e=>({...e,discriminator:Tc}))}function fc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Se()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["delegateTo",gill.getOptionDecoder(Dt())],["oldSettingsMutArgs",gill.getOptionDecoder(ue())],["newSettingsMutArgs",gill.getOptionDecoder(ue())],["compressedProofArgs",E()]])}function dv(){return gill.combineCodec(lc(),fc())}function Sc(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=p(i),o=m(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:lc().encode(c),programAddress:r})}function uv(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:fc().decode(e.data)}}var Cc=new Uint8Array([33]);function lv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Cc)}function Dc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",dt()],["compressedProofArgs",M()],["settingsCreationArgs",xt()]]),e=>({...e,discriminator:Cc}))}function Mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ut()],["compressedProofArgs",E()],["settingsCreationArgs",It()]])}function fv(){return gill.combineCodec(Dc(),Mc())}function Ec(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:Dc().encode(c),programAddress:r})}function Sv(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:Mc().decode(e.data)}}var Rc=new Uint8Array([32]);function hv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Rc)}function vc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Oe()],["compressedProofArgs",M()],["userCreationArgs",ye()]]),e=>({...e,discriminator:Rc}))}function bc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",J()],["compressedProofArgs",E()],["userCreationArgs",pe()]])}function Pv(){return gill.combineCodec(vc(),bc())}function _c(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:vc().encode(c),programAddress:r})}function Rv(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:bc().decode(e.data)}}var Wc=new Uint8Array([30]);function Ov(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wc)}function Tn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:Wc}))}function Lc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function Bv(){return gill.combineCodec(Tn(),Lc())}async function wv(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},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(K(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(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:Tn().encode(c),programAddress:r})}function Oc(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},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=p(i),o=m(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:Tn().encode(c),programAddress:r})}function kv(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:Lc().decode(e.data)}}var kc=new Uint8Array([28]);function Kv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(kc)}function Nc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:kc}))}function Hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function Jv(){return gill.combineCodec(Nc(),Hc())}function Vc(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=p(i),o=m(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:Nc().encode(c),programAddress:r})}function jv(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:Hc().decode(e.data)}}var Fc=new Uint8Array([31]);function eb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fc)}function fn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:Fc}))}function zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function tb(){return gill.combineCodec(fn(),zc())}async function rb(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??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(K(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.source.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.destination.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:fn().encode(c),programAddress:r})}function Kc(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??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.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:fn().encode(c),programAddress:r})}function nb(e){if(e.accounts.length<11)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(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:zc().decode(e.data)}}var Yc=new Uint8Array([29]);function ub(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yc)}function Sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Yc}))}function Zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function Ab(){return gill.combineCodec(Sn(),Zc())}async function gb(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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??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.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.source.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.destination.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Sn().encode(c),programAddress:r})}function Xc(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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??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.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Sn().encode(c),programAddress:r})}function yb(e){if(e.accounts.length<11)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(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Zc().decode(e.data)}}var ea=new Uint8Array([13]);function xb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ea)}function ta(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:ea}))}function ra(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Ib(){return gill.combineCodec(ta(),ra())}function na(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},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=p(i),o=m(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:ta().encode(c),programAddress:r})}function Cb(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:ra().decode(e.data)}}var ca=new Uint8Array([24]);function vb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ca)}function aa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ca}))}function ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function bb(){return gill.combineCodec(aa(),ia())}function da(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=p(i),o=m(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:aa().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(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ia().decode(e.data)}}var ga=new Uint8Array([10]);function kb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ga)}function ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Mt()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:ga}))}function pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Et()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Nb(){return gill.combineCodec(ya(),pa())}function ma(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=p(i),o=m(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:ya().encode(c),programAddress:r})}function Hb(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:pa().decode(e.data)}}var fa=new Uint8Array([21]);function jb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fa)}function Sa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Mt()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:fa}))}function xa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Et()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function qb(){return gill.combineCodec(Sa(),xa())}function Ia(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=p(i),o=m(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:Sa().encode(c),programAddress:r})}function Yb(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:xa().decode(e.data)}}var Ma=new Uint8Array([14]);function r_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ma)}function Ea(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:Ma}))}function ha(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function n_(){return gill.combineCodec(Ea(),ha())}function Pa(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},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=p(i),o=m(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:Ea().encode(c),programAddress:r})}function s_(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:ha().decode(e.data)}}var ba=new Uint8Array([25]);function A_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ba)}function _a(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ba}))}function Ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function g_(){return gill.combineCodec(_a(),Ua())}function Wa(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=p(i),o=m(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:_a().encode(c),programAddress:r})}function y_(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:Ua().decode(e.data)}}var Ba=new Uint8Array([12]);function S_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ba)}function wa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Ba}))}function ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function x_(){return gill.combineCodec(wa(),ka())}function Na(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:wa().encode(c),programAddress:r})}function I_(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:ka().decode(e.data)}}var Ga=new Uint8Array([23]);function P_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function Fa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ga}))}function za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function R_(){return gill.combineCodec(Fa(),za())}function Ka(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Fa().encode(c),programAddress:r})}function v_(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:za().decode(e.data)}}var qa=new Uint8Array([11]);function B_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qa)}function Ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:qa}))}function Za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function w_(){return gill.combineCodec(Ya(),Za())}function Xa(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=p(i),o=m(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:Ya().encode(c),programAddress:r})}function k_(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:Za().decode(e.data)}}var ei=new Uint8Array([22]);function K_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ei)}function ti(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ei}))}function ri(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function J_(){return gill.combineCodec(ti(),ri())}function ni(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=p(i),o=m(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:ti().encode(c),programAddress:r})}function j_(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:ri().decode(e.data)}}var ci=new Uint8Array([15]);function Q_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ci)}function ai(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:ci}))}function ii(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function eU(){return gill.combineCodec(ai(),ii())}function di(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=p({}),a=m(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:ai().encode({}),programAddress:r})}function tU(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:ii().decode(e.data)}}var gi=new Uint8Array([26]);function aU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gi)}function yi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:gi}))}function pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function iU(){return gill.combineCodec(yi(),pi())}function mi(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:yi().encode(c),programAddress:r})}function dU(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:pi().decode(e.data)}}var fi=new Uint8Array([16]);function TU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fi)}function Si(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",ht()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:fi}))}function xi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Pt()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function lU(){return gill.combineCodec(Si(),xi())}function Ii(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Si().encode(c),programAddress:r})}function fU(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:xi().decode(e.data)}}var Mi=new Uint8Array([27]);function EU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mi)}function Ei(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",ht()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Mi}))}function hi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Pt()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",E()]])}function hU(){return gill.combineCodec(Ei(),hi())}function Pi(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ei().encode(c),programAddress:r})}function PU(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:hi().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",JS=(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))(JS||{});function gW(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 jS=(l=>(l[l.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",l[l.ChangeConfig=1]="ChangeConfig",l[l.ChangeConfigCompressed=2]="ChangeConfigCompressed",l[l.CompressSettingsAccount=3]="CompressSettingsAccount",l[l.CreateDomainConfig=4]="CreateDomainConfig",l[l.CreateDomainUserAccount=5]="CreateDomainUserAccount",l[l.CreateGlobalCounter=6]="CreateGlobalCounter",l[l.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",l[l.CreateUserAccounts=8]="CreateUserAccounts",l[l.DecompressSettingsAccount=9]="DecompressSettingsAccount",l[l.DisableDomainConfig=10]="DisableDomainConfig",l[l.EditDomainConfig=11]="EditDomainConfig",l[l.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",l[l.EditUserDelegate=13]="EditUserDelegate",l[l.MigrateCompressedSettings=14]="MigrateCompressedSettings",l[l.MigrateCompressedUsers=15]="MigrateCompressedUsers",l[l.NativeTransferIntent=16]="NativeTransferIntent",l[l.NativeTransferIntentCompressed=17]="NativeTransferIntentCompressed",l[l.TokenTransferIntent=18]="TokenTransferIntent",l[l.TokenTransferIntentCompressed=19]="TokenTransferIntentCompressed",l[l.TransactionBufferClose=20]="TransactionBufferClose",l[l.TransactionBufferCloseCompressed=21]="TransactionBufferCloseCompressed",l[l.TransactionBufferCreate=22]="TransactionBufferCreate",l[l.TransactionBufferCreateCompressed=23]="TransactionBufferCreateCompressed",l[l.TransactionBufferExecute=24]="TransactionBufferExecute",l[l.TransactionBufferExecuteCompressed=25]="TransactionBufferExecuteCompressed",l[l.TransactionBufferExtend=26]="TransactionBufferExtend",l[l.TransactionBufferExtendCompressed=27]="TransactionBufferExtendCompressed",l[l.TransactionBufferVote=28]="TransactionBufferVote",l[l.TransactionBufferVoteCompressed=29]="TransactionBufferVoteCompressed",l[l.TransactionExecute=30]="TransactionExecute",l[l.TransactionExecuteCompressed=31]="TransactionExecuteCompressed",l[l.TransactionExecuteSync=32]="TransactionExecuteSync",l[l.TransactionExecuteSyncCompressed=33]="TransactionExecuteSyncCompressed",l))(jS||{});function yW(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([20])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),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([19])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([33])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 32;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 33;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var YS=6e3,ZS=6001,XS=6002,$S=6003,QS=6004,ex=6005,tx=6006,rx=6007,nx=6008,sx=6009,ox=6010,cx=6011,ax=6012,ix=6013,dx=6014,ux=6015,Ax=6016,gx=6017,yx=6018,px=6019,mx=6020,Tx=6021,lx=6022,fx=6023,Sx=6024,xx=6025,Ix=6026,Cx=6027,Dx=6028,Mx=6029,Ex=6030,hx=6031,Px=6032,Rx=6033,vx=6034,bx=6035,_x=6036,Ux=6037,Wx=6038,Lx=6039,Ox=6040,Bx=6041,wx=6042,kx=6043,Nx=6044,Hx=6045,Vx=6046,Gx=6047,Fx=6048,zx=6049,Kx=6050,Jx=6051,jx=6052,qx=6053,Ri;process.env.NODE_ENV!=="production"&&(Ri={[Ex]:"This member is already delegated to another wallet.",[rx]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[zx]:"The domain configuration account is disabled. Please contact support or try again later.",[Kx]:"Missing domain configuration account.",[ox]:"Duplicate public keys detected among members. Each member must have a unique key.",[sx]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[mx]:"No members provided. A multisig wallet must contain at least one member.",[yx]:"Expected a User with Administrator role for this instruction.",[nx]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[Ax]:"Expected a User with Transaction Manager role for this instruction.",[Lx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Ox]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Bx]:"Declared buffer size does not match the actual serialized size.",[Rx]:"Not enough members with vote permission to meet the approval threshold.",[hx]:"At least one signer with execute permission is required to proceed.",[Px]:"At least one signer with initiate permission is required to perform this action.",[xx]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[qx]:"Address Tree supplied is not part of the whitelisted address trees",[px]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[Cx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Wx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[vx]:"Only delegated members are allowed for this transaction.",[Sx]:"Unexpected number of accounts provided for this instruction.",[ix]:"User with Permanent Member role requires a must have a delegated wallet.",[ZS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[QS]:"The extracted public key has an invalid length or encoding.",[YS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[$S]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Gx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[lx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[gx]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[ux]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[fx]:"Malformed transaction message: structure or formatting does not match the expected layout.",[Ix]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[ex]:"The extracted WebAuthn signed message payload is malformed.",[Hx]:"An input string exceeds the maximum allowed character length.",[Jx]:"This member is not registered under the provided domain configuration.",[Dx]:"A required account is missing from the instruction context.",[Vx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[Mx]:"User mutation arguments are required when performing add or remove delegate operations.",[_x]:"No valid signer found in this transaction.",[ax]:"Only one permanent member is allowed per wallet.",[dx]:"Only one transaction manager is allowed per wallet.",[jx]:"The given origin index is not in the whitelisted origins.",[cx]:"Permanent members cannot be removed from a wallet.",[Nx]:"Writable CPI calls to protected accounts are not permitted.",[tx]:"The rpIdHash extracted from the signed message does not match the expected value.",[XS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Fx]:"The specified slot number was not found in the provided slot history.",[Tx]:"Too many members: a maximum of 4 members are supported.",[wx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[kx]:"This transaction has not yet reached the required approval threshold.",[Ux]:"Only the transaction creator or rent payer may close this transaction buffer.",[bx]:"Member is not part of the expected signers for this transaction."});function SW(e){return process.env.NODE_ENV!=="production"?Ri[e]:"Error message not available in production bundles."}function xW(e,n,r){return gill.isProgramError(e,n,A,r)}var Ut={Ed25519:1,Secp256r1:2};var xe={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},De=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(xe).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Cn=33,Me=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!==Cn)throw new Error(`Invalid public key length, expected ${Cn} 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===Cn)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()}},D=class extends Me{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 Xx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function $x(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var bi=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Xx())],["addressTableLookups",gill.getArrayCodec($x())]]);function _i(e){return bi.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 Ui(e){let n=bi.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}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var Wi="revibase.com",Li="https://auth.revibase.com",Oi="https://api.revibase.com";function Ke(e=`${Je()}/loading`){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let n=window.innerWidth||screen.availWidth,r=window.innerHeight||screen.availHeight,s=n<=768,t,c,i,a;if(s)t=n,c=r,i=0,a=0;else {let u=window.screenLeft??window.screenX,g=window.screenTop??window.screenY,y=window.innerWidth??document.documentElement.clientWidth??screen.width,T=window.innerHeight??document.documentElement.clientHeight??screen.height;t=500,c=600,a=u+(y-t)/2,i=g+(T-c)/2;}let o=[`width=${t}`,`height=${c}`,`top=${i}`,`left=${a}`,"toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes"].join(","),d=window.open(e,"_blank",o);return d&&d.focus(),d}function cL(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+rr(n.get(-2))),y:BigInt("0x"+rr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function aL(e){let r=nist_js.p256.Point.fromBytes(new Uint8Array(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 iL(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(he(n)),c=JSON.parse(new TextDecoder().decode(he(r))),i=Ni(c),a=Vi(new Uint8Array(he(s))),o=await je({rpIdHash:t.subarray(0,32)});return new D(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(he(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:Mn(e.clientSignature.clientOrigin,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}async function dL(e,n){let{data:r}=await Fn(re(),e),t=Hi(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}function Mn(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function uL(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function AL(e){return En(e.data.payload.authResponse)}function gL(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...Mn(n,r,s)]))}async function yL(e,n,r,s,t,c){let i;if(!t||!c){let o=(await re().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed"}).send()).value?.data;if(!o)throw new Error("Unable to fetch slot sysvar");let d=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(d.subarray(8,16)).toString(),i=d.subarray(16,48),t=gill.getBase58Decoder().decode(i);}else i=new Uint8Array(gill.getBase58Encoder().encode(t));let a=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...sha2_js.sha256(typeof e.transactionMessageBytes=="string"?new Uint8Array(he(e.transactionMessageBytes)):e.transactionMessageBytes),...i,...Mn(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:a}}function En(e){return sha2_js.sha256(sr(e))}function ki(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function he(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 c}var aI=600*1e3,iI=500;async function or({authUrl:e,payload:n,signature:r,popUp:s=null}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");return new Promise((t,c)=>{let i=new URL(e).origin,a=false,o=null,d=()=>{if(!a){a=true,clearTimeout(u),clearInterval(g),o?.close();try{s&&!s.closed&&s.close();}catch{}}},u=setTimeout(()=>{d(),c(new Error("Authentication timed out"));},aI),g=setInterval(()=>{s?.closed&&(d(),c(new Error("User closed the authentication window")));},iI);if(!s)s=Ke(e);else try{s.location.href!==e&&s.location.replace(e);}catch{s.location.replace(e);}if(!s){d(),c(new Error("Popup blocked. Please enable popups."));return}let y=T=>{T.origin===i&&T.data?.type==="popup-connect"&&T.ports?.[0]&&(o=T.ports[0],o.start(),o.postMessage({type:"popup-init",payload:n,signature:r}),o.onmessage=f=>{let C=f.data;switch(C.type){case "popup-complete":d(),t(C.payload);break;case "popup-error":d(),c(new Error(C.error));break;case "popup-closed":d(),c(new Error("User closed the authentication window"));break}},window.removeEventListener("message",y));};window.addEventListener("message",y);})}function rr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function dI(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 Ni(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 Hi(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 Vi(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 h=n&127;r+=h;}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 y=nist_js.p256.Point.CURVE().n>>1n,T=BigInt("0x"+rr(u)),C=(T>y?nist_js.p256.Point.CURVE().n-T:T).toString(16).padStart(64,"0"),x=dI(C);return new Uint8Array([...g,...x])}function sr(e){return new Uint8Array([...new Uint8Array(he(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(he(e.response.clientDataJSON)))])}async function Pn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await re().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)||8e5;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 Ki(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 Ji(e,n){if(e.length===0)throw new Error("Bundle is empty.");for(let c=0;c<e.length;c++){if(e[c].length>1644)throw new Error(`Transaction ${c} exceeds maximum length, ${e[c].length}. Retry again.`);console.log(`Transaction ${c} length: ${e[c].length}`);}let r=await 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:[]}))}]})});if(!r.ok)throw console.error(await r.json()),new Error("Failed to simulate bundle");let{result:s,error:t}=await r.json();if(!s||t)throw console.error(t??s),new Error(`Unable to simulate bundle: ${JSON.stringify(t??s)}`);if(typeof s.value.summary!="string"&&s.value.summary.failed){let{TransactionFailure:c}=s.value.summary.failed.error,[,i]=c;throw console.error(t??s),new Error(`Simulation failed: ${i}`)}return s.value.transactionResults.map(c=>c.unitsConsumed)}function G(e,n=0){let r=e instanceof D?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}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs?.clientDataJson?sr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function qe(e){if(e instanceof Me)return {keyType:Ut.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:Ut.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function zi(e){return e instanceof D?e.toString():e.address.toString()}function Ae(e){let n=new Set,r=[];for(let s of e)n.has(zi(s))||(r.push(s),n.add(zi(s)));if(r.filter(s=>s instanceof D).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function ji({payer:e,tipAmount:n}){let r=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],s=r[Math.floor(Math.random()*r.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(s),amount:n})}async function qi(e){let n=await fetch(`${e}/getRandomPayer`),{randomPayer:r}=await n.json();return {address:gill.address(r),async signTransactions(s){let t={publicKey:r,transactions:s.map(a=>gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)))},i=await(await fetch(`${e}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(a=>({[gill.address(r)]:gill.getBase58Encoder().encode(a)}))}}}var _={};function Ye(){if(!_.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return _.solanaRpcEndpoint}function Ne(){if(!_.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return _.lightProtocolRpc}function re(){if(!_.solanaRpc)throw new Error("Rpc is not initialized yet");return _.solanaRpc}function Yi(){if(!_.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return _.sendAndConfirm}function Zi(){if(!_.computeEstimate)throw new Error("Rpc is not initialized yet");return _.computeEstimate}async function _L(){return _.feePayer||(_.feePayer=await qi(_.apiEndpoint??Oi)),_.feePayer}function Rn(){if(!_.jitoTipsConfig)throw new Error("Jito Bundle Config is not set.");return _.jitoTipsConfig}function Je(){return _.authEndpoint??Li}function UL(){return _.rpId??Wi}function cr(){if(!_.onClientAuthorizationCallback)throw new Error("No client authorization callback found.");return _.onClientAuthorizationCallback}function WL(){Object.keys(_).forEach(e=>{_[e]=void 0;});}function LL({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,rpId:i,onClientAuthorizationCallback:a}){_.solanaRpcEndpoint=e,_.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:o,sendAndConfirmTransaction:d}=gill.createSolanaClient({urlOrMoniker:e});_.solanaRpc=o,_.sendAndConfirm=d,_.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:o}),_.apiEndpoint=t??null,_.jitoTipsConfig=s??null,_.authEndpoint=c??null,_.rpId=i??null,_.onClientAuthorizationCallback=a??null;}var U=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=Ye().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().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 ar(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await Qi(e);return s&&n?.set(e.toString(),s),s}}async function ce(e,n){let s=(await Promise.all(e.map(async t=>ar(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new Error("Unable to find compressed account.");return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function b(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 Y(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 Error("Unable to parsed 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 Te(e,n,r,s,t){let c=null,i=null,a=new U;if(e){await a.addSystemAccounts();let{address:o}=await j(n,r),d=(await ce([{address:o,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await k([d],[]);let u=a.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!u)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:u.packedTreeInfos[0]},data:z().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:a}}async function k(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Ne().getValidityProofV0(e,n)}catch(c){if(console.error(`Attempt ${t}, Get Validity Proof failed. ${c}`),t++,t>=r)throw new Error(`Failed to get validity proof after ${r} attempts: ${c}`);await new Promise(i=>setTimeout(i,s));}throw new Error(`Failed to get validity proof after ${r} attempts`)}async function le(){return (await ir()).length-1}var vn;async function ir(){if(!vn){let{data:e}=await Ks(re(),await ed());vn=e.whitelistedAddressTrees;}return vn}async function dr(e,n,r){let s=await jI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function jI(e,n,r){let{address:s}=await N(e,n),t=await ar(s,r);return t?.data?.data?J().decode(t.data.data):null}async function Ot(e,n,r){let s=await qI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function qI(e,n,r){try{let{address:s}=await j(e,n),t=await ar(s,r);if(!t?.data?.data)throw new Error("No compressed settings account found.");let c=z().decode(t.data.data);if(c.data.__option==="None")throw new Error("No compressed settings account found.");return {...c.data.value,isCompressed:!0}}catch{let s=await qr(re(),await Z(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function bn(e){let n=await ir();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function cO(e){let r=(await ir()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function Qi(e){let n=await stateless_js.rpcRequest(Ne().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),r;if(stateless_js.featureFlags.isV2()?r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in r)throw new web3_js.SolanaJSONRPCError(r.error,`failed to get info for compressed account ${e?e.toString():""}`);if(r.result.value===null)return null;let s=stateless_js.featureFlags.isV2()?r.result.value.merkleContext.tree:r.result.value.tree,t=Ye().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().getStateTreeInfos(),c=stateless_js.getStateTreeInfoByPubkey(t,s),i=r.result.value;return stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(c,i.hash,i.leafIndex),i.owner,stateless_js.bn(i.lamports),i.data?stateless_js.parseAccountData(i.data):void 0,i.address||void 0)}async function j(e,n=0){let r=await bn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(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 bn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof Me?e.toTruncatedBuffer():new Uint8Array(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 je({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new Error("RpId not found.");if(!e)throw new Error("RpIdHash not found.");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function dd(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function ed(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function ud(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Me?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ie(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 Z(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function Ad(e){let n=await Z(e);return await Ie(n)}async function mO(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function RO(e){let n=await Pn(e,true),r=await Ji(n.map(gill.getBase64EncodedWireTransaction),Ye()),s=await Pn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await AC(s.map(gill.getBase64EncodedWireTransaction))}async function vO({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await re().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([Zi()(c),Ki(re(),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 Yi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function AC(e,n=10,r=1e3,s=Rn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/bundles`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})});if(i.status===429&&c<n){await new Promise(o=>setTimeout(o,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);return a.result}throw new Error("Failed to send bundle after retries.")}async function bO(e,n=30,r=3e3,s=Rn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/getBundleStatuses`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});if(i.status===429&&c<n){await new Promise(d=>setTimeout(d,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);let o=a.result;if(o.value.length){let d=o.value[0];if(d.confirmation_status==="confirmed"||d.confirmation_status==="finalized")return d.transactions[d.transactions.length-1]}if(c<n){await new Promise(d=>setTimeout(d,r));continue}}throw new Error("Failed to get bundle status after retries.")}async function _O(e,n,r,s){let t=await Ot(n,r,s);if(t.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:c}=t.members.find(u=>yd(u.pubkey)===e)??{};if(!c)throw new Error("No permissions found for the current member.");let i=De.has(c,xe.InitiateTransaction),a=De.has(c,xe.VoteTransaction),o=De.has(c,xe.ExecuteTransaction);if(i&&a&&o)return {};if(!a||!o)throw new Error("Signer lacks the required Vote/Execute permissions.");let d=t.members.find(u=>u.role===2);if(!d)throw new Error("No transaction manager available in wallet.");return {transactionManagerAddress:gill.address(yd(d.pubkey)),userAddressTreeIndex:d.userAddressTreeIndex}}async function UO({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 Error("Transaction manager endpoint is missing for this account.");return gC(n,c.transactionManagerUrl.value,e,s)}function gC(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let a=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json();if("error"in a)throw new Error(a.error);return a.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function yd(e){return e.keyType===Ut.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function XO({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let i=await lC(r),a=new U,o=null,d=null,u=[];if(i.length||t){let h=await fC({packedAccounts:a,userAccounts:i,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:c});o=h.proof,d=h.settingsMutArgs??null,u=h.userMutArgs??[];}let{configActions:g,secp256r1VerifyInput:y}=await SC({configActionsArgs:r,packedAccounts:a,userMutArgs:u,index:e}),{remainingAccounts:T,systemOffset:f}=a.toAccountMetas(),C=b(o,f);return {instructions:t?[uo({configActions:g,payer:s,authority:gill.createNoopSigner(await Ad(e)),compressedProofArgs:C,settingsMut:d,remainingAccounts:T})]:[await no({settingsIndex:e,configActions:g,payer:s,compressedProofArgs:C,remainingAccounts:T})],secp256r1VerifyInput:y}}async function lC(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 fC({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let T=(await j(s,t)).address;i.push({address:T,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await ce(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await k(a,[]),d=[],u=[];for(let T of a)T.type==="Settings"?d.push(T):T.type==="User"&&u.push(T);let g,y=[];if(r&&o&&(g=Y(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),d,z())[0]),u.length&&o){let T=r?1:0;y=Y(e,o.treeInfos.slice(T),o.leafIndices.slice(T),o.rootIndices.slice(T),o.proveByIndices.slice(T),u,J());}return {proof:o,settingsMutArgs:g,userMutArgs:y}}async function SC({index:e,configActionsArgs:n,packedAccounts:r,userMutArgs:s}){let t=[],c=[];for(let i of n)switch(i.type){case "AddMembers":{let a=[];for(let o of i.members)if(o.member instanceof D){let d=t.length,{message:u,signature:g,publicKey:y,domainConfig:T}=G(o.member,d);u&&g&&y&&t.push({message:u,signature:g,publicKey:y}),T&&r.addPreAccounts([{address:T,role:gill.AccountRole.READONLY}]);let f=await N(o.member,o.userAddressTreeIndex).then(C=>s.find(x=>new Un__default.default(new Uint8Array(x.accountMeta.address)).eq(C.address)));if(!f)throw new Error("Unable to find user account");a.push(pd({permissionArgs:o.permissions,index:d,userMutArgs:f,pubkey:o.member}));}else {let d=await N(o.member,o.userAddressTreeIndex).then(u=>s.find(g=>new Un__default.default(new Uint8Array(g.accountMeta.address)).eq(u.address)));if(!d)throw new Error("Unable to find user account");a.push(pd({permissionArgs:o.permissions,index:-1,userMutArgs:d,pubkey:o.member}));}c.push({__kind:i.type,fields:[a]});break}case "RemoveMembers":{let a=await Promise.all(i.members.map(o=>N(o.member,o.userAddressTreeIndex).then(d=>{let u=s.find(g=>new Un__default.default(new Uint8Array(g.accountMeta.address)).eq(d.address));if(!u)throw new Error("Unable to find user account");return IC({pubkey:o.member,userMutArgs:u,index:e})})));c.push({__kind:i.type,fields:[a]});break}case "EditPermissions":{let a=i.members.map(o=>xC({permissionArgs:o.permissions,pubkey:o.member}));c.push({__kind:i.type,fields:[a]});break}default:c.push({__kind:i.type,fields:[i.threshold]});}return {configActions:c,secp256r1VerifyInput:t}}function xC({pubkey:e,permissionArgs:n}){return {memberKey:qe(e),permissions:md(n)}}function IC({pubkey:e,userMutArgs:n,index:r}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");let s=n.data.delegatedTo.__option==="Some"?Number(n.data.delegatedTo.value.index.toString())===r:false;return {memberKey:qe(e),userArgs:s?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function pd({pubkey:e,permissionArgs:n,index:r,userMutArgs:s}){if(s.data.role===1){if(s.data.delegatedTo.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}else if(s.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:qe(e),permissions:md(n),verifyArgs:e instanceof D&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin,clientAndDeviceHash:e.clientAndDeviceHash}):gill.none(),userArgs:s.data.role===1?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]}}}function md(e){let n=[];return e.initiate&&n.push(xe.InitiateTransaction),e.vote&&n.push(xe.VoteTransaction),e.execute&&n.push(xe.ExecuteTransaction),De.fromPermissions(n)}var Xe=33,$e=64,Bn=14,RC=2,vC=gill.address("Secp256r1SigVerify1111111111111111111111111");function bC(){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 _C(){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 Sd(){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=_C();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=Bn;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Xe).decode(e,n);n+=Xe;let d=gill.fixDecoderSize(gill.getBytesDecoder(),$e).decode(e,n);n+=$e;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 xd(){return gill.createEncoder({getSizeFromValue:e=>{let n=Bn*e.offsets.length,r=e.payload.reduce((s,t)=>s+Xe+$e+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=bC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Xe).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),$e).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function eB(){return gill.combineCodec(xd(),Sd())}function F(e,n){let r=e.length,s=RC+r*Bn,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],u=s,g=u+Xe,y=g+$e;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:y,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Xe+$e+d.length;}let c=n?.programAddress??vC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:xd().encode(i)}}function tB(e){return {programAddress:e.programAddress,accounts:{},data:Sd().decode(e.data)}}async function AB({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=await Z(e),{address:a}=await j(e,n),o=await ce([{address:a,type:"Settings"}],t),d=await k(o,[]),u=Y(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(S=>S.type==="Settings"),z())[0],g=Ae(s),y=g.filter(S=>S instanceof D),T=[],f=[];for(let S of y){let L=T.length,{domainConfig:W,verifyArgs:q,signature:H,publicKey:V,message:O}=G(S,L);O&&H&&V&&T.push({message:O,signature:H,publicKey:V}),W&&(c.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),q?.__option==="Some"&&f.push({domainConfigKey:W,verifyArgs:q.value}));}c.addPreAccounts(g.filter(S=>"address"in S).map(S=>({address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S})));let{remainingAccounts:C,systemOffset:x}=c.toAccountMetas(),h=b(d,x),I=[];return T.length>0&&I.push(F(T)),I.push(To({settings:i,settingsMutArgs:u,compressedProofArgs:h,payer:r,secp256r1VerifyArgs:f,remainingAccounts:C})),I}async function pB({admin:e,addressTree:n}){return Xs({payer:e,addressTree:n,remainingAccounts:[]})}async function IB({payer:e,rpId:n,origins:r,authority:s}){let t=await je({rpId:n}),c=new U;await c.addSystemAccounts();let i=await le(),{address:a,addressTree:o}=await N(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],u=await k([],d),g=(await ae(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:y,systemOffset:T}=c.toAccountMetas(),f=b(u,T);return await ho({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:f,payer:e,domainConfig:t,rpId:n,remainingAccounts:y})}async function _B({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await j(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 ce(i,t):[],o=await le(),{address:d,addressTree:u}=await N(r.member,o),g=[{address:d,type:"User",tree:u,queue:u}],y=await k(a,g),T=null,f=null,C=a.filter(W=>W.type==="Settings"),x=a.filter(W=>W.type==="User");C.length&&(T=Y(c,y.treeInfos.slice(0,1),y.leafIndices.slice(0,1),y.rootIndices.slice(0,1),y.proveByIndices.slice(0,1),C,z())[0]),x.length&&(f=Y(c,y.treeInfos.slice(1,2),y.leafIndices.slice(1,2),y.rootIndices.slice(1,2),y.proveByIndices.slice(1,2),x,J())[0]);let h=await ae(c,y.treeInfos.slice(a.length),y.roots.slice(a.length),y.rootIndices.slice(a.length),g),{remainingAccounts:I,systemOffset:S}=c.toAccountMetas(),L=b(y,S);return await bo({payer:n,authority:e,compressedProofArgs:L,member:St().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:T?gill.some({settingsMutArgs:T,transactionManager:f?gill.some(f):gill.none()}):gill.none(),userAccountCreationArgs:h[0],domainConfig:s,remainingAccounts:I})}async function OB({payer:e}){let n=await dd();return Lo({payer:e,globalCounter:n})}async function GB({createUserArgs:e,payer:n}){let r=new U;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let s=await le(),t=await Promise.all(e.map(async u=>{let{address:g,addressTree:y}=await N(u.member.address,s);return {address:g,tree:y,queue:y,type:"User"}})),c=await k([],t),i=await ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=b(c,o);return await Fo({compressedProofArgs:d,payer:n,createUserArgs:e.map((u,g)=>({member:u.member.address,role:u.role,userCreationArgs:i[g],transactionManagerUrl:u.role===2?u.transactionManagerUrl:null})),remainingAccounts:a})}async function JB({admin:e,rpId:n,disable:r}){let s=await je({rpId:n});return tc({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function QB({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new U;await i.addSystemAccounts();let a=await le(),{address:o,addressTree:d}=await N(r.address,a),u=[{address:o,tree:d,queue:d,type:"User"}],g=await k([],u),y=(await ae(i,g.treeInfos,g.roots,g.rootIndices,u))[0],T=i.toAccountMetas();c=T.remainingAccounts,t={compressedProofArgs:b(g,T.systemOffset),authorityCreationArgs:y};}return ac({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function ow({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new U;await s.addSystemAccounts();let t=await ce([{address:(await N(e.address,n)).address,type:"User"}]),c=await k(t,[]),i=Y(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,J())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=b(c,o);return yc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function mw({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=G(n),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let g=await dr(n instanceof D?n:n.address,r,t),y=[];y.push({address:(await N(n instanceof D?n:n.address,r)).address,type:"User"});let T,f=null,C,x=null;g.delegatedTo.__option==="Some"&&((await Ot(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await j(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),f={start:y.length-1,end:y.length}):T=await Z(g.delegatedTo.value.index)),s&&((await Ot(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await j(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:y.length-1,end:y.length}):C=await Z(s.index));let h=new U;await h.addSystemAccounts();let I=await ce(y,t),S=await k(I,[]),L=Y(h,S.treeInfos.slice(0,1),S.leafIndices.slice(0,1),S.rootIndices.slice(0,1),S.proveByIndices.slice(0,1),I.slice(0,1),J())[0],W=f?gill.some(Y(h,S.treeInfos.slice(f.start,f.end),S.leafIndices.slice(f.start,f.end),S.rootIndices.slice(f.start,f.end),S.proveByIndices.slice(f.start,f.end),I.slice(f.start,f.end),z())[0]):gill.none(),q=x?gill.some(Y(h,S.treeInfos.slice(x.start,x.end),S.leafIndices.slice(x.start,x.end),S.rootIndices.slice(x.start,x.end),S.proveByIndices.slice(x.start,x.end),I.slice(x.start,x.end),z())[0]):gill.none(),{remainingAccounts:H,systemOffset:V}=h.toAccountMetas(),O=b(S,V),ne=[];return u.length>0&&ne.push(F(u)),ne.push(Sc({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof D?void 0:n,oldSettings:T,oldSettingsMutArgs:W,newSettings:C,newSettingsMutArgs:q,compressedProofArgs:O,userMutArgs:L,remainingAccounts:H})),ne}async function Cw({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new U;await t.addSystemAccounts();let{address:c,addressTree:i}=await j(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await k([],a),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),y=b(o,g);return Ec({compressedProofArgs:y,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:u})}async function vw({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new U;await t.addSystemAccounts();let{address:c,addressTree:i}=await N(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await k([],a),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:g}=t.toAccountMetas(),y=b(o,g);return _c({compressedProofArgs:y,args:e,authority:n,userCreationArgs:d,remainingAccounts:u})}async function Xw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=G(r),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let g=new U;await g.addSystemAccounts();let y=[],T=[];T.push(...await ce([{address:(await N("address"in r?r.address:r,s)).address,type:"User"}],t));let f=await le(),{address:C,addressTree:x}=await j(e,f);y.push({address:C,queue:x,tree:x,type:"Settings"});let h=T.length,I=await k(T,y),S=Y(g,I.treeInfos.slice(0,h),I.leafIndices.slice(0,h),I.rootIndices.slice(0,h),I.proveByIndices.slice(0,h),T.filter(ne=>ne.type==="User"),J())[0],W=(await ae(g,I.treeInfos.slice(h),I.roots.slice(h),I.rootIndices.slice(h),y)).find(ne=>ne.type==="Settings")??null;c?g.addPreAccounts([{address:c,role:gill.AccountRole.READONLY}]):"address"in r&&g.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:q,systemOffset:H}=g.toAccountMetas(),V=b(I,H),O=[];if(!W)throw new Error("Settings creation args is missing.");return u.length>0&&O.push(F(u)),O.push(await No({settingsIndex:e,payer:n,initialMember:r instanceof D?void 0:r,secp256r1VerifyArgs:i,domainConfig:c,userArgs:S.data.role===1?{__kind:"Mutate",fields:[S]}:{__kind:"Read",fields:[S]},compressedProofArgs:V,settingsCreation:W,remainingAccounts:q})),O}async function ak({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=await ce([{address:(await j(e,n)).address,type:"Settings"}],t),a=await k(i,[]),o=Y(c,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,i.filter(I=>I.type==="Settings"),z())[0],d=Ae(s),u=d.filter(I=>I instanceof D),g=[],y=[];for(let I of u){let S=g.length,{domainConfig:L,verifyArgs:W,signature:q,publicKey:H,message:V}=G(I,S);V&&q&&H&&g.push({message:V,signature:q,publicKey:H}),L&&(c.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),W?.__option==="Some"&&y.push({domainConfigKey:L,verifyArgs:W.value}));}c.addPreAccounts(d.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:T,systemOffset:f}=c.toAccountMetas(),C=b(a,f),x=[];g.length>0&&x.push(F(g));let h=await Z(e);return x.push(Yo({settings:h,payer:r,settingsMut:o,compressedProofArgs:C,secp256r1VerifyArgs:y,remainingAccounts:T})),x}function BC(e,n,r,s){let t=wC(e,n),c=kC(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 wC(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 kC(e,n){return n<e.header.numSignerAccounts}async function Ar({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ui(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),re()):{}),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:BC(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}}async function hd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Ie(e),{accountMetas:u,addressLookupTableAccounts:g}=await Ar({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),y=[];return c.length>0&&y.push(F(c)),y.push(o?mi({transactionBuffer:n,payer:s.address,remainingAccounts:u,settingsKey:e}):di({transactionBuffer:n,payer:s.address,settings:e})),a&&y.push(ji({payer:s,tipAmount:a})),{instructions:y,addressLookupTableAccounts:g}}async function Pd({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let u=Ae(s),g=await Z(e),y=await Ie(g),[{accountMetas:T,addressLookupTableAccounts:f,transactionMessage:C},{settingsReadonlyArgs:x,proof:h,packedAccounts:I}]=await Promise.all([Ar({transactionMessageBytes:r,walletAddress:y,additionalSigners:u.filter(O=>!(O instanceof D)),addressesByLookupTableAddress:c}),Te(a,e,n,o,d)]);I.addPreAccounts(T);let S=u.filter(O=>O instanceof D),L=[];for(let O of S){let ne=i.length,{domainConfig:me,verifyArgs:Pe,signature:Ce,publicKey:Re,message:Bt}=G(O,ne);Bt&&Ce&&Re&&i.push({message:Bt,signature:Ce,publicKey:Re}),me&&(I.addPreAccounts([{address:me,role:gill.AccountRole.READONLY}]),Pe?.__option==="Some"&&L.push({domainConfigKey:me,verifyArgs:Pe.value}));}let{remainingAccounts:W,systemOffset:q}=I.toAccountMetas(),H=[];i.length>0&&H.push(F(i));let V=HC(C,T);if(a){if(!t||!x)throw new Error("Payer not found or proof args is missing.");let O=b(h,q);H.push(Pi({secp256r1VerifyArgs:L,transactionMessage:V,settingsReadonlyArgs:x,compressedProofArgs:O,payer:t,remainingAccounts:W}));}else H.push(Ii({secp256r1VerifyArgs:L,settings:g,transactionMessage:V,remainingAccounts:W}));return {instructions:H,addressLookupTableAccounts:f}}function HC(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 Ok({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=Ae(s),d=await Z(e),u=await Ie(d),{settingsReadonlyArgs:g,proof:y,packedAccounts:T}=await Te(a,e,n,false,t),f=[],C=[];for(let S of o)if(S instanceof D){let L=f.length,{domainConfig:W,verifyArgs:q,signature:H,publicKey:V,message:O}=G(S,L);O&&H&&V&&f.push({message:O,signature:H,publicKey:V}),W&&(T.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),q?.__option==="Some"&&C.push({domainConfigKey:W,verifyArgs:q.value}));}else T.addPreAccounts([{address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S}]);let{remainingAccounts:x,systemOffset:h}=T.toAccountMetas(),I=[];if(f.length>0&&I.push(F(f)),a){if(!i||!g)throw new Error("Payer not found or proof args is missing.");let S=b(y,h);I.push(Vc({amount:c,settingsReadonlyArgs:g,compressedProofArgs:S,payer:i,secp256r1VerifyArgs:C,source:u,destination:r,remainingAccounts:x}));}else I.push(Oc({amount:c,secp256r1VerifyArgs:C,source:u,destination:r,settings:d,remainingAccounts:x}));return I}async function Kk({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,createAtaIfNeeded:d=true,compressed:u=false}){let g=Ae(t),y=await Z(e),T=await Ie(y),[f,C]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,T,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:x,proof:h,packedAccounts:I}=await Te(u,e,n,false,c),S=[],L=[];for(let V of g)if(V instanceof D){let O=S.length,{domainConfig:ne,verifyArgs:me,signature:Pe,publicKey:Ce,message:Re}=G(V,O);Re&&Pe&&Ce&&S.push({message:Re,signature:Pe,publicKey:Ce}),ne&&(I.addPreAccounts([{address:ne,role:gill.AccountRole.READONLY}]),me?.__option==="Some"&&L.push({domainConfigKey:ne,verifyArgs:me.value}));}else I.addPreAccounts([{address:V.address,role:gill.AccountRole.READONLY_SIGNER,signer:V}]);let{remainingAccounts:W,systemOffset:q}=I.toAccountMetas(),H=[];if(S.length>0&&H.push(F(S)),u){if(!a||!x)throw new Error("Payer not found or proof args is missing.");let V=b(h,q);H.push(Xc({amount:i,createAtaIfNeeded:d,settingsReadonlyArgs:x,compressedProofArgs:V,payer:a,secp256r1VerifyArgs:L,source:T,sourceTokenAccount:f,destination:r,destinationTokenAccount:C,mint:s,tokenProgram:o,remainingAccounts:W}));}else H.push(Kc({amount:i,createAtaIfNeeded:d,secp256r1VerifyArgs:L,source:T,sourceTokenAccount:f,destination:r,destinationTokenAccount:C,settings:y,mint:s,tokenProgram:o,remainingAccounts:W}));return H}async function rN({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await Ns(re(),s),o=a.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:u,packedAccounts:g}=await Te(c,e,n,false,i),{remainingAccounts:y,systemOffset:T}=g.toAccountMetas(),{domainConfig:f,verifyArgs:C,message:x,signature:h,publicKey:I}=G(r),S=[];if(x&&h&&I&&S.push(F([{message:x,signature:h,publicKey:I}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let L=b(u,T);S.push(da({transactionBuffer:s,domainConfig:f,closer:r instanceof D?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:C,settingsReadonlyArgs:d,payer:t,compressedProofArgs:L,remainingAccounts:y}));}else S.push(na({transactionBuffer:s,domainConfig:f,closer:r instanceof D?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:C,remainingAccounts:[]}));return S}function _d({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:y,message:T,signature:f,publicKey:C}=G(n),x=[];if(T&&f&&C&&x.push(F([{message:T,signature:f,publicKey:C}])),d){let{settingsReadonlyArgs:h,compressedProofArgs:I,remainingAccounts:S}=d;x.push(Ia({transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof D?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},settingsReadonlyArgs:h,compressedProofArgs:I,remainingAccounts:S}));}else x.push(ma({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof D?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},remainingAccounts:[]}));return x}function Ud({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=G(e),d=[];return a&&i&&o&&d.push(F([{message:a,signature:i,publicKey:o}])),s?d.push(Wa({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof D?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Pa({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof D?void 0:e,remainingAccounts:[]})),d}function Wd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Ka({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Na({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Ld({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=G(n),d=[];return o&&i&&a&&d.push(F([{message:o,signature:i,publicKey:a}])),s?d.push(ni({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof D?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Xa({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof D?void 0:n,remainingAccounts:[]})),d}async function VN({id:e,message:n,signer:r,popUp:s}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let t=window.origin,c=`${Je()}?redirectOrigin=${t}`,i=cr(),a={phase:"start",data:{id:e,type:"message",payload:n},redirectOrigin:t,signer:r},[o,d]=await Promise.all([Promise.resolve(s??Ke(c)),i(a)]),u=await or({authUrl:c,payload:a,signature:d,popUp:o});if(u.data.type!=="message")throw new Error("Expected Message Response");let g=await i(u);return {...u.data.payload,clientSignature:{...u.data.payload.clientSignature,signature:g}}}async function jN({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let c=window.origin,i=`${Je()}?redirectOrigin=${c}`,a=cr(),o={phase:"start",data:{type:"transaction",payload:{transactionActionType:e,transactionAddress:n,transactionMessageBytes:ki(r)}},redirectOrigin:c,signer:s},[d,u]=await Promise.all([Promise.resolve(t??Ke(i)),a(o)]),g=await or({authUrl:i,payload:o,signature:u,popUp:d});if(g.data.type!=="transaction")throw new Error("Expected Transaction Response");let y=await a(g);return {...g.data.payload,clientSignature:{...g.data.payload.clientSignature,signature:y}}}async function s2({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:y=Math.ceil(s.length/2),cachedAccounts:T}){let f=await Z(n),C=Math.floor(Math.random()*255),x=await ud(f,t instanceof D?t:t.address,C),h=[],I=[];for(let X=0;X<s.length;X+=y){let Nn=s.subarray(X,X+y);h.push(Nn),I.push(sha2_js.sha256(Nn));}let S=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:L,proof:W,packedAccounts:q}=await Te(d,n,r,false,T),{remainingAccounts:H,systemOffset:V}=q.toAccountMetas(),O=L?{settingsReadonlyArgs:L,compressedProofArgs:b(W,V),remainingAccounts:H,payer:e}:null,ne=Ae([t,...c?[c]:[],...u]).filter(X=>X instanceof D).map(X=>({memberKey:qe(X),messageHash:En(X.authResponse)})),me=_d({finalBufferHash:S,finalBufferSize:s.length,bufferIndex:C,payer:e,transactionBufferAddress:x,settings:f,creator:t,preauthorizeExecution:!c,bufferExtendHashes:I,compressedArgs:O,expectedSecp256r1Signers:ne}),Pe=h.map(X=>Wd({transactionMessageBytes:X,transactionBufferAddress:x,settings:f,compressed:d})),Ce=u.map(X=>Ld({voter:X,transactionBufferAddress:x,settings:f,compressedArgs:O})),Re=Ud({compressedArgs:O,settings:f,executor:c,transactionBufferAddress:x}),{instructions:Bt,addressLookupTableAccounts:wd}=await hd({compressed:d,settings:f,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),Qe=X=>({payer:e,instructions:X,addressesByLookupTableAddress:wd});return [Qe(me),...Pe.map(X=>Qe([X])),...Ce.length?[Qe(Ce.flat())]:[],Qe(Re),Qe(Bt)]}var yr=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(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.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[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}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 pr=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 Bd({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=yr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let y of a){let T=t.extractTableLookup(y);if(T!==void 0){let{addressTableLookup:f,drainedKeys:C}=T;c.push({readonlyIndexes:f.readonlyIndexes,readableIndices:f.readonlyIndexes,writableIndexes:f.writableIndexes,writableIndices:f.writableIndexes,lookupTableAddress:gill.address(f.lookupTableAddress)}),i.writable.push(...C.writable),i.readonly.push(...C.readonly);}}let[o,d]=t.getMessageComponents(),g=new pr(d,i).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function l2({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Bd({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return _i(s)}async function C2({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 Pd({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=Ys;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=co;exports.CHANGE_CONFIG_DISCRIMINATOR=to;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=yo;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Mo;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Ro;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Uo;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=wo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Vo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Jo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=$o;exports.DOMAIN_CONFIG_DISCRIMINATOR=Hn;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=oc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=uc;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=Tc;exports.GLOBAL_COUNTER_DISCRIMINATOR=Jn;exports.KeyType=Ut;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Cc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Rc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=Ex;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=rx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=zx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Kx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=ox;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=sx;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=mx;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=yx;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=nx;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=Ax;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=Lx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Ox;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Bx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=Rx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=hx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=Px;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=xx;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=qx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=px;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=Cx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Wx;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=vx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=Sx;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=ix;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=ZS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=QS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=YS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=$S;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Gx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=lx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=gx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=ux;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=fx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=Ix;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=ex;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=Hx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Jx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=Dx;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Vx;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=Mx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=_x;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=ax;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=dx;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=jx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=cx;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Nx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=tx;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=XS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Fx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=Tx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=wx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=kx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=Ux;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=bx;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=JS;exports.MultiWalletInstruction=jS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=kc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Wc;exports.Permission=xe;exports.Permissions=De;exports.SETTINGS_DISCRIMINATOR=vs;exports.Secp256r1Key=Me;exports.SignedSecp256r1Key=D;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Yc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Fc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=ca;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=ea;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=fa;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=ga;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Bs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=ba;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Ma;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Ga;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Ba;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=ei;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=qa;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=gi;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=ci;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Mi;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=fi;exports.UserRole=Be;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Gs;exports.addWhitelistedAddressTrees=pB;exports.base64URLStringToBuffer=he;exports.bufferToBase64URLString=ki;exports.changeConfig=XO;exports.closeTransactionBuffer=rN;exports.compressSettingsAccount=AB;exports.configAction=bD;exports.convertMemberKeyToString=yd;exports.convertPubkeyCompressedToCose=aL;exports.convertPubkeyCoseToCompressed=cL;exports.createClientAuthorizationCompleteRequestChallenge=AL;exports.createClientAuthorizationStartRequestChallenge=uL;exports.createDomainConfig=IB;exports.createDomainUserAccounts=_B;exports.createGlobalCounter=OB;exports.createMessageChallenge=gL;exports.createPopUp=Ke;exports.createTransactionBuffer=_d;exports.createTransactionChallenge=yL;exports.createTransactionManagerSigner=gC;exports.createUserAccounts=GB;exports.createWallet=Xw;exports.decodeDomainConfig=Gn;exports.decodeGlobalCounter=qn;exports.decodeSettings=_s;exports.decodeTransactionBuffer=ks;exports.decodeWhitelistedAddressTree=zs;exports.decompressSettingsAccount=ak;exports.disableDomainConfig=JB;exports.editDomainConfig=QB;exports.editTransactionManagerUrl=ow;exports.editUserDelegate=mw;exports.executeTransaction=hd;exports.executeTransactionBuffer=Ud;exports.executeTransactionSync=Pd;exports.extendTransactionBuffer=Wd;exports.fetchAllDomainConfig=KC;exports.fetchAllGlobalCounter=$C;exports.fetchAllMaybeDomainConfig=Xd;exports.fetchAllMaybeGlobalCounter=yu;exports.fetchAllMaybeSettings=Cy;exports.fetchAllMaybeTransactionBuffer=zy;exports.fetchAllMaybeWhitelistedAddressTree=up;exports.fetchAllSettings=fh;exports.fetchAllTransactionBuffer=Eh;exports.fetchAllWhitelistedAddressTree=bh;exports.fetchCompressedAccount=Qi;exports.fetchDomainConfig=Fn;exports.fetchGlobalCounter=XC;exports.fetchMaybeDomainConfig=Zd;exports.fetchMaybeGlobalCounter=gu;exports.fetchMaybeSettings=qr;exports.fetchMaybeSettingsAccountData=qI;exports.fetchMaybeTransactionBuffer=Fy;exports.fetchMaybeUserAccountData=jI;exports.fetchMaybeWhitelistedAddressTree=dp;exports.fetchSettings=lh;exports.fetchSettingsAccountData=Ot;exports.fetchTransactionBuffer=Ns;exports.fetchUserAccountData=dr;exports.fetchWhitelistedAddressTree=Ks;exports.getAddMemberArgsCodec=nD;exports.getAddMemberArgsDecoder=Tr;exports.getAddMemberArgsEncoder=mr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=jh;exports.getAddWhitelistedAddressTreesInstruction=Yh;exports.getAddWhitelistedAddressTreesInstructionAsync=Xs;exports.getAddWhitelistedAddressTreesInstructionDataCodec=qh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Zs;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=rn;exports.getAuthEndpoint=Je;exports.getChangeConfigCompressedDiscriminatorBytes=yP;exports.getChangeConfigCompressedInstruction=uo;exports.getChangeConfigCompressedInstructionDataCodec=pP;exports.getChangeConfigCompressedInstructionDataDecoder=io;exports.getChangeConfigCompressedInstructionDataEncoder=ao;exports.getChangeConfigDiscriminatorBytes=nP;exports.getChangeConfigInstruction=oP;exports.getChangeConfigInstructionAsync=no;exports.getChangeConfigInstructionDataCodec=sP;exports.getChangeConfigInstructionDataDecoder=ro;exports.getChangeConfigInstructionDataEncoder=nn;exports.getClientAndDeviceHash=Mn;exports.getCompiledInstructionCodec=cD;exports.getCompiledInstructionDecoder=fr;exports.getCompiledInstructionEncoder=lr;exports.getCompressSettingsAccountDiscriminatorBytes=CP;exports.getCompressSettingsAccountInstruction=To;exports.getCompressSettingsAccountInstructionDataCodec=DP;exports.getCompressSettingsAccountInstructionDataDecoder=mo;exports.getCompressSettingsAccountInstructionDataEncoder=po;exports.getCompressedAccountMetaCodec=uD;exports.getCompressedAccountMetaDecoder=nt;exports.getCompressedAccountMetaEncoder=rt;exports.getCompressedAccountMetaReadOnlyCodec=pD;exports.getCompressedAccountMetaReadOnlyDecoder=at;exports.getCompressedAccountMetaReadOnlyEncoder=ct;exports.getCompressedProofCodec=lD;exports.getCompressedProofDecoder=Mr;exports.getCompressedProofEncoder=Dr;exports.getCompressedSettingsAddressFromIndex=j;exports.getCompressedSettingsCodec=ID;exports.getCompressedSettingsDataCodec=ED;exports.getCompressedSettingsDataDecoder=ut;exports.getCompressedSettingsDataEncoder=dt;exports.getCompressedSettingsDecoder=z;exports.getCompressedSettingsEncoder=it;exports.getComputeBudgetEstimate=Zi;exports.getConfigActionCodec=vD;exports.getConfigActionDecoder=pt;exports.getConfigActionEncoder=yt;exports.getCreateDomainConfigDiscriminatorBytes=_P;exports.getCreateDomainConfigInstruction=WP;exports.getCreateDomainConfigInstructionAsync=ho;exports.getCreateDomainConfigInstructionDataCodec=UP;exports.getCreateDomainConfigInstructionDataDecoder=Eo;exports.getCreateDomainConfigInstructionDataEncoder=on;exports.getCreateDomainUserAccountDiscriminatorBytes=VP;exports.getCreateDomainUserAccountInstruction=FP;exports.getCreateDomainUserAccountInstructionAsync=bo;exports.getCreateDomainUserAccountInstructionDataCodec=GP;exports.getCreateDomainUserAccountInstructionDataDecoder=vo;exports.getCreateDomainUserAccountInstructionDataEncoder=an;exports.getCreateGlobalCounterDiscriminatorBytes=ZP;exports.getCreateGlobalCounterInstruction=$P;exports.getCreateGlobalCounterInstructionAsync=Lo;exports.getCreateGlobalCounterInstructionDataCodec=XP;exports.getCreateGlobalCounterInstructionDataDecoder=Wo;exports.getCreateGlobalCounterInstructionDataEncoder=un;exports.getCreateMultiWalletCompressedDiscriminatorBytes=cR;exports.getCreateMultiWalletCompressedInstruction=iR;exports.getCreateMultiWalletCompressedInstructionAsync=No;exports.getCreateMultiWalletCompressedInstructionDataCodec=aR;exports.getCreateMultiWalletCompressedInstructionDataDecoder=ko;exports.getCreateMultiWalletCompressedInstructionDataEncoder=An;exports.getCreateUserAccountArgsCodec=OD;exports.getCreateUserAccountArgsDecoder=Ur;exports.getCreateUserAccountArgsEncoder=_r;exports.getCreateUserAccountsDiscriminatorBytes=TR;exports.getCreateUserAccountsInstruction=fR;exports.getCreateUserAccountsInstructionAsync=Fo;exports.getCreateUserAccountsInstructionDataCodec=lR;exports.getCreateUserAccountsInstructionDataDecoder=Go;exports.getCreateUserAccountsInstructionDataEncoder=yn;exports.getDecompressSettingsAccountDiscriminatorBytes=hR;exports.getDecompressSettingsAccountInstruction=Yo;exports.getDecompressSettingsAccountInstructionDataCodec=PR;exports.getDecompressSettingsAccountInstructionDataDecoder=qo;exports.getDecompressSettingsAccountInstructionDataEncoder=jo;exports.getDisableDomainConfigDiscriminatorBytes=LR;exports.getDisableDomainConfigInstruction=tc;exports.getDisableDomainConfigInstructionDataCodec=OR;exports.getDisableDomainConfigInstructionDataDecoder=ec;exports.getDisableDomainConfigInstructionDataEncoder=Qo;exports.getDomainConfigAddress=je;exports.getDomainConfigCodec=zC;exports.getDomainConfigDecoder=Vn;exports.getDomainConfigDiscriminatorBytes=FC;exports.getDomainConfigEncoder=Yd;exports.getDomainConfigSize=JC;exports.getEditDomainConfigDiscriminatorBytes=FR;exports.getEditDomainConfigInstruction=ac;exports.getEditDomainConfigInstructionAsync=KR;exports.getEditDomainConfigInstructionDataCodec=zR;exports.getEditDomainConfigInstructionDataDecoder=cc;exports.getEditDomainConfigInstructionDataEncoder=mn;exports.getEditMemberArgsCodec=ND;exports.getEditMemberArgsDecoder=Rr;exports.getEditMemberArgsEncoder=Pr;exports.getEditTransactionManagerUrlDiscriminatorBytes=QR;exports.getEditTransactionManagerUrlInstruction=yc;exports.getEditTransactionManagerUrlInstructionDataCodec=ev;exports.getEditTransactionManagerUrlInstructionDataDecoder=gc;exports.getEditTransactionManagerUrlInstructionDataEncoder=Ac;exports.getEditUserDelegateDiscriminatorBytes=iv;exports.getEditUserDelegateInstruction=Sc;exports.getEditUserDelegateInstructionDataCodec=dv;exports.getEditUserDelegateInstructionDataDecoder=fc;exports.getEditUserDelegateInstructionDataEncoder=lc;exports.getExpectedSecp256r1SignersCodec=FD;exports.getExpectedSecp256r1SignersDecoder=Tt;exports.getExpectedSecp256r1SignersEncoder=mt;exports.getFeePayer=_L;exports.getGlobalCounterAddress=dd;exports.getGlobalCounterCodec=ZC;exports.getGlobalCounterDecoder=jn;exports.getGlobalCounterDiscriminatorBytes=YC;exports.getGlobalCounterEncoder=Au;exports.getGlobalCounterSize=QC;exports.getJitoTipsConfig=Rn;exports.getLightCpiSigner=mO;exports.getLightProtocolRpc=Ne;exports.getLinkWalletArgsCodec=jD;exports.getLinkWalletArgsDecoder=Lr;exports.getLinkWalletArgsEncoder=Wr;exports.getMemberCodec=XD;exports.getMemberDecoder=gt;exports.getMemberEncoder=At;exports.getMemberKeyCodec=eM;exports.getMemberKeyDecoder=Q;exports.getMemberKeyEncoder=$;exports.getMigrateCompressedSettingsDiscriminatorBytes=lv;exports.getMigrateCompressedSettingsInstruction=Ec;exports.getMigrateCompressedSettingsInstructionDataCodec=fv;exports.getMigrateCompressedSettingsInstructionDataDecoder=Mc;exports.getMigrateCompressedSettingsInstructionDataEncoder=Dc;exports.getMigrateCompressedUsersDiscriminatorBytes=hv;exports.getMigrateCompressedUsersInstruction=_c;exports.getMigrateCompressedUsersInstructionDataCodec=Pv;exports.getMigrateCompressedUsersInstructionDataDecoder=bc;exports.getMigrateCompressedUsersInstructionDataEncoder=vc;exports.getMultiWalletErrorMessage=SW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Kv;exports.getNativeTransferIntentCompressedInstruction=Vc;exports.getNativeTransferIntentCompressedInstructionDataCodec=Jv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Hc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Nc;exports.getNativeTransferIntentDiscriminatorBytes=Ov;exports.getNativeTransferIntentInstruction=Oc;exports.getNativeTransferIntentInstructionAsync=wv;exports.getNativeTransferIntentInstructionDataCodec=Bv;exports.getNativeTransferIntentInstructionDataDecoder=Lc;exports.getNativeTransferIntentInstructionDataEncoder=Tn;exports.getNewAuthorityArgsCodec=sM;exports.getNewAuthorityArgsDecoder=kr;exports.getNewAuthorityArgsEncoder=wr;exports.getOnClientAuthorizationCallback=cr;exports.getOriginIndex=dL;exports.getPackedAddressTreeInfoCodec=aM;exports.getPackedAddressTreeInfoDecoder=ft;exports.getPackedAddressTreeInfoEncoder=lt;exports.getPackedStateTreeInfoCodec=uM;exports.getPackedStateTreeInfoDecoder=ot;exports.getPackedStateTreeInfoEncoder=st;exports.getPermissionsCodec=yM;exports.getPermissionsDecoder=be;exports.getPermissionsEncoder=ve;exports.getProofArgsCodec=lM;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=M;exports.getRemoveMemberArgsCodec=IM;exports.getRemoveMemberArgsDecoder=br;exports.getRemoveMemberArgsEncoder=vr;exports.getRpId=UL;exports.getSecp256r1MessageHash=En;exports.getSecp256r1PubkeyCodec=MM;exports.getSecp256r1PubkeyDecoder=St;exports.getSecp256r1PubkeyEncoder=Nr;exports.getSecp256r1SignatureOffsetsDataDecoder=_C;exports.getSecp256r1SignatureOffsetsDataEncoder=bC;exports.getSecp256r1VerifyArgsCodec=PM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=B;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=_M;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=te;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=ee;exports.getSecp256r1VerifyInstruction=F;exports.getSecp256r1VerifyInstructionDataCodec=eB;exports.getSecp256r1VerifyInstructionDataDecoder=Sd;exports.getSecp256r1VerifyInstructionDataEncoder=xd;exports.getSendAndConfirmTransaction=Yi;exports.getSettingsCodec=Th;exports.getSettingsCreationArgsCodec=OM;exports.getSettingsCreationArgsDecoder=It;exports.getSettingsCreationArgsEncoder=xt;exports.getSettingsDecoder=bs;exports.getSettingsDiscriminatorBytes=mh;exports.getSettingsEncoder=Iy;exports.getSettingsFromIndex=Z;exports.getSettingsIndexWithAddressCodec=kM;exports.getSettingsIndexWithAddressDecoder=Dt;exports.getSettingsIndexWithAddressEncoder=Ct;exports.getSettingsMutArgsCodec=GM;exports.getSettingsMutArgsDecoder=ue;exports.getSettingsMutArgsEncoder=de;exports.getSettingsReadonlyArgsCodec=JM;exports.getSettingsReadonlyArgsDecoder=oe;exports.getSettingsReadonlyArgsEncoder=se;exports.getSettingsSize=Sh;exports.getSignedSecp256r1Key=iL;exports.getSignedTransactionManager=UO;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=Ye;exports.getTokenTransferIntentCompressedDiscriminatorBytes=ub;exports.getTokenTransferIntentCompressedInstruction=Xc;exports.getTokenTransferIntentCompressedInstructionAsync=gb;exports.getTokenTransferIntentCompressedInstructionDataCodec=Ab;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Zc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Sn;exports.getTokenTransferIntentDiscriminatorBytes=eb;exports.getTokenTransferIntentInstruction=Kc;exports.getTokenTransferIntentInstructionAsync=rb;exports.getTokenTransferIntentInstructionDataCodec=tb;exports.getTokenTransferIntentInstructionDataDecoder=zc;exports.getTokenTransferIntentInstructionDataEncoder=fn;exports.getTransactionBufferAddress=ud;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=vb;exports.getTransactionBufferCloseCompressedInstruction=da;exports.getTransactionBufferCloseCompressedInstructionDataCodec=bb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ia;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=aa;exports.getTransactionBufferCloseDiscriminatorBytes=xb;exports.getTransactionBufferCloseInstruction=na;exports.getTransactionBufferCloseInstructionDataCodec=Ib;exports.getTransactionBufferCloseInstructionDataDecoder=ra;exports.getTransactionBufferCloseInstructionDataEncoder=ta;exports.getTransactionBufferCodec=Mh;exports.getTransactionBufferCreateArgsCodec=ZM;exports.getTransactionBufferCreateArgsDecoder=Et;exports.getTransactionBufferCreateArgsEncoder=Mt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=jb;exports.getTransactionBufferCreateCompressedInstruction=Ia;exports.getTransactionBufferCreateCompressedInstructionDataCodec=qb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=xa;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Sa;exports.getTransactionBufferCreateDiscriminatorBytes=kb;exports.getTransactionBufferCreateInstruction=ma;exports.getTransactionBufferCreateInstructionDataCodec=Nb;exports.getTransactionBufferCreateInstructionDataDecoder=pa;exports.getTransactionBufferCreateInstructionDataEncoder=ya;exports.getTransactionBufferDecoder=ws;exports.getTransactionBufferDiscriminatorBytes=Dh;exports.getTransactionBufferEncoder=Gy;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=A_;exports.getTransactionBufferExecuteCompressedInstruction=Wa;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=g_;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ua;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=_a;exports.getTransactionBufferExecuteDiscriminatorBytes=r_;exports.getTransactionBufferExecuteInstruction=Pa;exports.getTransactionBufferExecuteInstructionDataCodec=n_;exports.getTransactionBufferExecuteInstructionDataDecoder=ha;exports.getTransactionBufferExecuteInstructionDataEncoder=Ea;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=P_;exports.getTransactionBufferExtendCompressedInstruction=Ka;exports.getTransactionBufferExtendCompressedInstructionDataCodec=R_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=za;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Fa;exports.getTransactionBufferExtendDiscriminatorBytes=S_;exports.getTransactionBufferExtendInstruction=Na;exports.getTransactionBufferExtendInstructionDataCodec=x_;exports.getTransactionBufferExtendInstructionDataDecoder=ka;exports.getTransactionBufferExtendInstructionDataEncoder=wa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=K_;exports.getTransactionBufferVoteCompressedInstruction=ni;exports.getTransactionBufferVoteCompressedInstructionDataCodec=J_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=ri;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=ti;exports.getTransactionBufferVoteDiscriminatorBytes=B_;exports.getTransactionBufferVoteInstruction=Xa;exports.getTransactionBufferVoteInstructionDataCodec=w_;exports.getTransactionBufferVoteInstructionDataDecoder=Za;exports.getTransactionBufferVoteInstructionDataEncoder=Ya;exports.getTransactionExecuteCompressedDiscriminatorBytes=aU;exports.getTransactionExecuteCompressedInstruction=mi;exports.getTransactionExecuteCompressedInstructionDataCodec=iU;exports.getTransactionExecuteCompressedInstructionDataDecoder=pi;exports.getTransactionExecuteCompressedInstructionDataEncoder=yi;exports.getTransactionExecuteDiscriminatorBytes=Q_;exports.getTransactionExecuteInstruction=di;exports.getTransactionExecuteInstructionDataCodec=eU;exports.getTransactionExecuteInstructionDataDecoder=ii;exports.getTransactionExecuteInstructionDataEncoder=ai;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=EU;exports.getTransactionExecuteSyncCompressedInstruction=Pi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=hU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=hi;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Ei;exports.getTransactionExecuteSyncDiscriminatorBytes=TU;exports.getTransactionExecuteSyncInstruction=Ii;exports.getTransactionExecuteSyncInstructionDataCodec=lU;exports.getTransactionExecuteSyncInstructionDataDecoder=xi;exports.getTransactionExecuteSyncInstructionDataEncoder=Si;exports.getTransactionMessageAddressTableLookupCodec=nE;exports.getTransactionMessageAddressTableLookupDecoder=Vr;exports.getTransactionMessageAddressTableLookupEncoder=Hr;exports.getTransactionMessageCodec=eE;exports.getTransactionMessageDecoder=Pt;exports.getTransactionMessageEncoder=ht;exports.getUserAccountAddress=N;exports.getUserCodec=aE;exports.getUserCreationArgsCodec=AE;exports.getUserCreationArgsDecoder=pe;exports.getUserCreationArgsEncoder=ye;exports.getUserDecoder=J;exports.getUserEncoder=Oe;exports.getUserMutArgsCodec=mE;exports.getUserMutArgsDecoder=Se;exports.getUserMutArgsEncoder=fe;exports.getUserReadOnlyArgsCodec=SE;exports.getUserReadOnlyArgsDecoder=Kr;exports.getUserReadOnlyArgsEncoder=zr;exports.getUserReadOnlyOrMutateArgsCodec=DE;exports.getUserReadOnlyOrMutateArgsDecoder=Ue;exports.getUserReadOnlyOrMutateArgsEncoder=_e;exports.getUserRoleCodec=RE;exports.getUserRoleDecoder=Le;exports.getUserRoleEncoder=We;exports.getWalletAddressFromIndex=Ad;exports.getWalletAddressFromSettings=Ie;exports.getWhitelistedAddressTreeCodec=vh;exports.getWhitelistedAddressTreeDecoder=Fs;exports.getWhitelistedAddressTreeDiscriminatorBytes=Rh;exports.getWhitelistedAddressTreeEncoder=ip;exports.getWhitelistedAddressTreeFromIndex=bn;exports.getWhitelistedAddressTreeIndexFromAddress=cO;exports.getWhitelistedAddressTreesAddress=ed;exports.identifyMultiWalletAccount=gW;exports.identifyMultiWalletInstruction=yW;exports.initialize=LL;exports.isConfigAction=_D;exports.isMultiWalletError=xW;exports.isUserReadOnlyOrMutateArgs=EE;exports.migrateSettings=Cw;exports.migrateUsers=vw;exports.nativeTransferIntent=Ok;exports.parseAddWhitelistedAddressTreesInstruction=Zh;exports.parseChangeConfigCompressedInstruction=mP;exports.parseChangeConfigInstruction=cP;exports.parseCompressSettingsAccountInstruction=MP;exports.parseCreateDomainConfigInstruction=LP;exports.parseCreateDomainUserAccountInstruction=zP;exports.parseCreateGlobalCounterInstruction=QP;exports.parseCreateMultiWalletCompressedInstruction=dR;exports.parseCreateUserAccountsInstruction=SR;exports.parseDecompressSettingsAccountInstruction=RR;exports.parseDisableDomainConfigInstruction=BR;exports.parseEditDomainConfigInstruction=JR;exports.parseEditTransactionManagerUrlInstruction=tv;exports.parseEditUserDelegateInstruction=uv;exports.parseMigrateCompressedSettingsInstruction=Sv;exports.parseMigrateCompressedUsersInstruction=Rv;exports.parseNativeTransferIntentCompressedInstruction=jv;exports.parseNativeTransferIntentInstruction=kv;exports.parseSecp256r1VerifyInstruction=tB;exports.parseTokenTransferIntentCompressedInstruction=yb;exports.parseTokenTransferIntentInstruction=nb;exports.parseTransactionBufferCloseCompressedInstruction=_b;exports.parseTransactionBufferCloseInstruction=Cb;exports.parseTransactionBufferCreateCompressedInstruction=Yb;exports.parseTransactionBufferCreateInstruction=Hb;exports.parseTransactionBufferExecuteCompressedInstruction=y_;exports.parseTransactionBufferExecuteInstruction=s_;exports.parseTransactionBufferExtendCompressedInstruction=v_;exports.parseTransactionBufferExtendInstruction=I_;exports.parseTransactionBufferVoteCompressedInstruction=j_;exports.parseTransactionBufferVoteInstruction=k_;exports.parseTransactionExecuteCompressedInstruction=dU;exports.parseTransactionExecuteInstruction=tU;exports.parseTransactionExecuteSyncCompressedInstruction=PU;exports.parseTransactionExecuteSyncInstruction=fU;exports.pollJitoBundleConfirmation=bO;exports.prepareTransactionBundle=s2;exports.prepareTransactionMessage=l2;exports.prepareTransactionSync=C2;exports.retrieveTransactionManager=_O;exports.sendJitoBundle=AC;exports.signAndSendBundledTransactions=RO;exports.signAndSendTransaction=vO;exports.signMessageWithPasskey=VN;exports.signTransactionWithPasskey=jN;exports.tokenTransferIntent=Kk;exports.uninitialize=WL;exports.userReadOnlyOrMutateArgs=ME;exports.vaultTransactionMessageDeserialize=Ui;exports.vaultTransactionMessageSerialize=_i;exports.voteTransactionBuffer=Ld;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var gill=require('gill'),Pn=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),superstruct=require('superstruct'),programs=require('gill/programs'),tinyCbor=require('@levischuck/tiny-cbor'),nist_js=require('@noble/curves/nist.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Pn__default=/*#__PURE__*/_interopDefault(Pn);var On=new Uint8Array([201,232,212,229,59,241,106,197]);function vC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(On)}function Nd(){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:On}))}function Bn(){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 bC(){return gill.combineCodec(Nd(),Bn())}function wn(e){return gill.decodeAccount(e,Bn())}async function kn(e,n,r){let s=await Hd(e,n,r);return gill.assertAccountExists(s),s}async function Hd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return wn(s)}async function _C(e,n,r){let s=await Vd(e,n,r);return gill.assertAccountsExist(s),s}async function Vd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>wn(t))}function UC(){return 846}var Vn=new Uint8Array([42,206,176,58,175,129,130,233]);function OC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Vn)}function tu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Vn}))}function Gn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function BC(){return gill.combineCodec(tu(),Gn())}function Fn(e){return gill.decodeAccount(e,Gn())}async function wC(e,n,r){let s=await ru(e,n,r);return gill.assertAccountExists(s),s}async function ru(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Fn(s)}async function kC(e,n,r){let s=await nu(e,n,r);return gill.assertAccountsExist(s),s}async function nu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Fn(t))}function NC(){return 24}function ur(){return gill.getStructEncoder([["memberKey",Q()],["permissions",ve()],["verifyArgs",gill.getOptionEncoder(O())],["userArgs",_e()]])}function Ar(){return gill.getStructDecoder([["memberKey",$()],["permissions",be()],["verifyArgs",gill.getOptionDecoder(B())],["userArgs",Ue()]])}function FC(){return gill.combineCodec(ur(),Ar())}function gr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function yr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function JC(){return gill.combineCodec(gr(),yr())}function et(){return gill.getStructEncoder([["treeInfo",rt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function tt(){return gill.getStructDecoder([["treeInfo",nt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function ZC(){return gill.combineCodec(et(),tt())}function st(){return gill.getStructEncoder([["treeInfo",rt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function ot(){return gill.getStructDecoder([["treeInfo",nt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function eD(){return gill.combineCodec(st(),ot())}function lr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Sr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function nD(){return gill.combineCodec(lr(),Sr())}function ct(){return gill.getStructEncoder([["data",gill.getOptionEncoder(at())]])}function F(){return gill.getStructDecoder([["data",gill.getOptionDecoder(it())]])}function aD(){return gill.combineCodec(ct(),F())}function at(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(dt())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function it(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(ut())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function AD(){return gill.combineCodec(at(),it())}function At(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Cr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(ur())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Mr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function gt(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Dr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Ar())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Er())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function pD(){return gill.combineCodec(At(),gt())}function TD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function fD(e,n){return n.__kind===e}function hr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",We()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",ye()]])}function Pr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Le()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",me()]])}function ID(){return gill.combineCodec(hr(),Pr())}function Cr(){return gill.getStructEncoder([["memberKey",Q()],["permissions",ve()]])}function Dr(){return gill.getStructDecoder([["memberKey",$()],["permissions",be()]])}function ED(){return gill.combineCodec(Cr(),Dr())}function yt(){return gill.getStructEncoder([["memberKey",Q()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function mt(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function vD(){return gill.combineCodec(yt(),mt())}function Rr(){return gill.getStructEncoder([["settingsMutArgs",de()],["transactionManager",gill.getOptionEncoder(le())]])}function vr(){return gill.getStructDecoder([["settingsMutArgs",ue()],["transactionManager",gill.getOptionDecoder(Se())]])}function WD(){return gill.combineCodec(Rr(),vr())}function dt(){return gill.getStructEncoder([["pubkey",Q()],["permissions",ve()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function ut(){return gill.getStructDecoder([["pubkey",$()],["permissions",be()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function wD(){return gill.combineCodec(dt(),ut())}function Q(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function $(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function HD(){return gill.combineCodec(Q(),$())}function Ur(){return gill.getStructEncoder([["authorityCreationArgs",ye()],["compressedProofArgs",D()]])}function Wr(){return gill.getStructDecoder([["authorityCreationArgs",me()],["compressedProofArgs",M()]])}function zD(){return gill.combineCodec(Ur(),Wr())}function pt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function Tt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function jD(){return gill.combineCodec(pt(),Tt())}function rt(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function nt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function ZD(){return gill.combineCodec(rt(),nt())}function ve(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function be(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function $D(){return gill.combineCodec(ve(),be())}function D(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(lr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function M(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Sr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function nM(){return gill.combineCodec(D(),M())}function Mr(){return gill.getStructEncoder([["memberKey",Q()],["userArgs",_e()]])}function Er(){return gill.getStructDecoder([["memberKey",$()],["userArgs",Ue()]])}function aM(){return gill.combineCodec(Mr(),Er())}function Lr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function ft(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function uM(){return gill.combineCodec(Lr(),ft())}function O(){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 B(){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 yM(){return gill.combineCodec(O(),B())}function ee(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",O()]])}function te(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",B()]])}function fM(){return gill.combineCodec(ee(),te())}function lt(){return gill.getStructEncoder([["addressTreeInfo",pt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function St(){return gill.getStructDecoder([["addressTreeInfo",Tt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function IM(){return gill.combineCodec(lt(),St())}function xt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function It(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function MM(){return gill.combineCodec(xt(),It())}function de(){return gill.getStructEncoder([["accountMeta",et()],["data",ct()]])}function ue(){return gill.getStructDecoder([["accountMeta",tt()],["data",F()]])}function RM(){return gill.combineCodec(de(),ue())}function se(){return gill.getStructEncoder([["accountMeta",st()],["data",ct()]])}function oe(){return gill.getStructDecoder([["accountMeta",ot()],["data",F()]])}function UM(){return gill.combineCodec(se(),oe())}function Ct(){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.getOptionEncoder(gill.getArrayEncoder(yt()))]])}function Dt(){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.getOptionDecoder(gill.getArrayDecoder(mt()))]])}function BM(){return gill.combineCodec(Ct(),Dt())}function Mt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(gr())],["addressTableLookups",gill.getArrayEncoder(Or())]])}function Et(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(yr())],["addressTableLookups",gill.getArrayDecoder(Br())]])}function HM(){return gill.combineCodec(Mt(),Et())}function Or(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Br(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function FM(){return gill.combineCodec(Or(),Br())}function Oe(){return gill.getStructEncoder([["member",Q()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",We()],["delegatedTo",gill.getOptionEncoder(xt())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function J(){return gill.getStructDecoder([["member",$()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Le()],["delegatedTo",gill.getOptionDecoder(It())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function jM(){return gill.combineCodec(Oe(),J())}function ye(){return gill.getStructEncoder([["addressTreeInfo",pt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function me(){return gill.getStructDecoder([["addressTreeInfo",Tt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function XM(){return gill.combineCodec(ye(),me())}function le(){return gill.getStructEncoder([["accountMeta",et()],["data",Oe()]])}function Se(){return gill.getStructDecoder([["accountMeta",tt()],["data",J()]])}function tE(){return gill.combineCodec(le(),Se())}function Nr(){return gill.getStructEncoder([["accountMeta",st()],["data",Oe()]])}function Hr(){return gill.getStructDecoder([["accountMeta",ot()],["data",J()]])}function oE(){return gill.combineCodec(Nr(),Hr())}function _e(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Nr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([le()])]])]])}function Ue(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Hr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([Se()])]])]])}function dE(){return gill.combineCodec(_e(),Ue())}function uE(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function AE(e,n){return n.__kind===e}var Be=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(Be||{});function We(){return gill.getEnumEncoder(Be)}function Le(){return gill.getEnumDecoder(Be)}function mE(){return gill.combineCodec(We(),Le())}var Ms=new Uint8Array([223,179,163,190,177,224,67,173]);function th(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ms)}function Ay(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(dt(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),3)]]),e=>({...e,discriminator:Ms}))}function Es(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(ut(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),3)]])}function rh(){return gill.combineCodec(Ay(),Es())}function hs(e){return gill.decodeAccount(e,Es())}async function nh(e,n,r){let s=await Fr(e,n,r);return gill.assertAccountExists(s),s}async function Fr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return hs(s)}async function sh(e,n,r){let s=await gy(e,n,r);return gill.assertAccountsExist(s),s}async function gy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>hs(t))}function oh(){return 184}var _s=new Uint8Array([90,36,35,219,93,225,110,96]);function dh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(_s)}function Uy(){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",Q()],["executor",Q()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(Q())],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(yt()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:_s}))}function Us(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",$()],["executor",$()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder($())],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(mt()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function uh(){return gill.combineCodec(Uy(),Us())}function Ws(e){return gill.decodeAccount(e,Us())}async function Ls(e,n,r){let s=await Wy(e,n,r);return gill.assertAccountExists(s),s}async function Wy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ws(s)}async function Ah(e,n,r){let s=await Ly(e,n,r);return gill.assertAccountsExist(s),s}async function Ly(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ws(t))}var ws=new Uint8Array([105,23,173,2,197,255,80,87]);function mh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ws)}function Qy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:ws}))}function ks(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function ph(){return gill.combineCodec(Qy(),ks())}function Ns(e){return gill.decodeAccount(e,ks())}async function Hs(e,n,r){let s=await $y(e,n,r);return gill.assertAccountExists(s),s}async function $y(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ns(s)}async function Th(e,n,r){let s=await em(e,n,r);return gill.assertAccountsExist(s),s}async function em(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ns(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 Gs(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function z(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 m(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:z(r.value),role:Vs(r.value)?gill.upgradeRoleToSigner(s):s,...Vs(r.value)?{signer:r.value}:{}})}}function Vs(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var zs=new Uint8Array([8]);function Wh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zs)}function Xr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:zs}))}function Ks(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function Lh(){return gill.combineCodec(Xr(),Ks())}async function Js(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Xr().encode(c),programAddress:r})}function Oh(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Xr().encode(c),programAddress:r})}function Bh(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:Ks().decode(e.data)}}var Zs=new Uint8Array([9]);function Fh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zs)}function Qr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(At())],["compressedProofArgs",gill.getOptionEncoder(D())]]),e=>({...e,discriminator:Zs}))}function Xs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(gt())],["compressedProofArgs",gill.getOptionDecoder(M())]])}function zh(){return gill.combineCodec(Qr(),Xs())}async function Qs(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.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(Gs(c.settingsIndex))]})),t.authority.value||(t.authority.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(z(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Qr().encode(c),programAddress:r})}function Kh(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Qr().encode(c),programAddress:r})}function Jh(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Xs().decode(e.data)}}var to=new Uint8Array([20]);function $h(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(to)}function ro(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(At())],["settingsMut",de()],["compressedProofArgs",D()]]),e=>({...e,discriminator:to}))}function no(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(gt())],["settingsMut",ue()],["compressedProofArgs",M()]])}function eP(){return gill.combineCodec(ro(),no())}function so(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ro().encode(c),programAddress:r})}function tP(e){if(e.accounts.length<4)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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:no().decode(e.data)}}var ao=new Uint8Array([17]);function iP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ao)}function io(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["settingsMutArgs",de()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:ao}))}function uo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",ue()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function dP(){return gill.combineCodec(io(),uo())}function Ao(e,n){let r=n?.programAddress??u,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}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:io().encode(c),programAddress:r})}function uP(e){if(e.accounts.length<4)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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:uo().decode(e.data)}}var So=new Uint8Array([0]);function fP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(So)}function en(){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",ye()],["compressedProofArgs",D()]]),e=>({...e,discriminator:So}))}function xo(){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",me()],["compressedProofArgs",M()]])}function lP(){return gill.combineCodec(en(),xo())}async function Io(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:en().encode(c),programAddress:r})}function SP(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:en().encode(c),programAddress:r})}function xP(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:xo().decode(e.data)}}var Do=new Uint8Array([4]);function PP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Do)}function rn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["member",Lr()],["role",We()],["userAccountCreationArgs",ye()],["linkWalletArgs",gill.getOptionEncoder(Rr())]]),e=>({...e,discriminator:Do}))}function Mo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["member",ft()],["role",Le()],["userAccountCreationArgs",me()],["linkWalletArgs",gill.getOptionDecoder(vr())]])}function RP(){return gill.combineCodec(rn(),Mo())}async function Eo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:rn().encode(c),programAddress:r})}function vP(e,n){let r=n?.programAddress??u,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=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:rn().encode(c),programAddress:r})}function bP(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:Mo().decode(e.data)}}var Po=new Uint8Array([3]);function BP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Po)}function sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Po}))}function Ro(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function wP(){return gill.combineCodec(sn(),Ro())}async function vo(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=y(c),i=m(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:sn().encode({}),programAddress:r})}function kP(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=y(c),i=m(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:sn().encode({}),programAddress:r})}function NP(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:Ro().decode(e.data)}}var Uo=new Uint8Array([19]);function JP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uo)}function on(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["compressedProofArgs",D()],["settingsCreation",lt()],["userArgs",_e()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Uo}))}function Wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["compressedProofArgs",M()],["settingsCreation",St()],["userArgs",Ue()],["settingsIndex",gill.getU128Decoder()]])}function jP(){return gill.combineCodec(on(),Wo())}async function Lo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:on().encode(c),programAddress:r})}function qP(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:on().encode(c),programAddress:r})}function YP(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r(),whitelistedAddressTrees:r()},data:Wo().decode(e.data)}}var Bo=new Uint8Array([5]);function rR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bo)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayEncoder(hr())]]),e=>({...e,discriminator:Bo}))}function wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayDecoder(Pr())]])}function nR(){return gill.combineCodec(an(),wo())}async function ko(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:an().encode(c),programAddress:r})}function sR(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:an().encode(c),programAddress:r})}function oR(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:wo().decode(e.data)}}var Vo=new Uint8Array([18]);function gR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vo)}function Go(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",de()],["compressedProofArgs",D()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:Vo}))}function Fo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",ue()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function yR(){return gill.combineCodec(Go(),Fo())}function zo(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Go().encode(c),programAddress:r})}function mR(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Fo().decode(e.data)}}var jo=new Uint8Array([2]);function xR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(jo)}function qo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:jo}))}function Yo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function IR(){return gill.combineCodec(qo(),Yo())}function Zo(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...i],data:qo().encode(c),programAddress:r})}function CR(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:Yo().decode(e.data)}}var ec=new Uint8Array([1]);function vR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ec)}function un(){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(Ur())]]),e=>({...e,discriminator:ec}))}function tc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Wr())]])}function bR(){return gill.combineCodec(un(),tc())}async function _R(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:un().encode(c),programAddress:r})}function rc(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:un().encode(c),programAddress:r})}function UR(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:tc().decode(e.data)}}var oc=new Uint8Array([6]);function NR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oc)}function cc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",le()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",D()]]),e=>({...e,discriminator:oc}))}function ac(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Se()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",M()]])}function HR(){return gill.combineCodec(cc(),ac())}function ic(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...i],data:cc().encode(c),programAddress:r})}function VR(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:ac().decode(e.data)}}var Ac=new Uint8Array([7]);function qR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ac)}function gc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",le()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["delegateTo",gill.getOptionEncoder(xt())],["oldSettingsMutArgs",gill.getOptionEncoder(de())],["newSettingsMutArgs",gill.getOptionEncoder(de())],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ac}))}function yc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Se()],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["delegateTo",gill.getOptionDecoder(It())],["oldSettingsMutArgs",gill.getOptionDecoder(ue())],["newSettingsMutArgs",gill.getOptionDecoder(ue())],["compressedProofArgs",M()]])}function YR(){return gill.combineCodec(gc(),yc())}function mc(e,n){let r=n?.programAddress??u,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(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),...i],data:gc().encode(c),programAddress:r})}function ZR(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:yc().decode(e.data)}}var fc=new Uint8Array([33]);function nv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fc)}function lc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",at()],["compressedProofArgs",D()],["settingsCreationArgs",lt()]]),e=>({...e,discriminator:fc}))}function Sc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",it()],["compressedProofArgs",M()],["settingsCreationArgs",St()]])}function sv(){return gill.combineCodec(lc(),Sc())}function xc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.authority),...i],data:lc().encode(c),programAddress:r})}function ov(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:Sc().decode(e.data)}}var Dc=new Uint8Array([32]);function gv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Dc)}function Mc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Oe()],["compressedProofArgs",D()],["userCreationArgs",ye()]]),e=>({...e,discriminator:Dc}))}function Ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",J()],["compressedProofArgs",M()],["userCreationArgs",me()]])}function yv(){return gill.combineCodec(Mc(),Ec())}function hc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.authority),...i],data:Mc().encode(c),programAddress:r})}function mv(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:Ec().decode(e.data)}}var Rc=new Uint8Array([30]);function Iv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Rc)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:Rc}))}function vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function Cv(){return gill.combineCodec(An(),vc())}async function Dv(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(z(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:An().encode(c),programAddress:r})}function bc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:An().encode(c),programAddress:r})}function Mv(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:vc().decode(e.data)}}var Wc=new Uint8Array([28]);function _v(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wc)}function Lc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Wc}))}function Oc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function Uv(){return gill.combineCodec(Lc(),Oc())}function Bc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:Lc().encode(c),programAddress:r})}function Wv(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Oc().decode(e.data)}}var kc=new Uint8Array([31]);function Hv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(kc)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:kc}))}function Nc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function Vv(){return gill.combineCodec(yn(),Nc())}async function Gv(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(z(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(z(t.source.value)),gill.getAddressEncoder().encode(z(t.tokenProgram.value)),gill.getAddressEncoder().encode(z(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(z(t.destination.value)),gill.getAddressEncoder().encode(z(t.tokenProgram.value)),gill.getAddressEncoder().encode(z(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:yn().encode(c),programAddress:r})}function Hc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:yn().encode(c),programAddress:r})}function Fv(e){if(e.accounts.length<11)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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Nc().decode(e.data)}}var zc=new Uint8Array([29]);function Zv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zc)}function mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:zc}))}function Kc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function Xv(){return gill.combineCodec(mn(),Kc())}async function Qv(e,n){let r=n?.programAddress??u,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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(z(t.source.value)),gill.getAddressEncoder().encode(z(t.tokenProgram.value)),gill.getAddressEncoder().encode(z(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(z(t.destination.value)),gill.getAddressEncoder().encode(z(t.tokenProgram.value)),gill.getAddressEncoder().encode(z(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:mn().encode(c),programAddress:r})}function Jc(e,n){let r=n?.programAddress??u,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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:mn().encode(c),programAddress:r})}function $v(e){if(e.accounts.length<11)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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Kc().decode(e.data)}}var Yc=new Uint8Array([13]);function cb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yc)}function Zc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Yc}))}function Xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())]])}function ab(){return gill.combineCodec(Zc(),Xc())}function Qc(e,n){let r=n?.programAddress??u,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},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(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),...i],data:Zc().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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:Xc().decode(e.data)}}var ta=new Uint8Array([24]);function pb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ta)}function ra(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:ta}))}function na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function Tb(){return gill.combineCodec(ra(),na())}function sa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(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),...i],data:ra().encode(c),programAddress:r})}function fb(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:na().decode(e.data)}}var aa=new Uint8Array([10]);function Mb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(aa)}function ia(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:aa}))}function da(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionDecoder(B())]])}function Eb(){return gill.combineCodec(ia(),da())}function ua(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=y(a),o=m(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),...i],data:ia().encode(c),programAddress:r})}function hb(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===u?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:da().decode(e.data)}}var ya=new Uint8Array([21]);function Wb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ya)}function ma(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:ya}))}function pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function Lb(){return gill.combineCodec(ma(),pa())}function Ta(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=y(a),o=m(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),...i],data:ma().encode(c),programAddress:r})}function Ob(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:pa().decode(e.data)}}var Sa=new Uint8Array([14]);function Gb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sa)}function xa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Sa}))}function Ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())]])}function Fb(){return gill.combineCodec(xa(),Ia())}function Ca(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:xa().encode(c),programAddress:r})}function zb(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ia().decode(e.data)}}var Ea=new Uint8Array([25]);function Xb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ea)}function ha(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ea}))}function Pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function Qb(){return gill.combineCodec(ha(),Pa())}function Ra(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ha().encode(c),programAddress:r})}function $b(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Pa().decode(e.data)}}var _a=new Uint8Array([12]);function o_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_a)}function Ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:_a}))}function Wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function c_(){return gill.combineCodec(Ua(),Wa())}function La(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:Ua().encode(c),programAddress:r})}function a_(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:Wa().decode(e.data)}}var wa=new Uint8Array([23]);function y_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wa)}function ka(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:wa}))}function Na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function m_(){return gill.combineCodec(ka(),Na())}function Ha(e,n){let r=n?.programAddress??u,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:ka().encode(c),programAddress:r})}function p_(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:Na().decode(e.data)}}var Fa=new Uint8Array([11]);function C_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fa)}function za(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Fa}))}function Ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())]])}function D_(){return gill.combineCodec(za(),Ka())}function Ja(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(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),...i],data:za().encode(c),programAddress:r})}function M_(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ka().decode(e.data)}}var Ya=new Uint8Array([22]);function __(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ya)}function Za(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ya}))}function Xa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(B())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function U_(){return gill.combineCodec(Za(),Xa())}function Qa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(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),...i],data:Za().encode(c),programAddress:r})}function W_(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Xa().decode(e.data)}}var ti=new Uint8Array([15]);function N_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ti)}function ri(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:ti}))}function ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function H_(){return gill.combineCodec(ri(),ni())}function si(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=y({}),i=m(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:ri().encode({}),programAddress:r})}function V_(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:ni().decode(e.data)}}var ai=new Uint8Array([26]);function j_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ai)}function ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ai}))}function di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function q_(){return gill.combineCodec(ii(),di())}function ui(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:ii().encode(c),programAddress:r})}function Y_(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:di().decode(e.data)}}var yi=new Uint8Array([16]);function rU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(yi)}function mi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())]]),e=>({...e,discriminator:yi}))}function pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())]])}function nU(){return gill.combineCodec(mi(),pi())}function Ti(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:mi().encode(c),programAddress:r})}function sU(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:pi().decode(e.data)}}var Si=new Uint8Array([27]);function AU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Si)}function xi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Si}))}function Ii(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayDecoder(te())],["settingsReadonlyArgs",oe()],["compressedProofArgs",M()]])}function gU(){return gill.combineCodec(xi(),Ii())}function Ci(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:xi().encode(c),programAddress:r})}function yU(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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ii().decode(e.data)}}var u="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",BS=(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))(BS||{});function QU(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 wS=(T=>(T[T.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",T[T.ChangeConfig=1]="ChangeConfig",T[T.ChangeConfigCompressed=2]="ChangeConfigCompressed",T[T.CompressSettingsAccount=3]="CompressSettingsAccount",T[T.CreateDomainConfig=4]="CreateDomainConfig",T[T.CreateDomainUserAccount=5]="CreateDomainUserAccount",T[T.CreateGlobalCounter=6]="CreateGlobalCounter",T[T.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",T[T.CreateUserAccounts=8]="CreateUserAccounts",T[T.DecompressSettingsAccount=9]="DecompressSettingsAccount",T[T.DisableDomainConfig=10]="DisableDomainConfig",T[T.EditDomainConfig=11]="EditDomainConfig",T[T.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",T[T.EditUserDelegate=13]="EditUserDelegate",T[T.MigrateCompressedSettings=14]="MigrateCompressedSettings",T[T.MigrateCompressedUsers=15]="MigrateCompressedUsers",T[T.NativeTransferIntent=16]="NativeTransferIntent",T[T.NativeTransferIntentCompressed=17]="NativeTransferIntentCompressed",T[T.TokenTransferIntent=18]="TokenTransferIntent",T[T.TokenTransferIntentCompressed=19]="TokenTransferIntentCompressed",T[T.TransactionBufferClose=20]="TransactionBufferClose",T[T.TransactionBufferCloseCompressed=21]="TransactionBufferCloseCompressed",T[T.TransactionBufferCreate=22]="TransactionBufferCreate",T[T.TransactionBufferCreateCompressed=23]="TransactionBufferCreateCompressed",T[T.TransactionBufferExecute=24]="TransactionBufferExecute",T[T.TransactionBufferExecuteCompressed=25]="TransactionBufferExecuteCompressed",T[T.TransactionBufferExtend=26]="TransactionBufferExtend",T[T.TransactionBufferExtendCompressed=27]="TransactionBufferExtendCompressed",T[T.TransactionBufferVote=28]="TransactionBufferVote",T[T.TransactionBufferVoteCompressed=29]="TransactionBufferVoteCompressed",T[T.TransactionExecute=30]="TransactionExecute",T[T.TransactionExecuteCompressed=31]="TransactionExecuteCompressed",T[T.TransactionExecuteSync=32]="TransactionExecuteSync",T[T.TransactionExecuteSyncCompressed=33]="TransactionExecuteSyncCompressed",T))(wS||{});function $U(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([20])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),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([19])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([33])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 32;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 33;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var NS=6e3,HS=6001,VS=6002,GS=6003,FS=6004,zS=6005,KS=6006,JS=6007,jS=6008,qS=6009,YS=6010,ZS=6011,XS=6012,QS=6013,$S=6014,ex=6015,tx=6016,rx=6017,nx=6018,sx=6019,ox=6020,cx=6021,ax=6022,ix=6023,dx=6024,ux=6025,Ax=6026,gx=6027,yx=6028,mx=6029,px=6030,Tx=6031,fx=6032,lx=6033,Sx=6034,xx=6035,Ix=6036,Cx=6037,Dx=6038,Mx=6039,Ex=6040,hx=6041,Px=6042,Rx=6043,vx=6044,bx=6045,_x=6046,Ux=6047,Wx=6048,Lx=6049,Ox=6050,Bx=6051,wx=6052,kx=6053,Di;process.env.NODE_ENV!=="production"&&(Di={[px]:"This member is already delegated to another wallet.",[JS]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[Lx]:"The domain configuration account is disabled. Please contact support or try again later.",[Ox]:"Missing domain configuration account.",[YS]:"Duplicate public keys detected among members. Each member must have a unique key.",[qS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[ox]:"No members provided. A multisig wallet must contain at least one member.",[nx]:"Expected a User with Administrator role for this instruction.",[jS]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[tx]:"Expected a User with Transaction Manager role for this instruction.",[Mx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Ex]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[hx]:"Declared buffer size does not match the actual serialized size.",[lx]:"Not enough members with vote permission to meet the approval threshold.",[Tx]:"At least one signer with execute permission is required to proceed.",[fx]:"At least one signer with initiate permission is required to perform this action.",[ux]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[kx]:"Address Tree supplied is not part of the whitelisted address trees",[sx]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[gx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Dx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[Sx]:"Only delegated members are allowed for this transaction.",[dx]:"Unexpected number of accounts provided for this instruction.",[QS]:"User with Permanent Member role requires a must have a delegated wallet.",[HS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[FS]:"The extracted public key has an invalid length or encoding.",[NS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[GS]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Ux]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[ax]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[rx]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[ex]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[ix]:"Malformed transaction message: structure or formatting does not match the expected layout.",[Ax]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[zS]:"The extracted WebAuthn signed message payload is malformed.",[bx]:"An input string exceeds the maximum allowed character length.",[Bx]:"This member is not registered under the provided domain configuration.",[yx]:"A required account is missing from the instruction context.",[_x]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[mx]:"User mutation arguments are required when performing add or remove delegate operations.",[Ix]:"No valid signer found in this transaction.",[XS]:"Only one permanent member is allowed per wallet.",[$S]:"Only one transaction manager is allowed per wallet.",[wx]:"The given origin index is not in the whitelisted origins.",[ZS]:"Permanent members cannot be removed from a wallet.",[vx]:"Writable CPI calls to protected accounts are not permitted.",[KS]:"The rpIdHash extracted from the signed message does not match the expected value.",[VS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Wx]:"The specified slot number was not found in the provided slot history.",[cx]:"Too many members: a maximum of 4 members are supported.",[Px]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Rx]:"This transaction has not yet reached the required approval threshold.",[Cx]:"Only the transaction creator or rent payer may close this transaction buffer.",[xx]:"Member is not part of the expected signers for this transaction."});function oW(e){return process.env.NODE_ENV!=="production"?Di[e]:"Error message not available in production bundles."}function cW(e,n,r){return gill.isProgramError(e,n,u,r)}var bt={Ed25519:1,Secp256r1:2};var xe={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},De=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(xe).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var fn=33,Me=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!==fn)throw new Error(`Invalid public key length, expected ${fn} 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===fn)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()}},C=class extends Me{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 Vx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Gx(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ei=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Vx())],["addressTableLookups",gill.getArrayCodec(Gx())]]);function hi(e){return Ei.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 Pi(e){let n=Ei.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:u,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var K={};function ze(){if(!K.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return K.solanaRpcEndpoint}function Ne(){if(!K.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return K.lightProtocolRpc}function re(){if(!K.solanaRpc)throw new Error("Rpc is not initialized yet");return K.solanaRpc}function Ri(){if(!K.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return K.sendAndConfirm}function vi(){if(!K.computeEstimate)throw new Error("Rpc is not initialized yet");return K.computeEstimate}function Sn(){return K.jitoTipsConfig?K.jitoTipsConfig:{blockEngineUrl:"https://mainnet.block-engine.jito.wtf/api/v1",getJitoTipsUrl:"https://bundles.jito.wtf/api/v1/bundles/tip_floor",priority:"landed_tips_75th_percentile"}}function NW(){Object.keys(K).forEach(e=>{K[e]=void 0;});}function HW({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){K.solanaRpcEndpoint=e,K.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});K.solanaRpc=t,K.sendAndConfirm=c,K.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),K.jitoTipsConfig=s??null;}var _=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(u.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=ze().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:a,queuePubkeyIndex:i,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 a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:a,addressQueuePubkeyIndex:i});}return {stateTrees: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 $t(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await Ui(e);return s&&n?.set(e.toString(),s),s}}async function ce(e,n){let s=(await Promise.all(e.map(async t=>$t(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new Error("Unable to find compressed account.");return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function b(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,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:d.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((d,A)=>({addressTreeInfo:a[A],outputStateTreeIndex:i,address:d.address,type:d.type}))}function Y(e,n,r,s,t,c,a){let i=[];for(let A=0;A<n.length;A++)i.push({treeInfo:n[A],rootIndex:s[A],leafIndex:r[A],proveByIndex:t[A],hash:c[A].hash});let o=e.packTreeInfos(i,[]).stateTrees;if(!o)throw new Error("Unable to parsed data.");return c.map((A,g)=>({data:a.decode(A.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(A.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Te(e,n,r,s,t){let c=null,a=null,i=new _;if(e){await i.addSystemAccounts();let{address:o}=await j(n,r),d=(await ce([{address:o,type:"Settings"}],t))[0];s?a={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.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([d],[]);let A=i.packTreeInfos([{treeInfo:a.treeInfos[0],rootIndex:a.rootIndices[0],leafIndex:a.leafIndices[0],proveByIndex:a.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!A)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:A.packedTreeInfos[0]},data:F().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:a,packedAccounts:i}}async function w(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Ne().getValidityProofV0(e,n)}catch(c){if(console.error(`Attempt ${t}, Get Validity Proof failed. ${c}`),t++,t>=r)throw new Error(`Failed to get validity proof after ${r} attempts: ${c}`);await new Promise(a=>setTimeout(a,s));}throw new Error(`Failed to get validity proof after ${r} attempts`)}async function fe(){return (await er()).length-1}var xn;async function er(){if(!xn){let{data:e}=await Hs(re(),await Wi());xn=e.whitelistedAddressTrees;}return xn}async function tr(e,n,r){let s=await AI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function AI(e,n,r){let{address:s}=await k(e,n),t=await $t(s,r);return t?.data?.data?J().decode(t.data.data):null}async function In(e,n,r){let s=await gI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function gI(e,n,r){try{let{address:s}=await j(e,n),t=await $t(s,r);if(!t?.data?.data)throw new Error("No compressed settings account found.");let c=F().decode(t.data.data);if(c.data.__option==="None")throw new Error("No compressed settings account found.");return {...c.data.value,isCompressed:!0}}catch{let s=await Fr(re(),await Z(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function Cn(e){let n=await er();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function gL(e){let r=(await er()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function Ui(e){let n=await stateless_js.rpcRequest(Ne().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),r;if(stateless_js.featureFlags.isV2()?r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in r)throw new web3_js.SolanaJSONRPCError(r.error,`failed to get info for compressed account ${e?e.toString():""}`);if(r.result.value===null)return null;let s=stateless_js.featureFlags.isV2()?r.result.value.merkleContext.tree:r.result.value.tree,t=ze().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().getStateTreeInfos(),c=stateless_js.getStateTreeInfoByPubkey(t,s),a=r.result.value;return stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(c,a.hash,a.leafIndex),a.owner,stateless_js.bn(a.lamports),a.data?stateless_js.parseAccountData(a.data):void 0,a.address||void 0)}async function j(e,n=0){let r=await Cn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function k(e,n=0){let r=await Cn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof Me?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function Je({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new Error("RpId not found.");if(!e)throw new Error("RpIdHash not found.");let[r]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function Gi(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Wi(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Fi(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Me?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ie(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function Z(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function zi(e){let n=await Z(e);return await Ie(n)}async function IL(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}function nr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function TI(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 Ji(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 ji(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 a=e[s]|e[s+1]<<8;if(s+=2,s+a>e.length)throw new Error("MaxLengthExceeded");let i=e.slice(s,s+a),o=t.decode(i);r.push(o),s+=a;}return r}function qi(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 h=n&127;r+=h;}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 a=e[r+1],i=r+2,o=e.slice(i,i+a),d=c[0]===0&&c.length>32?c.slice(1):c,A=o[0]===0&&o.length>32?o.slice(1):o;if(d.length>32||A.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"+nr(A)),E=(f>p?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=TI(E);return new Uint8Array([...g,...x])}function sr(e){return new Uint8Array([...new Uint8Array(he(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(he(e.response.clientDataJSON)))])}function kL(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+nr(n.get(-2))),y:BigInt("0x"+nr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function NL(e){let r=nist_js.p256.Point.fromBytes(new Uint8Array(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 HL(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(he(n)),c=JSON.parse(new TextDecoder().decode(he(r))),a=Ji(c),i=qi(new Uint8Array(he(s))),o=await Je({rpIdHash:t.subarray(0,32)});return new C(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(he(r)),truncatedClientDataJson:a,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:Dn(e.clientSignature.clientOrigin,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:i,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}async function VL(e,n){let{data:r}=await kn(re(),e),t=ji(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}function Dn(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function GL(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function FL(e){return Mn(e.data.payload.authResponse)}function zL(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...Dn(n,r,s)]))}async function KL(e,n,r,s,t,c){let a;if(!t||!c){let o=(await re().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed"}).send()).value?.data;if(!o)throw new Error("Unable to fetch slot sysvar");let d=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(d.subarray(8,16)).toString(),a=d.subarray(16,48),t=gill.getBase58Decoder().decode(a);}else a=new Uint8Array(gill.getBase58Encoder().encode(t));let i=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...sha2_js.sha256(typeof e.transactionMessageBytes=="string"?new Uint8Array(he(e.transactionMessageBytes)):e.transactionMessageBytes),...a,...Dn(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:i}}function Mn(e){return sha2_js.sha256(sr(e))}function JL(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function he(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),a=new Uint8Array(c);for(let i=0;i<t.length;i++)a[i]=t.charCodeAt(i);return c}async function En(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await re().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 a=Math.ceil((s.unitsConsumed??0)*1.1)||8e5;return a>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:a})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function $i(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,a)=>c-a);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function ed(e,n){if(e.length===0)throw new Error("Bundle is empty.");for(let c=0;c<e.length;c++){if(e[c].length>1644)throw new Error(`Transaction ${c} exceeds maximum length, ${e[c].length}. Retry again.`);console.log(`Transaction ${c} length: ${e[c].length}`);}let r=await 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:[]}))}]})});if(!r.ok)throw console.error(await r.json()),new Error("Failed to simulate bundle");let{result:s,error:t}=await r.json();if(!s||t)throw console.error(t??s),new Error(`Unable to simulate bundle: ${JSON.stringify(t??s)}`);if(typeof s.value.summary!="string"&&s.value.summary.failed){let{TransactionFailure:c}=s.value.summary.failed.error,[,a]=c;throw console.error(t??s),new Error(`Simulation failed: ${a}`)}return s.value.transactionResults.map(c=>c.unitsConsumed)}function V(e,n=0){let r=e instanceof C?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}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,a=r?.authData&&r.verifyArgs?.clientDataJson?sr(r.authResponse):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:a,publicKey:i}}function qe(e){if(e instanceof Me)return {keyType:bt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:bt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function Qi(e){return e instanceof C?e.toString():e.address.toString()}function ge(e){let n=new Set,r=[];for(let s of e)n.has(Qi(s))||(r.push(s),n.add(Qi(s)));if(r.filter(s=>s instanceof C).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function td({payer:e,tipAmount:n}){let r=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],s=r[Math.floor(Math.random()*r.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(s),amount:n})}async function dO(e){let n=await En(e,true),r=await ed(n.map(gill.getBase64EncodedWireTransaction),ze()),s=await En(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await XI(s.map(gill.getBase64EncodedWireTransaction))}async function uO({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await re().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[a,i]=await Promise.all([vi()(c),$i(re(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil(a*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...i>0?[programs.getSetComputeUnitPriceInstruction({microLamports:i})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await Ri()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function XI(e,n=10,r=1e3,s=Sn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let a=await fetch(`${t}/bundles`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})});if(a.status===429&&c<n){await new Promise(o=>setTimeout(o,r));continue}let i=await a.json();if(i.error)throw new Error(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);return i.result}throw new Error("Failed to send bundle after retries.")}async function AO(e,n=30,r=3e3,s=Sn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let a=await fetch(`${t}/getBundleStatuses`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});if(a.status===429&&c<n){await new Promise(d=>setTimeout(d,r));continue}let i=await a.json();if(i.error)throw new Error(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);let o=i.result;if(o.value.length){let d=o.value[0];if(d.confirmation_status==="confirmed"||d.confirmation_status==="finalized")return d.transactions[d.transactions.length-1]}if(c<n){await new Promise(d=>setTimeout(d,r));continue}}throw new Error("Failed to get bundle status after retries.")}function gO(e,n){if(n.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:r}=n.members.find(i=>nd(i.pubkey)===e)??{};if(!r)throw new Error("No permissions found for the current member.");let s=De.has(r,xe.InitiateTransaction),t=De.has(r,xe.VoteTransaction),c=De.has(r,xe.ExecuteTransaction);if(s&&t&&c)return {};if(!t||!c)throw new Error("Signer lacks the required Vote/Execute permissions.");let a=n.members.find(i=>i.role===2);if(!a)throw new Error("No transaction manager available in wallet.");return {transactionManagerAddress:gill.address(nd(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function yO({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await tr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return QI(n,c.transactionManagerUrl.value,e,s)}function QI(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let i=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function nd(e){return e.keyType===bt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function UO({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let a=await nC(r),i=new _,o=null,d=null,A=[];if(a.length||t){let h=await sC({packedAccounts:i,userAccounts:a,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:c});o=h.proof,d=h.settingsMutArgs??null,A=h.userMutArgs??[];}let{configActions:g,secp256r1VerifyInput:p}=await oC({configActionsArgs:r,packedAccounts:i,userMutArgs:A,index:e}),{remainingAccounts:f,systemOffset:l}=i.toAccountMetas(),E=b(o,l);return {instructions:t?[so({configActions:g,payer:s,authority:gill.createNoopSigner(await zi(e)),compressedProofArgs:E,settingsMut:d,remainingAccounts:f})]:[await Qs({settingsIndex:e,configActions:g,payer:s,compressedProofArgs:E,remainingAccounts:f})],secp256r1VerifyInput:p}}async function nC(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>k(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=>k(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function sC({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let a=[];if(r){let f=(await j(s,t)).address;a.push({address:f,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await ce(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await w(i,[]),d=[],A=[];for(let f of i)f.type==="Settings"?d.push(f):f.type==="User"&&A.push(f);let g,p=[];if(r&&o&&(g=Y(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),d,F())[0]),A.length&&o){let f=r?1:0;p=Y(e,o.treeInfos.slice(f),o.leafIndices.slice(f),o.rootIndices.slice(f),o.proveByIndices.slice(f),A,J());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function oC({index:e,configActionsArgs:n,packedAccounts:r,userMutArgs:s}){let t=[],c=[];for(let a of n)switch(a.type){case "AddMembers":{let i=[];for(let o of a.members)if(o.member instanceof C){let d=t.length,{message:A,signature:g,publicKey:p,domainConfig:f}=V(o.member,d);A&&g&&p&&t.push({message:A,signature:g,publicKey:p}),f&&r.addPreAccounts([{address:f,role:gill.AccountRole.READONLY}]);let l=await k(o.member,o.userAddressTreeIndex).then(E=>s.find(x=>new Pn__default.default(new Uint8Array(x.accountMeta.address)).eq(E.address)));if(!l)throw new Error("Unable to find user account");i.push(sd({permissionArgs:o.permissions,index:d,userMutArgs:l,pubkey:o.member}));}else {let d=await k(o.member,o.userAddressTreeIndex).then(A=>s.find(g=>new Pn__default.default(new Uint8Array(g.accountMeta.address)).eq(A.address)));if(!d)throw new Error("Unable to find user account");i.push(sd({permissionArgs:o.permissions,index:-1,userMutArgs:d,pubkey:o.member}));}c.push({__kind:a.type,fields:[i]});break}case "RemoveMembers":{let i=await Promise.all(a.members.map(o=>k(o.member,o.userAddressTreeIndex).then(d=>{let A=s.find(g=>new Pn__default.default(new Uint8Array(g.accountMeta.address)).eq(d.address));if(!A)throw new Error("Unable to find user account");return aC({pubkey:o.member,userMutArgs:A,index:e})})));c.push({__kind:a.type,fields:[i]});break}case "EditPermissions":{let i=a.members.map(o=>cC({permissionArgs:o.permissions,pubkey:o.member}));c.push({__kind:a.type,fields:[i]});break}default:c.push({__kind:a.type,fields:[a.threshold]});}return {configActions:c,secp256r1VerifyInput:t}}function cC({pubkey:e,permissionArgs:n}){return {memberKey:qe(e),permissions:od(n)}}function aC({pubkey:e,userMutArgs:n,index:r}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");let s=n.data.delegatedTo.__option==="Some"?Number(n.data.delegatedTo.value.index.toString())===r:false;return {memberKey:qe(e),userArgs:s?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function sd({pubkey:e,permissionArgs:n,index:r,userMutArgs:s}){if(s.data.role===1){if(s.data.delegatedTo.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}else if(s.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:qe(e),permissions:od(n),verifyArgs:e instanceof C&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin,clientAndDeviceHash:e.clientAndDeviceHash}):gill.none(),userArgs:s.data.role===1?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]}}}function od(e){let n=[];return e.initiate&&n.push(xe.InitiateTransaction),e.vote&&n.push(xe.VoteTransaction),e.execute&&n.push(xe.ExecuteTransaction),De.fromPermissions(n)}var Ye=33,Ze=64,_n=14,mC=2,pC=gill.address("Secp256r1SigVerify1111111111111111111111111");function TC(){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 fC(){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 dd(){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=fC();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=_n;let a=[];for(let i=0;i<r;i++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Ye).decode(e,n);n+=Ye;let d=gill.fixDecoderSize(gill.getBytesDecoder(),Ze).decode(e,n);n+=Ze;let A=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,a.push({publicKey:o,signature:d,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function ud(){return gill.createEncoder({getSizeFromValue:e=>{let n=_n*e.offsets.length,r=e.payload.reduce((s,t)=>s+Ye+Ze+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=TC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Ye).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Ze).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function OO(){return gill.combineCodec(ud(),dd())}function G(e,n){let r=e.length,s=mC+r*_n,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],A=s,g=A+Ye,p=g+Ze;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Ye+Ze+d.length;}let c=n?.programAddress??pC,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:ud().encode(a)}}function BO(e){return {programAddress:e.programAddress,accounts:{},data:dd().decode(e.data)}}async function JO({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let a=await Z(e),{address:i}=await j(e,n),o=await ce([{address:i,type:"Settings"}],t),d=await w(o,[]),A=Y(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(S=>S.type==="Settings"),F())[0],g=ge(s),p=g.filter(S=>S instanceof C),f=[],l=[];for(let S of p){let W=f.length,{domainConfig:U,verifyArgs:q,signature:N,publicKey:H,message:L}=V(S,W);L&&N&&H&&f.push({message:L,signature:N,publicKey:H}),U&&(c.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),q?.__option==="Some"&&l.push({domainConfigKey:U,verifyArgs:q.value}));}c.addPreAccounts(g.filter(S=>"address"in S).map(S=>({address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S})));let{remainingAccounts:E,systemOffset:x}=c.toAccountMetas(),h=b(d,x),I=[];return f.length>0&&I.push(G(f)),I.push(Ao({settings:a,settingsMutArgs:A,compressedProofArgs:h,payer:r,secp256r1VerifyArgs:l,remainingAccounts:E})),I}async function YO({admin:e,addressTree:n}){return Js({payer:e,addressTree:n,remainingAccounts:[]})}async function rB({payer:e,rpId:n,origins:r,authority:s}){let t=await Je({rpId:n}),c=new _;await c.addSystemAccounts();let a=await fe(),{address:i,addressTree:o}=await k(s.address,a),d=[{address:i,tree:o,queue:o,type:"User"}],A=await w([],d),g=(await ae(c,A.treeInfos,A.roots,A.rootIndices,d))[0],{remainingAccounts:p,systemOffset:f}=c.toAccountMetas(),l=b(A,f);return await Io({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:l,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function gB({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let a=[];r.index&&(a.push({address:(await j(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await k(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await ce(a,t):[],o=await fe(),{address:d,addressTree:A}=await k(r.member,o),g=[{address:d,type:"User",tree:A,queue:A}],p=await w(i,g),f=null,l=null,E=i.filter(U=>U.type==="Settings"),x=i.filter(U=>U.type==="User");E.length&&(f=Y(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),E,F())[0]),x.length&&(l=Y(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,J())[0]);let h=await ae(c,p.treeInfos.slice(i.length),p.roots.slice(i.length),p.rootIndices.slice(i.length),g),{remainingAccounts:I,systemOffset:S}=c.toAccountMetas(),W=b(p,S);return await Eo({payer:n,authority:e,compressedProofArgs:W,member:ft().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:l?gill.some(l):gill.none()}):gill.none(),userAccountCreationArgs:h[0],domainConfig:s,remainingAccounts:I})}async function TB({payer:e}){let n=await Gi();return vo({payer:e,globalCounter:n})}async function DB({createUserArgs:e,payer:n}){let r=new _;await r.addSystemAccounts(),r.addPreAccounts(e.map(A=>({address:A.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:A.member})));let s=await fe(),t=await Promise.all(e.map(async A=>{let{address:g,addressTree:p}=await k(A.member.address,s);return {address:g,tree:p,queue:p,type:"User"}})),c=await w([],t),a=await ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:o}=r.toAccountMetas(),d=b(c,o);return await ko({compressedProofArgs:d,payer:n,createUserArgs:e.map((A,g)=>({member:A.member.address,role:A.role,userCreationArgs:a[g],transactionManagerUrl:A.role===2?A.transactionManagerUrl:null})),remainingAccounts:i})}async function PB({admin:e,rpId:n,disable:r}){let s=await Je({rpId:n});return Zo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function LB({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let a=new _;await a.addSystemAccounts();let i=await fe(),{address:o,addressTree:d}=await k(r.address,i),A=[{address:o,tree:d,queue:d,type:"User"}],g=await w([],A),p=(await ae(a,g.treeInfos,g.roots,g.rootIndices,A))[0],f=a.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:b(g,f.systemOffset),authorityCreationArgs:p};}return rc({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function HB({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new _;await s.addSystemAccounts();let t=await ce([{address:(await k(e.address,n)).address,type:"User"}]),c=await w(t,[]),a=Y(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,J())[0],{remainingAccounts:i,systemOffset:o}=s.toAccountMetas(),d=b(c,o);return ic({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:a,remainingAccounts:i})}async function ZB({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:d}=V(n),A=[];i&&o&&d&&A.push({message:i,signature:o,publicKey:d});let g=await tr(n instanceof C?n:n.address,r,t),p=[];p.push({address:(await k(n instanceof C?n:n.address,r)).address,type:"User"});let f,l=null,E,x=null;g.delegatedTo.__option==="Some"&&((await In(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await j(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),l={start:p.length-1,end:p.length}):f=await Z(g.delegatedTo.value.index)),s&&((await In(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await j(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):E=await Z(s.index));let h=new _;await h.addSystemAccounts();let I=await ce(p,t),S=await w(I,[]),W=Y(h,S.treeInfos.slice(0,1),S.leafIndices.slice(0,1),S.rootIndices.slice(0,1),S.proveByIndices.slice(0,1),I.slice(0,1),J())[0],U=l?gill.some(Y(h,S.treeInfos.slice(l.start,l.end),S.leafIndices.slice(l.start,l.end),S.rootIndices.slice(l.start,l.end),S.proveByIndices.slice(l.start,l.end),I.slice(l.start,l.end),F())[0]):gill.none(),q=x?gill.some(Y(h,S.treeInfos.slice(x.start,x.end),S.leafIndices.slice(x.start,x.end),S.rootIndices.slice(x.start,x.end),S.proveByIndices.slice(x.start,x.end),I.slice(x.start,x.end),F())[0]):gill.none(),{remainingAccounts:N,systemOffset:H}=h.toAccountMetas(),L=b(S,H),ne=[];return A.length>0&&ne.push(G(A)),ne.push(mc({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof C?void 0:n,oldSettings:f,oldSettingsMutArgs:U,newSettings:E,newSettingsMutArgs:q,compressedProofArgs:L,userMutArgs:W,remainingAccounts:N})),ne}async function nw({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:a}=await j(r,s),i=[{address:c,tree:a,queue:a,type:"Settings"}],o=await w([],i),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),p=b(o,g);return xc({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:A})}async function uw({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:a}=await k(r,s),i=[{address:c,tree:a,queue:a,type:"User"}],o=await w([],i),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),p=b(o,g);return hc({compressedProofArgs:p,args:e,authority:n,userCreationArgs:d,remainingAccounts:A})}async function Uw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:d}=V(r),A=[];i&&o&&d&&A.push({message:i,signature:o,publicKey:d});let g=new _;await g.addSystemAccounts();let p=[],f=[];f.push(...await ce([{address:(await k("address"in r?r.address:r,s)).address,type:"User"}],t));let l=await fe(),{address:E,addressTree:x}=await j(e,l);p.push({address:E,queue:x,tree:x,type:"Settings"});let h=f.length,I=await w(f,p),S=Y(g,I.treeInfos.slice(0,h),I.leafIndices.slice(0,h),I.rootIndices.slice(0,h),I.proveByIndices.slice(0,h),f.filter(ne=>ne.type==="User"),J())[0],U=(await ae(g,I.treeInfos.slice(h),I.roots.slice(h),I.rootIndices.slice(h),p)).find(ne=>ne.type==="Settings")??null;c?g.addPreAccounts([{address:c,role:gill.AccountRole.READONLY}]):"address"in r&&g.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:q,systemOffset:N}=g.toAccountMetas(),H=b(I,N),L=[];if(!U)throw new Error("Settings creation args is missing.");return A.length>0&&L.push(G(A)),L.push(await Lo({settingsIndex:e,payer:n,initialMember:r instanceof C?void 0:r,secp256r1VerifyArgs:a,domainConfig:c,userArgs:S.data.role===1?{__kind:"Mutate",fields:[S]}:{__kind:"Read",fields:[S]},compressedProofArgs:H,settingsCreation:U,remainingAccounts:q})),L}async function Gw({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let a=await ce([{address:(await j(e,n)).address,type:"Settings"}],t),i=await w(a,[]),o=Y(c,i.treeInfos,i.leafIndices,i.rootIndices,i.proveByIndices,a.filter(I=>I.type==="Settings"),F())[0],d=ge(s),A=d.filter(I=>I instanceof C),g=[],p=[];for(let I of A){let S=g.length,{domainConfig:W,verifyArgs:U,signature:q,publicKey:N,message:H}=V(I,S);H&&q&&N&&g.push({message:H,signature:q,publicKey:N}),W&&(c.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),U?.__option==="Some"&&p.push({domainConfigKey:W,verifyArgs:U.value}));}c.addPreAccounts(d.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:f,systemOffset:l}=c.toAccountMetas(),E=b(i,l),x=[];g.length>0&&x.push(G(g));let h=await Z(e);return x.push(zo({settings:h,payer:r,settingsMut:o,compressedProofArgs:E,secp256r1VerifyArgs:p,remainingAccounts:f})),x}function CC(e,n,r,s){let t=DC(e,n),c=MC(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 DC(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,a=s-t,i=r-s-c;return n>=r?false:n<a?true:n>=s?n-s<i:false}function MC(e,n){return n<e.header.numSignerAccounts}async function cr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Pi(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(i=>i.lookupTableAddress),re()):{}),a=[];a.push(...t.addressTableLookups?.map(i=>({role:gill.AccountRole.READONLY,address:i.lookupTableAddress}))??[]);for(let[i,o]of t.staticAccounts.entries())a.push({address:o,role:CC(t,i,o,e)});if(t.addressTableLookups)for(let i of t.addressTableLookups){let o=c[i.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${i.lookupTableAddress} not found`);for(let d of i.writableIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${d}`);a.push({address:A,role:gill.AccountRole.WRITABLE});}for(let d of i.readonlyIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${d}`);a.push({address:A,role:gill.AccountRole.READONLY});}}for(let i of s?.filter(o=>o.address!==e)??[]){let o=a.findIndex(d=>d.address===i.address);o===-1?a.push({address:i.address,role:gill.AccountRole.READONLY_SIGNER,signer:i}):a[o].role===gill.AccountRole.READONLY||a[o].role===gill.AccountRole.READONLY_SIGNER?a[o]={address:i.address,role:gill.AccountRole.READONLY_SIGNER,signer:i}:(a[o].role===gill.AccountRole.WRITABLE||a[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(a[o]={address:i.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:i});}return {accountMetas:a,addressLookupTableAccounts:c,transactionMessage:t}}async function Td({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let d=await Ie(e),{accountMetas:A,addressLookupTableAccounts:g}=await cr({transactionMessageBytes:r,walletAddress:d,additionalSigners:a,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(G(c)),p.push(o?ui({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):si({transactionBuffer:n,payer:s.address,settings:e})),i&&p.push(td({payer:s,tipAmount:i})),{instructions:p,addressLookupTableAccounts:g}}async function fd({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:a=[],compressed:i=false,simulateProof:o=false,cachedAccounts:d}){let A=ge(s),g=await Z(e),p=await Ie(g),[{accountMetas:f,addressLookupTableAccounts:l,transactionMessage:E},{settingsReadonlyArgs:x,proof:h,packedAccounts:I}]=await Promise.all([cr({transactionMessageBytes:r,walletAddress:p,additionalSigners:A.filter(L=>!(L instanceof C)),addressesByLookupTableAddress:c}),Te(i,e,n,o,d)]);I.addPreAccounts(f);let S=A.filter(L=>L instanceof C),W=[];for(let L of S){let ne=a.length,{domainConfig:pe,verifyArgs:Pe,signature:Ce,publicKey:Re,message:Wt}=V(L,ne);Wt&&Ce&&Re&&a.push({message:Wt,signature:Ce,publicKey:Re}),pe&&(I.addPreAccounts([{address:pe,role:gill.AccountRole.READONLY}]),Pe?.__option==="Some"&&W.push({domainConfigKey:pe,verifyArgs:Pe.value}));}let{remainingAccounts:U,systemOffset:q}=I.toAccountMetas(),N=[];a.length>0&&N.push(G(a));let H=hC(E,f);if(i){if(!t||!x)throw new Error("Payer not found or proof args is missing.");let L=b(h,q);N.push(Ci({secp256r1VerifyArgs:W,transactionMessage:H,settingsReadonlyArgs:x,compressedProofArgs:L,payer:t,remainingAccounts:U}));}else N.push(Ti({secp256r1VerifyArgs:W,settings:g,transactionMessage:H,remainingAccounts:U}));return {instructions:N,addressLookupTableAccounts:l}}function hC(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 Tk({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let o=ge(s),d=await Z(e),A=await Ie(d),{settingsReadonlyArgs:g,proof:p,packedAccounts:f}=await Te(i,e,n,false,t),l=[],E=[];for(let S of o)if(S instanceof C){let W=l.length,{domainConfig:U,verifyArgs:q,signature:N,publicKey:H,message:L}=V(S,W);L&&N&&H&&l.push({message:L,signature:N,publicKey:H}),U&&(f.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),q?.__option==="Some"&&E.push({domainConfigKey:U,verifyArgs:q.value}));}else f.addPreAccounts([{address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S}]);let{remainingAccounts:x,systemOffset:h}=f.toAccountMetas(),I=[];if(l.length>0&&I.push(G(l)),i){if(!a||!g)throw new Error("Payer not found or proof args is missing.");let S=b(p,h);I.push(Bc({amount:c,settingsReadonlyArgs:g,compressedProofArgs:S,payer:a,secp256r1VerifyArgs:E,source:A,destination:r,remainingAccounts:x}));}else I.push(bc({amount:c,secp256r1VerifyArgs:E,source:A,destination:r,settings:d,remainingAccounts:x}));return I}async function hk({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:o,createAtaIfNeeded:d=true,compressed:A=false}){let g=ge(t),p=await Z(e),f=await Ie(p),[l,E]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,f,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:x,proof:h,packedAccounts:I}=await Te(A,e,n,false,c),S=[],W=[];for(let H of g)if(H instanceof C){let L=S.length,{domainConfig:ne,verifyArgs:pe,signature:Pe,publicKey:Ce,message:Re}=V(H,L);Re&&Pe&&Ce&&S.push({message:Re,signature:Pe,publicKey:Ce}),ne&&(I.addPreAccounts([{address:ne,role:gill.AccountRole.READONLY}]),pe?.__option==="Some"&&W.push({domainConfigKey:ne,verifyArgs:pe.value}));}else I.addPreAccounts([{address:H.address,role:gill.AccountRole.READONLY_SIGNER,signer:H}]);let{remainingAccounts:U,systemOffset:q}=I.toAccountMetas(),N=[];if(S.length>0&&N.push(G(S)),A){if(!i||!x)throw new Error("Payer not found or proof args is missing.");let H=b(h,q);N.push(Jc({amount:a,createAtaIfNeeded:d,settingsReadonlyArgs:x,compressedProofArgs:H,payer:i,secp256r1VerifyArgs:W,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:E,mint:s,tokenProgram:o,remainingAccounts:U}));}else N.push(Hc({amount:a,createAtaIfNeeded:d,secp256r1VerifyArgs:W,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:E,settings:p,mint:s,tokenProgram:o,remainingAccounts:U}));return N}async function wk({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:a}){let i=await Ls(re(),s),o=i.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:A,packedAccounts:g}=await Te(c,e,n,false,a),{remainingAccounts:p,systemOffset:f}=g.toAccountMetas(),{domainConfig:l,verifyArgs:E,message:x,signature:h,publicKey:I}=V(r),S=[];if(x&&h&&I&&S.push(G([{message:x,signature:h,publicKey:I}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let W=b(A,f);S.push(sa({transactionBuffer:s,domainConfig:l,closer:r instanceof C?void 0:r,rentCollector:i.data.payer,secp256r1VerifyArgs:E,settingsReadonlyArgs:d,payer:t,compressedProofArgs:W,remainingAccounts:p}));}else S.push(Qc({transactionBuffer:s,domainConfig:l,closer:r instanceof C?void 0:r,settings:o,payer:i.data.payer,secp256r1VerifyArgs:E,remainingAccounts:[]}));return S}function Id({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:d,expectedSecp256r1Signers:A}){let{domainConfig:g,verifyArgs:p,message:f,signature:l,publicKey:E}=V(n),x=[];if(f&&l&&E&&x.push(G([{message:f,signature:l,publicKey:E}])),d){let{settingsReadonlyArgs:h,compressedProofArgs:I,remainingAccounts:S}=d;x.push(Ta({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof C?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},settingsReadonlyArgs:h,compressedProofArgs:I,remainingAccounts:S}));}else x.push(ua({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof C?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},remainingAccounts:[]}));return x}function Cd({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=V(e),d=[];return i&&a&&o&&d.push(G([{message:i,signature:a,publicKey:o}])),s?d.push(Ra({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof C?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Ca({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof C?void 0:e,remainingAccounts:[]})),d}function Dd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Ha({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):La({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Md({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=V(n),d=[];return o&&a&&i&&d.push(G([{message:o,signature:a,publicKey:i}])),s?d.push(Qa({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof C?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Ja({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof C?void 0:n,remainingAccounts:[]})),d}async function EN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o,compressed:d=false,additionalVoters:A=[],additionalSigners:g=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:f}){let l=await Z(n),E=Math.floor(Math.random()*255),x=await Fi(l,t instanceof C?t:t.address,E),h=[],I=[];for(let X=0;X<s.length;X+=p){let Ln=s.subarray(X,X+p);h.push(Ln),I.push(sha2_js.sha256(Ln));}let S=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:W,proof:U,packedAccounts:q}=await Te(d,n,r,false,f),{remainingAccounts:N,systemOffset:H}=q.toAccountMetas(),L=W?{settingsReadonlyArgs:W,compressedProofArgs:b(U,H),remainingAccounts:N,payer:e}:null,ne=ge([t,...c?[c]:[],...A]).filter(X=>X instanceof C).map(X=>({memberKey:qe(X),messageHash:Mn(X.authResponse)})),pe=Id({finalBufferHash:S,finalBufferSize:s.length,bufferIndex:E,payer:e,transactionBufferAddress:x,settings:l,creator:t,preauthorizeExecution:!c,bufferExtendHashes:I,compressedArgs:L,expectedSecp256r1Signers:ne}),Pe=h.map(X=>Dd({transactionMessageBytes:X,transactionBufferAddress:x,settings:l,compressed:d})),Ce=A.map(X=>Md({voter:X,transactionBufferAddress:x,settings:l,compressedArgs:L})),Re=Cd({compressedArgs:L,settings:l,executor:c,transactionBufferAddress:x}),{instructions:Wt,addressLookupTableAccounts:Pd}=await Td({compressed:d,settings:l,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o}),Xe=X=>({payer:e,instructions:X,addressesByLookupTableAddress:Pd});return [Xe(pe),...Pe.map(X=>Xe([X])),...Ce.length?[Xe(Ce.flat())]:[],Xe(Re),Xe(Wt)]}var ir=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=a=>{let i=s.get(a);return i===void 0&&(i={isSigner:false,isWritable:false,isInvoked:false},s.set(a,i)),i},c=t(r);c.isSigner=true,c.isWritable=true;for(let a of n){t(a.programAddress).isInvoked=false;for(let i of a.accounts??[]){let o=t(i.address);o.isSigner||=i.role===gill.AccountRole.READONLY_SIGNER||i.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=i.role===gill.AccountRole.WRITABLE||i.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(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),a={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[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let i=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [a,i]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],a=>!a.isSigner&&!a.isInvoked&&a.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],a=>!a.isSigner&&!a.isInvoked&&!a.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,a]of this.keyMetaMap.entries())if(r(a)){let i=c,o=n.findIndex(d=>d===i);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(i),this.keyMetaMap.delete(c);}}return [s,t]}};var dr=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,a)=>{s.set(c,a);});let t=c=>{let a=s.get(c);if(a===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return a};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(a=>t(a.address))??[],data:c.data}))}};function hd({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=ir.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(s??{});for(let p of i){let f=t.extractTableLookup(p);if(f!==void 0){let{addressTableLookup:l,drainedKeys:E}=f;c.push({readonlyIndexes:l.readonlyIndexes,readableIndices:l.readonlyIndexes,writableIndexes:l.writableIndexes,writableIndices:l.writableIndexes,lookupTableAddress:gill.address(l.lookupTableAddress)}),a.writable.push(...E.writable),a.readonly.push(...E.readonly);}}let[o,d]=t.getMessageComponents(),g=new dr(d,a).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function kN({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=hd({instructions:e,payer:n,recentBlockhash:u,addressesByLookupTableAddress:r});return hi(s)}async function FN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:a,cachedAccounts:i,compressed:o=false,simulateProof:d=false}){let{instructions:A,addressLookupTableAccounts:g}=await fd({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:a,simulateProof:d,cachedAccounts:i});return {payer:e,instructions:A,addressesByLookupTableAddress:g}}
|
|
2
|
+
exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=zs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=to;exports.CHANGE_CONFIG_DISCRIMINATOR=Zs;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=ao;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=So;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Do;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Po;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Uo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Bo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Vo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=jo;exports.DOMAIN_CONFIG_DISCRIMINATOR=On;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=ec;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=oc;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=Ac;exports.GLOBAL_COUNTER_DISCRIMINATOR=Vn;exports.KeyType=bt;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=fc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Dc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=px;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=JS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Lx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Ox;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=YS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=qS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=ox;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=nx;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=jS;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=tx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=Mx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Ex;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=hx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=lx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=Tx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=fx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=ux;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=kx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=sx;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=gx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Dx;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=Sx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=dx;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=QS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=HS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=FS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=NS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=GS;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Ux;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=ax;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=rx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=ex;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=ix;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=Ax;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=zS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=bx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Bx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=yx;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=_x;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=mx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=Ix;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=XS;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=$S;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=wx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=ZS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=vx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=KS;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=VS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Wx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=cx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=Px;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Rx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=Cx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=xx;exports.MULTI_WALLET_PROGRAM_ADDRESS=u;exports.MultiWalletAccount=BS;exports.MultiWalletInstruction=wS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Wc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Rc;exports.Permission=xe;exports.Permissions=De;exports.SETTINGS_DISCRIMINATOR=Ms;exports.Secp256r1Key=Me;exports.SignedSecp256r1Key=C;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=zc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=kc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=ta;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Yc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=ya;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=aa;exports.TRANSACTION_BUFFER_DISCRIMINATOR=_s;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ea;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Sa;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=wa;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=_a;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Ya;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Fa;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=ai;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=ti;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Si;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=yi;exports.UserRole=Be;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=ws;exports.addWhitelistedAddressTrees=YO;exports.base64URLStringToBuffer=he;exports.bufferToBase64URLString=JL;exports.changeConfig=UO;exports.closeTransactionBuffer=wk;exports.compressSettingsAccount=JO;exports.configAction=TD;exports.convertMemberKeyToString=nd;exports.convertPubkeyCompressedToCose=NL;exports.convertPubkeyCoseToCompressed=kL;exports.createClientAuthorizationCompleteRequestChallenge=FL;exports.createClientAuthorizationStartRequestChallenge=GL;exports.createDomainConfig=rB;exports.createDomainUserAccounts=gB;exports.createGlobalCounter=TB;exports.createMessageChallenge=zL;exports.createTransactionBuffer=Id;exports.createTransactionChallenge=KL;exports.createTransactionManagerSigner=QI;exports.createUserAccounts=DB;exports.createWallet=Uw;exports.decodeDomainConfig=wn;exports.decodeGlobalCounter=Fn;exports.decodeSettings=hs;exports.decodeTransactionBuffer=Ws;exports.decodeWhitelistedAddressTree=Ns;exports.decompressSettingsAccount=Gw;exports.disableDomainConfig=PB;exports.editDomainConfig=LB;exports.editTransactionManagerUrl=HB;exports.editUserDelegate=ZB;exports.executeTransaction=Td;exports.executeTransactionBuffer=Cd;exports.executeTransactionSync=fd;exports.extendTransactionBuffer=Dd;exports.fetchAllDomainConfig=_C;exports.fetchAllGlobalCounter=kC;exports.fetchAllMaybeDomainConfig=Vd;exports.fetchAllMaybeGlobalCounter=nu;exports.fetchAllMaybeSettings=gy;exports.fetchAllMaybeTransactionBuffer=Ly;exports.fetchAllMaybeWhitelistedAddressTree=em;exports.fetchAllSettings=sh;exports.fetchAllTransactionBuffer=Ah;exports.fetchAllWhitelistedAddressTree=Th;exports.fetchCompressedAccount=Ui;exports.fetchDomainConfig=kn;exports.fetchGlobalCounter=wC;exports.fetchMaybeDomainConfig=Hd;exports.fetchMaybeGlobalCounter=ru;exports.fetchMaybeSettings=Fr;exports.fetchMaybeSettingsAccountData=gI;exports.fetchMaybeTransactionBuffer=Wy;exports.fetchMaybeUserAccountData=AI;exports.fetchMaybeWhitelistedAddressTree=$y;exports.fetchSettings=nh;exports.fetchSettingsAccountData=In;exports.fetchTransactionBuffer=Ls;exports.fetchUserAccountData=tr;exports.fetchWhitelistedAddressTree=Hs;exports.getAddMemberArgsCodec=FC;exports.getAddMemberArgsDecoder=Ar;exports.getAddMemberArgsEncoder=ur;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=Wh;exports.getAddWhitelistedAddressTreesInstruction=Oh;exports.getAddWhitelistedAddressTreesInstructionAsync=Js;exports.getAddWhitelistedAddressTreesInstructionDataCodec=Lh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Ks;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Xr;exports.getChangeConfigCompressedDiscriminatorBytes=$h;exports.getChangeConfigCompressedInstruction=so;exports.getChangeConfigCompressedInstructionDataCodec=eP;exports.getChangeConfigCompressedInstructionDataDecoder=no;exports.getChangeConfigCompressedInstructionDataEncoder=ro;exports.getChangeConfigDiscriminatorBytes=Fh;exports.getChangeConfigInstruction=Kh;exports.getChangeConfigInstructionAsync=Qs;exports.getChangeConfigInstructionDataCodec=zh;exports.getChangeConfigInstructionDataDecoder=Xs;exports.getChangeConfigInstructionDataEncoder=Qr;exports.getClientAndDeviceHash=Dn;exports.getCompiledInstructionCodec=JC;exports.getCompiledInstructionDecoder=yr;exports.getCompiledInstructionEncoder=gr;exports.getCompressSettingsAccountDiscriminatorBytes=iP;exports.getCompressSettingsAccountInstruction=Ao;exports.getCompressSettingsAccountInstructionDataCodec=dP;exports.getCompressSettingsAccountInstructionDataDecoder=uo;exports.getCompressSettingsAccountInstructionDataEncoder=io;exports.getCompressedAccountMetaCodec=ZC;exports.getCompressedAccountMetaDecoder=tt;exports.getCompressedAccountMetaEncoder=et;exports.getCompressedAccountMetaReadOnlyCodec=eD;exports.getCompressedAccountMetaReadOnlyDecoder=ot;exports.getCompressedAccountMetaReadOnlyEncoder=st;exports.getCompressedProofCodec=nD;exports.getCompressedProofDecoder=Sr;exports.getCompressedProofEncoder=lr;exports.getCompressedSettingsAddressFromIndex=j;exports.getCompressedSettingsCodec=aD;exports.getCompressedSettingsDataCodec=AD;exports.getCompressedSettingsDataDecoder=it;exports.getCompressedSettingsDataEncoder=at;exports.getCompressedSettingsDecoder=F;exports.getCompressedSettingsEncoder=ct;exports.getComputeBudgetEstimate=vi;exports.getConfigActionCodec=pD;exports.getConfigActionDecoder=gt;exports.getConfigActionEncoder=At;exports.getCreateDomainConfigDiscriminatorBytes=fP;exports.getCreateDomainConfigInstruction=SP;exports.getCreateDomainConfigInstructionAsync=Io;exports.getCreateDomainConfigInstructionDataCodec=lP;exports.getCreateDomainConfigInstructionDataDecoder=xo;exports.getCreateDomainConfigInstructionDataEncoder=en;exports.getCreateDomainUserAccountDiscriminatorBytes=PP;exports.getCreateDomainUserAccountInstruction=vP;exports.getCreateDomainUserAccountInstructionAsync=Eo;exports.getCreateDomainUserAccountInstructionDataCodec=RP;exports.getCreateDomainUserAccountInstructionDataDecoder=Mo;exports.getCreateDomainUserAccountInstructionDataEncoder=rn;exports.getCreateGlobalCounterDiscriminatorBytes=BP;exports.getCreateGlobalCounterInstruction=kP;exports.getCreateGlobalCounterInstructionAsync=vo;exports.getCreateGlobalCounterInstructionDataCodec=wP;exports.getCreateGlobalCounterInstructionDataDecoder=Ro;exports.getCreateGlobalCounterInstructionDataEncoder=sn;exports.getCreateMultiWalletCompressedDiscriminatorBytes=JP;exports.getCreateMultiWalletCompressedInstruction=qP;exports.getCreateMultiWalletCompressedInstructionAsync=Lo;exports.getCreateMultiWalletCompressedInstructionDataCodec=jP;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Wo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=on;exports.getCreateUserAccountArgsCodec=ID;exports.getCreateUserAccountArgsDecoder=Pr;exports.getCreateUserAccountArgsEncoder=hr;exports.getCreateUserAccountsDiscriminatorBytes=rR;exports.getCreateUserAccountsInstruction=sR;exports.getCreateUserAccountsInstructionAsync=ko;exports.getCreateUserAccountsInstructionDataCodec=nR;exports.getCreateUserAccountsInstructionDataDecoder=wo;exports.getCreateUserAccountsInstructionDataEncoder=an;exports.getDecompressSettingsAccountDiscriminatorBytes=gR;exports.getDecompressSettingsAccountInstruction=zo;exports.getDecompressSettingsAccountInstructionDataCodec=yR;exports.getDecompressSettingsAccountInstructionDataDecoder=Fo;exports.getDecompressSettingsAccountInstructionDataEncoder=Go;exports.getDisableDomainConfigDiscriminatorBytes=xR;exports.getDisableDomainConfigInstruction=Zo;exports.getDisableDomainConfigInstructionDataCodec=IR;exports.getDisableDomainConfigInstructionDataDecoder=Yo;exports.getDisableDomainConfigInstructionDataEncoder=qo;exports.getDomainConfigAddress=Je;exports.getDomainConfigCodec=bC;exports.getDomainConfigDecoder=Bn;exports.getDomainConfigDiscriminatorBytes=vC;exports.getDomainConfigEncoder=Nd;exports.getDomainConfigSize=UC;exports.getEditDomainConfigDiscriminatorBytes=vR;exports.getEditDomainConfigInstruction=rc;exports.getEditDomainConfigInstructionAsync=_R;exports.getEditDomainConfigInstructionDataCodec=bR;exports.getEditDomainConfigInstructionDataDecoder=tc;exports.getEditDomainConfigInstructionDataEncoder=un;exports.getEditMemberArgsCodec=ED;exports.getEditMemberArgsDecoder=Dr;exports.getEditMemberArgsEncoder=Cr;exports.getEditTransactionManagerUrlDiscriminatorBytes=NR;exports.getEditTransactionManagerUrlInstruction=ic;exports.getEditTransactionManagerUrlInstructionDataCodec=HR;exports.getEditTransactionManagerUrlInstructionDataDecoder=ac;exports.getEditTransactionManagerUrlInstructionDataEncoder=cc;exports.getEditUserDelegateDiscriminatorBytes=qR;exports.getEditUserDelegateInstruction=mc;exports.getEditUserDelegateInstructionDataCodec=YR;exports.getEditUserDelegateInstructionDataDecoder=yc;exports.getEditUserDelegateInstructionDataEncoder=gc;exports.getExpectedSecp256r1SignersCodec=vD;exports.getExpectedSecp256r1SignersDecoder=mt;exports.getExpectedSecp256r1SignersEncoder=yt;exports.getGlobalCounterAddress=Gi;exports.getGlobalCounterCodec=BC;exports.getGlobalCounterDecoder=Gn;exports.getGlobalCounterDiscriminatorBytes=OC;exports.getGlobalCounterEncoder=tu;exports.getGlobalCounterSize=NC;exports.getJitoTipsConfig=Sn;exports.getLightCpiSigner=IL;exports.getLightProtocolRpc=Ne;exports.getLinkWalletArgsCodec=WD;exports.getLinkWalletArgsDecoder=vr;exports.getLinkWalletArgsEncoder=Rr;exports.getMemberCodec=wD;exports.getMemberDecoder=ut;exports.getMemberEncoder=dt;exports.getMemberKeyCodec=HD;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=Q;exports.getMigrateCompressedSettingsDiscriminatorBytes=nv;exports.getMigrateCompressedSettingsInstruction=xc;exports.getMigrateCompressedSettingsInstructionDataCodec=sv;exports.getMigrateCompressedSettingsInstructionDataDecoder=Sc;exports.getMigrateCompressedSettingsInstructionDataEncoder=lc;exports.getMigrateCompressedUsersDiscriminatorBytes=gv;exports.getMigrateCompressedUsersInstruction=hc;exports.getMigrateCompressedUsersInstructionDataCodec=yv;exports.getMigrateCompressedUsersInstructionDataDecoder=Ec;exports.getMigrateCompressedUsersInstructionDataEncoder=Mc;exports.getMultiWalletErrorMessage=oW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=_v;exports.getNativeTransferIntentCompressedInstruction=Bc;exports.getNativeTransferIntentCompressedInstructionDataCodec=Uv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Oc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Lc;exports.getNativeTransferIntentDiscriminatorBytes=Iv;exports.getNativeTransferIntentInstruction=bc;exports.getNativeTransferIntentInstructionAsync=Dv;exports.getNativeTransferIntentInstructionDataCodec=Cv;exports.getNativeTransferIntentInstructionDataDecoder=vc;exports.getNativeTransferIntentInstructionDataEncoder=An;exports.getNewAuthorityArgsCodec=zD;exports.getNewAuthorityArgsDecoder=Wr;exports.getNewAuthorityArgsEncoder=Ur;exports.getOriginIndex=VL;exports.getPackedAddressTreeInfoCodec=jD;exports.getPackedAddressTreeInfoDecoder=Tt;exports.getPackedAddressTreeInfoEncoder=pt;exports.getPackedStateTreeInfoCodec=ZD;exports.getPackedStateTreeInfoDecoder=nt;exports.getPackedStateTreeInfoEncoder=rt;exports.getPermissionsCodec=$D;exports.getPermissionsDecoder=be;exports.getPermissionsEncoder=ve;exports.getProofArgsCodec=nM;exports.getProofArgsDecoder=M;exports.getProofArgsEncoder=D;exports.getRemoveMemberArgsCodec=aM;exports.getRemoveMemberArgsDecoder=Er;exports.getRemoveMemberArgsEncoder=Mr;exports.getSecp256r1MessageHash=Mn;exports.getSecp256r1PubkeyCodec=uM;exports.getSecp256r1PubkeyDecoder=ft;exports.getSecp256r1PubkeyEncoder=Lr;exports.getSecp256r1SignatureOffsetsDataDecoder=fC;exports.getSecp256r1SignatureOffsetsDataEncoder=TC;exports.getSecp256r1VerifyArgsCodec=yM;exports.getSecp256r1VerifyArgsDecoder=B;exports.getSecp256r1VerifyArgsEncoder=O;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=fM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=te;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=ee;exports.getSecp256r1VerifyInstruction=G;exports.getSecp256r1VerifyInstructionDataCodec=OO;exports.getSecp256r1VerifyInstructionDataDecoder=dd;exports.getSecp256r1VerifyInstructionDataEncoder=ud;exports.getSendAndConfirmTransaction=Ri;exports.getSettingsCodec=rh;exports.getSettingsCreationArgsCodec=IM;exports.getSettingsCreationArgsDecoder=St;exports.getSettingsCreationArgsEncoder=lt;exports.getSettingsDecoder=Es;exports.getSettingsDiscriminatorBytes=th;exports.getSettingsEncoder=Ay;exports.getSettingsFromIndex=Z;exports.getSettingsIndexWithAddressCodec=MM;exports.getSettingsIndexWithAddressDecoder=It;exports.getSettingsIndexWithAddressEncoder=xt;exports.getSettingsMutArgsCodec=RM;exports.getSettingsMutArgsDecoder=ue;exports.getSettingsMutArgsEncoder=de;exports.getSettingsReadonlyArgsCodec=UM;exports.getSettingsReadonlyArgsDecoder=oe;exports.getSettingsReadonlyArgsEncoder=se;exports.getSettingsSize=oh;exports.getSignedSecp256r1Key=HL;exports.getSignedTransactionManager=yO;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=ze;exports.getTokenTransferIntentCompressedDiscriminatorBytes=Zv;exports.getTokenTransferIntentCompressedInstruction=Jc;exports.getTokenTransferIntentCompressedInstructionAsync=Qv;exports.getTokenTransferIntentCompressedInstructionDataCodec=Xv;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Kc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=mn;exports.getTokenTransferIntentDiscriminatorBytes=Hv;exports.getTokenTransferIntentInstruction=Hc;exports.getTokenTransferIntentInstructionAsync=Gv;exports.getTokenTransferIntentInstructionDataCodec=Vv;exports.getTokenTransferIntentInstructionDataDecoder=Nc;exports.getTokenTransferIntentInstructionDataEncoder=yn;exports.getTransactionBufferAddress=Fi;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=pb;exports.getTransactionBufferCloseCompressedInstruction=sa;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Tb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=na;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=ra;exports.getTransactionBufferCloseDiscriminatorBytes=cb;exports.getTransactionBufferCloseInstruction=Qc;exports.getTransactionBufferCloseInstructionDataCodec=ab;exports.getTransactionBufferCloseInstructionDataDecoder=Xc;exports.getTransactionBufferCloseInstructionDataEncoder=Zc;exports.getTransactionBufferCodec=uh;exports.getTransactionBufferCreateArgsCodec=BM;exports.getTransactionBufferCreateArgsDecoder=Dt;exports.getTransactionBufferCreateArgsEncoder=Ct;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Wb;exports.getTransactionBufferCreateCompressedInstruction=Ta;exports.getTransactionBufferCreateCompressedInstructionDataCodec=Lb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=pa;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=ma;exports.getTransactionBufferCreateDiscriminatorBytes=Mb;exports.getTransactionBufferCreateInstruction=ua;exports.getTransactionBufferCreateInstructionDataCodec=Eb;exports.getTransactionBufferCreateInstructionDataDecoder=da;exports.getTransactionBufferCreateInstructionDataEncoder=ia;exports.getTransactionBufferDecoder=Us;exports.getTransactionBufferDiscriminatorBytes=dh;exports.getTransactionBufferEncoder=Uy;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=Xb;exports.getTransactionBufferExecuteCompressedInstruction=Ra;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=Qb;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Pa;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=ha;exports.getTransactionBufferExecuteDiscriminatorBytes=Gb;exports.getTransactionBufferExecuteInstruction=Ca;exports.getTransactionBufferExecuteInstructionDataCodec=Fb;exports.getTransactionBufferExecuteInstructionDataDecoder=Ia;exports.getTransactionBufferExecuteInstructionDataEncoder=xa;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=y_;exports.getTransactionBufferExtendCompressedInstruction=Ha;exports.getTransactionBufferExtendCompressedInstructionDataCodec=m_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Na;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=ka;exports.getTransactionBufferExtendDiscriminatorBytes=o_;exports.getTransactionBufferExtendInstruction=La;exports.getTransactionBufferExtendInstructionDataCodec=c_;exports.getTransactionBufferExtendInstructionDataDecoder=Wa;exports.getTransactionBufferExtendInstructionDataEncoder=Ua;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=__;exports.getTransactionBufferVoteCompressedInstruction=Qa;exports.getTransactionBufferVoteCompressedInstructionDataCodec=U_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Xa;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Za;exports.getTransactionBufferVoteDiscriminatorBytes=C_;exports.getTransactionBufferVoteInstruction=Ja;exports.getTransactionBufferVoteInstructionDataCodec=D_;exports.getTransactionBufferVoteInstructionDataDecoder=Ka;exports.getTransactionBufferVoteInstructionDataEncoder=za;exports.getTransactionExecuteCompressedDiscriminatorBytes=j_;exports.getTransactionExecuteCompressedInstruction=ui;exports.getTransactionExecuteCompressedInstructionDataCodec=q_;exports.getTransactionExecuteCompressedInstructionDataDecoder=di;exports.getTransactionExecuteCompressedInstructionDataEncoder=ii;exports.getTransactionExecuteDiscriminatorBytes=N_;exports.getTransactionExecuteInstruction=si;exports.getTransactionExecuteInstructionDataCodec=H_;exports.getTransactionExecuteInstructionDataDecoder=ni;exports.getTransactionExecuteInstructionDataEncoder=ri;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=AU;exports.getTransactionExecuteSyncCompressedInstruction=Ci;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=gU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ii;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=xi;exports.getTransactionExecuteSyncDiscriminatorBytes=rU;exports.getTransactionExecuteSyncInstruction=Ti;exports.getTransactionExecuteSyncInstructionDataCodec=nU;exports.getTransactionExecuteSyncInstructionDataDecoder=pi;exports.getTransactionExecuteSyncInstructionDataEncoder=mi;exports.getTransactionMessageAddressTableLookupCodec=FM;exports.getTransactionMessageAddressTableLookupDecoder=Br;exports.getTransactionMessageAddressTableLookupEncoder=Or;exports.getTransactionMessageCodec=HM;exports.getTransactionMessageDecoder=Et;exports.getTransactionMessageEncoder=Mt;exports.getUserAccountAddress=k;exports.getUserCodec=jM;exports.getUserCreationArgsCodec=XM;exports.getUserCreationArgsDecoder=me;exports.getUserCreationArgsEncoder=ye;exports.getUserDecoder=J;exports.getUserEncoder=Oe;exports.getUserMutArgsCodec=tE;exports.getUserMutArgsDecoder=Se;exports.getUserMutArgsEncoder=le;exports.getUserReadOnlyArgsCodec=oE;exports.getUserReadOnlyArgsDecoder=Hr;exports.getUserReadOnlyArgsEncoder=Nr;exports.getUserReadOnlyOrMutateArgsCodec=dE;exports.getUserReadOnlyOrMutateArgsDecoder=Ue;exports.getUserReadOnlyOrMutateArgsEncoder=_e;exports.getUserRoleCodec=mE;exports.getUserRoleDecoder=Le;exports.getUserRoleEncoder=We;exports.getWalletAddressFromIndex=zi;exports.getWalletAddressFromSettings=Ie;exports.getWhitelistedAddressTreeCodec=ph;exports.getWhitelistedAddressTreeDecoder=ks;exports.getWhitelistedAddressTreeDiscriminatorBytes=mh;exports.getWhitelistedAddressTreeEncoder=Qy;exports.getWhitelistedAddressTreeFromIndex=Cn;exports.getWhitelistedAddressTreeIndexFromAddress=gL;exports.getWhitelistedAddressTreesAddress=Wi;exports.identifyMultiWalletAccount=QU;exports.identifyMultiWalletInstruction=$U;exports.initialize=HW;exports.isConfigAction=fD;exports.isMultiWalletError=cW;exports.isUserReadOnlyOrMutateArgs=AE;exports.migrateSettings=nw;exports.migrateUsers=uw;exports.nativeTransferIntent=Tk;exports.parseAddWhitelistedAddressTreesInstruction=Bh;exports.parseChangeConfigCompressedInstruction=tP;exports.parseChangeConfigInstruction=Jh;exports.parseCompressSettingsAccountInstruction=uP;exports.parseCreateDomainConfigInstruction=xP;exports.parseCreateDomainUserAccountInstruction=bP;exports.parseCreateGlobalCounterInstruction=NP;exports.parseCreateMultiWalletCompressedInstruction=YP;exports.parseCreateUserAccountsInstruction=oR;exports.parseDecompressSettingsAccountInstruction=mR;exports.parseDisableDomainConfigInstruction=CR;exports.parseEditDomainConfigInstruction=UR;exports.parseEditTransactionManagerUrlInstruction=VR;exports.parseEditUserDelegateInstruction=ZR;exports.parseMigrateCompressedSettingsInstruction=ov;exports.parseMigrateCompressedUsersInstruction=mv;exports.parseNativeTransferIntentCompressedInstruction=Wv;exports.parseNativeTransferIntentInstruction=Mv;exports.parseSecp256r1VerifyInstruction=BO;exports.parseTokenTransferIntentCompressedInstruction=$v;exports.parseTokenTransferIntentInstruction=Fv;exports.parseTransactionBufferCloseCompressedInstruction=fb;exports.parseTransactionBufferCloseInstruction=ib;exports.parseTransactionBufferCreateCompressedInstruction=Ob;exports.parseTransactionBufferCreateInstruction=hb;exports.parseTransactionBufferExecuteCompressedInstruction=$b;exports.parseTransactionBufferExecuteInstruction=zb;exports.parseTransactionBufferExtendCompressedInstruction=p_;exports.parseTransactionBufferExtendInstruction=a_;exports.parseTransactionBufferVoteCompressedInstruction=W_;exports.parseTransactionBufferVoteInstruction=M_;exports.parseTransactionExecuteCompressedInstruction=Y_;exports.parseTransactionExecuteInstruction=V_;exports.parseTransactionExecuteSyncCompressedInstruction=yU;exports.parseTransactionExecuteSyncInstruction=sU;exports.pollJitoBundleConfirmation=AO;exports.prepareTransactionBundle=EN;exports.prepareTransactionMessage=kN;exports.prepareTransactionSync=FN;exports.retrieveTransactionManager=gO;exports.sendJitoBundle=XI;exports.signAndSendBundledTransactions=dO;exports.signAndSendTransaction=uO;exports.tokenTransferIntent=hk;exports.uninitialize=NW;exports.userReadOnlyOrMutateArgs=uE;exports.vaultTransactionMessageDeserialize=Pi;exports.vaultTransactionMessageSerialize=hi;exports.voteTransactionBuffer=Md;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|