@revibase/core 0.0.34 → 0.0.35-alpha.0

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 CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),superstruct=require('superstruct'),programs=require('gill/programs'),Md=require('bn.js'),tinyCbor=require('@levischuck/tiny-cbor'),nist_js=require('@noble/curves/nist.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Md__default=/*#__PURE__*/_interopDefault(Md);var On=new Uint8Array([201,232,212,229,59,241,106,197]);function hC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(On)}function Hd(){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 RC(){return gill.combineCodec(Hd(),Bn())}function wn(e){return gill.decodeAccount(e,Bn())}async function kn(e,n,r){let s=await Gd(e,n,r);return gill.assertAccountExists(s),s}async function Gd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return wn(s)}async function bC(e,n,r){let s=await Fd(e,n,r);return gill.assertAccountsExist(s),s}async function Fd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>wn(t))}function vC(){return 846}var Hn=new Uint8Array([42,206,176,58,175,129,130,233]);function WC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hn)}function nu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Hn}))}function Gn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function LC(){return gill.combineCodec(nu(),Gn())}function Fn(e){return gill.decodeAccount(e,Gn())}async function OC(e,n,r){let s=await su(e,n,r);return gill.assertAccountExists(s),s}async function su(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Fn(s)}async function BC(e,n,r){let s=await ou(e,n,r);return gill.assertAccountsExist(s),s}async function ou(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Fn(t))}function wC(){return 24}function Ar(){return gill.getStructEncoder([["memberKey",Q()],["permissions",he()],["userReadonlyArgs",be()]])}function gr(){return gill.getStructDecoder([["memberKey",$()],["permissions",Re()],["userReadonlyArgs",ve()]])}function HC(){return gill.combineCodec(Ar(),gr())}function yr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function mr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function zC(){return gill.combineCodec(yr(),mr())}function $e(){return gill.getStructEncoder([["treeInfo",tt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function et(){return gill.getStructDecoder([["treeInfo",rt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function qC(){return gill.combineCodec($e(),et())}function nt(){return gill.getStructEncoder([["treeInfo",tt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function st(){return gill.getStructDecoder([["treeInfo",rt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function QC(){return gill.combineCodec(nt(),st())}function Sr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function xr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function tD(){return gill.combineCodec(Sr(),xr())}function ot(){return gill.getStructEncoder([["data",gill.getOptionEncoder(ct())]])}function ee(){return gill.getStructDecoder([["data",gill.getOptionDecoder(at())]])}function oD(){return gill.combineCodec(ot(),ee())}function ct(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(it())],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function at(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(dt())],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function dD(){return gill.combineCodec(ct(),at())}function _e(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Dr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Ar())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Er())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Ue(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Mr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(gr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Pr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function yD(){return gill.combineCodec(_e(),Ue())}function mD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function pD(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",Ae()]])}function Rr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Le()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",ge()]])}function SD(){return gill.combineCodec(hr(),Rr())}function Dr(){return gill.getStructEncoder([["memberKey",Q()],["permissions",he()]])}function Mr(){return gill.getStructDecoder([["memberKey",$()],["permissions",Re()]])}function DD(){return gill.combineCodec(Dr(),Mr())}function ut(){return gill.getStructEncoder([["memberKey",Q()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function At(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function hD(){return gill.combineCodec(ut(),At())}function br(){return gill.getStructEncoder([["settingsMutArgs",w()],["transactionManager",gill.getOptionEncoder(Te())]])}function vr(){return gill.getStructDecoder([["settingsMutArgs",k()],["transactionManager",gill.getOptionDecoder(fe())]])}function _D(){return gill.combineCodec(br(),vr())}function it(){return gill.getStructEncoder([["pubkey",Q()],["permissions",he()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function dt(){return gill.getStructDecoder([["pubkey",$()],["permissions",Re()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function OD(){return gill.combineCodec(it(),dt())}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 kD(){return gill.combineCodec(Q(),$())}function Wr(){return gill.getStructEncoder([["authorityCreationArgs",Ae()],["compressedProofArgs",D()]])}function Lr(){return gill.getStructDecoder([["authorityCreationArgs",ge()],["compressedProofArgs",M()]])}function GD(){return gill.combineCodec(Wr(),Lr())}function gt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function yt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function KD(){return gill.combineCodec(gt(),yt())}function tt(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function rt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function qD(){return gill.combineCodec(tt(),rt())}function he(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Re(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function XD(){return gill.combineCodec(he(),Re())}function D(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Sr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function M(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(xr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function tM(){return gill.combineCodec(D(),M())}function Er(){return gill.getStructEncoder([["memberKey",Q()],["userArgs",Or()]])}function Pr(){return gill.getStructDecoder([["memberKey",$()],["userArgs",Br()]])}function oM(){return gill.combineCodec(Er(),Pr())}function wr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function mt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function iM(){return gill.combineCodec(wr(),mt())}function V(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function H(){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 AM(){return gill.combineCodec(V(),H())}function G(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",V()]])}function F(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",H()]])}function pM(){return gill.combineCodec(G(),F())}function pt(){return gill.getStructEncoder([["addressTreeInfo",gt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Tt(){return gill.getStructDecoder([["addressTreeInfo",yt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function SM(){return gill.combineCodec(pt(),Tt())}function ft(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function lt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function CM(){return gill.combineCodec(ft(),lt())}function w(){return gill.getStructEncoder([["accountMeta",$e()],["data",ot()]])}function k(){return gill.getStructDecoder([["accountMeta",et()],["data",ee()]])}function PM(){return gill.combineCodec(w(),k())}function St(){return gill.getStructEncoder([["accountMeta",nt()],["data",ot()]])}function xt(){return gill.getStructDecoder([["accountMeta",st()],["data",ee()]])}function vM(){return gill.combineCodec(St(),xt())}function It(){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(ut()))]])}function Ct(){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(At()))]])}function LM(){return gill.combineCodec(It(),Ct())}function Dt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(yr())],["addressTableLookups",gill.getArrayEncoder(kr())]])}function Mt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(mr())],["addressTableLookups",gill.getArrayDecoder(Nr())]])}function kM(){return gill.combineCodec(Dt(),Mt())}function kr(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Nr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function HM(){return gill.combineCodec(kr(),Nr())}function Oe(){return gill.getStructEncoder([["member",Q()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",We()],["delegatedTo",gill.getOptionEncoder(ft())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function Z(){return gill.getStructDecoder([["member",$()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Le()],["delegatedTo",gill.getOptionDecoder(lt())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function KM(){return gill.combineCodec(Oe(),Z())}function Ae(){return gill.getStructEncoder([["addressTreeInfo",gt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ge(){return gill.getStructDecoder([["addressTreeInfo",yt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function ZM(){return gill.combineCodec(Ae(),ge())}function Te(){return gill.getStructEncoder([["accountMeta",$e()],["data",Oe()]])}function fe(){return gill.getStructDecoder([["accountMeta",et()],["data",Z()]])}function $M(){return gill.combineCodec(Te(),fe())}function be(){return gill.getStructEncoder([["accountMeta",nt()],["data",Oe()]])}function ve(){return gill.getStructDecoder([["accountMeta",st()],["data",Z()]])}function nE(){return gill.combineCodec(be(),ve())}function Or(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([be()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Te()])]])]])}function Br(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([ve()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([fe()])]])]])}function aE(){return gill.combineCodec(Or(),Br())}function iE(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function dE(e,n){return n.__kind===e}var Ge=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(Ge||{});function We(){return gill.getEnumEncoder(Ge)}function Le(){return gill.getEnumDecoder(Ge)}function gE(){return gill.combineCodec(We(),Le())}var Cs=new Uint8Array([223,179,163,190,177,224,67,173]);function $E(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Cs)}function yy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.fixEncoderSize(gill.getBytesEncoder(),16)],["members",gill.getArrayEncoder(it(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),3)],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Cs}))}function Ds(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.fixDecoderSize(gill.getBytesDecoder(),16)],["members",gill.getArrayDecoder(dt(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),3)],["latestSlotNumber",gill.getU64Decoder()]])}function eP(){return gill.combineCodec(yy(),Ds())}function Ms(e){return gill.decodeAccount(e,Ds())}async function tP(e,n,r){let s=await zr(e,n,r);return gill.assertAccountExists(s),s}async function zr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ms(s)}async function rP(e,n,r){let s=await my(e,n,r);return gill.assertAccountsExist(s),s}async function my(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ms(t))}function nP(){return 192}var bs=new Uint8Array([90,36,35,219,93,225,110,96]);function aP(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(bs)}function Ly(){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(ut()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:bs}))}function vs(){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(At()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function iP(){return gill.combineCodec(Ly(),vs())}function _s(e){return gill.decodeAccount(e,vs())}async function Us(e,n,r){let s=await Oy(e,n,r);return gill.assertAccountExists(s),s}async function Oy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return _s(s)}async function dP(e,n,r){let s=await By(e,n,r);return gill.assertAccountsExist(s),s}async function By(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>_s(t))}var Os=new Uint8Array([105,23,173,2,197,255,80,87]);function gP(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Os)}function em(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Os}))}function Bs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function yP(){return gill.combineCodec(em(),Bs())}function ws(e){return gill.decodeAccount(e,Bs())}async function ks(e,n,r){let s=await tm(e,n,r);return gill.assertAccountExists(s),s}async function tm(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ws(s)}async function mP(e,n,r){let s=await rm(e,n,r);return gill.assertAccountsExist(s),s}async function rm(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ws(t))}function m({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function Vs(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function J(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 p(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:J(r.value),role:Ns(r.value)?gill.upgradeRoleToSigner(s):s,...Ns(r.value)?{signer:r.value}:{}})}}function Ns(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Gs=new Uint8Array([8]);function _P(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gs)}function Qr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Gs}))}function Fs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function UP(){return gill.combineCodec(Qr(),Fs())}async function zs(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Qr().encode(c),programAddress:r})}function WP(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Qr().encode(c),programAddress:r})}function LP(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:Fs().decode(e.data)}}var Ys=new Uint8Array([9]);function HP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ys)}function $r(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(_e())],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["compressedProofArgs",gill.getOptionEncoder(D())]]),e=>({...e,discriminator:Ys}))}function Xs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(Ue())],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["compressedProofArgs",gill.getOptionDecoder(M())]])}function GP(){return gill.combineCodec($r(),Xs())}async function Qs(e,n){let r=n?.programAddress??d,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(Vs(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(J(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=m(a),o=p(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:$r().encode(c),programAddress:r})}function FP(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:$r().encode(c),programAddress:r})}function zP(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Xs().decode(e.data)}}var no=new Uint8Array([20]);function XP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(no)}function so(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(_e())],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:no}))}function oo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Ue())],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function QP(){return gill.combineCodec(so(),oo())}function co(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:so().encode(c),programAddress:r})}function $P(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:oo().decode(e.data)}}var uo=new Uint8Array([17]);function ch(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(uo)}function Ao(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["settingsMutArgs",w()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:uo}))}function go(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",k()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function ah(){return gill.combineCodec(Ao(),go())}function yo(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ao().encode(c),programAddress:r})}function ih(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:go().decode(e.data)}}var Io=new Uint8Array([0]);function ph(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Io)}function tn(){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",Ae()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Io}))}function Co(){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",ge()],["compressedProofArgs",M()]])}function Th(){return gill.combineCodec(tn(),Co())}async function Do(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:tn().encode(c),programAddress:r})}function fh(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:tn().encode(c),programAddress:r})}function lh(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:Co().decode(e.data)}}var Eo=new Uint8Array([4]);function Eh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Eo)}function nn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["member",wr()],["role",We()],["userAccountCreationArgs",Ae()],["linkWalletArgs",gill.getOptionEncoder(br())]]),e=>({...e,discriminator:Eo}))}function Po(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["member",mt()],["role",Le()],["userAccountCreationArgs",ge()],["linkWalletArgs",gill.getOptionDecoder(vr())]])}function Ph(){return gill.combineCodec(nn(),Po())}async function ho(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:nn().encode(c),programAddress:r})}function hh(e,n){let r=n?.programAddress??d,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=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:nn().encode(c),programAddress:r})}function Rh(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:Po().decode(e.data)}}var bo=new Uint8Array([3]);function Lh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bo)}function on(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:bo}))}function vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function Oh(){return gill.combineCodec(on(),vo())}async function _o(e,n){let r=n?.programAddress??d,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=m(c),i=p(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:on().encode({}),programAddress:r})}function Bh(e,n){let r=n?.programAddress??d,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=m(c),i=p(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:on().encode({}),programAddress:r})}function wh(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:vo().decode(e.data)}}var Lo=new Uint8Array([19]);function zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Lo)}function cn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["settingsCreation",pt()],["userReadonlyArgs",be()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Lo}))}function Oo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["settingsCreation",Tt()],["userReadonlyArgs",ve()],["settingsIndex",gill.getU128Decoder()]])}function Kh(){return gill.combineCodec(cn(),Oo())}async function Bo(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:cn().encode(c),programAddress:r})}function Jh(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:cn().encode(c),programAddress:r})}function jh(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Oo().decode(e.data)}}var ko=new Uint8Array([5]);function eR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ko)}function dn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayEncoder(hr())]]),e=>({...e,discriminator:ko}))}function No(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayDecoder(Rr())]])}function tR(){return gill.combineCodec(dn(),No())}async function Vo(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:dn().encode(c),programAddress:r})}function rR(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:dn().encode(c),programAddress:r})}function nR(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:No().decode(e.data)}}var Fo=new Uint8Array([18]);function uR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fo)}function zo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",w()],["compressedProofArgs",D()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:Fo}))}function Ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",k()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function AR(){return gill.combineCodec(zo(),Ko())}function Jo(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:zo().encode(c),programAddress:r})}function gR(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ko().decode(e.data)}}var Zo=new Uint8Array([2]);function lR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zo)}function Yo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Zo}))}function Xo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function SR(){return gill.combineCodec(Yo(),Xo())}function Qo(e,n){let r=n?.programAddress??d,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...i],data:Yo().encode(c),programAddress:r})}function xR(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:Xo().decode(e.data)}}var rc=new Uint8Array([1]);function hR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(rc)}function An(){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:rc}))}function nc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Lr())]])}function RR(){return gill.combineCodec(An(),nc())}async function bR(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:An().encode(c),programAddress:r})}function sc(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:An().encode(c),programAddress:r})}function vR(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:nc().decode(e.data)}}var ac=new Uint8Array([6]);function wR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ac)}function ic(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Te()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",D()]]),e=>({...e,discriminator:ac}))}function dc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",fe()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",M()]])}function kR(){return gill.combineCodec(ic(),dc())}function uc(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:ic().encode(c),programAddress:r})}function NR(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:dc().decode(e.data)}}var yc=new Uint8Array([7]);function JR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(yc)}function mc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Te()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["delegateTo",gill.getOptionEncoder(ft())],["oldSettingsMutArgs",gill.getOptionEncoder(w())],["newSettingsMutArgs",gill.getOptionEncoder(w())],["compressedProofArgs",D()]]),e=>({...e,discriminator:yc}))}function pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",fe()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["delegateTo",gill.getOptionDecoder(lt())],["oldSettingsMutArgs",gill.getOptionDecoder(k())],["newSettingsMutArgs",gill.getOptionDecoder(k())],["compressedProofArgs",M()]])}function jR(){return gill.combineCodec(mc(),pc())}function Tc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:mc().encode(c),programAddress:r})}function qR(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:pc().decode(e.data)}}var Sc=new Uint8Array([33]);function tb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sc)}function xc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",ct()],["compressedProofArgs",D()],["settingsCreationArgs",pt()]]),e=>({...e,discriminator:Sc}))}function Ic(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",at()],["compressedProofArgs",M()],["settingsCreationArgs",Tt()]])}function rb(){return gill.combineCodec(xc(),Ic())}function Cc(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:xc().encode(c),programAddress:r})}function nb(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:Ic().decode(e.data)}}var Ec=new Uint8Array([32]);function ub(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ec)}function Pc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Oe()],["compressedProofArgs",D()],["userCreationArgs",Ae()]]),e=>({...e,discriminator:Ec}))}function hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Z()],["compressedProofArgs",M()],["userCreationArgs",ge()]])}function Ab(){return gill.combineCodec(Pc(),hc())}function Rc(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:Pc().encode(c),programAddress:r})}function gb(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:hc().decode(e.data)}}var vc=new Uint8Array([30]);function Sb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(vc)}function gn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:vc}))}function _c(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function xb(){return gill.combineCodec(gn(),_c())}async function Ib(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(J(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(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:gn().encode(c),programAddress:r})}function Uc(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(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:gn().encode(c),programAddress:r})}function Cb(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:_c().decode(e.data)}}var Oc=new Uint8Array([28]);function bb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oc)}function Bc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Oc}))}function wc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function vb(){return gill.combineCodec(Bc(),wc())}function kc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Bc().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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:wc().decode(e.data)}}var Vc=new Uint8Array([31]);function kb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vc)}function mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:Vc}))}function Hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function Nb(){return gill.combineCodec(mn(),Hc())}async function Vb(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},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(J(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(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=m(a),o=p(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:mn().encode(c),programAddress:r})}function Gc(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},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=m(a),o=p(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:mn().encode(c),programAddress:r})}function Hb(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===d?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:Hc().decode(e.data)}}var Jc=new Uint8Array([29]);function qb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function pn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Jc}))}function jc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function Zb(){return gill.combineCodec(pn(),jc())}async function Yb(e,n){let r=n?.programAddress??d,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(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=m(a),o=p(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:pn().encode(c),programAddress:r})}function qc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:pn().encode(c),programAddress:r})}function Xb(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===d?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:jc().decode(e.data)}}var Xc=new Uint8Array([13]);function sv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xc)}function Qc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Xc}))}function $c(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function ov(){return gill.combineCodec(Qc(),$c())}function ea(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=p(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:Qc().encode(c),programAddress:r})}function cv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:$c().decode(e.data)}}var na=new Uint8Array([24]);function yv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(na)}function sa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:na}))}function oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function mv(){return gill.combineCodec(sa(),oa())}function ca(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:sa().encode(c),programAddress:r})}function pv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:oa().decode(e.data)}}var da=new Uint8Array([10]);function Cv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",It()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:da}))}function Aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function Dv(){return gill.combineCodec(ua(),Aa())}function ga(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:ua().encode(c),programAddress:r})}function Mv(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===d?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:Aa().decode(e.data)}}var pa=new Uint8Array([21]);function _v(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pa)}function Ta(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",It()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",St()],["compressedProofArgs",D()]]),e=>({...e,discriminator:pa}))}function fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsReadonlyArgs",xt()],["compressedProofArgs",M()]])}function Uv(){return gill.combineCodec(Ta(),fa())}function la(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Ta().encode(c),programAddress:r})}function Wv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:fa().decode(e.data)}}var Ia=new Uint8Array([14]);function Vv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ia)}function Ca(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Ia}))}function Da(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function Hv(){return gill.combineCodec(Ca(),Da())}function Ma(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=p(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:Ca().encode(c),programAddress:r})}function Gv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Da().decode(e.data)}}var ha=new Uint8Array([25]);function Zv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ha)}function Ra(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:ha}))}function ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function Yv(){return gill.combineCodec(Ra(),ba())}function va(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Ra().encode(c),programAddress:r})}function Xv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ba().decode(e.data)}}var Wa=new Uint8Array([12]);function n_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wa)}function La(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Wa}))}function Oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function s_(){return gill.combineCodec(La(),Oa())}function Ba(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:La().encode(c),programAddress:r})}function o_(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:Oa().decode(e.data)}}var Na=new Uint8Array([23]);function A_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Na)}function Va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Na}))}function Ha(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function g_(){return gill.combineCodec(Va(),Ha())}function Ga(e,n){let r=n?.programAddress??d,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:Va().encode(c),programAddress:r})}function y_(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:Ha().decode(e.data)}}var Ka=new Uint8Array([11]);function x_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ka)}function Ja(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Ka}))}function ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function I_(){return gill.combineCodec(Ja(),ja())}function qa(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Ja().encode(c),programAddress:r})}function C_(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ja().decode(e.data)}}var Xa=new Uint8Array([22]);function b_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xa)}function Qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",St()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Xa}))}function $a(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsReadonlyArgs",xt()],["compressedProofArgs",M()]])}function v_(){return gill.combineCodec(Qa(),$a())}function ei(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Qa().encode(c),programAddress:r})}function __(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:$a().decode(e.data)}}var ni=new Uint8Array([15]);function w_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ni)}function si(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:ni}))}function oi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function k_(){return gill.combineCodec(si(),oi())}function ci(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=m({}),i=p(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:si().encode({}),programAddress:r})}function N_(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:oi().decode(e.data)}}var di=new Uint8Array([26]);function K_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(di)}function ui(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:di}))}function Ai(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function J_(){return gill.combineCodec(ui(),Ai())}function gi(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:ui().encode(c),programAddress:r})}function j_(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:Ai().decode(e.data)}}var pi=new Uint8Array([16]);function eU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pi)}function Ti(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:pi}))}function fi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function tU(){return gill.combineCodec(Ti(),fi())}function li(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ti().encode(c),programAddress:r})}function rU(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:fi().decode(e.data)}}var Ii=new Uint8Array([27]);function dU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ii)}function Ci(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",D()]]),e=>({...e,discriminator:Ii}))}function Di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function uU(){return gill.combineCodec(Ci(),Di())}function Mi(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ci().encode(c),programAddress:r})}function AU(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Di().decode(e.data)}}var d="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",US=(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))(US||{});function YU(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 XU(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 OS=6e3,BS=6001,wS=6002,kS=6003,NS=6004,VS=6005,HS=6006,GS=6007,FS=6008,zS=6009,KS=6010,JS=6011,jS=6012,qS=6013,ZS=6014,YS=6015,XS=6016,QS=6017,$S=6018,ex=6019,tx=6020,rx=6021,nx=6022,sx=6023,ox=6024,cx=6025,ax=6026,ix=6027,dx=6028,ux=6029,Ax=6030,gx=6031,yx=6032,mx=6033,px=6034,Tx=6035,fx=6036,lx=6037,Sx=6038,xx=6039,Ix=6040,Cx=6041,Dx=6042,Mx=6043,Ex=6044,Px=6045,hx=6046,Rx=6047,bx=6048,vx=6049,_x=6050,Ux=6051,Wx=6052,Lx=6053,Ox=6054,Ei;process.env.NODE_ENV!=="production"&&(Ei={[Ax]:"This member is already delegated to another wallet.",[GS]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[_x]:"The domain configuration account is disabled. Please contact support or try again later.",[Ux]:"Missing domain configuration account.",[KS]:"Duplicate public keys detected among members. Each member must have a unique key.",[zS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[tx]:"No members provided. A multisig wallet must contain at least one member.",[$S]:"Expected a User with Administrator role for this instruction.",[FS]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[XS]:"Expected a User with Transaction Manager role for this instruction.",[xx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Ix]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Cx]:"Declared buffer size does not match the actual serialized size.",[mx]:"Not enough members with vote permission to meet the approval threshold.",[gx]:"At least one signer with execute permission is required to proceed.",[yx]:"At least one signer with initiate permission is required to perform this action.",[cx]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[Ox]:"Address Tree supplied is not part of the whitelisted address trees",[ex]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[ix]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Sx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[px]:"Only delegated members are allowed for this transaction.",[ox]:"Unexpected number of accounts provided for this instruction.",[qS]:"User with Permanent Member role requires a must have a delegated wallet.",[BS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[NS]:"The extracted public key has an invalid length or encoding.",[OS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[kS]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[vx]:"The specified slot number is not recent.",[Rx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[nx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[QS]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[YS]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[sx]:"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.",[VS]:"The extracted WebAuthn signed message payload is malformed.",[Px]:"An input string exceeds the maximum allowed character length.",[Wx]:"This member is not registered under the provided domain configuration.",[dx]:"A required account is missing from the instruction context.",[ux]:"User mutation arguments are required when performing add or remove delegate operations.",[hx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[fx]:"No valid signer found in this transaction.",[jS]:"Only one permanent member is allowed per wallet.",[ZS]:"Only one transaction manager is allowed per wallet.",[Lx]:"The given origin index is not in the whitelisted origins.",[JS]:"Permanent members cannot be removed from a wallet.",[Ex]:"Writable CPI calls to protected accounts are not permitted.",[HS]:"The rpIdHash extracted from the signed message does not match the expected value.",[wS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[bx]:"The specified slot number was not found in the provided slot history.",[rx]:"Too many members: a maximum of 4 members are supported.",[Dx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Mx]:"This transaction has not yet reached the required approval threshold.",[lx]:"Only the transaction creator or rent payer may close this transaction buffer.",[Tx]:"Member is not part of the expected signers for this transaction."});function nW(e){return process.env.NODE_ENV!=="production"?Ei[e]:"Error message not available in production bundles."}function sW(e,n,r){return gill.isProgramError(e,n,d,r)}async function pW({admin:e,addressTree:n}){return zs({payer:e,addressTree:n,remainingAccounts:[]})}var bt={Ed25519:1,Secp256r1:2};var le={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Ie=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(le).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var ln=33,Ce=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!==ln)throw new Error(`Invalid public key length, expected ${ln} 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===ln)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()}},E=class extends Ce{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 kx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Nx(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var hi=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(kx())],["addressTableLookups",gill.getArrayCodec(Nx())]]);function Ri(e){return hi.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 bi(e){let n=hi.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:d,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var j={};function ze(){if(!j.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return j.solanaRpcEndpoint}function ke(){if(!j.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return j.lightProtocolRpc}function re(){if(!j.solanaRpc)throw new Error("Rpc is not initialized yet");return j.solanaRpc}function vi(){if(!j.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return j.sendAndConfirm}function _i(){if(!j.computeEstimate)throw new Error("Rpc is not initialized yet");return j.computeEstimate}function xn(){return j.jitoTipsConfig?j.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(j).forEach(e=>{j[e]=void 0;});}function VW({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){j.solanaRpcEndpoint=e,j.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});j.solanaRpc=t,j.sendAndConfirm=c,j.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),j.jitoTipsConfig=s??null;}var L=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(d.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 ke().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,u=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=u);}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 er(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await Li(e);return s&&n?.set(e.toString(),s),s}}async function ye(e,n){let s=(await Promise.all(e.map(async t=>er(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 v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function se(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:u.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((u,A)=>({addressTreeInfo:a[A],outputStateTreeIndex:i,address:u.address,type:u.type}))}function oe(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 ce(e,n,r,s,t){let c=null,a=null,i=null,o=new L;if(e){await o.addSystemAccounts();let{address:u}=await ne(n,r),A=(await ye([{address:u,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[A.leafIndex],leaves:[],treeInfos:[A.treeInfo],proveByIndices:[A.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await z([A],[]);let g=o.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:A.hash}],[]).stateTrees;if(!g)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(A.address),treeInfo:g.packedTreeInfos[0]},data:ee().decode(A.data?.data)},a={accountMeta:{address:new Uint8Array(A.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:ee().decode(A.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:o,settingsMutArgs:a}}async function z(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await ke().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 pe(){return (await tr()).length-1}var In;async function tr(){if(!In){let{data:e}=await ks(re(),await Oi());In=e.whitelistedAddressTrees;}return In}async function rr(e,n,r){let s=await dI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function dI(e,n,r){let{address:s}=await O(e,n),t=await er(s,r);return t?.data?.data?Z().decode(t.data.data):null}async function Cn(e,n,r){let s=await uI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function uI(e,n,r){try{let{address:s}=await ne(e,n),t=await er(s,r);if(!t?.data?.data)throw new Error("No compressed settings account found.");let c=ee().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 zr(re(),await Y(e));return s.exists?{...s.data,index:gill.getU128Decoder().decode(s.data.index),members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function Dn(e){let n=await tr();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function yL(e){let r=(await tr()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function Li(e){let n=await stateless_js.rpcRequest(ke().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 ke().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 ne(e,n=0){let r=await Dn(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(d)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function O(e,n=0){let r=await Dn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof Ce?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(d.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:d,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function zi(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Oi(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Ki(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Ce?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Se(e){let[n]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function Y(e){let[n]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function CL(e){let n=await Y(e);return await Se(n)}async function DL(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}function sr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function mI(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 qi(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 Zi(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let I=n&127;r+=I;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let a=e[r+1],i=r+2,o=e.slice(i,i+a),u=c[0]===0&&c.length>32?c.slice(1):c,A=o[0]===0&&o.length>32?o.slice(1):o;if(u.length>32||A.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(u,32-u.length);let y=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+sr(A)),P=(f>y?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),S=mI(P);return new Uint8Array([...g,...S])}function or(e){return new Uint8Array([...new Uint8Array(Me(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Me(e.response.clientDataJSON)))])}function VL(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+sr(n.get(-2))),y:BigInt("0x"+sr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function HL(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 GL(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Me(n)),c=JSON.parse(new TextDecoder().decode(Me(r))),a=ji(c),i=Zi(new Uint8Array(Me(s))),o=await Je({rpIdHash:t.subarray(0,32)});return new E(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Me(r)),truncatedClientDataJson:a,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:i,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}async function FL(e,n){let{data:r}=await kn(re(),e),t=qi(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 zL(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function KL(e){return En(e.data.payload.authResponse)}function JL(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...Mn(n,r,s)]))}async function jL(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 u=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(u.subarray(8,16)).toString(),a=u.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(Me(e.transactionMessageBytes)):e.transactionMessageBytes),...a,...Mn(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:i}}function En(e){return sha2_js.sha256(or(e))}function qL(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Me(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,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 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 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 ed(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 td(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 N(e,n=0){let r=e instanceof E?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?or(r.authResponse):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:a,publicKey:i}}function qe(e){if(e instanceof Ce)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 $i(e){return e instanceof E?e.toString():e.address.toString()}function ae(e){let n=new Set,r=[];for(let s of e)n.has($i(s))||(r.push(s),n.add($i(s)));if(r.filter(s=>s instanceof E).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function rd({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 AO(e){let n=await Pn(e,true),r=await td(n.map(gill.getBase64EncodedWireTransaction),ze()),s=await Pn(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await XI(s.map(gill.getBase64EncodedWireTransaction))}async function gO({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([_i()(c),ed(re(),c.instructions.flatMap(u=>u.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 vi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function XI(e,n=10,r=1e3,s=xn()){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 yO(e,n=30,r=3e3,s=xn()){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(u=>setTimeout(u,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 u=o.value[0];if(u.confirmation_status==="confirmed"||u.confirmation_status==="finalized")return u.transactions[u.transactions.length-1]}if(c<n){await new Promise(u=>setTimeout(u,r));continue}}throw new Error("Failed to get bundle status after retries.")}function mO(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=>sd(i.pubkey)===e)??{};if(!r)throw new Error("No permissions found for the current member.");let s=Ie.has(r,le.InitiateTransaction),t=Ie.has(r,le.VoteTransaction),c=Ie.has(r,le.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(sd(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function pO({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await rr(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 sd(e){return e.keyType===bt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function TO(e){let n=e.map(c=>_e().encode(c)),r=4+n.reduce((c,a)=>c+a.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function fO(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let a=Ue().read(e,n);t[c]=a[0],n=a[1];}if(n!==e.length)throw new Error(`Trailing bytes: ${e.length-n}`);return t}async function UO({payer:e,rpId:n,origins:r,authority:s}){let t=await Je({rpId:n}),c=new L;await c.addSystemAccounts();let a=await pe(),{address:i,addressTree:o}=await O(s.address,a),u=[{address:i,tree:o,queue:o,type:"User"}],A=await z([],u),g=(await se(c,A.treeInfos,A.roots,A.rootIndices,u))[0],{remainingAccounts:y,systemOffset:f}=c.toAccountMetas(),l=v(A,f);return await Do({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:l,payer:e,domainConfig:t,rpId:n,remainingAccounts:y})}async function GO({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[];r.index&&(a.push({address:(await ne(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await O(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await ye(a,t):[],o=await pe(),{address:u,addressTree:A}=await O(r.member,o),g=[{address:u,type:"User",tree:A,queue:A}],y=await z(i,g),f=null,l=null,P=i.filter(U=>U.type==="Settings"),S=i.filter(U=>U.type==="User");P.length&&(f=oe(c,y.treeInfos.slice(0,1),y.leafIndices.slice(0,1),y.rootIndices.slice(0,1),y.proveByIndices.slice(0,1),P,ee())[0]),S.length&&(l=oe(c,y.treeInfos.slice(1,2),y.leafIndices.slice(1,2),y.rootIndices.slice(1,2),y.proveByIndices.slice(1,2),S,Z())[0]);let I=await se(c,y.treeInfos.slice(i.length),y.roots.slice(i.length),y.rootIndices.slice(i.length),g),{remainingAccounts:C,systemOffset:x}=c.toAccountMetas(),_=v(y,x);return await ho({payer:n,authority:e,compressedProofArgs:_,member:mt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:l?gill.some(l):gill.none()}):gill.none(),userAccountCreationArgs:I[0],domainConfig:s,remainingAccounts:C})}async function JO({payer:e}){let n=await zi();return _o({payer:e,globalCounter:n})}async function YO({admin:e,rpId:n,disable:r}){let s=await Je({rpId:n});return Qo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function nB({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await ne(r,s),i=[{address:c,tree:a,queue:a,type:"Settings"}],o=await z([],i),u=(await se(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return Cc({compressedProofArgs:y,args:e,authority:n,settingsCreationArgs:u,remainingAccounts:A})}async function uB({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await O(r,s),i=[{address:c,tree:a,queue:a,type:"User"}],o=await z([],i),u=(await se(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return Rc({compressedProofArgs:y,args:e,authority:n,userCreationArgs:u,remainingAccounts:A})}var Ze=33,Ye=64,_n=14,oC=2,cC=gill.address("Secp256r1SigVerify1111111111111111111111111");function aC(){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 iC(){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 ud(){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=iC();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(),Ze).decode(e,n);n+=Ze;let u=gill.fixDecoderSize(gill.getBytesDecoder(),Ye).decode(e,n);n+=Ye;let A=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,a.push({publicKey:o,signature:u,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function Ad(){return gill.createEncoder({getSizeFromValue:e=>{let n=_n*e.offsets.length,r=e.payload.reduce((s,t)=>s+Ze+Ye+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=aC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Ze).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Ye).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function IB(){return gill.combineCodec(Ad(),ud())}function B(e,n){let r=e.length,s=oC+r*_n,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],A=s,g=A+Ze,y=g+Ye;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:y,messageDataSize:u.length,messageInstructionIndex:65535}),s+=Ze+Ye+u.length;}let c=n?.programAddress??cC,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Ad().encode(a)}}function CB(e){return {programAddress:e.programAddress,accounts:{},data:ud().decode(e.data)}}async function _B({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=await Y(e),{packedAccounts:a,proof:i,settingsMutArgs:o}=await ce(true,e,n,false,t);if(!o)throw new Error("Proof args is missing");let u=ae(s),A=u.filter(I=>I instanceof E),g=[],y=[];for(let I of A){let C=g.length,{domainConfig:x,verifyArgs:_,signature:U,publicKey:K,message:W}=N(I,C);W&&U&&K&&g.push({message:W,signature:U,publicKey:K}),x&&(a.addPreAccounts([{address:x,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&y.push({domainConfigKey:x,verifyArgs:_.value}));}a.addPreAccounts(u.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:f,systemOffset:l}=a.toAccountMetas(),P=v(i,l),S=[];return g.length>0&&S.push(B(g)),S.push(yo({settings:c,settingsMutArgs:o,compressedProofArgs:P,payer:r,secp256r1VerifyArgs:y,remainingAccounts:f})),S}async function NB({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:a,proof:i,settingsMutArgs:o}=r,u=ae(e),A=u.filter(C=>!(C instanceof E));a.addPreAccounts(A.map(C=>({address:C.address,role:gill.AccountRole.READONLY_SIGNER,signer:C})));let g=u.filter(C=>C instanceof E),y=[],f=[];for(let C of g){let x=f.length,{domainConfig:_,verifyArgs:U,signature:K,publicKey:W,message:q}=N(C,x);q&&K&&W&&f.push({message:q,signature:K,publicKey:W}),_&&(a.addPreAccounts([{address:_,role:gill.AccountRole.READONLY}]),U?.__option==="Some"&&y.push({domainConfigKey:_,verifyArgs:U.value}));}let{remainingAccounts:l,systemOffset:P}=a.toAccountMetas(),S=v(i,P),I=[];if(f.length>0&&I.push(B(f)),c){if(!o)throw new Error("Payer not found or proof args is missing.");I.push(co({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:o,remainingAccounts:l,secp256r1VerifyArgs:y}));}else I.push(await Qs({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:l,secp256r1VerifyArgs:y}));return I}async function JB({createUserArgs:e,payer:n}){let r=new L;await r.addSystemAccounts(),r.addPreAccounts(e.map(A=>({address:A.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:A.member})));let s=await pe(),t=await Promise.all(e.map(async A=>{let{address:g,addressTree:y}=await O(A.member.address,s);return {address:g,tree:y,queue:y,type:"User"}})),c=await z([],t),a=await se(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:o}=r.toAccountMetas(),u=v(c,o);return await Vo({compressedProofArgs:u,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 $B({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let a=new L;await a.addSystemAccounts();let i=await pe(),{address:o,addressTree:u}=await O(r.address,i),A=[{address:o,tree:u,queue:u,type:"User"}],g=await z([],A),y=(await se(a,g.treeInfos,g.roots,g.rootIndices,A))[0],f=a.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(g,f.systemOffset),authorityCreationArgs:y};}return sc({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 L;await s.addSystemAccounts();let t=await ye([{address:(await O(e.address,n)).address,type:"User"}]),c=await z(t,[]),a=oe(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,Z())[0],{remainingAccounts:i,systemOffset:o}=s.toAccountMetas(),u=v(c,o);return uc({authority:e,transactionManagerUrl:r,compressedProofArgs:u,userMutArgs:a,remainingAccounts:i})}async function pw({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:u}=N(n),A=[];i&&o&&u&&A.push({message:i,signature:o,publicKey:u});let g=await rr(n instanceof E?n:n.address,r,t),y=[];y.push({address:(await O(n instanceof E?n:n.address,r)).address,type:"User"});let f,l=null,P,S=null;g.delegatedTo.__option==="Some"&&((await Cn(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await ne(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),l={start:y.length-1,end:y.length}):f=await Y(g.delegatedTo.value.index)),s&&((await Cn(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await ne(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:y.length-1,end:y.length}):P=await Y(s.index));let I=new L;await I.addSystemAccounts();let C=await ye(y,t),x=await z(C,[]),_=oe(I,x.treeInfos.slice(0,1),x.leafIndices.slice(0,1),x.rootIndices.slice(0,1),x.proveByIndices.slice(0,1),C.slice(0,1),Z())[0],U=l?gill.some(oe(I,x.treeInfos.slice(l.start,l.end),x.leafIndices.slice(l.start,l.end),x.rootIndices.slice(l.start,l.end),x.proveByIndices.slice(l.start,l.end),C.slice(l.start,l.end),ee())[0]):gill.none(),K=S?gill.some(oe(I,x.treeInfos.slice(S.start,S.end),x.leafIndices.slice(S.start,S.end),x.rootIndices.slice(S.start,S.end),x.proveByIndices.slice(S.start,S.end),C.slice(S.start,S.end),ee())[0]):gill.none(),{remainingAccounts:W,systemOffset:q}=I.toAccountMetas(),te=v(x,q),de=[];return A.length>0&&de.push(B(A)),de.push(Tc({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof E?void 0:n,oldSettings:f,oldSettingsMutArgs:U,newSettings:P,newSettingsMutArgs:K,compressedProofArgs:te,userMutArgs:_,remainingAccounts:W})),de}async function Rw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[],i=[];i.push(...await ye([{address:(await O(r.address,s)).address,type:"User"}],t));let o=await pe(),{address:u,addressTree:A}=await ne(e,o);a.push({address:u,queue:A,tree:A,type:"Settings"});let g=i.length,y=await z(i,a),f=oe(c,y.treeInfos.slice(0,g),y.leafIndices.slice(0,g),y.rootIndices.slice(0,g),y.proveByIndices.slice(0,g),i.filter(_=>_.type==="User"),Z())[0],P=(await se(c,y.treeInfos.slice(g),y.roots.slice(g),y.rootIndices.slice(g),a)).find(_=>_.type==="Settings")??null,{remainingAccounts:S,systemOffset:I}=c.toAccountMetas(),C=v(y,I),x=[];if(!P)throw new Error("Settings creation args is missing.");return x.push(await Bo({settingsIndex:e,payer:n,initialMember:r,userReadonlyArgs:f,compressedProofArgs:C,settingsCreation:P,remainingAccounts:S})),x}async function ww({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:a,settingsMutArgs:i}=await ce(true,e,n,false,t);if(!i)throw new Error("Proof args is missing");let o=ae(s),u=o.filter(I=>I instanceof E),A=[],g=[];for(let I of u){let C=A.length,{domainConfig:x,verifyArgs:_,signature:U,publicKey:K,message:W}=N(I,C);W&&U&&K&&A.push({message:W,signature:U,publicKey:K}),x&&(c.addPreAccounts([{address:x,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&g.push({domainConfigKey:x,verifyArgs:_.value}));}c.addPreAccounts(o.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:y,systemOffset:f}=c.toAccountMetas(),l=v(a,f),P=[];A.length>0&&P.push(B(A));let S=await Y(e);return P.push(Jo({settings:S,payer:r,settingsMutArgs:i,compressedProofArgs:l,secp256r1VerifyArgs:g,remainingAccounts:y})),P}function yC(e,n,r,s){let t=mC(e,n),c=pC(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 mC(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 pC(e,n){return n<e.header.numSignerAccounts}async function ar({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=bi(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:yC(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 u of i.writableIndexes){let A=o[u];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:A,role:gill.AccountRole.WRITABLE});}for(let u of i.readonlyIndexes){let A=o[u];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:A,role:gill.AccountRole.READONLY});}}for(let i of s?.filter(o=>o.address!==e)??[]){let o=a.findIndex(u=>u.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 pd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let u=await Se(e),{accountMetas:A,addressLookupTableAccounts:g}=await ar({transactionMessageBytes:r,walletAddress:u,additionalSigners:a,addressesByLookupTableAddress:t}),y=[];return c.length>0&&y.push(B(c)),y.push(o?gi({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):ci({transactionBuffer:n,payer:s.address,settings:e})),i&&y.push(rd({payer:s,tipAmount:i})),{instructions:y,addressLookupTableAccounts:g}}async function Td({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:a=[],compressed:i=false,simulateProof:o=false,cachedAccounts:u}){let A=ae(s),g=await Y(e),y=await Se(g),[{accountMetas:f,addressLookupTableAccounts:l,transactionMessage:P},{settingsMutArgs:S,proof:I,packedAccounts:C}]=await Promise.all([ar({transactionMessageBytes:r,walletAddress:y,additionalSigners:A.filter(te=>!(te instanceof E)),addressesByLookupTableAddress:c}),ce(i,e,n,o,u)]);C.addPreAccounts(f);let x=A.filter(te=>te instanceof E),_=[];for(let te of x){let de=a.length,{domainConfig:me,verifyArgs:Ee,signature:Pe,publicKey:xe,message:Ut}=N(te,de);Ut&&Pe&&xe&&a.push({message:Ut,signature:Pe,publicKey:xe}),me&&(C.addPreAccounts([{address:me,role:gill.AccountRole.READONLY}]),Ee?.__option==="Some"&&_.push({domainConfigKey:me,verifyArgs:Ee.value}));}let{remainingAccounts:U,systemOffset:K}=C.toAccountMetas(),W=[];a.length>0&&W.push(B(a));let q=fC(P,f);if(i){if(!t||!S)throw new Error("Payer not found or proof args is missing.");let te=v(I,K);W.push(Mi({secp256r1VerifyArgs:_,transactionMessage:q,settingsMutArgs:S,compressedProofArgs:te,payer:t,remainingAccounts:U}));}else W.push(li({secp256r1VerifyArgs:_,settings:g,transactionMessage:q,remainingAccounts:U}));return {instructions:W,addressLookupTableAccounts:l}}function fC(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 Ak({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let o=ae(s),u=await Y(e),A=await Se(u),{packedAccounts:g,proof:y,settingsMutArgs:f}=await ce(i,e,n,false,t),l=[],P=[];for(let x of o)if(x instanceof E){let _=l.length,{domainConfig:U,verifyArgs:K,signature:W,publicKey:q,message:te}=N(x,_);te&&W&&q&&l.push({message:te,signature:W,publicKey:q}),U&&(g.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),K?.__option==="Some"&&P.push({domainConfigKey:U,verifyArgs:K.value}));}else g.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:S,systemOffset:I}=g.toAccountMetas(),C=[];if(l.length>0&&C.push(B(l)),i){if(!a||!f)throw new Error("Payer not found or proof args is missing.");let x=v(y,I);C.push(kc({amount:c,settingsMutArgs:f,compressedProofArgs:x,payer:a,secp256r1VerifyArgs:P,source:A,destination:r,remainingAccounts:S}));}else C.push(Uc({amount:c,secp256r1VerifyArgs:P,source:A,destination:r,settings:u,remainingAccounts:S}));return C}async function Ik({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:o,createAtaIfNeeded:u=true,compressed:A=false}){let g=ae(t),y=await Y(e),f=await Se(y),[l,P]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,f,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{packedAccounts:S,proof:I,settingsMutArgs:C}=await ce(A,e,n,false,c),x=[],_=[];for(let q of g)if(q instanceof E){let te=x.length,{domainConfig:de,verifyArgs:me,signature:Ee,publicKey:Pe,message:xe}=N(q,te);xe&&Ee&&Pe&&x.push({message:xe,signature:Ee,publicKey:Pe}),de&&(S.addPreAccounts([{address:de,role:gill.AccountRole.READONLY}]),me?.__option==="Some"&&_.push({domainConfigKey:de,verifyArgs:me.value}));}else S.addPreAccounts([{address:q.address,role:gill.AccountRole.READONLY_SIGNER,signer:q}]);let{remainingAccounts:U,systemOffset:K}=S.toAccountMetas(),W=[];if(x.length>0&&W.push(B(x)),A){if(!i||!C)throw new Error("Payer not found or proof args is missing.");let q=v(I,K);W.push(qc({amount:a,createAtaIfNeeded:u,settingsMutArgs:C,compressedProofArgs:q,payer:i,secp256r1VerifyArgs:_,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:P,mint:s,tokenProgram:o,remainingAccounts:U}));}else W.push(Gc({amount:a,createAtaIfNeeded:u,secp256r1VerifyArgs:_,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:P,settings:y,mint:s,tokenProgram:o,remainingAccounts:U}));return W}async function Uk({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:a}){let i=await Us(re(),s),o=i.data.multiWalletSettings,{packedAccounts:u,proof:A,settingsMutArgs:g}=await ce(c,e,n,false,a),{remainingAccounts:y,systemOffset:f}=u.toAccountMetas(),{domainConfig:l,verifyArgs:P,message:S,signature:I,publicKey:C}=N(r),x=[];if(S&&I&&C&&x.push(B([{message:S,signature:I,publicKey:C}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let _=v(A,f);x.push(ca({transactionBuffer:s,domainConfig:l,closer:r instanceof E?void 0:r,rentCollector:i.data.payer,secp256r1VerifyArgs:P,settingsMutArgs:g,payer:t,compressedProofArgs:_,remainingAccounts:y}));}else x.push(ea({transactionBuffer:s,domainConfig:l,closer:r instanceof E?void 0:r,settings:o,payer:i.data.payer,secp256r1VerifyArgs:P,remainingAccounts:[]}));return x}function xd({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:u,expectedSecp256r1Signers:A}){let{domainConfig:g,verifyArgs:y,message:f,signature:l,publicKey:P}=N(n),S=[];if(f&&l&&P&&S.push(B([{message:f,signature:l,publicKey:P}])),u){let{settingsReadonlyArgs:I,compressedProofArgs:C,remainingAccounts:x}=u;S.push(la({transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof E?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},settingsReadonlyArgs:I,compressedProofArgs:C,remainingAccounts:x}));}else S.push(ga({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof E?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},remainingAccounts:[]}));return S}function Id({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=N(e),u=[];return i&&a&&o&&u.push(B([{message:i,signature:a,publicKey:o}])),s?u.push(va({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof E?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(Ma({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof E?void 0:e,remainingAccounts:[]})),u}function Cd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Ga({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Ba({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Dd({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=N(n),u=[];return o&&a&&i&&u.push(B([{message:o,signature:a,publicKey:i}])),s?u.push(ei({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof E?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(qa({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof E?void 0:n,remainingAccounts:[]})),u}async function DN({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await lC(r),a=new L,i=null,o=null,u=[];if(c.length||t){let g=await SC({packedAccounts:a,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});i=g.proof,o=g.settingsMutArgs??null,u=g.userMutArgs??[];}return {configActions:await xC({configActionsArgs:r,userMutArgs:u,index:e}),index:e,proof:i,settingsMutArgs:o,packedAccounts:a,compressed:t}}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=>O(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=>O(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 ne(s,t)).address;a.push({address:f,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await ye(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await z(i,[]),u=[],A=[];for(let f of i)f.type==="Settings"?u.push(f):f.type==="User"&&A.push(f);let g,y=[];if(r&&o&&(g=oe(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),u,ee())[0]),A.length&&o){let f=r?1:0;y=oe(e,o.treeInfos.slice(f),o.leafIndices.slice(f),o.rootIndices.slice(f),o.proveByIndices.slice(f),A,Z());}return {proof:o,settingsMutArgs:g,userMutArgs:y}}async function xC({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let a of t.members){let i=await O(a.member,a.userAddressTreeIndex).then(o=>r.find(u=>new Md__default.default(new Uint8Array(u.accountMeta.address)).eq(o.address)));if(!i)throw new Error("Unable to find user account");c.push(DC({permissionArgs:a.permissions,userMutArgs:i,pubkey:a.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(a=>O(a.member,a.userAddressTreeIndex).then(i=>{let o=r.find(u=>new Md__default.default(new Uint8Array(u.accountMeta.address)).eq(i.address));if(!o)throw new Error("Unable to find user account");return CC({pubkey:a.member,userMutArgs:o,index:e})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(a=>IC({permissionArgs:a.permissions,pubkey:a.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function IC({pubkey:e,permissionArgs:n}){return {memberKey:qe(e),permissions:Ed(n)}}function CC({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 DC({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===1)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:qe(e),permissions:Ed(n),userReadonlyArgs:r}}function Ed(e){let n=[];return e.initiate&&n.push(le.InitiateTransaction),e.vote&&n.push(le.VoteTransaction),e.execute&&n.push(le.ExecuteTransaction),Ie.fromPermissions(n)}async function _N({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o,compressed:u=false,additionalVoters:A=[],additionalSigners:g=[],chunkSize:y=Math.ceil(s.length/2),cachedAccounts:f}){let l=await Y(n),P=Math.floor(Math.random()*255),S=await Ki(l,t instanceof E?t:t.address,P),I=[],C=[];for(let X=0;X<s.length;X+=y){let Ln=s.subarray(X,X+y);I.push(Ln),C.push(sha2_js.sha256(Ln));}let x=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:_,settingsMutArgs:U,proof:K,packedAccounts:W}=await ce(u,n,r,false,f),{remainingAccounts:q,systemOffset:te}=W.toAccountMetas(),de=K&&_&&U?{settingsReadonlyArgs:_,settingsMutArgs:U,compressedProofArgs:v(K,te),remainingAccounts:q,payer:e}:null,me=ae([t,...c?[c]:[],...A]).filter(X=>X instanceof E).map(X=>({memberKey:qe(X),messageHash:En(X.authResponse)})),Ee=xd({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:P,payer:e,transactionBufferAddress:S,settings:l,creator:t,preauthorizeExecution:!c,bufferExtendHashes:C,compressedArgs:de,expectedSecp256r1Signers:me}),Pe=I.map(X=>Cd({transactionMessageBytes:X,transactionBufferAddress:S,settings:l,compressed:u})),xe=A.map(X=>Dd({voter:X,transactionBufferAddress:S,settings:l,compressedArgs:de})),Ut=Id({compressedArgs:de,settings:l,executor:c,transactionBufferAddress:S}),{instructions:Rd,addressLookupTableAccounts:bd}=await pd({compressed:u,settings:l,transactionMessageBytes:s,transactionBufferAddress:S,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o}),T=X=>({payer:e,instructions:X,addressesByLookupTableAddress:bd});return [T(Ee),...Pe.map(X=>T([X])),...xe.length?[T(xe.flat())]:[],T(Ut),T(Rd)]}var dr=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(u=>u===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 ur=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=dr.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(s??{});for(let y of i){let f=t.extractTableLookup(y);if(f!==void 0){let{addressTableLookup:l,drainedKeys:P}=f;c.push({readonlyIndexes:l.readonlyIndexes,readableIndices:l.readonlyIndexes,writableIndexes:l.writableIndexes,writableIndices:l.writableIndexes,lookupTableAddress:gill.address(l.lookupTableAddress)}),a.writable.push(...P.writable),a.readonly.push(...P.readonly);}}let[o,u]=t.getMessageComponents(),g=new ur(u,a).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function zN({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=hd({instructions:e,payer:n,recentBlockhash:d,addressesByLookupTableAddress:r});return Ri(s)}async function ZN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:a,cachedAccounts:i,compressed:o=false,simulateProof:u=false}){let{instructions:A,addressLookupTableAccounts:g}=await Td({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:i});return {payer:e,instructions:A,addressesByLookupTableAddress:g}}
2
- exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Gs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=no;exports.CHANGE_CONFIG_DISCRIMINATOR=Ys;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=uo;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Io;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Eo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=bo;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Lo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=ko;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Fo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Zo;exports.DOMAIN_CONFIG_DISCRIMINATOR=On;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=rc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=ac;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=yc;exports.GLOBAL_COUNTER_DISCRIMINATOR=Hn;exports.KeyType=bt;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Sc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Ec;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=Ax;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=GS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=_x;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Ux;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=KS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=zS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=tx;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=$S;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=FS;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=XS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=xx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Ix;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Cx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=mx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=gx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=yx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=cx;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=Ox;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=ex;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=ix;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Sx;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=px;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=ox;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=qS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=BS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=NS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=OS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=kS;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=vx;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Rx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=nx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=QS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=YS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=sx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=ax;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=VS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=Px;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Wx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=dx;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=ux;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=hx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=fx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=jS;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ZS;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=Lx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=JS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Ex;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=HS;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=wS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=bx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=rx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=Dx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Mx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=lx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Tx;exports.MULTI_WALLET_PROGRAM_ADDRESS=d;exports.MultiWalletAccount=US;exports.MultiWalletInstruction=WS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Oc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=vc;exports.Permission=le;exports.Permissions=Ie;exports.SETTINGS_DISCRIMINATOR=Cs;exports.Secp256r1Key=Ce;exports.SignedSecp256r1Key=E;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Jc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Vc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=na;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Xc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=pa;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=da;exports.TRANSACTION_BUFFER_DISCRIMINATOR=bs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=ha;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Ia;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Na;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Wa;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Xa;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Ka;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=di;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=ni;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Ii;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=pi;exports.UserRole=Ge;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Os;exports.addWhitelistedAddressTrees=pW;exports.base64URLStringToBuffer=Me;exports.bufferToBase64URLString=qL;exports.changeConfig=NB;exports.closeTransactionBuffer=Uk;exports.compressSettingsAccount=_B;exports.configAction=mD;exports.convertMemberKeyToString=sd;exports.convertPubkeyCompressedToCose=HL;exports.convertPubkeyCoseToCompressed=VL;exports.createClientAuthorizationCompleteRequestChallenge=KL;exports.createClientAuthorizationStartRequestChallenge=zL;exports.createDomainConfig=UO;exports.createDomainUserAccounts=GO;exports.createGlobalCounter=JO;exports.createMessageChallenge=JL;exports.createTransactionBuffer=xd;exports.createTransactionChallenge=jL;exports.createTransactionManagerSigner=QI;exports.createUserAccounts=JB;exports.createWallet=Rw;exports.decodeDomainConfig=wn;exports.decodeGlobalCounter=Fn;exports.decodeSettings=Ms;exports.decodeTransactionBuffer=_s;exports.decodeWhitelistedAddressTree=ws;exports.decompressSettingsAccount=ww;exports.deserializeConfigActions=fO;exports.disableDomainConfig=YO;exports.editDomainConfig=$B;exports.editTransactionManagerUrl=ow;exports.editUserDelegate=pw;exports.executeTransaction=pd;exports.executeTransactionBuffer=Id;exports.executeTransactionSync=Td;exports.extendTransactionBuffer=Cd;exports.fetchAllDomainConfig=bC;exports.fetchAllGlobalCounter=BC;exports.fetchAllMaybeDomainConfig=Fd;exports.fetchAllMaybeGlobalCounter=ou;exports.fetchAllMaybeSettings=my;exports.fetchAllMaybeTransactionBuffer=By;exports.fetchAllMaybeWhitelistedAddressTree=rm;exports.fetchAllSettings=rP;exports.fetchAllTransactionBuffer=dP;exports.fetchAllWhitelistedAddressTree=mP;exports.fetchCompressedAccount=Li;exports.fetchDomainConfig=kn;exports.fetchGlobalCounter=OC;exports.fetchMaybeDomainConfig=Gd;exports.fetchMaybeGlobalCounter=su;exports.fetchMaybeSettings=zr;exports.fetchMaybeSettingsAccountData=uI;exports.fetchMaybeTransactionBuffer=Oy;exports.fetchMaybeUserAccountData=dI;exports.fetchMaybeWhitelistedAddressTree=tm;exports.fetchSettings=tP;exports.fetchSettingsAccountData=Cn;exports.fetchTransactionBuffer=Us;exports.fetchUserAccountData=rr;exports.fetchWhitelistedAddressTree=ks;exports.getAddMemberArgsCodec=HC;exports.getAddMemberArgsDecoder=gr;exports.getAddMemberArgsEncoder=Ar;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=_P;exports.getAddWhitelistedAddressTreesInstruction=WP;exports.getAddWhitelistedAddressTreesInstructionAsync=zs;exports.getAddWhitelistedAddressTreesInstructionDataCodec=UP;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Fs;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Qr;exports.getChangeConfigCompressedDiscriminatorBytes=XP;exports.getChangeConfigCompressedInstruction=co;exports.getChangeConfigCompressedInstructionDataCodec=QP;exports.getChangeConfigCompressedInstructionDataDecoder=oo;exports.getChangeConfigCompressedInstructionDataEncoder=so;exports.getChangeConfigDiscriminatorBytes=HP;exports.getChangeConfigInstruction=FP;exports.getChangeConfigInstructionAsync=Qs;exports.getChangeConfigInstructionDataCodec=GP;exports.getChangeConfigInstructionDataDecoder=Xs;exports.getChangeConfigInstructionDataEncoder=$r;exports.getClientAndDeviceHash=Mn;exports.getCompiledInstructionCodec=zC;exports.getCompiledInstructionDecoder=mr;exports.getCompiledInstructionEncoder=yr;exports.getCompressSettingsAccountDiscriminatorBytes=ch;exports.getCompressSettingsAccountInstruction=yo;exports.getCompressSettingsAccountInstructionDataCodec=ah;exports.getCompressSettingsAccountInstructionDataDecoder=go;exports.getCompressSettingsAccountInstructionDataEncoder=Ao;exports.getCompressedAccountMetaCodec=qC;exports.getCompressedAccountMetaDecoder=et;exports.getCompressedAccountMetaEncoder=$e;exports.getCompressedAccountMetaReadOnlyCodec=QC;exports.getCompressedAccountMetaReadOnlyDecoder=st;exports.getCompressedAccountMetaReadOnlyEncoder=nt;exports.getCompressedProofCodec=tD;exports.getCompressedProofDecoder=xr;exports.getCompressedProofEncoder=Sr;exports.getCompressedSettingsAddressFromIndex=ne;exports.getCompressedSettingsCodec=oD;exports.getCompressedSettingsDataCodec=dD;exports.getCompressedSettingsDataDecoder=at;exports.getCompressedSettingsDataEncoder=ct;exports.getCompressedSettingsDecoder=ee;exports.getCompressedSettingsEncoder=ot;exports.getComputeBudgetEstimate=_i;exports.getConfigActionCodec=yD;exports.getConfigActionDecoder=Ue;exports.getConfigActionEncoder=_e;exports.getCreateDomainConfigDiscriminatorBytes=ph;exports.getCreateDomainConfigInstruction=fh;exports.getCreateDomainConfigInstructionAsync=Do;exports.getCreateDomainConfigInstructionDataCodec=Th;exports.getCreateDomainConfigInstructionDataDecoder=Co;exports.getCreateDomainConfigInstructionDataEncoder=tn;exports.getCreateDomainUserAccountDiscriminatorBytes=Eh;exports.getCreateDomainUserAccountInstruction=hh;exports.getCreateDomainUserAccountInstructionAsync=ho;exports.getCreateDomainUserAccountInstructionDataCodec=Ph;exports.getCreateDomainUserAccountInstructionDataDecoder=Po;exports.getCreateDomainUserAccountInstructionDataEncoder=nn;exports.getCreateGlobalCounterDiscriminatorBytes=Lh;exports.getCreateGlobalCounterInstruction=Bh;exports.getCreateGlobalCounterInstructionAsync=_o;exports.getCreateGlobalCounterInstructionDataCodec=Oh;exports.getCreateGlobalCounterInstructionDataDecoder=vo;exports.getCreateGlobalCounterInstructionDataEncoder=on;exports.getCreateMultiWalletCompressedDiscriminatorBytes=zh;exports.getCreateMultiWalletCompressedInstruction=Jh;exports.getCreateMultiWalletCompressedInstructionAsync=Bo;exports.getCreateMultiWalletCompressedInstructionDataCodec=Kh;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Oo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=cn;exports.getCreateUserAccountArgsCodec=SD;exports.getCreateUserAccountArgsDecoder=Rr;exports.getCreateUserAccountArgsEncoder=hr;exports.getCreateUserAccountsDiscriminatorBytes=eR;exports.getCreateUserAccountsInstruction=rR;exports.getCreateUserAccountsInstructionAsync=Vo;exports.getCreateUserAccountsInstructionDataCodec=tR;exports.getCreateUserAccountsInstructionDataDecoder=No;exports.getCreateUserAccountsInstructionDataEncoder=dn;exports.getDecompressSettingsAccountDiscriminatorBytes=uR;exports.getDecompressSettingsAccountInstruction=Jo;exports.getDecompressSettingsAccountInstructionDataCodec=AR;exports.getDecompressSettingsAccountInstructionDataDecoder=Ko;exports.getDecompressSettingsAccountInstructionDataEncoder=zo;exports.getDisableDomainConfigDiscriminatorBytes=lR;exports.getDisableDomainConfigInstruction=Qo;exports.getDisableDomainConfigInstructionDataCodec=SR;exports.getDisableDomainConfigInstructionDataDecoder=Xo;exports.getDisableDomainConfigInstructionDataEncoder=Yo;exports.getDomainConfigAddress=Je;exports.getDomainConfigCodec=RC;exports.getDomainConfigDecoder=Bn;exports.getDomainConfigDiscriminatorBytes=hC;exports.getDomainConfigEncoder=Hd;exports.getDomainConfigSize=vC;exports.getEditDomainConfigDiscriminatorBytes=hR;exports.getEditDomainConfigInstruction=sc;exports.getEditDomainConfigInstructionAsync=bR;exports.getEditDomainConfigInstructionDataCodec=RR;exports.getEditDomainConfigInstructionDataDecoder=nc;exports.getEditDomainConfigInstructionDataEncoder=An;exports.getEditMemberArgsCodec=DD;exports.getEditMemberArgsDecoder=Mr;exports.getEditMemberArgsEncoder=Dr;exports.getEditTransactionManagerUrlDiscriminatorBytes=wR;exports.getEditTransactionManagerUrlInstruction=uc;exports.getEditTransactionManagerUrlInstructionDataCodec=kR;exports.getEditTransactionManagerUrlInstructionDataDecoder=dc;exports.getEditTransactionManagerUrlInstructionDataEncoder=ic;exports.getEditUserDelegateDiscriminatorBytes=JR;exports.getEditUserDelegateInstruction=Tc;exports.getEditUserDelegateInstructionDataCodec=jR;exports.getEditUserDelegateInstructionDataDecoder=pc;exports.getEditUserDelegateInstructionDataEncoder=mc;exports.getExpectedSecp256r1SignersCodec=hD;exports.getExpectedSecp256r1SignersDecoder=At;exports.getExpectedSecp256r1SignersEncoder=ut;exports.getGlobalCounterAddress=zi;exports.getGlobalCounterCodec=LC;exports.getGlobalCounterDecoder=Gn;exports.getGlobalCounterDiscriminatorBytes=WC;exports.getGlobalCounterEncoder=nu;exports.getGlobalCounterSize=wC;exports.getJitoTipsConfig=xn;exports.getLightCpiSigner=DL;exports.getLightProtocolRpc=ke;exports.getLinkWalletArgsCodec=_D;exports.getLinkWalletArgsDecoder=vr;exports.getLinkWalletArgsEncoder=br;exports.getMemberCodec=OD;exports.getMemberDecoder=dt;exports.getMemberEncoder=it;exports.getMemberKeyCodec=kD;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=Q;exports.getMigrateCompressedSettingsDiscriminatorBytes=tb;exports.getMigrateCompressedSettingsInstruction=Cc;exports.getMigrateCompressedSettingsInstructionDataCodec=rb;exports.getMigrateCompressedSettingsInstructionDataDecoder=Ic;exports.getMigrateCompressedSettingsInstructionDataEncoder=xc;exports.getMigrateCompressedUsersDiscriminatorBytes=ub;exports.getMigrateCompressedUsersInstruction=Rc;exports.getMigrateCompressedUsersInstructionDataCodec=Ab;exports.getMigrateCompressedUsersInstructionDataDecoder=hc;exports.getMigrateCompressedUsersInstructionDataEncoder=Pc;exports.getMultiWalletErrorMessage=nW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=bb;exports.getNativeTransferIntentCompressedInstruction=kc;exports.getNativeTransferIntentCompressedInstructionDataCodec=vb;exports.getNativeTransferIntentCompressedInstructionDataDecoder=wc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Bc;exports.getNativeTransferIntentDiscriminatorBytes=Sb;exports.getNativeTransferIntentInstruction=Uc;exports.getNativeTransferIntentInstructionAsync=Ib;exports.getNativeTransferIntentInstructionDataCodec=xb;exports.getNativeTransferIntentInstructionDataDecoder=_c;exports.getNativeTransferIntentInstructionDataEncoder=gn;exports.getNewAuthorityArgsCodec=GD;exports.getNewAuthorityArgsDecoder=Lr;exports.getNewAuthorityArgsEncoder=Wr;exports.getOriginIndex=FL;exports.getPackedAddressTreeInfoCodec=KD;exports.getPackedAddressTreeInfoDecoder=yt;exports.getPackedAddressTreeInfoEncoder=gt;exports.getPackedStateTreeInfoCodec=qD;exports.getPackedStateTreeInfoDecoder=rt;exports.getPackedStateTreeInfoEncoder=tt;exports.getPermissionsCodec=XD;exports.getPermissionsDecoder=Re;exports.getPermissionsEncoder=he;exports.getProofArgsCodec=tM;exports.getProofArgsDecoder=M;exports.getProofArgsEncoder=D;exports.getRemoveMemberArgsCodec=oM;exports.getRemoveMemberArgsDecoder=Pr;exports.getRemoveMemberArgsEncoder=Er;exports.getSecp256r1MessageHash=En;exports.getSecp256r1PubkeyCodec=iM;exports.getSecp256r1PubkeyDecoder=mt;exports.getSecp256r1PubkeyEncoder=wr;exports.getSecp256r1SignatureOffsetsDataDecoder=iC;exports.getSecp256r1SignatureOffsetsDataEncoder=aC;exports.getSecp256r1VerifyArgsCodec=AM;exports.getSecp256r1VerifyArgsDecoder=H;exports.getSecp256r1VerifyArgsEncoder=V;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=pM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=F;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=G;exports.getSecp256r1VerifyInstruction=B;exports.getSecp256r1VerifyInstructionDataCodec=IB;exports.getSecp256r1VerifyInstructionDataDecoder=ud;exports.getSecp256r1VerifyInstructionDataEncoder=Ad;exports.getSendAndConfirmTransaction=vi;exports.getSettingsCodec=eP;exports.getSettingsCreationArgsCodec=SM;exports.getSettingsCreationArgsDecoder=Tt;exports.getSettingsCreationArgsEncoder=pt;exports.getSettingsDecoder=Ds;exports.getSettingsDiscriminatorBytes=$E;exports.getSettingsEncoder=yy;exports.getSettingsFromIndex=Y;exports.getSettingsIndexWithAddressCodec=CM;exports.getSettingsIndexWithAddressDecoder=lt;exports.getSettingsIndexWithAddressEncoder=ft;exports.getSettingsMutArgsCodec=PM;exports.getSettingsMutArgsDecoder=k;exports.getSettingsMutArgsEncoder=w;exports.getSettingsReadonlyArgsCodec=vM;exports.getSettingsReadonlyArgsDecoder=xt;exports.getSettingsReadonlyArgsEncoder=St;exports.getSettingsSize=nP;exports.getSignedSecp256r1Key=GL;exports.getSignedTransactionManager=pO;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=ze;exports.getTokenTransferIntentCompressedDiscriminatorBytes=qb;exports.getTokenTransferIntentCompressedInstruction=qc;exports.getTokenTransferIntentCompressedInstructionAsync=Yb;exports.getTokenTransferIntentCompressedInstructionDataCodec=Zb;exports.getTokenTransferIntentCompressedInstructionDataDecoder=jc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=pn;exports.getTokenTransferIntentDiscriminatorBytes=kb;exports.getTokenTransferIntentInstruction=Gc;exports.getTokenTransferIntentInstructionAsync=Vb;exports.getTokenTransferIntentInstructionDataCodec=Nb;exports.getTokenTransferIntentInstructionDataDecoder=Hc;exports.getTokenTransferIntentInstructionDataEncoder=mn;exports.getTransactionBufferAddress=Ki;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=yv;exports.getTransactionBufferCloseCompressedInstruction=ca;exports.getTransactionBufferCloseCompressedInstructionDataCodec=mv;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=oa;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=sa;exports.getTransactionBufferCloseDiscriminatorBytes=sv;exports.getTransactionBufferCloseInstruction=ea;exports.getTransactionBufferCloseInstructionDataCodec=ov;exports.getTransactionBufferCloseInstructionDataDecoder=$c;exports.getTransactionBufferCloseInstructionDataEncoder=Qc;exports.getTransactionBufferCodec=iP;exports.getTransactionBufferCreateArgsCodec=LM;exports.getTransactionBufferCreateArgsDecoder=Ct;exports.getTransactionBufferCreateArgsEncoder=It;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=_v;exports.getTransactionBufferCreateCompressedInstruction=la;exports.getTransactionBufferCreateCompressedInstructionDataCodec=Uv;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=fa;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Ta;exports.getTransactionBufferCreateDiscriminatorBytes=Cv;exports.getTransactionBufferCreateInstruction=ga;exports.getTransactionBufferCreateInstructionDataCodec=Dv;exports.getTransactionBufferCreateInstructionDataDecoder=Aa;exports.getTransactionBufferCreateInstructionDataEncoder=ua;exports.getTransactionBufferDecoder=vs;exports.getTransactionBufferDiscriminatorBytes=aP;exports.getTransactionBufferEncoder=Ly;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=Zv;exports.getTransactionBufferExecuteCompressedInstruction=va;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=Yv;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=ba;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Ra;exports.getTransactionBufferExecuteDiscriminatorBytes=Vv;exports.getTransactionBufferExecuteInstruction=Ma;exports.getTransactionBufferExecuteInstructionDataCodec=Hv;exports.getTransactionBufferExecuteInstructionDataDecoder=Da;exports.getTransactionBufferExecuteInstructionDataEncoder=Ca;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=A_;exports.getTransactionBufferExtendCompressedInstruction=Ga;exports.getTransactionBufferExtendCompressedInstructionDataCodec=g_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Ha;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Va;exports.getTransactionBufferExtendDiscriminatorBytes=n_;exports.getTransactionBufferExtendInstruction=Ba;exports.getTransactionBufferExtendInstructionDataCodec=s_;exports.getTransactionBufferExtendInstructionDataDecoder=Oa;exports.getTransactionBufferExtendInstructionDataEncoder=La;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=b_;exports.getTransactionBufferVoteCompressedInstruction=ei;exports.getTransactionBufferVoteCompressedInstructionDataCodec=v_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=$a;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Qa;exports.getTransactionBufferVoteDiscriminatorBytes=x_;exports.getTransactionBufferVoteInstruction=qa;exports.getTransactionBufferVoteInstructionDataCodec=I_;exports.getTransactionBufferVoteInstructionDataDecoder=ja;exports.getTransactionBufferVoteInstructionDataEncoder=Ja;exports.getTransactionExecuteCompressedDiscriminatorBytes=K_;exports.getTransactionExecuteCompressedInstruction=gi;exports.getTransactionExecuteCompressedInstructionDataCodec=J_;exports.getTransactionExecuteCompressedInstructionDataDecoder=Ai;exports.getTransactionExecuteCompressedInstructionDataEncoder=ui;exports.getTransactionExecuteDiscriminatorBytes=w_;exports.getTransactionExecuteInstruction=ci;exports.getTransactionExecuteInstructionDataCodec=k_;exports.getTransactionExecuteInstructionDataDecoder=oi;exports.getTransactionExecuteInstructionDataEncoder=si;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=dU;exports.getTransactionExecuteSyncCompressedInstruction=Mi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=uU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Di;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Ci;exports.getTransactionExecuteSyncDiscriminatorBytes=eU;exports.getTransactionExecuteSyncInstruction=li;exports.getTransactionExecuteSyncInstructionDataCodec=tU;exports.getTransactionExecuteSyncInstructionDataDecoder=fi;exports.getTransactionExecuteSyncInstructionDataEncoder=Ti;exports.getTransactionMessageAddressTableLookupCodec=HM;exports.getTransactionMessageAddressTableLookupDecoder=Nr;exports.getTransactionMessageAddressTableLookupEncoder=kr;exports.getTransactionMessageCodec=kM;exports.getTransactionMessageDecoder=Mt;exports.getTransactionMessageEncoder=Dt;exports.getUserAccountAddress=O;exports.getUserCodec=KM;exports.getUserCreationArgsCodec=ZM;exports.getUserCreationArgsDecoder=ge;exports.getUserCreationArgsEncoder=Ae;exports.getUserDecoder=Z;exports.getUserEncoder=Oe;exports.getUserMutArgsCodec=$M;exports.getUserMutArgsDecoder=fe;exports.getUserMutArgsEncoder=Te;exports.getUserReadOnlyArgsCodec=nE;exports.getUserReadOnlyArgsDecoder=ve;exports.getUserReadOnlyArgsEncoder=be;exports.getUserReadOnlyOrMutateArgsCodec=aE;exports.getUserReadOnlyOrMutateArgsDecoder=Br;exports.getUserReadOnlyOrMutateArgsEncoder=Or;exports.getUserRoleCodec=gE;exports.getUserRoleDecoder=Le;exports.getUserRoleEncoder=We;exports.getWalletAddressFromIndex=CL;exports.getWalletAddressFromSettings=Se;exports.getWhitelistedAddressTreeCodec=yP;exports.getWhitelistedAddressTreeDecoder=Bs;exports.getWhitelistedAddressTreeDiscriminatorBytes=gP;exports.getWhitelistedAddressTreeEncoder=em;exports.getWhitelistedAddressTreeFromIndex=Dn;exports.getWhitelistedAddressTreeIndexFromAddress=yL;exports.getWhitelistedAddressTreesAddress=Oi;exports.identifyMultiWalletAccount=YU;exports.identifyMultiWalletInstruction=XU;exports.initialize=VW;exports.isConfigAction=pD;exports.isMultiWalletError=sW;exports.isUserReadOnlyOrMutateArgs=dE;exports.migrateSettings=nB;exports.migrateUsers=uB;exports.nativeTransferIntent=Ak;exports.parseAddWhitelistedAddressTreesInstruction=LP;exports.parseChangeConfigCompressedInstruction=$P;exports.parseChangeConfigInstruction=zP;exports.parseCompressSettingsAccountInstruction=ih;exports.parseCreateDomainConfigInstruction=lh;exports.parseCreateDomainUserAccountInstruction=Rh;exports.parseCreateGlobalCounterInstruction=wh;exports.parseCreateMultiWalletCompressedInstruction=jh;exports.parseCreateUserAccountsInstruction=nR;exports.parseDecompressSettingsAccountInstruction=gR;exports.parseDisableDomainConfigInstruction=xR;exports.parseEditDomainConfigInstruction=vR;exports.parseEditTransactionManagerUrlInstruction=NR;exports.parseEditUserDelegateInstruction=qR;exports.parseMigrateCompressedSettingsInstruction=nb;exports.parseMigrateCompressedUsersInstruction=gb;exports.parseNativeTransferIntentCompressedInstruction=_b;exports.parseNativeTransferIntentInstruction=Cb;exports.parseSecp256r1VerifyInstruction=CB;exports.parseTokenTransferIntentCompressedInstruction=Xb;exports.parseTokenTransferIntentInstruction=Hb;exports.parseTransactionBufferCloseCompressedInstruction=pv;exports.parseTransactionBufferCloseInstruction=cv;exports.parseTransactionBufferCreateCompressedInstruction=Wv;exports.parseTransactionBufferCreateInstruction=Mv;exports.parseTransactionBufferExecuteCompressedInstruction=Xv;exports.parseTransactionBufferExecuteInstruction=Gv;exports.parseTransactionBufferExtendCompressedInstruction=y_;exports.parseTransactionBufferExtendInstruction=o_;exports.parseTransactionBufferVoteCompressedInstruction=__;exports.parseTransactionBufferVoteInstruction=C_;exports.parseTransactionExecuteCompressedInstruction=j_;exports.parseTransactionExecuteInstruction=N_;exports.parseTransactionExecuteSyncCompressedInstruction=AU;exports.parseTransactionExecuteSyncInstruction=rU;exports.pollJitoBundleConfirmation=yO;exports.prepareChangeConfigArgs=DN;exports.prepareTransactionBundle=_N;exports.prepareTransactionMessage=zN;exports.prepareTransactionSync=ZN;exports.retrieveTransactionManager=mO;exports.sendJitoBundle=XI;exports.serializeConfigActions=TO;exports.signAndSendBundledTransactions=AO;exports.signAndSendTransaction=gO;exports.tokenTransferIntent=Ik;exports.uninitialize=NW;exports.userReadOnlyOrMutateArgs=iE;exports.vaultTransactionMessageDeserialize=bi;exports.vaultTransactionMessageSerialize=Ri;exports.voteTransactionBuffer=Dd;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),programs=require('gill/programs'),Sd=require('bn.js'),tinyCbor=require('@levischuck/tiny-cbor'),nist_js=require('@noble/curves/nist.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Sd__default=/*#__PURE__*/_interopDefault(Sd);var Ln=new Uint8Array([201,232,212,229,59,241,106,197]);function dD(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ln)}function Bd(){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:Ln}))}function On(){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 uD(){return gill.combineCodec(Bd(),On())}function Bn(e){return gill.decodeAccount(e,On())}async function wn(e,n,r){let s=await wd(e,n,r);return gill.assertAccountExists(s),s}async function wd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Bn(s)}async function AD(e,n,r){let s=await kd(e,n,r);return gill.assertAccountsExist(s),s}async function kd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Bn(t))}function gD(){return 846}var Vn=new Uint8Array([42,206,176,58,175,129,130,233]);function pD(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Vn)}function Qd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Vn}))}function Hn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function TD(){return gill.combineCodec(Qd(),Hn())}function Gn(e){return gill.decodeAccount(e,Hn())}async function fD(e,n,r){let s=await $d(e,n,r);return gill.assertAccountExists(s),s}async function $d(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gn(s)}async function lD(e,n,r){let s=await eu(e,n,r);return gill.assertAccountsExist(s),s}async function eu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gn(t))}function SD(){return 24}function ur(){return gill.getStructEncoder([["memberKey",Q()],["permissions",he()],["userReadonlyArgs",be()]])}function Ar(){return gill.getStructDecoder([["memberKey",$()],["permissions",Re()],["userReadonlyArgs",ve()]])}function CD(){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 PD(){return gill.combineCodec(gr(),yr())}function Xe(){return gill.getStructEncoder([["treeInfo",$e()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function Qe(){return gill.getStructDecoder([["treeInfo",et()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function vD(){return gill.combineCodec(Xe(),Qe())}function tt(){return gill.getStructEncoder([["treeInfo",$e()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function rt(){return gill.getStructDecoder([["treeInfo",et()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function LD(){return gill.combineCodec(tt(),rt())}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 wD(){return gill.combineCodec(lr(),Sr())}function nt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(st())]])}function ee(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ot())]])}function HD(){return gill.combineCodec(nt(),ee())}function st(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(ct())],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function ot(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(at())],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function KD(){return gill.combineCodec(st(),ot())}function _e(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Dr())])]])],["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 Ue(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Cr())])]])],["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 ZD(){return gill.combineCodec(_e(),Ue())}function YD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function XD(e,n){return n.__kind===e}function Pr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",We()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Ae()]])}function hr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Le()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",ge()]])}function tC(){return gill.combineCodec(Pr(),hr())}function Dr(){return gill.getStructEncoder([["memberKey",Q()],["permissions",he()]])}function Cr(){return gill.getStructDecoder([["memberKey",$()],["permissions",Re()]])}function oC(){return gill.combineCodec(Dr(),Cr())}function it(){return gill.getStructEncoder([["memberKey",Q()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function dt(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function dC(){return gill.combineCodec(it(),dt())}function Rr(){return gill.getStructEncoder([["settingsMutArgs",w()],["transactionManager",gill.getOptionEncoder(Te())]])}function br(){return gill.getStructDecoder([["settingsMutArgs",k()],["transactionManager",gill.getOptionDecoder(fe())]])}function yC(){return gill.combineCodec(Rr(),br())}function ct(){return gill.getStructEncoder([["pubkey",Q()],["permissions",he()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function at(){return gill.getStructDecoder([["pubkey",$()],["permissions",Re()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function fC(){return gill.combineCodec(ct(),at())}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 xC(){return gill.combineCodec(Q(),$())}function Ur(){return gill.getStructEncoder([["authorityCreationArgs",Ae()],["compressedProofArgs",C()]])}function Wr(){return gill.getStructDecoder([["authorityCreationArgs",ge()],["compressedProofArgs",M()]])}function MC(){return gill.combineCodec(Ur(),Wr())}function ut(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function At(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function hC(){return gill.combineCodec(ut(),At())}function $e(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function et(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function vC(){return gill.combineCodec($e(),et())}function he(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Re(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function WC(){return gill.combineCodec(he(),Re())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(lr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function M(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Sr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function wC(){return gill.combineCodec(C(),M())}function Mr(){return gill.getStructEncoder([["memberKey",Q()],["userArgs",Lr()]])}function Er(){return gill.getStructDecoder([["memberKey",$()],["userArgs",Or()]])}function HC(){return gill.combineCodec(Mr(),Er())}function Br(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function gt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function zC(){return gill.combineCodec(Br(),gt())}function V(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function H(){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 jC(){return gill.combineCodec(V(),H())}function G(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",V()]])}function F(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",H()]])}function XC(){return gill.combineCodec(G(),F())}function yt(){return gill.getStructEncoder([["addressTreeInfo",ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function mt(){return gill.getStructDecoder([["addressTreeInfo",At()],["outputStateTreeIndex",gill.getU8Decoder()]])}function tM(){return gill.combineCodec(yt(),mt())}function pt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Tt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function sM(){return gill.combineCodec(pt(),Tt())}function w(){return gill.getStructEncoder([["accountMeta",Xe()],["data",nt()]])}function k(){return gill.getStructDecoder([["accountMeta",Qe()],["data",ee()]])}function iM(){return gill.combineCodec(w(),k())}function ft(){return gill.getStructEncoder([["accountMeta",tt()],["data",nt()]])}function lt(){return gill.getStructDecoder([["accountMeta",rt()],["data",ee()]])}function gM(){return gill.combineCodec(ft(),lt())}function St(){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(it()))]])}function xt(){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(dt()))]])}function TM(){return gill.combineCodec(St(),xt())}function It(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(gr())],["addressTableLookups",gill.getArrayEncoder(wr())]])}function Dt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(yr())],["addressTableLookups",gill.getArrayDecoder(kr())]])}function xM(){return gill.combineCodec(It(),Dt())}function wr(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function kr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function CM(){return gill.combineCodec(wr(),kr())}function Oe(){return gill.getStructEncoder([["member",Q()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",We()],["delegatedTo",gill.getOptionEncoder(pt())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function Z(){return gill.getStructDecoder([["member",$()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Le()],["delegatedTo",gill.getOptionDecoder(Tt())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function hM(){return gill.combineCodec(Oe(),Z())}function Ae(){return gill.getStructEncoder([["addressTreeInfo",ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ge(){return gill.getStructDecoder([["addressTreeInfo",At()],["outputStateTreeIndex",gill.getU8Decoder()]])}function _M(){return gill.combineCodec(Ae(),ge())}function Te(){return gill.getStructEncoder([["accountMeta",Xe()],["data",Oe()]])}function fe(){return gill.getStructDecoder([["accountMeta",Qe()],["data",Z()]])}function OM(){return gill.combineCodec(Te(),fe())}function be(){return gill.getStructEncoder([["accountMeta",tt()],["data",Oe()]])}function ve(){return gill.getStructDecoder([["accountMeta",rt()],["data",Z()]])}function NM(){return gill.combineCodec(be(),ve())}function Lr(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([be()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Te()])]])]])}function Or(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([ve()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([fe()])]])]])}function FM(){return gill.combineCodec(Lr(),Or())}function zM(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function KM(e,n){return n.__kind===e}var He=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(He||{});function We(){return gill.getEnumEncoder(He)}function Le(){return gill.getEnumDecoder(He)}function qM(){return gill.combineCodec(We(),Le())}var Is=new Uint8Array([223,179,163,190,177,224,67,173]);function OE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Is)}function iy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.fixEncoderSize(gill.getBytesEncoder(),16)],["members",gill.getArrayEncoder(ct(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),3)],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Is}))}function Ds(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.fixDecoderSize(gill.getBytesDecoder(),16)],["members",gill.getArrayDecoder(at(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),3)],["latestSlotNumber",gill.getU64Decoder()]])}function BE(){return gill.combineCodec(iy(),Ds())}function Cs(e){return gill.decodeAccount(e,Ds())}async function wE(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 Cs(s)}async function kE(e,n,r){let s=await dy(e,n,r);return gill.assertAccountsExist(s),s}async function dy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Cs(t))}function NE(){return 192}var Rs=new Uint8Array([90,36,35,219,93,225,110,96]);function FE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Rs)}function by(){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(it()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Rs}))}function bs(){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(dt()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function zE(){return gill.combineCodec(by(),bs())}function vs(e){return gill.decodeAccount(e,bs())}async function _s(e,n,r){let s=await vy(e,n,r);return gill.assertAccountExists(s),s}async function vy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return vs(s)}async function KE(e,n,r){let s=await _y(e,n,r);return gill.assertAccountsExist(s),s}async function _y(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>vs(t))}var Ls=new Uint8Array([105,23,173,2,197,255,80,87]);function qE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ls)}function Zy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Ls}))}function Os(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function ZE(){return gill.combineCodec(Zy(),Os())}function Bs(e){return gill.decodeAccount(e,Os())}async function ws(e,n,r){let s=await Yy(e,n,r);return gill.assertAccountExists(s),s}async function Yy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Bs(s)}async function YE(e,n,r){let s=await Xy(e,n,r);return gill.assertAccountsExist(s),s}async function Xy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Bs(t))}function m({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function Ns(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function J(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 p(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:J(r.value),role:ks(r.value)?gill.upgradeRoleToSigner(s):s,...ks(r.value)?{signer:r.value}:{}})}}function ks(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Hs=new Uint8Array([8]);function yP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hs)}function Xr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Hs}))}function Gs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function mP(){return gill.combineCodec(Xr(),Gs())}async function Fs(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Xr().encode(c),programAddress:r})}function pP(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Xr().encode(c),programAddress:r})}function TP(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:Gs().decode(e.data)}}var Zs=new Uint8Array([9]);function CP(){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(_e())],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["compressedProofArgs",gill.getOptionEncoder(C())]]),e=>({...e,discriminator:Zs}))}function Ys(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(Ue())],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["compressedProofArgs",gill.getOptionDecoder(M())]])}function MP(){return gill.combineCodec(Qr(),Ys())}async function Xs(e,n){let r=n?.programAddress??d,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(Ns(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(J(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=m(a),o=p(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 EP(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 PP(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ys().decode(e.data)}}var ro=new Uint8Array([20]);function WP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ro)}function no(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(_e())],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:ro}))}function so(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Ue())],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function LP(){return gill.combineCodec(no(),so())}function oo(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:no().encode(c),programAddress:r})}function OP(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:so().decode(e.data)}}var io=new Uint8Array([17]);function GP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(io)}function uo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["settingsMutArgs",w()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:io}))}function Ao(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",k()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function FP(){return gill.combineCodec(uo(),Ao())}function go(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:uo().encode(c),programAddress:r})}function zP(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ao().decode(e.data)}}var xo=new Uint8Array([0]);function XP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xo)}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",Ae()],["compressedProofArgs",C()]]),e=>({...e,discriminator:xo}))}function Io(){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",ge()],["compressedProofArgs",M()]])}function QP(){return gill.combineCodec(en(),Io())}async function Do(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 $P(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 eh(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:Io().decode(e.data)}}var Mo=new Uint8Array([4]);function ah(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function rn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",Br()],["role",We()],["userAccountCreationArgs",Ae()],["linkWalletArgs",gill.getOptionEncoder(Rr())]]),e=>({...e,discriminator:Mo}))}function Eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["member",gt()],["role",Le()],["userAccountCreationArgs",ge()],["linkWalletArgs",gill.getOptionDecoder(br())]])}function ih(){return gill.combineCodec(rn(),Eo())}async function Po(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 dh(e,n){let r=n?.programAddress??d,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=m({args:c}),o=p(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 uh(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:Eo().decode(e.data)}}var Ro=new Uint8Array([3]);function Th(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ro}))}function bo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function fh(){return gill.combineCodec(sn(),bo())}async function vo(e,n){let r=n?.programAddress??d,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=m(c),i=p(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:sn().encode({}),programAddress:r})}function lh(e,n){let r=n?.programAddress??d,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=m(c),i=p(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:sn().encode({}),programAddress:r})}function Sh(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:bo().decode(e.data)}}var Wo=new Uint8Array([19]);function Ph(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wo)}function on(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["settingsCreation",yt()],["userReadonlyArgs",be()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Wo}))}function Lo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["settingsCreation",mt()],["userReadonlyArgs",ve()],["settingsIndex",gill.getU128Decoder()]])}function hh(){return gill.combineCodec(on(),Lo())}async function Oo(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:on().encode(c),programAddress:r})}function Rh(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:on().encode(c),programAddress:r})}function bh(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Lo().decode(e.data)}}var wo=new Uint8Array([5]);function Bh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wo)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(Pr())]]),e=>({...e,discriminator:wo}))}function ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayDecoder(hr())]])}function wh(){return gill.combineCodec(an(),ko())}async function No(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:an().encode(c),programAddress:r})}function kh(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:an().encode(c),programAddress:r})}function Nh(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:ko().decode(e.data)}}var Go=new Uint8Array([18]);function Jh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Go)}function Fo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",w()],["compressedProofArgs",C()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:Go}))}function zo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",k()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function jh(){return gill.combineCodec(Fo(),zo())}function Ko(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Fo().encode(c),programAddress:r})}function qh(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:zo().decode(e.data)}}var qo=new Uint8Array([2]);function eR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qo)}function Zo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:qo}))}function Yo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function tR(){return gill.combineCodec(Zo(),Yo())}function Xo(e,n){let r=n?.programAddress??d,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...i],data:Zo().encode(c),programAddress:r})}function rR(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 tc=new Uint8Array([1]);function dR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tc)}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:tc}))}function rc(){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 uR(){return gill.combineCodec(un(),rc())}async function AR(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 nc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 gR(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:rc().decode(e.data)}}var cc=new Uint8Array([6]);function SR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(cc)}function ac(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Te()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",C()]]),e=>({...e,discriminator:cc}))}function ic(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",fe()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",M()]])}function xR(){return gill.combineCodec(ac(),ic())}function dc(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:ac().encode(c),programAddress:r})}function IR(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:ic().decode(e.data)}}var gc=new Uint8Array([7]);function RR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gc)}function yc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Te()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["delegateTo",gill.getOptionEncoder(pt())],["oldSettingsMutArgs",gill.getOptionEncoder(w())],["newSettingsMutArgs",gill.getOptionEncoder(w())],["compressedProofArgs",C()]]),e=>({...e,discriminator:gc}))}function mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",fe()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["delegateTo",gill.getOptionDecoder(Tt())],["oldSettingsMutArgs",gill.getOptionDecoder(k())],["newSettingsMutArgs",gill.getOptionDecoder(k())],["compressedProofArgs",M()]])}function bR(){return gill.combineCodec(yc(),mc())}function pc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:yc().encode(c),programAddress:r})}function vR(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:mc().decode(e.data)}}var lc=new Uint8Array([33]);function wR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lc)}function Sc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",st()],["compressedProofArgs",C()],["settingsCreationArgs",yt()]]),e=>({...e,discriminator:lc}))}function xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ot()],["compressedProofArgs",M()],["settingsCreationArgs",mt()]])}function kR(){return gill.combineCodec(Sc(),xc())}function Ic(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:Sc().encode(c),programAddress:r})}function NR(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:xc().decode(e.data)}}var Mc=new Uint8Array([32]);function JR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mc)}function Ec(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Oe()],["compressedProofArgs",C()],["userCreationArgs",Ae()]]),e=>({...e,discriminator:Mc}))}function Pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Z()],["compressedProofArgs",M()],["userCreationArgs",ge()]])}function jR(){return gill.combineCodec(Ec(),Pc())}function hc(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=p(r);return Object.freeze({accounts:[o(t.authority),...i],data:Ec().encode(c),programAddress:r})}function qR(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:Pc().decode(e.data)}}var bc=new Uint8Array([30]);function tb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bc)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:bc}))}function vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function rb(){return gill.combineCodec(An(),vc())}async function nb(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(J(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(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 _c(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=p(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 sb(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===d?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 Lc=new Uint8Array([28]);function Ab(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Lc)}function Oc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Lc}))}function Bc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function gb(){return gill.combineCodec(Oc(),Bc())}function wc(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Oc().encode(c),programAddress:r})}function yb(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Bc().decode(e.data)}}var Nc=new Uint8Array([31]);function xb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Nc)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:Nc}))}function Vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function Ib(){return gill.combineCodec(yn(),Vc())}async function Db(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},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(J(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(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=m(a),o=p(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??d,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},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=m(a),o=p(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 Cb(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===d?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:Vc().decode(e.data)}}var Kc=new Uint8Array([29]);function vb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Kc)}function mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Kc}))}function Jc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function _b(){return gill.combineCodec(mn(),Jc())}async function Ub(e,n){let r=n?.programAddress??d,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(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=m(a),o=p(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??d,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=m(a),o=p(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 Wb(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===d?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:Jc().decode(e.data)}}var Yc=new Uint8Array([13]);function Vb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yc)}function Xc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:Yc}))}function Qc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function Hb(){return gill.combineCodec(Xc(),Qc())}function $c(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=p(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:Xc().encode(c),programAddress:r})}function Gb(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:Qc().decode(e.data)}}var ra=new Uint8Array([24]);function Zb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ra)}function na(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:ra}))}function sa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function Yb(){return gill.combineCodec(na(),sa())}function oa(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:na().encode(c),programAddress:r})}function Xb(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:sa().decode(e.data)}}var ia=new Uint8Array([10]);function sv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ia)}function da(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",St()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:ia}))}function ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",xt()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function ov(){return gill.combineCodec(da(),ua())}function Aa(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:da().encode(c),programAddress:r})}function cv(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===d?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:ua().decode(e.data)}}var ma=new Uint8Array([21]);function yv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ma)}function pa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",St()],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",ft()],["compressedProofArgs",C()]]),e=>({...e,discriminator:ma}))}function Ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",xt()],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsReadonlyArgs",lt()],["compressedProofArgs",M()]])}function mv(){return gill.combineCodec(pa(),Ta())}function fa(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:pa().encode(c),programAddress:r})}function pv(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Ta().decode(e.data)}}var xa=new Uint8Array([14]);function Dv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xa)}function Ia(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:xa}))}function Da(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function Cv(){return gill.combineCodec(Ia(),Da())}function Ca(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=p(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:Ia().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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Da().decode(e.data)}}var Pa=new Uint8Array([25]);function _v(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pa)}function ha(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Pa}))}function Ra(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function Uv(){return gill.combineCodec(ha(),Ra())}function ba(e,n){let r=n?.programAddress??d,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=m(a),o=p(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 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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ra().decode(e.data)}}var Ua=new Uint8Array([12]);function Nv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ua)}function Wa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Ua}))}function La(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Vv(){return gill.combineCodec(Wa(),La())}function Oa(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:Wa().encode(c),programAddress:r})}function Hv(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:La().decode(e.data)}}var ka=new Uint8Array([23]);function jv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ka)}function Na(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ka}))}function Va(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function qv(){return gill.combineCodec(Na(),Va())}function Ha(e,n){let r=n?.programAddress??d,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:Na().encode(c),programAddress:r})}function Zv(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:Va().decode(e.data)}}var za=new Uint8Array([11]);function r_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(za)}function Ka(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())]]),e=>({...e,discriminator:za}))}function Ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())]])}function n_(){return gill.combineCodec(Ka(),Ja())}function ja(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Ka().encode(c),programAddress:r})}function s_(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ja().decode(e.data)}}var Ya=new Uint8Array([22]);function A_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ya)}function Xa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(V())],["settingsReadonlyArgs",ft()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Ya}))}function Qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(H())],["settingsReadonlyArgs",lt()],["compressedProofArgs",M()]])}function g_(){return gill.combineCodec(Xa(),Qa())}function $a(e,n){let r=n?.programAddress??d,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=m(a),o=p(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:Xa().encode(c),programAddress:r})}function y_(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Qa().decode(e.data)}}var ri=new Uint8Array([15]);function S_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function ni(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:ri}))}function si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function x_(){return gill.combineCodec(ni(),si())}function oi(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=m({}),i=p(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:ni().encode({}),programAddress:r})}function I_(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:si().decode(e.data)}}var ii=new Uint8Array([26]);function h_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ii)}function di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ii}))}function ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function R_(){return gill.combineCodec(di(),ui())}function Ai(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:di().encode(c),programAddress:r})}function b_(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:ui().decode(e.data)}}var mi=new Uint8Array([16]);function B_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mi)}function pi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",It()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())]]),e=>({...e,discriminator:mi}))}function Ti(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())]])}function w_(){return gill.combineCodec(pi(),Ti())}function fi(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:pi().encode(c),programAddress:r})}function k_(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ti().decode(e.data)}}var xi=new Uint8Array([27]);function K_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xi)}function Ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",It()],["secp256r1VerifyArgs",gill.getArrayEncoder(G())],["settingsMutArgs",w()],["compressedProofArgs",C()]]),e=>({...e,discriminator:xi}))}function Di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayDecoder(F())],["settingsMutArgs",k()],["compressedProofArgs",M()]])}function J_(){return gill.combineCodec(Ii(),Di())}function Ci(e,n){let r=n?.programAddress??d,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=m(a),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ii().encode(c),programAddress:r})}function j_(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===d?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Di().decode(e.data)}}var d="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",hS=(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))(hS||{});function UU(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 RS=(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))(RS||{});function WU(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 vS=6e3,_S=6001,US=6002,WS=6003,LS=6004,OS=6005,BS=6006,wS=6007,kS=6008,NS=6009,VS=6010,HS=6011,GS=6012,FS=6013,zS=6014,KS=6015,JS=6016,jS=6017,qS=6018,ZS=6019,YS=6020,XS=6021,QS=6022,$S=6023,ex=6024,tx=6025,rx=6026,nx=6027,sx=6028,ox=6029,cx=6030,ax=6031,ix=6032,dx=6033,ux=6034,Ax=6035,gx=6036,yx=6037,mx=6038,px=6039,Tx=6040,fx=6041,lx=6042,Sx=6043,xx=6044,Ix=6045,Dx=6046,Cx=6047,Mx=6048,Ex=6049,Px=6050,hx=6051,Rx=6052,bx=6053,vx=6054,Mi;process.env.NODE_ENV!=="production"&&(Mi={[cx]:"This member is already delegated to another wallet.",[wS]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[Px]:"The domain configuration account is disabled. Please contact support or try again later.",[hx]:"Missing domain configuration account.",[VS]:"Duplicate public keys detected among members. Each member must have a unique key.",[NS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[YS]:"No members provided. A multisig wallet must contain at least one member.",[qS]:"Expected a User with Administrator role for this instruction.",[kS]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[JS]:"Expected a User with Transaction Manager role for this instruction.",[px]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Tx]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[fx]:"Declared buffer size does not match the actual serialized size.",[dx]:"Not enough members with vote permission to meet the approval threshold.",[ax]:"At least one signer with execute permission is required to proceed.",[ix]:"At least one signer with initiate permission is required to perform this action.",[tx]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[vx]:"Address Tree supplied is not part of the whitelisted address trees",[ZS]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[nx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[mx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[ux]:"Only delegated members are allowed for this transaction.",[ex]:"Unexpected number of accounts provided for this instruction.",[FS]:"User with Permanent Member role requires a must have a delegated wallet.",[_S]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[LS]:"The extracted public key has an invalid length or encoding.",[vS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[WS]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Ex]:"The specified slot number is not recent.",[Cx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[QS]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[jS]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[KS]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[$S]:"Malformed transaction message: structure or formatting does not match the expected layout.",[rx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[OS]:"The extracted WebAuthn signed message payload is malformed.",[Ix]:"An input string exceeds the maximum allowed character length.",[Rx]:"This member is not registered under the provided domain configuration.",[sx]:"A required account is missing from the instruction context.",[ox]:"User mutation arguments are required when performing add or remove delegate operations.",[Dx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[gx]:"No valid signer found in this transaction.",[GS]:"Only one permanent member is allowed per wallet.",[zS]:"Only one transaction manager is allowed per wallet.",[bx]:"The given origin index is not in the whitelisted origins.",[HS]:"Permanent members cannot be removed from a wallet.",[xx]:"Writable CPI calls to protected accounts are not permitted.",[BS]:"The rpIdHash extracted from the signed message does not match the expected value.",[US]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Mx]:"The specified slot number was not found in the provided slot history.",[XS]:"Too many members: a maximum of 4 members are supported.",[lx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Sx]:"This transaction has not yet reached the required approval threshold.",[yx]:"Only the transaction creator or rent payer may close this transaction buffer.",[Ax]:"Member is not part of the expected signers for this transaction."});function NU(e){return process.env.NODE_ENV!=="production"?Mi[e]:"Error message not available in production bundles."}function VU(e,n,r){return gill.isProgramError(e,n,d,r)}async function XU({admin:e,addressTree:n}){return Fs({payer:e,addressTree:n,remainingAccounts:[]})}var ht={Ed25519:1,Secp256r1:2};var le={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Ie=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(le).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var fn=33,De=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()}},E=class extends De{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 Wx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Lx(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Pi=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Wx())],["addressTableLookups",gill.getArrayCodec(Lx())]]);function hi(e){return Pi.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 Ri(e){let n=Pi.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:d,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var j={};function bi(){if(!j.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return j.solanaRpcEndpoint}function Rt(){if(!j.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return j.lightProtocolRpc}function re(){if(!j.solanaRpc)throw new Error("Rpc is not initialized yet");return j.solanaRpc}function vi(){if(!j.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return j.sendAndConfirm}function _i(){if(!j.computeEstimate)throw new Error("Rpc is not initialized yet");return j.computeEstimate}function Sn(){return j.jitoTipsConfig?j.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 IW(){Object.keys(j).forEach(e=>{j[e]=void 0;});}function DW({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){j.solanaRpcEndpoint=e,j.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});j.solanaRpc=t,j.sendAndConfirm=c,j.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),j.jitoTipsConfig=s??null;}var L=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(d.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=await Rt().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,u=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=u);}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 Rt().getCompressedAccount(e);return s&&n?.set(e.toString(),s),s}}async function ye(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 v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function se(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:u.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((u,A)=>({addressTreeInfo:a[A],outputStateTreeIndex:i,address:u.address,type:u.type}))}function oe(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 ce(e,n,r,s,t){let c=null,a=null,i=null,o=new L;if(e){await o.addSystemAccounts();let{address:u}=await ne(n,r),A=(await ye([{address:u,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[A.leafIndex],leaves:[],treeInfos:[A.treeInfo],proveByIndices:[A.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await z([A],[]);let g=o.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:A.hash}],[]).stateTrees;if(!g)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(A.address),treeInfo:g.packedTreeInfos[0]},data:ee().decode(A.data?.data)},a={accountMeta:{address:new Uint8Array(A.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:ee().decode(A.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:o,settingsMutArgs:a}}async function z(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Rt().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 pe(){return (await er()).length-1}var xn;async function er(){if(!xn){let{data:e}=await ws(re(),await Li());xn=e.whitelistedAddressTrees;}return xn}async function tr(e,n,r){let s=await Kx(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function Kx(e,n,r){let{address:s}=await O(e,n),t=await $t(s,r);return t?.data?.data?Z().decode(t.data.data):null}async function In(e,n,r){let s=await Jx(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function Jx(e,n,r){try{let{address:s}=await ne(e,n),t=await $t(s,r);if(!t?.data?.data)throw new Error("No compressed settings account found.");let c=ee().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 Y(e));return s.exists?{...s.data,index:gill.getU128Decoder().decode(s.data.index),members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function Dn(e){let n=await er();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function KW(e){let r=(await er()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function ne(e,n=0){let r=await Dn(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(d)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function O(e,n=0){let r=await Dn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof De?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(d.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function ze({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:d,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function Ni(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Li(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Vi(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof De?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Se(e){let[n]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function Y(e){let[n]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function eL(e){let n=await Y(e);return await Se(n)}async function tL(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,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 Yx(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 Gi(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 Fi(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 zi(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let I=n&127;r+=I;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let a=e[r+1],i=r+2,o=e.slice(i,i+a),u=c[0]===0&&c.length>32?c.slice(1):c,A=o[0]===0&&o.length>32?o.slice(1):o;if(u.length>32||A.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(u,32-u.length);let y=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+nr(A)),P=(f>y?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),S=Yx(P);return new Uint8Array([...g,...S])}function sr(e){return new Uint8Array([...new Uint8Array(Me(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Me(e.response.clientDataJSON)))])}function lL(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 SL(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 xL(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Me(n)),c=JSON.parse(new TextDecoder().decode(Me(r))),a=Gi(c),i=zi(new Uint8Array(Me(s))),o=await ze({rpIdHash:t.subarray(0,32)});return new E(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Me(r)),truncatedClientDataJson:a,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:Cn(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 IL(e,n){let{data:r}=await wn(re(),e),t=Fi(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 Cn(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function DL(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function CL(e){return Mn(e.data.payload.authResponse)}function ML(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...Cn(n,r,s)]))}async function EL(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 u=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(u.subarray(8,16)).toString(),a=u.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(Me(e.transactionMessageBytes)):e.transactionMessageBytes),...a,...Cn(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:i}}function Mn(e){return sha2_js.sha256(sr(e))}function PL(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Me(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,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 Zi(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 Yi(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 N(e,n=0){let r=e instanceof E?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 Je(e){if(e instanceof De)return {keyType:ht.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:ht.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function qi(e){return e instanceof E?e.toString():e.address.toString()}function ae(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 E).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function Xi({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 FL(e){let n=await En(e,true),r=await Yi(n.map(gill.getBase64EncodedWireTransaction),bi()),s=await En(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await WI(s.map(gill.getBase64EncodedWireTransaction))}async function zL({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([_i()(c),Zi(re(),c.instructions.flatMap(u=>u.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 vi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function WI(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 KL(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(u=>setTimeout(u,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 u=o.value[0];if(u.confirmation_status==="confirmed"||u.confirmation_status==="finalized")return u.transactions[u.transactions.length-1]}if(c<n){await new Promise(u=>setTimeout(u,r));continue}}throw new Error("Failed to get bundle status after retries.")}function JL(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=>$i(i.pubkey)===e)??{};if(!r)throw new Error("No permissions found for the current member.");let s=Ie.has(r,le.InitiateTransaction),t=Ie.has(r,le.VoteTransaction),c=Ie.has(r,le.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($i(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function jL({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 LI(n,c.transactionManagerUrl.value,e,s)}function LI(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 $i(e){return e.keyType===ht.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function qL(e){let n=e.map(c=>_e().encode(c)),r=4+n.reduce((c,a)=>c+a.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function ZL(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let a=Ue().read(e,n);t[c]=a[0],n=a[1];}if(n!==e.length)throw new Error(`Trailing bytes: ${e.length-n}`);return t}async function uO({payer:e,rpId:n,origins:r,authority:s}){let t=await ze({rpId:n}),c=new L;await c.addSystemAccounts();let a=await pe(),{address:i,addressTree:o}=await O(s.address,a),u=[{address:i,tree:o,queue:o,type:"User"}],A=await z([],u),g=(await se(c,A.treeInfos,A.roots,A.rootIndices,u))[0],{remainingAccounts:y,systemOffset:f}=c.toAccountMetas(),l=v(A,f);return await Do({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:l,payer:e,domainConfig:t,rpId:n,remainingAccounts:y})}async function xO({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[];r.index&&(a.push({address:(await ne(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await O(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await ye(a,t):[],o=await pe(),{address:u,addressTree:A}=await O(r.member,o),g=[{address:u,type:"User",tree:A,queue:A}],y=await z(i,g),f=null,l=null,P=i.filter(U=>U.type==="Settings"),S=i.filter(U=>U.type==="User");P.length&&(f=oe(c,y.treeInfos.slice(0,1),y.leafIndices.slice(0,1),y.rootIndices.slice(0,1),y.proveByIndices.slice(0,1),P,ee())[0]),S.length&&(l=oe(c,y.treeInfos.slice(1,2),y.leafIndices.slice(1,2),y.rootIndices.slice(1,2),y.proveByIndices.slice(1,2),S,Z())[0]);let I=await se(c,y.treeInfos.slice(i.length),y.roots.slice(i.length),y.rootIndices.slice(i.length),g),{remainingAccounts:D,systemOffset:x}=c.toAccountMetas(),_=v(y,x);return await Po({payer:n,authority:e,compressedProofArgs:_,member:gt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:l?gill.some(l):gill.none()}):gill.none(),userAccountCreationArgs:I[0],domainConfig:s,remainingAccounts:D})}async function MO({payer:e}){let n=await Ni();return vo({payer:e,globalCounter:n})}async function RO({admin:e,rpId:n,disable:r}){let s=await ze({rpId:n});return Xo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function OO({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await ne(r,s),i=[{address:c,tree:a,queue:a,type:"Settings"}],o=await z([],i),u=(await se(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return Ic({compressedProofArgs:y,args:e,authority:n,settingsCreationArgs:u,remainingAccounts:A})}async function GO({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await O(r,s),i=[{address:c,tree:a,queue:a,type:"User"}],o=await z([],i),u=(await se(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return hc({compressedProofArgs:y,args:e,authority:n,userCreationArgs:u,remainingAccounts:A})}var je=33,qe=64,vn=14,HI=2,GI=gill.address("Secp256r1SigVerify1111111111111111111111111");function FI(){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 zI(){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 od(){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=zI();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=vn;let a=[];for(let i=0;i<r;i++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),je).decode(e,n);n+=je;let u=gill.fixDecoderSize(gill.getBytesDecoder(),qe).decode(e,n);n+=qe;let A=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,a.push({publicKey:o,signature:u,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function cd(){return gill.createEncoder({getSizeFromValue:e=>{let n=vn*e.offsets.length,r=e.payload.reduce((s,t)=>s+je+qe+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=FI();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),je).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),qe).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function $O(){return gill.combineCodec(cd(),od())}function B(e,n){let r=e.length,s=HI+r*vn,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],A=s,g=A+je,y=g+qe;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:y,messageDataSize:u.length,messageInstructionIndex:65535}),s+=je+qe+u.length;}let c=n?.programAddress??GI,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:cd().encode(a)}}function eB(e){return {programAddress:e.programAddress,accounts:{},data:od().decode(e.data)}}async function dB({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=await Y(e),{packedAccounts:a,proof:i,settingsMutArgs:o}=await ce(true,e,n,false,t);if(!o)throw new Error("Proof args is missing");let u=ae(s),A=u.filter(I=>I instanceof E),g=[],y=[];for(let I of A){let D=g.length,{domainConfig:x,verifyArgs:_,signature:U,publicKey:K,message:W}=N(I,D);W&&U&&K&&g.push({message:W,signature:U,publicKey:K}),x&&(a.addPreAccounts([{address:x,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&y.push({domainConfigKey:x,verifyArgs:_.value}));}a.addPreAccounts(u.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:f,systemOffset:l}=a.toAccountMetas(),P=v(i,l),S=[];return g.length>0&&S.push(B(g)),S.push(go({settings:c,settingsMutArgs:o,compressedProofArgs:P,payer:r,secp256r1VerifyArgs:y,remainingAccounts:f})),S}async function fB({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:a,proof:i,settingsMutArgs:o}=r,u=ae(e),A=u.filter(D=>!(D instanceof E));a.addPreAccounts(A.map(D=>({address:D.address,role:gill.AccountRole.READONLY_SIGNER,signer:D})));let g=u.filter(D=>D instanceof E),y=[],f=[];for(let D of g){let x=f.length,{domainConfig:_,verifyArgs:U,signature:K,publicKey:W,message:q}=N(D,x);q&&K&&W&&f.push({message:q,signature:K,publicKey:W}),_&&(a.addPreAccounts([{address:_,role:gill.AccountRole.READONLY}]),U?.__option==="Some"&&y.push({domainConfigKey:_,verifyArgs:U.value}));}let{remainingAccounts:l,systemOffset:P}=a.toAccountMetas(),S=v(i,P),I=[];if(f.length>0&&I.push(B(f)),c){if(!o)throw new Error("Payer not found or proof args is missing.");I.push(oo({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:o,remainingAccounts:l,secp256r1VerifyArgs:y}));}else I.push(await Xs({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:l,secp256r1VerifyArgs:y}));return I}async function MB({createUserArgs:e,payer:n}){let r=new L;await r.addSystemAccounts(),r.addPreAccounts(e.map(A=>({address:A.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:A.member})));let s=await pe(),t=await Promise.all(e.map(async A=>{let{address:g,addressTree:y}=await O(A.member.address,s);return {address:g,tree:y,queue:y,type:"User"}})),c=await z([],t),a=await se(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:o}=r.toAccountMetas(),u=v(c,o);return await No({compressedProofArgs:u,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 _B({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let a=new L;await a.addSystemAccounts();let i=await pe(),{address:o,addressTree:u}=await O(r.address,i),A=[{address:o,tree:u,queue:u,type:"User"}],g=await z([],A),y=(await se(a,g.treeInfos,g.roots,g.rootIndices,A))[0],f=a.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(g,f.systemOffset),authorityCreationArgs:y};}return nc({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function wB({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new L;await s.addSystemAccounts();let t=await ye([{address:(await O(e.address,n)).address,type:"User"}]),c=await z(t,[]),a=oe(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,Z())[0],{remainingAccounts:i,systemOffset:o}=s.toAccountMetas(),u=v(c,o);return dc({authority:e,transactionManagerUrl:r,compressedProofArgs:u,userMutArgs:a,remainingAccounts:i})}async function jB({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:u}=N(n),A=[];i&&o&&u&&A.push({message:i,signature:o,publicKey:u});let g=await tr(n instanceof E?n:n.address,r,t),y=[];y.push({address:(await O(n instanceof E?n:n.address,r)).address,type:"User"});let f,l=null,P,S=null;g.delegatedTo.__option==="Some"&&((await In(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await ne(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),l={start:y.length-1,end:y.length}):f=await Y(g.delegatedTo.value.index)),s&&((await In(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(y.push({address:(await ne(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:y.length-1,end:y.length}):P=await Y(s.index));let I=new L;await I.addSystemAccounts();let D=await ye(y,t),x=await z(D,[]),_=oe(I,x.treeInfos.slice(0,1),x.leafIndices.slice(0,1),x.rootIndices.slice(0,1),x.proveByIndices.slice(0,1),D.slice(0,1),Z())[0],U=l?gill.some(oe(I,x.treeInfos.slice(l.start,l.end),x.leafIndices.slice(l.start,l.end),x.rootIndices.slice(l.start,l.end),x.proveByIndices.slice(l.start,l.end),D.slice(l.start,l.end),ee())[0]):gill.none(),K=S?gill.some(oe(I,x.treeInfos.slice(S.start,S.end),x.leafIndices.slice(S.start,S.end),x.rootIndices.slice(S.start,S.end),x.proveByIndices.slice(S.start,S.end),D.slice(S.start,S.end),ee())[0]):gill.none(),{remainingAccounts:W,systemOffset:q}=I.toAccountMetas(),te=v(x,q),de=[];return A.length>0&&de.push(B(A)),de.push(pc({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof E?void 0:n,oldSettings:f,oldSettingsMutArgs:U,newSettings:P,newSettingsMutArgs:K,compressedProofArgs:te,userMutArgs:_,remainingAccounts:W})),de}async function cw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[],i=[];i.push(...await ye([{address:(await O(r.address,s)).address,type:"User"}],t));let o=await pe(),{address:u,addressTree:A}=await ne(e,o);a.push({address:u,queue:A,tree:A,type:"Settings"});let g=i.length,y=await z(i,a),f=oe(c,y.treeInfos.slice(0,g),y.leafIndices.slice(0,g),y.rootIndices.slice(0,g),y.proveByIndices.slice(0,g),i.filter(_=>_.type==="User"),Z())[0],P=(await se(c,y.treeInfos.slice(g),y.roots.slice(g),y.rootIndices.slice(g),a)).find(_=>_.type==="Settings")??null,{remainingAccounts:S,systemOffset:I}=c.toAccountMetas(),D=v(y,I),x=[];if(!P)throw new Error("Settings creation args is missing.");return x.push(await Oo({settingsIndex:e,payer:n,initialMember:r,userReadonlyArgs:f,compressedProofArgs:D,settingsCreation:P,remainingAccounts:S})),x}async function pw({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:a,settingsMutArgs:i}=await ce(true,e,n,false,t);if(!i)throw new Error("Proof args is missing");let o=ae(s),u=o.filter(I=>I instanceof E),A=[],g=[];for(let I of u){let D=A.length,{domainConfig:x,verifyArgs:_,signature:U,publicKey:K,message:W}=N(I,D);W&&U&&K&&A.push({message:W,signature:U,publicKey:K}),x&&(c.addPreAccounts([{address:x,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&g.push({domainConfigKey:x,verifyArgs:_.value}));}c.addPreAccounts(o.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:y,systemOffset:f}=c.toAccountMetas(),l=v(a,f),P=[];A.length>0&&P.push(B(A));let S=await Y(e);return P.push(Ko({settings:S,payer:r,settingsMutArgs:i,compressedProofArgs:l,secp256r1VerifyArgs:g,remainingAccounts:y})),P}function ZI(e,n,r,s){let t=YI(e,n),c=XI(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 YI(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 XI(e,n){return n<e.header.numSignerAccounts}async function cr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ri(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:ZI(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 u of i.writableIndexes){let A=o[u];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:A,role:gill.AccountRole.WRITABLE});}for(let u of i.readonlyIndexes){let A=o[u];if(!A)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:A,role:gill.AccountRole.READONLY});}}for(let i of s?.filter(o=>o.address!==e)??[]){let o=a.findIndex(u=>u.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 ud({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let u=await Se(e),{accountMetas:A,addressLookupTableAccounts:g}=await cr({transactionMessageBytes:r,walletAddress:u,additionalSigners:a,addressesByLookupTableAddress:t}),y=[];return c.length>0&&y.push(B(c)),y.push(o?Ai({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):oi({transactionBuffer:n,payer:s.address,settings:e})),i&&y.push(Xi({payer:s,tipAmount:i})),{instructions:y,addressLookupTableAccounts:g}}async function Ad({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:a=[],compressed:i=false,simulateProof:o=false,cachedAccounts:u}){let A=ae(s),g=await Y(e),y=await Se(g),[{accountMetas:f,addressLookupTableAccounts:l,transactionMessage:P},{settingsMutArgs:S,proof:I,packedAccounts:D}]=await Promise.all([cr({transactionMessageBytes:r,walletAddress:y,additionalSigners:A.filter(te=>!(te instanceof E)),addressesByLookupTableAddress:c}),ce(i,e,n,o,u)]);D.addPreAccounts(f);let x=A.filter(te=>te instanceof E),_=[];for(let te of x){let de=a.length,{domainConfig:me,verifyArgs:Ee,signature:Pe,publicKey:xe,message:_t}=N(te,de);_t&&Pe&&xe&&a.push({message:_t,signature:Pe,publicKey:xe}),me&&(D.addPreAccounts([{address:me,role:gill.AccountRole.READONLY}]),Ee?.__option==="Some"&&_.push({domainConfigKey:me,verifyArgs:Ee.value}));}let{remainingAccounts:U,systemOffset:K}=D.toAccountMetas(),W=[];a.length>0&&W.push(B(a));let q=$I(P,f);if(i){if(!t||!S)throw new Error("Payer not found or proof args is missing.");let te=v(I,K);W.push(Ci({secp256r1VerifyArgs:_,transactionMessage:q,settingsMutArgs:S,compressedProofArgs:te,payer:t,remainingAccounts:U}));}else W.push(fi({secp256r1VerifyArgs:_,settings:g,transactionMessage:q,remainingAccounts:U}));return {instructions:W,addressLookupTableAccounts:l}}function $I(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 Fw({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let o=ae(s),u=await Y(e),A=await Se(u),{packedAccounts:g,proof:y,settingsMutArgs:f}=await ce(i,e,n,false,t),l=[],P=[];for(let x of o)if(x instanceof E){let _=l.length,{domainConfig:U,verifyArgs:K,signature:W,publicKey:q,message:te}=N(x,_);te&&W&&q&&l.push({message:te,signature:W,publicKey:q}),U&&(g.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),K?.__option==="Some"&&P.push({domainConfigKey:U,verifyArgs:K.value}));}else g.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:S,systemOffset:I}=g.toAccountMetas(),D=[];if(l.length>0&&D.push(B(l)),i){if(!a||!f)throw new Error("Payer not found or proof args is missing.");let x=v(y,I);D.push(wc({amount:c,settingsMutArgs:f,compressedProofArgs:x,payer:a,secp256r1VerifyArgs:P,source:A,destination:r,remainingAccounts:S}));}else D.push(_c({amount:c,secp256r1VerifyArgs:P,source:A,destination:r,settings:u,remainingAccounts:S}));return D}async function $w({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:o,createAtaIfNeeded:u=true,compressed:A=false}){let g=ae(t),y=await Y(e),f=await Se(y),[l,P]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,f,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{packedAccounts:S,proof:I,settingsMutArgs:D}=await ce(A,e,n,false,c),x=[],_=[];for(let q of g)if(q instanceof E){let te=x.length,{domainConfig:de,verifyArgs:me,signature:Ee,publicKey:Pe,message:xe}=N(q,te);xe&&Ee&&Pe&&x.push({message:xe,signature:Ee,publicKey:Pe}),de&&(S.addPreAccounts([{address:de,role:gill.AccountRole.READONLY}]),me?.__option==="Some"&&_.push({domainConfigKey:de,verifyArgs:me.value}));}else S.addPreAccounts([{address:q.address,role:gill.AccountRole.READONLY_SIGNER,signer:q}]);let{remainingAccounts:U,systemOffset:K}=S.toAccountMetas(),W=[];if(x.length>0&&W.push(B(x)),A){if(!i||!D)throw new Error("Payer not found or proof args is missing.");let q=v(I,K);W.push(jc({amount:a,createAtaIfNeeded:u,settingsMutArgs:D,compressedProofArgs:q,payer:i,secp256r1VerifyArgs:_,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:P,mint:s,tokenProgram:o,remainingAccounts:U}));}else W.push(Hc({amount:a,createAtaIfNeeded:u,secp256r1VerifyArgs:_,source:f,sourceTokenAccount:l,destination:r,destinationTokenAccount:P,settings:y,mint:s,tokenProgram:o,remainingAccounts:U}));return W}async function uk({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:a}){let i=await _s(re(),s),o=i.data.multiWalletSettings,{packedAccounts:u,proof:A,settingsMutArgs:g}=await ce(c,e,n,false,a),{remainingAccounts:y,systemOffset:f}=u.toAccountMetas(),{domainConfig:l,verifyArgs:P,message:S,signature:I,publicKey:D}=N(r),x=[];if(S&&I&&D&&x.push(B([{message:S,signature:I,publicKey:D}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let _=v(A,f);x.push(oa({transactionBuffer:s,domainConfig:l,closer:r instanceof E?void 0:r,rentCollector:i.data.payer,secp256r1VerifyArgs:P,settingsMutArgs:g,payer:t,compressedProofArgs:_,remainingAccounts:y}));}else x.push($c({transactionBuffer:s,domainConfig:l,closer:r instanceof E?void 0:r,settings:o,payer:i.data.payer,secp256r1VerifyArgs:P,remainingAccounts:[]}));return x}function pd({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:u,expectedSecp256r1Signers:A}){let{domainConfig:g,verifyArgs:y,message:f,signature:l,publicKey:P}=N(n),S=[];if(f&&l&&P&&S.push(B([{message:f,signature:l,publicKey:P}])),u){let{settingsReadonlyArgs:I,compressedProofArgs:D,remainingAccounts:x}=u;S.push(fa({transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof E?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},settingsReadonlyArgs:I,compressedProofArgs:D,remainingAccounts:x}));}else S.push(Aa({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof E?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:A},remainingAccounts:[]}));return S}function Td({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=N(e),u=[];return i&&a&&o&&u.push(B([{message:i,signature:a,publicKey:o}])),s?u.push(ba({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof E?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(Ca({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof E?void 0:e,remainingAccounts:[]})),u}function fd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Ha({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Oa({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function ld({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=N(n),u=[];return o&&a&&i&&u.push(B([{message:o,signature:a,publicKey:i}])),s?u.push($a({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof E?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(ja({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof E?void 0:n,remainingAccounts:[]})),u}async function tN({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await eD(r),a=new L,i=null,o=null,u=[];if(c.length||t){let g=await tD({packedAccounts:a,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});i=g.proof,o=g.settingsMutArgs??null,u=g.userMutArgs??[];}return {configActions:await rD({configActionsArgs:r,userMutArgs:u,index:e}),index:e,proof:i,settingsMutArgs:o,packedAccounts:a,compressed:t}}async function eD(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>O(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=>O(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function tD({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let a=[];if(r){let f=(await ne(s,t)).address;a.push({address:f,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await ye(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await z(i,[]),u=[],A=[];for(let f of i)f.type==="Settings"?u.push(f):f.type==="User"&&A.push(f);let g,y=[];if(r&&o&&(g=oe(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),u,ee())[0]),A.length&&o){let f=r?1:0;y=oe(e,o.treeInfos.slice(f),o.leafIndices.slice(f),o.rootIndices.slice(f),o.proveByIndices.slice(f),A,Z());}return {proof:o,settingsMutArgs:g,userMutArgs:y}}async function rD({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let a of t.members){let i=await O(a.member,a.userAddressTreeIndex).then(o=>r.find(u=>new Sd__default.default(new Uint8Array(u.accountMeta.address)).eq(o.address)));if(!i)throw new Error("Unable to find user account");c.push(oD({permissionArgs:a.permissions,userMutArgs:i,pubkey:a.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(a=>O(a.member,a.userAddressTreeIndex).then(i=>{let o=r.find(u=>new Sd__default.default(new Uint8Array(u.accountMeta.address)).eq(i.address));if(!o)throw new Error("Unable to find user account");return sD({pubkey:a.member,userMutArgs:o,index:e})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(a=>nD({permissionArgs:a.permissions,pubkey:a.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function nD({pubkey:e,permissionArgs:n}){return {memberKey:Je(e),permissions:xd(n)}}function sD({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:Je(e),userArgs:s?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function oD({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===1)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:Je(e),permissions:xd(n),userReadonlyArgs:r}}function xd(e){let n=[];return e.initiate&&n.push(le.InitiateTransaction),e.vote&&n.push(le.VoteTransaction),e.execute&&n.push(le.ExecuteTransaction),Ie.fromPermissions(n)}async function dN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o,compressed:u=false,additionalVoters:A=[],additionalSigners:g=[],chunkSize:y=Math.ceil(s.length/2),cachedAccounts:f}){let l=await Y(n),P=Math.floor(Math.random()*255),S=await Vi(l,t instanceof E?t:t.address,P),I=[],D=[];for(let X=0;X<s.length;X+=y){let Wn=s.subarray(X,X+y);I.push(Wn),D.push(sha2_js.sha256(Wn));}let x=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:_,settingsMutArgs:U,proof:K,packedAccounts:W}=await ce(u,n,r,false,f),{remainingAccounts:q,systemOffset:te}=W.toAccountMetas(),de=K&&_&&U?{settingsReadonlyArgs:_,settingsMutArgs:U,compressedProofArgs:v(K,te),remainingAccounts:q,payer:e}:null,me=ae([t,...c?[c]:[],...A]).filter(X=>X instanceof E).map(X=>({memberKey:Je(X),messageHash:Mn(X.authResponse)})),Ee=pd({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:P,payer:e,transactionBufferAddress:S,settings:l,creator:t,preauthorizeExecution:!c,bufferExtendHashes:D,compressedArgs:de,expectedSecp256r1Signers:me}),Pe=I.map(X=>fd({transactionMessageBytes:X,transactionBufferAddress:S,settings:l,compressed:u})),xe=A.map(X=>ld({voter:X,transactionBufferAddress:S,settings:l,compressedArgs:de})),_t=Td({compressedArgs:de,settings:l,executor:c,transactionBufferAddress:S}),{instructions:Cd,addressLookupTableAccounts:Md}=await ud({compressed:u,settings:l,transactionMessageBytes:s,transactionBufferAddress:S,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o}),T=X=>({payer:e,instructions:X,addressesByLookupTableAddress:Md});return [T(Ee),...Pe.map(X=>T([X])),...xe.length?[T(xe.flat())]:[],T(_t),T(Cd)]}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(u=>u===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 Dd({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 y of i){let f=t.extractTableLookup(y);if(f!==void 0){let{addressTableLookup:l,drainedKeys:P}=f;c.push({readonlyIndexes:l.readonlyIndexes,readableIndices:l.readonlyIndexes,writableIndexes:l.writableIndexes,writableIndices:l.writableIndexes,lookupTableAddress:gill.address(l.lookupTableAddress)}),a.writable.push(...P.writable),a.readonly.push(...P.readonly);}}let[o,u]=t.getMessageComponents(),g=new dr(u,a).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function DN({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Dd({instructions:e,payer:n,recentBlockhash:d,addressesByLookupTableAddress:r});return hi(s)}async function hN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:a,cachedAccounts:i,compressed:o=false,simulateProof:u=false}){let{instructions:A,addressLookupTableAccounts:g}=await Ad({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:i});return {payer:e,instructions:A,addressesByLookupTableAddress:g}}
2
+ exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Hs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=ro;exports.CHANGE_CONFIG_DISCRIMINATOR=Zs;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=io;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=xo;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Mo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ro;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Wo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=wo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Go;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=qo;exports.DOMAIN_CONFIG_DISCRIMINATOR=Ln;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=tc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=cc;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=gc;exports.GLOBAL_COUNTER_DISCRIMINATOR=Vn;exports.KeyType=ht;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=lc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Mc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=cx;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=wS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Px;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=hx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=VS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=NS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=YS;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=qS;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=kS;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=JS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=px;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Tx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=fx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=dx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=ax;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=ix;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=tx;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=vx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=ZS;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=nx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=mx;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=ux;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=ex;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=FS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=_S;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=LS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=vS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=WS;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=Ex;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Cx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=QS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=jS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=KS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=$S;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=rx;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=OS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=Ix;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Rx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=sx;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=ox;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Dx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=gx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=GS;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=zS;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=bx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=HS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=xx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=BS;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=US;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Mx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=XS;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=lx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Sx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=yx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Ax;exports.MULTI_WALLET_PROGRAM_ADDRESS=d;exports.MultiWalletAccount=hS;exports.MultiWalletInstruction=RS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Lc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=bc;exports.Permission=le;exports.Permissions=Ie;exports.SETTINGS_DISCRIMINATOR=Is;exports.Secp256r1Key=De;exports.SignedSecp256r1Key=E;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Kc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Nc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=ra;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Yc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=ma;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=ia;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Rs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Pa;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=xa;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=ka;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Ua;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Ya;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=za;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=ii;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=ri;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=xi;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=mi;exports.UserRole=He;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Ls;exports.addWhitelistedAddressTrees=XU;exports.base64URLStringToBuffer=Me;exports.bufferToBase64URLString=PL;exports.changeConfig=fB;exports.closeTransactionBuffer=uk;exports.compressSettingsAccount=dB;exports.configAction=YD;exports.convertMemberKeyToString=$i;exports.convertPubkeyCompressedToCose=SL;exports.convertPubkeyCoseToCompressed=lL;exports.createClientAuthorizationCompleteRequestChallenge=CL;exports.createClientAuthorizationStartRequestChallenge=DL;exports.createDomainConfig=uO;exports.createDomainUserAccounts=xO;exports.createGlobalCounter=MO;exports.createMessageChallenge=ML;exports.createTransactionBuffer=pd;exports.createTransactionChallenge=EL;exports.createTransactionManagerSigner=LI;exports.createUserAccounts=MB;exports.createWallet=cw;exports.decodeDomainConfig=Bn;exports.decodeGlobalCounter=Gn;exports.decodeSettings=Cs;exports.decodeTransactionBuffer=vs;exports.decodeWhitelistedAddressTree=Bs;exports.decompressSettingsAccount=pw;exports.deserializeConfigActions=ZL;exports.disableDomainConfig=RO;exports.editDomainConfig=_B;exports.editTransactionManagerUrl=wB;exports.editUserDelegate=jB;exports.executeTransaction=ud;exports.executeTransactionBuffer=Td;exports.executeTransactionSync=Ad;exports.extendTransactionBuffer=fd;exports.fetchAllDomainConfig=AD;exports.fetchAllGlobalCounter=lD;exports.fetchAllMaybeDomainConfig=kd;exports.fetchAllMaybeGlobalCounter=eu;exports.fetchAllMaybeSettings=dy;exports.fetchAllMaybeTransactionBuffer=_y;exports.fetchAllMaybeWhitelistedAddressTree=Xy;exports.fetchAllSettings=kE;exports.fetchAllTransactionBuffer=KE;exports.fetchAllWhitelistedAddressTree=YE;exports.fetchDomainConfig=wn;exports.fetchGlobalCounter=fD;exports.fetchMaybeDomainConfig=wd;exports.fetchMaybeGlobalCounter=$d;exports.fetchMaybeSettings=Fr;exports.fetchMaybeSettingsAccountData=Jx;exports.fetchMaybeTransactionBuffer=vy;exports.fetchMaybeUserAccountData=Kx;exports.fetchMaybeWhitelistedAddressTree=Yy;exports.fetchSettings=wE;exports.fetchSettingsAccountData=In;exports.fetchTransactionBuffer=_s;exports.fetchUserAccountData=tr;exports.fetchWhitelistedAddressTree=ws;exports.getAddMemberArgsCodec=CD;exports.getAddMemberArgsDecoder=Ar;exports.getAddMemberArgsEncoder=ur;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=yP;exports.getAddWhitelistedAddressTreesInstruction=pP;exports.getAddWhitelistedAddressTreesInstructionAsync=Fs;exports.getAddWhitelistedAddressTreesInstructionDataCodec=mP;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Gs;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Xr;exports.getChangeConfigCompressedDiscriminatorBytes=WP;exports.getChangeConfigCompressedInstruction=oo;exports.getChangeConfigCompressedInstructionDataCodec=LP;exports.getChangeConfigCompressedInstructionDataDecoder=so;exports.getChangeConfigCompressedInstructionDataEncoder=no;exports.getChangeConfigDiscriminatorBytes=CP;exports.getChangeConfigInstruction=EP;exports.getChangeConfigInstructionAsync=Xs;exports.getChangeConfigInstructionDataCodec=MP;exports.getChangeConfigInstructionDataDecoder=Ys;exports.getChangeConfigInstructionDataEncoder=Qr;exports.getClientAndDeviceHash=Cn;exports.getCompiledInstructionCodec=PD;exports.getCompiledInstructionDecoder=yr;exports.getCompiledInstructionEncoder=gr;exports.getCompressSettingsAccountDiscriminatorBytes=GP;exports.getCompressSettingsAccountInstruction=go;exports.getCompressSettingsAccountInstructionDataCodec=FP;exports.getCompressSettingsAccountInstructionDataDecoder=Ao;exports.getCompressSettingsAccountInstructionDataEncoder=uo;exports.getCompressedAccountMetaCodec=vD;exports.getCompressedAccountMetaDecoder=Qe;exports.getCompressedAccountMetaEncoder=Xe;exports.getCompressedAccountMetaReadOnlyCodec=LD;exports.getCompressedAccountMetaReadOnlyDecoder=rt;exports.getCompressedAccountMetaReadOnlyEncoder=tt;exports.getCompressedProofCodec=wD;exports.getCompressedProofDecoder=Sr;exports.getCompressedProofEncoder=lr;exports.getCompressedSettingsAddressFromIndex=ne;exports.getCompressedSettingsCodec=HD;exports.getCompressedSettingsDataCodec=KD;exports.getCompressedSettingsDataDecoder=ot;exports.getCompressedSettingsDataEncoder=st;exports.getCompressedSettingsDecoder=ee;exports.getCompressedSettingsEncoder=nt;exports.getComputeBudgetEstimate=_i;exports.getConfigActionCodec=ZD;exports.getConfigActionDecoder=Ue;exports.getConfigActionEncoder=_e;exports.getCreateDomainConfigDiscriminatorBytes=XP;exports.getCreateDomainConfigInstruction=$P;exports.getCreateDomainConfigInstructionAsync=Do;exports.getCreateDomainConfigInstructionDataCodec=QP;exports.getCreateDomainConfigInstructionDataDecoder=Io;exports.getCreateDomainConfigInstructionDataEncoder=en;exports.getCreateDomainUserAccountDiscriminatorBytes=ah;exports.getCreateDomainUserAccountInstruction=dh;exports.getCreateDomainUserAccountInstructionAsync=Po;exports.getCreateDomainUserAccountInstructionDataCodec=ih;exports.getCreateDomainUserAccountInstructionDataDecoder=Eo;exports.getCreateDomainUserAccountInstructionDataEncoder=rn;exports.getCreateGlobalCounterDiscriminatorBytes=Th;exports.getCreateGlobalCounterInstruction=lh;exports.getCreateGlobalCounterInstructionAsync=vo;exports.getCreateGlobalCounterInstructionDataCodec=fh;exports.getCreateGlobalCounterInstructionDataDecoder=bo;exports.getCreateGlobalCounterInstructionDataEncoder=sn;exports.getCreateMultiWalletCompressedDiscriminatorBytes=Ph;exports.getCreateMultiWalletCompressedInstruction=Rh;exports.getCreateMultiWalletCompressedInstructionAsync=Oo;exports.getCreateMultiWalletCompressedInstructionDataCodec=hh;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Lo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=on;exports.getCreateUserAccountArgsCodec=tC;exports.getCreateUserAccountArgsDecoder=hr;exports.getCreateUserAccountArgsEncoder=Pr;exports.getCreateUserAccountsDiscriminatorBytes=Bh;exports.getCreateUserAccountsInstruction=kh;exports.getCreateUserAccountsInstructionAsync=No;exports.getCreateUserAccountsInstructionDataCodec=wh;exports.getCreateUserAccountsInstructionDataDecoder=ko;exports.getCreateUserAccountsInstructionDataEncoder=an;exports.getDecompressSettingsAccountDiscriminatorBytes=Jh;exports.getDecompressSettingsAccountInstruction=Ko;exports.getDecompressSettingsAccountInstructionDataCodec=jh;exports.getDecompressSettingsAccountInstructionDataDecoder=zo;exports.getDecompressSettingsAccountInstructionDataEncoder=Fo;exports.getDisableDomainConfigDiscriminatorBytes=eR;exports.getDisableDomainConfigInstruction=Xo;exports.getDisableDomainConfigInstructionDataCodec=tR;exports.getDisableDomainConfigInstructionDataDecoder=Yo;exports.getDisableDomainConfigInstructionDataEncoder=Zo;exports.getDomainConfigAddress=ze;exports.getDomainConfigCodec=uD;exports.getDomainConfigDecoder=On;exports.getDomainConfigDiscriminatorBytes=dD;exports.getDomainConfigEncoder=Bd;exports.getDomainConfigSize=gD;exports.getEditDomainConfigDiscriminatorBytes=dR;exports.getEditDomainConfigInstruction=nc;exports.getEditDomainConfigInstructionAsync=AR;exports.getEditDomainConfigInstructionDataCodec=uR;exports.getEditDomainConfigInstructionDataDecoder=rc;exports.getEditDomainConfigInstructionDataEncoder=un;exports.getEditMemberArgsCodec=oC;exports.getEditMemberArgsDecoder=Cr;exports.getEditMemberArgsEncoder=Dr;exports.getEditTransactionManagerUrlDiscriminatorBytes=SR;exports.getEditTransactionManagerUrlInstruction=dc;exports.getEditTransactionManagerUrlInstructionDataCodec=xR;exports.getEditTransactionManagerUrlInstructionDataDecoder=ic;exports.getEditTransactionManagerUrlInstructionDataEncoder=ac;exports.getEditUserDelegateDiscriminatorBytes=RR;exports.getEditUserDelegateInstruction=pc;exports.getEditUserDelegateInstructionDataCodec=bR;exports.getEditUserDelegateInstructionDataDecoder=mc;exports.getEditUserDelegateInstructionDataEncoder=yc;exports.getExpectedSecp256r1SignersCodec=dC;exports.getExpectedSecp256r1SignersDecoder=dt;exports.getExpectedSecp256r1SignersEncoder=it;exports.getGlobalCounterAddress=Ni;exports.getGlobalCounterCodec=TD;exports.getGlobalCounterDecoder=Hn;exports.getGlobalCounterDiscriminatorBytes=pD;exports.getGlobalCounterEncoder=Qd;exports.getGlobalCounterSize=SD;exports.getJitoTipsConfig=Sn;exports.getLightCpiSigner=tL;exports.getLightProtocolRpc=Rt;exports.getLinkWalletArgsCodec=yC;exports.getLinkWalletArgsDecoder=br;exports.getLinkWalletArgsEncoder=Rr;exports.getMemberCodec=fC;exports.getMemberDecoder=at;exports.getMemberEncoder=ct;exports.getMemberKeyCodec=xC;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=Q;exports.getMigrateCompressedSettingsDiscriminatorBytes=wR;exports.getMigrateCompressedSettingsInstruction=Ic;exports.getMigrateCompressedSettingsInstructionDataCodec=kR;exports.getMigrateCompressedSettingsInstructionDataDecoder=xc;exports.getMigrateCompressedSettingsInstructionDataEncoder=Sc;exports.getMigrateCompressedUsersDiscriminatorBytes=JR;exports.getMigrateCompressedUsersInstruction=hc;exports.getMigrateCompressedUsersInstructionDataCodec=jR;exports.getMigrateCompressedUsersInstructionDataDecoder=Pc;exports.getMigrateCompressedUsersInstructionDataEncoder=Ec;exports.getMultiWalletErrorMessage=NU;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Ab;exports.getNativeTransferIntentCompressedInstruction=wc;exports.getNativeTransferIntentCompressedInstructionDataCodec=gb;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Bc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Oc;exports.getNativeTransferIntentDiscriminatorBytes=tb;exports.getNativeTransferIntentInstruction=_c;exports.getNativeTransferIntentInstructionAsync=nb;exports.getNativeTransferIntentInstructionDataCodec=rb;exports.getNativeTransferIntentInstructionDataDecoder=vc;exports.getNativeTransferIntentInstructionDataEncoder=An;exports.getNewAuthorityArgsCodec=MC;exports.getNewAuthorityArgsDecoder=Wr;exports.getNewAuthorityArgsEncoder=Ur;exports.getOriginIndex=IL;exports.getPackedAddressTreeInfoCodec=hC;exports.getPackedAddressTreeInfoDecoder=At;exports.getPackedAddressTreeInfoEncoder=ut;exports.getPackedStateTreeInfoCodec=vC;exports.getPackedStateTreeInfoDecoder=et;exports.getPackedStateTreeInfoEncoder=$e;exports.getPermissionsCodec=WC;exports.getPermissionsDecoder=Re;exports.getPermissionsEncoder=he;exports.getProofArgsCodec=wC;exports.getProofArgsDecoder=M;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=HC;exports.getRemoveMemberArgsDecoder=Er;exports.getRemoveMemberArgsEncoder=Mr;exports.getSecp256r1MessageHash=Mn;exports.getSecp256r1PubkeyCodec=zC;exports.getSecp256r1PubkeyDecoder=gt;exports.getSecp256r1PubkeyEncoder=Br;exports.getSecp256r1SignatureOffsetsDataDecoder=zI;exports.getSecp256r1SignatureOffsetsDataEncoder=FI;exports.getSecp256r1VerifyArgsCodec=jC;exports.getSecp256r1VerifyArgsDecoder=H;exports.getSecp256r1VerifyArgsEncoder=V;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=XC;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=F;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=G;exports.getSecp256r1VerifyInstruction=B;exports.getSecp256r1VerifyInstructionDataCodec=$O;exports.getSecp256r1VerifyInstructionDataDecoder=od;exports.getSecp256r1VerifyInstructionDataEncoder=cd;exports.getSendAndConfirmTransaction=vi;exports.getSettingsCodec=BE;exports.getSettingsCreationArgsCodec=tM;exports.getSettingsCreationArgsDecoder=mt;exports.getSettingsCreationArgsEncoder=yt;exports.getSettingsDecoder=Ds;exports.getSettingsDiscriminatorBytes=OE;exports.getSettingsEncoder=iy;exports.getSettingsFromIndex=Y;exports.getSettingsIndexWithAddressCodec=sM;exports.getSettingsIndexWithAddressDecoder=Tt;exports.getSettingsIndexWithAddressEncoder=pt;exports.getSettingsMutArgsCodec=iM;exports.getSettingsMutArgsDecoder=k;exports.getSettingsMutArgsEncoder=w;exports.getSettingsReadonlyArgsCodec=gM;exports.getSettingsReadonlyArgsDecoder=lt;exports.getSettingsReadonlyArgsEncoder=ft;exports.getSettingsSize=NE;exports.getSignedSecp256r1Key=xL;exports.getSignedTransactionManager=jL;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=bi;exports.getTokenTransferIntentCompressedDiscriminatorBytes=vb;exports.getTokenTransferIntentCompressedInstruction=jc;exports.getTokenTransferIntentCompressedInstructionAsync=Ub;exports.getTokenTransferIntentCompressedInstructionDataCodec=_b;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Jc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=mn;exports.getTokenTransferIntentDiscriminatorBytes=xb;exports.getTokenTransferIntentInstruction=Hc;exports.getTokenTransferIntentInstructionAsync=Db;exports.getTokenTransferIntentInstructionDataCodec=Ib;exports.getTokenTransferIntentInstructionDataDecoder=Vc;exports.getTokenTransferIntentInstructionDataEncoder=yn;exports.getTransactionBufferAddress=Vi;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=Zb;exports.getTransactionBufferCloseCompressedInstruction=oa;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Yb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=sa;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=na;exports.getTransactionBufferCloseDiscriminatorBytes=Vb;exports.getTransactionBufferCloseInstruction=$c;exports.getTransactionBufferCloseInstructionDataCodec=Hb;exports.getTransactionBufferCloseInstructionDataDecoder=Qc;exports.getTransactionBufferCloseInstructionDataEncoder=Xc;exports.getTransactionBufferCodec=zE;exports.getTransactionBufferCreateArgsCodec=TM;exports.getTransactionBufferCreateArgsDecoder=xt;exports.getTransactionBufferCreateArgsEncoder=St;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=yv;exports.getTransactionBufferCreateCompressedInstruction=fa;exports.getTransactionBufferCreateCompressedInstructionDataCodec=mv;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=Ta;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=pa;exports.getTransactionBufferCreateDiscriminatorBytes=sv;exports.getTransactionBufferCreateInstruction=Aa;exports.getTransactionBufferCreateInstructionDataCodec=ov;exports.getTransactionBufferCreateInstructionDataDecoder=ua;exports.getTransactionBufferCreateInstructionDataEncoder=da;exports.getTransactionBufferDecoder=bs;exports.getTransactionBufferDiscriminatorBytes=FE;exports.getTransactionBufferEncoder=by;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=_v;exports.getTransactionBufferExecuteCompressedInstruction=ba;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=Uv;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ra;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=ha;exports.getTransactionBufferExecuteDiscriminatorBytes=Dv;exports.getTransactionBufferExecuteInstruction=Ca;exports.getTransactionBufferExecuteInstructionDataCodec=Cv;exports.getTransactionBufferExecuteInstructionDataDecoder=Da;exports.getTransactionBufferExecuteInstructionDataEncoder=Ia;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=jv;exports.getTransactionBufferExtendCompressedInstruction=Ha;exports.getTransactionBufferExtendCompressedInstructionDataCodec=qv;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Va;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Na;exports.getTransactionBufferExtendDiscriminatorBytes=Nv;exports.getTransactionBufferExtendInstruction=Oa;exports.getTransactionBufferExtendInstructionDataCodec=Vv;exports.getTransactionBufferExtendInstructionDataDecoder=La;exports.getTransactionBufferExtendInstructionDataEncoder=Wa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=A_;exports.getTransactionBufferVoteCompressedInstruction=$a;exports.getTransactionBufferVoteCompressedInstructionDataCodec=g_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Qa;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Xa;exports.getTransactionBufferVoteDiscriminatorBytes=r_;exports.getTransactionBufferVoteInstruction=ja;exports.getTransactionBufferVoteInstructionDataCodec=n_;exports.getTransactionBufferVoteInstructionDataDecoder=Ja;exports.getTransactionBufferVoteInstructionDataEncoder=Ka;exports.getTransactionExecuteCompressedDiscriminatorBytes=h_;exports.getTransactionExecuteCompressedInstruction=Ai;exports.getTransactionExecuteCompressedInstructionDataCodec=R_;exports.getTransactionExecuteCompressedInstructionDataDecoder=ui;exports.getTransactionExecuteCompressedInstructionDataEncoder=di;exports.getTransactionExecuteDiscriminatorBytes=S_;exports.getTransactionExecuteInstruction=oi;exports.getTransactionExecuteInstructionDataCodec=x_;exports.getTransactionExecuteInstructionDataDecoder=si;exports.getTransactionExecuteInstructionDataEncoder=ni;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=K_;exports.getTransactionExecuteSyncCompressedInstruction=Ci;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=J_;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Di;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Ii;exports.getTransactionExecuteSyncDiscriminatorBytes=B_;exports.getTransactionExecuteSyncInstruction=fi;exports.getTransactionExecuteSyncInstructionDataCodec=w_;exports.getTransactionExecuteSyncInstructionDataDecoder=Ti;exports.getTransactionExecuteSyncInstructionDataEncoder=pi;exports.getTransactionMessageAddressTableLookupCodec=CM;exports.getTransactionMessageAddressTableLookupDecoder=kr;exports.getTransactionMessageAddressTableLookupEncoder=wr;exports.getTransactionMessageCodec=xM;exports.getTransactionMessageDecoder=Dt;exports.getTransactionMessageEncoder=It;exports.getUserAccountAddress=O;exports.getUserCodec=hM;exports.getUserCreationArgsCodec=_M;exports.getUserCreationArgsDecoder=ge;exports.getUserCreationArgsEncoder=Ae;exports.getUserDecoder=Z;exports.getUserEncoder=Oe;exports.getUserMutArgsCodec=OM;exports.getUserMutArgsDecoder=fe;exports.getUserMutArgsEncoder=Te;exports.getUserReadOnlyArgsCodec=NM;exports.getUserReadOnlyArgsDecoder=ve;exports.getUserReadOnlyArgsEncoder=be;exports.getUserReadOnlyOrMutateArgsCodec=FM;exports.getUserReadOnlyOrMutateArgsDecoder=Or;exports.getUserReadOnlyOrMutateArgsEncoder=Lr;exports.getUserRoleCodec=qM;exports.getUserRoleDecoder=Le;exports.getUserRoleEncoder=We;exports.getWalletAddressFromIndex=eL;exports.getWalletAddressFromSettings=Se;exports.getWhitelistedAddressTreeCodec=ZE;exports.getWhitelistedAddressTreeDecoder=Os;exports.getWhitelistedAddressTreeDiscriminatorBytes=qE;exports.getWhitelistedAddressTreeEncoder=Zy;exports.getWhitelistedAddressTreeFromIndex=Dn;exports.getWhitelistedAddressTreeIndexFromAddress=KW;exports.getWhitelistedAddressTreesAddress=Li;exports.identifyMultiWalletAccount=UU;exports.identifyMultiWalletInstruction=WU;exports.initialize=DW;exports.isConfigAction=XD;exports.isMultiWalletError=VU;exports.isUserReadOnlyOrMutateArgs=KM;exports.migrateSettings=OO;exports.migrateUsers=GO;exports.nativeTransferIntent=Fw;exports.parseAddWhitelistedAddressTreesInstruction=TP;exports.parseChangeConfigCompressedInstruction=OP;exports.parseChangeConfigInstruction=PP;exports.parseCompressSettingsAccountInstruction=zP;exports.parseCreateDomainConfigInstruction=eh;exports.parseCreateDomainUserAccountInstruction=uh;exports.parseCreateGlobalCounterInstruction=Sh;exports.parseCreateMultiWalletCompressedInstruction=bh;exports.parseCreateUserAccountsInstruction=Nh;exports.parseDecompressSettingsAccountInstruction=qh;exports.parseDisableDomainConfigInstruction=rR;exports.parseEditDomainConfigInstruction=gR;exports.parseEditTransactionManagerUrlInstruction=IR;exports.parseEditUserDelegateInstruction=vR;exports.parseMigrateCompressedSettingsInstruction=NR;exports.parseMigrateCompressedUsersInstruction=qR;exports.parseNativeTransferIntentCompressedInstruction=yb;exports.parseNativeTransferIntentInstruction=sb;exports.parseSecp256r1VerifyInstruction=eB;exports.parseTokenTransferIntentCompressedInstruction=Wb;exports.parseTokenTransferIntentInstruction=Cb;exports.parseTransactionBufferCloseCompressedInstruction=Xb;exports.parseTransactionBufferCloseInstruction=Gb;exports.parseTransactionBufferCreateCompressedInstruction=pv;exports.parseTransactionBufferCreateInstruction=cv;exports.parseTransactionBufferExecuteCompressedInstruction=Wv;exports.parseTransactionBufferExecuteInstruction=Mv;exports.parseTransactionBufferExtendCompressedInstruction=Zv;exports.parseTransactionBufferExtendInstruction=Hv;exports.parseTransactionBufferVoteCompressedInstruction=y_;exports.parseTransactionBufferVoteInstruction=s_;exports.parseTransactionExecuteCompressedInstruction=b_;exports.parseTransactionExecuteInstruction=I_;exports.parseTransactionExecuteSyncCompressedInstruction=j_;exports.parseTransactionExecuteSyncInstruction=k_;exports.pollJitoBundleConfirmation=KL;exports.prepareChangeConfigArgs=tN;exports.prepareTransactionBundle=dN;exports.prepareTransactionMessage=DN;exports.prepareTransactionSync=hN;exports.retrieveTransactionManager=JL;exports.sendJitoBundle=WI;exports.serializeConfigActions=qL;exports.signAndSendBundledTransactions=FL;exports.signAndSendTransaction=zL;exports.tokenTransferIntent=$w;exports.uninitialize=IW;exports.userReadOnlyOrMutateArgs=zM;exports.vaultTransactionMessageDeserialize=Ri;exports.vaultTransactionMessageSerialize=hi;exports.voteTransactionBuffer=ld;//# sourceMappingURL=index.cjs.map
3
3
  //# sourceMappingURL=index.cjs.map