@revibase/core 0.0.2 → 0.0.4

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'),Jx=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha256=require('@noble/hashes/sha256'),web3_js=require('@solana/web3.js'),programs=require('gill/programs'),tinyCbor=require('@levischuck/tiny-cbor'),p256=require('@noble/curves/p256'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Jx__default=/*#__PURE__*/_interopDefault(Jx);var _n=new Uint8Array([201,232,212,229,59,241,106,197]);function lI(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(_n)}function Hu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["numOrigins",gill.getU16Encoder()],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),413)],["metadataUrlLength",gill.getU8Encoder()],["metadataUrl",gill.fixEncoderSize(gill.getBytesEncoder(),100)]]),e=>({...e,discriminator:_n}))}function Un(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["numOrigins",gill.getU16Decoder()],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),413)],["metadataUrlLength",gill.getU8Decoder()],["metadataUrl",gill.fixDecoderSize(gill.getBytesDecoder(),100)]])}function TI(){return gill.combineCodec(Hu(),Un())}function Wn(e){return gill.decodeAccount(e,Un())}async function On(e,n,r){let s=await Vu(e,n,r);return gill.assertAccountExists(s),s}async function Vu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Wn(s)}async function SI(e,n,r){let s=await Gu(e,n,r);return gill.assertAccountsExist(s),s}async function Gu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Wn(t))}function xI(){return 846}var kn=new Uint8Array([42,206,176,58,175,129,130,233]);function DI(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(kn)}function rd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:kn}))}function wn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function MI(){return gill.combineCodec(rd(),wn())}function Nn(e){return gill.decodeAccount(e,wn())}async function EI(e,n,r){let s=await nd(e,n,r);return gill.assertAccountExists(s),s}async function nd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Nn(s)}async function PI(e,n,r){let s=await sd(e,n,r);return gill.assertAccountsExist(s),s}async function sd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Nn(t))}function RI(){return 24}function ar(){return gill.getStructEncoder([["member",De()],["verifyArgs",gill.getOptionEncoder(B())],["userArgs",Ye()],["setAsDelegate",gill.getBooleanEncoder()]])}function ir(){return gill.getStructDecoder([["member",Me()],["verifyArgs",gill.getOptionDecoder(L())],["userArgs",Ze()],["setAsDelegate",gill.getBooleanDecoder()]])}function _I(){return gill.combineCodec(ar(),ir())}function ur(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function dr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function OI(){return gill.combineCodec(ur(),dr())}function qe(){return gill.getStructEncoder([["treeInfo",$e()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function Xe(){return gill.getStructDecoder([["treeInfo",Qe()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function wI(){return gill.combineCodec(qe(),Xe())}function et(){return gill.getStructEncoder([["treeInfo",$e()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function tt(){return gill.getStructDecoder([["treeInfo",Qe()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function GI(){return gill.combineCodec(et(),tt())}function pr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function fr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function KI(){return gill.combineCodec(pr(),fr())}function rt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(nt())]])}function G(){return gill.getStructDecoder([["data",gill.getOptionDecoder(st())]])}function ZI(){return gill.combineCodec(rt(),G())}function nt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(De())]])}function st(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(Me())]])}function QI(){return gill.combineCodec(nt(),st())}function ot(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Ir())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(ar())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Dr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function ct(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Cr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(ir())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Mr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function nC(){return gill.combineCodec(ot(),ct())}function sC(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function oC(e,n){return n.__kind===e}function Er(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["isPermanentMember",gill.getBooleanEncoder()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Ee()]])}function Pr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["isPermanentMember",gill.getBooleanDecoder()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Pe()]])}function uC(){return gill.combineCodec(Er(),Pr())}var Ut=(s=>(s[s.Add=0]="Add",s[s.Remove=1]="Remove",s[s.Ignore=2]="Ignore",s))(Ut||{});function Rr(){return gill.getEnumEncoder(Ut)}function hr(){return gill.getEnumDecoder(Ut)}function AC(){return gill.combineCodec(Rr(),hr())}function Ir(){return gill.getStructEncoder([["memberKey",q()],["permissions",at()],["userArgs",gill.getOptionEncoder(se())],["delegateOperation",Rr()]])}function Cr(){return gill.getStructDecoder([["memberKey",X()],["permissions",it()],["userArgs",gill.getOptionDecoder(oe())],["delegateOperation",hr()]])}function fC(){return gill.combineCodec(Ir(),Cr())}function br(){return gill.getStructEncoder([["settingsMutArgs",me()],["transactionManager",gill.getOptionEncoder(se())]])}function vr(){return gill.getStructDecoder([["settingsMutArgs",pe()],["transactionManager",gill.getOptionDecoder(oe())]])}function xC(){return gill.combineCodec(br(),vr())}function De(){return gill.getStructEncoder([["pubkey",q()],["permissions",at()]])}function Me(){return gill.getStructDecoder([["pubkey",X()],["permissions",it()]])}function MC(){return gill.combineCodec(De(),Me())}function q(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function X(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function RC(){return gill.combineCodec(q(),X())}function ut(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function dt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function vC(){return gill.combineCodec(ut(),dt())}function $e(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Qe(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function WC(){return gill.combineCodec($e(),Qe())}function at(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function it(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function LC(){return gill.combineCodec(at(),it())}function R(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(pr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function h(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(fr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function HC(){return gill.combineCodec(R(),h())}function Dr(){return gill.getStructEncoder([["memberKey",q()],["userArgs",Ye()]])}function Mr(){return gill.getStructDecoder([["memberKey",X()],["userArgs",Ze()]])}function zC(){return gill.combineCodec(Dr(),Mr())}function _r(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function gt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function jC(){return gill.combineCodec(_r(),gt())}function B(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function L(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function qC(){return gill.combineCodec(B(),L())}function K(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",B()]])}function J(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",L()]])}function eD(){return gill.combineCodec(K(),J())}function Ur(){return gill.getDiscriminatedUnionEncoder([["Create",gill.getStructEncoder([["fields",gill.getTupleEncoder([Re()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([me()])]])]])}function Wr(){return gill.getDiscriminatedUnionDecoder([["Create",gill.getStructDecoder([["fields",gill.getTupleDecoder([he()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([pe()])]])]])}function sD(){return gill.combineCodec(Ur(),Wr())}function oD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function cD(e,n){return n.__kind===e}function Re(){return gill.getStructEncoder([["addressTreeInfo",ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function he(){return gill.getStructDecoder([["addressTreeInfo",dt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function dD(){return gill.combineCodec(Re(),he())}function me(){return gill.getStructEncoder([["accountMeta",qe()],["data",rt()]])}function pe(){return gill.getStructDecoder([["accountMeta",Xe()],["data",G()]])}function mD(){return gill.combineCodec(me(),pe())}function Q(){return gill.getStructEncoder([["accountMeta",et()],["data",rt()]])}function ee(){return gill.getStructDecoder([["accountMeta",tt()],["data",G()]])}function TD(){return gill.combineCodec(Q(),ee())}function At(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(q())]])}function yt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(X())]])}function CD(){return gill.combineCodec(At(),yt())}function mt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(ur())],["addressTableLookups",gill.getArrayEncoder(Or())]])}function pt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(dr())],["addressTableLookups",gill.getArrayDecoder(Br())]])}function PD(){return gill.combineCodec(mt(),pt())}function Or(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Br(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function bD(){return gill.combineCodec(Or(),Br())}function be(){return gill.getStructEncoder([["member",q()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["isPermanentMember",gill.getBooleanEncoder()],["settingsIndex",gill.getOptionEncoder(gill.getU128Encoder())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))]])}function j(){return gill.getStructDecoder([["member",X()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["isPermanentMember",gill.getBooleanDecoder()],["settingsIndex",gill.getOptionDecoder(gill.getU128Decoder())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))]])}function WD(){return gill.combineCodec(be(),j())}function Ee(){return gill.getStructEncoder([["addressTreeInfo",ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Pe(){return gill.getStructDecoder([["addressTreeInfo",dt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function kD(){return gill.combineCodec(Ee(),Pe())}function se(){return gill.getStructEncoder([["accountMeta",qe()],["data",be()]])}function oe(){return gill.getStructDecoder([["accountMeta",Xe()],["data",j()]])}function VD(){return gill.combineCodec(se(),oe())}function wr(){return gill.getStructEncoder([["accountMeta",et()],["data",be()]])}function Nr(){return gill.getStructDecoder([["accountMeta",tt()],["data",j()]])}function KD(){return gill.combineCodec(wr(),Nr())}function Ye(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([wr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([se()])]])]])}function Ze(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Nr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([oe()])]])]])}function ZD(){return gill.combineCodec(Ye(),Ze())}function qD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function XD(e,n){return n.__kind===e}var Cs=new Uint8Array([223,179,163,190,177,224,67,173]);function LM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Cs)}function cy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(De(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Cs}))}function Ds(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Me(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()]])}function kM(){return gill.combineCodec(cy(),Ds())}function Ms(e){return gill.decodeAccount(e,Ds())}async function wM(e,n,r){let s=await Hr(e,n,r);return gill.assertAccountExists(s),s}async function Hr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ms(s)}async function NM(e,n,r){let s=await ay(e,n,r);return gill.assertAccountsExist(s),s}async function ay(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ms(t))}function HM(){return 168}var bs=new Uint8Array([90,36,35,219,93,225,110,96]);function zM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(bs)}function Ey(){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())],["expectedSigners",gill.getArrayEncoder(q())],["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",X()],["executor",X()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(X())],["expectedSigners",gill.getArrayDecoder(X())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function KM(){return gill.combineCodec(Ey(),vs())}function _s(e){return gill.decodeAccount(e,vs())}async function Us(e,n,r){let s=await Py(e,n,r);return gill.assertAccountExists(s),s}async function Py(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return _s(s)}async function JM(e,n,r){let s=await Ry(e,n,r);return gill.assertAccountsExist(s),s}async function Ry(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>_s(t))}function y({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function Nt(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function H(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function m(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:H(r.value),role:Ws(r.value)?gill.upgradeRoleToSigner(s):s,...Ws(r.value)?{signer:r.value}:{}})}}function Ws(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var ks=new Uint8Array([8]);function uE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ks)}function jr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(ot())],["compressedProofArgs",gill.getOptionEncoder(R())]]),e=>({...e,discriminator:ks}))}function ws(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(ct())],["compressedProofArgs",gill.getOptionDecoder(h())]])}function dE(){return gill.combineCodec(jr(),ws())}async function Ns(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(Nt(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(H(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:jr().encode(c),programAddress:r})}function gE(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:jr().encode(c),programAddress:r})}function AE(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:s()},data:ws().decode(e.data)}}var Gs=new Uint8Array([19]);function SE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gs)}function Fs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(ot())],["settingsMut",me()],["compressedProofArgs",R()]]),e=>({...e,discriminator:Gs}))}function zs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ct())],["settingsMut",pe()],["compressedProofArgs",h()]])}function xE(){return gill.combineCodec(Fs(),zs())}function Ks(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Fs().encode(c),programAddress:r})}function IE(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:{payer:r(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:zs().decode(e.data)}}var Ys=new Uint8Array([16]);function hE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ys)}function Zs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",R()],["settingsArg",Ur()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Ys}))}function qs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",h()],["settingsArg",Wr()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())]])}function bE(){return gill.combineCodec(Zs(),qs())}function Xs(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Zs().encode(c),programAddress:r})}function vE(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:qs().decode(e.data)}}var eo=new Uint8Array([0]);function LE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(eo)}function to(){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()))],["authority",gill.getAddressEncoder()],["metadataUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:eo}))}function ro(){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()))],["authority",gill.getAddressDecoder()],["metadataUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())]])}function kE(){return gill.combineCodec(to(),ro())}function no(e,n){let r=n?.programAddress??d,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.systemProgram),o(t.adminDomainConfig),...i],data:to().encode(c),programAddress:r})}function wE(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:{domainConfig:r(),payer:r(),systemProgram:r(),adminDomainConfig:s()},data:ro().decode(e.data)}}var co=new Uint8Array([4]);function KE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(co)}function ao(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",R()],["member",_r()],["isPermanentMember",gill.getBooleanEncoder()],["userAccountCreationArgs",Ee()],["linkWalletArgs",gill.getOptionEncoder(br())]]),e=>({...e,discriminator:co}))}function io(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",h()],["member",gt()],["isPermanentMember",gill.getBooleanDecoder()],["userAccountCreationArgs",Pe()],["linkWalletArgs",gill.getOptionDecoder(vr())]])}function JE(){return gill.combineCodec(ao(),io())}function uo(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}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),...i],data:ao().encode(c),programAddress:r})}function jE(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(),domainConfig:r(),authority:r()},data:io().decode(e.data)}}var Ao=new Uint8Array([3]);function QE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ao)}function tn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ao}))}function yo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function eP(){return gill.combineCodec(tn(),yo())}async function mo(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=y(c),i=m(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:tn().encode({}),programAddress:r})}function tP(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=y(c),i=m(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:tn().encode({}),programAddress:r})}function rP(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:yo().decode(e.data)}}var lo=new Uint8Array([7]);function uP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lo)}function nn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["userMutArgs",se()],["compressedProofArgs",R()],["setAsDelegate",gill.getBooleanEncoder()]]),e=>({...e,discriminator:lo}))}function To(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["userMutArgs",oe()],["compressedProofArgs",h()],["setAsDelegate",gill.getBooleanDecoder()]])}function dP(){return gill.combineCodec(nn(),To())}async function gP(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true}},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(Nt(c.settingsIndex))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),...i],data:nn().encode(c),programAddress:r})}function So(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),...i],data:nn().encode(c),programAddress:r})}function AP(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(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r()},data:To().decode(e.data)}}var Co=new Uint8Array([18]);function SP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Co)}function Do(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["compressedProofArgs",R()],["settingsCreation",Re()],["userMutArgs",se()],["settingsIndex",gill.getU128Encoder()],["setAsDelegate",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Co}))}function Mo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["compressedProofArgs",h()],["settingsCreation",he()],["userMutArgs",oe()],["settingsIndex",gill.getU128Decoder()],["setAsDelegate",gill.getBooleanDecoder()]])}function xP(){return gill.combineCodec(Do(),Mo())}function Eo(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},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),...i],data:Do().encode(c),programAddress:r})}function IP(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(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r()},data:Mo().decode(e.data)}}var ho=new Uint8Array([5]);function hP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ho)}function bo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",R()],["createUserArgs",gill.getArrayEncoder(Er())]]),e=>({...e,discriminator:ho}))}function vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",h()],["createUserArgs",gill.getArrayDecoder(Pr())]])}function bP(){return gill.combineCodec(bo(),vo())}function _o(e,n){let r=n?.programAddress??d,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),...i],data:bo().encode(c),programAddress:r})}function vP(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(),systemProgram:r()},data:vo().decode(e.data)}}var Oo=new Uint8Array([17]);function kP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oo)}function Bo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",me()],["compressedProofArgs",R()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Oo}))}function Lo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",pe()],["compressedProofArgs",h()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())]])}function wP(){return gill.combineCodec(Bo(),Lo())}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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Bo().encode(c),programAddress:r})}function NP(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:Lo().decode(e.data)}}var Ho=new Uint8Array([2]);function KP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ho)}function Vo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Ho}))}function Go(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function JP(){return gill.combineCodec(Vo(),Go())}function Fo(e,n){let r=n?.programAddress??d,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},a={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),o(t.adminDomainConfig),...i],data:Vo().encode(c),programAddress:r})}function jP(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:{domainConfig:r(),admin:r(),adminDomainConfig:r()},data:Go().decode(e.data)}}var $o=new Uint8Array([1]);function QP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($o)}function Qo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthority",gill.getOptionEncoder(gill.getAddressEncoder())],["newMetadataUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))]]),e=>({...e,discriminator:$o}))}function ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthority",gill.getOptionDecoder(gill.getAddressDecoder())],["newMetadataUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))]])}function eR(){return gill.combineCodec(Qo(),ec())}function tc(e,n){let r=n?.programAddress??d,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.systemProgram),...i],data:Qo().encode(c),programAddress:r})}function tR(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:{domainConfig:r(),authority:r(),systemProgram:r()},data:ec().decode(e.data)}}var sc=new Uint8Array([6]);function iR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(sc)}function oc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",se()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",R()]]),e=>({...e,discriminator:sc}))}function cc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",oe()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",h()]])}function uR(){return gill.combineCodec(oc(),cc())}function ac(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:false}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...i],data:oc().encode(c),programAddress:r})}function dR(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:cc().decode(e.data)}}var dc=new Uint8Array([32]);function lR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(dc)}function gc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",nt()],["compressedProofArgs",R()],["settingsCreationArgs",Re()]]),e=>({...e,discriminator:dc}))}function Ac(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",st()],["compressedProofArgs",h()],["settingsCreationArgs",he()]])}function TR(){return gill.combineCodec(gc(),Ac())}function SR(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},a={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.authority),o(t.adminDomainConfig),...i],data:gc().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:{authority:r(),adminDomainConfig:r()},data:Ac().decode(e.data)}}var pc=new Uint8Array([31]);function RR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pc)}function fc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",be()],["compressedProofArgs",R()],["userCreationArgs",Ee()]]),e=>({...e,discriminator:pc}))}function lc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",j()],["compressedProofArgs",h()],["userCreationArgs",Pe()]])}function hR(){return gill.combineCodec(fc(),lc())}function bR(e,n){let r=n?.programAddress??d,t={authority:{value:e.authority??null,isWritable:true},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},a={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.authority),o(t.adminDomainConfig),...i],data:fc().encode(c),programAddress:r})}function vR(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:{authority:r(),adminDomainConfig:r()},data:lc().decode(e.data)}}var Sc=new Uint8Array([29]);function kR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sc)}function cn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Sc}))}function xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())]])}function wR(){return gill.combineCodec(cn(),xc())}async function NR(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(H(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:cn().encode(c),programAddress:r})}function Ic(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:cn().encode(c),programAddress:r})}function HR(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:xc().decode(e.data)}}var Mc=new Uint8Array([27]);function jR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mc)}function Ec(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:Mc}))}function Pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function YR(){return gill.combineCodec(Ec(),Pc())}function Rc(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:Ec().encode(c),programAddress:r})}function ZR(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:Pc().decode(e.data)}}var bc=new Uint8Array([30]);function rh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bc)}function un(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:bc}))}function vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())]])}function nh(){return gill.combineCodec(un(),vc())}async function sh(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(H(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(H(t.source.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(H(t.destination.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:un().encode(c),programAddress:r})}function _c(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:un().encode(c),programAddress:r})}function oh(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 Bc=new Uint8Array([28]);function Ah(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bc)}function dn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:Bc}))}function Lc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function yh(){return gill.combineCodec(dn(),Lc())}async function mh(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(H(t.source.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(H(t.destination.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:dn().encode(c),programAddress:r})}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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...i],data:dn().encode(c),programAddress:r})}function ph(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:Lc().decode(e.data)}}var Hc=new Uint8Array([12]);function Ch(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hc)}function Vc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:Hc}))}function Gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())]])}function Dh(){return gill.combineCodec(Vc(),Gc())}function Fc(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},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Vc().encode(c),programAddress:r})}function Mh(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:Gc().decode(e.data)}}var Jc=new Uint8Array([23]);function _h(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function jc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:Jc}))}function Yc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function Uh(){return gill.combineCodec(jc(),Yc())}function Zc(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:jc().encode(c),programAddress:r})}function Wh(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:Yc().decode(e.data)}}var $c=new Uint8Array([9]);function Hh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($c)}function Qc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",At()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:$c}))}function ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",yt()],["secp256r1VerifyArgs",gill.getOptionDecoder(L())]])}function Vh(){return gill.combineCodec(Qc(),ea())}function ta(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...i],data:Qc().encode(c),programAddress:r})}function Gh(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:ea().decode(e.data)}}var sa=new Uint8Array([20]);function Zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(sa)}function oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",At()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:sa}))}function ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",yt()],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function qh(){return gill.combineCodec(oa(),ca())}function aa(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...i],data:oa().encode(c),programAddress:r})}function Xh(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:ca().decode(e.data)}}var da=new Uint8Array([13]);function sb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function ga(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:da}))}function Aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())]])}function ob(){return gill.combineCodec(ga(),Aa())}function ya(e,n){let r=n?.programAddress??d,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ga().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(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Aa().decode(e.data)}}var fa=new Uint8Array([24]);function yb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fa)}function la(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:fa}))}function Ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function mb(){return gill.combineCodec(la(),Ta())}function Sa(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:la().encode(c),programAddress:r})}function pb(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:Ta().decode(e.data)}}var Ca=new Uint8Array([11]);function Ib(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function Da(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Ca}))}function Ma(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Cb(){return gill.combineCodec(Da(),Ma())}function Ea(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=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:Da().encode(c),programAddress:r})}function Db(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:Ma().decode(e.data)}}var ha=new Uint8Array([22]);function bb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ha)}function ba(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ha}))}function va(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function vb(){return gill.combineCodec(ba(),va())}function _a(e,n){let r=n?.programAddress??d,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:ba().encode(c),programAddress:r})}function _b(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 Oa=new Uint8Array([10]);function wb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oa)}function Ba(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:Oa}))}function La(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())]])}function Nb(){return gill.combineCodec(Ba(),La())}function ka(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ba().encode(c),programAddress:r})}function Hb(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:La().decode(e.data)}}var Ha=new Uint8Array([21]);function jb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ha)}function Va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:Ha}))}function Ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(L())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function Yb(){return gill.combineCodec(Va(),Ga())}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},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Va().encode(c),programAddress:r})}function Zb(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:Ga().decode(e.data)}}var Ja=new Uint8Array([14]);function tv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function ja(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ja}))}function Ya(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function rv(){return gill.combineCodec(ja(),Ya())}function Za(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=y({}),i=m(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:ja().encode({}),programAddress:r})}function nv(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:Ya().decode(e.data)}}var $a=new Uint8Array([25]);function uv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($a)}function Qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:$a}))}function ei(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function dv(){return gill.combineCodec(Qa(),ei())}function ti(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=y({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:Qa().encode(c),programAddress:r})}function gv(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:ei().decode(e.data)}}var si=new Uint8Array([15]);function Tv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(si)}function oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:si}))}function ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",pt()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())]])}function Sv(){return gill.combineCodec(oi(),ci())}function ai(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:oi().encode(c),programAddress:r})}function xv(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:ci().decode(e.data)}}var di=new Uint8Array([26]);function Rv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(di)}function gi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",Q()],["compressedProofArgs",R()]]),e=>({...e,discriminator:di}))}function Ai(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",pt()],["secp256r1VerifyArgs",gill.getArrayDecoder(J())],["settingsReadonlyArgs",ee()],["compressedProofArgs",h()]])}function hv(){return gill.combineCodec(gi(),Ai())}function yi(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=y(a),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:gi().encode(c),programAddress:r})}function bv(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:Ai().decode(e.data)}}var d="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",eS=(t=>(t[t.DomainConfig=0]="DomainConfig",t[t.GlobalCounter=1]="GlobalCounter",t[t.Settings=2]="Settings",t[t.TransactionBuffer=3]="TransactionBuffer",t))(eS||{});function y_(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;throw new Error("The provided account could not be identified as a multiWallet account.")}var tS=(p=>(p[p.ChangeConfig=0]="ChangeConfig",p[p.ChangeConfigCompressed=1]="ChangeConfigCompressed",p[p.CompressSettingsAccount=2]="CompressSettingsAccount",p[p.CreateDomainConfig=3]="CreateDomainConfig",p[p.CreateDomainUserAccount=4]="CreateDomainUserAccount",p[p.CreateGlobalCounter=5]="CreateGlobalCounter",p[p.CreateMultiWallet=6]="CreateMultiWallet",p[p.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",p[p.CreateUserAccounts=8]="CreateUserAccounts",p[p.DecompressSettingsAccount=9]="DecompressSettingsAccount",p[p.DisableDomainConfig=10]="DisableDomainConfig",p[p.EditDomainConfig=11]="EditDomainConfig",p[p.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",p[p.MigrateCompressedSettings=13]="MigrateCompressedSettings",p[p.MigrateCompressedUsers=14]="MigrateCompressedUsers",p[p.NativeTransferIntent=15]="NativeTransferIntent",p[p.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",p[p.TokenTransferIntent=17]="TokenTransferIntent",p[p.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",p[p.TransactionBufferClose=19]="TransactionBufferClose",p[p.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",p[p.TransactionBufferCreate=21]="TransactionBufferCreate",p[p.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",p[p.TransactionBufferExecute=23]="TransactionBufferExecute",p[p.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",p[p.TransactionBufferExtend=25]="TransactionBufferExtend",p[p.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",p[p.TransactionBufferVote=27]="TransactionBufferVote",p[p.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",p[p.TransactionExecute=29]="TransactionExecute",p[p.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",p[p.TransactionExecuteSync=31]="TransactionExecuteSync",p[p.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",p))(tS||{});function m_(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([19])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),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([17])),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([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var nS=6e3,sS=6001,oS=6002,cS=6003,aS=6004,iS=6005,uS=6006,dS=6007,gS=6008,AS=6009,yS=6010,mS=6011,pS=6012,fS=6013,lS=6014,TS=6015,SS=6016,xS=6017,IS=6018,CS=6019,DS=6020,MS=6021,ES=6022,PS=6023,RS=6024,hS=6025,bS=6026,vS=6027,_S=6028,US=6029,WS=6030,OS=6031,BS=6032,LS=6033,kS=6034,wS=6035,NS=6036,HS=6037,VS=6038,GS=6039,FS=6040,mi;process.env.NODE_ENV!=="production"&&(mi={[IS]:"This member is already delegated to another wallet.",[NS]:"The domain configuration account is disabled. Please contact support or try again later.",[HS]:"Missing domain configuration account. Include it as a required account in this instruction.",[cS]:"Duplicate public keys detected among members. Each member must have a unique key.",[oS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[AS]:"No members provided. A multisig wallet must contain at least one member.",[bS]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[vS]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[_S]:"Declared buffer size does not match the actual serialized size.",[MS]:"Not enough members with vote permission to meet the approval threshold.",[CS]:"At least one signer with execute permission is required to proceed.",[DS]:"At least one signer with initiate permission is required to perform this action.",[lS]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[TS]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[hS]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[fS]:"Unexpected number of accounts provided for this instruction.",[sS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[nS]:"Invalid signature: the provided signature does not match the expected message payload.",[kS]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[mS]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[pS]:"Malformed transaction message: structure or formatting does not match the expected layout.",[BS]:"An input string exceeds the maximum allowed character length.",[VS]:"This member is not registered under the provided domain configuration.",[SS]:"A required account is missing from the instruction context.",[LS]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[xS]:"User mutation arguments are required when performing add or remove delegate operations.",[PS]:"No valid signer found in this transaction.",[uS]:"Only one permanent member is allowed per wallet.",[dS]:"Only one transaction manager is allowed per wallet.",[FS]:"The given origin index is not in the whitelisted origins.",[aS]:"Permanent members cannot be removed from a wallet.",[iS]:"This operation cannot assign a permanent member.",[OS]:"Writable CPI calls to protected accounts are not permitted.",[GS]:"The relying party ID hash does not match the one defined in the domain configuration.",[wS]:"The specified slot number was not found in the provided slot history.",[yS]:"Too many members: a maximum of 4 members are supported.",[US]:"This transaction has expired. It must be executed within 3 minutes of approval.",[gS]:"This operation cannot assign a transaction manager.",[WS]:"This transaction has not yet reached the required approval threshold.",[RS]:"Only the transaction creator or rent payer may close this transaction buffer.",[ES]:"Member is not part of the expected signers for this transaction."});function x_(e){return process.env.NODE_ENV!=="production"?mi[e]:"Error message not available in production bundles."}function I_(e,n,r){return gill.isProgramError(e,n,d,r)}var Tt={Ed25519:1,Secp256r1:2};var fe={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},yn=8,St=16,ge=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(fe).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var mn=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!==mn)throw new Error(`Invalid public key length, expected ${mn} 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===mn)return n;throw new Error("Invalid public key input")}toBytes(){let n=this.toBuffer();return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}toString(){return this.toBase58()}toJSON(){return this.toBase58()}},M=class extends de{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;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;}};function JS(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function jS(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var fi=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(JS())],["addressTableLookups",gill.getArrayCodec(jS())]]);function li(e){return fi.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 Ti(e){let n=fi.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 fn="v2",Si="revibase.com",xi="https://auth.revibase.com",Ii="https://api.revibase.com";function te(e){let n=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e)),new Uint8Array(gill.getUtf8Encoder().encode(fn))]),r=new web3_js.PublicKey(stateless_js.batchAddressTree);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(n,r,new web3_js.PublicKey(d)).toString(),"base58"),addressTree:r}}function F(e){let n=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof de?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e)),new Uint8Array(gill.getUtf8Encoder().encode(fn))]),r=new web3_js.PublicKey(stateless_js.batchAddressTree);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(n,r,new web3_js.PublicKey(d.toString())).toString(),"base58"),addressTree:r}}async function we({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha256.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 zt(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Ri(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 le(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 hi(e){let n=await Y(e);return await le(n)}async function oU(){let[e]=await gill.getProgramDerivedAddress({programAddress:d,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function Tn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await ae().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let a=Math.ceil((s.unitsConsumed??0)*1.1)||8e5;return a>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:a})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function _i(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));s.sort((c,a)=>c-a);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function Ui(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 w(e,n=0){let r=e instanceof M?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}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,a=r?.authData&&r.verifyArgs?.clientDataJson?new Uint8Array([...r.authData,...sha256.sha256(r.verifyArgs.clientDataJson)]):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:a,publicKey:i}}function Ne(e){if(e instanceof de)return {keyType:Tt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:Tt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function vi(e){return e instanceof M?e.toString():e.address.toString()}function Ae(e){let n=new Set,r=[];for(let s of e)n.has(vi(s))||(r.push(s),n.add(vi(s)));if(r.filter(s=>s instanceof M).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function Wi({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 Oi(e){let n=await fetch(`${e}/getRandomPayer`),{randomPayer:r}=await n.json();return {address:gill.address(r),async signTransactions(s){let t={publicKey:r,transactions:s.map(i=>gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(i)))},a=await(await fetch(`${e}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in a)throw new Error(a.error);return a.signatures.map(i=>({[gill.address(r)]:gill.getBase58Encoder().encode(i)}))}}}var He=null,Jt=null,jt=null,Yt=null,Zt=null,Kt=null,Sn=null,qt=null,xn=null,In=null,Bi=null;function Li(){if(!He)throw new Error("Rpc is not initialized yet.");return He}function xt(){if(!Jt)throw new Error("Rpc is not initialized yet");return Jt}function ae(){if(!jt)throw new Error("Rpc is not initialized yet");return jt}function ki(){if(!Yt)throw new Error("Rpc is not initialized yet.");return Yt}function wi(){if(!Zt)throw new Error("Rpc is not initialized yet");return Zt}async function SU(){return Kt||(Kt=await Oi(Sn??Ii)),Kt}function Cn(){if(!qt)throw new Error("Jito Bundle Config is not set.");return qt}function xe(){return xn??xi}function Ni(){return In}function Xt(){return Bi}function xU(){Jt=null,jt=null,He=null,Kt=null,Sn=null,qt=null,xn=null,Yt=null,Zt=null,In=null;}function IU({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,authorizedClient:a,additionalInfo:i}){He=e,Jt=stateless_js.createRpc(He,r,n);let{rpc:o,sendAndConfirmTransaction:u}=gill.createSolanaClient({urlOrMoniker:He});jt=o,Yt=u,Zt=programs.estimateComputeUnitLimitFactory({rpc:o}),Sn=t??null,qt=s??null,xn=c??null,In=a??null,Bi=i??null;}var z=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 xt().getStateTreeInfos();return this.packOutputTreeIndex(stateless_js.selectStateTreeInfo(n))}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 Ve(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await xt().getCompressedAccount(e);return s&&n?.set(e.toString(),s),s}}async function ie(e,n){let s=(await Promise.all(e.map(async t=>Ve(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 k(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function Ie(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,g)=>({treeInfo:n[g],root:r[g],rootIndex:s[g],address:u.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((u,g)=>({addressTreeInfo:a[g],outputStateTreeIndex:i,address:u.address,type:u.type}))}function re(e,n,r,s,t,c,a){let i=[];for(let g=0;g<n.length;g++)i.push({treeInfo:n[g],rootIndex:s[g],leafIndex:r[g],proveByIndex:t[g],hash:c[g].hash});let o=e.packTreeInfos(i,[]).stateTrees;if(!o)throw new Error("Unable to parsed data.");return c.map((g,A)=>({data:a.decode(g.data.data),accountMeta:{treeInfo:o.packedTreeInfos[A],address:new Uint8Array(g.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function ye(e,n,r,s){let t=null,c=null,a=new z;if(e){await a.addSystemAccounts();let{address:i}=te(n),o=(await ie([{address:i,type:"Settings"}],s))[0];r?c={rootIndices:[0],roots:[],leafIndices:[o.leafIndex],leaves:[],treeInfos:[o.treeInfo],proveByIndices:[o.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)))}}:c=await $([o],[]);let u=a.packTreeInfos([{treeInfo:c.treeInfos[0],rootIndex:c.rootIndices[0],leafIndex:c.leafIndices[0],proveByIndex:c.proveByIndices[0],hash:o.hash}],[]).stateTrees;if(!u)throw new Error("Unable to parsed data.");t={accountMeta:{address:new Uint8Array(o.address),treeInfo:u.packedTreeInfos[0]},data:G().decode(o.data?.data)};}return {settingsReadonlyArgs:t,proof:c,packedAccounts:a}}async function $(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await xt().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 Gi(e,n){let r=await Dx(e,n);if(!r)throw new Error("User cannot be found.");return r}async function Dx(e,n){let{address:r}=F(e),s=await Ve(r,n);return s?.data?.data?j().decode(s.data.data):null}async function $t(e,n){let r=await Mx(e,n);if(!r)throw new Error("Settings cannot be found.");return r}async function Mx(e,n){try{let{address:r}=te(e),s=await Ve(r,n);if(!s?.data?.data)return null;let t=G().decode(s.data.data);return t.data.__option==="None"?null:{...t.data.value,isCompressed:!0}}catch{let r=await Hr(ae(),await Y(e));return r.exists?{...r.data,members:r.data.members.slice(0,r.data.membersLen),isCompressed:false}:null}}var Ge=null,zi=2e3,Ki=3e3,Ex=300*1e3;async function Qt({authUrl:e,additionalInfo:n,signer:r,popUp:s=null,data:t}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");return new Promise((c,a)=>{let i=new URL(e).origin,o=null,u=setInterval(()=>{s&&s.closed&&(A(),a(new Error("User closed the authentication window")));},500),g=setTimeout(()=>{l("Authentication timeout."),A(),a(new Error("Authentication timed out"));},Ex);function A(){clearInterval(u),clearTimeout(g),o&&clearTimeout(o),Ge&&window.removeEventListener("message",Ge),s&&s.close();}if(s?s.location.replace(e):s=Zi(e),!s){a(new Error("Disable your popup blocker to continue."));return}function l(...S){n?.debug&&console.debug("[Popup]",...S);}let T=S=>{let D=S.origin===i,E=S.source===s;if(!D||!E||!S.isTrusted||!s){l("Ignored message from unknown source",S);return}switch(S.data.type){case "popup-ready":l("Popup is ready, sending auth data"),s.postMessage({type:"popup-init",payload:{signer:r?.toString(),data:t,additionalInfo:n}},i),o=setTimeout(()=>{A(),a(new Error("User closed the authentication window"));},zi+Ki);break;case "popup-complete":l("Received completion message");try{let I=JSON.parse(S.data.payload);A(),c(I);}catch{a(new Error("Failed to parse response payload"));}break;case "popup-heartbeat":l("Received heartbeat"),o&&(clearTimeout(o),o=setTimeout(()=>{A(),a(new Error("User closed the authentication window"));},zi+Ki));break;case "popup-closed":l("Popup explicitly closed"),A(),a(new Error("User closed the authentication window"));break;default:l("Unknown message type",S.data.type);}};Ge&&window.removeEventListener("message",Ge),Ge=T,window.addEventListener("message",Ge);})}function er(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ct(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}function tr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function Px(e){let n=new Uint8Array(e.length/2);for(let r=0;r<n.length;r++)n[r]=parseInt(e.slice(r*2,r*2+2),16);return n}function Ji(e){let n=new Set(["type","challenge","origin","crossOrigin"]),r={};for(let t in e)n.has(t)||(r[t]=e[t]);if(Object.keys(r).length===0)return new Uint8Array([]);let s=JSON.stringify(r);return new TextEncoder().encode(s.slice(1,-1))}function ji(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let a=e[s]|e[s+1]<<8;if(s+=2,s+a>e.length)throw new Error("MaxLengthExceeded");let i=e.slice(s,s+a),o=t.decode(i);r.push(o),s+=a;}return r}function Yi(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,g=o[0]===0&&o.length>32?o.slice(1):o;if(u.length>32||g.length>32)throw new Error("r or s length > 32 bytes");let A=new Uint8Array(32);A.set(u,32-u.length);let l=p256.p256.Point.CURVE().n>>1n,T=BigInt("0x"+tr(g)),D=(T>l?p256.p256.Point.CURVE().n-T:T).toString(16).padStart(64,"0"),E=Px(D);return new Uint8Array([...A,...E])}function Zi(e=`${xe()}/loading`){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let n=window.innerWidth||screen.availWidth,r=window.innerHeight||screen.availHeight,s=n<=768,t,c,a,i;if(s)t=n,c=r,a=0,i=0;else {let g=window.screenLeft??window.screenX,A=window.screenTop??window.screenY,l=window.innerWidth??document.documentElement.clientWidth??screen.width,T=window.innerHeight??document.documentElement.clientHeight??screen.height;t=500,c=600,i=g+(l-t)/2,a=A+(T-c)/2;}let o=[`width=${t}`,`height=${c}`,`top=${a}`,`left=${i}`,"toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes"].join(","),u=window.open(e,"_blank",o);return u&&u.focus(),u}function cW(e){let n=tinyCbor.decodeCBOR(e),r=p256.p256.Point.fromAffine({x:BigInt("0x"+tr(n.get(-2))),y:BigInt("0x"+tr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function $i(e){let r=p256.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 aW(e,n=0,r=false){let{authenticatorData:s,clientDataJSON:t,signature:c}=e.authResponse.response,a=new Uint8Array(Ct(s)),i=JSON.parse(new TextDecoder().decode(Ct(t))),o=Ji(i),u=Yi(new Uint8Array(Ct(c))),g=await we({rpIdHash:a.subarray(0,32)});return new M(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Ct(t)),truncatedClientDataJson:o,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},domainConfig:g,authData:a,signature:u,originIndex:n,crossOrigin:r})}async function iW(e,n){let{data:r}=await On(ae(),e),t=ji(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}async function SW(e){let n=await Tn(e,true),r=await Ui(n.map(gill.getBase64EncodedWireTransaction),Li()),s=await Tn(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await zx(s.map(gill.getBase64EncodedWireTransaction))}async function xW({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await ae().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([wi()(c),_i(ae(),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 ki()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function zx(e,n=10,r=1e3,s=Cn()){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 IW(e,n=30,r=3e3,s=Cn()){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.")}async function CW({signer:e,index:n,transactionMessageBytes:r,cachedAccounts:s}){let t=await $t(n,s);if(t.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:c}=t.members.find(l=>Dt(l.pubkey)===e.toString())??{};if(!c)throw new Error("No permissions found for the current member.");let a=ge.has(c,fe.InitiateTransaction),i=ge.has(c,fe.VoteTransaction),o=ge.has(c,fe.ExecuteTransaction);if(a&&i&&o)return null;if(!i||!o)throw new Error("Signer lacks the required Vote/Execute permissions.");let u=t.members.find(l=>ge.has(l.permissions,St));if(!u)throw new Error("No transaction manager available in wallet.");let g=gill.address(Dt(u.pubkey)),A=await Gi(g,s);if(A.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return Kx(g,A.transactionManagerUrl.value,r)}function Kx(e,n,r){return {address:e,async signTransactions(s){let t={publicKey:e.toString(),transactions:s.map(gill.getBase64EncodedWireTransaction)};r&&(t.transactionMessageBytes=gill.getBase64Decoder().decode(r));let c=Ni();if(c){let{url:o,publicKey:u}=c,A=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transactions:t.transactions,publicKey:u})})).json();if("error"in A)throw new Error(A.error);t.authorizedClient={publicKey:u,signatures:A.signatures};}let i=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function Dt(e){return e.keyType===Tt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function VW({index:e,configActionsArgs:n,payer:r,compressed:s=false,cachedAccounts:t}){let c=await hi(e),a=[],i=[];for(let x of n)if(x.type==="AddMembers")a.push(...x.members.map(f=>f.pubkey instanceof M?{address:F(f.pubkey).address,type:"User"}:f.setAsDelegate?{address:F(f.pubkey.address).address,type:"User"}:{address:F(f.pubkey).address,type:"User"}));else if(x.type==="RemoveMembers")i.push(...x.members.map(f=>({address:F(f.pubkey).address,type:"User"})));else if(x.type==="EditPermissions")for(let f of x.members)f.delegateOperation!==2&&(f.delegateOperation===0?a:i).push({address:F(f.pubkey).address,type:"User"});let o=new z,u=null,g=null,A=[];if(a.length||i.length||s){await o.addSystemAccounts();let x=[...s?[{address:te(e).address,type:"Settings"}]:[],...i,...a],f=x.length?await ie(x,t):[];if(f.length){u=await $(f,[]);let C=f.filter(U=>U.type==="Settings"),P=f.filter(U=>U.type==="User");s&&u&&(g=re(o,u.treeInfos.slice(0,1),u.leafIndices.slice(0,1),u.rootIndices.slice(0,1),u.proveByIndices.slice(0,1),C,G())[0]),P.length&&u&&(A=re(o,u.treeInfos.slice(s?1:0),u.leafIndices.slice(s?1:0),u.rootIndices.slice(s?1:0),u.proveByIndices.slice(s?1:0),P,j()));}}let l=[],T=[];for(let x of n)switch(x.type){case "AddMembers":{let f=[];for(let C of x.members)if(C.pubkey instanceof M){let P=l.length,{message:U,signature:W,publicKey:O,domainConfig:N}=w(C.pubkey,P);U&&W&&O&&l.push({message:U,signature:W,publicKey:O}),N&&o.addPreAccounts([{address:N,role:gill.AccountRole.READONLY}]);let Z=await rr(C.pubkey,A);Z&&f.push(tu({...C,permissionArgs:C.permissions,index:P,userMutArgs:Z}));}else {C.setAsDelegate&&o.addPreAccounts([{address:C.pubkey.address,role:gill.AccountRole.READONLY_SIGNER,signer:C.pubkey}]);let P=await rr(C.setAsDelegate?C.pubkey.address:C.pubkey,A);P&&f.push(tu({...C,permissionArgs:C.permissions,index:-1,userMutArgs:P}));}T.push({__kind:x.type,fields:[f]});break}case "RemoveMembers":{let f=await Promise.all(x.members.map(async C=>{let P=await rr(C.pubkey,A);if(!P)throw new Error("User account not found");return Zx({...C,userMutArgs:P})}));T.push({__kind:x.type,fields:[f]});break}case "EditPermissions":{let f=await $t(e,t),C=f.members.find(W=>ge.has(W.permissions,yn)),P=f.members.find(W=>ge.has(W.permissions,St)),U=await Promise.all(x.members.map(async W=>{let O=!!C?.pubkey&&Dt(C.pubkey)===W.pubkey.toString();if(!!P?.pubkey&&Dt(P.pubkey)===W.pubkey.toString())throw new Error("Transaction Manager's permission cannot be changed.");let Z=W.delegateOperation!==2?await rr(W.pubkey,A):void 0;return Yx({...W,permissionArgs:W.permissions,isPermanentMember:O,userMutArgs:Z})}));T.push({__kind:x.type,fields:[U]});break}default:T.push({__kind:x.type,fields:[x.threshold]});}let{remainingAccounts:S,systemOffset:D}=o.toAccountMetas(),E=k(u,D);return {instructions:s?[Ks({configActions:T,payer:r,authority:gill.createNoopSigner(c),compressedProofArgs:E,settingsMut:g,remainingAccounts:S})]:[await Ns({settingsIndex:e,configActions:T,payer:r,compressedProofArgs:E,remainingAccounts:S})],secp256r1VerifyInput:l}}async function rr(e,n){let{address:r}=F(e);return n.find(t=>new Jx__default.default(new Uint8Array(t.accountMeta.address)).eq(r))}function Yx({pubkey:e,permissionArgs:n,userMutArgs:r,delegateOperation:s,isPermanentMember:t}){if(t&&(r||s!==2))throw new Error("Delegation cannot be modified for a permanent member.");let c=su(n,t);return {memberKey:Ne(e),permissions:c,userArgs:r?gill.some(r):gill.none(),delegateOperation:s}}function Zx({pubkey:e,userMutArgs:n}){if(n.data.isPermanentMember)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:Ne(e),userArgs:n.data.settingsIndex.__option==="Some"?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function tu({pubkey:e,permissionArgs:n,index:r,userMutArgs:s,setAsDelegate:t,isTransactionManager:c}){return {member:{permissions:qx(s,t,n,c),pubkey:Ne(e)},verifyArgs:e instanceof M&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin}):gill.none(),userArgs:t?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]},setAsDelegate:t}}function qx(e,n,r,s){let t=e.data,c=t.isPermanentMember;if(c){if(!n)throw new Error("Permanent members must also be delegates. Please set `setAsDelegate = true`.");if(t.settingsIndex.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}if(s){if(r.execute||r.vote)throw new Error("Transaction Manager can only have initiate permission");if(n)throw new Error("Transaction Manager cannot be a delegate. Please set `setAsDelegate = false`.")}return su(r,c,s)}function su(e,n=false,r=false){let s=[];return e.initiate&&s.push(fe.InitiateTransaction),e.vote&&s.push(fe.VoteTransaction),e.execute&&s.push(fe.ExecuteTransaction),n&&s.push(yn),r&&s.push(St),ge.fromPermissions(s)}var Fe=33,ze=64,Rn=14,nI=2,sI=gill.address("Secp256r1SigVerify1111111111111111111111111");function oI(){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 cI(){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 iu(){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=cI();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=Rn;let a=[];for(let i=0;i<r;i++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Fe).decode(e,n);n+=Fe;let u=gill.fixDecoderSize(gill.getBytesDecoder(),ze).decode(e,n);n+=ze;let g=t[i].messageDataSize,A=gill.fixDecoderSize(gill.getBytesDecoder(),g).decode(e,n);n+=g,a.push({publicKey:o,signature:u,message:A});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function uu(){return gill.createEncoder({getSizeFromValue:e=>{let n=Rn*e.offsets.length,r=e.payload.reduce((s,t)=>s+Fe+ze+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let s=oI();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Fe).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),ze).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function zW(){return gill.combineCodec(uu(),iu())}function V(e,n){let r=e.length,s=nI+r*Rn,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],g=s,A=g+Fe,l=A+ze;t.push({publicKeyOffset:g,publicKeyInstructionIndex:65535,signatureOffset:A,signatureInstructionIndex:65535,messageDataOffset:l,messageDataSize:u.length,messageInstructionIndex:65535}),s+=Fe+ze+u.length;}let c=n?.programAddress??sI,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:uu().encode(a)}}function KW(e){return {programAddress:e.programAddress,accounts:{},data:iu().decode(e.data)}}async function tO({index:e,payer:n,signers:r,cachedAccounts:s}){let t=new z;await t.addSystemAccounts();let c=await Y(e),{address:a,addressTree:i}=te(e),o=await Ve(a,s),u,g;if(o?.data?.data)if(G().decode(o.data.data).data.__option==="None"){let C=await ie([{address:a,type:"Settings"}],s);g=await $(C,[]),u={__kind:"Mutate",fields:[re(t,g.treeInfos,g.leafIndices,g.rootIndices,g.proveByIndices,C.filter(U=>U.type==="Settings"),G())[0]]};}else throw new Error("Settings account is already compressed.");else {let f=[{address:a,tree:i,queue:i,type:"Settings"}];g=await $([],f),u={__kind:"Create",fields:[(await Ie(t,g.treeInfos,g.roots,g.rootIndices,f))[0]]};}let A=Ae(r),l=A.filter(f=>f instanceof M),T=[],S=[];for(let f of l){let C=T.length,{domainConfig:P,verifyArgs:U,signature:W,publicKey:O,message:N}=w(f,C);N&&W&&O&&T.push({message:N,signature:W,publicKey:O}),P&&(t.addPreAccounts([{address:P,role:gill.AccountRole.READONLY}]),U?.__option==="Some"&&S.push({domainConfigKey:P,verifyArgs:U.value}));}t.addPreAccounts(A.filter(f=>"address"in f).map(f=>({address:f.address,role:gill.AccountRole.READONLY_SIGNER,signer:f})));let{remainingAccounts:D,systemOffset:E}=t.toAccountMetas(),I=k(g,E),x=[];return T.length>0&&x.push(V(T)),x.push(Xs({settings:c,settingsArg:u,compressedProofArgs:I,payer:n,secp256r1VerifyArgs:S,remainingAccounts:D})),x}async function cO({payer:e,rpId:n,origins:r,authority:s,metadataUrl:t,adminDomainConfig:c}){let a=await we({rpId:n});return no({origins:r,authority:s,payer:e,domainConfig:a,rpId:n,metadataUrl:t,adminDomainConfig:c,remainingAccounts:[]})}async function pO({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new z;await c.addSystemAccounts();let a=[];r.settingsIndex&&(a.push({address:te(r.settingsIndex).address,type:"Settings"}),r.transactionManager&&a.push({address:F(r.transactionManager).address,type:"User"}));let i=a.length?await ie(a,t):[],{address:o,addressTree:u}=F(r.member),g=[{address:o,type:"User",tree:u,queue:u}],A=await $(i,g),l=null,T=null,S=i.filter(C=>C.type==="Settings"),D=i.filter(C=>C.type==="User");S.length&&(l=re(c,A.treeInfos.slice(0,1),A.leafIndices.slice(0,1),A.rootIndices.slice(0,1),A.proveByIndices.slice(0,1),S,G())[0]),D.length&&(T=re(c,A.treeInfos.slice(1,2),A.leafIndices.slice(1,2),A.rootIndices.slice(1,2),A.proveByIndices.slice(1,2),D,j())[0]);let E=await Ie(c,A.treeInfos.slice(i.length),A.roots.slice(i.length),A.rootIndices.slice(i.length),g),{remainingAccounts:I,systemOffset:x}=c.toAccountMetas(),f=k(A,x);return uo({payer:n,authority:e,compressedProofArgs:f,member:gt().decode(r.member.toBuffer()),isPermanentMember:r.isPermanentMember,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:T?gill.some(T):gill.none()}):gill.none(),userAccountCreationArgs:E[0],domainConfig:s,remainingAccounts:I})}async function SO({payer:e}){let n=await zt();return mo({payer:e,globalCounter:n})}async function PO({createUserArgs:e,payer:n}){let r=new z;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let s=e.map(u=>{let{address:g,addressTree:A}=F(u.member.address);return {address:g,tree:A,queue:A,type:"User"}}),t=await $([],s),c=await Ie(r,t.treeInfos,t.roots,t.rootIndices,s),{remainingAccounts:a,systemOffset:i}=r.toAccountMetas(),o=k(t,i);return _o({compressedProofArgs:o,payer:n,createUserArgs:e.map((u,g)=>({member:u.member.address,isPermanentMember:u.isPermanentMember,userCreationArgs:c[g],transactionManagerUrl:u.transactionManagerUrl??null})),remainingAccounts:a})}async function vO({admin:e,rpId:n,disable:r}){let s=await we({rpId:n});return Fo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function OO({authority:e,domainConfig:n,newAuthority:r,newOrigins:s,newMetadataUrl:t}){return tc({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthority:r?gill.some(r):gill.none(),newMetadataUrl:t?gill.some(t):gill.none(),remainingAccounts:[]})}async function HO({authority:e,transactionManagerUrl:n}){let r=new z;await r.addSystemAccounts();let s=await ie([{address:F(e.address).address,type:"User"}]),t=await $(s,[]),c=re(r,t.treeInfos,t.leafIndices,t.rootIndices,t.proveByIndices,s,j())[0],{remainingAccounts:a,systemOffset:i}=r.toAccountMetas(),o=k(t,i);return ac({authority:e,transactionManagerUrl:n,compressedProofArgs:o,userMutArgs:c,remainingAccounts:a})}async function nB({index:e,payer:n,initialMember:r,setAsDelegate:s,compressed:t=false,cachedAccounts:c}){let a=await zt(),{domainConfig:i,verifyArgs:o,message:u,signature:g,publicKey:A}=w(r),l=[];u&&g&&A&&l.push({message:u,signature:g,publicKey:A});let T=new z;await T.addSystemAccounts();let S=[],D=[];if(D.push(...await ie([{address:F("address"in r?r.address:r).address,type:"User"}],c)),t){let{address:N,addressTree:Z}=te(e);S.push({address:N,queue:Z,tree:Z,type:"Settings"});}let E=D.length,I=await $(D,S),x=re(T,I.treeInfos.slice(0,E),I.leafIndices.slice(0,E),I.rootIndices.slice(0,E),I.proveByIndices.slice(0,E),D.filter(N=>N.type==="User"),j())[0],C=(await Ie(T,I.treeInfos.slice(E),I.roots.slice(E),I.rootIndices.slice(E),S)).find(N=>N.type==="Settings")??null;i?T.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]):"address"in r&&T.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:P,systemOffset:U}=T.toAccountMetas(),W=k(I,U),O=[];if(t){if(!C)throw new Error("Settings creation args is missing.");O.push(Eo({settingsIndex:e,payer:n,initialMember:r instanceof M?void 0:r,secp256r1VerifyArgs:o,domainConfig:i,userMutArgs:x,globalCounter:a,compressedProofArgs:W,settingsCreation:C,setAsDelegate:s,remainingAccounts:P}));}else {let N=await Y(e);O.push(So({settingsIndex:e,settings:N,payer:n,initialMember:r instanceof M?void 0:r,secp256r1VerifyArgs:o,domainConfig:i,userMutArgs:x,globalCounter:a,compressedProofArgs:W,setAsDelegate:s,remainingAccounts:P}));}return {instructions:O,secp256r1VerifyInput:l}}async function yB({index:e,payer:n,signers:r,cachedAccounts:s}){let t=new z;await t.addSystemAccounts();let c=await ie([{address:te(e).address,type:"Settings"}],s),a=await $(c,[]),i=re(t,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,c.filter(I=>I.type==="Settings"),G())[0],o=Ae(r),u=o.filter(I=>I instanceof M),g=[],A=[];for(let I of u){let x=g.length,{domainConfig:f,verifyArgs:C,signature:P,publicKey:U,message:W}=w(I,x);W&&P&&U&&g.push({message:W,signature:P,publicKey:U}),f&&(t.addPreAccounts([{address:f,role:gill.AccountRole.READONLY}]),C?.__option==="Some"&&A.push({domainConfigKey:f,verifyArgs:C.value}));}t.addPreAccounts(o.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:l,systemOffset:T}=t.toAccountMetas(),S=k(a,T),D=[];g.length>0&&D.push(V(g));let E=await Y(e);return D.push(ko({settings:E,payer:n,settingsMut:i,compressedProofArgs:S,secp256r1VerifyArgs:A,remainingAccounts:l})),D}function uI(e,n,r,s){let t=dI(e,n),c=gI(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 dI(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 gI(e,n){return n<e.header.numSignerAccounts}async function nr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ti(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),ae()):{}),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:uI(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 g=o[u];if(!g)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:g,role:gill.AccountRole.WRITABLE});}for(let u of i.readonlyIndexes){let g=o[u];if(!g)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:g,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 pu({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let u=await le(e),{accountMetas:g,addressLookupTableAccounts:A}=await nr({transactionMessageBytes:r,walletAddress:u,additionalSigners:a,addressesByLookupTableAddress:t}),l=[];return c.length>0&&l.push(V(c)),l.push(o?ti({transactionBuffer:n,payer:s.address,remainingAccounts:g,settingsKey:e}):Za({transactionBuffer:n,payer:s.address,settings:e})),i&&l.push(Wi({payer:s,tipAmount:i})),{instructions:l,addressLookupTableAccounts:A}}async function fu({index:e,transactionMessageBytes:n,signers:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],compressed:a=false,simulateProof:i=false,cachedAccounts:o}){let u=Ae(r),g=await Y(e),A=await le(g),[{accountMetas:l,addressLookupTableAccounts:T,transactionMessage:S},{settingsReadonlyArgs:D,proof:E,packedAccounts:I}]=await Promise.all([nr({transactionMessageBytes:n,walletAddress:A,additionalSigners:u.filter(O=>!(O instanceof M)),addressesByLookupTableAddress:t}),ye(a,e,i,o)]);I.addPreAccounts(l);let x=u.filter(O=>O instanceof M),f=[];for(let O of x){let N=c.length,{domainConfig:Z,verifyArgs:Ce,signature:Te,publicKey:Mt,message:Et}=w(O,N);Et&&Te&&Mt&&c.push({message:Et,signature:Te,publicKey:Mt}),Z&&(I.addPreAccounts([{address:Z,role:gill.AccountRole.READONLY}]),Ce?.__option==="Some"&&f.push({domainConfigKey:Z,verifyArgs:Ce.value}));}let{remainingAccounts:C,systemOffset:P}=I.toAccountMetas(),U=[];c.length>0&&U.push(V(c));let W=yI(S,l);if(a){if(!s||!D)throw new Error("Payer not found or proof args is missing.");let O=k(E,P);U.push(yi({secp256r1VerifyArgs:f,transactionMessage:W,settingsReadonlyArgs:D,compressedProofArgs:O,payer:s,remainingAccounts:C}));}else U.push(ai({secp256r1VerifyArgs:f,settings:g,transactionMessage:W,remainingAccounts:C}));return {instructions:U,addressLookupTableAccounts:T}}function yI(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 VB({index:e,destination:n,signers:r,cachedAccounts:s,amount:t,payer:c,compressed:a=false}){let i=Ae(r),o=await Y(e),u=await le(o),{settingsReadonlyArgs:g,proof:A,packedAccounts:l}=await ye(a,e,false,s),T=[],S=[];for(let x of i)if(x instanceof M){let f=T.length,{domainConfig:C,verifyArgs:P,signature:U,publicKey:W,message:O}=w(x,f);O&&U&&W&&T.push({message:O,signature:U,publicKey:W}),C&&(l.addPreAccounts([{address:C,role:gill.AccountRole.READONLY}]),P?.__option==="Some"&&S.push({domainConfigKey:C,verifyArgs:P.value}));}else l.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:D,systemOffset:E}=l.toAccountMetas(),I=[];if(T.length>0&&I.push(V(T)),a){if(!c||!g)throw new Error("Payer not found or proof args is missing.");let x=k(A,E);I.push(Rc({amount:t,settingsReadonlyArgs:g,compressedProofArgs:x,payer:c,secp256r1VerifyArgs:S,source:u,destination:n,remainingAccounts:D}));}else I.push(Ic({amount:t,secp256r1VerifyArgs:S,source:u,destination:n,settings:o,remainingAccounts:D}));return I}async function XB({index:e,destination:n,mint:r,signers:s,cachedAccounts:t,amount:c,payer:a,tokenProgram:i,compressed:o=false}){let u=Ae(s),g=await Y(e),A=await le(g),[l,T]=await Promise.all([programs.getAssociatedTokenAccountAddress(r,A,i),programs.getAssociatedTokenAccountAddress(r,n,i)]),{settingsReadonlyArgs:S,proof:D,packedAccounts:E}=await ye(o,e,false,t),I=[],x=[];for(let U of u)if(U instanceof M){let W=I.length,{domainConfig:O,verifyArgs:N,signature:Z,publicKey:Ce,message:Te}=w(U,W);Te&&Z&&Ce&&I.push({message:Te,signature:Z,publicKey:Ce}),O&&(E.addPreAccounts([{address:O,role:gill.AccountRole.READONLY}]),N?.__option==="Some"&&x.push({domainConfigKey:O,verifyArgs:N.value}));}else E.addPreAccounts([{address:U.address,role:gill.AccountRole.READONLY_SIGNER,signer:U}]);let{remainingAccounts:f,systemOffset:C}=E.toAccountMetas(),P=[];if(I.length>0&&P.push(V(I)),o){if(!a||!S)throw new Error("Payer not found or proof args is missing.");let U=k(D,C);P.push(kc({amount:c,settingsReadonlyArgs:S,compressedProofArgs:U,payer:a,secp256r1VerifyArgs:x,source:A,sourceTokenAccount:l,destination:n,destinationTokenAccount:T,mint:r,tokenProgram:i,remainingAccounts:f}));}else P.push(_c({amount:c,secp256r1VerifyArgs:x,source:A,sourceTokenAccount:l,destination:n,destinationTokenAccount:T,settings:g,mint:r,tokenProgram:i,remainingAccounts:f}));return P}async function iL({index:e,closer:n,transactionBufferAddress:r,payer:s,compressed:t=false,cachedAccounts:c}){let a=await Us(ae(),r),i=a.data.multiWalletSettings,{settingsReadonlyArgs:o,proof:u,packedAccounts:g}=await ye(t,e,false,c),{remainingAccounts:A,systemOffset:l}=g.toAccountMetas(),{domainConfig:T,verifyArgs:S,message:D,signature:E,publicKey:I}=w(n),x=[];if(D&&E&&I&&x.push(V([{message:D,signature:E,publicKey:I}])),t){if(!s||!o)throw new Error("Payer not found or proof args is missing.");let f=k(u,l);x.push(Zc({transactionBuffer:r,domainConfig:T,closer:n instanceof M?void 0:n,rentCollector:a.data.payer,secp256r1VerifyArgs:S,settingsReadonlyArgs:o,payer:s,compressedProofArgs:f,remainingAccounts:A}));}else x.push(Fc({transactionBuffer:r,domainConfig:T,closer:n instanceof M?void 0:n,settings:i,payer:a.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return x}function xu({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:u,expectedSigners:g}){let{domainConfig:A,verifyArgs:l,message:T,signature:S,publicKey:D}=w(n),E=[];if(T&&S&&D&&E.push(V([{message:T,signature:S,publicKey:D}])),u){let{settingsReadonlyArgs:I,compressedProofArgs:x,remainingAccounts:f}=u;E.push(aa({transactionBuffer:t,payer:e,secp256r1VerifyArgs:l,creator:n instanceof M?void 0:n,domainConfig:A,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSigners:g},settingsReadonlyArgs:I,compressedProofArgs:x,remainingAccounts:f}));}else E.push(ta({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:l,creator:n instanceof M?void 0:n,domainConfig:A,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSigners:g},remainingAccounts:[]}));return E}function Iu({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=w(e),u=[];return i&&a&&o&&u.push(V([{message:i,signature:a,publicKey:o}])),s?u.push(Sa({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(ya({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,remainingAccounts:[]})),u}function Cu({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?_a({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Ea({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Du({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=w(n),u=[];return o&&a&&i&&u.push(V([{message:o,signature:a,publicKey:i}])),s?u.push(Fa({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(ka({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,remainingAccounts:[]})),u}async function jL({message:e,signer:n,popUp:r}){let s=await Qt({authUrl:`${xe()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"message",payload:e},signer:n,popUp:r,additionalInfo:Xt()});return {...s,signer:new de(s.signer)}}async function $L({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){let c=await Qt({authUrl:`${xe()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"transaction",payload:JSON.stringify({transactionActionType:e,transactionAddress:n,transactionMessageBytes:er(r)})},additionalInfo:Xt(),signer:s,popUp:t});return {...c,signer:new de(c.signer)}}async function sk({message:e,response:n,expectedOrigin:r=xe()}){let{verified:s}=await server.verifyAuthenticationResponse({response:n.authResponse,expectedChallenge:er(new TextEncoder().encode(e)),expectedOrigin:r,expectedRPID:Si,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:$i(n.signer.toString()),counter:0}});return s}async function fk({payer:e,index:n,transactionMessageBytes:r,creator:s,executor:t,secp256r1VerifyInput:c,jitoBundlesTipAmount:a,addressesByLookupTableAddress:i,compressed:o=false,bufferIndex:u=Math.floor(Math.random()*255),additionalVoters:g=[],additionalSigners:A=[],chunkSize:l=Math.ceil(r.length/2),cachedAccounts:T}){let S=await Y(n),D=await Ri(S,s instanceof M?s:s.address,u),E=[],I=[];for(let ue=0;ue<r.length;ue+=l){let vn=r.subarray(ue,ue+l);E.push(vn),I.push(sha256.sha256(vn));}let x=sha256.sha256(new Uint8Array(r)),{settingsReadonlyArgs:f,proof:C,packedAccounts:P}=await ye(o,n,false,T),{remainingAccounts:U,systemOffset:W}=P.toAccountMetas(),O=f?{settingsReadonlyArgs:f,compressedProofArgs:k(C,W),remainingAccounts:U,payer:e}:null,N=[s,...t?[t]:[],...g].map(Ne),Z=xu({finalBufferHash:x,finalBufferSize:r.length,bufferIndex:u,payer:e,transactionBufferAddress:D,settings:S,creator:s,preauthorizeExecution:!t,bufferExtendHashes:I,compressedArgs:O,expectedSigners:N}),Ce=E.map(ue=>Cu({transactionMessageBytes:ue,transactionBufferAddress:D,settings:S,compressed:o})),Te=g.map(ue=>Du({voter:ue,transactionBufferAddress:D,settings:S,compressedArgs:O})),Mt=Iu({compressedArgs:O,settings:S,executor:t,transactionBufferAddress:D}),{instructions:Et,addressLookupTableAccounts:Pu}=await pu({compressed:o,settings:S,transactionMessageBytes:r,transactionBufferAddress:D,payer:e,additionalSigners:A,secp256r1VerifyInput:c,jitoBundlesTipAmount:a,addressesByLookupTableAddress:i}),Ke=ue=>({payer:e,instructions:ue,addressesByLookupTableAddress:Pu});return [Ke(Z),...Ce.map(ue=>Ke([ue])),...Te.length?[Ke(Te.flat())]:[],Ke(Mt),Ke(Et)]}var or=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 cr=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 Eu({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=or.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(s??{});for(let l of i){let T=t.extractTableLookup(l);if(T!==void 0){let{addressTableLookup:S,drainedKeys:D}=T;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),a.writable.push(...D.writable),a.readonly.push(...D.readonly);}}let[o,u]=t.getMessageComponents(),A=new cr(u,a).compileInstructions(r);return {version:0,header:o,instructions:A,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function bk({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Eu({instructions:e,payer:n,recentBlockhash:d,addressesByLookupTableAddress:r});return li(s)}async function Ok({payer:e,index:n,transactionMessageBytes:r,signers:s,secp256r1VerifyInput:t,addressesByLookupTableAddress:c,cachedAccounts:a,compressed:i=false,simulateProof:o=false}){let{instructions:u,addressLookupTableAccounts:g}=await fu({index:n,payer:e,signers:s,transactionMessageBytes:r,secp256r1VerifyInput:t,compressed:i,addressesByLookupTableAddress:c,simulateProof:o,cachedAccounts:a});return {payer:e,instructions:u,addressesByLookupTableAddress:g}}
2
- exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=Gs;exports.CHANGE_CONFIG_DISCRIMINATOR=ks;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Ys;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=eo;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=co;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ao;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Co;exports.CREATE_MULTI_WALLET_DISCRIMINATOR=lo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=ho;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Oo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Ho;exports.DOMAIN_CONFIG_DISCRIMINATOR=_n;exports.DelegateOp=Ut;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=$o;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=sc;exports.GLOBAL_COUNTER_DISCRIMINATOR=kn;exports.KeyType=Tt;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=dc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=pc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=IS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=NS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=HS;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=cS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=oS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=AS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=bS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=vS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=_S;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=MS;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=CS;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=DS;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=lS;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=TS;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=hS;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=fS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=sS;exports.MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE=nS;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=kS;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=mS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=pS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=BS;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=VS;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=SS;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=LS;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=xS;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=PS;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=uS;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=dS;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=FS;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=aS;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED=iS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=OS;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=GS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=wS;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=yS;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=US;exports.MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED=gS;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=WS;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=RS;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=ES;exports.MULTI_WALLET_PROGRAM_ADDRESS=d;exports.MultiWalletAccount=eS;exports.MultiWalletInstruction=tS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Mc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Sc;exports.PermanentMemberPermission=yn;exports.Permission=fe;exports.Permissions=ge;exports.SETTINGS_DISCRIMINATOR=Cs;exports.Secp256r1Key=de;exports.SignedSecp256r1Key=M;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Bc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=bc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Jc;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Hc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=sa;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=$c;exports.TRANSACTION_BUFFER_DISCRIMINATOR=bs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=fa;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=da;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=ha;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Ca;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Ha;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Oa;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=$a;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Ja;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=di;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=si;exports.TransactionManagerPermission=St;exports.changeConfig=VW;exports.closeTransactionBuffer=iL;exports.compressSettingsAccount=tO;exports.configAction=sC;exports.convertMemberKeyToString=Dt;exports.convertPubkeyCompressedToCose=$i;exports.convertPubkeyCoseToCompressed=cW;exports.createDomainConfig=cO;exports.createDomainUserAccounts=pO;exports.createGlobalCounter=SO;exports.createPopUp=Zi;exports.createTransactionBuffer=xu;exports.createTransactionManagerSigner=Kx;exports.createUserAccounts=PO;exports.createWallet=nB;exports.decodeDomainConfig=Wn;exports.decodeGlobalCounter=Nn;exports.decodeSettings=Ms;exports.decodeTransactionBuffer=_s;exports.decompressSettingsAccount=yB;exports.disableDomainConfig=vO;exports.editDomainConfig=OO;exports.editTransactionManagerUrl=HO;exports.executeTransaction=pu;exports.executeTransactionBuffer=Iu;exports.executeTransactionSync=fu;exports.extendTransactionBuffer=Cu;exports.fetchAllDomainConfig=SI;exports.fetchAllGlobalCounter=PI;exports.fetchAllMaybeDomainConfig=Gu;exports.fetchAllMaybeGlobalCounter=sd;exports.fetchAllMaybeSettings=ay;exports.fetchAllMaybeTransactionBuffer=Ry;exports.fetchAllSettings=NM;exports.fetchAllTransactionBuffer=JM;exports.fetchDomainConfig=On;exports.fetchGlobalCounter=EI;exports.fetchMaybeDomainConfig=Vu;exports.fetchMaybeGlobalCounter=nd;exports.fetchMaybeSettings=Hr;exports.fetchMaybeSettingsAccountData=Mx;exports.fetchMaybeTransactionBuffer=Py;exports.fetchMaybeUserAccountData=Dx;exports.fetchSettings=wM;exports.fetchSettingsAccountData=$t;exports.fetchTransactionBuffer=Us;exports.fetchUserAccountData=Gi;exports.getAddMemberArgsCodec=_I;exports.getAddMemberArgsDecoder=ir;exports.getAddMemberArgsEncoder=ar;exports.getAuthEndpoint=xe;exports.getChangeConfigCompressedDiscriminatorBytes=SE;exports.getChangeConfigCompressedInstruction=Ks;exports.getChangeConfigCompressedInstructionDataCodec=xE;exports.getChangeConfigCompressedInstructionDataDecoder=zs;exports.getChangeConfigCompressedInstructionDataEncoder=Fs;exports.getChangeConfigDiscriminatorBytes=uE;exports.getChangeConfigInstruction=gE;exports.getChangeConfigInstructionAsync=Ns;exports.getChangeConfigInstructionDataCodec=dE;exports.getChangeConfigInstructionDataDecoder=ws;exports.getChangeConfigInstructionDataEncoder=jr;exports.getCompiledInstructionCodec=OI;exports.getCompiledInstructionDecoder=dr;exports.getCompiledInstructionEncoder=ur;exports.getCompressSettingsAccountDiscriminatorBytes=hE;exports.getCompressSettingsAccountInstruction=Xs;exports.getCompressSettingsAccountInstructionDataCodec=bE;exports.getCompressSettingsAccountInstructionDataDecoder=qs;exports.getCompressSettingsAccountInstructionDataEncoder=Zs;exports.getCompressedAccountMetaCodec=wI;exports.getCompressedAccountMetaDecoder=Xe;exports.getCompressedAccountMetaEncoder=qe;exports.getCompressedAccountMetaReadOnlyCodec=GI;exports.getCompressedAccountMetaReadOnlyDecoder=tt;exports.getCompressedAccountMetaReadOnlyEncoder=et;exports.getCompressedProofCodec=KI;exports.getCompressedProofDecoder=fr;exports.getCompressedProofEncoder=pr;exports.getCompressedSettingsAddressFromIndex=te;exports.getCompressedSettingsCodec=ZI;exports.getCompressedSettingsDataCodec=QI;exports.getCompressedSettingsDataDecoder=st;exports.getCompressedSettingsDataEncoder=nt;exports.getCompressedSettingsDecoder=G;exports.getCompressedSettingsEncoder=rt;exports.getComputeBudgetEstimate=wi;exports.getConfigActionCodec=nC;exports.getConfigActionDecoder=ct;exports.getConfigActionEncoder=ot;exports.getCreateDomainConfigDiscriminatorBytes=LE;exports.getCreateDomainConfigInstruction=no;exports.getCreateDomainConfigInstructionDataCodec=kE;exports.getCreateDomainConfigInstructionDataDecoder=ro;exports.getCreateDomainConfigInstructionDataEncoder=to;exports.getCreateDomainUserAccountDiscriminatorBytes=KE;exports.getCreateDomainUserAccountInstruction=uo;exports.getCreateDomainUserAccountInstructionDataCodec=JE;exports.getCreateDomainUserAccountInstructionDataDecoder=io;exports.getCreateDomainUserAccountInstructionDataEncoder=ao;exports.getCreateGlobalCounterDiscriminatorBytes=QE;exports.getCreateGlobalCounterInstruction=tP;exports.getCreateGlobalCounterInstructionAsync=mo;exports.getCreateGlobalCounterInstructionDataCodec=eP;exports.getCreateGlobalCounterInstructionDataDecoder=yo;exports.getCreateGlobalCounterInstructionDataEncoder=tn;exports.getCreateMultiWalletCompressedDiscriminatorBytes=SP;exports.getCreateMultiWalletCompressedInstruction=Eo;exports.getCreateMultiWalletCompressedInstructionDataCodec=xP;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Mo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=Do;exports.getCreateMultiWalletDiscriminatorBytes=uP;exports.getCreateMultiWalletInstruction=So;exports.getCreateMultiWalletInstructionAsync=gP;exports.getCreateMultiWalletInstructionDataCodec=dP;exports.getCreateMultiWalletInstructionDataDecoder=To;exports.getCreateMultiWalletInstructionDataEncoder=nn;exports.getCreateUserAccountArgsCodec=uC;exports.getCreateUserAccountArgsDecoder=Pr;exports.getCreateUserAccountArgsEncoder=Er;exports.getCreateUserAccountsDiscriminatorBytes=hP;exports.getCreateUserAccountsInstruction=_o;exports.getCreateUserAccountsInstructionDataCodec=bP;exports.getCreateUserAccountsInstructionDataDecoder=vo;exports.getCreateUserAccountsInstructionDataEncoder=bo;exports.getDecompressSettingsAccountDiscriminatorBytes=kP;exports.getDecompressSettingsAccountInstruction=ko;exports.getDecompressSettingsAccountInstructionDataCodec=wP;exports.getDecompressSettingsAccountInstructionDataDecoder=Lo;exports.getDecompressSettingsAccountInstructionDataEncoder=Bo;exports.getDelegateOpCodec=AC;exports.getDelegateOpDecoder=hr;exports.getDelegateOpEncoder=Rr;exports.getDisableDomainConfigDiscriminatorBytes=KP;exports.getDisableDomainConfigInstruction=Fo;exports.getDisableDomainConfigInstructionDataCodec=JP;exports.getDisableDomainConfigInstructionDataDecoder=Go;exports.getDisableDomainConfigInstructionDataEncoder=Vo;exports.getDomainConfigAddress=we;exports.getDomainConfigCodec=TI;exports.getDomainConfigDecoder=Un;exports.getDomainConfigDiscriminatorBytes=lI;exports.getDomainConfigEncoder=Hu;exports.getDomainConfigSize=xI;exports.getEditDomainConfigDiscriminatorBytes=QP;exports.getEditDomainConfigInstruction=tc;exports.getEditDomainConfigInstructionDataCodec=eR;exports.getEditDomainConfigInstructionDataDecoder=ec;exports.getEditDomainConfigInstructionDataEncoder=Qo;exports.getEditMemberArgsCodec=fC;exports.getEditMemberArgsDecoder=Cr;exports.getEditMemberArgsEncoder=Ir;exports.getEditTransactionManagerUrlDiscriminatorBytes=iR;exports.getEditTransactionManagerUrlInstruction=ac;exports.getEditTransactionManagerUrlInstructionDataCodec=uR;exports.getEditTransactionManagerUrlInstructionDataDecoder=cc;exports.getEditTransactionManagerUrlInstructionDataEncoder=oc;exports.getFeePayer=SU;exports.getGlobalAdditonalInfo=Xt;exports.getGlobalAuthorizedClient=Ni;exports.getGlobalCounterAddress=zt;exports.getGlobalCounterCodec=MI;exports.getGlobalCounterDecoder=wn;exports.getGlobalCounterDiscriminatorBytes=DI;exports.getGlobalCounterEncoder=rd;exports.getGlobalCounterSize=RI;exports.getJitoTipsConfig=Cn;exports.getLightCpiSigner=oU;exports.getLightProtocolRpc=xt;exports.getLinkWalletArgsCodec=xC;exports.getLinkWalletArgsDecoder=vr;exports.getLinkWalletArgsEncoder=br;exports.getMemberCodec=MC;exports.getMemberDecoder=Me;exports.getMemberEncoder=De;exports.getMemberKeyCodec=RC;exports.getMemberKeyDecoder=X;exports.getMemberKeyEncoder=q;exports.getMigrateCompressedSettingsDiscriminatorBytes=lR;exports.getMigrateCompressedSettingsInstruction=SR;exports.getMigrateCompressedSettingsInstructionDataCodec=TR;exports.getMigrateCompressedSettingsInstructionDataDecoder=Ac;exports.getMigrateCompressedSettingsInstructionDataEncoder=gc;exports.getMigrateCompressedUsersDiscriminatorBytes=RR;exports.getMigrateCompressedUsersInstruction=bR;exports.getMigrateCompressedUsersInstructionDataCodec=hR;exports.getMigrateCompressedUsersInstructionDataDecoder=lc;exports.getMigrateCompressedUsersInstructionDataEncoder=fc;exports.getMultiWalletErrorMessage=x_;exports.getNativeTransferIntentCompressedDiscriminatorBytes=jR;exports.getNativeTransferIntentCompressedInstruction=Rc;exports.getNativeTransferIntentCompressedInstructionDataCodec=YR;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Pc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Ec;exports.getNativeTransferIntentDiscriminatorBytes=kR;exports.getNativeTransferIntentInstruction=Ic;exports.getNativeTransferIntentInstructionAsync=NR;exports.getNativeTransferIntentInstructionDataCodec=wR;exports.getNativeTransferIntentInstructionDataDecoder=xc;exports.getNativeTransferIntentInstructionDataEncoder=cn;exports.getOriginIndex=iW;exports.getPackedAddressTreeInfoCodec=vC;exports.getPackedAddressTreeInfoDecoder=dt;exports.getPackedAddressTreeInfoEncoder=ut;exports.getPackedStateTreeInfoCodec=WC;exports.getPackedStateTreeInfoDecoder=Qe;exports.getPackedStateTreeInfoEncoder=$e;exports.getPermissionsCodec=LC;exports.getPermissionsDecoder=it;exports.getPermissionsEncoder=at;exports.getProofArgsCodec=HC;exports.getProofArgsDecoder=h;exports.getProofArgsEncoder=R;exports.getRemoveMemberArgsCodec=zC;exports.getRemoveMemberArgsDecoder=Mr;exports.getRemoveMemberArgsEncoder=Dr;exports.getSecp256r1PubkeyCodec=jC;exports.getSecp256r1PubkeyDecoder=gt;exports.getSecp256r1PubkeyEncoder=_r;exports.getSecp256r1SignatureOffsetsDataDecoder=cI;exports.getSecp256r1SignatureOffsetsDataEncoder=oI;exports.getSecp256r1VerifyArgsCodec=qC;exports.getSecp256r1VerifyArgsDecoder=L;exports.getSecp256r1VerifyArgsEncoder=B;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=eD;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=J;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=K;exports.getSecp256r1VerifyInstruction=V;exports.getSecp256r1VerifyInstructionDataCodec=zW;exports.getSecp256r1VerifyInstructionDataDecoder=iu;exports.getSecp256r1VerifyInstructionDataEncoder=uu;exports.getSendAndConfirmTransaction=ki;exports.getSettingsCodec=kM;exports.getSettingsCreateOrMutateArgsCodec=sD;exports.getSettingsCreateOrMutateArgsDecoder=Wr;exports.getSettingsCreateOrMutateArgsEncoder=Ur;exports.getSettingsCreationArgsCodec=dD;exports.getSettingsCreationArgsDecoder=he;exports.getSettingsCreationArgsEncoder=Re;exports.getSettingsDecoder=Ds;exports.getSettingsDiscriminatorBytes=LM;exports.getSettingsEncoder=cy;exports.getSettingsFromIndex=Y;exports.getSettingsMutArgsCodec=mD;exports.getSettingsMutArgsDecoder=pe;exports.getSettingsMutArgsEncoder=me;exports.getSettingsReadonlyArgsCodec=TD;exports.getSettingsReadonlyArgsDecoder=ee;exports.getSettingsReadonlyArgsEncoder=Q;exports.getSettingsSize=HM;exports.getSignedSecp256r1Key=aW;exports.getSolanaRpc=ae;exports.getSolanaRpcEndpoint=Li;exports.getTokenTransferIntentCompressedDiscriminatorBytes=Ah;exports.getTokenTransferIntentCompressedInstruction=kc;exports.getTokenTransferIntentCompressedInstructionAsync=mh;exports.getTokenTransferIntentCompressedInstructionDataCodec=yh;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Lc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=dn;exports.getTokenTransferIntentDiscriminatorBytes=rh;exports.getTokenTransferIntentInstruction=_c;exports.getTokenTransferIntentInstructionAsync=sh;exports.getTokenTransferIntentInstructionDataCodec=nh;exports.getTokenTransferIntentInstructionDataDecoder=vc;exports.getTokenTransferIntentInstructionDataEncoder=un;exports.getTransactionBufferAddress=Ri;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=_h;exports.getTransactionBufferCloseCompressedInstruction=Zc;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Uh;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=Yc;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=jc;exports.getTransactionBufferCloseDiscriminatorBytes=Ch;exports.getTransactionBufferCloseInstruction=Fc;exports.getTransactionBufferCloseInstructionDataCodec=Dh;exports.getTransactionBufferCloseInstructionDataDecoder=Gc;exports.getTransactionBufferCloseInstructionDataEncoder=Vc;exports.getTransactionBufferCodec=KM;exports.getTransactionBufferCreateArgsCodec=CD;exports.getTransactionBufferCreateArgsDecoder=yt;exports.getTransactionBufferCreateArgsEncoder=At;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Zh;exports.getTransactionBufferCreateCompressedInstruction=aa;exports.getTransactionBufferCreateCompressedInstructionDataCodec=qh;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=ca;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=oa;exports.getTransactionBufferCreateDiscriminatorBytes=Hh;exports.getTransactionBufferCreateInstruction=ta;exports.getTransactionBufferCreateInstructionDataCodec=Vh;exports.getTransactionBufferCreateInstructionDataDecoder=ea;exports.getTransactionBufferCreateInstructionDataEncoder=Qc;exports.getTransactionBufferDecoder=vs;exports.getTransactionBufferDiscriminatorBytes=zM;exports.getTransactionBufferEncoder=Ey;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=yb;exports.getTransactionBufferExecuteCompressedInstruction=Sa;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=mb;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ta;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=la;exports.getTransactionBufferExecuteDiscriminatorBytes=sb;exports.getTransactionBufferExecuteInstruction=ya;exports.getTransactionBufferExecuteInstructionDataCodec=ob;exports.getTransactionBufferExecuteInstructionDataDecoder=Aa;exports.getTransactionBufferExecuteInstructionDataEncoder=ga;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=bb;exports.getTransactionBufferExtendCompressedInstruction=_a;exports.getTransactionBufferExtendCompressedInstructionDataCodec=vb;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=va;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=ba;exports.getTransactionBufferExtendDiscriminatorBytes=Ib;exports.getTransactionBufferExtendInstruction=Ea;exports.getTransactionBufferExtendInstructionDataCodec=Cb;exports.getTransactionBufferExtendInstructionDataDecoder=Ma;exports.getTransactionBufferExtendInstructionDataEncoder=Da;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=jb;exports.getTransactionBufferVoteCompressedInstruction=Fa;exports.getTransactionBufferVoteCompressedInstructionDataCodec=Yb;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Ga;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Va;exports.getTransactionBufferVoteDiscriminatorBytes=wb;exports.getTransactionBufferVoteInstruction=ka;exports.getTransactionBufferVoteInstructionDataCodec=Nb;exports.getTransactionBufferVoteInstructionDataDecoder=La;exports.getTransactionBufferVoteInstructionDataEncoder=Ba;exports.getTransactionExecuteCompressedDiscriminatorBytes=uv;exports.getTransactionExecuteCompressedInstruction=ti;exports.getTransactionExecuteCompressedInstructionDataCodec=dv;exports.getTransactionExecuteCompressedInstructionDataDecoder=ei;exports.getTransactionExecuteCompressedInstructionDataEncoder=Qa;exports.getTransactionExecuteDiscriminatorBytes=tv;exports.getTransactionExecuteInstruction=Za;exports.getTransactionExecuteInstructionDataCodec=rv;exports.getTransactionExecuteInstructionDataDecoder=Ya;exports.getTransactionExecuteInstructionDataEncoder=ja;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=Rv;exports.getTransactionExecuteSyncCompressedInstruction=yi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=hv;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ai;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=gi;exports.getTransactionExecuteSyncDiscriminatorBytes=Tv;exports.getTransactionExecuteSyncInstruction=ai;exports.getTransactionExecuteSyncInstructionDataCodec=Sv;exports.getTransactionExecuteSyncInstructionDataDecoder=ci;exports.getTransactionExecuteSyncInstructionDataEncoder=oi;exports.getTransactionMessageAddressTableLookupCodec=bD;exports.getTransactionMessageAddressTableLookupDecoder=Br;exports.getTransactionMessageAddressTableLookupEncoder=Or;exports.getTransactionMessageCodec=PD;exports.getTransactionMessageDecoder=pt;exports.getTransactionMessageEncoder=mt;exports.getUserAccountAddress=F;exports.getUserCodec=WD;exports.getUserCreationArgsCodec=kD;exports.getUserCreationArgsDecoder=Pe;exports.getUserCreationArgsEncoder=Ee;exports.getUserDecoder=j;exports.getUserEncoder=be;exports.getUserMutArgsCodec=VD;exports.getUserMutArgsDecoder=oe;exports.getUserMutArgsEncoder=se;exports.getUserReadOnlyArgsCodec=KD;exports.getUserReadOnlyArgsDecoder=Nr;exports.getUserReadOnlyArgsEncoder=wr;exports.getUserReadOnlyOrMutateArgsCodec=ZD;exports.getUserReadOnlyOrMutateArgsDecoder=Ze;exports.getUserReadOnlyOrMutateArgsEncoder=Ye;exports.getWalletAddressFromIndex=hi;exports.getWalletAddressFromSettings=le;exports.identifyMultiWalletAccount=y_;exports.identifyMultiWalletInstruction=m_;exports.initialize=IU;exports.isConfigAction=oC;exports.isMultiWalletError=I_;exports.isSettingsCreateOrMutateArgs=cD;exports.isUserReadOnlyOrMutateArgs=XD;exports.nativeTransferIntent=VB;exports.parseChangeConfigCompressedInstruction=IE;exports.parseChangeConfigInstruction=AE;exports.parseCompressSettingsAccountInstruction=vE;exports.parseCreateDomainConfigInstruction=wE;exports.parseCreateDomainUserAccountInstruction=jE;exports.parseCreateGlobalCounterInstruction=rP;exports.parseCreateMultiWalletCompressedInstruction=IP;exports.parseCreateMultiWalletInstruction=AP;exports.parseCreateUserAccountsInstruction=vP;exports.parseDecompressSettingsAccountInstruction=NP;exports.parseDisableDomainConfigInstruction=jP;exports.parseEditDomainConfigInstruction=tR;exports.parseEditTransactionManagerUrlInstruction=dR;exports.parseMigrateCompressedSettingsInstruction=xR;exports.parseMigrateCompressedUsersInstruction=vR;exports.parseNativeTransferIntentCompressedInstruction=ZR;exports.parseNativeTransferIntentInstruction=HR;exports.parseSecp256r1VerifyInstruction=KW;exports.parseTokenTransferIntentCompressedInstruction=ph;exports.parseTokenTransferIntentInstruction=oh;exports.parseTransactionBufferCloseCompressedInstruction=Wh;exports.parseTransactionBufferCloseInstruction=Mh;exports.parseTransactionBufferCreateCompressedInstruction=Xh;exports.parseTransactionBufferCreateInstruction=Gh;exports.parseTransactionBufferExecuteCompressedInstruction=pb;exports.parseTransactionBufferExecuteInstruction=cb;exports.parseTransactionBufferExtendCompressedInstruction=_b;exports.parseTransactionBufferExtendInstruction=Db;exports.parseTransactionBufferVoteCompressedInstruction=Zb;exports.parseTransactionBufferVoteInstruction=Hb;exports.parseTransactionExecuteCompressedInstruction=gv;exports.parseTransactionExecuteInstruction=nv;exports.parseTransactionExecuteSyncCompressedInstruction=bv;exports.parseTransactionExecuteSyncInstruction=xv;exports.pollJitoBundleConfirmation=IW;exports.prepareTransactionBundle=fk;exports.prepareTransactionMessage=bk;exports.prepareTransactionSync=Ok;exports.resolveTransactionManagerSigner=CW;exports.sendJitoBundle=zx;exports.settingsCreateOrMutateArgs=oD;exports.signAndSendBundledTransactions=SW;exports.signAndSendTransaction=xW;exports.signMessageWithPasskey=jL;exports.signTransactionWithPasskey=$L;exports.tokenTransferIntent=XB;exports.uninitialize=xU;exports.userReadOnlyOrMutateArgs=qD;exports.vaultTransactionMessageDeserialize=Ti;exports.vaultTransactionMessageSerialize=li;exports.verifyMessage=sk;exports.voteTransactionBuffer=Du;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var gill=require('gill'),MI=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha256=require('@noble/hashes/sha256'),web3_js=require('@solana/web3.js'),programs=require('gill/programs'),tinyCbor=require('@levischuck/tiny-cbor'),p256=require('@noble/curves/p256'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var MI__default=/*#__PURE__*/_interopDefault(MI);var Gn=new Uint8Array([201,232,212,229,59,241,106,197]);function qI(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gn)}function Jd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["numOrigins",gill.getU16Encoder()],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),413)],["metadataUrlLength",gill.getU8Encoder()],["metadataUrl",gill.fixEncoderSize(gill.getBytesEncoder(),100)]]),e=>({...e,discriminator:Gn}))}function Fn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["numOrigins",gill.getU16Decoder()],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),413)],["metadataUrlLength",gill.getU8Decoder()],["metadataUrl",gill.fixDecoderSize(gill.getBytesDecoder(),100)]])}function XI(){return gill.combineCodec(Jd(),Fn())}function zn(e){return gill.decodeAccount(e,Fn())}async function Kn(e,n,r){let s=await Yd(e,n,r);return gill.assertAccountExists(s),s}async function Yd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return zn(s)}async function $I(e,n,r){let s=await Zd(e,n,r);return gill.assertAccountsExist(s),s}async function Zd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zn(t))}function QI(){return 846}var Yn=new Uint8Array([42,206,176,58,175,129,130,233]);function rD(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Yn)}function du(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Yn}))}function Zn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function nD(){return gill.combineCodec(du(),Zn())}function qn(e){return gill.decodeAccount(e,Zn())}async function sD(e,n,r){let s=await uu(e,n,r);return gill.assertAccountExists(s),s}async function uu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return qn(s)}async function oD(e,n,r){let s=await Au(e,n,r);return gill.assertAccountsExist(s),s}async function Au(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>qn(t))}function cD(){return 24}function Ar(){return gill.getStructEncoder([["member",Ce()],["verifyArgs",gill.getOptionEncoder(k())],["userArgs",Je()],["setAsDelegate",gill.getBooleanEncoder()]])}function gr(){return gill.getStructDecoder([["member",Me()],["verifyArgs",gill.getOptionDecoder(w())],["userArgs",Ye()],["setAsDelegate",gill.getBooleanDecoder()]])}function uD(){return gill.combineCodec(Ar(),gr())}function mr(){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 mD(){return gill.combineCodec(mr(),yr())}function Ze(){return gill.getStructEncoder([["treeInfo",Xe()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function qe(){return gill.getStructDecoder([["treeInfo",$e()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function fD(){return gill.combineCodec(Ze(),qe())}function Qe(){return gill.getStructEncoder([["treeInfo",Xe()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function et(){return gill.getStructDecoder([["treeInfo",$e()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function ID(){return gill.combineCodec(Qe(),et())}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 MD(){return gill.combineCodec(Sr(),xr())}function tt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(rt())]])}function z(){return gill.getStructDecoder([["data",gill.getOptionDecoder(nt())]])}function RD(){return gill.combineCodec(tt(),z())}function rt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(Ce())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function nt(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(Me())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function _D(){return gill.combineCodec(rt(),nt())}function st(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Cr())])]])],["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 ot(){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 OD(){return gill.combineCodec(st(),ot())}function kD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function wD(e,n){return n.__kind===e}function hr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["isPermanentMember",gill.getBooleanEncoder()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Ee()]])}function Rr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["isPermanentMember",gill.getBooleanDecoder()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Pe()]])}function GD(){return gill.combineCodec(hr(),Rr())}var kt=(s=>(s[s.Add=0]="Add",s[s.Remove=1]="Remove",s[s.Ignore=2]="Ignore",s))(kt||{});function br(){return gill.getEnumEncoder(kt)}function vr(){return gill.getEnumDecoder(kt)}function KD(){return gill.combineCodec(br(),vr())}function Cr(){return gill.getStructEncoder([["memberKey",Z()],["permissions",ct()],["userArgs",gill.getOptionEncoder(Ae())],["delegateOperation",br()]])}function Mr(){return gill.getStructDecoder([["memberKey",q()],["permissions",at()],["userArgs",gill.getOptionDecoder(ge())],["delegateOperation",vr()]])}function ZD(){return gill.combineCodec(Cr(),Mr())}function Ur(){return gill.getStructEncoder([["settingsMutArgs",Te()],["transactionManager",gill.getOptionEncoder(Ae())]])}function _r(){return gill.getStructDecoder([["settingsMutArgs",fe()],["transactionManager",gill.getOptionDecoder(ge())]])}function QD(){return gill.combineCodec(Ur(),_r())}function Ce(){return gill.getStructEncoder([["pubkey",Z()],["permissions",ct()],["userAddressTreeIndex",gill.getU8Encoder()]])}function Me(){return gill.getStructDecoder([["pubkey",q()],["permissions",at()],["userAddressTreeIndex",gill.getU8Decoder()]])}function nC(){return gill.combineCodec(Ce(),Me())}function Z(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function q(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function cC(){return gill.combineCodec(Z(),q())}function it(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function dt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function dC(){return gill.combineCodec(it(),dt())}function Xe(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function $e(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function gC(){return gill.combineCodec(Xe(),$e())}function ct(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function at(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function pC(){return gill.combineCodec(ct(),at())}function b(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Sr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function v(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(xr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function SC(){return gill.combineCodec(b(),v())}function Er(){return gill.getStructEncoder([["memberKey",Z()],["userArgs",Je()]])}function Pr(){return gill.getStructDecoder([["memberKey",q()],["userArgs",Ye()]])}function CC(){return gill.combineCodec(Er(),Pr())}function Wr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function ut(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function PC(){return gill.combineCodec(Wr(),ut())}function k(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function w(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function bC(){return gill.combineCodec(k(),w())}function K(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",k()]])}function j(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",w()]])}function WC(){return gill.combineCodec(K(),j())}function At(){return gill.getStructEncoder([["addressTreeInfo",it()],["outputStateTreeIndex",gill.getU8Encoder()]])}function gt(){return gill.getStructDecoder([["addressTreeInfo",dt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function kC(){return gill.combineCodec(At(),gt())}function Br(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Lr(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function HC(){return gill.combineCodec(Br(),Lr())}function Te(){return gill.getStructEncoder([["accountMeta",Ze()],["data",tt()]])}function fe(){return gill.getStructDecoder([["accountMeta",qe()],["data",z()]])}function zC(){return gill.combineCodec(Te(),fe())}function X(){return gill.getStructEncoder([["accountMeta",Qe()],["data",tt()]])}function $(){return gill.getStructDecoder([["accountMeta",et()],["data",z()]])}function YC(){return gill.combineCodec(X(),$())}function mt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(Z())]])}function yt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(q())]])}function $C(){return gill.combineCodec(mt(),yt())}function pt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(mr())],["addressTableLookups",gill.getArrayEncoder(Or())]])}function Tt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(yr())],["addressTableLookups",gill.getArrayDecoder(kr())]])}function rM(){return gill.combineCodec(pt(),Tt())}function Or(){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 oM(){return gill.combineCodec(Or(),kr())}function he(){return gill.getStructEncoder([["member",Z()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["isPermanentMember",gill.getBooleanEncoder()],["delegatedTo",gill.getOptionEncoder(Br())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function J(){return gill.getStructDecoder([["member",q()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["isPermanentMember",gill.getBooleanDecoder()],["delegatedTo",gill.getOptionDecoder(Lr())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function dM(){return gill.combineCodec(he(),J())}function Ee(){return gill.getStructEncoder([["addressTreeInfo",it()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Pe(){return gill.getStructDecoder([["addressTreeInfo",dt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function mM(){return gill.combineCodec(Ee(),Pe())}function Ae(){return gill.getStructEncoder([["accountMeta",Ze()],["data",he()]])}function ge(){return gill.getStructDecoder([["accountMeta",qe()],["data",J()]])}function fM(){return gill.combineCodec(Ae(),ge())}function Hr(){return gill.getStructEncoder([["accountMeta",Qe()],["data",he()]])}function Vr(){return gill.getStructDecoder([["accountMeta",et()],["data",J()]])}function IM(){return gill.combineCodec(Hr(),Vr())}function Je(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Hr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Ae()])]])]])}function Ye(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Vr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([ge()])]])]])}function EM(){return gill.combineCodec(Je(),Ye())}function PM(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function hM(e,n){return n.__kind===e}var bs=new Uint8Array([223,179,163,190,177,224,67,173]);function gE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(bs)}function fm(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Ce(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),11)]]),e=>({...e,discriminator:bs}))}function vs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Me(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),11)]])}function mE(){return gill.combineCodec(fm(),vs())}function Us(e){return gill.decodeAccount(e,vs())}async function yE(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 Us(s)}async function pE(e,n,r){let s=await lm(e,n,r);return gill.assertAccountsExist(s),s}async function lm(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Us(t))}function TE(){return 184}var Os=new Uint8Array([90,36,35,219,93,225,110,96]);function xE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Os)}function Om(){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",Z()],["executor",Z()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(Z())],["expectedSigners",gill.getArrayEncoder(Z())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Os}))}function ks(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",q()],["executor",q()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(q())],["expectedSigners",gill.getArrayDecoder(q())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function IE(){return gill.combineCodec(Om(),ks())}function ws(e){return gill.decodeAccount(e,ks())}async function Ns(e,n,r){let s=await km(e,n,r);return gill.assertAccountExists(s),s}async function km(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ws(s)}async function DE(e,n,r){let s=await wm(e,n,r);return gill.assertAccountsExist(s),s}async function wm(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ws(t))}var Gs=new Uint8Array([105,23,173,2,197,255,80,87]);function EE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gs)}function ry(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Gs}))}function Fs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function PE(){return gill.combineCodec(ry(),Fs())}function zs(e){return gill.decodeAccount(e,Fs())}async function Ks(e,n,r){let s=await ny(e,n,r);return gill.assertAccountExists(s),s}async function ny(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return zs(s)}async function hE(e,n,r){let s=await sy(e,n,r);return gill.assertAccountsExist(s),s}async function sy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zs(t))}function g({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function Js(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function H(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function m(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:H(r.value),role:js(r.value)?gill.upgradeRoleToSigner(s):s,...js(r.value)?{signer:r.value}:{}})}}function js(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Zs=new Uint8Array([7]);function zE(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zs)}function $r(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Zs}))}function qs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function KE(){return gill.combineCodec($r(),qs())}async function Xs(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),o(t.adminDomainConfig),...a],data:$r().encode(c),programAddress:r})}function jE(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),o(t.adminDomainConfig),...a],data:$r().encode(c),programAddress:r})}function JE(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:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r(),adminDomainConfig:r()},data:qs().decode(e.data)}}var to=new Uint8Array([8]);function eP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(to)}function Qr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(st())],["compressedProofArgs",gill.getOptionEncoder(b())]]),e=>({...e,discriminator:to}))}function ro(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(ot())],["compressedProofArgs",gill.getOptionDecoder(v())]])}function tP(){return gill.combineCodec(Qr(),ro())}async function no(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.settings.value||(t.settings.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getU128Encoder().encode(Js(c.settingsIndex))]})),t.authority.value||(t.authority.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(H(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Qr().encode(c),programAddress:r})}function rP(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Qr().encode(c),programAddress:r})}function nP(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ro().decode(e.data)}}var co=new Uint8Array([19]);function uP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(co)}function ao(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(st())],["settingsMut",Te()],["compressedProofArgs",b()]]),e=>({...e,discriminator:co}))}function io(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ot())],["settingsMut",fe()],["compressedProofArgs",v()]])}function AP(){return gill.combineCodec(ao(),io())}function uo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ao().encode(c),programAddress:r})}function gP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:io().decode(e.data)}}var mo=new Uint8Array([16]);function SP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mo)}function yo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",b()],["settingsMutArgs",Te()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:mo}))}function po(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",v()],["settingsMutArgs",fe()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())]])}function xP(){return gill.combineCodec(yo(),po())}function To(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:yo().encode(c),programAddress:r})}function IP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:po().decode(e.data)}}var So=new Uint8Array([0]);function hP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(So)}function xo(){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()))],["authority",gill.getAddressEncoder()],["metadataUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:So}))}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()))],["authority",gill.getAddressDecoder()],["metadataUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())]])}function RP(){return gill.combineCodec(xo(),Io())}function Do(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.systemProgram),o(t.adminDomainConfig),...a],data:xo().encode(c),programAddress:r})}function bP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),systemProgram:r(),adminDomainConfig:s()},data:Io().decode(e.data)}}var Mo=new Uint8Array([4]);function OP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",b()],["member",Wr()],["isPermanentMember",gill.getBooleanEncoder()],["userAccountCreationArgs",Ee()],["linkWalletArgs",gill.getOptionEncoder(Ur())]]),e=>({...e,discriminator:Mo}))}function Eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",v()],["member",ut()],["isPermanentMember",gill.getBooleanDecoder()],["userAccountCreationArgs",Pe()],["linkWalletArgs",gill.getOptionDecoder(_r())]])}function kP(){return gill.combineCodec(an(),Eo())}async function Po(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function wP(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a=g({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function NP(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 KP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function un(){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 jP(){return gill.combineCodec(un(),bo())}async function vo(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=g(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:un().encode({}),programAddress:r})}function JP(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=g(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:un().encode({}),programAddress:r})}function YP(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 _o=new Uint8Array([18]);function th(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_o)}function gn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["compressedProofArgs",b()],["settingsCreation",At()],["userMutArgs",Ae()],["settingsIndex",gill.getU128Encoder()],["setAsDelegate",gill.getBooleanEncoder()]]),e=>({...e,discriminator:_o}))}function Wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["compressedProofArgs",v()],["settingsCreation",gt()],["userMutArgs",ge()],["settingsIndex",gill.getU128Decoder()],["setAsDelegate",gill.getBooleanDecoder()]])}function rh(){return gill.combineCodec(gn(),Wo())}async function Bo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:gn().encode(c),programAddress:r})}function nh(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:gn().encode(c),programAddress:r})}function sh(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r(),whitelistedAddressTrees:r()},data:Wo().decode(e.data)}}var Oo=new Uint8Array([5]);function Ah(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oo)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",b()],["createUserArgs",gill.getArrayEncoder(hr())]]),e=>({...e,discriminator:Oo}))}function ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",v()],["createUserArgs",gill.getArrayDecoder(Rr())]])}function gh(){return gill.combineCodec(yn(),ko())}async function wo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:yn().encode(c),programAddress:r})}function mh(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:yn().encode(c),programAddress:r})}function yh(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 Vo=new Uint8Array([17]);function Ih(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vo)}function Go(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",Te()],["compressedProofArgs",b()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Vo}))}function Fo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",fe()],["compressedProofArgs",v()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())]])}function Dh(){return gill.combineCodec(Go(),Fo())}function zo(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Go().encode(c),programAddress:r})}function Ch(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Fo().decode(e.data)}}var Jo=new Uint8Array([2]);function bh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jo)}function Yo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Jo}))}function Zo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function vh(){return gill.combineCodec(Yo(),Zo())}function qo(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),o(t.adminDomainConfig),...a],data:Yo().encode(c),programAddress:r})}function Uh(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:{domainConfig:r(),admin:r(),adminDomainConfig:r()},data:Zo().decode(e.data)}}var oc=new Uint8Array([1]);function kh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oc)}function cc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthority",gill.getOptionEncoder(gill.getAddressEncoder())],["newMetadataUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))]]),e=>({...e,discriminator:oc}))}function ac(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthority",gill.getOptionDecoder(gill.getAddressDecoder())],["newMetadataUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))]])}function wh(){return gill.combineCodec(cc(),ac())}function ic(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.systemProgram),...a],data:cc().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:{domainConfig:r(),authority:r(),systemProgram:r()},data:ac().decode(e.data)}}var Ac=new Uint8Array([6]);function jh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ac)}function gc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Ae()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",b()]]),e=>({...e,discriminator:Ac}))}function mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",ge()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",v()]])}function Jh(){return gill.combineCodec(gc(),mc())}function yc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:false}},c={...e},a=g({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:gc().encode(c),programAddress:r})}function Yh(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:mc().decode(e.data)}}var fc=new Uint8Array([32]);function tR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fc)}function lc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",rt()],["compressedProofArgs",b()],["settingsCreationArgs",At()]]),e=>({...e,discriminator:fc}))}function Sc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",nt()],["compressedProofArgs",v()],["settingsCreationArgs",gt()]])}function rR(){return gill.combineCodec(lc(),Sc())}function nR(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.authority),o(t.adminDomainConfig),...a],data:lc().encode(c),programAddress:r})}function sR(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:{authority:r(),adminDomainConfig:r()},data:Sc().decode(e.data)}}var Dc=new Uint8Array([31]);function AR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Dc)}function Cc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",he()],["compressedProofArgs",b()],["userCreationArgs",Ee()]]),e=>({...e,discriminator:Dc}))}function Mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",J()],["compressedProofArgs",v()],["userCreationArgs",Pe()]])}function gR(){return gill.combineCodec(Cc(),Mc())}function mR(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true},adminDomainConfig:{value:e.adminDomainConfig??null,isWritable:false}},c={...e},i={args:c};t.adminDomainConfig.value||(t.adminDomainConfig.value="5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.authority),o(t.adminDomainConfig),...a],data:Cc().encode(c),programAddress:r})}function yR(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:{authority:r(),adminDomainConfig:r()},data:Mc().decode(e.data)}}var Pc=new Uint8Array([29]);function IR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pc)}function fn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Pc}))}function hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())]])}function DR(){return gill.combineCodec(fn(),hc())}async function CR(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(H(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:fn().encode(c),programAddress:r})}function Rc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:fn().encode(c),programAddress:r})}function MR(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:hc().decode(e.data)}}var Uc=new Uint8Array([27]);function UR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uc)}function _c(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Uc}))}function Wc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function _R(){return gill.combineCodec(_c(),Wc())}function Bc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:_c().encode(c),programAddress:r})}function WR(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Wc().decode(e.data)}}var Oc=new Uint8Array([30]);function HR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Oc)}function Sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Oc}))}function kc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())]])}function VR(){return gill.combineCodec(Sn(),kc())}async function GR(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(H(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(H(t.source.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(H(t.destination.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Sn().encode(c),programAddress:r})}function wc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Sn().encode(c),programAddress:r})}function FR(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:kc().decode(e.data)}}var Gc=new Uint8Array([28]);function qR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gc)}function xn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Gc}))}function Fc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function XR(){return gill.combineCodec(xn(),Fc())}async function $R(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(H(t.source.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(H(t.destination.value)),gill.getAddressEncoder().encode(H(t.tokenProgram.value)),gill.getAddressEncoder().encode(H(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:xn().encode(c),programAddress:r})}function zc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:xn().encode(c),programAddress:r})}function QR(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Fc().decode(e.data)}}var Jc=new Uint8Array([12]);function cb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function Yc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:Jc}))}function Zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function ab(){return gill.combineCodec(Yc(),Zc())}function qc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Yc().encode(c),programAddress:r})}function ib(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:Zc().decode(e.data)}}var Qc=new Uint8Array([23]);function pb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qc)}function ea(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Qc}))}function ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function Tb(){return gill.combineCodec(ea(),ta())}function ra(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ea().encode(c),programAddress:r})}function fb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ta().decode(e.data)}}var oa=new Uint8Array([9]);function Mb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oa)}function ca(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",mt()],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:oa}))}function aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",yt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Eb(){return gill.combineCodec(ca(),aa())}function ia(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:ca().encode(c),programAddress:r})}function Pb(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:aa().decode(e.data)}}var Aa=new Uint8Array([20]);function Wb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Aa)}function ga(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",mt()],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Aa}))}function ma(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",yt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function Bb(){return gill.combineCodec(ga(),ma())}function ya(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:ga().encode(c),programAddress:r})}function Lb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:ma().decode(e.data)}}var fa=new Uint8Array([13]);function Gb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fa)}function la(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:fa}))}function Sa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Fb(){return gill.combineCodec(la(),Sa())}function xa(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:la().encode(c),programAddress:r})}function zb(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Sa().decode(e.data)}}var Ca=new Uint8Array([24]);function Xb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function Ma(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Ca}))}function Ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function $b(){return gill.combineCodec(Ma(),Ea())}function Pa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ma().encode(c),programAddress:r})}function Qb(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ea().decode(e.data)}}var ba=new Uint8Array([11]);function ov(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ba)}function va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:ba}))}function Ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function cv(){return gill.combineCodec(va(),Ua())}function _a(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=g({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:va().encode(c),programAddress:r})}function av(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:Ua().decode(e.data)}}var La=new Uint8Array([22]);function mv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(La)}function Oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:La}))}function ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function yv(){return gill.combineCodec(Oa(),ka())}function wa(e,n){let r=n?.programAddress??u,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=g({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Oa().encode(c),programAddress:r})}function pv(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:ka().decode(e.data)}}var Va=new Uint8Array([10]);function Dv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Va)}function Ga(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:Va}))}function Fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Cv(){return gill.combineCodec(Ga(),Fa())}function za(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ga().encode(c),programAddress:r})}function Mv(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Fa().decode(e.data)}}var Ja=new Uint8Array([21]);function Uv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function Ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:Ja}))}function Za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function _v(){return gill.combineCodec(Ya(),Za())}function qa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ya().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===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Za().decode(e.data)}}var Qa=new Uint8Array([14]);function Nv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qa)}function ei(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Qa}))}function ti(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function Hv(){return gill.combineCodec(ei(),ti())}function ri(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},i=g({}),a=m(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:ei().encode({}),programAddress:r})}function Vv(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:ti().decode(e.data)}}var oi=new Uint8Array([25]);function Jv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oi)}function ci(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:oi}))}function ai(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function Yv(){return gill.combineCodec(ci(),ai())}function ii(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=g({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:ci().encode(c),programAddress:r})}function Zv(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 Ai=new Uint8Array([15]);function rU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ai)}function gi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",pt()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())]]),e=>({...e,discriminator:Ai}))}function mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Tt()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())]])}function nU(){return gill.combineCodec(gi(),mi())}function yi(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:gi().encode(c),programAddress:r})}function sU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:mi().decode(e.data)}}var fi=new Uint8Array([26]);function AU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fi)}function li(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",pt()],["secp256r1VerifyArgs",gill.getArrayEncoder(K())],["settingsReadonlyArgs",X()],["compressedProofArgs",b()]]),e=>({...e,discriminator:fi}))}function Si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Tt()],["secp256r1VerifyArgs",gill.getArrayDecoder(j())],["settingsReadonlyArgs",$()],["compressedProofArgs",v()]])}function gU(){return gill.combineCodec(li(),Si())}function xi(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=g(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:li().encode(c),programAddress:r})}function mU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Si().decode(e.data)}}var u="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 XU(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 _S=(y=>(y[y.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",y[y.ChangeConfig=1]="ChangeConfig",y[y.ChangeConfigCompressed=2]="ChangeConfigCompressed",y[y.CompressSettingsAccount=3]="CompressSettingsAccount",y[y.CreateDomainConfig=4]="CreateDomainConfig",y[y.CreateDomainUserAccount=5]="CreateDomainUserAccount",y[y.CreateGlobalCounter=6]="CreateGlobalCounter",y[y.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",y[y.CreateUserAccounts=8]="CreateUserAccounts",y[y.DecompressSettingsAccount=9]="DecompressSettingsAccount",y[y.DisableDomainConfig=10]="DisableDomainConfig",y[y.EditDomainConfig=11]="EditDomainConfig",y[y.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",y[y.MigrateCompressedSettings=13]="MigrateCompressedSettings",y[y.MigrateCompressedUsers=14]="MigrateCompressedUsers",y[y.NativeTransferIntent=15]="NativeTransferIntent",y[y.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",y[y.TokenTransferIntent=17]="TokenTransferIntent",y[y.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",y[y.TransactionBufferClose=19]="TransactionBufferClose",y[y.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",y[y.TransactionBufferCreate=21]="TransactionBufferCreate",y[y.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",y[y.TransactionBufferExecute=23]="TransactionBufferExecute",y[y.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",y[y.TransactionBufferExtend=25]="TransactionBufferExtend",y[y.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",y[y.TransactionBufferVote=27]="TransactionBufferVote",y[y.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",y[y.TransactionExecute=29]="TransactionExecute",y[y.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",y[y.TransactionExecuteSync=31]="TransactionExecuteSync",y[y.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",y))(_S||{});function $U(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),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([18])),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([17])),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([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var BS=6e3,LS=6001,OS=6002,kS=6003,wS=6004,NS=6005,HS=6006,VS=6007,GS=6008,FS=6009,zS=6010,KS=6011,jS=6012,JS=6013,YS=6014,ZS=6015,qS=6016,XS=6017,$S=6018,QS=6019,ex=6020,tx=6021,rx=6022,nx=6023,sx=6024,ox=6025,cx=6026,ax=6027,ix=6028,dx=6029,ux=6030,Ax=6031,gx=6032,mx=6033,yx=6034,px=6035,Tx=6036,fx=6037,lx=6038,Sx=6039,xx=6040,Ix=6041,Ii;process.env.NODE_ENV!=="production"&&(Ii={[$S]:"This member is already delegated to another wallet.",[Tx]:"The domain configuration account is disabled. Please contact support or try again later.",[fx]:"Missing domain configuration account. Include it as a required account in this instruction.",[kS]:"Duplicate public keys detected among members. Each member must have a unique key.",[OS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[FS]:"No members provided. A multisig wallet must contain at least one member.",[cx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[ax]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[ix]:"Declared buffer size does not match the actual serialized size.",[tx]:"Not enough members with vote permission to meet the approval threshold.",[QS]:"At least one signer with execute permission is required to proceed.",[ex]:"At least one signer with initiate permission is required to perform this action.",[YS]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[Ix]:"Address Tree supplied is not part of the whitelisted address trees",[ZS]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[ox]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[JS]:"Unexpected number of accounts provided for this instruction.",[LS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[BS]:"Invalid signature: the provided signature does not match the expected message payload.",[yx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[KS]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[jS]:"Malformed transaction message: structure or formatting does not match the expected layout.",[gx]:"An input string exceeds the maximum allowed character length.",[lx]:"This member is not registered under the provided domain configuration.",[qS]:"A required account is missing from the instruction context.",[mx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[XS]:"User mutation arguments are required when performing add or remove delegate operations.",[nx]:"No valid signer found in this transaction.",[HS]:"Only one permanent member is allowed per wallet.",[VS]:"Only one transaction manager is allowed per wallet.",[xx]:"The given origin index is not in the whitelisted origins.",[wS]:"Permanent members cannot be removed from a wallet.",[NS]:"This operation cannot assign a permanent member.",[Ax]:"Writable CPI calls to protected accounts are not permitted.",[Sx]:"The relying party ID hash does not match the one defined in the domain configuration.",[px]:"The specified slot number was not found in the provided slot history.",[zS]:"Too many members: a maximum of 4 members are supported.",[dx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[GS]:"This operation cannot assign a transaction manager.",[ux]:"This transaction has not yet reached the required approval threshold.",[sx]:"Only the transaction creator or rent payer may close this transaction buffer.",[rx]:"Member is not part of the expected signers for this transaction."});function s_(e){return process.env.NODE_ENV!=="production"?Ii[e]:"Error message not available in production bundles."}function o_(e,n,r){return gill.isProgramError(e,n,u,r)}var It={Ed25519:1,Secp256r1:2};var le={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Cn=8,Dt=16,me=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 Mn=33,ie=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!==Mn)throw new Error(`Invalid public key length, expected ${Mn} 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===Mn)return n;throw new Error("Invalid public key input")}toBytes(){let n=this.toBuffer();return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}toString(){return this.toBase58()}toJSON(){return this.toBase58()}},M=class extends ie{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;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;}};function Mx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Ex(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ci=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Mx())],["addressTableLookups",gill.getArrayCodec(Ex())]]);function Mi(e){return Ci.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 Ei(e){let n=Ci.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:u,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var Pi="revibase.com",hi="https://auth.revibase.com",Ri="https://api.revibase.com";async function hn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await Q().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((s.unitsConsumed??0)*1.1)||8e5;return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function Ui(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function _i(e,n){if(e.length===0)throw new Error("Bundle is empty.");for(let c=0;c<e.length;c++){if(e[c].length>1644)throw new Error(`Transaction ${c} exceeds maximum length, ${e[c].length}. Retry again.`);console.log(`Transaction ${c} length: ${e[c].length}`);}let r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})});if(!r.ok)throw console.error(await r.json()),new Error("Failed to simulate bundle");let{result:s,error:t}=await r.json();if(!s||t)throw console.error(t??s),new Error(`Unable to simulate bundle: ${JSON.stringify(t??s)}`);if(typeof s.value.summary!="string"&&s.value.summary.failed){let{TransactionFailure:c}=s.value.summary.failed.error,[,i]=c;throw console.error(t??s),new Error(`Simulation failed: ${i}`)}return s.value.transactionResults.map(c=>c.unitsConsumed)}function N(e,n=0){let r=e instanceof M?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}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs?.clientDataJson?new Uint8Array([...r.authData,...sha256.sha256(r.verifyArgs.clientDataJson)]):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function Oe(e){if(e instanceof ie)return {keyType:It.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:It.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function vi(e){return e instanceof M?e.toString():e.address.toString()}function ye(e){let n=new Set,r=[];for(let s of e)n.has(vi(s))||(r.push(s),n.add(vi(s)));if(r.filter(s=>s instanceof M).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function Wi({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 Bi(e){let n=await fetch(`${e}/getRandomPayer`),{randomPayer:r}=await n.json();return {address:gill.address(r),async signTransactions(s){let t={publicKey:r,transactions:s.map(a=>gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)))},i=await(await fetch(`${e}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(a=>({[gill.address(r)]:gill.getBase58Encoder().encode(a)}))}}}var ke=null,Kt=null,jt=null,Jt=null,Yt=null,zt=null,Rn=null,Zt=null,bn=null,vn=null,Li=null;function Oi(){if(!ke)throw new Error("Rpc is not initialized yet.");return ke}function Ct(){if(!Kt)throw new Error("Rpc is not initialized yet");return Kt}function Q(){if(!jt)throw new Error("Rpc is not initialized yet");return jt}function ki(){if(!Jt)throw new Error("Rpc is not initialized yet.");return Jt}function wi(){if(!Yt)throw new Error("Rpc is not initialized yet");return Yt}async function Y_(){return zt||(zt=await Bi(Rn??Ri)),zt}function Un(){if(!Zt)throw new Error("Jito Bundle Config is not set.");return Zt}function De(){return bn??hi}function Ni(){return vn}function qt(){return Li}function Z_(){Kt=null,jt=null,ke=null,zt=null,Rn=null,Zt=null,bn=null,Jt=null,Yt=null,vn=null;}function q_({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,authorizedClient:i,additionalInfo:a}){ke=e,Kt=stateless_js.createRpc(ke,r,n);let{rpc:o,sendAndConfirmTransaction:d}=gill.createSolanaClient({urlOrMoniker:ke});jt=o,Jt=d,Yt=programs.estimateComputeUnitLimitFactory({rpc:o}),Rn=t??null,Zt=s??null,bn=c??null,vn=i??null,Li=a??null;}var G=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(u.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=await Ct().getStateTreeInfos();return this.packOutputTreeIndex(stateless_js.selectStateTreeInfo(n))}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function Xt(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await Ct().getCompressedAccount(e);return s&&n?.set(e.toString(),s),s}}async function oe(e,n){let s=(await Promise.all(e.map(async t=>Xt(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 O(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 we(e,n,r,s,t){if(t.length===0)return [];let c=t.map((d,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:d.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],c),a=await e.getOutputTreeIndex();return t.map((d,A)=>({addressTreeInfo:i[A],outputStateTreeIndex:a,address:d.address,type:d.type}))}function re(e,n,r,s,t,c,i){let a=[];for(let A=0;A<n.length;A++)a.push({treeInfo:n[A],rootIndex:s[A],leafIndex:r[A],proveByIndex:t[A],hash:c[A].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new Error("Unable to parsed data.");return c.map((A,p)=>({data:i.decode(A.data.data),accountMeta:{treeInfo:o.packedTreeInfos[p],address:new Uint8Array(A.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function pe(e,n,r,s,t){let c=null,i=null,a=new G;if(e){await a.addSystemAccounts();let{address:o}=await ne(n,r),d=(await oe([{address:o,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await ee([d],[]);let A=a.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!A)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:A.packedTreeInfos[0]},data:z().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:a}}async function ee(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Ct().getValidityProofV0(e,n)}catch(c){if(console.error(`Attempt ${t}, Get Validity Proof failed. ${c}`),t++,t>=r)throw new Error(`Failed to get validity proof after ${r} attempts: ${c}`);await new Promise(i=>setTimeout(i,s));}throw new Error(`Failed to get validity proof after ${r} attempts`)}async function Ne(){let e=await $t();return Math.floor(Math.random()*e.length)}var _n;async function $t(){if(!_n){let{data:e}=await Ks(Q(),await Gi());_n=e.whitelistedAddressTrees;}return _n}async function Fi(e,n,r){let s=await Qx(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function Qx(e,n,r){let{address:s}=await F(e,n),t=await Xt(s,r);return t?.data?.data?J().decode(t.data.data):null}async function Qt(e,n,r){let s=await eI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function eI(e,n,r){try{let{address:s}=await ne(e,n),t=await Xt(s,r);if(!t?.data?.data)return null;let c=z().decode(t.data.data);return c.data.__option==="None"?null:{...c.data.value,isCompressed:!0}}catch{let s=await zr(Q(),await te(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function Wn(e){let n=await $t();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function er(e){let r=(await $t()).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 Wn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function F(e,n=0){let r=await Wn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof ie?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function Ve({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha256.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new Error("RpId not found.");if(!e)throw new Error("RpIdHash not found.");let[r]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function rr(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Gi(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Yi(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof ie?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Se(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function te(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function Zi(e){let n=await te(e);return await Se(n)}async function PW(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}var Ge=null,Xi=2e3,$i=3e3,nI=300*1e3;async function nr({authUrl:e,additionalInfo:n,signer:r,popUp:s=null,data:t}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");return new Promise((c,i)=>{let a=new URL(e).origin,o=null,d=setInterval(()=>{s&&s.closed&&(p(),i(new Error("User closed the authentication window")));},500),A=setTimeout(()=>{T("Authentication timeout."),p(),i(new Error("Authentication timed out"));},nI);function p(){clearInterval(d),clearTimeout(A),o&&clearTimeout(o),Ge&&window.removeEventListener("message",Ge),s&&s.close();}if(s?s.location.replace(e):s=rd(e),!s){i(new Error("Disable your popup blocker to continue."));return}function T(...x){n?.debug&&console.debug("[Popup]",...x);}let S=x=>{let D=x.origin===a,E=x.source===s;if(!D||!E||!x.isTrusted||!s){T("Ignored message from unknown source",x);return}switch(x.data.type){case "popup-ready":T("Popup is ready, sending auth data"),s.postMessage({type:"popup-init",payload:{signer:r?.toString(),data:t,additionalInfo:n}},a),o=setTimeout(()=>{p(),i(new Error("User closed the authentication window"));},Xi+$i);break;case "popup-complete":T("Received completion message");try{let B=JSON.parse(x.data.payload);p(),c(B);}catch{i(new Error("Failed to parse response payload"));}break;case "popup-heartbeat":T("Received heartbeat"),o&&(clearTimeout(o),o=setTimeout(()=>{p(),i(new Error("User closed the authentication window"));},Xi+$i));break;case "popup-closed":T("Popup explicitly closed"),p(),i(new Error("User closed the authentication window"));break;default:T("Unknown message type",x.data.type);}};Ge&&window.removeEventListener("message",Ge),Ge=S,window.addEventListener("message",Ge);})}function sr(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Et(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return c}function or(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function sI(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 Qi(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 ed(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function td(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let B=n&127;r+=B;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,A=o[0]===0&&o.length>32?o.slice(1):o;if(d.length>32||A.length>32)throw new Error("r or s length > 32 bytes");let p=new Uint8Array(32);p.set(d,32-d.length);let T=p256.p256.Point.CURVE().n>>1n,S=BigInt("0x"+or(A)),D=(S>T?p256.p256.Point.CURVE().n-S:S).toString(16).padStart(64,"0"),E=sI(D);return new Uint8Array([...p,...E])}function rd(e=`${De()}/loading`){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let n=window.innerWidth||screen.availWidth,r=window.innerHeight||screen.availHeight,s=n<=768,t,c,i,a;if(s)t=n,c=r,i=0,a=0;else {let A=window.screenLeft??window.screenX,p=window.screenTop??window.screenY,T=window.innerWidth??document.documentElement.clientWidth??screen.width,S=window.innerHeight??document.documentElement.clientHeight??screen.height;t=500,c=600,a=A+(T-t)/2,i=p+(S-c)/2;}let o=[`width=${t}`,`height=${c}`,`top=${i}`,`left=${a}`,"toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes"].join(","),d=window.open(e,"_blank",o);return d&&d.focus(),d}function FW(e){let n=tinyCbor.decodeCBOR(e),r=p256.p256.Point.fromAffine({x:BigInt("0x"+or(n.get(-2))),y:BigInt("0x"+or(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function od(e){let r=p256.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 zW(e,n=0,r=false){let{authenticatorData:s,clientDataJSON:t,signature:c}=e.authResponse.response,i=new Uint8Array(Et(s)),a=JSON.parse(new TextDecoder().decode(Et(t))),o=Qi(a),d=td(new Uint8Array(Et(c))),A=await Ve({rpIdHash:i.subarray(0,32)});return new M(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Et(t)),truncatedClientDataJson:o,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},domainConfig:A,authData:i,signature:d,originIndex:n,crossOrigin:r})}async function KW(e,n){let{data:r}=await Kn(Q(),e),t=ed(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}async function rB(e){let n=await hn(e,true),r=await _i(n.map(gill.getBase64EncodedWireTransaction),Oi()),s=await hn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await DI(s.map(gill.getBase64EncodedWireTransaction))}async function nB({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await Q().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions([...e],c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(s.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([wi()(c),Ui(Q(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil(i*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await ki()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function DI(e,n=10,r=1e3,s=Un()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/bundles`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})});if(i.status===429&&c<n){await new Promise(o=>setTimeout(o,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);return a.result}throw new Error("Failed to send bundle after retries.")}async function sB(e,n=30,r=3e3,s=Un()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/getBundleStatuses`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});if(i.status===429&&c<n){await new Promise(d=>setTimeout(d,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);let o=a.result;if(o.value.length){let d=o.value[0];if(d.confirmation_status==="confirmed"||d.confirmation_status==="finalized")return d.transactions[d.transactions.length-1]}if(c<n){await new Promise(d=>setTimeout(d,r));continue}}throw new Error("Failed to get bundle status after retries.")}async function oB({signer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){let c=await Qt(n,r,t);if(c.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:i}=c.members.find(S=>Pt(S.pubkey)===e.toString())??{};if(!i)throw new Error("No permissions found for the current member.");let a=me.has(i,le.InitiateTransaction),o=me.has(i,le.VoteTransaction),d=me.has(i,le.ExecuteTransaction);if(a&&o&&d)return null;if(!o||!d)throw new Error("Signer lacks the required Vote/Execute permissions.");let A=c.members.find(S=>me.has(S.permissions,Dt));if(!A)throw new Error("No transaction manager available in wallet.");let p=gill.address(Pt(A.pubkey)),T=await Fi(p,A.userAddressTreeIndex,t);if(T.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return CI(p,T.transactionManagerUrl.value,s)}function CI(e,n,r){return {address:e,async signTransactions(s){let t={publicKey:e.toString(),transactions:s.map(gill.getBase64EncodedWireTransaction)};r&&(t.transactionMessageBytes=gill.getBase64Decoder().decode(r));let c=Ni();if(c){let{url:o,publicKey:d}=c,p=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({transactions:t.transactions,publicKey:d})})).json();if("error"in p)throw new Error(p.error);t.authorizedClient={publicKey:d,signatures:p.signatures};}let a=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in a)throw new Error(a.error);return a.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function Pt(e){return e.keyType===It.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function MB({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let i=await Zi(e),a=[],o=[];for(let f of r)if(f.type==="AddMembers")a.push(...await Promise.all(f.members.map(async l=>l.member instanceof M?{address:(await F(l.member,l.userAddressTreeIndex)).address,type:"User"}:l.setAsDelegate?{address:(await F(l.member.address,l.userAddressTreeIndex)).address,type:"User"}:{address:(await F(l.member,l.userAddressTreeIndex)).address,type:"User"})));else if(f.type==="RemoveMembers")o.push(...await Promise.all(f.members.map(async l=>({address:(await F(l.member,l.userAddressTreeIndex)).address,type:"User"}))));else if(f.type==="EditPermissions")for(let l of f.members)l.delegateOperation!==2&&(l.delegateOperation===0?a:o).push({address:(await F(l.member,l.userAddressTreeIndex)).address,type:"User"});let d=new G,A=null,p=null,T=[];if(a.length||o.length||t){await d.addSystemAccounts();let f=[...t?[{address:(await ne(e,n)).address,type:"Settings"}]:[],...o,...a],l=f.length?await oe(f,c):[];if(l.length){A=await ee(l,[]);let I=l.filter(U=>U.type==="Settings"),_=l.filter(U=>U.type==="User");t&&A&&(p=re(d,A.treeInfos.slice(0,1),A.leafIndices.slice(0,1),A.rootIndices.slice(0,1),A.proveByIndices.slice(0,1),I,z())[0]),_.length&&A&&(T=re(d,A.treeInfos.slice(t?1:0),A.leafIndices.slice(t?1:0),A.rootIndices.slice(t?1:0),A.proveByIndices.slice(t?1:0),_,J()));}}let S=[],x=[];for(let f of r)switch(f.type){case "AddMembers":{let l=[];for(let I of f.members)if(I.member instanceof M){let _=S.length,{message:U,signature:W,publicKey:L,domainConfig:ce}=N(I.member,_);U&&W&&L&&S.push({message:U,signature:W,publicKey:L}),ce&&d.addPreAccounts([{address:ce,role:gill.AccountRole.READONLY}]);let Y=await cr(T,I.member,I.userAddressTreeIndex);Y&&l.push(id({permissionArgs:I.permissions,index:_,userMutArgs:Y,isTransactionManager:I.isTransactionManager,pubkey:I.member,setAsDelegate:I.setAsDelegate}));}else {I.setAsDelegate&&d.addPreAccounts([{address:I.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:I.member}]);let _=await cr(T,I.setAsDelegate?I.member.address:I.member,I.userAddressTreeIndex);_&&l.push(id({permissionArgs:I.permissions,index:-1,userMutArgs:_,isTransactionManager:I.isTransactionManager,pubkey:I.member,setAsDelegate:I.setAsDelegate}));}x.push({__kind:f.type,fields:[l]});break}case "RemoveMembers":{let l=await Promise.all(f.members.map(async I=>{let _=await cr(T,I.member,I.userAddressTreeIndex);if(!_)throw new Error("User account not found");return hI({pubkey:I.member,userMutArgs:_})}));x.push({__kind:f.type,fields:[l]});break}case "EditPermissions":{let l=await Qt(e,n,c),I=l.members.find(W=>me.has(W.permissions,Cn)),_=l.members.find(W=>me.has(W.permissions,Dt)),U=await Promise.all(f.members.map(async W=>{let L=!!I?.pubkey&&Pt(I.pubkey)===W.member.toString();if(!!_?.pubkey&&Pt(_.pubkey)===W.member.toString())throw new Error("Transaction Manager's permission cannot be changed.");let Y=W.delegateOperation!==2?await cr(T,W.member,W.userAddressTreeIndex):void 0;return PI({permissionArgs:W.permissions,isPermanentMember:L,userMutArgs:Y,pubkey:W.member,delegateOperation:W.delegateOperation})}));x.push({__kind:f.type,fields:[U]});break}default:x.push({__kind:f.type,fields:[f.threshold]});}let{remainingAccounts:D,systemOffset:E}=d.toAccountMetas(),B=O(A,E);return {instructions:t?[uo({configActions:x,payer:s,authority:gill.createNoopSigner(i),compressedProofArgs:B,settingsMut:p,remainingAccounts:D})]:[await no({settingsIndex:e,configActions:x,payer:s,compressedProofArgs:B,remainingAccounts:D})],secp256r1VerifyInput:S}}async function cr(e,n,r){let{address:s}=await F(n,r);return e.find(c=>new MI__default.default(new Uint8Array(c.accountMeta.address)).eq(s))}function PI({pubkey:e,permissionArgs:n,userMutArgs:r,delegateOperation:s,isPermanentMember:t}){if(t&&(r||s!==2))throw new Error("Delegation cannot be modified for a permanent member.");let c=Ad(n,t);return {memberKey:Oe(e),permissions:c,userArgs:r?gill.some(r):gill.none(),delegateOperation:s}}function hI({pubkey:e,userMutArgs:n}){if(n.data.isPermanentMember)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:Oe(e),userArgs:n.data.delegatedTo.__option==="Some"?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function id({pubkey:e,permissionArgs:n,index:r,userMutArgs:s,setAsDelegate:t,isTransactionManager:c}){return {member:{permissions:RI(s,t,n,c),pubkey:Oe(e),userAddressTreeIndex:s.data.userAddressTreeIndex},verifyArgs:e instanceof M&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin}):gill.none(),userArgs:t?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]},setAsDelegate:t}}function RI(e,n,r,s){let t=e.data,c=t.isPermanentMember;if(c){if(!n)throw new Error("Permanent members must also be delegates. Please set `setAsDelegate = true`.");if(t.delegatedTo.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}if(s){if(r.execute||r.vote)throw new Error("Transaction Manager can only have initiate permission");if(n)throw new Error("Transaction Manager cannot be a delegate. Please set `setAsDelegate = false`.")}return Ad(r,c,s)}function Ad(e,n=false,r=false){let s=[];return e.initiate&&s.push(le.InitiateTransaction),e.vote&&s.push(le.VoteTransaction),e.execute&&s.push(le.ExecuteTransaction),n&&s.push(Cn),r&&s.push(Dt),me.fromPermissions(s)}var Fe=33,ze=64,wn=14,LI=2,OI=gill.address("Secp256r1SigVerify1111111111111111111111111");function kI(){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 wI(){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 pd(){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=wI();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=wn;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Fe).decode(e,n);n+=Fe;let d=gill.fixDecoderSize(gill.getBytesDecoder(),ze).decode(e,n);n+=ze;let A=t[a].messageDataSize,p=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,i.push({publicKey:o,signature:d,message:p});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function Td(){return gill.createEncoder({getSizeFromValue:e=>{let n=wn*e.offsets.length,r=e.payload.reduce((s,t)=>s+Fe+ze+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let s=kI();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Fe).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),ze).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function hB(){return gill.combineCodec(Td(),pd())}function V(e,n){let r=e.length,s=LI+r*wn,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],A=s,p=A+Fe,T=p+ze;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:p,signatureInstructionIndex:65535,messageDataOffset:T,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Fe+ze+d.length;}let c=n?.programAddress??OI,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Td().encode(i)}}function RB(e){return {programAddress:e.programAddress,accounts:{},data:pd().decode(e.data)}}async function wB({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new G;await c.addSystemAccounts();let i=await te(e),{address:a}=await ne(e,n),o=await oe([{address:a,type:"Settings"}],t),d=await ee(o,[]),A=re(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(f=>f.type==="Settings"),z())[0],p=ye(s),T=p.filter(f=>f instanceof M),S=[],x=[];for(let f of T){let l=S.length,{domainConfig:I,verifyArgs:_,signature:U,publicKey:W,message:L}=N(f,l);L&&U&&W&&S.push({message:L,signature:U,publicKey:W}),I&&(c.addPreAccounts([{address:I,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&x.push({domainConfigKey:I,verifyArgs:_.value}));}c.addPreAccounts(p.filter(f=>"address"in f).map(f=>({address:f.address,role:gill.AccountRole.READONLY_SIGNER,signer:f})));let{remainingAccounts:D,systemOffset:E}=c.toAccountMetas(),B=O(d,E),C=[];return S.length>0&&C.push(V(S)),C.push(To({settings:i,settingsMutArgs:A,compressedProofArgs:B,payer:r,secp256r1VerifyArgs:x,remainingAccounts:D})),C}async function VB({admin:e,addressTree:n}){return Xs({payer:e,addressTree:n,remainingAccounts:[]})}async function jB({payer:e,rpId:n,origins:r,authority:s,metadataUrl:t,adminDomainConfig:c}){let i=await Ve({rpId:n});return Do({origins:r,authority:s,payer:e,domainConfig:i,rpId:n,metadataUrl:t,adminDomainConfig:c,remainingAccounts:[]})}async function tL({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new G;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await ne(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await F(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await oe(i,t):[],o=await Ne(),{address:d,addressTree:A}=await F(r.member,o),p=[{address:d,type:"User",tree:A,queue:A}],T=await ee(a,p),S=null,x=null,D=a.filter(I=>I.type==="Settings"),E=a.filter(I=>I.type==="User");D.length&&(S=re(c,T.treeInfos.slice(0,1),T.leafIndices.slice(0,1),T.rootIndices.slice(0,1),T.proveByIndices.slice(0,1),D,z())[0]),E.length&&(x=re(c,T.treeInfos.slice(1,2),T.leafIndices.slice(1,2),T.rootIndices.slice(1,2),T.proveByIndices.slice(1,2),E,J())[0]);let B=await we(c,T.treeInfos.slice(a.length),T.roots.slice(a.length),T.rootIndices.slice(a.length),p),{remainingAccounts:C,systemOffset:f}=c.toAccountMetas(),l=O(T,f);return await Po({payer:n,authority:e,compressedProofArgs:l,member:ut().decode(r.member.toBuffer()),isPermanentMember:r.isPermanentMember,linkWalletArgs:S?gill.some({settingsMutArgs:S,transactionManager:x?gill.some(x):gill.none()}):gill.none(),userAccountCreationArgs:B[0],domainConfig:s,remainingAccounts:C})}async function oL({payer:e}){let n=await rr();return vo({payer:e,globalCounter:n})}async function gL({createUserArgs:e,payer:n}){let r=new G;await r.addSystemAccounts(),r.addPreAccounts(e.map(A=>({address:A.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:A.member})));let s=await Ne(),t=await Promise.all(e.map(async A=>{let{address:p,addressTree:T}=await F(A.member.address,s);return {address:p,tree:T,queue:T,type:"User"}})),c=await ee([],t),i=await we(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=O(c,o);return await wo({compressedProofArgs:d,payer:n,createUserArgs:e.map((A,p)=>({member:A.member.address,isPermanentMember:A.isPermanentMember,userCreationArgs:i[p],transactionManagerUrl:A.transactionManagerUrl??null})),remainingAccounts:a})}async function TL({admin:e,rpId:n,disable:r}){let s=await Ve({rpId:n});return qo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function xL({authority:e,domainConfig:n,newAuthority:r,newOrigins:s,newMetadataUrl:t}){return ic({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthority:r?gill.some(r):gill.none(),newMetadataUrl:t?gill.some(t):gill.none(),remainingAccounts:[]})}async function PL({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new G;await s.addSystemAccounts();let t=await oe([{address:(await F(e.address,n)).address,type:"User"}]),c=await ee(t,[]),i=re(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,J())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=O(c,o);return yc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function zL({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,setAsDelegate:t,cachedAccounts:c}){let i=await rr(),{domainConfig:a,verifyArgs:o,message:d,signature:A,publicKey:p}=N(r),T=[];d&&A&&p&&T.push({message:d,signature:A,publicKey:p});let S=new G;await S.addSystemAccounts();let x=[],D=[];D.push(...await oe([{address:(await F("address"in r?r.address:r,s)).address,type:"User"}],c));let E=await Ne(),{address:B,addressTree:C}=await ne(e,E);x.push({address:B,queue:C,tree:C,type:"Settings"});let f=D.length,l=await ee(D,x),I=re(S,l.treeInfos.slice(0,f),l.leafIndices.slice(0,f),l.rootIndices.slice(0,f),l.proveByIndices.slice(0,f),D.filter(ue=>ue.type==="User"),J())[0],U=(await we(S,l.treeInfos.slice(f),l.roots.slice(f),l.rootIndices.slice(f),x)).find(ue=>ue.type==="Settings")??null;a?S.addPreAccounts([{address:a,role:gill.AccountRole.READONLY}]):"address"in r&&S.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:W,systemOffset:L}=S.toAccountMetas(),ce=O(l,L),Y=[];if(!U)throw new Error("Settings creation args is missing.");return Y.push(await Bo({settingsIndex:e,payer:n,initialMember:r instanceof M?void 0:r,secp256r1VerifyArgs:o,domainConfig:a,userMutArgs:I,globalCounter:i,compressedProofArgs:ce,settingsCreation:U,setAsDelegate:t,remainingAccounts:W})),{instructions:Y,secp256r1VerifyInput:T}}async function eO({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new G;await c.addSystemAccounts();let i=await oe([{address:(await ne(e,n)).address,type:"Settings"}],t),a=await ee(i,[]),o=re(c,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,i.filter(C=>C.type==="Settings"),z())[0],d=ye(s),A=d.filter(C=>C instanceof M),p=[],T=[];for(let C of A){let f=p.length,{domainConfig:l,verifyArgs:I,signature:_,publicKey:U,message:W}=N(C,f);W&&_&&U&&p.push({message:W,signature:_,publicKey:U}),l&&(c.addPreAccounts([{address:l,role:gill.AccountRole.READONLY}]),I?.__option==="Some"&&T.push({domainConfigKey:l,verifyArgs:I.value}));}c.addPreAccounts(d.filter(C=>"address"in C).map(C=>({address:C.address,role:gill.AccountRole.READONLY_SIGNER,signer:C})));let{remainingAccounts:S,systemOffset:x}=c.toAccountMetas(),D=O(a,x),E=[];p.length>0&&E.push(V(p));let B=await te(e);return E.push(zo({settings:B,payer:r,settingsMut:o,compressedProofArgs:D,secp256r1VerifyArgs:T,remainingAccounts:S})),E}function VI(e,n,r,s){let t=GI(e,n),c=FI(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 GI(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function FI(e,n){return n<e.header.numSignerAccounts}async function ar({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ei(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(a=>a.lookupTableAddress),Q()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,o]of t.staticAccounts.entries())i.push({address:o,role:VI(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.WRITABLE});}for(let d of a.readonlyIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.READONLY});}}for(let a of s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(d=>d.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}async function Dd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Se(e),{accountMetas:A,addressLookupTableAccounts:p}=await ar({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),T=[];return c.length>0&&T.push(V(c)),T.push(o?ii({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):ri({transactionBuffer:n,payer:s.address,settings:e})),a&&T.push(Wi({payer:s,tipAmount:a})),{instructions:T,addressLookupTableAccounts:p}}async function Cd({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let A=ye(s),p=await te(e),T=await Se(p),[{accountMetas:S,addressLookupTableAccounts:x,transactionMessage:D},{settingsReadonlyArgs:E,proof:B,packedAccounts:C}]=await Promise.all([ar({transactionMessageBytes:r,walletAddress:T,additionalSigners:A.filter(L=>!(L instanceof M)),addressesByLookupTableAddress:c}),pe(a,e,n,o,d)]);C.addPreAccounts(S);let f=A.filter(L=>L instanceof M),l=[];for(let L of f){let ce=i.length,{domainConfig:Y,verifyArgs:ue,signature:xe,publicKey:ht,message:Rt}=N(L,ce);Rt&&xe&&ht&&i.push({message:Rt,signature:xe,publicKey:ht}),Y&&(C.addPreAccounts([{address:Y,role:gill.AccountRole.READONLY}]),ue?.__option==="Some"&&l.push({domainConfigKey:Y,verifyArgs:ue.value}));}let{remainingAccounts:I,systemOffset:_}=C.toAccountMetas(),U=[];i.length>0&&U.push(V(i));let W=KI(D,S);if(a){if(!t||!E)throw new Error("Payer not found or proof args is missing.");let L=O(B,_);U.push(xi({secp256r1VerifyArgs:l,transactionMessage:W,settingsReadonlyArgs:E,compressedProofArgs:L,payer:t,remainingAccounts:I}));}else U.push(yi({secp256r1VerifyArgs:l,settings:p,transactionMessage:W,remainingAccounts:I}));return {instructions:U,addressLookupTableAccounts:x}}function KI(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 RO({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=ye(s),d=await te(e),A=await Se(d),{settingsReadonlyArgs:p,proof:T,packedAccounts:S}=await pe(a,e,n,false,t),x=[],D=[];for(let f of o)if(f instanceof M){let l=x.length,{domainConfig:I,verifyArgs:_,signature:U,publicKey:W,message:L}=N(f,l);L&&U&&W&&x.push({message:L,signature:U,publicKey:W}),I&&(S.addPreAccounts([{address:I,role:gill.AccountRole.READONLY}]),_?.__option==="Some"&&D.push({domainConfigKey:I,verifyArgs:_.value}));}else S.addPreAccounts([{address:f.address,role:gill.AccountRole.READONLY_SIGNER,signer:f}]);let{remainingAccounts:E,systemOffset:B}=S.toAccountMetas(),C=[];if(x.length>0&&C.push(V(x)),a){if(!i||!p)throw new Error("Payer not found or proof args is missing.");let f=O(T,B);C.push(Bc({amount:c,settingsReadonlyArgs:p,compressedProofArgs:f,payer:i,secp256r1VerifyArgs:D,source:A,destination:r,remainingAccounts:E}));}else C.push(Rc({amount:c,secp256r1VerifyArgs:D,source:A,destination:r,settings:d,remainingAccounts:E}));return C}async function wO({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,compressed:d=false}){let A=ye(t),p=await te(e),T=await Se(p),[S,x]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,T,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:D,proof:E,packedAccounts:B}=await pe(d,e,n,false,c),C=[],f=[];for(let U of A)if(U instanceof M){let W=C.length,{domainConfig:L,verifyArgs:ce,signature:Y,publicKey:ue,message:xe}=N(U,W);xe&&Y&&ue&&C.push({message:xe,signature:Y,publicKey:ue}),L&&(B.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),ce?.__option==="Some"&&f.push({domainConfigKey:L,verifyArgs:ce.value}));}else B.addPreAccounts([{address:U.address,role:gill.AccountRole.READONLY_SIGNER,signer:U}]);let{remainingAccounts:l,systemOffset:I}=B.toAccountMetas(),_=[];if(C.length>0&&_.push(V(C)),d){if(!a||!D)throw new Error("Payer not found or proof args is missing.");let U=O(E,I);_.push(zc({amount:i,settingsReadonlyArgs:D,compressedProofArgs:U,payer:a,secp256r1VerifyArgs:f,source:T,sourceTokenAccount:S,destination:r,destinationTokenAccount:x,mint:s,tokenProgram:o,remainingAccounts:l}));}else _.push(wc({amount:i,secp256r1VerifyArgs:f,source:T,sourceTokenAccount:S,destination:r,destinationTokenAccount:x,settings:p,mint:s,tokenProgram:o,remainingAccounts:l}));return _}async function ZO({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await Ns(Q(),s),o=a.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:A,packedAccounts:p}=await pe(c,e,n,false,i),{remainingAccounts:T,systemOffset:S}=p.toAccountMetas(),{domainConfig:x,verifyArgs:D,message:E,signature:B,publicKey:C}=N(r),f=[];if(E&&B&&C&&f.push(V([{message:E,signature:B,publicKey:C}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let l=O(A,S);f.push(ra({transactionBuffer:s,domainConfig:x,closer:r instanceof M?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:D,settingsReadonlyArgs:d,payer:t,compressedProofArgs:l,remainingAccounts:T}));}else f.push(qc({transactionBuffer:s,domainConfig:x,closer:r instanceof M?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:D,remainingAccounts:[]}));return f}function hd({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:d,expectedSigners:A}){let{domainConfig:p,verifyArgs:T,message:S,signature:x,publicKey:D}=N(n),E=[];if(S&&x&&D&&E.push(V([{message:S,signature:x,publicKey:D}])),d){let{settingsReadonlyArgs:B,compressedProofArgs:C,remainingAccounts:f}=d;E.push(ya({transactionBuffer:t,payer:e,secp256r1VerifyArgs:T,creator:n instanceof M?void 0:n,domainConfig:p,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSigners:A},settingsReadonlyArgs:B,compressedProofArgs:C,remainingAccounts:f}));}else E.push(ia({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:T,creator:n instanceof M?void 0:n,domainConfig:p,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSigners:A},remainingAccounts:[]}));return E}function Rd({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=N(e),d=[];return a&&i&&o&&d.push(V([{message:a,signature:i,publicKey:o}])),s?d.push(Pa({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(xa({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,remainingAccounts:[]})),d}function bd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?wa({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):_a({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function vd({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=N(n),d=[];return o&&i&&a&&d.push(V([{message:o,signature:i,publicKey:a}])),s?d.push(qa({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(za({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,remainingAccounts:[]})),d}async function Bk({message:e,signer:n,popUp:r}){let s=await nr({authUrl:`${De()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"message",payload:e},signer:n,popUp:r,additionalInfo:qt()});return {...s,signer:new ie(s.signer),userAddressTreeIndex:s.userAddressTree?await er(s.userAddressTree):void 0}}async function Nk({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){let c=await nr({authUrl:`${De()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"transaction",payload:JSON.stringify({transactionActionType:e,transactionAddress:n,transactionMessageBytes:sr(r)})},additionalInfo:qt(),signer:s,popUp:t});return {...c,signer:new ie(c.signer),userAddressTreeIndex:c.userAddressTree?await er(c.userAddressTree):void 0}}async function Kk({message:e,response:n,expectedOrigin:r=De()}){let{verified:s}=await server.verifyAuthenticationResponse({response:n.authResponse,expectedChallenge:sr(new TextEncoder().encode(e)),expectedOrigin:r,expectedRPID:Pi,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:od(n.signer.toString()),counter:0}});return s}async function nw({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o,compressed:d=false,bufferIndex:A=Math.floor(Math.random()*255),additionalVoters:p=[],additionalSigners:T=[],chunkSize:S=Math.ceil(s.length/2),cachedAccounts:x}){let D=await te(n),E=await Yi(D,t instanceof M?t:t.address,A),B=[],C=[];for(let ae=0;ae<s.length;ae+=S){let Vn=s.subarray(ae,ae+S);B.push(Vn),C.push(sha256.sha256(Vn));}let f=sha256.sha256(new Uint8Array(s)),{settingsReadonlyArgs:l,proof:I,packedAccounts:_}=await pe(d,n,r,false,x),{remainingAccounts:U,systemOffset:W}=_.toAccountMetas(),L=l?{settingsReadonlyArgs:l,compressedProofArgs:O(I,W),remainingAccounts:U,payer:e}:null,ce=[t,...c?[c]:[],...p].map(Oe),Y=hd({finalBufferHash:f,finalBufferSize:s.length,bufferIndex:A,payer:e,transactionBufferAddress:E,settings:D,creator:t,preauthorizeExecution:!c,bufferExtendHashes:C,compressedArgs:L,expectedSigners:ce}),ue=B.map(ae=>bd({transactionMessageBytes:ae,transactionBufferAddress:E,settings:D,compressed:d})),xe=p.map(ae=>vd({voter:ae,transactionBufferAddress:E,settings:D,compressedArgs:L})),ht=Rd({compressedArgs:L,settings:D,executor:c,transactionBufferAddress:E}),{instructions:Rt,addressLookupTableAccounts:Wd}=await Dd({compressed:d,settings:D,transactionMessageBytes:s,transactionBufferAddress:E,payer:e,additionalSigners:T,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),y=ae=>({payer:e,instructions:ae,addressesByLookupTableAddress:Wd});return [y(Y),...ue.map(ae=>y([ae])),...xe.length?[y(xe.flat())]:[],y(ht),y(Rt)]}var dr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:c.length};{if(r.length===0)throw new Error("Expected at least one writable signer key");let[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var 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,i)=>{s.set(c,i);});let t=c=>{let i=s.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function _d({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=dr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let T of a){let S=t.extractTableLookup(T);if(S!==void 0){let{addressTableLookup:x,drainedKeys:D}=S;c.push({readonlyIndexes:x.readonlyIndexes,readableIndices:x.readonlyIndexes,writableIndexes:x.writableIndexes,writableIndices:x.writableIndexes,lookupTableAddress:gill.address(x.lookupTableAddress)}),i.writable.push(...D.writable),i.readonly.push(...D.readonly);}}let[o,d]=t.getMessageComponents(),p=new ur(d,i).compileInstructions(r);return {version:0,header:o,instructions:p,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function Tw({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=_d({instructions:e,payer:n,recentBlockhash:u,addressesByLookupTableAddress:r});return Mi(s)}async function Iw({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:d=false}){let{instructions:A,addressLookupTableAccounts:p}=await Cd({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:d,cachedAccounts:a});return {payer:e,instructions:A,addressesByLookupTableAddress:p}}
2
+ exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Zs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=co;exports.CHANGE_CONFIG_DISCRIMINATOR=to;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=mo;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=So;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Mo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ro;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=_o;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Oo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Vo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Jo;exports.DOMAIN_CONFIG_DISCRIMINATOR=Gn;exports.DelegateOp=kt;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=oc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=Ac;exports.GLOBAL_COUNTER_DISCRIMINATOR=Yn;exports.KeyType=It;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=fc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Dc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=$S;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Tx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=fx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=kS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=OS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=FS;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=cx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=ax;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=ix;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=tx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=QS;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=ex;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=YS;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=Ix;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=ZS;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=ox;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=JS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=LS;exports.MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE=BS;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=yx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=KS;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=jS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=gx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=lx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=qS;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=mx;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=XS;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=nx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=HS;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=VS;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=xx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=wS;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED=NS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Ax;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=Sx;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=px;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=zS;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=dx;exports.MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED=GS;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=ux;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=sx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=rx;exports.MULTI_WALLET_PROGRAM_ADDRESS=u;exports.MultiWalletAccount=US;exports.MultiWalletInstruction=_S;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Uc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Pc;exports.PermanentMemberPermission=Cn;exports.Permission=le;exports.Permissions=me;exports.SETTINGS_DISCRIMINATOR=bs;exports.Secp256r1Key=ie;exports.SignedSecp256r1Key=M;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Gc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Oc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Qc;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Jc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Aa;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=oa;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Os;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ca;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=fa;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=La;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=ba;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Ja;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Va;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=oi;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Qa;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=fi;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Ai;exports.TransactionManagerPermission=Dt;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Gs;exports.addWhitelistedAddressTrees=VB;exports.changeConfig=MB;exports.closeTransactionBuffer=ZO;exports.compressSettingsAccount=wB;exports.configAction=kD;exports.convertMemberKeyToString=Pt;exports.convertPubkeyCompressedToCose=od;exports.convertPubkeyCoseToCompressed=FW;exports.createDomainConfig=jB;exports.createDomainUserAccounts=tL;exports.createGlobalCounter=oL;exports.createPopUp=rd;exports.createTransactionBuffer=hd;exports.createTransactionManagerSigner=CI;exports.createUserAccounts=gL;exports.createWallet=zL;exports.decodeDomainConfig=zn;exports.decodeGlobalCounter=qn;exports.decodeSettings=Us;exports.decodeTransactionBuffer=ws;exports.decodeWhitelistedAddressTree=zs;exports.decompressSettingsAccount=eO;exports.disableDomainConfig=TL;exports.editDomainConfig=xL;exports.editTransactionManagerUrl=PL;exports.executeTransaction=Dd;exports.executeTransactionBuffer=Rd;exports.executeTransactionSync=Cd;exports.extendTransactionBuffer=bd;exports.fetchAllDomainConfig=$I;exports.fetchAllGlobalCounter=oD;exports.fetchAllMaybeDomainConfig=Zd;exports.fetchAllMaybeGlobalCounter=Au;exports.fetchAllMaybeSettings=lm;exports.fetchAllMaybeTransactionBuffer=wm;exports.fetchAllMaybeWhitelistedAddressTree=sy;exports.fetchAllSettings=pE;exports.fetchAllTransactionBuffer=DE;exports.fetchAllWhitelistedAddressTree=hE;exports.fetchDomainConfig=Kn;exports.fetchGlobalCounter=sD;exports.fetchMaybeDomainConfig=Yd;exports.fetchMaybeGlobalCounter=uu;exports.fetchMaybeSettings=zr;exports.fetchMaybeSettingsAccountData=eI;exports.fetchMaybeTransactionBuffer=km;exports.fetchMaybeUserAccountData=Qx;exports.fetchMaybeWhitelistedAddressTree=ny;exports.fetchSettings=yE;exports.fetchSettingsAccountData=Qt;exports.fetchTransactionBuffer=Ns;exports.fetchUserAccountData=Fi;exports.fetchWhitelistedAddressTree=Ks;exports.getAddMemberArgsCodec=uD;exports.getAddMemberArgsDecoder=gr;exports.getAddMemberArgsEncoder=Ar;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=zE;exports.getAddWhitelistedAddressTreesInstruction=jE;exports.getAddWhitelistedAddressTreesInstructionAsync=Xs;exports.getAddWhitelistedAddressTreesInstructionDataCodec=KE;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=qs;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=$r;exports.getAuthEndpoint=De;exports.getChangeConfigCompressedDiscriminatorBytes=uP;exports.getChangeConfigCompressedInstruction=uo;exports.getChangeConfigCompressedInstructionDataCodec=AP;exports.getChangeConfigCompressedInstructionDataDecoder=io;exports.getChangeConfigCompressedInstructionDataEncoder=ao;exports.getChangeConfigDiscriminatorBytes=eP;exports.getChangeConfigInstruction=rP;exports.getChangeConfigInstructionAsync=no;exports.getChangeConfigInstructionDataCodec=tP;exports.getChangeConfigInstructionDataDecoder=ro;exports.getChangeConfigInstructionDataEncoder=Qr;exports.getCompiledInstructionCodec=mD;exports.getCompiledInstructionDecoder=yr;exports.getCompiledInstructionEncoder=mr;exports.getCompressSettingsAccountDiscriminatorBytes=SP;exports.getCompressSettingsAccountInstruction=To;exports.getCompressSettingsAccountInstructionDataCodec=xP;exports.getCompressSettingsAccountInstructionDataDecoder=po;exports.getCompressSettingsAccountInstructionDataEncoder=yo;exports.getCompressedAccountMetaCodec=fD;exports.getCompressedAccountMetaDecoder=qe;exports.getCompressedAccountMetaEncoder=Ze;exports.getCompressedAccountMetaReadOnlyCodec=ID;exports.getCompressedAccountMetaReadOnlyDecoder=et;exports.getCompressedAccountMetaReadOnlyEncoder=Qe;exports.getCompressedProofCodec=MD;exports.getCompressedProofDecoder=xr;exports.getCompressedProofEncoder=Sr;exports.getCompressedSettingsAddressFromIndex=ne;exports.getCompressedSettingsCodec=RD;exports.getCompressedSettingsDataCodec=_D;exports.getCompressedSettingsDataDecoder=nt;exports.getCompressedSettingsDataEncoder=rt;exports.getCompressedSettingsDecoder=z;exports.getCompressedSettingsEncoder=tt;exports.getComputeBudgetEstimate=wi;exports.getConfigActionCodec=OD;exports.getConfigActionDecoder=ot;exports.getConfigActionEncoder=st;exports.getCreateDomainConfigDiscriminatorBytes=hP;exports.getCreateDomainConfigInstruction=Do;exports.getCreateDomainConfigInstructionDataCodec=RP;exports.getCreateDomainConfigInstructionDataDecoder=Io;exports.getCreateDomainConfigInstructionDataEncoder=xo;exports.getCreateDomainUserAccountDiscriminatorBytes=OP;exports.getCreateDomainUserAccountInstruction=wP;exports.getCreateDomainUserAccountInstructionAsync=Po;exports.getCreateDomainUserAccountInstructionDataCodec=kP;exports.getCreateDomainUserAccountInstructionDataDecoder=Eo;exports.getCreateDomainUserAccountInstructionDataEncoder=an;exports.getCreateGlobalCounterDiscriminatorBytes=KP;exports.getCreateGlobalCounterInstruction=JP;exports.getCreateGlobalCounterInstructionAsync=vo;exports.getCreateGlobalCounterInstructionDataCodec=jP;exports.getCreateGlobalCounterInstructionDataDecoder=bo;exports.getCreateGlobalCounterInstructionDataEncoder=un;exports.getCreateMultiWalletCompressedDiscriminatorBytes=th;exports.getCreateMultiWalletCompressedInstruction=nh;exports.getCreateMultiWalletCompressedInstructionAsync=Bo;exports.getCreateMultiWalletCompressedInstructionDataCodec=rh;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Wo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=gn;exports.getCreateUserAccountArgsCodec=GD;exports.getCreateUserAccountArgsDecoder=Rr;exports.getCreateUserAccountArgsEncoder=hr;exports.getCreateUserAccountsDiscriminatorBytes=Ah;exports.getCreateUserAccountsInstruction=mh;exports.getCreateUserAccountsInstructionAsync=wo;exports.getCreateUserAccountsInstructionDataCodec=gh;exports.getCreateUserAccountsInstructionDataDecoder=ko;exports.getCreateUserAccountsInstructionDataEncoder=yn;exports.getDecompressSettingsAccountDiscriminatorBytes=Ih;exports.getDecompressSettingsAccountInstruction=zo;exports.getDecompressSettingsAccountInstructionDataCodec=Dh;exports.getDecompressSettingsAccountInstructionDataDecoder=Fo;exports.getDecompressSettingsAccountInstructionDataEncoder=Go;exports.getDelegateOpCodec=KD;exports.getDelegateOpDecoder=vr;exports.getDelegateOpEncoder=br;exports.getDisableDomainConfigDiscriminatorBytes=bh;exports.getDisableDomainConfigInstruction=qo;exports.getDisableDomainConfigInstructionDataCodec=vh;exports.getDisableDomainConfigInstructionDataDecoder=Zo;exports.getDisableDomainConfigInstructionDataEncoder=Yo;exports.getDomainConfigAddress=Ve;exports.getDomainConfigCodec=XI;exports.getDomainConfigDecoder=Fn;exports.getDomainConfigDiscriminatorBytes=qI;exports.getDomainConfigEncoder=Jd;exports.getDomainConfigSize=QI;exports.getEditDomainConfigDiscriminatorBytes=kh;exports.getEditDomainConfigInstruction=ic;exports.getEditDomainConfigInstructionDataCodec=wh;exports.getEditDomainConfigInstructionDataDecoder=ac;exports.getEditDomainConfigInstructionDataEncoder=cc;exports.getEditMemberArgsCodec=ZD;exports.getEditMemberArgsDecoder=Mr;exports.getEditMemberArgsEncoder=Cr;exports.getEditTransactionManagerUrlDiscriminatorBytes=jh;exports.getEditTransactionManagerUrlInstruction=yc;exports.getEditTransactionManagerUrlInstructionDataCodec=Jh;exports.getEditTransactionManagerUrlInstructionDataDecoder=mc;exports.getEditTransactionManagerUrlInstructionDataEncoder=gc;exports.getFeePayer=Y_;exports.getGlobalAdditonalInfo=qt;exports.getGlobalAuthorizedClient=Ni;exports.getGlobalCounterAddress=rr;exports.getGlobalCounterCodec=nD;exports.getGlobalCounterDecoder=Zn;exports.getGlobalCounterDiscriminatorBytes=rD;exports.getGlobalCounterEncoder=du;exports.getGlobalCounterSize=cD;exports.getJitoTipsConfig=Un;exports.getLightCpiSigner=PW;exports.getLightProtocolRpc=Ct;exports.getLinkWalletArgsCodec=QD;exports.getLinkWalletArgsDecoder=_r;exports.getLinkWalletArgsEncoder=Ur;exports.getMemberCodec=nC;exports.getMemberDecoder=Me;exports.getMemberEncoder=Ce;exports.getMemberKeyCodec=cC;exports.getMemberKeyDecoder=q;exports.getMemberKeyEncoder=Z;exports.getMigrateCompressedSettingsDiscriminatorBytes=tR;exports.getMigrateCompressedSettingsInstruction=nR;exports.getMigrateCompressedSettingsInstructionDataCodec=rR;exports.getMigrateCompressedSettingsInstructionDataDecoder=Sc;exports.getMigrateCompressedSettingsInstructionDataEncoder=lc;exports.getMigrateCompressedUsersDiscriminatorBytes=AR;exports.getMigrateCompressedUsersInstruction=mR;exports.getMigrateCompressedUsersInstructionDataCodec=gR;exports.getMigrateCompressedUsersInstructionDataDecoder=Mc;exports.getMigrateCompressedUsersInstructionDataEncoder=Cc;exports.getMultiWalletErrorMessage=s_;exports.getNativeTransferIntentCompressedDiscriminatorBytes=UR;exports.getNativeTransferIntentCompressedInstruction=Bc;exports.getNativeTransferIntentCompressedInstructionDataCodec=_R;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Wc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=_c;exports.getNativeTransferIntentDiscriminatorBytes=IR;exports.getNativeTransferIntentInstruction=Rc;exports.getNativeTransferIntentInstructionAsync=CR;exports.getNativeTransferIntentInstructionDataCodec=DR;exports.getNativeTransferIntentInstructionDataDecoder=hc;exports.getNativeTransferIntentInstructionDataEncoder=fn;exports.getOriginIndex=KW;exports.getPackedAddressTreeInfoCodec=dC;exports.getPackedAddressTreeInfoDecoder=dt;exports.getPackedAddressTreeInfoEncoder=it;exports.getPackedStateTreeInfoCodec=gC;exports.getPackedStateTreeInfoDecoder=$e;exports.getPackedStateTreeInfoEncoder=Xe;exports.getPermissionsCodec=pC;exports.getPermissionsDecoder=at;exports.getPermissionsEncoder=ct;exports.getProofArgsCodec=SC;exports.getProofArgsDecoder=v;exports.getProofArgsEncoder=b;exports.getRemoveMemberArgsCodec=CC;exports.getRemoveMemberArgsDecoder=Pr;exports.getRemoveMemberArgsEncoder=Er;exports.getSecp256r1PubkeyCodec=PC;exports.getSecp256r1PubkeyDecoder=ut;exports.getSecp256r1PubkeyEncoder=Wr;exports.getSecp256r1SignatureOffsetsDataDecoder=wI;exports.getSecp256r1SignatureOffsetsDataEncoder=kI;exports.getSecp256r1VerifyArgsCodec=bC;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=k;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=WC;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=j;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=K;exports.getSecp256r1VerifyInstruction=V;exports.getSecp256r1VerifyInstructionDataCodec=hB;exports.getSecp256r1VerifyInstructionDataDecoder=pd;exports.getSecp256r1VerifyInstructionDataEncoder=Td;exports.getSendAndConfirmTransaction=ki;exports.getSettingsCodec=mE;exports.getSettingsCreationArgsCodec=kC;exports.getSettingsCreationArgsDecoder=gt;exports.getSettingsCreationArgsEncoder=At;exports.getSettingsDecoder=vs;exports.getSettingsDiscriminatorBytes=gE;exports.getSettingsEncoder=fm;exports.getSettingsFromIndex=te;exports.getSettingsIndexWithAddressCodec=HC;exports.getSettingsIndexWithAddressDecoder=Lr;exports.getSettingsIndexWithAddressEncoder=Br;exports.getSettingsMutArgsCodec=zC;exports.getSettingsMutArgsDecoder=fe;exports.getSettingsMutArgsEncoder=Te;exports.getSettingsReadonlyArgsCodec=YC;exports.getSettingsReadonlyArgsDecoder=$;exports.getSettingsReadonlyArgsEncoder=X;exports.getSettingsSize=TE;exports.getSignedSecp256r1Key=zW;exports.getSolanaRpc=Q;exports.getSolanaRpcEndpoint=Oi;exports.getTokenTransferIntentCompressedDiscriminatorBytes=qR;exports.getTokenTransferIntentCompressedInstruction=zc;exports.getTokenTransferIntentCompressedInstructionAsync=$R;exports.getTokenTransferIntentCompressedInstructionDataCodec=XR;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Fc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=xn;exports.getTokenTransferIntentDiscriminatorBytes=HR;exports.getTokenTransferIntentInstruction=wc;exports.getTokenTransferIntentInstructionAsync=GR;exports.getTokenTransferIntentInstructionDataCodec=VR;exports.getTokenTransferIntentInstructionDataDecoder=kc;exports.getTokenTransferIntentInstructionDataEncoder=Sn;exports.getTransactionBufferAddress=Yi;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=pb;exports.getTransactionBufferCloseCompressedInstruction=ra;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Tb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ta;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=ea;exports.getTransactionBufferCloseDiscriminatorBytes=cb;exports.getTransactionBufferCloseInstruction=qc;exports.getTransactionBufferCloseInstructionDataCodec=ab;exports.getTransactionBufferCloseInstructionDataDecoder=Zc;exports.getTransactionBufferCloseInstructionDataEncoder=Yc;exports.getTransactionBufferCodec=IE;exports.getTransactionBufferCreateArgsCodec=$C;exports.getTransactionBufferCreateArgsDecoder=yt;exports.getTransactionBufferCreateArgsEncoder=mt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Wb;exports.getTransactionBufferCreateCompressedInstruction=ya;exports.getTransactionBufferCreateCompressedInstructionDataCodec=Bb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=ma;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=ga;exports.getTransactionBufferCreateDiscriminatorBytes=Mb;exports.getTransactionBufferCreateInstruction=ia;exports.getTransactionBufferCreateInstructionDataCodec=Eb;exports.getTransactionBufferCreateInstructionDataDecoder=aa;exports.getTransactionBufferCreateInstructionDataEncoder=ca;exports.getTransactionBufferDecoder=ks;exports.getTransactionBufferDiscriminatorBytes=xE;exports.getTransactionBufferEncoder=Om;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=Xb;exports.getTransactionBufferExecuteCompressedInstruction=Pa;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=$b;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ea;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Ma;exports.getTransactionBufferExecuteDiscriminatorBytes=Gb;exports.getTransactionBufferExecuteInstruction=xa;exports.getTransactionBufferExecuteInstructionDataCodec=Fb;exports.getTransactionBufferExecuteInstructionDataDecoder=Sa;exports.getTransactionBufferExecuteInstructionDataEncoder=la;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=mv;exports.getTransactionBufferExtendCompressedInstruction=wa;exports.getTransactionBufferExtendCompressedInstructionDataCodec=yv;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=ka;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Oa;exports.getTransactionBufferExtendDiscriminatorBytes=ov;exports.getTransactionBufferExtendInstruction=_a;exports.getTransactionBufferExtendInstructionDataCodec=cv;exports.getTransactionBufferExtendInstructionDataDecoder=Ua;exports.getTransactionBufferExtendInstructionDataEncoder=va;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=Uv;exports.getTransactionBufferVoteCompressedInstruction=qa;exports.getTransactionBufferVoteCompressedInstructionDataCodec=_v;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Za;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Ya;exports.getTransactionBufferVoteDiscriminatorBytes=Dv;exports.getTransactionBufferVoteInstruction=za;exports.getTransactionBufferVoteInstructionDataCodec=Cv;exports.getTransactionBufferVoteInstructionDataDecoder=Fa;exports.getTransactionBufferVoteInstructionDataEncoder=Ga;exports.getTransactionExecuteCompressedDiscriminatorBytes=Jv;exports.getTransactionExecuteCompressedInstruction=ii;exports.getTransactionExecuteCompressedInstructionDataCodec=Yv;exports.getTransactionExecuteCompressedInstructionDataDecoder=ai;exports.getTransactionExecuteCompressedInstructionDataEncoder=ci;exports.getTransactionExecuteDiscriminatorBytes=Nv;exports.getTransactionExecuteInstruction=ri;exports.getTransactionExecuteInstructionDataCodec=Hv;exports.getTransactionExecuteInstructionDataDecoder=ti;exports.getTransactionExecuteInstructionDataEncoder=ei;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=AU;exports.getTransactionExecuteSyncCompressedInstruction=xi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=gU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Si;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=li;exports.getTransactionExecuteSyncDiscriminatorBytes=rU;exports.getTransactionExecuteSyncInstruction=yi;exports.getTransactionExecuteSyncInstructionDataCodec=nU;exports.getTransactionExecuteSyncInstructionDataDecoder=mi;exports.getTransactionExecuteSyncInstructionDataEncoder=gi;exports.getTransactionMessageAddressTableLookupCodec=oM;exports.getTransactionMessageAddressTableLookupDecoder=kr;exports.getTransactionMessageAddressTableLookupEncoder=Or;exports.getTransactionMessageCodec=rM;exports.getTransactionMessageDecoder=Tt;exports.getTransactionMessageEncoder=pt;exports.getUserAccountAddress=F;exports.getUserCodec=dM;exports.getUserCreationArgsCodec=mM;exports.getUserCreationArgsDecoder=Pe;exports.getUserCreationArgsEncoder=Ee;exports.getUserDecoder=J;exports.getUserEncoder=he;exports.getUserMutArgsCodec=fM;exports.getUserMutArgsDecoder=ge;exports.getUserMutArgsEncoder=Ae;exports.getUserReadOnlyArgsCodec=IM;exports.getUserReadOnlyArgsDecoder=Vr;exports.getUserReadOnlyArgsEncoder=Hr;exports.getUserReadOnlyOrMutateArgsCodec=EM;exports.getUserReadOnlyOrMutateArgsDecoder=Ye;exports.getUserReadOnlyOrMutateArgsEncoder=Je;exports.getWalletAddressFromIndex=Zi;exports.getWalletAddressFromSettings=Se;exports.getWhitelistedAddressTreeCodec=PE;exports.getWhitelistedAddressTreeDecoder=Fs;exports.getWhitelistedAddressTreeDiscriminatorBytes=EE;exports.getWhitelistedAddressTreeEncoder=ry;exports.getWhitelistedAddressTreeFromIndex=Wn;exports.getWhitelistedAddressTreeIndexFromAddress=er;exports.getWhitelistedAddressTreesAddress=Gi;exports.identifyMultiWalletAccount=XU;exports.identifyMultiWalletInstruction=$U;exports.initialize=q_;exports.isConfigAction=wD;exports.isMultiWalletError=o_;exports.isUserReadOnlyOrMutateArgs=hM;exports.nativeTransferIntent=RO;exports.parseAddWhitelistedAddressTreesInstruction=JE;exports.parseChangeConfigCompressedInstruction=gP;exports.parseChangeConfigInstruction=nP;exports.parseCompressSettingsAccountInstruction=IP;exports.parseCreateDomainConfigInstruction=bP;exports.parseCreateDomainUserAccountInstruction=NP;exports.parseCreateGlobalCounterInstruction=YP;exports.parseCreateMultiWalletCompressedInstruction=sh;exports.parseCreateUserAccountsInstruction=yh;exports.parseDecompressSettingsAccountInstruction=Ch;exports.parseDisableDomainConfigInstruction=Uh;exports.parseEditDomainConfigInstruction=Nh;exports.parseEditTransactionManagerUrlInstruction=Yh;exports.parseMigrateCompressedSettingsInstruction=sR;exports.parseMigrateCompressedUsersInstruction=yR;exports.parseNativeTransferIntentCompressedInstruction=WR;exports.parseNativeTransferIntentInstruction=MR;exports.parseSecp256r1VerifyInstruction=RB;exports.parseTokenTransferIntentCompressedInstruction=QR;exports.parseTokenTransferIntentInstruction=FR;exports.parseTransactionBufferCloseCompressedInstruction=fb;exports.parseTransactionBufferCloseInstruction=ib;exports.parseTransactionBufferCreateCompressedInstruction=Lb;exports.parseTransactionBufferCreateInstruction=Pb;exports.parseTransactionBufferExecuteCompressedInstruction=Qb;exports.parseTransactionBufferExecuteInstruction=zb;exports.parseTransactionBufferExtendCompressedInstruction=pv;exports.parseTransactionBufferExtendInstruction=av;exports.parseTransactionBufferVoteCompressedInstruction=Wv;exports.parseTransactionBufferVoteInstruction=Mv;exports.parseTransactionExecuteCompressedInstruction=Zv;exports.parseTransactionExecuteInstruction=Vv;exports.parseTransactionExecuteSyncCompressedInstruction=mU;exports.parseTransactionExecuteSyncInstruction=sU;exports.pollJitoBundleConfirmation=sB;exports.prepareTransactionBundle=nw;exports.prepareTransactionMessage=Tw;exports.prepareTransactionSync=Iw;exports.resolveTransactionManagerSigner=oB;exports.sendJitoBundle=DI;exports.signAndSendBundledTransactions=rB;exports.signAndSendTransaction=nB;exports.signMessageWithPasskey=Bk;exports.signTransactionWithPasskey=Nk;exports.tokenTransferIntent=wO;exports.uninitialize=Z_;exports.userReadOnlyOrMutateArgs=PM;exports.vaultTransactionMessageDeserialize=Ei;exports.vaultTransactionMessageSerialize=Mi;exports.verifyMessage=Kk;exports.voteTransactionBuffer=vd;//# sourceMappingURL=index.cjs.map
3
3
  //# sourceMappingURL=index.cjs.map