@revibase/core 0.0.42 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),f=require('zod'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var f__default=/*#__PURE__*/_interopDefault(f);var Kr=1644,or=2e5,Ds=1.1,Ms=30,Ps=3e3,ve=3,Ue=500,cr=2,ar=3e4,jr=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],hs="https://mainnet.block-engine.jito.wtf/api/v1",Rs="https://bundles.jito.wtf/api/v1/bundles/tip_floor",bs="landed_tips_75th_percentile",_s=255,vs=400,Us=429,qr=500;var Ie=class extends Error{constructor(r,s,t){super(r);this.code=s;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},We=class extends Ie{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},ee=class extends Ie{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},G=class extends Ie{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},Ce=class extends Ie{constructor(r,s,t){super(r,"NETWORK_ERROR",{statusCode:s,url:t});this.statusCode=s;this.url=t;}},Ws=class extends Ie{constructor(r,s,t){super(r,"TRANSACTION_ERROR",{signature:s,logs:t});this.signature=s;this.logs=t;}},ge=class extends Ie{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},ir=class extends Ie{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},dr=class extends Ie{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var Ls=new Uint8Array([201,232,212,229,59,241,106,197]);function SD(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ls)}function Ju(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["numOrigins",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),515)]]),e=>({...e,discriminator:Ls}))}function ks(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["numOrigins",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),515)]])}function xD(){return gill.combineCodec(Ju(),ks())}function Os(e){return gill.decodeAccount(e,ks())}async function Bs(e,n,r){let s=await Yu(e,n,r);return gill.assertAccountExists(s),s}async function Yu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Os(s)}async function ID(e,n,r){let s=await Zu(e,n,r);return gill.assertAccountsExist(s),s}async function Zu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Os(t))}function CD(){return 846}var Vs=new Uint8Array([42,206,176,58,175,129,130,233]);function MD(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Vs)}function uA(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Vs}))}function Hs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function PD(){return gill.combineCodec(uA(),Hs())}function Fs(e){return gill.decodeAccount(e,Hs())}async function hD(e,n,r){let s=await AA(e,n,r);return gill.assertAccountExists(s),s}async function AA(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Fs(s)}async function RD(e,n,r){let s=await gA(e,n,r);return gill.assertAccountsExist(s),s}async function gA(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Fs(t))}function bD(){return 24}function Jr(){return gill.getStructEncoder([["memberKey",te()],["permissions",He()],["userReadonlyArgs",he()]])}function Yr(){return gill.getStructDecoder([["memberKey",re()],["permissions",Fe()],["userReadonlyArgs",Re()]])}function WD(){return gill.combineCodec(Jr(),Yr())}function Zr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Xr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function OD(){return gill.combineCodec(Zr(),Xr())}function St(){return gill.getStructEncoder([["treeInfo",It()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function xt(){return gill.getStructDecoder([["treeInfo",Ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function VD(){return gill.combineCodec(St(),xt())}function Et(){return gill.getStructEncoder([["treeInfo",It()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Dt(){return gill.getStructDecoder([["treeInfo",Ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function zD(){return gill.combineCodec(Et(),Dt())}function rn(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function nn(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function qD(){return gill.combineCodec(rn(),nn())}function Mt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(Pt())]])}function J(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ht())]])}function XD(){return gill.combineCodec(Mt(),J())}function Pt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(Rt())],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function ht(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(bt())],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function tM(){return gill.combineCodec(Pt(),ht())}function Ge(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(cn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Jr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(dn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function ze(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(an())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Yr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(un())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function oM(){return gill.combineCodec(Ge(),ze())}function cM(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function aM(e,n){return n.__kind===e}function An(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ke()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",fe()]])}function gn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",je()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Se()]])}function AM(){return gill.combineCodec(An(),gn())}function cn(){return gill.getStructEncoder([["memberKey",te()],["permissions",He()]])}function an(){return gill.getStructDecoder([["memberKey",re()],["permissions",Fe()]])}function TM(){return gill.combineCodec(cn(),an())}function _t(){return gill.getStructEncoder([["memberKey",te()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function vt(){return gill.getStructDecoder([["memberKey",re()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function SM(){return gill.combineCodec(_t(),vt())}function pn(){return gill.getStructEncoder([["settingsMutArgs",z()],["transactionManager",gill.getOptionEncoder(he())]])}function mn(){return gill.getStructDecoder([["settingsMutArgs",K()],["transactionManager",gill.getOptionDecoder(Re())]])}function EM(){return gill.combineCodec(pn(),mn())}function Rt(){return gill.getStructEncoder([["pubkey",te()],["permissions",He()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function bt(){return gill.getStructDecoder([["pubkey",re()],["permissions",Fe()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function hM(){return gill.combineCodec(Rt(),bt())}function te(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function re(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function _M(){return gill.combineCodec(te(),re())}function ln(){return gill.getStructEncoder([["authorityCreationArgs",fe()],["compressedProofArgs",E()]])}function fn(){return gill.getStructDecoder([["authorityCreationArgs",Se()],["compressedProofArgs",D()]])}function LM(){return gill.combineCodec(ln(),fn())}function Ut(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function Wt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function BM(){return gill.combineCodec(Ut(),Wt())}function Sn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function xn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function VM(){return gill.combineCodec(Sn(),xn())}function It(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Ct(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function GM(){return gill.combineCodec(It(),Ct())}function He(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Fe(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function jM(){return gill.combineCodec(He(),Fe())}function E(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(rn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function D(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(nn())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function ZM(){return gill.combineCodec(E(),D())}function dn(){return gill.getStructEncoder([["memberKey",te()],["userArgs",In()]])}function un(){return gill.getStructDecoder([["memberKey",re()],["userArgs",Cn()]])}function eP(){return gill.combineCodec(dn(),un())}function En(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Lt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function nP(){return gill.combineCodec(En(),Lt())}function w(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function V(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function cP(){return gill.combineCodec(w(),V())}function Y(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",w()]])}function Z(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",V()]])}function uP(){return gill.combineCodec(Y(),Z())}function kt(){return gill.getStructEncoder([["addressTreeInfo",Ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ot(){return gill.getStructDecoder([["addressTreeInfo",Wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function mP(){return gill.combineCodec(kt(),Ot())}function Bt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Nt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function lP(){return gill.combineCodec(Bt(),Nt())}function z(){return gill.getStructEncoder([["accountMeta",St()],["data",Mt()]])}function K(){return gill.getStructDecoder([["accountMeta",xt()],["data",J()]])}function IP(){return gill.combineCodec(z(),K())}function wt(){return gill.getStructEncoder([["accountMeta",Et()],["data",Mt()]])}function Vt(){return gill.getStructDecoder([["accountMeta",Dt()],["data",J()]])}function MP(){return gill.combineCodec(wt(),Vt())}function Ht(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",Sn()]])}function Ft(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",xn()]])}function bP(){return gill.combineCodec(Ht(),Ft())}function Gt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSecp256r1Signers",gill.getArrayEncoder(_t())]])}function zt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSecp256r1Signers",gill.getArrayDecoder(vt())]])}function WP(){return gill.combineCodec(Gt(),zt())}function Kt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(Zr())],["addressTableLookups",gill.getArrayEncoder(Dn())]])}function jt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(Xr())],["addressTableLookups",gill.getArrayDecoder(Mn())]])}function BP(){return gill.combineCodec(Kt(),jt())}function Dn(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Mn(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function VP(){return gill.combineCodec(Dn(),Mn())}function qe(){return gill.getStructEncoder([["member",te()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",Ke()],["delegatedTo",gill.getOptionEncoder(Bt())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function X(){return gill.getStructDecoder([["member",re()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",je()],["delegatedTo",gill.getOptionDecoder(Nt())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function zP(){return gill.combineCodec(qe(),X())}function fe(){return gill.getStructEncoder([["addressTreeInfo",Ut()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Se(){return gill.getStructDecoder([["addressTreeInfo",Wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function JP(){return gill.combineCodec(fe(),Se())}function Je(){return gill.getStructEncoder([["accountMeta",St()],["data",qe()]])}function Ye(){return gill.getStructDecoder([["accountMeta",xt()],["data",X()]])}function QP(){return gill.combineCodec(Je(),Ye())}function he(){return gill.getStructEncoder([["accountMeta",Et()],["data",qe()]])}function Re(){return gill.getStructDecoder([["accountMeta",Dt()],["data",X()]])}function rh(){return gill.combineCodec(he(),Re())}function In(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([he()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Je()])]])]])}function Cn(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Re()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([Ye()])]])]])}function ch(){return gill.combineCodec(In(),Cn())}function ah(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function ih(e,n){return n.__kind===e}var ot=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(ot||{});function Ke(){return gill.getEnumEncoder(ot)}function je(){return gill.getEnumDecoder(ot)}function Ah(){return gill.combineCodec(Ke(),je())}var Po=new Uint8Array([223,179,163,190,177,224,67,173]);function eR(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Po)}function N1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(Rt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Po}))}function ho(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(bt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function tR(){return gill.combineCodec(N1(),ho())}function Ro(e){return gill.decodeAccount(e,ho())}async function rR(e,n,r){let s=await Rn(e,n,r);return gill.assertAccountExists(s),s}async function Rn(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ro(s)}async function nR(e,n,r){let s=await w1(e,n,r);return gill.assertAccountsExist(s),s}async function w1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ro(t))}var Wo=new Uint8Array([90,36,35,219,93,225,110,96]);function aR(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Wo)}function nT(){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",te()],["executor",te()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(te())],["expectedSecp256r1Signers",gill.getArrayEncoder(_t())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Wo}))}function Lo(){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",re()],["executor",re()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(re())],["expectedSecp256r1Signers",gill.getArrayDecoder(vt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function iR(){return gill.combineCodec(nT(),Lo())}function ko(e){return gill.decodeAccount(e,Lo())}async function Oo(e,n,r){let s=await sT(e,n,r);return gill.assertAccountExists(s),s}async function sT(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ko(s)}async function dR(e,n,r){let s=await oT(e,n,r);return gill.assertAccountsExist(s),s}async function oT(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ko(t))}var wo=new Uint8Array([105,23,173,2,197,255,80,87]);function gR(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(wo)}function ET(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:wo}))}function Vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function pR(){return gill.combineCodec(ET(),Vo())}function Ho(e){return gill.decodeAccount(e,Vo())}async function Fo(e,n,r){let s=await DT(e,n,r);return gill.assertAccountExists(s),s}async function DT(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ho(s)}async function mR(e,n,r){let s=await MT(e,n,r);return gill.assertAccountsExist(s),s}async function MT(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ho(t))}function m({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function zo(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function W(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function T(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:W(r.value),role:Go(r.value)?gill.upgradeRoleToSigner(s):s,...Go(r.value)?{signer:r.value}:{}})}}function Go(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var jo=new Uint8Array([8]);function vR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(jo)}function On(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:jo}))}function qo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function UR(){return gill.combineCodec(On(),qo())}async function Jo(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:On().encode(c),programAddress:r})}function WR(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:On().encode(c),programAddress:r})}function LR(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:qo().decode(e.data)}}var $o=new Uint8Array([9]);function HR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($o)}function Nn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["compressedProofArgs",gill.getOptionEncoder(E())]]),e=>({...e,discriminator:$o}))}function ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["compressedProofArgs",gill.getOptionDecoder(D())]])}function FR(){return gill.combineCodec(Nn(),ec())}async function tc(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.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(zo(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=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Nn().encode(c),programAddress:r})}function GR(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Nn().encode(c),programAddress:r})}function zR(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ec().decode(e.data)}}var cc=new Uint8Array([19]);function XR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(cc)}function ac(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:cc}))}function ic(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function QR(){return gill.combineCodec(ac(),ic())}function dc(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ac().encode(c),programAddress:r})}function $R(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ic().decode(e.data)}}var gc=new Uint8Array([18]);function cb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gc)}function wn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["settingsCreation",kt()],["userReadonlyArgs",he()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:gc}))}function pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["settingsCreation",Ot()],["userReadonlyArgs",Re()],["settingsIndex",gill.getU128Decoder()]])}function ab(){return gill.combineCodec(wn(),pc())}async function mc(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:wn().encode(c),programAddress:r})}function ib(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:wn().encode(c),programAddress:r})}function db(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:pc().decode(e.data)}}var Cc=new Uint8Array([0]);function yb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Cc)}function Hn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",fe()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Cc}))}function Ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",Se()],["compressedProofArgs",D()]])}function lb(){return gill.combineCodec(Hn(),Ec())}async function Dc(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:Hn().encode(c),programAddress:r})}function fb(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:Hn().encode(c),programAddress:r})}function Sb(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Ec().decode(e.data)}}var Pc=new Uint8Array([4]);function Pb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pc)}function Gn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["member",En()],["role",Ke()],["userAccountCreationArgs",fe()],["linkWalletArgs",gill.getOptionEncoder(pn())]]),e=>({...e,discriminator:Pc}))}function hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["member",Lt()],["role",je()],["userAccountCreationArgs",Se()],["linkWalletArgs",gill.getOptionDecoder(mn())]])}function hb(){return gill.combineCodec(Gn(),hc())}async function Rc(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:Gn().encode(c),programAddress:r})}function Rb(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:Gn().encode(c),programAddress:r})}function bb(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:hc().decode(e.data)}}var _c=new Uint8Array([3]);function kb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_c)}function Kn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:_c}))}function vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function Ob(){return gill.combineCodec(Kn(),vc())}async function Uc(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(c),i=T(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:Kn().encode({}),programAddress:r})}function Bb(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(c),i=T(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:Kn().encode({}),programAddress:r})}function Nb(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:vc().decode(e.data)}}var Lc=new Uint8Array([5]);function Kb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Lc)}function qn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayEncoder(An())]]),e=>({...e,discriminator:Lc}))}function kc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayDecoder(gn())]])}function jb(){return gill.combineCodec(qn(),kc())}async function Oc(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:qn().encode(c),programAddress:r})}function qb(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:qn().encode(c),programAddress:r})}function Jb(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:kc().decode(e.data)}}var wc=new Uint8Array([17]);function t_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wc)}function Vc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",z()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:wc}))}function Hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",K()],["compressedProofArgs",D()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function r_(){return gill.combineCodec(Vc(),Hc())}function Fc(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Vc().encode(c),programAddress:r})}function n_(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Hc().decode(e.data)}}var Kc=new Uint8Array([2]);function d_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Kc)}function jc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Kc}))}function qc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function u_(){return gill.combineCodec(jc(),qc())}function Jc(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...i],data:jc().encode(c),programAddress:r})}function A_(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:qc().decode(e.data)}}var Qc=new Uint8Array([1]);function f_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qc)}function Yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder(ln())]]),e=>({...e,discriminator:Qc}))}function $c(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(fn())]])}function S_(){return gill.combineCodec(Yn(),$c())}async function x_(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:Yn().encode(c),programAddress:r})}function ea(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:Yn().encode(c),programAddress:r})}function I_(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:$c().decode(e.data)}}var na=new Uint8Array([6]);function R_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(na)}function sa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Je()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",E()]]),e=>({...e,discriminator:na}))}function oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Ye()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",D()]])}function b_(){return gill.combineCodec(sa(),oa())}function ca(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.authority),...i],data:sa().encode(c),programAddress:r})}function __(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:oa().decode(e.data)}}var da=new Uint8Array([7]);function B_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Je()],["secp256r1VerifyArgs",gill.getOptionEncoder(w())],["delegateTo",gill.getOptionEncoder(Bt())],["oldSettingsMutArgs",gill.getOptionEncoder(z())],["newSettingsMutArgs",gill.getOptionEncoder(z())],["compressedProofArgs",E()]]),e=>({...e,discriminator:da}))}function Aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Ye()],["secp256r1VerifyArgs",gill.getOptionDecoder(V())],["delegateTo",gill.getOptionDecoder(Nt())],["oldSettingsMutArgs",gill.getOptionDecoder(K())],["newSettingsMutArgs",gill.getOptionDecoder(K())],["compressedProofArgs",D()]])}function N_(){return gill.combineCodec(ua(),Aa())}function ga(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...i],data:ua().encode(c),programAddress:r})}function w_(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:Aa().decode(e.data)}}var Ta=new Uint8Array([32]);function j_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ta)}function ya(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Pt()],["compressedProofArgs",E()],["settingsCreationArgs",kt()]]),e=>({...e,discriminator:Ta}))}function la(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ht()],["compressedProofArgs",D()],["settingsCreationArgs",Ot()]])}function q_(){return gill.combineCodec(ya(),la())}function fa(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.authority),...i],data:ya().encode(c),programAddress:r})}function J_(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:la().decode(e.data)}}var Ia=new Uint8Array([31]);function tv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ia)}function Ca(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",qe()],["compressedProofArgs",E()],["userCreationArgs",fe()]]),e=>({...e,discriminator:Ia}))}function Ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",X()],["compressedProofArgs",D()],["userCreationArgs",Se()]])}function rv(){return gill.combineCodec(Ca(),Ea())}function Da(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.authority),...i],data:Ca().encode(c),programAddress:r})}function nv(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:Ea().decode(e.data)}}var Pa=new Uint8Array([29]);function uv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pa)}function Zn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Pa}))}function ha(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function Av(){return gill.combineCodec(Zn(),ha())}async function gv(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(W(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(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:Zn().encode(c),programAddress:r})}function Ra(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(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:Zn().encode(c),programAddress:r})}function pv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:ha().decode(e.data)}}var va=new Uint8Array([27]);function xv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(va)}function Ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:va}))}function Wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function Iv(){return gill.combineCodec(Ua(),Wa())}function La(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=T(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:Ua().encode(c),programAddress:r})}function Cv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Wa().decode(e.data)}}var Na=new Uint8Array([30]);function bv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Na)}function Xn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccount",gill.getOptionEncoder(Ht())],["compressedProofArgs",gill.getOptionEncoder(E())],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Na}))}function wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccount",gill.getOptionDecoder(Ft())],["compressedProofArgs",gill.getOptionDecoder(D())],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function _v(){return gill.combineCodec(Xn(),wa())}async function vv(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(W(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(W(t.source.value)),gill.getAddressEncoder().encode(W(t.tokenProgram.value)),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(W(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(W(t.destination.value)),gill.getAddressEncoder().encode(W(t.tokenProgram.value)),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(W(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.splInterfacePda.value||(t.splInterfacePda.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getBytesEncoder().encode(new Uint8Array([112,111,111,108])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Xn().encode(c),programAddress:r})}function Va(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Xn().encode(c),programAddress:r})}function Uv(e){if(e.accounts.length<18)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:wa().decode(e.data)}}var Fa=new Uint8Array([28]);function wv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fa)}function Qn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccount",gill.getOptionEncoder(Ht())],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Fa}))}function Ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccount",gill.getOptionDecoder(Ft())],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function Vv(){return gill.combineCodec(Qn(),Ga())}async function Hv(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(W(t.source.value)),gill.getAddressEncoder().encode(W(t.tokenProgram.value)),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(W(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(W(t.destination.value)),gill.getAddressEncoder().encode(W(t.tokenProgram.value)),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(W(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.splInterfacePda.value||(t.splInterfacePda.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getBytesEncoder().encode(new Uint8Array([112,111,111,108])),gill.getAddressEncoder().encode(W(t.mint.value))]})),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Qn().encode(c),programAddress:r})}function za(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Qn().encode(c),programAddress:r})}function Fv(e){if(e.accounts.length<17)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:Ga().decode(e.data)}}var qa=new Uint8Array([13]);function Yv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qa)}function Ja(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())]]),e=>({...e,discriminator:qa}))}function Ya(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())]])}function Zv(){return gill.combineCodec(Ja(),Ya())}function Za(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:Ja().encode(c),programAddress:r})}function Xv(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ya().decode(e.data)}}var $a=new Uint8Array([23]);function sU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($a)}function ei(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:$a}))}function ti(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function oU(){return gill.combineCodec(ei(),ti())}function ri(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:ei().encode(c),programAddress:r})}function cU(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ti().decode(e.data)}}var oi=new Uint8Array([10]);function pU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oi)}function ci(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Gt()],["secp256r1VerifyArgs",gill.getOptionEncoder(w())]]),e=>({...e,discriminator:oi}))}function ai(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(V())]])}function mU(){return gill.combineCodec(ci(),ai())}function ii(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=m(a),o=T(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:ci().encode(c),programAddress:r})}function TU(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:ai().decode(e.data)}}var Ai=new Uint8Array([20]);function CU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ai)}function gi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Gt()],["secp256r1VerifyArgs",gill.getOptionEncoder(w())],["settingsReadonlyArgs",wt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ai}))}function pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(V())],["settingsReadonlyArgs",Vt()],["compressedProofArgs",D()]])}function EU(){return gill.combineCodec(gi(),pi())}function mi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=m(a),o=T(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:gi().encode(c),programAddress:r})}function DU(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:pi().decode(e.data)}}var li=new Uint8Array([14]);function vU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(li)}function fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())]]),e=>({...e,discriminator:li}))}function Si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())]])}function UU(){return gill.combineCodec(fi(),Si())}function xi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:fi().encode(c),programAddress:r})}function WU(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Si().decode(e.data)}}var Ei=new Uint8Array([24]);function VU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ei)}function Di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ei}))}function Mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function HU(){return gill.combineCodec(Di(),Mi())}function Pi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:Di().encode(c),programAddress:r})}function FU(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Mi().decode(e.data)}}var bi=new Uint8Array([12]);function JU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bi)}function _i(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:bi}))}function vi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function YU(){return gill.combineCodec(_i(),vi())}function Ui(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:_i().encode(c),programAddress:r})}function ZU(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:vi().decode(e.data)}}var ki=new Uint8Array([22]);function rW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ki)}function Oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ki}))}function Bi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function nW(){return gill.combineCodec(Oi(),Bi())}function Ni(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:Oi().encode(c),programAddress:r})}function sW(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:Bi().decode(e.data)}}var Hi=new Uint8Array([11]);function AW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hi)}function Fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())]]),e=>({...e,discriminator:Hi}))}function Gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())]])}function gW(){return gill.combineCodec(Fi(),Gi())}function zi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:Fi().encode(c),programAddress:r})}function pW(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Gi().decode(e.data)}}var qi=new Uint8Array([21]);function xW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qi)}function Ji(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(w())],["settingsReadonlyArgs",wt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:qi}))}function Yi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(V())],["settingsReadonlyArgs",Vt()],["compressedProofArgs",D()]])}function IW(){return gill.combineCodec(Ji(),Yi())}function Zi(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(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:Ji().encode(c),programAddress:r})}function CW(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Yi().decode(e.data)}}var $i=new Uint8Array([15]);function RW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($i)}function ed(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:$i}))}function td(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function bW(){return gill.combineCodec(ed(),td())}function rd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=m({}),i=T(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:ed().encode({}),programAddress:r})}function _W(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:td().decode(e.data)}}var od=new Uint8Array([25]);function OW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(od)}function cd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:od}))}function ad(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function BW(){return gill.combineCodec(cd(),ad())}function id(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:cd().encode(c),programAddress:r})}function NW(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:ad().decode(e.data)}}var Ad=new Uint8Array([16]);function KW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ad)}function gd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Kt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Ad}))}function pd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",jt()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function jW(){return gill.combineCodec(gd(),pd())}function md(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:gd().encode(c),programAddress:r})}function qW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:pd().decode(e.data)}}var ld=new Uint8Array([26]);function eL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ld)}function fd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Kt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsMutArgs",z()],["compressedProofArgs",E()]]),e=>({...e,discriminator:ld}))}function Sd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",jt()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsMutArgs",K()],["compressedProofArgs",D()]])}function tL(){return gill.combineCodec(fd(),Sd())}function xd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=T(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:fd().encode(c),programAddress:r})}function rL(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Sd().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",Kx=(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))(Kx||{});function VL(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 jx=(y=>(y[y.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",y[y.ChangeConfig=1]="ChangeConfig",y[y.ChangeConfigCompressed=2]="ChangeConfigCompressed",y[y.CreateCompressedWallet=3]="CreateCompressedWallet",y[y.CreateDomainConfig=4]="CreateDomainConfig",y[y.CreateDomainUserAccount=5]="CreateDomainUserAccount",y[y.CreateGlobalCounter=6]="CreateGlobalCounter",y[y.CreateUserAccounts=7]="CreateUserAccounts",y[y.DecompressSettingsAccount=8]="DecompressSettingsAccount",y[y.DisableDomainConfig=9]="DisableDomainConfig",y[y.EditDomainConfig=10]="EditDomainConfig",y[y.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",y[y.EditUserDelegate=12]="EditUserDelegate",y[y.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))(jx||{});function HL(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var Jx=6e3,Yx=6001,Zx=6002,Xx=6003,Qx=6004,$x=6005,eI=6006,tI=6007,rI=6008,nI=6009,sI=6010,oI=6011,cI=6012,aI=6013,iI=6014,dI=6015,uI=6016,AI=6017,gI=6018,pI=6019,mI=6020,TI=6021,yI=6022,lI=6023,fI=6024,SI=6025,xI=6026,II=6027,CI=6028,EI=6029,DI=6030,MI=6031,PI=6032,hI=6033,RI=6034,bI=6035,_I=6036,vI=6037,UI=6038,WI=6039,LI=6040,kI=6041,OI=6042,BI=6043,NI=6044,wI=6045,VI=6046,HI=6047,FI=6048,GI=6049,zI=6050,KI=6051,jI=6052,qI=6053,JI=6054,YI=6055,ZI=6056,XI=6057,QI=6058,$I=6059,eC=6060,tC=6061,rC=6062,nC=6063,sC=6064,oC=6065,cC=6066,aC=6067,iC=6068,dC=6069,uC=6070,AC=6071,gC=6072,pC=6073,mC=6074,TC=6075,yC=6076,lC=6077,fC=6078,SC=6079,xC=6080,IC=6081,CC=6082,Id;process.env.NODE_ENV!=="production"&&(Id={[DI]:"This member is already delegated to another wallet.",[tI]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[mC]:"Clock sysvar access failed. This may indicate a system error.",[zI]:"The domain configuration account is disabled. Please contact support or try again later.",[KI]:"Missing domain configuration account.",[gC]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[CC]:"Duplicate address tree detected. This address tree is already in the whitelist.",[sI]:"Duplicate public keys detected among members. Each member must have a unique key.",[nI]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[mI]:"No members provided. A multisig wallet must contain at least one member.",[XI]:"Slot numbers list is empty. At least one slot number is required for validation.",[gI]:"Expected a User with Administrator role for this instruction.",[rI]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[uI]:"Expected a User with Transaction Manager role for this instruction.",[WI]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[LI]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[kI]:"Declared buffer size does not match the actual serialized size.",[ZI]:"Failed to compute hash. This may indicate a system error.",[hI]:"Not enough members with vote permission to meet the approval threshold.",[MI]:"At least one signer with execute permission is required to proceed.",[PI]:"At least one signer with initiate permission is required to perform this action.",[SI]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[AC]:"Invalid account index in transaction message. The account index is out of bounds.",[JI]:"Address Tree supplied is not part of the whitelisted address trees.",[pI]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[II]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[UI]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[QI]:"Member key conversion failed. The provided key format is invalid.",[RI]:"Only delegated members are allowed for this transaction.",[fI]:"Unexpected number of accounts provided for this instruction.",[aI]:"User with Permanent Member role must have a delegated wallet.",[Yx]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[Qx]:"The extracted public key has an invalid length or encoding.",[Jx]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[Xx]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[GI]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[HI]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[yI]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[iC]:"Invalid source type for token transfer. The source account type is not supported.",[AI]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[dI]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[lI]:"Malformed transaction message: structure or formatting does not match the expected layout.",[xI]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[yC]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[aC]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[$x]:"The extracted WebAuthn signed message payload is malformed.",[wI]:"An input string exceeds the maximum allowed character length.",[jI]:"This member is not registered under the provided domain configuration.",[tC]:"Member not found in settings. Cannot remove a member that does not exist.",[uC]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[CI]:"A required account is missing from the instruction context.",[$I]:"Compressed proof arguments are missing. Required for compressed account operations.",[sC]:"Missing compressed token account. Required for token transfer operations.",[lC]:"Missing destination token account. Required for token transfer operations.",[cC]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[eC]:"Light CPI accounts are missing. Required for compressed account operations.",[EI]:"User mutation arguments are required when performing add or remove delegate operations.",[xC]:"Missing new authority account. Required for domain configuration updates.",[SC]:"Missing settings account. Required for delegate operations on compressed wallets.",[YI]:"Compressed settings data is missing. The settings account must be initialized with data.",[fC]:"Missing source token account. Required for token transfer operations.",[oC]:"Missing SPL interface PDA. Required for token transfer operations.",[VI]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[pC]:"User account address is missing. Required for secp256r1 signature verification.",[IC]:"Missing whitelisted address trees account. Required for domain configuration updates.",[_I]:"No valid signer found in this transaction.",[cI]:"Only one permanent member is allowed per wallet.",[iI]:"Only one transaction manager is allowed per wallet.",[qI]:"The given origin index is not in the whitelisted origins.",[nC]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[oI]:"Permanent members cannot be removed from a wallet.",[NI]:"Writable CPI calls to protected accounts are not permitted.",[eI]:"The rpIdHash extracted from the signed message does not match the expected value.",[rC]:"Settings key mismatch. The provided settings key does not match the expected value.",[Zx]:"The signature index provided is out of bounds for the secp256r1 instruction.",[FI]:"The specified slot number was not found in the provided slot history.",[dC]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[TI]:"Too many members: a maximum of 4 members are supported.",[OI]:"This transaction has expired. It must be executed within 3 minutes of approval.",[BI]:"This transaction has not yet reached the required approval threshold.",[vI]:"Only the transaction creator or rent payer may close this transaction buffer.",[TC]:"Unauthorized: Only the admin account is allowed to perform this action.",[bI]:"Member is not part of the expected signers for this transaction."});function qL(e){return process.env.NODE_ENV!=="production"?Id[e]:"Error message not available in production bundles."}function JL(e,n,r){return gill.isProgramError(e,n,A,r)}async function ok({admin:e,addressTree:n}){return Jo({payer:e,addressTree:n,remainingAccounts:[]})}var Zt={Ed25519:1,Secp256r1:2};var Cd=f__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),Ak=f__default.default.object({transactionActionType:Cd,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.array(f__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),Ed=f__default.default.object({transactionActionType:Cd,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.string()}).strict(),Dd=f__default.default.object({authResponse:f__default.default.custom(),nonce:f__default.default.string(),clientSignature:f__default.default.object({clientOrigin:f__default.default.string(),signature:f__default.default.string()}).strict(),deviceSignature:f__default.default.object({publicKey:f__default.default.string(),signature:f__default.default.string()}).strict(),authProviderSignature:f__default.default.object({publicKey:f__default.default.string(),signature:f__default.default.string()}).strict().optional()}).strict(),Md=f__default.default.object({signer:f__default.default.string(),userAddressTreeIndex:f__default.default.number().optional(),additionalInfo:f__default.default.looseObject({}).optional()}).strict(),EC=f__default.default.object({transactionPayload:Ed,slotHash:f__default.default.string(),slotNumber:f__default.default.string(),originIndex:f__default.default.number(),crossOrigin:f__default.default.boolean()}).strict(),gk=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("message"),payload:f__default.default.string().optional()}).strict()}).strict(),pk=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Ed}).strict()}).strict(),mk=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("message"),payload:Md.extend(Dd.shape).extend({id:f__default.default.string().optional(),message:f__default.default.string(),clientSignature:f__default.default.object({clientOrigin:f__default.default.string()}).strict()})}).strict()}).strict(),Tk=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Md.extend(Dd.shape).extend(EC.shape).extend({clientSignature:f__default.default.object({clientOrigin:f__default.default.string()}).strict()})}).strict()}).strict();var be={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Le=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(be).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var ts=33,ke=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!==ts)throw new Error(`Invalid public key length, expected ${ts} 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===ts)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 ke{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function PC(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function hC(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var hd=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(PC())],["addressTableLookups",gill.getArrayCodec(hC())]]);function Rd(e){return hd.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 bd(e){let n=hd.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}function _d(e,n,r,s){if(e<n||e>r)throw new G(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function vd(e,n){if(e<0)throw new G(`${n} must be non-negative, got ${e}`)}function Xt(e,n){if(e.length===0)throw new G(`${n} cannot be empty`)}function Ud(e,n){if(e.trim().length===0)throw new G(`${n} cannot be empty`)}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var $={};function Wd(){if(!$.solanaRpcEndpoint)throw new We("RPC endpoint");return $.solanaRpcEndpoint}function at(){if(!$.lightProtocolRpc)throw new We("Light Protocol RPC");return $.lightProtocolRpc}function ne(){if(!$.solanaRpc)throw new We("Solana RPC");return $.solanaRpc}function Ld(){if(!$.sendAndConfirm)throw new We("Send and confirm transaction function");return $.sendAndConfirm}function kd(){if(!$.computeEstimate)throw new We("Compute budget estimate function");return $.computeEstimate}function ns(){return $.jitoTipsConfig?$.jitoTipsConfig:{blockEngineUrl:hs,getJitoTipsUrl:Rs,priority:bs}}function Hk({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){$.solanaRpcEndpoint=e,$.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});$.solanaRpc=t,$.sendAndConfirm=c,$.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),$.jitoTipsConfig=s??null;}function Od(e){return typeof e=="string"?e:e.toString()}function Bd(e,n){return e.toString()+(n?n.toString():"")}function Nd(e){return e.toString()}async function _r(e,n,r){let s=e?.get(n);if(s)return s;let t=await r();return t&&e&&e.set(n,t),t}var WC={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true};function LC(e,n,r=2,s=3e4){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function kC(e){return new Promise(n=>setTimeout(n,e))}async function Qt(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t=2,maxDelayMs:c=3e4,shouldRetry:a}={...WC,...n},i;for(let o=1;o<=r;o++)try{return await e()}catch(u){if(i=u,a&&!a(u,o))throw u;if(o>=r)break;let d=LC(o,s,t,c);await kC(d);}throw new ir(e.name||"retryWithBackoff",r,i)}async function it(e,n){let r=(s,t)=>s instanceof Response?s.status===429?n.retryOnRateLimit??true:s.status>=400&&s.status<500?false:s.status>=500:s instanceof TypeError||s instanceof Error;return Qt(e,{...n,shouldRetry:n.shouldRetry??r})}var L=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=await at().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:a,queuePubkeyIndex:i,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,u=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=u);}for(let c of r){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:a,addressQueuePubkeyIndex:i});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function vr(e,n){let r=Od(e);return _r(n,r,()=>at().getCompressedAccount(e))}async function Hd(e,n,r){let s=Bd(e,n?.mint);return _r(r,s,()=>at().getCompressedTokenAccountsByOwner(e,n))}async function Qe(e,n){let r=Nd(e);return _r(n,r,()=>ne().getAccountInfo(e,{encoding:"base64"}).send())}async function pe(e,n){let s=(await Promise.all(e.map(async t=>vr(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new ee("Compressed account",`Expected ${e.length} accounts but found ${s.length}`);return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function de(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,d)=>({treeInfo:n[d],root:r[d],rootIndex:s[d],address:u.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((u,d)=>({addressTreeInfo:a[d],outputStateTreeIndex:i,address:u.address,type:u.type}))}function ce(e,n,r,s,t,c,a){let i=[];for(let d=0;d<n.length;d++)i.push({treeInfo:n[d],rootIndex:s[d],leafIndex:r[d],proveByIndex:t[d],hash:c[d].hash});let o=e.packTreeInfos(i,[]).stateTrees;if(!o)throw new G("Unable to parse state tree data");return c.map((d,g)=>({data:a.decode(d.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(d.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Ee(e,n,r,s,t){let c=null,a=null,i=null,o=new L;if(e){await o.addSystemAccounts();let{address:u}=await se(n,r),d=(await pe([{address:u,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 B([d],[]);let g=o.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!g)throw new G("Unable to parse state tree data");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0]},data:J().decode(d.data?.data)},a={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:J().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:o,settingsMutArgs:a}}async function B(e,n,r=3,s=500){return Qt(()=>at().getValidityProofV0(e,n),{maxRetries:r,initialDelayMs:s})}async function De(){return (await Ur()).length-1}var ss;async function Ur(){if(!ss){let{data:e}=await Fo(ne(),await Fd());ss=e.whitelistedAddressTrees;}return ss}async function Wr(e,n,r){let s=await VC(e,n,r);if(!s)throw new ee("User account");return s}async function VC(e,n,r){let{address:s}=await k(e,n),t=await vr(s,r);return t?.data?.data?X().decode(t.data.data):null}async function os(e,n,r){let s=await HC(e,n,r);if(!s)throw new ee("Settings account");return s}async function HC(e,n,r){try{let{address:s}=await se(e,n),t=await vr(s,r);if(!t?.data?.data)throw new ee("Compressed settings account");let c=J().decode(t.data.data);if(c.data.__option==="None")throw new ee("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let s=await Rn(ne(),await ae(e));return s.exists?{...s.data,isCompressed:false}:null}}async function cs(e){vd(e,"index");let n=await Ur();if(e>=n.length)throw new G(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function fO(e){let r=(await Ur()).findIndex(s=>s.toString()===e);if(r===-1)throw new ee("Address tree",`Address ${e} not found in whitelist`);return r}async function se(e,n=0){let r=await cs(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function k(e,n=0){let r=await cs(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof ke?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function ut({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new G("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function qd(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Fd(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Jd(e,n,r){_d(r,0,255,"buffer_index");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof ke?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function _e(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function ae(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function _O(e){let n=await ae(e);return await _e(n)}async function vO(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function er(e,n){if(!e.ok){await e.text().catch(()=>e.statusText);throw new Ce(`Request failed: ${e.statusText} (${e.status})`,e.status,n)}return e}async function tr(e){try{return await e.json()}catch(n){throw new Ce(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function GO(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+kr(n.get(-2))),y:BigInt("0x"+kr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function zO(e){let r=nist_js.p256.Point.fromBytes(new Uint8Array(gill.getBase58Encoder().encode(e))).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function KO(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Be(n)),c=JSON.parse(new TextDecoder().decode(Be(r))),a=Xd(c),i=$d(new Uint8Array(Be(s))),o=await ut({rpIdHash:t.subarray(0,32)});return new M(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Be(r)),truncatedClientDataJson:a,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:as(e.clientSignature.clientOrigin,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:i,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function as(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function JO(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function YO(e){return is(e.data.payload.authResponse)}function ZO(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...as(n,r,s)]))}async function XO(e,n,r,s,t,c){let a;if(!t||!c){let o=(await ne().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!o)throw new ee("Slot sysvar","Unable to fetch slot sysvar data");let u=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(u.subarray(0,8)).toString(),a=u.subarray(8,40),t=gill.getBase58Decoder().decode(a);}else a=new Uint8Array(gill.getBase58Encoder().encode(t));let i=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...sha2_js.sha256(typeof e.transactionMessageBytes=="string"?new Uint8Array(Be(e.transactionMessageBytes)):e.transactionMessageBytes),...a,...as(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:i}}function is(e){return sha2_js.sha256(Br(e))}function QO(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Be(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),a=new Uint8Array(c);for(let i=0;i<t.length;i++)a[i]=t.charCodeAt(i);return c}async function $O(e,n){let{data:r}=await Bs(ne(),e),t=Qd(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}function kr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function ZC(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 Xd(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 Qd(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 $d(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 C=n&127;r+=C;}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,d=o[0]===0&&o.length>32?o.slice(1):o;if(u.length>32||d.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(u,32-u.length);let p=nist_js.p256.Point.CURVE().n>>1n,l=BigInt("0x"+kr(d)),P=(l>p?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),x=ZC(P);return new Uint8Array([...g,...x])}function Br(e){return new Uint8Array([...new Uint8Array(Be(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Be(e.response.clientDataJSON)))])}async function ds(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await ne().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);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 nu(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 su(e,n){Xt(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new G(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await it(()=>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:[]}))}]})}),{maxRetries:3,initialDelayMs:500});await er(r,n);let s=await tr(r);if(!s.result||s.error)throw new ge(`Unable to simulate bundle: ${JSON.stringify(s.error??s.result)}`);if(typeof s.result.value.summary!="string"&&s.result.value.summary.failed){let{TransactionFailure:t}=s.result.value.summary.failed.error,[,c]=t;throw new ge(`Simulation failed: ${c}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function j(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,clientAndDeviceHash:r.clientAndDeviceHash}):gill.none(),t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,a=r?.authData&&r.verifyArgs.clientDataJson?Br(r.authResponse):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:a,publicKey:i}}function gt(e){if(e instanceof ke)return {keyType:Zt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:Zt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function ru(e){return e instanceof M?e.toString():e.address.toString()}function le(e){let n=new Set,r=[];for(let t of e)n.has(ru(t))||(r.push(t),n.add(ru(t)));let s=r.filter(t=>t instanceof M);if(s.length>1)throw new G(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function ou({payer:e,tipAmount:n}){let r=jr[Math.floor(Math.random()*jr.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}async function MB(e){Xt(e,"bundle");let n=await ds(e,true),r=await su(n.map(gill.getBase64EncodedWireTransaction),Wd()),s=await ds(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await pE(s.map(gill.getBase64EncodedWireTransaction))}async function pE(e,n=3,r=500,s=ns()){Xt(e,"serializedTransactions");let{blockEngineUrl:t}=s,c=`${t}/bundles`,a=await it(()=>fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),{maxRetries:n,initialDelayMs:r});await er(a,c);let i=await tr(a);if(i.error)throw new ge(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new ge("No bundle ID returned from Jito");return i.result}async function PB(e,n=30,r=3e3,s=ns()){Ud(e,"bundleId");let{blockEngineUrl:t}=s,c=`${t}/getBundleStatuses`;return Qt(async()=>{let a=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await er(a,c);let i=await tr(a);if(i.error)throw new ge(`Error getting bundle status: ${JSON.stringify(i.error,null,2)}`,e);if(!i.result?.value?.length)throw new ge("Bundle not yet confirmed",e);let o=i.result.value[0];if(o.confirmation_status==="confirmed"||o.confirmation_status==="finalized"){let u=o.transactions[o.transactions.length-1];if(!u)throw new ge("No transactions in confirmed bundle",e);return u}throw new ge(`Bundle status: ${o.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:a=>a instanceof ge||a instanceof Ce})}async function WB({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await ne().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([kd()(c),nu(ne(),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 Ld()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function YB(e,n){if(n.threshold>1)throw new G("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(o=>iu(o.pubkey)===e);if(!r)throw new ee("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new ee("Permissions","No permissions found for the current member");let t=Le.has(s,be.InitiateTransaction),c=Le.has(s,be.VoteTransaction),a=Le.has(s,be.ExecuteTransaction);if(t&&c&&a)return {};if(!c||!a)throw new dr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,a?"ExecuteTransaction":void 0].filter(Boolean));let i=n.members.find(o=>o.role===2);if(!i)throw new ee("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(iu(i.pubkey)),userAddressTreeIndex:i.userAddressTreeIndex}}async function ZB({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await Wr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new ee("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return vE(n,c.transactionManagerUrl.value,e,s)}function vE(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let a=await it(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),{maxRetries:3,initialDelayMs:500});if(!a.ok)throw new Ce(`Transaction manager request failed: ${a.statusText}`,a.status,n);let i=await a.json();if("error"in i)throw new Ce(`Transaction manager error: ${i.error}`,a.status,n);return i.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function iu(e){return e.keyType===Zt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function XB(e){let n=e.map(c=>Ge().encode(c)),r=4+n.reduce((c,a)=>c+a.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function QB(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let a=ze().read(e,n);t[c]=a[0],n=a[1];}if(n!==e.length)throw new G(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function mN({payer:e,rpId:n,origins:r,authority:s}){let t=await ut({rpId:n}),c=new L;await c.addSystemAccounts();let a=await De(),{address:i,addressTree:o}=await k(s.address,a),u=[{address:i,tree:o,queue:o,type:"User"}],d=await B([],u),g=(await de(c,d.treeInfos,d.roots,d.rootIndices,u))[0],{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=v(d,l);return await Dc({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function DN({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[];r.index&&(a.push({address:(await se(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await k(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await pe(a,t):[],o=await De(),{address:u,addressTree:d}=await k(r.member,o),g=[{address:u,type:"User",tree:d,queue:d}],p=await B(i,g),l=null,S=null,P=i.filter(O=>O.type==="Settings"),x=i.filter(O=>O.type==="User");P.length&&(l=ce(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),P,J())[0]),x.length&&(S=ce(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,X())[0]);let C=await de(c,p.treeInfos.slice(i.length),p.roots.slice(i.length),p.rootIndices.slice(i.length),g),{remainingAccounts:_,systemOffset:I}=c.toAccountMetas(),U=v(p,I);return await Rc({payer:n,authority:e,compressedProofArgs:U,member:Lt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:C[0],domainConfig:s,remainingAccounts:_})}async function RN({payer:e}){let n=await qd();return Uc({payer:e,globalCounter:n})}async function UN({admin:e,rpId:n,disable:r}){let s=await ut({rpId:n});return Jc({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function wN({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await se(r,s),i=[{address:c,tree:a,queue:a,type:"Settings"}],o=await B([],i),u=(await de(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return fa({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:u,remainingAccounts:d})}async function jN({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new L;await t.addSystemAccounts();let{address:c,addressTree:a}=await k(r,s),i=[{address:c,tree:a,queue:a,type:"User"}],o=await B([],i),u=(await de(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return Da({compressedProofArgs:p,args:e,authority:n,userCreationArgs:u,remainingAccounts:d})}function WE(e,n,r,s){let t=LE(e,n),c=kE(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 LE(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 kE(e,n){return n<e.header.numSignerAccounts}async function Nr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=bd(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),ne()):{}),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:WE(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 d=o[u];if(!d)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:d,role:gill.AccountRole.WRITABLE});}for(let u of i.readonlyIndexes){let d=o[u];if(!d)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:d,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}}var pt=33,mt=64,ps=14,FE=2,GE=gill.address("Secp256r1SigVerify1111111111111111111111111");function zE(){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 KE(){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 mu(){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=KE();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=ps;let a=[];for(let i=0;i<r;i++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),pt).decode(e,n);n+=pt;let u=gill.fixDecoderSize(gill.getBytesDecoder(),mt).decode(e,n);n+=mt;let d=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),d).decode(e,n);n+=d,a.push({publicKey:o,signature:u,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function Tu(){return gill.createEncoder({getSizeFromValue:e=>{let n=ps*e.offsets.length,r=e.payload.reduce((s,t)=>s+pt+mt+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let s=zE();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),pt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),mt).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function aw(){return gill.combineCodec(Tu(),mu())}function N(e,n){let r=e.length,s=FE+r*ps,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],d=s,g=d+pt,p=g+mt;t.push({publicKeyOffset:d,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:u.length,messageInstructionIndex:65535}),s+=pt+mt+u.length;}let c=n?.programAddress??GE,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Tu().encode(a)}}function iw(e){return {programAddress:e.programAddress,accounts:{},data:mu().decode(e.data)}}async function yu({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let u=await _e(e),{accountMetas:d,addressLookupTableAccounts:g}=await Nr({transactionMessageBytes:r,walletAddress:u,additionalSigners:a,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(N(c)),p.push(o?id({transactionBuffer:n,payer:s.address,remainingAccounts:d,settingsKey:e}):rd({transactionBuffer:n,payer:s.address,settings:e})),i&&p.push(ou({payer:s,tipAmount:i})),{instructions:p,addressLookupTableAccounts:g}}async function lu({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:a=[],compressed:i=false,simulateProof:o=false,cachedAccounts:u}){let d=le(s),g=await ae(e),p=await _e(g),[{accountMetas:l,addressLookupTableAccounts:S,transactionMessage:P},{settingsMutArgs:x,proof:C,packedAccounts:_}]=await Promise.all([Nr({transactionMessageBytes:r,walletAddress:p,additionalSigners:d.filter(q=>!(q instanceof M)),addressesByLookupTableAddress:c}),Ee(i,e,n,o,u)]);_.addPreAccounts(l);let I=d.filter(q=>q instanceof M),{secp256r1VerifyArgs:U}=qE(I,a,_),{remainingAccounts:O,systemOffset:H}=_.toAccountMetas();return {instructions:JE({secp256r1VerifyInput:a,transactionMessage:P,accountMetas:l,compressed:i,payer:t,settingsMutArgs:x,proof:C,systemOffset:H,secp256r1VerifyArgs:U,settings:g,remainingAccounts:O}),addressLookupTableAccounts:S}}function qE(e,n,r){let s=[];for(let t of e){let c=n.length,{domainConfig:a,verifyArgs:i,signature:o,publicKey:u,message:d}=j(t,c);d&&o&&u&&n.push({message:d,signature:o,publicKey:u}),a&&(r.addPreAccounts([{address:a,role:gill.AccountRole.READONLY}]),i.__option==="Some"&&s.push({domainConfigKey:a,verifyArgs:i.value}));}return {secp256r1VerifyArgs:s}}function JE({secp256r1VerifyInput:e,transactionMessage:n,accountMetas:r,compressed:s,payer:t,settingsMutArgs:c,proof:a,systemOffset:i,secp256r1VerifyArgs:o,settings:u,remainingAccounts:d}){let g=[];e.length>0&&g.push(N(e));let p=YE(n,r);if(s){if(!t||!c)throw new Error("Payer not found or proof args is missing.");let l=v(a,i);g.push(xd({secp256r1VerifyArgs:o,transactionMessage:p,settingsMutArgs:c,compressedProofArgs:l,payer:t,remainingAccounts:d}));}else g.push(md({secp256r1VerifyArgs:o,settings:u,transactionMessage:p,remainingAccounts:d}));return g}function YE(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 Uw({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let o=le(s),u=await ae(e),d=await _e(u),[{packedAccounts:g,proof:p,settingsMutArgs:l},{value:S}]=await Promise.all([Ee(i,e,n,false,t),Qe(d,t)]);if((S?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let P=[],x=[];for(let U of o)if(U instanceof M){let O=P.length,{domainConfig:H,verifyArgs:Q,signature:q,publicKey:Me,message:Ae}=j(U,O);Ae&&q&&Me&&P.push({message:Ae,signature:q,publicKey:Me}),H&&(g.addPreAccounts([{address:H,role:gill.AccountRole.READONLY}]),Q.__option==="Some"&&x.push({domainConfigKey:H,verifyArgs:Q.value}));}else g.addPreAccounts([{address:U.address,role:gill.AccountRole.READONLY_SIGNER,signer:U}]);let{remainingAccounts:C,systemOffset:_}=g.toAccountMetas(),I=[];if(P.length>0&&I.push(N(P)),i){if(!a||!l)throw new Error("Payer not found or proof args is missing.");let U=v(p,_);I.push(La({amount:c,settingsMutArgs:l,compressedProofArgs:U,payer:a,secp256r1VerifyArgs:x,source:d,destination:r,remainingAccounts:C}));}else I.push(Ra({amount:c,secp256r1VerifyArgs:x,source:d,destination:r,settings:u,remainingAccounts:C}));return I}var Cu=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),Eu=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti");async function Kw({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:o,compressed:u=false}){let d=le(t),g=await ae(e),p=await _e(g),[l,[S],P,[x],[C]]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,p,o),gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(p),gill.getAddressEncoder().encode(gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString())),gill.getAddressEncoder().encode(s)],programAddress:gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString())}),programs.getAssociatedTokenAccountAddress(s,r,o),gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(r),gill.getAddressEncoder().encode(gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString())),gill.getAddressEncoder().encode(s)],programAddress:gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString())}),gill.getProgramDerivedAddress({seeds:[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(s)],programAddress:gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString())})]),[_,I,U]=await Promise.all([Qe(P,c),Qe(l,c),nD(u,e,n,c)]),O=!!_.value,H=!!I.value,Q=H?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(I.value.data[0])).amount:BigInt(0),q=BigInt(0),Me=true;if(Q<BigInt(a)){let me=await Qe(S,c);Me=!!me.value,q=BigInt(Me?oD(new Uint8Array(gill.getBase64Encoder().encode(me.value.data[0])))?.amount??0:0);}let Ae=O?P:void 0,Ne=O?void 0:x,yt=H&&(Q+q<BigInt(a)||q>BigInt(0)||!O)||!H&&O,nr=!!Ne,[{parsed:st,compressedAccount:oe},Fr]=await Promise.all([rD(p,s,Q,q,BigInt(a),c),tD(yt,C,c)]);if(Q+q+BigInt(st?.amount.toNumber()??0)<BigInt(a))throw new Error("Insufficient balance");let y=null,ie=null,Pe=new L;if(Fr&&Pe.addPreAccounts([{address:s,role:gill.AccountRole.WRITABLE}]),U||oe){await Pe.addSystemAccounts();let me=[];if(oe&&me.push({hash:oe.hash,tree:oe.treeInfo.tree,queue:oe.treeInfo.queue,data:oe.data,address:oe.address}),U&&me.push(U),ie=await B(me,[]),U){let Ve=oe?1:0;y=ce(Pe,ie.treeInfos.slice(Ve),ie.leafIndices.slice(Ve),ie.rootIndices.slice(Ve),ie.proveByIndices.slice(Ve),me.slice(Ve),J())[0];}}let F=oe&&st&&ie?gill.some({amount:st.amount.toNumber(),merkleContext:{leafIndex:oe.leafIndex,merkleTreePubkeyIndex:Pe.insertOrGet(oe.treeInfo.tree.toString()),queuePubkeyIndex:Pe.insertOrGet(oe.treeInfo.queue.toString()),proveByIndex:oe.proveByIndex},rootIndex:ie.rootIndices[0],version:sD(oe.data?.discriminator)}):gill.none(),we=[],Gr=[];for(let me of d)if(me instanceof M){let Ve=we.length,{domainConfig:zr,verifyArgs:xs,signature:Is,publicKey:Cs,message:Es}=j(me,Ve);Es&&Is&&Cs&&we.push({message:Es,signature:Is,publicKey:Cs}),zr&&(Pe.addPreAccounts([{address:zr,role:gill.AccountRole.READONLY}]),xs.__option==="Some"&&Gr.push({domainConfigKey:zr,verifyArgs:xs.value}));}else Pe.addPreAccounts([{address:me.address,role:gill.AccountRole.READONLY_SIGNER,signer:me}]);let{remainingAccounts:fs,systemOffset:Ou}=Pe.toAccountMetas(),sr=[];we.length>0&&sr.push(N(we));let Ss=v(ie,Ou);if(u){if(!y)throw new Error("Payer not found or proof args is missing.");sr.push(za({amount:a,settingsMutArgs:y,compressedProofArgs:Ss,payer:i,secp256r1VerifyArgs:Gr,source:p,destination:r,sourceCtokenTokenAccount:S,sourceSplTokenAccount:l,destinationCtokenTokenAccount:Ne,destinationSplTokenAccount:Ae,mint:s,tokenProgram:o,remainingAccounts:fs,sourceCompressedTokenAccount:F,compressibleConfig:Cu,splInterfacePda:yt?C:void 0,rentSponsor:nr?Eu:void 0}));}else sr.push(Va({amount:a,secp256r1VerifyArgs:Gr,source:p,destination:r,destinationCtokenTokenAccount:Ne,destinationSplTokenAccount:Ae,settings:g,mint:s,tokenProgram:o,remainingAccounts:fs,payer:i,sourceCompressedTokenAccount:F,compressedProofArgs:Ss,sourceSplTokenAccount:l,sourceCtokenTokenAccount:S,compressibleConfig:Cu,splInterfacePda:yt?C:void 0,rentSponsor:nr?Eu:void 0}));return sr}async function tD(e,n,r){let s=false;if(e){let{value:t}=await Qe(n,r);s=!t;}return s}async function rD(e,n,r,s,t,c){if(r+s>=t)return {};let a=await Hd(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)},c),i=a.items.length>0?a.items[0]:null;return i?i.compressedAccount.data?.data.length?i.compressedAccount.owner.equals(stateless_js.CTOKEN_PROGRAM_ID)?{compressedAccount:i.compressedAccount,parsed:i.parsed}:{}:{}:{}}async function nD(e,n,r,s){if(!e)return null;let{address:t}=await se(n,r);return (await pe([{address:t,type:"Settings"}],s))[0]}function sD(e){if(!e||e.length<8)return 3;if(e[0]===2)return 1;let n=e[7];return n===3?2:3}function oD(e){if(!e||e.length===0)return null;try{return {amount:gill.getU64Decoder().decode(e.slice(64,72))}}catch(n){return console.error("Token data parsing error:",n),null}}async function r2({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:a,proof:i,settingsMutArgs:o}=r,u=le(e),d=u.filter(_=>!(_ instanceof M));a.addPreAccounts(d.map(_=>({address:_.address,role:gill.AccountRole.READONLY_SIGNER,signer:_})));let g=u.filter(_=>_ instanceof M),p=[],l=[];for(let _ of g){let I=l.length,{domainConfig:U,verifyArgs:O,signature:H,publicKey:Q,message:q}=j(_,I);q&&H&&Q&&l.push({message:q,signature:H,publicKey:Q}),U&&(a.addPreAccounts([{address:U,role:gill.AccountRole.READONLY}]),O.__option==="Some"&&p.push({domainConfigKey:U,verifyArgs:O.value}));}let{remainingAccounts:S,systemOffset:P}=a.toAccountMetas(),x=v(i,P),C=[];if(l.length>0&&C.push(N(l)),c){if(!o)throw new Error("Payer not found or proof args is missing.");C.push(dc({configActions:t,payer:n,compressedProofArgs:x,settingsMutArgs:o,remainingAccounts:S,secp256r1VerifyArgs:p}));}else C.push(await tc({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:x,remainingAccounts:S,secp256r1VerifyArgs:p}));return C}async function d2({createUserArgs:e,payer:n}){let r=new L;await r.addSystemAccounts(),r.addPreAccounts(e.map(d=>({address:d.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:d.member})));let s=await De(),t=await Promise.all(e.map(async d=>{let{address:g,addressTree:p}=await k(d.member.address,s);return {address:g,tree:p,queue:p,type:"User"}})),c=await B([],t),a=await de(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:o}=r.toAccountMetas(),u=v(c,o);return await Oc({compressedProofArgs:u,payer:n,createUserArgs:e.map((d,g)=>({member:d.member.address,role:d.role,userCreationArgs:a[g],transactionManagerUrl:d.role===2?d.transactionManagerUrl:null})),remainingAccounts:i})}async function y2({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new L;await c.addSystemAccounts();let a=[],i=[];i.push(...await pe([{address:(await k(r.address,s)).address,type:"User"}],t));let o=await De(),{address:u,addressTree:d}=await se(e,o);a.push({address:u,queue:d,tree:d,type:"Settings"});let g=i.length,p=await B(i,a),l=ce(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),i.filter(I=>I.type==="User"),X())[0],P=(await de(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),a)).find(I=>I.type==="Settings")??null,{remainingAccounts:x,systemOffset:C}=c.toAccountMetas(),_=v(p,C);if(!P)throw new Error("Settings creation args is missing.");return await mc({settingsIndex:e,payer:n,initialMember:r,userReadonlyArgs:l,compressedProofArgs:_,settingsCreation:P,remainingAccounts:x})}async function M2({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:a,settingsMutArgs:i}=await Ee(true,e,n,false,t);if(!i)throw new Error("Proof args is missing");let o=le(s),u=o.filter(C=>C instanceof M),d=[],g=[];for(let C of u){let _=d.length,{domainConfig:I,verifyArgs:U,signature:O,publicKey:H,message:Q}=j(C,_);Q&&O&&H&&d.push({message:Q,signature:O,publicKey:H}),I&&(c.addPreAccounts([{address:I,role:gill.AccountRole.READONLY}]),U.__option==="Some"&&g.push({domainConfigKey:I,verifyArgs:U.value}));}c.addPreAccounts(o.filter(C=>"address"in C).map(C=>({address:C.address,role:gill.AccountRole.READONLY_SIGNER,signer:C})));let{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=v(a,l),P=[];d.length>0&&P.push(N(d));let x=await ae(e);return P.push(Fc({settings:x,payer:r,settingsMutArgs:i,compressedProofArgs:S,secp256r1VerifyArgs:g,remainingAccounts:p})),P}async function U2({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let a=new L;await a.addSystemAccounts();let i=await De(),{address:o,addressTree:u}=await k(r.address,i),d=[{address:o,tree:u,queue:u,type:"User"}],g=await B([],d),p=(await de(a,g.treeInfos,g.roots,g.rootIndices,d))[0],l=a.toAccountMetas();c=l.remainingAccounts,t={compressedProofArgs:v(g,l.systemOffset),authorityCreationArgs:p};}return ea({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function N2({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new L;await s.addSystemAccounts();let t=await pe([{address:(await k(e.address,n)).address,type:"User"}]),c=await B(t,[]),a=ce(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,X())[0],{remainingAccounts:i,systemOffset:o}=s.toAccountMetas(),u=v(c,o);return ca({authority:e,transactionManagerUrl:r,compressedProofArgs:u,userMutArgs:a,remainingAccounts:i})}async function J2({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:u}=j(n),d=[];i&&o&&u&&d.push({message:i,signature:o,publicKey:u});let g=await Wr(n instanceof M?n:n.address,r,t),p=[];p.push({address:(await k(n instanceof M?n:n.address,r)).address,type:"User"});let l,S=null,P,x=null;g.delegatedTo.__option==="Some"&&((await os(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await se(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):l=await ae(g.delegatedTo.value.index)),s&&((await os(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await se(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):P=await ae(s.index));let C=new L;await C.addSystemAccounts();let _=await pe(p,t),I=await B(_,[]),U=ce(C,I.treeInfos.slice(0,1),I.leafIndices.slice(0,1),I.rootIndices.slice(0,1),I.proveByIndices.slice(0,1),_.slice(0,1),X())[0],O=S?gill.some(ce(C,I.treeInfos.slice(S.start,S.end),I.leafIndices.slice(S.start,S.end),I.rootIndices.slice(S.start,S.end),I.proveByIndices.slice(S.start,S.end),_.slice(S.start,S.end),J())[0]):gill.none(),H=x?gill.some(ce(C,I.treeInfos.slice(x.start,x.end),I.leafIndices.slice(x.start,x.end),I.rootIndices.slice(x.start,x.end),I.proveByIndices.slice(x.start,x.end),_.slice(x.start,x.end),J())[0]):gill.none(),{remainingAccounts:Q,systemOffset:q}=C.toAccountMetas(),Me=v(I,q),Ae=[];return d.length>0&&Ae.push(N(d)),Ae.push(ga({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof M?void 0:n,oldSettings:l,oldSettingsMutArgs:O,newSettings:P,newSettingsMutArgs:H,compressedProofArgs:Me,userMutArgs:U,remainingAccounts:Q})),Ae}async function u5({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:a}){let i=await Oo(ne(),s),o=i.data.multiWalletSettings,{packedAccounts:u,proof:d,settingsMutArgs:g}=await Ee(c,e,n,false,a),{remainingAccounts:p,systemOffset:l}=u.toAccountMetas(),{domainConfig:S,verifyArgs:P,message:x,signature:C,publicKey:_}=j(r),I=[];if(x&&C&&_&&I.push(N([{message:x,signature:C,publicKey:_}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let U=v(d,l);I.push(ri({transactionBuffer:s,domainConfig:S,closer:r instanceof M?void 0:r,rentCollector:i.data.payer,secp256r1VerifyArgs:P,settingsMutArgs:g,payer:t,compressedProofArgs:U,remainingAccounts:p}));}else I.push(Za({transactionBuffer:s,domainConfig:S,closer:r instanceof M?void 0:r,settings:o,payer:i.data.payer,secp256r1VerifyArgs:P,remainingAccounts:[]}));return I}function Pu({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:u,expectedSecp256r1Signers:d}){let{domainConfig:g,verifyArgs:p,message:l,signature:S,publicKey:P}=j(n),x=[];if(l&&S&&P&&x.push(N([{message:l,signature:S,publicKey:P}])),u){let{settingsReadonlyArgs:C,compressedProofArgs:_,remainingAccounts:I}=u;x.push(mi({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof M?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:d},settingsReadonlyArgs:C,compressedProofArgs:_,remainingAccounts:I}));}else x.push(ii({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof M?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:d},remainingAccounts:[]}));return x}function hu({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=j(e),u=[];return i&&a&&o&&u.push(N([{message:i,signature:a,publicKey:o}])),s?u.push(Pi({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(xi({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof M?void 0:e,remainingAccounts:[]})),u}function Ru({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Ni({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Ui({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function bu({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=j(n),u=[];return o&&a&&i&&u.push(N([{message:o,signature:a,publicKey:i}])),s?u.push(Zi({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(zi({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof M?void 0:n,remainingAccounts:[]})),u}async function $5({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await dD(r),a=new L,i=null,o=null,u=[];if(c.length||t){let g=await uD({packedAccounts:a,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});i=g.proof,o=g.settingsMutArgs??null,u=g.userMutArgs??[];}return {configActions:await AD({configActionsArgs:r,userMutArgs:u,index:e}),index:e,proof:i,settingsMutArgs:o,packedAccounts:a,compressed:t}}async function dD(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>k(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let s=await Promise.all(r.members.map(t=>k(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function uD({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let a=[];if(r){let l=(await se(s,t)).address;a.push({address:l,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await pe(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await B(i,[]),u=[],d=[];for(let l of i)l.type==="Settings"?u.push(l):l.type==="User"&&d.push(l);let g,p=[];if(r&&o&&(g=ce(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),u,J())[0]),d.length&&o){let l=r?1:0;p=ce(e,o.treeInfos.slice(l),o.leafIndices.slice(l),o.rootIndices.slice(l),o.proveByIndices.slice(l),d,X());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function AD({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let a of t.members){let i=await k(a.member,a.userAddressTreeIndex).then(o=>r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(o.address))))));if(!i)throw new Error("Unable to find user account");c.push(mD({permissionArgs:a.permissions,userMutArgs:i,pubkey:a.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(a=>k(a.member,a.userAddressTreeIndex).then(i=>{let o=r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address)))));if(!o)throw new Error("Unable to find user account");return pD({pubkey:a.member,userMutArgs:o,index:e})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(a=>gD({permissionArgs:a.permissions,pubkey:a.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function gD({pubkey:e,permissionArgs:n}){return {memberKey:gt(e),permissions:Wu(n)}}function pD({pubkey:e,userMutArgs:n,index:r}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");let s=n.data.delegatedTo.__option==="Some"?Number(n.data.delegatedTo.value.index.toString())===r:false;return {memberKey:gt(e),userArgs:s?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function mD({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===1)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:gt(e),permissions:Wu(n),userReadonlyArgs:r}}function Wu(e){let n=[];return e.initiate&&n.push(be.InitiateTransaction),e.vote&&n.push(be.VoteTransaction),e.execute&&n.push(be.ExecuteTransaction),Le.fromPermissions(n)}async function a6({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o,compressed:u=false,additionalVoters:d=[],additionalSigners:g=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:l}){let S=await ae(n),P=Math.floor(Math.random()*255),x=await Jd(S,t instanceof M?t:t.address,P),C=[],_=[];for(let F=0;F<s.length;F+=p){let we=s.subarray(F,F+p);C.push(we),_.push(sha2_js.sha256(we));}let I=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:U,settingsMutArgs:O,proof:H,packedAccounts:Q}=await Ee(u,n,r,false,l),{remainingAccounts:q,systemOffset:Me}=Q.toAccountMetas(),Ae=H&&U&&O?{settingsReadonlyArgs:U,settingsMutArgs:O,compressedProofArgs:v(H,Me),remainingAccounts:q,payer:e}:null,Ne=le([t,...c?[c]:[],...d]).filter(F=>F instanceof M).map(F=>({memberKey:gt(F),messageHash:is(F.authResponse)})),yt=Pu({finalBufferHash:I,finalBufferSize:s.length,bufferIndex:P,payer:e,transactionBufferAddress:x,settings:S,creator:t,preauthorizeExecution:!c,bufferExtendHashes:_,compressedArgs:Ae,expectedSecp256r1Signers:Ne}),nr=C.map(F=>Ru({transactionMessageBytes:F,transactionBufferAddress:x,settings:S,compressed:u})),st=d.map(F=>bu({voter:F,transactionBufferAddress:x,settings:S,compressedArgs:Ae})),oe=hu({compressedArgs:Ae,settings:S,executor:c,transactionBufferAddress:x}),{instructions:Fr,addressLookupTableAccounts:y}=await yu({compressed:u,settings:S,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o}),ie=F=>({payer:e,instructions:F,addressesByLookupTableAddress:y});return [ie(yt),...nr.map(F=>ie([F])),...st.length?[ie(st.flat())]:[],ie(oe),ie(Fr)]}var Vr=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 Hr=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 ku({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=Vr.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(s??{});for(let p of i){let l=t.extractTableLookup(p);if(l!==void 0){let{addressTableLookup:S,drainedKeys:P}=l;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),a.writable.push(...P.writable),a.readonly.push(...P.readonly);}}let[o,u]=t.getMessageComponents(),g=new Hr(u,a).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function x6({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=ku({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return Rd(s)}async function M6({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:a,cachedAccounts:i,compressed:o=false,simulateProof:u=false}){let{instructions:d,addressLookupTableAccounts:g}=await lu({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:i});return {payer:e,instructions:d,addressesByLookupTableAddress:g}}
2
- exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=jo;exports.AuthenticationContextSchema=Dd;exports.BACKOFF_MAX_DELAY_MS=ar;exports.BUNDLE_POLL_DELAY_MS=Ps;exports.BUNDLE_POLL_MAX_RETRIES=Ms;exports.BaseResponseSchema=Md;exports.BundleError=ge;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=cc;exports.CHANGE_CONFIG_DISCRIMINATOR=$o;exports.COMPUTE_UNIT_MULTIPLIER=Ds;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=gc;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Cc;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Pc;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=_c;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Lc;exports.CompleteMessageRequestSchema=mk;exports.CompleteTransactionRequestSchema=Tk;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=wc;exports.DEFAULT_JITO_BLOCK_ENGINE_URL=hs;exports.DEFAULT_JITO_TIPS_URL=Rs;exports.DEFAULT_JITO_TIP_PRIORITY=bs;exports.DEFAULT_NETWORK_RETRY_DELAY_MS=Ue;exports.DEFAULT_NETWORK_RETRY_MAX_RETRIES=ve;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Kc;exports.DOMAIN_CONFIG_DISCRIMINATOR=Ls;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=Qc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=na;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=da;exports.EXPONENTIAL_BACKOFF_BASE=cr;exports.GLOBAL_COUNTER_DISCRIMINATOR=Vs;exports.HTTP_STATUS_BAD_REQUEST=vs;exports.HTTP_STATUS_INTERNAL_SERVER_ERROR=qr;exports.HTTP_STATUS_TOO_MANY_REQUESTS=Us;exports.JITO_TIP_ACCOUNTS=jr;exports.KeyType=Zt;exports.MAX_TRANSACTION_BUFFER_INDEX=_s;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Ta;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Ia;exports.MIN_COMPUTE_UNITS=or;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=DI;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=tI;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=mC;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=zI;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=KI;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=gC;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=CC;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=sI;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=nI;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=mI;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=XI;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=gI;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=rI;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=uI;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=WI;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=LI;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=kI;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=ZI;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=hI;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=MI;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=PI;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=SI;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=AC;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=JI;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=pI;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=II;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=UI;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=QI;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=RI;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=fI;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=aI;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=Yx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=Qx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=Jx;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=Xx;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=GI;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=HI;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=yI;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=iC;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=AI;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=dI;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=lI;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=xI;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=yC;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=aC;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=$x;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=wI;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=jI;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=tC;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=uC;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=CI;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=$I;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=sC;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=lC;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=cC;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=eC;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=EI;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=xC;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=SC;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=YI;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=fC;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=oC;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=VI;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=pC;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=IC;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=_I;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=cI;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=iI;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=qI;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=nC;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=oI;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=NI;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=eI;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=rC;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=Zx;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=FI;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=dC;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=TI;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=OI;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=BI;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=vI;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=TC;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=bI;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=Kx;exports.MultiWalletInstruction=jx;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=va;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Pa;exports.NetworkError=Ce;exports.NotFoundError=ee;exports.NotInitializedError=We;exports.Permission=be;exports.PermissionError=dr;exports.Permissions=Le;exports.RetryExhaustedError=ir;exports.RevibaseError=Ie;exports.SETTINGS_DISCRIMINATOR=Po;exports.Secp256r1Key=ke;exports.SignedSecp256r1Key=M;exports.StartMessageRequestSchema=gk;exports.StartTransactionRequestSchema=pk;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Fa;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Na;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=$a;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=qa;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Ai;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=oi;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Wo;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ei;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=li;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=ki;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=bi;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=qi;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Hi;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=od;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=$i;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=ld;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Ad;exports.TRANSACTION_SIZE_LIMIT=Kr;exports.TransactionActionTypeSchema=Cd;exports.TransactionDetailsSchema=EC;exports.TransactionError=Ws;exports.TransactionPayloadSchema=Ak;exports.TransactionPayloadWithBase64MessageBytesSchema=Ed;exports.UserRole=ot;exports.ValidationError=G;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=wo;exports.addWhitelistedAddressTrees=ok;exports.base64URLStringToBuffer=Be;exports.bufferToBase64URLString=QO;exports.changeConfig=r2;exports.closeTransactionBuffer=u5;exports.configAction=cM;exports.convertMemberKeyToString=iu;exports.convertPubkeyCompressedToCose=zO;exports.convertPubkeyCoseToCompressed=GO;exports.createClientAuthorizationCompleteRequestChallenge=YO;exports.createClientAuthorizationStartRequestChallenge=JO;exports.createDomainConfig=mN;exports.createDomainUserAccounts=DN;exports.createGlobalCounter=RN;exports.createMessageChallenge=ZO;exports.createTransactionBuffer=Pu;exports.createTransactionChallenge=XO;exports.createTransactionManagerSigner=vE;exports.createUserAccounts=d2;exports.createWallet=y2;exports.decodeDomainConfig=Os;exports.decodeGlobalCounter=Fs;exports.decodeSettings=Ro;exports.decodeTransactionBuffer=ko;exports.decodeWhitelistedAddressTree=Ho;exports.decompressSettingsAccount=M2;exports.deserializeConfigActions=QB;exports.disableDomainConfig=UN;exports.editDomainConfig=U2;exports.editTransactionManagerUrl=N2;exports.editUserDelegate=J2;exports.executeTransaction=yu;exports.executeTransactionBuffer=hu;exports.executeTransactionSync=lu;exports.extendTransactionBuffer=Ru;exports.fetchAllDomainConfig=ID;exports.fetchAllGlobalCounter=RD;exports.fetchAllMaybeDomainConfig=Zu;exports.fetchAllMaybeGlobalCounter=gA;exports.fetchAllMaybeSettings=w1;exports.fetchAllMaybeTransactionBuffer=oT;exports.fetchAllMaybeWhitelistedAddressTree=MT;exports.fetchAllSettings=nR;exports.fetchAllTransactionBuffer=dR;exports.fetchAllWhitelistedAddressTree=mR;exports.fetchDomainConfig=Bs;exports.fetchGlobalCounter=hD;exports.fetchMaybeDomainConfig=Yu;exports.fetchMaybeGlobalCounter=AA;exports.fetchMaybeSettings=Rn;exports.fetchMaybeSettingsAccountData=HC;exports.fetchMaybeTransactionBuffer=sT;exports.fetchMaybeUserAccountData=VC;exports.fetchMaybeWhitelistedAddressTree=DT;exports.fetchSettings=rR;exports.fetchSettingsAccountData=os;exports.fetchTransactionBuffer=Oo;exports.fetchUserAccountData=Wr;exports.fetchWhitelistedAddressTree=Fo;exports.getAddMemberArgsCodec=WD;exports.getAddMemberArgsDecoder=Yr;exports.getAddMemberArgsEncoder=Jr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=vR;exports.getAddWhitelistedAddressTreesInstruction=WR;exports.getAddWhitelistedAddressTreesInstructionAsync=Jo;exports.getAddWhitelistedAddressTreesInstructionDataCodec=UR;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=qo;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=On;exports.getChangeConfigCompressedDiscriminatorBytes=XR;exports.getChangeConfigCompressedInstruction=dc;exports.getChangeConfigCompressedInstructionDataCodec=QR;exports.getChangeConfigCompressedInstructionDataDecoder=ic;exports.getChangeConfigCompressedInstructionDataEncoder=ac;exports.getChangeConfigDiscriminatorBytes=HR;exports.getChangeConfigInstruction=GR;exports.getChangeConfigInstructionAsync=tc;exports.getChangeConfigInstructionDataCodec=FR;exports.getChangeConfigInstructionDataDecoder=ec;exports.getChangeConfigInstructionDataEncoder=Nn;exports.getClientAndDeviceHash=as;exports.getCompiledInstructionCodec=OD;exports.getCompiledInstructionDecoder=Xr;exports.getCompiledInstructionEncoder=Zr;exports.getCompressedAccountMetaCodec=VD;exports.getCompressedAccountMetaDecoder=xt;exports.getCompressedAccountMetaEncoder=St;exports.getCompressedAccountMetaReadOnlyCodec=zD;exports.getCompressedAccountMetaReadOnlyDecoder=Dt;exports.getCompressedAccountMetaReadOnlyEncoder=Et;exports.getCompressedProofCodec=qD;exports.getCompressedProofDecoder=nn;exports.getCompressedProofEncoder=rn;exports.getCompressedSettingsAddressFromIndex=se;exports.getCompressedSettingsCodec=XD;exports.getCompressedSettingsDataCodec=tM;exports.getCompressedSettingsDataDecoder=ht;exports.getCompressedSettingsDataEncoder=Pt;exports.getCompressedSettingsDecoder=J;exports.getCompressedSettingsEncoder=Mt;exports.getComputeBudgetEstimate=kd;exports.getConfigActionCodec=oM;exports.getConfigActionDecoder=ze;exports.getConfigActionEncoder=Ge;exports.getCreateCompressedWalletDiscriminatorBytes=cb;exports.getCreateCompressedWalletInstruction=ib;exports.getCreateCompressedWalletInstructionAsync=mc;exports.getCreateCompressedWalletInstructionDataCodec=ab;exports.getCreateCompressedWalletInstructionDataDecoder=pc;exports.getCreateCompressedWalletInstructionDataEncoder=wn;exports.getCreateDomainConfigDiscriminatorBytes=yb;exports.getCreateDomainConfigInstruction=fb;exports.getCreateDomainConfigInstructionAsync=Dc;exports.getCreateDomainConfigInstructionDataCodec=lb;exports.getCreateDomainConfigInstructionDataDecoder=Ec;exports.getCreateDomainConfigInstructionDataEncoder=Hn;exports.getCreateDomainUserAccountDiscriminatorBytes=Pb;exports.getCreateDomainUserAccountInstruction=Rb;exports.getCreateDomainUserAccountInstructionAsync=Rc;exports.getCreateDomainUserAccountInstructionDataCodec=hb;exports.getCreateDomainUserAccountInstructionDataDecoder=hc;exports.getCreateDomainUserAccountInstructionDataEncoder=Gn;exports.getCreateGlobalCounterDiscriminatorBytes=kb;exports.getCreateGlobalCounterInstruction=Bb;exports.getCreateGlobalCounterInstructionAsync=Uc;exports.getCreateGlobalCounterInstructionDataCodec=Ob;exports.getCreateGlobalCounterInstructionDataDecoder=vc;exports.getCreateGlobalCounterInstructionDataEncoder=Kn;exports.getCreateUserAccountArgsCodec=AM;exports.getCreateUserAccountArgsDecoder=gn;exports.getCreateUserAccountArgsEncoder=An;exports.getCreateUserAccountsDiscriminatorBytes=Kb;exports.getCreateUserAccountsInstruction=qb;exports.getCreateUserAccountsInstructionAsync=Oc;exports.getCreateUserAccountsInstructionDataCodec=jb;exports.getCreateUserAccountsInstructionDataDecoder=kc;exports.getCreateUserAccountsInstructionDataEncoder=qn;exports.getDecompressSettingsAccountDiscriminatorBytes=t_;exports.getDecompressSettingsAccountInstruction=Fc;exports.getDecompressSettingsAccountInstructionDataCodec=r_;exports.getDecompressSettingsAccountInstructionDataDecoder=Hc;exports.getDecompressSettingsAccountInstructionDataEncoder=Vc;exports.getDisableDomainConfigDiscriminatorBytes=d_;exports.getDisableDomainConfigInstruction=Jc;exports.getDisableDomainConfigInstructionDataCodec=u_;exports.getDisableDomainConfigInstructionDataDecoder=qc;exports.getDisableDomainConfigInstructionDataEncoder=jc;exports.getDomainConfigAddress=ut;exports.getDomainConfigCodec=xD;exports.getDomainConfigDecoder=ks;exports.getDomainConfigDiscriminatorBytes=SD;exports.getDomainConfigEncoder=Ju;exports.getDomainConfigSize=CD;exports.getEditDomainConfigDiscriminatorBytes=f_;exports.getEditDomainConfigInstruction=ea;exports.getEditDomainConfigInstructionAsync=x_;exports.getEditDomainConfigInstructionDataCodec=S_;exports.getEditDomainConfigInstructionDataDecoder=$c;exports.getEditDomainConfigInstructionDataEncoder=Yn;exports.getEditMemberArgsCodec=TM;exports.getEditMemberArgsDecoder=an;exports.getEditMemberArgsEncoder=cn;exports.getEditTransactionManagerUrlDiscriminatorBytes=R_;exports.getEditTransactionManagerUrlInstruction=ca;exports.getEditTransactionManagerUrlInstructionDataCodec=b_;exports.getEditTransactionManagerUrlInstructionDataDecoder=oa;exports.getEditTransactionManagerUrlInstructionDataEncoder=sa;exports.getEditUserDelegateDiscriminatorBytes=B_;exports.getEditUserDelegateInstruction=ga;exports.getEditUserDelegateInstructionDataCodec=N_;exports.getEditUserDelegateInstructionDataDecoder=Aa;exports.getEditUserDelegateInstructionDataEncoder=ua;exports.getExpectedSecp256r1SignersCodec=SM;exports.getExpectedSecp256r1SignersDecoder=vt;exports.getExpectedSecp256r1SignersEncoder=_t;exports.getGlobalCounterAddress=qd;exports.getGlobalCounterCodec=PD;exports.getGlobalCounterDecoder=Hs;exports.getGlobalCounterDiscriminatorBytes=MD;exports.getGlobalCounterEncoder=uA;exports.getGlobalCounterSize=bD;exports.getJitoTipsConfig=ns;exports.getLightCpiSigner=vO;exports.getLightProtocolRpc=at;exports.getLinkWalletArgsCodec=EM;exports.getLinkWalletArgsDecoder=mn;exports.getLinkWalletArgsEncoder=pn;exports.getMemberCodec=hM;exports.getMemberDecoder=bt;exports.getMemberEncoder=Rt;exports.getMemberKeyCodec=_M;exports.getMemberKeyDecoder=re;exports.getMemberKeyEncoder=te;exports.getMigrateCompressedSettingsDiscriminatorBytes=j_;exports.getMigrateCompressedSettingsInstruction=fa;exports.getMigrateCompressedSettingsInstructionDataCodec=q_;exports.getMigrateCompressedSettingsInstructionDataDecoder=la;exports.getMigrateCompressedSettingsInstructionDataEncoder=ya;exports.getMigrateCompressedUsersDiscriminatorBytes=tv;exports.getMigrateCompressedUsersInstruction=Da;exports.getMigrateCompressedUsersInstructionDataCodec=rv;exports.getMigrateCompressedUsersInstructionDataDecoder=Ea;exports.getMigrateCompressedUsersInstructionDataEncoder=Ca;exports.getMultiWalletErrorMessage=qL;exports.getNativeTransferIntentCompressedDiscriminatorBytes=xv;exports.getNativeTransferIntentCompressedInstruction=La;exports.getNativeTransferIntentCompressedInstructionDataCodec=Iv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Wa;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Ua;exports.getNativeTransferIntentDiscriminatorBytes=uv;exports.getNativeTransferIntentInstruction=Ra;exports.getNativeTransferIntentInstructionAsync=gv;exports.getNativeTransferIntentInstructionDataCodec=Av;exports.getNativeTransferIntentInstructionDataDecoder=ha;exports.getNativeTransferIntentInstructionDataEncoder=Zn;exports.getNewAuthorityArgsCodec=LM;exports.getNewAuthorityArgsDecoder=fn;exports.getNewAuthorityArgsEncoder=ln;exports.getOriginIndex=$O;exports.getPackedAddressTreeInfoCodec=BM;exports.getPackedAddressTreeInfoDecoder=Wt;exports.getPackedAddressTreeInfoEncoder=Ut;exports.getPackedMerkleContextCodec=VM;exports.getPackedMerkleContextDecoder=xn;exports.getPackedMerkleContextEncoder=Sn;exports.getPackedStateTreeInfoCodec=GM;exports.getPackedStateTreeInfoDecoder=Ct;exports.getPackedStateTreeInfoEncoder=It;exports.getPermissionsCodec=jM;exports.getPermissionsDecoder=Fe;exports.getPermissionsEncoder=He;exports.getProofArgsCodec=ZM;exports.getProofArgsDecoder=D;exports.getProofArgsEncoder=E;exports.getRemoveMemberArgsCodec=eP;exports.getRemoveMemberArgsDecoder=un;exports.getRemoveMemberArgsEncoder=dn;exports.getSecp256r1MessageHash=is;exports.getSecp256r1PubkeyCodec=nP;exports.getSecp256r1PubkeyDecoder=Lt;exports.getSecp256r1PubkeyEncoder=En;exports.getSecp256r1SignatureOffsetsDataDecoder=KE;exports.getSecp256r1SignatureOffsetsDataEncoder=zE;exports.getSecp256r1VerifyArgsCodec=cP;exports.getSecp256r1VerifyArgsDecoder=V;exports.getSecp256r1VerifyArgsEncoder=w;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=uP;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=Z;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Y;exports.getSecp256r1VerifyInstruction=N;exports.getSecp256r1VerifyInstructionDataCodec=aw;exports.getSecp256r1VerifyInstructionDataDecoder=mu;exports.getSecp256r1VerifyInstructionDataEncoder=Tu;exports.getSendAndConfirmTransaction=Ld;exports.getSettingsCodec=tR;exports.getSettingsCreationArgsCodec=mP;exports.getSettingsCreationArgsDecoder=Ot;exports.getSettingsCreationArgsEncoder=kt;exports.getSettingsDecoder=ho;exports.getSettingsDiscriminatorBytes=eR;exports.getSettingsEncoder=N1;exports.getSettingsFromIndex=ae;exports.getSettingsIndexWithAddressCodec=lP;exports.getSettingsIndexWithAddressDecoder=Nt;exports.getSettingsIndexWithAddressEncoder=Bt;exports.getSettingsMutArgsCodec=IP;exports.getSettingsMutArgsDecoder=K;exports.getSettingsMutArgsEncoder=z;exports.getSettingsReadonlyArgsCodec=MP;exports.getSettingsReadonlyArgsDecoder=Vt;exports.getSettingsReadonlyArgsEncoder=wt;exports.getSignedSecp256r1Key=KO;exports.getSignedTransactionManager=ZB;exports.getSolanaRpc=ne;exports.getSolanaRpcEndpoint=Wd;exports.getSourceCompressedTokenArgsCodec=bP;exports.getSourceCompressedTokenArgsDecoder=Ft;exports.getSourceCompressedTokenArgsEncoder=Ht;exports.getTokenTransferIntentCompressedDiscriminatorBytes=wv;exports.getTokenTransferIntentCompressedInstruction=za;exports.getTokenTransferIntentCompressedInstructionAsync=Hv;exports.getTokenTransferIntentCompressedInstructionDataCodec=Vv;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Ga;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Qn;exports.getTokenTransferIntentDiscriminatorBytes=bv;exports.getTokenTransferIntentInstruction=Va;exports.getTokenTransferIntentInstructionAsync=vv;exports.getTokenTransferIntentInstructionDataCodec=_v;exports.getTokenTransferIntentInstructionDataDecoder=wa;exports.getTokenTransferIntentInstructionDataEncoder=Xn;exports.getTransactionBufferAddress=Jd;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=sU;exports.getTransactionBufferCloseCompressedInstruction=ri;exports.getTransactionBufferCloseCompressedInstructionDataCodec=oU;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ti;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=ei;exports.getTransactionBufferCloseDiscriminatorBytes=Yv;exports.getTransactionBufferCloseInstruction=Za;exports.getTransactionBufferCloseInstructionDataCodec=Zv;exports.getTransactionBufferCloseInstructionDataDecoder=Ya;exports.getTransactionBufferCloseInstructionDataEncoder=Ja;exports.getTransactionBufferCodec=iR;exports.getTransactionBufferCreateArgsCodec=WP;exports.getTransactionBufferCreateArgsDecoder=zt;exports.getTransactionBufferCreateArgsEncoder=Gt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=CU;exports.getTransactionBufferCreateCompressedInstruction=mi;exports.getTransactionBufferCreateCompressedInstructionDataCodec=EU;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=pi;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=gi;exports.getTransactionBufferCreateDiscriminatorBytes=pU;exports.getTransactionBufferCreateInstruction=ii;exports.getTransactionBufferCreateInstructionDataCodec=mU;exports.getTransactionBufferCreateInstructionDataDecoder=ai;exports.getTransactionBufferCreateInstructionDataEncoder=ci;exports.getTransactionBufferDecoder=Lo;exports.getTransactionBufferDiscriminatorBytes=aR;exports.getTransactionBufferEncoder=nT;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=VU;exports.getTransactionBufferExecuteCompressedInstruction=Pi;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=HU;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Mi;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Di;exports.getTransactionBufferExecuteDiscriminatorBytes=vU;exports.getTransactionBufferExecuteInstruction=xi;exports.getTransactionBufferExecuteInstructionDataCodec=UU;exports.getTransactionBufferExecuteInstructionDataDecoder=Si;exports.getTransactionBufferExecuteInstructionDataEncoder=fi;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=rW;exports.getTransactionBufferExtendCompressedInstruction=Ni;exports.getTransactionBufferExtendCompressedInstructionDataCodec=nW;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Bi;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Oi;exports.getTransactionBufferExtendDiscriminatorBytes=JU;exports.getTransactionBufferExtendInstruction=Ui;exports.getTransactionBufferExtendInstructionDataCodec=YU;exports.getTransactionBufferExtendInstructionDataDecoder=vi;exports.getTransactionBufferExtendInstructionDataEncoder=_i;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=xW;exports.getTransactionBufferVoteCompressedInstruction=Zi;exports.getTransactionBufferVoteCompressedInstructionDataCodec=IW;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Yi;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Ji;exports.getTransactionBufferVoteDiscriminatorBytes=AW;exports.getTransactionBufferVoteInstruction=zi;exports.getTransactionBufferVoteInstructionDataCodec=gW;exports.getTransactionBufferVoteInstructionDataDecoder=Gi;exports.getTransactionBufferVoteInstructionDataEncoder=Fi;exports.getTransactionExecuteCompressedDiscriminatorBytes=OW;exports.getTransactionExecuteCompressedInstruction=id;exports.getTransactionExecuteCompressedInstructionDataCodec=BW;exports.getTransactionExecuteCompressedInstructionDataDecoder=ad;exports.getTransactionExecuteCompressedInstructionDataEncoder=cd;exports.getTransactionExecuteDiscriminatorBytes=RW;exports.getTransactionExecuteInstruction=rd;exports.getTransactionExecuteInstructionDataCodec=bW;exports.getTransactionExecuteInstructionDataDecoder=td;exports.getTransactionExecuteInstructionDataEncoder=ed;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=eL;exports.getTransactionExecuteSyncCompressedInstruction=xd;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=tL;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Sd;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=fd;exports.getTransactionExecuteSyncDiscriminatorBytes=KW;exports.getTransactionExecuteSyncInstruction=md;exports.getTransactionExecuteSyncInstructionDataCodec=jW;exports.getTransactionExecuteSyncInstructionDataDecoder=pd;exports.getTransactionExecuteSyncInstructionDataEncoder=gd;exports.getTransactionMessageAddressTableLookupCodec=VP;exports.getTransactionMessageAddressTableLookupDecoder=Mn;exports.getTransactionMessageAddressTableLookupEncoder=Dn;exports.getTransactionMessageCodec=BP;exports.getTransactionMessageDecoder=jt;exports.getTransactionMessageEncoder=Kt;exports.getUserAccountAddress=k;exports.getUserCodec=zP;exports.getUserCreationArgsCodec=JP;exports.getUserCreationArgsDecoder=Se;exports.getUserCreationArgsEncoder=fe;exports.getUserDecoder=X;exports.getUserEncoder=qe;exports.getUserMutArgsCodec=QP;exports.getUserMutArgsDecoder=Ye;exports.getUserMutArgsEncoder=Je;exports.getUserReadOnlyArgsCodec=rh;exports.getUserReadOnlyArgsDecoder=Re;exports.getUserReadOnlyArgsEncoder=he;exports.getUserReadOnlyOrMutateArgsCodec=ch;exports.getUserReadOnlyOrMutateArgsDecoder=Cn;exports.getUserReadOnlyOrMutateArgsEncoder=In;exports.getUserRoleCodec=Ah;exports.getUserRoleDecoder=je;exports.getUserRoleEncoder=Ke;exports.getWalletAddressFromIndex=_O;exports.getWalletAddressFromSettings=_e;exports.getWhitelistedAddressTreeCodec=pR;exports.getWhitelistedAddressTreeDecoder=Vo;exports.getWhitelistedAddressTreeDiscriminatorBytes=gR;exports.getWhitelistedAddressTreeEncoder=ET;exports.getWhitelistedAddressTreeFromIndex=cs;exports.getWhitelistedAddressTreeIndexFromAddress=fO;exports.getWhitelistedAddressTreesAddress=Fd;exports.identifyMultiWalletAccount=VL;exports.identifyMultiWalletInstruction=HL;exports.initialize=Hk;exports.isConfigAction=aM;exports.isMultiWalletError=JL;exports.isUserReadOnlyOrMutateArgs=ih;exports.migrateSettings=wN;exports.migrateUsers=jN;exports.nativeTransferIntent=Uw;exports.parseAddWhitelistedAddressTreesInstruction=LR;exports.parseChangeConfigCompressedInstruction=$R;exports.parseChangeConfigInstruction=zR;exports.parseCreateCompressedWalletInstruction=db;exports.parseCreateDomainConfigInstruction=Sb;exports.parseCreateDomainUserAccountInstruction=bb;exports.parseCreateGlobalCounterInstruction=Nb;exports.parseCreateUserAccountsInstruction=Jb;exports.parseDecompressSettingsAccountInstruction=n_;exports.parseDisableDomainConfigInstruction=A_;exports.parseEditDomainConfigInstruction=I_;exports.parseEditTransactionManagerUrlInstruction=__;exports.parseEditUserDelegateInstruction=w_;exports.parseMigrateCompressedSettingsInstruction=J_;exports.parseMigrateCompressedUsersInstruction=nv;exports.parseNativeTransferIntentCompressedInstruction=Cv;exports.parseNativeTransferIntentInstruction=pv;exports.parseSecp256r1VerifyInstruction=iw;exports.parseTokenTransferIntentCompressedInstruction=Fv;exports.parseTokenTransferIntentInstruction=Uv;exports.parseTransactionBufferCloseCompressedInstruction=cU;exports.parseTransactionBufferCloseInstruction=Xv;exports.parseTransactionBufferCreateCompressedInstruction=DU;exports.parseTransactionBufferCreateInstruction=TU;exports.parseTransactionBufferExecuteCompressedInstruction=FU;exports.parseTransactionBufferExecuteInstruction=WU;exports.parseTransactionBufferExtendCompressedInstruction=sW;exports.parseTransactionBufferExtendInstruction=ZU;exports.parseTransactionBufferVoteCompressedInstruction=CW;exports.parseTransactionBufferVoteInstruction=pW;exports.parseTransactionExecuteCompressedInstruction=NW;exports.parseTransactionExecuteInstruction=_W;exports.parseTransactionExecuteSyncCompressedInstruction=rL;exports.parseTransactionExecuteSyncInstruction=qW;exports.pollJitoBundleConfirmation=PB;exports.prepareChangeConfigArgs=$5;exports.prepareTransactionBundle=a6;exports.prepareTransactionMessage=x6;exports.prepareTransactionSync=M6;exports.retrieveTransactionManager=YB;exports.sendJitoBundle=pE;exports.serializeConfigActions=XB;exports.signAndSendBundledTransactions=MB;exports.signAndSendTransaction=WB;exports.tokenTransferIntent=Kw;exports.userReadOnlyOrMutateArgs=ah;exports.vaultTransactionMessageDeserialize=bd;exports.vaultTransactionMessageSerialize=Rd;exports.voteTransactionBuffer=bu;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var gill=require('gill'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),f=require('zod'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var f__default=/*#__PURE__*/_interopDefault(f);var Qr=1644,Ar=2e5,fo=1.1,So=30,xo=3e3,ke=3,Le=500,gr=2,pr=3e4,$r=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Io="https://mainnet.block-engine.jito.wtf/api/v1",Co="https://bundles.jito.wtf/api/v1/bundles/tip_floor",Eo="landed_tips_75th_percentile",Do=255,Po=400,Mo=429,en=500;var Ee=class extends Error{constructor(r,s,t){super(r);this.code=s;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},Oe=class extends Ee{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},ne=class extends Ee{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},z=class extends Ee{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},De=class extends Ee{constructor(r,s,t){super(r,"NETWORK_ERROR",{statusCode:s,url:t});this.statusCode=s;this.url=t;}},ho=class extends Ee{constructor(r,s,t){super(r,"TRANSACTION_ERROR",{signature:s,logs:t});this.signature=s;this.logs=t;}},ye=class extends Ee{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},mr=class extends Ee{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},yr=class extends Ee{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var Ro=new Uint8Array([201,232,212,229,59,241,106,197]);function HM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ro)}function lg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["numOrigins",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),515)]]),e=>({...e,discriminator:Ro}))}function bo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["authority",gill.getAddressDecoder()],["rpIdHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["bump",gill.getU8Decoder()],["isDisabled",gill.getU8Decoder()],["rpIdLength",gill.getU8Decoder()],["numOrigins",gill.getU8Decoder()],["rpId",gill.fixDecoderSize(gill.getBytesDecoder(),255)],["origins",gill.fixDecoderSize(gill.getBytesDecoder(),515)]])}function FM(){return gill.combineCodec(lg(),bo())}function _o(e){return gill.decodeAccount(e,bo())}async function vo(e,n,r){let s=await fg(e,n,r);return gill.assertAccountExists(s),s}async function fg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return _o(s)}async function GM(e,n,r){let s=await Sg(e,n,r);return gill.assertAccountsExist(s),s}async function Sg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>_o(t))}function zM(){return 846}var ko=new Uint8Array([42,206,176,58,175,129,130,233]);function JM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ko)}function Wg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:ko}))}function Lo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function qM(){return gill.combineCodec(Wg(),Lo())}function Oo(e){return gill.decodeAccount(e,Lo())}async function YM(e,n,r){let s=await kg(e,n,r);return gill.assertAccountExists(s),s}async function kg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Oo(s)}async function ZM(e,n,r){let s=await Lg(e,n,r);return gill.assertAccountsExist(s),s}async function Lg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Oo(t))}function XM(){return 24}function tn(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function rn(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function eh(){return gill.combineCodec(tn(),rn())}function nn(){return gill.getStructEncoder([["memberKey",se()],["permissions",He()],["userReadonlyArgs",Re()]])}function sn(){return gill.getStructDecoder([["memberKey",oe()],["permissions",Fe()],["userReadonlyArgs",be()]])}function sh(){return gill.combineCodec(nn(),sn())}function on(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function cn(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function ah(){return gill.combineCodec(on(),cn())}function Ct(){return gill.getStructEncoder([["treeInfo",Dt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function Et(){return gill.getStructDecoder([["treeInfo",Pt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function Ah(){return gill.combineCodec(Ct(),Et())}function Mt(){return gill.getStructEncoder([["treeInfo",Dt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function ht(){return gill.getStructDecoder([["treeInfo",Pt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function yh(){return gill.combineCodec(Mt(),ht())}function an(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function dn(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function fh(){return gill.combineCodec(an(),dn())}function mn(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function yn(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function Ih(){return gill.combineCodec(mn(),yn())}function Rt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(bt())]])}function Z(){return gill.getStructDecoder([["data",gill.getOptionDecoder(_t())]])}function Ph(){return gill.combineCodec(Rt(),Z())}function bt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(vt())],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function _t(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(Ut())],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function bh(){return gill.combineCodec(bt(),_t())}function Wt(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",ln()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(Tn()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function kt(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",fn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Lt()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function Wh(){return gill.combineCodec(Wt(),kt())}function In(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",En()]])}function Cn(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Dn()]])}function Bh(){return gill.combineCodec(In(),Cn())}function En(){return gill.getStructEncoder([["configAccountVersion",gill.getU16Encoder()],["compressToPubkey",gill.getU8Encoder()],["accountVersion",gill.getU8Encoder()],["lamportsPerWrite",gill.getU32Encoder()],["compressionAuthority",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["rentSponsor",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["lastClaimedSlot",gill.getU64Encoder()],["rentExemptionPaid",gill.getU32Encoder()],["reserved",gill.getU32Encoder()],["rentConfig",hn()]])}function Dn(){return gill.getStructDecoder([["configAccountVersion",gill.getU16Decoder()],["compressToPubkey",gill.getU8Decoder()],["accountVersion",gill.getU8Decoder()],["lamportsPerWrite",gill.getU32Decoder()],["compressionAuthority",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["rentSponsor",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["lastClaimedSlot",gill.getU64Decoder()],["rentExemptionPaid",gill.getU32Decoder()],["reserved",gill.getU32Decoder()],["rentConfig",Rn()]])}function Hh(){return gill.combineCodec(En(),Dn())}function Ge(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(vn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(nn())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Wn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function ze(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Un())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(sn())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(kn())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function Kh(){return gill.combineCodec(Ge(),ze())}function jh(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function Jh(e,n){return n.__kind===e}function Ln(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ke()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",xe()]])}function On(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",je()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Ie()]])}function Xh(){return gill.combineCodec(Ln(),On())}function vn(){return gill.getStructEncoder([["memberKey",se()],["permissions",He()]])}function Un(){return gill.getStructDecoder([["memberKey",oe()],["permissions",Fe()]])}function tR(){return gill.combineCodec(vn(),Un())}function Ot(){return gill.getStructEncoder([["memberKey",se()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Bt(){return gill.getStructDecoder([["memberKey",oe()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function oR(){return gill.combineCodec(Ot(),Bt())}function Tn(){return gill.getDiscriminatedUnionEncoder([["Placeholder0",gill.getUnitEncoder()],["Placeholder1",gill.getUnitEncoder()],["Placeholder2",gill.getUnitEncoder()],["Placeholder3",gill.getUnitEncoder()],["Placeholder4",gill.getUnitEncoder()],["Placeholder5",gill.getUnitEncoder()],["Placeholder6",gill.getUnitEncoder()],["Placeholder7",gill.getUnitEncoder()],["Placeholder8",gill.getUnitEncoder()],["Placeholder9",gill.getUnitEncoder()],["Placeholder10",gill.getUnitEncoder()],["Placeholder11",gill.getUnitEncoder()],["Placeholder12",gill.getUnitEncoder()],["Placeholder13",gill.getUnitEncoder()],["Placeholder14",gill.getUnitEncoder()],["Placeholder15",gill.getUnitEncoder()],["Placeholder16",gill.getUnitEncoder()],["Placeholder17",gill.getUnitEncoder()],["Placeholder18",gill.getUnitEncoder()],["TokenMetadata",gill.getStructEncoder([["fields",gill.getTupleEncoder([Hn()])]])],["Placeholder20",gill.getUnitEncoder()],["Placeholder21",gill.getUnitEncoder()],["Placeholder22",gill.getUnitEncoder()],["Placeholder23",gill.getUnitEncoder()],["Placeholder24",gill.getUnitEncoder()],["Placeholder25",gill.getUnitEncoder()],["Placeholder26",gill.getUnitEncoder()],["PausableAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Bn()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([wn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Gn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Kn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([an()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([In()])]])]])}function Lt(){return gill.getDiscriminatedUnionDecoder([["Placeholder0",gill.getUnitDecoder()],["Placeholder1",gill.getUnitDecoder()],["Placeholder2",gill.getUnitDecoder()],["Placeholder3",gill.getUnitDecoder()],["Placeholder4",gill.getUnitDecoder()],["Placeholder5",gill.getUnitDecoder()],["Placeholder6",gill.getUnitDecoder()],["Placeholder7",gill.getUnitDecoder()],["Placeholder8",gill.getUnitDecoder()],["Placeholder9",gill.getUnitDecoder()],["Placeholder10",gill.getUnitDecoder()],["Placeholder11",gill.getUnitDecoder()],["Placeholder12",gill.getUnitDecoder()],["Placeholder13",gill.getUnitDecoder()],["Placeholder14",gill.getUnitDecoder()],["Placeholder15",gill.getUnitDecoder()],["Placeholder16",gill.getUnitDecoder()],["Placeholder17",gill.getUnitDecoder()],["Placeholder18",gill.getUnitDecoder()],["TokenMetadata",gill.getStructDecoder([["fields",gill.getTupleDecoder([Fn()])]])],["Placeholder20",gill.getUnitDecoder()],["Placeholder21",gill.getUnitDecoder()],["Placeholder22",gill.getUnitDecoder()],["Placeholder23",gill.getUnitDecoder()],["Placeholder24",gill.getUnitDecoder()],["Placeholder25",gill.getUnitDecoder()],["Placeholder26",gill.getUnitDecoder()],["PausableAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Nn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Vn()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([zn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([jn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([dn()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([Cn()])]])]])}function dR(){return gill.combineCodec(Tn(),Lt())}function uR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function AR(e,n){return n.__kind===e}function Jn(){return gill.getStructEncoder([["settingsMutArgs",K()],["transactionManager",gill.getOptionEncoder(Re())]])}function qn(){return gill.getStructDecoder([["settingsMutArgs",j()],["transactionManager",gill.getOptionDecoder(be())]])}function yR(){return gill.combineCodec(Jn(),qn())}function vt(){return gill.getStructEncoder([["pubkey",se()],["permissions",He()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function Ut(){return gill.getStructDecoder([["pubkey",oe()],["permissions",Fe()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function SR(){return gill.combineCodec(vt(),Ut())}function se(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function oe(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function CR(){return gill.combineCodec(se(),oe())}function Xn(){return gill.getStructEncoder([["authorityCreationArgs",xe()],["compressedProofArgs",E()]])}function Qn(){return gill.getStructDecoder([["authorityCreationArgs",Ie()],["compressedProofArgs",D()]])}function MR(){return gill.combineCodec(Xn(),Qn())}function Nt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function wt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function bR(){return gill.combineCodec(Nt(),wt())}function ln(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function fn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function UR(){return gill.combineCodec(ln(),fn())}function Dt(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function Pt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function LR(){return gill.combineCodec(Dt(),Pt())}function Bn(){return gill.getStructEncoder([])}function Nn(){return gill.getStructDecoder([])}function NR(){return gill.combineCodec(Bn(),Nn())}function wn(){return gill.getStructEncoder([])}function Vn(){return gill.getStructDecoder([])}function HR(){return gill.combineCodec(wn(),Vn())}function He(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Fe(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function zR(){return gill.combineCodec(He(),Fe())}function E(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(mn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function D(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(yn())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function qR(){return gill.combineCodec(E(),D())}function Wn(){return gill.getStructEncoder([["memberKey",se()],["userArgs",$n()]])}function kn(){return gill.getStructDecoder([["memberKey",oe()],["userArgs",es()]])}function QR(){return gill.combineCodec(Wn(),kn())}function hn(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function Rn(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function tb(){return gill.combineCodec(hn(),Rn())}function ns(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Vt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function sb(){return gill.combineCodec(ns(),Vt())}function H(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function F(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function ab(){return gill.combineCodec(H(),F())}function X(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",H()]])}function Q(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",F()]])}function Ab(){return gill.combineCodec(X(),Q())}function Ht(){return gill.getStructEncoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ft(){return gill.getStructDecoder([["addressTreeInfo",wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function yb(){return gill.combineCodec(Ht(),Ft())}function Gt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function zt(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function fb(){return gill.combineCodec(Gt(),zt())}function K(){return gill.getStructEncoder([["accountMeta",Ct()],["data",Rt()]])}function j(){return gill.getStructDecoder([["accountMeta",Et()],["data",Z()]])}function Cb(){return gill.combineCodec(K(),j())}function Kt(){return gill.getStructEncoder([["accountMeta",Mt()],["data",Rt()]])}function jt(){return gill.getStructDecoder([["accountMeta",ht()],["data",Z()]])}function Mb(){return gill.combineCodec(Kt(),jt())}function Jt(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function qt(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function bb(){return gill.combineCodec(Jt(),qt())}function Hn(){return gill.getStructEncoder([["updateAuthority",gill.getAddressEncoder()],["mint",gill.getAddressEncoder()],["name",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["symbol",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["uri",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["additionalMetadata",gill.getArrayEncoder(tn())]])}function Fn(){return gill.getStructDecoder([["updateAuthority",gill.getAddressDecoder()],["mint",gill.getAddressDecoder()],["name",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["symbol",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["uri",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["additionalMetadata",gill.getArrayDecoder(rn())]])}function Wb(){return gill.combineCodec(Hn(),Fn())}function Yt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSecp256r1Signers",gill.getArrayEncoder(Ot())]])}function Zt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSecp256r1Signers",gill.getArrayDecoder(Bt())]])}function Bb(){return gill.combineCodec(Yt(),Zt())}function Xt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(on())],["addressTableLookups",gill.getArrayEncoder(us())]])}function Qt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(cn())],["addressTableLookups",gill.getArrayDecoder(As())]])}function Hb(){return gill.combineCodec(Xt(),Qt())}function us(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function As(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function zb(){return gill.combineCodec(us(),As())}function Gn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function zn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function Jb(){return gill.combineCodec(Gn(),zn())}function Kn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function jn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function Zb(){return gill.combineCodec(Kn(),jn())}function Xe(){return gill.getStructEncoder([["member",se()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",Ke()],["delegatedTo",gill.getOptionEncoder(Gt())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function $(){return gill.getStructDecoder([["member",oe()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",je()],["delegatedTo",gill.getOptionDecoder(zt())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function e_(){return gill.combineCodec(Xe(),$())}function xe(){return gill.getStructEncoder([["addressTreeInfo",Nt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ie(){return gill.getStructDecoder([["addressTreeInfo",wt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function s_(){return gill.combineCodec(xe(),Ie())}function Qe(){return gill.getStructEncoder([["accountMeta",Ct()],["data",Xe()]])}function $e(){return gill.getStructDecoder([["accountMeta",Et()],["data",$()]])}function i_(){return gill.combineCodec(Qe(),$e())}function Re(){return gill.getStructEncoder([["accountMeta",Mt()],["data",Xe()]])}function be(){return gill.getStructDecoder([["accountMeta",ht()],["data",$()]])}function g_(){return gill.combineCodec(Re(),be())}function $n(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Re()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Qe()])]])]])}function es(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([be()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([$e()])]])]])}function T_(){return gill.combineCodec($n(),es())}function l_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function f_(e,n){return n.__kind===e}var it=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(it||{});function Ke(){return gill.getEnumEncoder(it)}function je(){return gill.getEnumDecoder(it)}function I_(){return gill.combineCodec(Ke(),je())}var wc=new Uint8Array([223,179,163,190,177,224,67,173]);function Cv(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(wc)}function Al(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(vt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:wc}))}function Vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Ut())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function Ev(){return gill.combineCodec(Al(),Vc())}function Hc(e){return gill.decodeAccount(e,Vc())}async function Dv(e,n,r){let s=await ms(e,n,r);return gill.assertAccountExists(s),s}async function ms(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Hc(s)}async function Pv(e,n,r){let s=await gl(e,n,r);return gill.assertAccountsExist(s),s}async function gl(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Hc(t))}var jc=new Uint8Array([90,36,35,219,93,225,110,96]);function bv(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(jc)}function _l(){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",se()],["executor",se()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(se())],["expectedSecp256r1Signers",gill.getArrayEncoder(Ot())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:jc}))}function Jc(){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",oe()],["executor",oe()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(oe())],["expectedSecp256r1Signers",gill.getArrayDecoder(Bt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function _v(){return gill.combineCodec(_l(),Jc())}function qc(e){return gill.decodeAccount(e,Jc())}async function Yc(e,n,r){let s=await vl(e,n,r);return gill.assertAccountExists(s),s}async function vl(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return qc(s)}async function vv(e,n,r){let s=await Ul(e,n,r);return gill.assertAccountsExist(s),s}async function Ul(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>qc(t))}var Qc=new Uint8Array([105,23,173,2,197,255,80,87]);function kv(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Qc)}function Zl(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Qc}))}function $c(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function Lv(){return gill.combineCodec(Zl(),$c())}function ea(e){return gill.decodeAccount(e,$c())}async function ta(e,n,r){let s=await Xl(e,n,r);return gill.assertAccountExists(s),s}async function Xl(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ea(s)}async function Ov(e,n,r){let s=await Ql(e,n,r);return gill.assertAccountsExist(s),s}async function Ql(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ea(t))}function m({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function na(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function O(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function y(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:O(r.value),role:ra(r.value)?gill.upgradeRoleToSigner(s):s,...ra(r.value)?{signer:r.value}:{}})}}function ra(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var oa=new Uint8Array([8]);function $v(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oa)}function Cs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:oa}))}function ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function eU(){return gill.combineCodec(Cs(),ca())}async function aa(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Cs().encode(c),programAddress:r})}function tU(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...i],data:Cs().encode(c),programAddress:r})}function rU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:ca().decode(e.data)}}var ga=new Uint8Array([9]);function dU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ga)}function Ds(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(X())],["compressedProofArgs",gill.getOptionEncoder(E())]]),e=>({...e,discriminator:ga}))}function pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())],["compressedProofArgs",gill.getOptionDecoder(D())]])}function uU(){return gill.combineCodec(Ds(),pa())}async function ma(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.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(na(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=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ds().encode(c),programAddress:r})}function AU(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ds().encode(c),programAddress:r})}function gU(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:pa().decode(e.data)}}var Sa=new Uint8Array([19]);function SU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sa)}function xa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ge())],["secp256r1VerifyArgs",gill.getArrayEncoder(X())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Sa}))}function Ia(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ze())],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function xU(){return gill.combineCodec(xa(),Ia())}function Ca(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:xa().encode(c),programAddress:r})}function IU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ia().decode(e.data)}}var Pa=new Uint8Array([18]);function RU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pa)}function Ps(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["settingsCreation",Ht()],["userReadonlyArgs",Re()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Pa}))}function Ma(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["settingsCreation",Ft()],["userReadonlyArgs",be()],["settingsIndex",gill.getU128Decoder()]])}function bU(){return gill.combineCodec(Ps(),Ma())}async function ha(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:Ps().encode(c),programAddress:r})}function _U(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...i],data:Ps().encode(c),programAddress:r})}function vU(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:Ma().decode(e.data)}}var La=new Uint8Array([0]);function NU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(La)}function hs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",xe()],["compressedProofArgs",E()]]),e=>({...e,discriminator:La}))}function Oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",Ie()],["compressedProofArgs",D()]])}function wU(){return gill.combineCodec(hs(),Oa())}async function Ba(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:hs().encode(c),programAddress:r})}function VU(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:hs().encode(c),programAddress:r})}function HU(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Oa().decode(e.data)}}var wa=new Uint8Array([4]);function qU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wa)}function bs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["member",ns()],["role",Ke()],["userAccountCreationArgs",xe()],["linkWalletArgs",gill.getOptionEncoder(Jn())]]),e=>({...e,discriminator:wa}))}function Va(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["member",Vt()],["role",je()],["userAccountCreationArgs",Ie()],["linkWalletArgs",gill.getOptionDecoder(qn())]])}function YU(){return gill.combineCodec(bs(),Va())}async function Ha(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:bs().encode(c),programAddress:r})}function ZU(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...i],data:bs().encode(c),programAddress:r})}function XU(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:Va().decode(e.data)}}var Ga=new Uint8Array([3]);function nW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function vs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ga}))}function za(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function sW(){return gill.combineCodec(vs(),za())}async function Ka(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(c),i=y(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:vs().encode({}),programAddress:r})}function oW(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(c),i=y(r);return Object.freeze({accounts:[i(t.globalCounter),i(t.payer),i(t.systemProgram),...a],data:vs().encode({}),programAddress:r})}function cW(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:za().decode(e.data)}}var Ja=new Uint8Array([5]);function pW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function Ws(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayEncoder(Ln())]]),e=>({...e,discriminator:Ja}))}function qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayDecoder(On())]])}function mW(){return gill.combineCodec(Ws(),qa())}async function Ya(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:Ws().encode(c),programAddress:r})}function yW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...i],data:Ws().encode(c),programAddress:r})}function TW(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:qa().decode(e.data)}}var Qa=new Uint8Array([17]);function EW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qa)}function $a(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",K()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayEncoder(X())]]),e=>({...e,discriminator:Qa}))}function ei(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",j()],["compressedProofArgs",D()],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())]])}function DW(){return gill.combineCodec($a(),ei())}function ti(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:$a().encode(c),programAddress:r})}function PW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ei().decode(e.data)}}var si=new Uint8Array([2]);function vW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(si)}function oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:si}))}function ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function UW(){return gill.combineCodec(oi(),ci())}function ai(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...i],data:oi().encode(c),programAddress:r})}function WW(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:ci().decode(e.data)}}var Ai=new Uint8Array([1]);function VW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ai)}function Ls(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder(Xn())]]),e=>({...e,discriminator:Ai}))}function gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Qn())]])}function HW(){return gill.combineCodec(Ls(),gi())}async function FW(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:Ls().encode(c),programAddress:r})}function pi(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...i],data:Ls().encode(c),programAddress:r})}function GW(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:gi().decode(e.data)}}var Ti=new Uint8Array([6]);function ZW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ti)}function li(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Qe()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ti}))}function fi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",$e()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",D()]])}function XW(){return gill.combineCodec(li(),fi())}function Si(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.authority),...i],data:li().encode(c),programAddress:r})}function QW(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:fi().decode(e.data)}}var Ci=new Uint8Array([7]);function ok(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ci)}function Ei(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Qe()],["secp256r1VerifyArgs",gill.getOptionEncoder(H())],["delegateTo",gill.getOptionEncoder(Gt())],["oldSettingsMutArgs",gill.getOptionEncoder(K())],["newSettingsMutArgs",gill.getOptionEncoder(K())],["compressedProofArgs",E()]]),e=>({...e,discriminator:Ci}))}function Di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",$e()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["delegateTo",gill.getOptionDecoder(zt())],["oldSettingsMutArgs",gill.getOptionDecoder(j())],["newSettingsMutArgs",gill.getOptionDecoder(j())],["compressedProofArgs",D()]])}function ck(){return gill.combineCodec(Ei(),Di())}function Pi(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...i],data:Ei().encode(c),programAddress:r})}function ak(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:Di().decode(e.data)}}var Ri=new Uint8Array([32]);function mk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ri)}function bi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",bt()],["compressedProofArgs",E()],["settingsCreationArgs",Ht()]]),e=>({...e,discriminator:Ri}))}function _i(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",_t()],["compressedProofArgs",D()],["settingsCreationArgs",Ft()]])}function yk(){return gill.combineCodec(bi(),_i())}function vi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.authority),...i],data:bi().encode(c),programAddress:r})}function Tk(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:_i().decode(e.data)}}var ki=new Uint8Array([31]);function Ek(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ki)}function Li(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Xe()],["compressedProofArgs",E()],["userCreationArgs",xe()]]),e=>({...e,discriminator:ki}))}function Oi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",$()],["compressedProofArgs",D()],["userCreationArgs",Ie()]])}function Dk(){return gill.combineCodec(Li(),Oi())}function Bi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.authority),...i],data:Li().encode(c),programAddress:r})}function Pk(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:Oi().decode(e.data)}}var wi=new Uint8Array([29]);function Uk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wi)}function Os(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(X())]]),e=>({...e,discriminator:wi}))}function Vi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())]])}function Wk(){return gill.combineCodec(Os(),Vi())}async function kk(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:Os().encode(c),programAddress:r})}function Hi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:Os().encode(c),programAddress:r})}function Lk(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Vi().decode(e.data)}}var zi=new Uint8Array([27]);function Fk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zi)}function Ki(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(X())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:zi}))}function ji(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function Gk(){return gill.combineCodec(Ki(),ji())}function Ji(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...i],data:Ki().encode(c),programAddress:r})}function zk(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:ji().decode(e.data)}}var Xi=new Uint8Array([30]);function Xk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xi)}function ws(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Jt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(Wt()))],["compressedProofArgs",gill.getOptionEncoder(E())],["secp256r1VerifyArgs",gill.getArrayEncoder(X())]]),e=>({...e,discriminator:Xi}))}function Qi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(qt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(kt()))],["compressedProofArgs",gill.getOptionDecoder(D())],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())]])}function Qk(){return gill.combineCodec(ws(),Qi())}async function $k(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:ws().encode(c),programAddress:r})}function $i(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:ws().encode(c),programAddress:r})}function eL(e){if(e.accounts.length<18)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:Qi().decode(e.data)}}var od=new Uint8Array([28]);function aL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(od)}function Vs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Jt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getOptionEncoder(gill.getArrayEncoder(Wt()))],["secp256r1VerifyArgs",gill.getArrayEncoder(X())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:od}))}function cd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(qt())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getOptionDecoder(gill.getArrayDecoder(kt()))],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function iL(){return gill.combineCodec(Vs(),cd())}async function dL(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Vs().encode(c),programAddress:r})}function ad(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...i],data:Vs().encode(c),programAddress:r})}function uL(e){if(e.accounts.length<17)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:cd().decode(e.data)}}var ud=new Uint8Array([13]);function lL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ud)}function Ad(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())]]),e=>({...e,discriminator:ud}))}function gd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function fL(){return gill.combineCodec(Ad(),gd())}function pd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ad().encode(c),programAddress:r})}function SL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:gd().decode(e.data)}}var Td=new Uint8Array([23]);function ML(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Td)}function ld(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Td}))}function fd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function hL(){return gill.combineCodec(ld(),fd())}function Sd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ld().encode(c),programAddress:r})}function RL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:fd().decode(e.data)}}var Cd=new Uint8Array([10]);function LL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Cd)}function Ed(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Yt()],["secp256r1VerifyArgs",gill.getOptionEncoder(H())]]),e=>({...e,discriminator:Cd}))}function Dd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function OL(){return gill.combineCodec(Ed(),Dd())}function Pd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...i],data:Ed().encode(c),programAddress:r})}function BL(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Dd().decode(e.data)}}var Rd=new Uint8Array([20]);function zL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Rd)}function bd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Yt()],["secp256r1VerifyArgs",gill.getOptionEncoder(H())],["settingsReadonlyArgs",Kt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Rd}))}function _d(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsReadonlyArgs",jt()],["compressedProofArgs",D()]])}function KL(){return gill.combineCodec(bd(),_d())}function vd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...i],data:bd().encode(c),programAddress:r})}function jL(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:_d().decode(e.data)}}var kd=new Uint8Array([14]);function $L(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(kd)}function Ld(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())]]),e=>({...e,discriminator:kd}))}function Od(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function eO(){return gill.combineCodec(Ld(),Od())}function Bd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Ld().encode(c),programAddress:r})}function tO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Od().decode(e.data)}}var Vd=new Uint8Array([24]);function iO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vd)}function Hd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:Vd}))}function Fd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function dO(){return gill.combineCodec(Hd(),Fd())}function Gd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Hd().encode(c),programAddress:r})}function uO(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Fd().decode(e.data)}}var jd=new Uint8Array([12]);function TO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(jd)}function Jd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:jd}))}function qd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function lO(){return gill.combineCodec(Jd(),qd())}function Yd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...i],data:Jd().encode(c),programAddress:r})}function fO(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:qd().decode(e.data)}}var Qd=new Uint8Array([22]);function DO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qd)}function $d(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Qd}))}function eu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function PO(){return gill.combineCodec($d(),eu())}function tu(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.transactionBuffer),...i],data:$d().encode(c),programAddress:r})}function MO(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:eu().decode(e.data)}}var su=new Uint8Array([11]);function WO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(su)}function ou(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())]]),e=>({...e,discriminator:su}))}function cu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())]])}function kO(){return gill.combineCodec(ou(),cu())}function au(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:ou().encode(c),programAddress:r})}function LO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:cu().decode(e.data)}}var uu=new Uint8Array([21]);function FO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(uu)}function Au(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(H())],["settingsReadonlyArgs",Kt()],["compressedProofArgs",E()]]),e=>({...e,discriminator:uu}))}function gu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(F())],["settingsReadonlyArgs",jt()],["compressedProofArgs",D()]])}function GO(){return gill.combineCodec(Au(),gu())}function pu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Au().encode(c),programAddress:r})}function zO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:gu().decode(e.data)}}var Tu=new Uint8Array([15]);function ZO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Tu)}function lu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Tu}))}function fu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function XO(){return gill.combineCodec(lu(),fu())}function Su(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},a=m({}),i=y(r);return Object.freeze({accounts:[i(t.settings),i(t.payer),i(t.transactionBuffer),...a],data:lu().encode({}),programAddress:r})}function QO(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:fu().decode(e.data)}}var Cu=new Uint8Array([25]);function sB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Cu)}function Eu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Cu}))}function Du(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function oB(){return gill.combineCodec(Eu(),Du())}function Pu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},i=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...i],data:Eu().encode(c),programAddress:r})}function cB(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:Du().decode(e.data)}}var Ru=new Uint8Array([16]);function pB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ru)}function bu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Xt()],["secp256r1VerifyArgs",gill.getArrayEncoder(X())]]),e=>({...e,discriminator:Ru}))}function _u(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Qt()],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())]])}function mB(){return gill.combineCodec(bu(),_u())}function vu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:bu().encode(c),programAddress:r})}function yB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:_u().decode(e.data)}}var ku=new Uint8Array([26]);function CB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ku)}function Lu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Xt()],["secp256r1VerifyArgs",gill.getArrayEncoder(X())],["settingsMutArgs",K()],["compressedProofArgs",E()]]),e=>({...e,discriminator:ku}))}function Ou(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Qt()],["secp256r1VerifyArgs",gill.getArrayDecoder(Q())],["settingsMutArgs",j()],["compressedProofArgs",D()]])}function EB(){return gill.combineCodec(Lu(),Ou())}function Bu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},a={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let i=m(a),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...i],data:Lu().encode(c),programAddress:r})}function DB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ou().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",gE=(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))(gE||{});function iN(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 pE=(T=>(T[T.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",T[T.ChangeConfig=1]="ChangeConfig",T[T.ChangeConfigCompressed=2]="ChangeConfigCompressed",T[T.CreateCompressedWallet=3]="CreateCompressedWallet",T[T.CreateDomainConfig=4]="CreateDomainConfig",T[T.CreateDomainUserAccount=5]="CreateDomainUserAccount",T[T.CreateGlobalCounter=6]="CreateGlobalCounter",T[T.CreateUserAccounts=7]="CreateUserAccounts",T[T.DecompressSettingsAccount=8]="DecompressSettingsAccount",T[T.DisableDomainConfig=9]="DisableDomainConfig",T[T.EditDomainConfig=10]="EditDomainConfig",T[T.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",T[T.EditUserDelegate=12]="EditUserDelegate",T[T.MigrateCompressedSettings=13]="MigrateCompressedSettings",T[T.MigrateCompressedUsers=14]="MigrateCompressedUsers",T[T.NativeTransferIntent=15]="NativeTransferIntent",T[T.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",T[T.TokenTransferIntent=17]="TokenTransferIntent",T[T.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",T[T.TransactionBufferClose=19]="TransactionBufferClose",T[T.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",T[T.TransactionBufferCreate=21]="TransactionBufferCreate",T[T.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",T[T.TransactionBufferExecute=23]="TransactionBufferExecute",T[T.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",T[T.TransactionBufferExtend=25]="TransactionBufferExtend",T[T.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",T[T.TransactionBufferVote=27]="TransactionBufferVote",T[T.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",T[T.TransactionExecute=29]="TransactionExecute",T[T.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",T[T.TransactionExecuteSync=31]="TransactionExecuteSync",T[T.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",T))(pE||{});function dN(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var yE=6e3,TE=6001,lE=6002,fE=6003,SE=6004,xE=6005,IE=6006,CE=6007,EE=6008,DE=6009,PE=6010,ME=6011,hE=6012,RE=6013,bE=6014,_E=6015,vE=6016,UE=6017,WE=6018,kE=6019,LE=6020,OE=6021,BE=6022,NE=6023,wE=6024,VE=6025,HE=6026,FE=6027,GE=6028,zE=6029,KE=6030,jE=6031,JE=6032,qE=6033,YE=6034,ZE=6035,XE=6036,QE=6037,$E=6038,eD=6039,tD=6040,rD=6041,nD=6042,sD=6043,oD=6044,cD=6045,aD=6046,iD=6047,dD=6048,uD=6049,AD=6050,gD=6051,pD=6052,mD=6053,yD=6054,TD=6055,lD=6056,fD=6057,SD=6058,xD=6059,ID=6060,CD=6061,ED=6062,DD=6063,PD=6064,MD=6065,hD=6066,RD=6067,bD=6068,_D=6069,vD=6070,UD=6071,WD=6072,kD=6073,LD=6074,OD=6075,BD=6076,ND=6077,wD=6078,VD=6079,HD=6080,FD=6081,GD=6082,Nu;process.env.NODE_ENV!=="production"&&(Nu={[KE]:"This member is already delegated to another wallet.",[CE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[LD]:"Clock sysvar access failed. This may indicate a system error.",[AD]:"The domain configuration account is disabled. Please contact support or try again later.",[gD]:"Missing domain configuration account.",[WD]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[GD]:"Duplicate address tree detected. This address tree is already in the whitelist.",[PE]:"Duplicate public keys detected among members. Each member must have a unique key.",[DE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[LE]:"No members provided. A multisig wallet must contain at least one member.",[fD]:"Slot numbers list is empty. At least one slot number is required for validation.",[WE]:"Expected a User with Administrator role for this instruction.",[EE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[vE]:"Expected a User with Transaction Manager role for this instruction.",[eD]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[tD]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[rD]:"Declared buffer size does not match the actual serialized size.",[lD]:"Failed to compute hash. This may indicate a system error.",[qE]:"Not enough members with vote permission to meet the approval threshold.",[jE]:"At least one signer with execute permission is required to proceed.",[JE]:"At least one signer with initiate permission is required to perform this action.",[VE]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[UD]:"Invalid account index in transaction message. The account index is out of bounds.",[yD]:"Address Tree supplied is not part of the whitelisted address trees.",[kE]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[FE]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[$E]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[SD]:"Member key conversion failed. The provided key format is invalid.",[YE]:"Only delegated members are allowed for this transaction.",[wE]:"Unexpected number of accounts provided for this instruction.",[RE]:"User with Permanent Member role must have a delegated wallet.",[TE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[SE]:"The extracted public key has an invalid length or encoding.",[yE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[fE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[uD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[iD]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[BE]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[bD]:"Invalid source type for token transfer. The source account type is not supported.",[UE]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[_E]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[NE]:"Malformed transaction message: structure or formatting does not match the expected layout.",[HE]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[BD]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[RD]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[xE]:"The extracted WebAuthn signed message payload is malformed.",[cD]:"An input string exceeds the maximum allowed character length.",[pD]:"This member is not registered under the provided domain configuration.",[CD]:"Member not found in settings. Cannot remove a member that does not exist.",[vD]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[GE]:"A required account is missing from the instruction context.",[xD]:"Compressed proof arguments are missing. Required for compressed account operations.",[PD]:"Missing compressed token account. Required for token transfer operations.",[ND]:"Missing destination token account. Required for token transfer operations.",[hD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[ID]:"Light CPI accounts are missing. Required for compressed account operations.",[zE]:"User mutation arguments are required when performing add or remove delegate operations.",[HD]:"Missing new authority account. Required for domain configuration updates.",[VD]:"Missing settings account. Required for delegate operations on compressed wallets.",[TD]:"Compressed settings data is missing. The settings account must be initialized with data.",[wD]:"Missing source token account. Required for token transfer operations.",[MD]:"Missing SPL interface PDA. Required for token transfer operations.",[aD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[kD]:"User account address is missing. Required for secp256r1 signature verification.",[FD]:"Missing whitelisted address trees account. Required for domain configuration updates.",[XE]:"No valid signer found in this transaction.",[hE]:"Only one permanent member is allowed per wallet.",[bE]:"Only one transaction manager is allowed per wallet.",[mD]:"The given origin index is not in the whitelisted origins.",[DD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[ME]:"Permanent members cannot be removed from a wallet.",[oD]:"Writable CPI calls to protected accounts are not permitted.",[IE]:"The rpIdHash extracted from the signed message does not match the expected value.",[ED]:"Settings key mismatch. The provided settings key does not match the expected value.",[lE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[dD]:"The specified slot number was not found in the provided slot history.",[_D]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[OE]:"Too many members: a maximum of 4 members are supported.",[nD]:"This transaction has expired. It must be executed within 3 minutes of approval.",[sD]:"This transaction has not yet reached the required approval threshold.",[QE]:"Only the transaction creator or rent payer may close this transaction buffer.",[OD]:"Unauthorized: Only the admin account is allowed to perform this action.",[ZE]:"Member is not part of the expected signers for this transaction."});function yN(e){return process.env.NODE_ENV!=="production"?Nu[e]:"Error message not available in production bundles."}function TN(e,n,r){return gill.isProgramError(e,n,A,r)}async function hN({admin:e,addressTree:n}){return aa({payer:e,addressTree:n,remainingAccounts:[]})}var tr={Ed25519:1,Secp256r1:2};var wu=f__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),WN=f__default.default.object({transactionActionType:wu,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.array(f__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),Vu=f__default.default.object({transactionActionType:wu,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.string()}).strict(),Hu=f__default.default.object({authResponse:f__default.default.custom(),nonce:f__default.default.string(),clientSignature:f__default.default.object({clientOrigin:f__default.default.string(),signature:f__default.default.string()}).strict(),deviceSignature:f__default.default.object({publicKey:f__default.default.string(),signature:f__default.default.string()}).strict(),authProviderSignature:f__default.default.object({publicKey:f__default.default.string(),signature:f__default.default.string()}).strict().optional()}).strict(),Fu=f__default.default.object({signer:f__default.default.string(),userAddressTreeIndex:f__default.default.number().optional(),additionalInfo:f__default.default.looseObject({}).optional()}).strict(),zD=f__default.default.object({transactionPayload:Vu,slotHash:f__default.default.string(),slotNumber:f__default.default.string(),originIndex:f__default.default.number(),crossOrigin:f__default.default.boolean()}).strict(),kN=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("message"),payload:f__default.default.string().optional()}).strict()}).strict(),LN=f__default.default.object({phase:f__default.default.literal("start"),redirectOrigin:f__default.default.url(),signer:f__default.default.string().optional(),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Vu}).strict()}).strict(),ON=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("message"),payload:Fu.extend(Hu.shape).extend({id:f__default.default.string().optional(),message:f__default.default.string(),clientSignature:f__default.default.object({clientOrigin:f__default.default.string()}).strict()})}).strict()}).strict(),BN=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:Fu.extend(Hu.shape).extend(zD.shape).extend({clientSignature:f__default.default.object({clientOrigin:f__default.default.string()}).strict()})}).strict()}).strict();var _e={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Be=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(_e).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Gs=33,Ne=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==Gs)throw new Error(`Invalid public key length, expected ${Gs} bytes but got ${n.length}`)}toBase58(){return gill.getBase58Decoder().decode(this.toBytes())}toTruncatedBuffer(){let n=this.toBuffer();return n.subarray(1,n.length)}toBuffer(){if(!this._bn)throw new Error("Invalid public key input");let n=this._bn;if(n.byteLength===Gs)return n;throw new Error("Invalid public key input")}toBytes(){let n=this.toBuffer();return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}toString(){return this.toBase58()}toJSON(){return this.toBase58()}},P=class extends Ne{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function JD(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function qD(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var zu=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(JD())],["addressTableLookups",gill.getArrayCodec(qD())]]);function Ku(e){return zu.encode({numSigners:e.header.numSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,accountKeys:e.staticAccounts,instructions:e.instructions.map(r=>({programAddressIndex:r.programAddressIndex,accountIndices:r.accountIndices??[],data:Array.from(r.data??[])})),addressTableLookups:e.version!=="legacy"?e.addressTableLookups?.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes,writableIndexes:r.writableIndexes}))??[]:[]})}function ju(e){let n=zu.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}function Ju(e,n,r,s){if(e<n||e>r)throw new z(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function qu(e,n){if(e<0)throw new z(`${n} must be non-negative, got ${e}`)}function rr(e,n){if(e.length===0)throw new z(`${n} cannot be empty`)}function Yu(e,n){if(e.trim().length===0)throw new z(`${n} cannot be empty`)}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var te={};function Zu(){if(!te.solanaRpcEndpoint)throw new Oe("RPC endpoint");return te.solanaRpcEndpoint}function tt(){if(!te.lightProtocolRpc)throw new Oe("Light Protocol RPC");return te.lightProtocolRpc}function ce(){if(!te.solanaRpc)throw new Oe("Solana RPC");return te.solanaRpc}function Xu(){if(!te.sendAndConfirm)throw new Oe("Send and confirm transaction function");return te.sendAndConfirm}function Qu(){if(!te.computeEstimate)throw new Oe("Compute budget estimate function");return te.computeEstimate}function Ks(){return te.jitoTipsConfig?te.jitoTipsConfig:{blockEngineUrl:Io,getJitoTipsUrl:Co,priority:Eo}}function dw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){te.solanaRpcEndpoint=e,te.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});te.solanaRpc=t,te.sendAndConfirm=c,te.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),te.jitoTipsConfig=s??null;}function $u(e){return typeof e=="string"?e:e.toString()}function eA(e){return e.toString()}async function js(e,n,r){let s=e?.get(n);if(s)return s;let t=await r();return t&&e&&e.set(n,t),t}var eP={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true};function tP(e,n,r=2,s=3e4){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function rP(e){return new Promise(n=>setTimeout(n,e))}async function nr(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t=2,maxDelayMs:c=3e4,shouldRetry:a}={...eP,...n},i;for(let o=1;o<=r;o++)try{return await e()}catch(u){if(i=u,a&&!a(u,o))throw u;if(o>=r)break;let d=tP(o,s,t,c);await rP(d);}throw new mr(e.name||"retryWithBackoff",r,i)}async function ut(e,n){let r=(s,t)=>s instanceof Response?s.status===429?n.retryOnRateLimit??true:s.status>=400&&s.status<500?false:s.status>=500:s instanceof TypeError||s instanceof Error;return nr(e,{...n,shouldRetry:n.shouldRetry??r})}var B=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=await tt().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:a,queuePubkeyIndex:i,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,u=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=u);}for(let c of r){let a=this.insertOrGet(c.treeInfo.tree.toString()),i=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:a,addressQueuePubkeyIndex:i});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function Nr(e,n){let r=$u(e);return js(n,r,()=>tt().getCompressedAccount(e))}async function rt(e,n){let r=eA(e);return js(n,r,()=>ce().getAccountInfo(e,{encoding:"base64"}).send())}async function Te(e,n){let s=(await Promise.all(e.map(async t=>Nr(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new ne("Compressed account",`Expected ${e.length} accounts but found ${s.length}`);return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function ge(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,d)=>({treeInfo:n[d],root:r[d],rootIndex:s[d],address:u.address.toArray()})),{addressTrees:a}=e.packTreeInfos([],c),i=await e.getOutputTreeIndex();return t.map((u,d)=>({addressTreeInfo:a[d],outputStateTreeIndex:i,address:u.address,type:u.type}))}function de(e,n,r,s,t,c,a){let i=[];for(let d=0;d<n.length;d++)i.push({treeInfo:n[d],rootIndex:s[d],leafIndex:r[d],proveByIndex:t[d],hash:c[d].hash});let o=e.packTreeInfos(i,[]).stateTrees;if(!o)throw new z("Unable to parse state tree data");return c.map((d,g)=>({data:a.decode(d.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(d.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Me(e,n,r,s,t){let c=null,a=null,i=null,o=new B;if(e){await o.addSystemAccounts();let{address:u}=await ae(n,r),d=(await Te([{address:u,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 w([d],[]);let g=o.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!g)throw new z("Unable to parse state tree data");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0]},data:Z().decode(d.data?.data)},a={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:Z().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:o,settingsMutArgs:a}}async function w(e,n,r=3,s=500){return nr(()=>tt().getValidityProofV0(e,n),{maxRetries:r,initialDelayMs:s})}async function he(){return (await wr()).length-1}var Js;async function wr(){if(!Js){let{data:e}=await ta(ce(),await sA());Js=e.whitelistedAddressTrees;}return Js}function nA(e){if(!e||e.length<8)return 3;if(e[0]===2)return 1;let n=e[7];return n===3?2:3}async function Vr(e,n,r){let s=await aP(e,n,r);if(!s)throw new ne("User account");return s}async function aP(e,n,r){let{address:s}=await N(e,n),t=await Nr(s,r);return t?.data?.data?$().decode(t.data.data):null}async function qs(e,n,r){let s=await iP(e,n,r);if(!s)throw new ne("Settings account");return s}async function iP(e,n,r){try{let{address:s}=await ae(e,n),t=await Nr(s,r);if(!t?.data?.data)throw new ne("Compressed settings account");let c=Z().decode(t.data.data);if(c.data.__option==="None")throw new ne("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let s=await ms(ce(),await ue(e));return s.exists?{...s.data,isCompressed:false}:null}}async function Ys(e){qu(e,"index");let n=await wr();if(e>=n.length)throw new z(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function Vw(e){let r=(await wr()).findIndex(s=>s.toString()===e);if(r===-1)throw new ne("Address tree",`Address ${e} not found in whitelist`);return r}async function ae(e,n=0){let r=await Ys(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function N(e,n=0){let r=await Ys(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof Ne?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function gt({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new z("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function dA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function sA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function uA(e,n,r){Ju(r,0,255,"buffer_index");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Ne?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function ve(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function ue(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function Qw(e){let n=await ue(e);return await ve(n)}async function $w(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function or(e,n){if(!e.ok){await e.text().catch(()=>e.statusText);throw new De(`Request failed: ${e.statusText} (${e.status})`,e.status,n)}return e}async function cr(e){try{return await e.json()}catch(n){throw new De(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function A2(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Fr(n.get(-2))),y:BigInt("0x"+Fr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function g2(e){let r=nist_js.p256.Point.fromBytes(new Uint8Array(gill.getBase58Encoder().encode(e))).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function p2(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Ve(n)),c=JSON.parse(new TextDecoder().decode(Ve(r))),a=pA(c),i=yA(new Uint8Array(Ve(s))),o=await gt({rpIdHash:t.subarray(0,32)});return new P(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Ve(r)),truncatedClientDataJson:a,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:Zs(e.clientSignature.clientOrigin,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:i,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function Zs(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function T2(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function l2(e){return Xs(e.data.payload.authResponse)}function f2(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...Zs(n,r,s)]))}async function S2(e,n,r,s,t,c){let a;if(!t||!c){let o=(await ce().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!o)throw new ne("Slot sysvar","Unable to fetch slot sysvar data");let u=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(u.subarray(0,8)).toString(),a=u.subarray(8,40),t=gill.getBase58Decoder().decode(a);}else a=new Uint8Array(gill.getBase58Encoder().encode(t));let i=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...sha2_js.sha256(typeof e.transactionMessageBytes=="string"?new Uint8Array(Ve(e.transactionMessageBytes)):e.transactionMessageBytes),...a,...Zs(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:i}}function Xs(e){return sha2_js.sha256(zr(e))}function x2(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ve(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),a=new Uint8Array(c);for(let i=0;i<t.length;i++)a[i]=t.charCodeAt(i);return c}async function I2(e,n){let{data:r}=await vo(ce(),e),t=mA(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}function Fr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function lP(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 pA(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 mA(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 yA(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 C=n&127;r+=C;}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,d=o[0]===0&&o.length>32?o.slice(1):o;if(u.length>32||d.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(u,32-u.length);let p=nist_js.p256.Point.CURVE().n>>1n,l=BigInt("0x"+Fr(d)),b=(l>p?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),x=lP(b);return new Uint8Array([...g,...x])}function zr(e){return new Uint8Array([...new Uint8Array(Ve(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Ve(e.response.clientDataJSON)))])}async function Qs(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await ce().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);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 SA(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 xA(e,n){rr(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new z(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await ut(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})}),{maxRetries:3,initialDelayMs:500});await or(r,n);let s=await cr(r);if(!s.result||s.error)throw new ye(`Unable to simulate bundle: ${JSON.stringify(s.error??s.result)}`);if(typeof s.result.value.summary!="string"&&s.result.value.summary.failed){let{TransactionFailure:t}=s.result.value.summary.failed.error,[,c]=t;throw new ye(`Simulation failed: ${c}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function J(e,n=0){let r=e instanceof P?e:void 0,s=r?.verifyArgs&&n!==-1?gill.some({signedMessageIndex:n,truncatedClientDataJson:r.verifyArgs.truncatedClientDataJson,slotNumber:r.verifyArgs.slotNumber,originIndex:r.originIndex,crossOrigin:r.crossOrigin,clientAndDeviceHash:r.clientAndDeviceHash}):gill.none(),t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,a=r?.authData&&r.verifyArgs.clientDataJson?zr(r.authResponse):void 0,i=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:a,publicKey:i}}function mt(e){if(e instanceof Ne)return {keyType:tr.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:tr.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function fA(e){return e instanceof P?e.toString():e.address.toString()}function Se(e){let n=new Set,r=[];for(let t of e)n.has(fA(t))||(r.push(t),n.add(fA(t)));let s=r.filter(t=>t instanceof P);if(s.length>1)throw new z(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function IA({payer:e,tipAmount:n}){let r=$r[Math.floor(Math.random()*$r.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}async function J2(e){rr(e,"bundle");let n=await Qs(e,true),r=await xA(n.map(gill.getBase64EncodedWireTransaction),Zu()),s=await Qs(e.map((c,a)=>({...c,unitsConsumed:r[a]})));return await kP(s.map(gill.getBase64EncodedWireTransaction))}async function kP(e,n=3,r=500,s=Ks()){rr(e,"serializedTransactions");let{blockEngineUrl:t}=s,c=`${t}/bundles`,a=await ut(()=>fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),{maxRetries:n,initialDelayMs:r});await or(a,c);let i=await cr(a);if(i.error)throw new ye(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new ye("No bundle ID returned from Jito");return i.result}async function q2(e,n=30,r=3e3,s=Ks()){Yu(e,"bundleId");let{blockEngineUrl:t}=s,c=`${t}/getBundleStatuses`;return nr(async()=>{let a=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await or(a,c);let i=await cr(a);if(i.error)throw new ye(`Error getting bundle status: ${JSON.stringify(i.error,null,2)}`,e);if(!i.result?.value?.length)throw new ye("Bundle not yet confirmed",e);let o=i.result.value[0];if(o.confirmation_status==="confirmed"||o.confirmation_status==="finalized"){let u=o.transactions[o.transactions.length-1];if(!u)throw new ye("No transactions in confirmed bundle",e);return u}throw new ye(`Bundle status: ${o.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:a=>a instanceof ye||a instanceof De})}async function t5({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await ce().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([Qu()(c),SA(ce(),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 Xu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function l5(e,n){if(n.threshold>1)throw new z("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(o=>DA(o.pubkey)===e);if(!r)throw new ne("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new ne("Permissions","No permissions found for the current member");let t=Be.has(s,_e.InitiateTransaction),c=Be.has(s,_e.VoteTransaction),a=Be.has(s,_e.ExecuteTransaction);if(t&&c&&a)return {};if(!c||!a)throw new yr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,a?"ExecuteTransaction":void 0].filter(Boolean));let i=n.members.find(o=>o.role===2);if(!i)throw new ne("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(DA(i.pubkey)),userAddressTreeIndex:i.userAddressTreeIndex}}async function f5({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await Vr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new ne("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return QP(n,c.transactionManagerUrl.value,e,s)}function QP(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let a=await ut(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),{maxRetries:3,initialDelayMs:500});if(!a.ok)throw new De(`Transaction manager request failed: ${a.statusText}`,a.status,n);let i=await a.json();if("error"in i)throw new De(`Transaction manager error: ${i.error}`,a.status,n);return i.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function DA(e){return e.keyType===tr.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function S5(e){let n=e.map(c=>Ge().encode(c)),r=4+n.reduce((c,a)=>c+a.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function x5(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let a=ze().read(e,n);t[c]=a[0],n=a[1];}if(n!==e.length)throw new z(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function O5({payer:e,rpId:n,origins:r,authority:s}){let t=await gt({rpId:n}),c=new B;await c.addSystemAccounts();let a=await he(),{address:i,addressTree:o}=await N(s.address,a),u=[{address:i,tree:o,queue:o,type:"User"}],d=await w([],u),g=(await ge(c,d.treeInfos,d.roots,d.rootIndices,u))[0],{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=v(d,l);return await Ba({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function j5({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let a=[];r.index&&(a.push({address:(await ae(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&a.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let i=a.length?await Te(a,t):[],o=await he(),{address:u,addressTree:d}=await N(r.member,o),g=[{address:u,type:"User",tree:d,queue:d}],p=await w(i,g),l=null,S=null,b=i.filter(G=>G.type==="Settings"),x=i.filter(G=>G.type==="User");b.length&&(l=de(c,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),b,Z())[0]),x.length&&(S=de(c,p.treeInfos.slice(1,2),p.leafIndices.slice(1,2),p.rootIndices.slice(1,2),p.proveByIndices.slice(1,2),x,$())[0]);let C=await ge(c,p.treeInfos.slice(i.length),p.roots.slice(i.length),p.rootIndices.slice(i.length),g),{remainingAccounts:_,systemOffset:I}=c.toAccountMetas(),W=v(p,I);return await Ha({payer:n,authority:e,compressedProofArgs:W,member:Vt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:C[0],domainConfig:s,remainingAccounts:_})}async function Z5({payer:e}){let n=await dA();return Ka({payer:e,globalCounter:n})}async function e6({admin:e,rpId:n,disable:r}){let s=await gt({rpId:n});return ai({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function a6({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:a}=await ae(r,s),i=[{address:c,tree:a,queue:a,type:"Settings"}],o=await w([],i),u=(await ge(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return vi({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:u,remainingAccounts:d})}async function m6({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:a}=await N(r,s),i=[{address:c,tree:a,queue:a,type:"User"}],o=await w([],i),u=(await ge(t,o.treeInfos,o.roots,o.rootIndices,i))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=v(o,g);return Bi({compressedProofArgs:p,args:e,authority:n,userCreationArgs:u,remainingAccounts:d})}function eM(e,n,r,s){let t=tM(e,n),c=rM(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 tM(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 rM(e,n){return n<e.header.numSignerAccounts}async function Kr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=ju(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(i=>i.lookupTableAddress),ce()):{}),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:eM(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 d=o[u];if(!d)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:d,role:gill.AccountRole.WRITABLE});}for(let u of i.readonlyIndexes){let d=o[u];if(!d)throw new Error(`Address lookup table account ${i.lookupTableAddress} does not contain address at index ${u}`);a.push({address:d,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}}var yt=33,Tt=64,ro=14,dM=2,uM=gill.address("Secp256r1SigVerify1111111111111111111111111");function AM(){return gill.getStructEncoder([["signatureOffset",gill.getU16Encoder()],["signatureInstructionIndex",gill.getU16Encoder()],["publicKeyOffset",gill.getU16Encoder()],["publicKeyInstructionIndex",gill.getU16Encoder()],["messageDataOffset",gill.getU16Encoder()],["messageDataSize",gill.getU16Encoder()],["messageInstructionIndex",gill.getU16Encoder()]])}function gM(){return gill.getStructDecoder([["signatureOffset",gill.getU16Decoder()],["signatureInstructionIndex",gill.getU16Decoder()],["publicKeyOffset",gill.getU16Decoder()],["publicKeyInstructionIndex",gill.getU16Decoder()],["messageDataOffset",gill.getU16Decoder()],["messageDataSize",gill.getU16Decoder()],["messageInstructionIndex",gill.getU16Decoder()]])}function _A(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let s=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=gM();for(let i=0;i<r;i++)t.push(c.decode(e,n)),n+=ro;let a=[];for(let i=0;i<r;i++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),yt).decode(e,n);n+=yt;let u=gill.fixDecoderSize(gill.getBytesDecoder(),Tt).decode(e,n);n+=Tt;let d=t[i].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),d).decode(e,n);n+=d,a.push({publicKey:o,signature:u,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:a},n]}})}function vA(){return gill.createEncoder({getSizeFromValue:e=>{let n=ro*e.offsets.length,r=e.payload.reduce((s,t)=>s+yt+Tt+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=AM();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),yt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Tt).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function b6(){return gill.combineCodec(vA(),_A())}function V(e,n){let r=e.length,s=dM+r*ro,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],d=s,g=d+yt,p=g+Tt;t.push({publicKeyOffset:d,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:u.length,messageInstructionIndex:65535}),s+=yt+Tt+u.length;}let c=n?.programAddress??uM,a={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:vA().encode(a)}}function _6(e){return {programAddress:e.programAddress,accounts:{},data:_A().decode(e.data)}}async function UA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:a=[],jitoBundlesTipAmount:i,compressed:o=false}){let u=await ve(e),{accountMetas:d,addressLookupTableAccounts:g}=await Kr({transactionMessageBytes:r,walletAddress:u,additionalSigners:a,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(V(c)),p.push(o?Pu({transactionBuffer:n,payer:s.address,remainingAccounts:d,settingsKey:e}):Su({transactionBuffer:n,payer:s.address,settings:e})),i&&p.push(IA({payer:s,tipAmount:i})),{instructions:p,addressLookupTableAccounts:g}}async function WA({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:a=[],compressed:i=false,simulateProof:o=false,cachedAccounts:u}){let d=Se(s),g=await ue(e),p=await ve(g),[{accountMetas:l,addressLookupTableAccounts:S,transactionMessage:b},{settingsMutArgs:x,proof:C,packedAccounts:_}]=await Promise.all([Kr({transactionMessageBytes:r,walletAddress:p,additionalSigners:d.filter(ee=>!(ee instanceof P)),addressesByLookupTableAddress:c}),Me(i,e,n,o,u)]);_.addPreAccounts(l);let I=d.filter(ee=>ee instanceof P),{secp256r1VerifyArgs:W}=mM(I,a,_),{remainingAccounts:G,systemOffset:q}=_.toAccountMetas();return {instructions:yM({secp256r1VerifyInput:a,transactionMessage:b,accountMetas:l,compressed:i,payer:t,settingsMutArgs:x,proof:C,systemOffset:q,secp256r1VerifyArgs:W,settings:g,remainingAccounts:G}),addressLookupTableAccounts:S}}function mM(e,n,r){let s=[];for(let t of e){let c=n.length,{domainConfig:a,verifyArgs:i,signature:o,publicKey:u,message:d}=J(t,c);d&&o&&u&&n.push({message:d,signature:o,publicKey:u}),a&&(r.addPreAccounts([{address:a,role:gill.AccountRole.READONLY}]),i.__option==="Some"&&s.push({domainConfigKey:a,verifyArgs:i.value}));}return {secp256r1VerifyArgs:s}}function yM({secp256r1VerifyInput:e,transactionMessage:n,accountMetas:r,compressed:s,payer:t,settingsMutArgs:c,proof:a,systemOffset:i,secp256r1VerifyArgs:o,settings:u,remainingAccounts:d}){let g=[];e.length>0&&g.push(V(e));let p=TM(n,r);if(s){if(!t||!c)throw new Error("Payer not found or proof args is missing.");let l=v(a,i);g.push(Bu({secp256r1VerifyArgs:o,transactionMessage:p,settingsMutArgs:c,compressedProofArgs:l,payer:t,remainingAccounts:d}));}else g.push(vu({secp256r1VerifyArgs:o,settings:u,transactionMessage:p,remainingAccounts:d}));return g}function TM(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 eV({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:a,compressed:i=false}){let o=Se(s),u=await ue(e),d=await ve(u),[{packedAccounts:g,proof:p,settingsMutArgs:l},{value:S}]=await Promise.all([Me(i,e,n,false,t),rt(d,t)]);if((S?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let b=[],x=[];for(let W of o)if(W instanceof P){let G=b.length,{domainConfig:q,verifyArgs:ie,signature:ee,publicKey:le,message:Ae}=J(W,G);Ae&&ee&&le&&b.push({message:Ae,signature:ee,publicKey:le}),q&&(g.addPreAccounts([{address:q,role:gill.AccountRole.READONLY}]),ie.__option==="Some"&&x.push({domainConfigKey:q,verifyArgs:ie.value}));}else g.addPreAccounts([{address:W.address,role:gill.AccountRole.READONLY_SIGNER,signer:W}]);let{remainingAccounts:C,systemOffset:_}=g.toAccountMetas(),I=[];if(b.length>0&&I.push(V(b)),i){if(!a||!l)throw new Error("Payer not found or proof args is missing.");let W=v(p,_);I.push(Ji({amount:c,settingsMutArgs:l,compressedProofArgs:W,payer:a,secp256r1VerifyArgs:x,source:d,destination:r,remainingAccounts:C}));}else I.push(Hi({amount:c,secp256r1VerifyArgs:x,source:d,destination:r,settings:u,remainingAccounts:C}));return I}var CM=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),EM=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),co=gill.address(stateless_js.CTOKEN_PROGRAM_ID.toString());async function pV({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:a,payer:i,tokenProgram:o,splInterfacePdaArgs:u={index:0,restricted:false},compressed:d=false}){let g=Se(t),p=await ue(e),l=await ve(p),S=U=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(U),gill.getAddressEncoder().encode(co),gill.getAddressEncoder().encode(s)],programAddress:co}),b=()=>{let U=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(s)];return u.restricted&&U.push(gill.getUtf8Encoder().encode("restricted")),u.index>0&&U.push(gill.getU8Encoder().encode(u.index)),U},[x,[C],_,[I],[W]]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,l,o),S(l),programs.getAssociatedTokenAccountAddress(s,r,o),S(r),gill.getProgramDerivedAddress({seeds:b(),programAddress:co})]),[G,q,ie,ee]=await Promise.all([rt(_,c),rt(x,c),rt(C,c),MM(d,e,n,c)]),le=!!G.value,Ae=!!q.value,lt=!!ie.value,ft=Ae?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(q.value.data[0])).amount:BigInt(0),ct=BigInt(lt?hM(new Uint8Array(gill.getBase64Encoder().encode(ie.value.data[0])))?.amount??0:0),ir=le?_:void 0,Zr=le?void 0:I,St=Ae&&(ft+ct<BigInt(a)||ct>BigInt(0)||!le)||!Ae&&le,T=!le,[me,Ao]=await Promise.all([PM(l,s,ft,ct,BigInt(a),d?3:4),DM(St,W,c)]),Y=me.reduce((U,re)=>U+re.parsed.amount.toNumber(),0);if(ft+ct+BigInt(Y)<BigInt(a))throw new Error("Insufficient balance");let at=null,Ue=null,We=new B;if(Ao&&We.addPreAccounts([{address:s,role:gill.AccountRole.WRITABLE}]),ee||me.length){await We.addSystemAccounts();let U=[];if(me.length&&U.push(...me.map(re=>({hash:re.compressedAccount.hash,tree:re.compressedAccount.treeInfo.tree,queue:re.compressedAccount.treeInfo.queue,data:re.compressedAccount.data,address:re.compressedAccount.address}))),ee&&U.push(ee),Ue=await w(U,[]),ee){let re=me.length;at=de(We,Ue.treeInfos.slice(re),Ue.leafIndices.slice(re),Ue.rootIndices.slice(re),Ue.proveByIndices.slice(re),U.slice(re),Z())[0];}}let $A=me.length&&Ue?gill.some(me.map((U,re)=>({isFrozen:U.parsed.state===programs.AccountState.Frozen,hasDelegate:U.parsed.delegate!=null,amount:U.parsed.amount.toNumber(),merkleContext:{leafIndex:U.compressedAccount.leafIndex,merkleTreePubkeyIndex:We.insertOrGet(U.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:We.insertOrGet(U.compressedAccount.treeInfo.queue.toString()),proveByIndex:U.compressedAccount.proveByIndex},rootIndex:Ue.rootIndices[re],version:nA(U.compressedAccount.data?.discriminator),tlv:U.parsed.tlv?gill.some(gill.getArrayDecoder(Lt()).decode(U.parsed.tlv)):gill.none()}))):gill.none(),dr=[],go=[];for(let U of g)if(U instanceof P){let re=dr.length,{domainConfig:Xr,verifyArgs:mo,signature:yo,publicKey:To,message:lo}=J(U,re);lo&&yo&&To&&dr.push({message:lo,signature:yo,publicKey:To}),Xr&&(We.addPreAccounts([{address:Xr,role:gill.AccountRole.READONLY}]),mo.__option==="Some"&&go.push({domainConfigKey:Xr,verifyArgs:mo.value}));}else We.addPreAccounts([{address:U.address,role:gill.AccountRole.READONLY_SIGNER,signer:U}]);let{remainingAccounts:eg,systemOffset:tg}=We.toAccountMetas(),ur=[];dr.length>0&&ur.push(V(dr));let rg=v(Ue,tg),ng=St?W:void 0,sg=T?EM:void 0,og=St?gill.some(u):gill.none(),po={amount:a,secp256r1VerifyArgs:go,source:l,destination:r,sourceCtokenTokenAccount:C,sourceSplTokenAccount:x,destinationCtokenTokenAccount:Zr,destinationSplTokenAccount:ir,mint:s,tokenProgram:o,remainingAccounts:eg,payer:i,sourceCompressedTokenAccounts:$A,compressedProofArgs:rg,compressibleConfig:CM,splInterfacePda:ng,rentSponsor:sg,splInterfacePdaArgs:og};if(d){if(!at)throw new Error("Payer not found or proof args is missing.");ur.push(ad({...po,settingsMutArgs:at}));}else ur.push($i({...po,settings:p}));return ur}async function DM(e,n,r){if(!e)return false;let{value:s}=await rt(n,r);return !s}async function PM(e,n,r,s,t,c){let a=t-r-s;if(a<=0)return [];let o=(await tt().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.equals(stateless_js.CTOKEN_PROGRAM_ID)&&!g.parsed.amount.isZero()).sort((g,p)=>p.parsed.amount.cmp(g.parsed.amount));if(o.length===0)return [];let u=BigInt(0),d=[];for(let g of o){if(d.length>=c||u>=a)break;u+=BigInt(g.parsed.amount.toNumber()),d.push(g);}if(u<a)throw d.length>=c?new Error("Transaction size limit exceeded. Consider multiple transfers to transfer full balance."):new Error("Insufficient balance.");return d}async function MM(e,n,r,s){if(!e)return null;let{address:t}=await ae(n,r);return (await Te([{address:t,type:"Settings"}],s))[0]}function hM(e){if(!e||e.length===0)return null;try{return {amount:gill.getU64Decoder().decode(e.slice(64,72))}}catch(n){return console.error("Token data parsing error:",n),null}}async function DV({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:a,proof:i,settingsMutArgs:o}=r,u=Se(e),d=u.filter(_=>!(_ instanceof P));a.addPreAccounts(d.map(_=>({address:_.address,role:gill.AccountRole.READONLY_SIGNER,signer:_})));let g=u.filter(_=>_ instanceof P),p=[],l=[];for(let _ of g){let I=l.length,{domainConfig:W,verifyArgs:G,signature:q,publicKey:ie,message:ee}=J(_,I);ee&&q&&ie&&l.push({message:ee,signature:q,publicKey:ie}),W&&(a.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),G.__option==="Some"&&p.push({domainConfigKey:W,verifyArgs:G.value}));}let{remainingAccounts:S,systemOffset:b}=a.toAccountMetas(),x=v(i,b),C=[];if(l.length>0&&C.push(V(l)),c){if(!o)throw new Error("Payer not found or proof args is missing.");C.push(Ca({configActions:t,payer:n,compressedProofArgs:x,settingsMutArgs:o,remainingAccounts:S,secp256r1VerifyArgs:p}));}else C.push(await ma({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:x,remainingAccounts:S,secp256r1VerifyArgs:p}));return C}async function vV({createUserArgs:e,payer:n}){let r=new B;await r.addSystemAccounts(),r.addPreAccounts(e.map(d=>({address:d.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:d.member})));let s=await he(),t=await Promise.all(e.map(async d=>{let{address:g,addressTree:p}=await N(d.member.address,s);return {address:g,tree:p,queue:p,type:"User"}})),c=await w([],t),a=await ge(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:i,systemOffset:o}=r.toAccountMetas(),u=v(c,o);return await Ya({compressedProofArgs:u,payer:n,createUserArgs:e.map((d,g)=>({member:d.member.address,role:d.role,userCreationArgs:a[g],transactionManagerUrl:d.role===2?d.transactionManagerUrl:null})),remainingAccounts:i})}async function NV({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let a=[],i=[];i.push(...await Te([{address:(await N(r.address,s)).address,type:"User"}],t));let o=await he(),{address:u,addressTree:d}=await ae(e,o);a.push({address:u,queue:d,tree:d,type:"Settings"});let g=i.length,p=await w(i,a),l=de(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),i.filter(I=>I.type==="User"),$())[0],b=(await ge(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),a)).find(I=>I.type==="Settings")??null,{remainingAccounts:x,systemOffset:C}=c.toAccountMetas(),_=v(p,C);if(!b)throw new Error("Settings creation args is missing.");return await ha({settingsIndex:e,payer:n,initialMember:r,userReadonlyArgs:l,compressedProofArgs:_,settingsCreation:b,remainingAccounts:x})}async function JV({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:a,settingsMutArgs:i}=await Me(true,e,n,false,t);if(!i)throw new Error("Proof args is missing");let o=Se(s),u=o.filter(C=>C instanceof P),d=[],g=[];for(let C of u){let _=d.length,{domainConfig:I,verifyArgs:W,signature:G,publicKey:q,message:ie}=J(C,_);ie&&G&&q&&d.push({message:ie,signature:G,publicKey:q}),I&&(c.addPreAccounts([{address:I,role:gill.AccountRole.READONLY}]),W.__option==="Some"&&g.push({domainConfigKey:I,verifyArgs:W.value}));}c.addPreAccounts(o.filter(C=>"address"in C).map(C=>({address:C.address,role:gill.AccountRole.READONLY_SIGNER,signer:C})));let{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=v(a,l),b=[];d.length>0&&b.push(V(d));let x=await ue(e);return b.push(ti({settings:x,payer:r,settingsMutArgs:i,compressedProofArgs:S,secp256r1VerifyArgs:g,remainingAccounts:p})),b}async function e8({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let a=new B;await a.addSystemAccounts();let i=await he(),{address:o,addressTree:u}=await N(r.address,i),d=[{address:o,tree:u,queue:u,type:"User"}],g=await w([],d),p=(await ge(a,g.treeInfos,g.roots,g.rootIndices,d))[0],l=a.toAccountMetas();c=l.remainingAccounts,t={compressedProofArgs:v(g,l.systemOffset),authorityCreationArgs:p};}return pi({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function c8({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new B;await s.addSystemAccounts();let t=await Te([{address:(await N(e.address,n)).address,type:"User"}]),c=await w(t,[]),a=de(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,$())[0],{remainingAccounts:i,systemOffset:o}=s.toAccountMetas(),u=v(c,o);return Si({authority:e,transactionManagerUrl:r,compressedProofArgs:u,userMutArgs:a,remainingAccounts:i})}async function T8({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:a,message:i,signature:o,publicKey:u}=J(n),d=[];i&&o&&u&&d.push({message:i,signature:o,publicKey:u});let g=await Vr(n instanceof P?n:n.address,r,t),p=[];p.push({address:(await N(n instanceof P?n:n.address,r)).address,type:"User"});let l,S=null,b,x=null;g.delegatedTo.__option==="Some"&&((await qs(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(g.delegatedTo.value.index,g.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):l=await ue(g.delegatedTo.value.index)),s&&((await qs(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):b=await ue(s.index));let C=new B;await C.addSystemAccounts();let _=await Te(p,t),I=await w(_,[]),W=de(C,I.treeInfos.slice(0,1),I.leafIndices.slice(0,1),I.rootIndices.slice(0,1),I.proveByIndices.slice(0,1),_.slice(0,1),$())[0],G=S?gill.some(de(C,I.treeInfos.slice(S.start,S.end),I.leafIndices.slice(S.start,S.end),I.rootIndices.slice(S.start,S.end),I.proveByIndices.slice(S.start,S.end),_.slice(S.start,S.end),Z())[0]):gill.none(),q=x?gill.some(de(C,I.treeInfos.slice(x.start,x.end),I.leafIndices.slice(x.start,x.end),I.rootIndices.slice(x.start,x.end),I.proveByIndices.slice(x.start,x.end),_.slice(x.start,x.end),Z())[0]):gill.none(),{remainingAccounts:ie,systemOffset:ee}=C.toAccountMetas(),le=v(I,ee),Ae=[];return d.length>0&&Ae.push(V(d)),Ae.push(Pi({secp256r1VerifyArgs:a,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof P?void 0:n,oldSettings:l,oldSettingsMutArgs:G,newSettings:b,newSettingsMutArgs:q,compressedProofArgs:le,userMutArgs:W,remainingAccounts:ie})),Ae}async function U8({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:a}){let i=await Yc(ce(),s),o=i.data.multiWalletSettings,{packedAccounts:u,proof:d,settingsMutArgs:g}=await Me(c,e,n,false,a),{remainingAccounts:p,systemOffset:l}=u.toAccountMetas(),{domainConfig:S,verifyArgs:b,message:x,signature:C,publicKey:_}=J(r),I=[];if(x&&C&&_&&I.push(V([{message:x,signature:C,publicKey:_}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let W=v(d,l);I.push(Sd({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,rentCollector:i.data.payer,secp256r1VerifyArgs:b,settingsMutArgs:g,payer:t,compressedProofArgs:W,remainingAccounts:p}));}else I.push(pd({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,settings:o,payer:i.data.payer,secp256r1VerifyArgs:b,remainingAccounts:[]}));return I}function GA({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:a,preauthorizeExecution:i,bufferExtendHashes:o,compressedArgs:u,expectedSecp256r1Signers:d}){let{domainConfig:g,verifyArgs:p,message:l,signature:S,publicKey:b}=J(n),x=[];if(l&&S&&b&&x.push(V([{message:l,signature:S,publicKey:b}])),u){let{settingsReadonlyArgs:C,compressedProofArgs:_,remainingAccounts:I}=u;x.push(vd({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:d},settingsReadonlyArgs:C,compressedProofArgs:_,remainingAccounts:I}));}else x.push(Pd({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:a,bufferExtendHashes:o,preauthorizeExecution:i,expectedSecp256r1Signers:d},remainingAccounts:[]}));return x}function zA({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,message:i,publicKey:o}=J(e),u=[];return i&&a&&o&&u.push(V([{message:i,signature:a,publicKey:o}])),s?u.push(Gd({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(Bd({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,remainingAccounts:[]})),u}function KA({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?tu({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Yd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function jA({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:a,publicKey:i,message:o}=J(n),u=[];return o&&a&&i&&u.push(V([{message:o,signature:a,publicKey:i}])),s?u.push(pu({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):u.push(au({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,remainingAccounts:[]})),u}async function IH({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await vM(r),a=new B,i=null,o=null,u=[];if(c.length||t){let g=await UM({packedAccounts:a,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});i=g.proof,o=g.settingsMutArgs??null,u=g.userMutArgs??[];}return {configActions:await WM({configActionsArgs:r,userMutArgs:u,index:e}),index:e,proof:i,settingsMutArgs:o,packedAccounts:a,compressed:t}}async function vM(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let s=await Promise.all(r.members.map(t=>N(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function UM({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let a=[];if(r){let l=(await ae(s,t)).address;a.push({address:l,type:"Settings"});}n.length&&a.push(...n);let i=a.length?await Te(a,c):[];if(!i.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await w(i,[]),u=[],d=[];for(let l of i)l.type==="Settings"?u.push(l):l.type==="User"&&d.push(l);let g,p=[];if(r&&o&&(g=de(e,o.treeInfos.slice(0,1),o.leafIndices.slice(0,1),o.rootIndices.slice(0,1),o.proveByIndices.slice(0,1),u,Z())[0]),d.length&&o){let l=r?1:0;p=de(e,o.treeInfos.slice(l),o.leafIndices.slice(l),o.rootIndices.slice(l),o.proveByIndices.slice(l),d,$());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function WM({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let a of t.members){let i=await N(a.member,a.userAddressTreeIndex).then(o=>r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(o.address))))));if(!i)throw new Error("Unable to find user account");c.push(OM({permissionArgs:a.permissions,userMutArgs:i,pubkey:a.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(a=>N(a.member,a.userAddressTreeIndex).then(i=>{let o=r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address)))));if(!o)throw new Error("Unable to find user account");return LM({pubkey:a.member,userMutArgs:o,index:e})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(a=>kM({permissionArgs:a.permissions,pubkey:a.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function kM({pubkey:e,permissionArgs:n}){return {memberKey:mt(e),permissions:ZA(n)}}function LM({pubkey:e,userMutArgs:n,index:r}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");let s=n.data.delegatedTo.__option==="Some"?Number(n.data.delegatedTo.value.index.toString())===r:false;return {memberKey:mt(e),userArgs:s?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function OM({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===1)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===2&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:mt(e),permissions:ZA(n),userReadonlyArgs:r}}function ZA(e){let n=[];return e.initiate&&n.push(_e.InitiateTransaction),e.vote&&n.push(_e.VoteTransaction),e.execute&&n.push(_e.ExecuteTransaction),Be.fromPermissions(n)}async function bH({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o,compressed:u=false,additionalVoters:d=[],additionalSigners:g=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:l}){let S=await ue(n),b=Math.floor(Math.random()*255),x=await uA(S,t instanceof P?t:t.address,b),C=[],_=[];for(let Y=0;Y<s.length;Y+=p){let at=s.subarray(Y,Y+p);C.push(at),_.push(sha2_js.sha256(at));}let I=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:W,settingsMutArgs:G,proof:q,packedAccounts:ie}=await Me(u,n,r,false,l),{remainingAccounts:ee,systemOffset:le}=ie.toAccountMetas(),Ae=q&&W&&G?{settingsReadonlyArgs:W,settingsMutArgs:G,compressedProofArgs:v(q,le),remainingAccounts:ee,payer:e}:null,lt=Se([t,...c?[c]:[],...d]).filter(Y=>Y instanceof P).map(Y=>({memberKey:mt(Y),messageHash:Xs(Y.authResponse)})),ft=GA({finalBufferHash:I,finalBufferSize:s.length,bufferIndex:b,payer:e,transactionBufferAddress:x,settings:S,creator:t,preauthorizeExecution:!c,bufferExtendHashes:_,compressedArgs:Ae,expectedSecp256r1Signers:lt}),ct=C.map(Y=>KA({transactionMessageBytes:Y,transactionBufferAddress:x,settings:S,compressed:u})),ir=d.map(Y=>jA({voter:Y,transactionBufferAddress:x,settings:S,compressedArgs:Ae})),Zr=zA({compressedArgs:Ae,settings:S,executor:c,transactionBufferAddress:x}),{instructions:St,addressLookupTableAccounts:T}=await UA({compressed:u,settings:S,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:a,jitoBundlesTipAmount:i,addressesByLookupTableAddress:o}),me=Y=>({payer:e,instructions:Y,addressesByLookupTableAddress:T});return [me(ft),...ct.map(Y=>me([Y])),...ir.length?[me(ir.flat())]:[],me(Zr),me(St)]}var qr=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 Yr=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 QA({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=qr.compile(r,e),c=new Array,a={writable:[],readonly:[]},i=Object.entries(s??{});for(let p of i){let l=t.extractTableLookup(p);if(l!==void 0){let{addressTableLookup:S,drainedKeys:b}=l;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),a.writable.push(...b.writable),a.readonly.push(...b.readonly);}}let[o,u]=t.getMessageComponents(),g=new Yr(u,a).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function FH({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=QA({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return Ku(s)}async function JH({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:a,cachedAccounts:i,compressed:o=false,simulateProof:u=false}){let{instructions:d,addressLookupTableAccounts:g}=await WA({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:i});return {payer:e,instructions:d,addressesByLookupTableAddress:g}}
2
+ exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=oa;exports.AuthenticationContextSchema=Hu;exports.BACKOFF_MAX_DELAY_MS=pr;exports.BUNDLE_POLL_DELAY_MS=xo;exports.BUNDLE_POLL_MAX_RETRIES=So;exports.BaseResponseSchema=Fu;exports.BundleError=ye;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=Sa;exports.CHANGE_CONFIG_DISCRIMINATOR=ga;exports.COMPUTE_UNIT_MULTIPLIER=fo;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=Pa;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=La;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=wa;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ga;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Ja;exports.CompleteMessageRequestSchema=ON;exports.CompleteTransactionRequestSchema=BN;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Qa;exports.DEFAULT_JITO_BLOCK_ENGINE_URL=Io;exports.DEFAULT_JITO_TIPS_URL=Co;exports.DEFAULT_JITO_TIP_PRIORITY=Eo;exports.DEFAULT_NETWORK_RETRY_DELAY_MS=Le;exports.DEFAULT_NETWORK_RETRY_MAX_RETRIES=ke;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=si;exports.DOMAIN_CONFIG_DISCRIMINATOR=Ro;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=Ai;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=Ti;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=Ci;exports.EXPONENTIAL_BACKOFF_BASE=gr;exports.GLOBAL_COUNTER_DISCRIMINATOR=ko;exports.HTTP_STATUS_BAD_REQUEST=Po;exports.HTTP_STATUS_INTERNAL_SERVER_ERROR=en;exports.HTTP_STATUS_TOO_MANY_REQUESTS=Mo;exports.JITO_TIP_ACCOUNTS=$r;exports.KeyType=tr;exports.MAX_TRANSACTION_BUFFER_INDEX=Do;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Ri;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=ki;exports.MIN_COMPUTE_UNITS=Ar;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=KE;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=CE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=LD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=AD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=gD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=WD;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=GD;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=PE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=DE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=LE;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=fD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=WE;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=EE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=vE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=eD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=tD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=rD;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=lD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=qE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=jE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=JE;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=VE;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=UD;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=yD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=kE;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=FE;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=$E;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=SD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=YE;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=wE;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=RE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=TE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=SE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=yE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=fE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=uD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=iD;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=BE;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=bD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=UE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=_E;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=NE;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=HE;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=BD;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=RD;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=xE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=cD;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=pD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=CD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=vD;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=GE;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=xD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=PD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=ND;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=hD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=ID;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=zE;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=HD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=VD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=TD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=wD;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=MD;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=aD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=kD;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=FD;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=XE;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=hE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=bE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=mD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=DD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=ME;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=oD;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=IE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=ED;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=lE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=dD;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=_D;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=OE;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=nD;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=sD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=QE;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=OD;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=ZE;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=gE;exports.MultiWalletInstruction=pE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=zi;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=wi;exports.NetworkError=De;exports.NotFoundError=ne;exports.NotInitializedError=Oe;exports.Permission=_e;exports.PermissionError=yr;exports.Permissions=Be;exports.RetryExhaustedError=mr;exports.RevibaseError=Ee;exports.SETTINGS_DISCRIMINATOR=wc;exports.Secp256r1Key=Ne;exports.SignedSecp256r1Key=P;exports.StartMessageRequestSchema=kN;exports.StartTransactionRequestSchema=LN;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=od;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Xi;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Td;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=ud;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Rd;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=Cd;exports.TRANSACTION_BUFFER_DISCRIMINATOR=jc;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Vd;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=kd;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Qd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=jd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=uu;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=su;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=Cu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Tu;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=ku;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Ru;exports.TRANSACTION_SIZE_LIMIT=Qr;exports.TransactionActionTypeSchema=wu;exports.TransactionDetailsSchema=zD;exports.TransactionError=ho;exports.TransactionPayloadSchema=WN;exports.TransactionPayloadWithBase64MessageBytesSchema=Vu;exports.UserRole=it;exports.ValidationError=z;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Qc;exports.addWhitelistedAddressTrees=hN;exports.base64URLStringToBuffer=Ve;exports.bufferToBase64URLString=x2;exports.changeConfig=DV;exports.closeTransactionBuffer=U8;exports.configAction=jh;exports.convertMemberKeyToString=DA;exports.convertPubkeyCompressedToCose=g2;exports.convertPubkeyCoseToCompressed=A2;exports.createClientAuthorizationCompleteRequestChallenge=l2;exports.createClientAuthorizationStartRequestChallenge=T2;exports.createDomainConfig=O5;exports.createDomainUserAccounts=j5;exports.createGlobalCounter=Z5;exports.createMessageChallenge=f2;exports.createTransactionBuffer=GA;exports.createTransactionChallenge=S2;exports.createTransactionManagerSigner=QP;exports.createUserAccounts=vV;exports.createWallet=NV;exports.decodeDomainConfig=_o;exports.decodeGlobalCounter=Oo;exports.decodeSettings=Hc;exports.decodeTransactionBuffer=qc;exports.decodeWhitelistedAddressTree=ea;exports.decompressSettingsAccount=JV;exports.deserializeConfigActions=x5;exports.disableDomainConfig=e6;exports.editDomainConfig=e8;exports.editTransactionManagerUrl=c8;exports.editUserDelegate=T8;exports.executeTransaction=UA;exports.executeTransactionBuffer=zA;exports.executeTransactionSync=WA;exports.extendTransactionBuffer=KA;exports.extensionStruct=uR;exports.fetchAllDomainConfig=GM;exports.fetchAllGlobalCounter=ZM;exports.fetchAllMaybeDomainConfig=Sg;exports.fetchAllMaybeGlobalCounter=Lg;exports.fetchAllMaybeSettings=gl;exports.fetchAllMaybeTransactionBuffer=Ul;exports.fetchAllMaybeWhitelistedAddressTree=Ql;exports.fetchAllSettings=Pv;exports.fetchAllTransactionBuffer=vv;exports.fetchAllWhitelistedAddressTree=Ov;exports.fetchDomainConfig=vo;exports.fetchGlobalCounter=YM;exports.fetchMaybeDomainConfig=fg;exports.fetchMaybeGlobalCounter=kg;exports.fetchMaybeSettings=ms;exports.fetchMaybeSettingsAccountData=iP;exports.fetchMaybeTransactionBuffer=vl;exports.fetchMaybeUserAccountData=aP;exports.fetchMaybeWhitelistedAddressTree=Xl;exports.fetchSettings=Dv;exports.fetchSettingsAccountData=qs;exports.fetchTransactionBuffer=Yc;exports.fetchUserAccountData=Vr;exports.fetchWhitelistedAddressTree=ta;exports.getAddMemberArgsCodec=sh;exports.getAddMemberArgsDecoder=sn;exports.getAddMemberArgsEncoder=nn;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=$v;exports.getAddWhitelistedAddressTreesInstruction=tU;exports.getAddWhitelistedAddressTreesInstructionAsync=aa;exports.getAddWhitelistedAddressTreesInstructionDataCodec=eU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=ca;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Cs;exports.getAdditionalMetadataCodec=eh;exports.getAdditionalMetadataDecoder=rn;exports.getAdditionalMetadataEncoder=tn;exports.getChangeConfigCompressedDiscriminatorBytes=SU;exports.getChangeConfigCompressedInstruction=Ca;exports.getChangeConfigCompressedInstructionDataCodec=xU;exports.getChangeConfigCompressedInstructionDataDecoder=Ia;exports.getChangeConfigCompressedInstructionDataEncoder=xa;exports.getChangeConfigDiscriminatorBytes=dU;exports.getChangeConfigInstruction=AU;exports.getChangeConfigInstructionAsync=ma;exports.getChangeConfigInstructionDataCodec=uU;exports.getChangeConfigInstructionDataDecoder=pa;exports.getChangeConfigInstructionDataEncoder=Ds;exports.getClientAndDeviceHash=Zs;exports.getCompiledInstructionCodec=ah;exports.getCompiledInstructionDecoder=cn;exports.getCompiledInstructionEncoder=on;exports.getCompressedAccountMetaCodec=Ah;exports.getCompressedAccountMetaDecoder=Et;exports.getCompressedAccountMetaEncoder=Ct;exports.getCompressedAccountMetaReadOnlyCodec=yh;exports.getCompressedAccountMetaReadOnlyDecoder=ht;exports.getCompressedAccountMetaReadOnlyEncoder=Mt;exports.getCompressedOnlyExtensionCodec=fh;exports.getCompressedOnlyExtensionDecoder=dn;exports.getCompressedOnlyExtensionEncoder=an;exports.getCompressedProofCodec=Ih;exports.getCompressedProofDecoder=yn;exports.getCompressedProofEncoder=mn;exports.getCompressedSettingsAddressFromIndex=ae;exports.getCompressedSettingsCodec=Ph;exports.getCompressedSettingsDataCodec=bh;exports.getCompressedSettingsDataDecoder=_t;exports.getCompressedSettingsDataEncoder=bt;exports.getCompressedSettingsDecoder=Z;exports.getCompressedSettingsEncoder=Rt;exports.getCompressedTokenArgsCodec=Wh;exports.getCompressedTokenArgsDecoder=kt;exports.getCompressedTokenArgsEncoder=Wt;exports.getCompressibleExtensionCodec=Bh;exports.getCompressibleExtensionDecoder=Cn;exports.getCompressibleExtensionEncoder=In;exports.getCompressionInfoCodec=Hh;exports.getCompressionInfoDecoder=Dn;exports.getCompressionInfoEncoder=En;exports.getComputeBudgetEstimate=Qu;exports.getConfigActionCodec=Kh;exports.getConfigActionDecoder=ze;exports.getConfigActionEncoder=Ge;exports.getCreateCompressedWalletDiscriminatorBytes=RU;exports.getCreateCompressedWalletInstruction=_U;exports.getCreateCompressedWalletInstructionAsync=ha;exports.getCreateCompressedWalletInstructionDataCodec=bU;exports.getCreateCompressedWalletInstructionDataDecoder=Ma;exports.getCreateCompressedWalletInstructionDataEncoder=Ps;exports.getCreateDomainConfigDiscriminatorBytes=NU;exports.getCreateDomainConfigInstruction=VU;exports.getCreateDomainConfigInstructionAsync=Ba;exports.getCreateDomainConfigInstructionDataCodec=wU;exports.getCreateDomainConfigInstructionDataDecoder=Oa;exports.getCreateDomainConfigInstructionDataEncoder=hs;exports.getCreateDomainUserAccountDiscriminatorBytes=qU;exports.getCreateDomainUserAccountInstruction=ZU;exports.getCreateDomainUserAccountInstructionAsync=Ha;exports.getCreateDomainUserAccountInstructionDataCodec=YU;exports.getCreateDomainUserAccountInstructionDataDecoder=Va;exports.getCreateDomainUserAccountInstructionDataEncoder=bs;exports.getCreateGlobalCounterDiscriminatorBytes=nW;exports.getCreateGlobalCounterInstruction=oW;exports.getCreateGlobalCounterInstructionAsync=Ka;exports.getCreateGlobalCounterInstructionDataCodec=sW;exports.getCreateGlobalCounterInstructionDataDecoder=za;exports.getCreateGlobalCounterInstructionDataEncoder=vs;exports.getCreateUserAccountArgsCodec=Xh;exports.getCreateUserAccountArgsDecoder=On;exports.getCreateUserAccountArgsEncoder=Ln;exports.getCreateUserAccountsDiscriminatorBytes=pW;exports.getCreateUserAccountsInstruction=yW;exports.getCreateUserAccountsInstructionAsync=Ya;exports.getCreateUserAccountsInstructionDataCodec=mW;exports.getCreateUserAccountsInstructionDataDecoder=qa;exports.getCreateUserAccountsInstructionDataEncoder=Ws;exports.getDecompressSettingsAccountDiscriminatorBytes=EW;exports.getDecompressSettingsAccountInstruction=ti;exports.getDecompressSettingsAccountInstructionDataCodec=DW;exports.getDecompressSettingsAccountInstructionDataDecoder=ei;exports.getDecompressSettingsAccountInstructionDataEncoder=$a;exports.getDisableDomainConfigDiscriminatorBytes=vW;exports.getDisableDomainConfigInstruction=ai;exports.getDisableDomainConfigInstructionDataCodec=UW;exports.getDisableDomainConfigInstructionDataDecoder=ci;exports.getDisableDomainConfigInstructionDataEncoder=oi;exports.getDomainConfigAddress=gt;exports.getDomainConfigCodec=FM;exports.getDomainConfigDecoder=bo;exports.getDomainConfigDiscriminatorBytes=HM;exports.getDomainConfigEncoder=lg;exports.getDomainConfigSize=zM;exports.getEditDomainConfigDiscriminatorBytes=VW;exports.getEditDomainConfigInstruction=pi;exports.getEditDomainConfigInstructionAsync=FW;exports.getEditDomainConfigInstructionDataCodec=HW;exports.getEditDomainConfigInstructionDataDecoder=gi;exports.getEditDomainConfigInstructionDataEncoder=Ls;exports.getEditMemberArgsCodec=tR;exports.getEditMemberArgsDecoder=Un;exports.getEditMemberArgsEncoder=vn;exports.getEditTransactionManagerUrlDiscriminatorBytes=ZW;exports.getEditTransactionManagerUrlInstruction=Si;exports.getEditTransactionManagerUrlInstructionDataCodec=XW;exports.getEditTransactionManagerUrlInstructionDataDecoder=fi;exports.getEditTransactionManagerUrlInstructionDataEncoder=li;exports.getEditUserDelegateDiscriminatorBytes=ok;exports.getEditUserDelegateInstruction=Pi;exports.getEditUserDelegateInstructionDataCodec=ck;exports.getEditUserDelegateInstructionDataDecoder=Di;exports.getEditUserDelegateInstructionDataEncoder=Ei;exports.getExpectedSecp256r1SignersCodec=oR;exports.getExpectedSecp256r1SignersDecoder=Bt;exports.getExpectedSecp256r1SignersEncoder=Ot;exports.getExtensionStructCodec=dR;exports.getExtensionStructDecoder=Lt;exports.getExtensionStructEncoder=Tn;exports.getGlobalCounterAddress=dA;exports.getGlobalCounterCodec=qM;exports.getGlobalCounterDecoder=Lo;exports.getGlobalCounterDiscriminatorBytes=JM;exports.getGlobalCounterEncoder=Wg;exports.getGlobalCounterSize=XM;exports.getJitoTipsConfig=Ks;exports.getLightCpiSigner=$w;exports.getLightProtocolRpc=tt;exports.getLinkWalletArgsCodec=yR;exports.getLinkWalletArgsDecoder=qn;exports.getLinkWalletArgsEncoder=Jn;exports.getMemberCodec=SR;exports.getMemberDecoder=Ut;exports.getMemberEncoder=vt;exports.getMemberKeyCodec=CR;exports.getMemberKeyDecoder=oe;exports.getMemberKeyEncoder=se;exports.getMigrateCompressedSettingsDiscriminatorBytes=mk;exports.getMigrateCompressedSettingsInstruction=vi;exports.getMigrateCompressedSettingsInstructionDataCodec=yk;exports.getMigrateCompressedSettingsInstructionDataDecoder=_i;exports.getMigrateCompressedSettingsInstructionDataEncoder=bi;exports.getMigrateCompressedUsersDiscriminatorBytes=Ek;exports.getMigrateCompressedUsersInstruction=Bi;exports.getMigrateCompressedUsersInstructionDataCodec=Dk;exports.getMigrateCompressedUsersInstructionDataDecoder=Oi;exports.getMigrateCompressedUsersInstructionDataEncoder=Li;exports.getMultiWalletErrorMessage=yN;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Fk;exports.getNativeTransferIntentCompressedInstruction=Ji;exports.getNativeTransferIntentCompressedInstructionDataCodec=Gk;exports.getNativeTransferIntentCompressedInstructionDataDecoder=ji;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Ki;exports.getNativeTransferIntentDiscriminatorBytes=Uk;exports.getNativeTransferIntentInstruction=Hi;exports.getNativeTransferIntentInstructionAsync=kk;exports.getNativeTransferIntentInstructionDataCodec=Wk;exports.getNativeTransferIntentInstructionDataDecoder=Vi;exports.getNativeTransferIntentInstructionDataEncoder=Os;exports.getNewAuthorityArgsCodec=MR;exports.getNewAuthorityArgsDecoder=Qn;exports.getNewAuthorityArgsEncoder=Xn;exports.getOriginIndex=I2;exports.getPackedAddressTreeInfoCodec=bR;exports.getPackedAddressTreeInfoDecoder=wt;exports.getPackedAddressTreeInfoEncoder=Nt;exports.getPackedMerkleContextCodec=UR;exports.getPackedMerkleContextDecoder=fn;exports.getPackedMerkleContextEncoder=ln;exports.getPackedStateTreeInfoCodec=LR;exports.getPackedStateTreeInfoDecoder=Pt;exports.getPackedStateTreeInfoEncoder=Dt;exports.getPausableAccountExtensionCodec=NR;exports.getPausableAccountExtensionDecoder=Nn;exports.getPausableAccountExtensionEncoder=Bn;exports.getPermanentDelegateAccountExtensionCodec=HR;exports.getPermanentDelegateAccountExtensionDecoder=Vn;exports.getPermanentDelegateAccountExtensionEncoder=wn;exports.getPermissionsCodec=zR;exports.getPermissionsDecoder=Fe;exports.getPermissionsEncoder=He;exports.getProofArgsCodec=qR;exports.getProofArgsDecoder=D;exports.getProofArgsEncoder=E;exports.getRemoveMemberArgsCodec=QR;exports.getRemoveMemberArgsDecoder=kn;exports.getRemoveMemberArgsEncoder=Wn;exports.getRentConfigCodec=tb;exports.getRentConfigDecoder=Rn;exports.getRentConfigEncoder=hn;exports.getSecp256r1MessageHash=Xs;exports.getSecp256r1PubkeyCodec=sb;exports.getSecp256r1PubkeyDecoder=Vt;exports.getSecp256r1PubkeyEncoder=ns;exports.getSecp256r1SignatureOffsetsDataDecoder=gM;exports.getSecp256r1SignatureOffsetsDataEncoder=AM;exports.getSecp256r1VerifyArgsCodec=ab;exports.getSecp256r1VerifyArgsDecoder=F;exports.getSecp256r1VerifyArgsEncoder=H;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=Ab;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=Q;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=X;exports.getSecp256r1VerifyInstruction=V;exports.getSecp256r1VerifyInstructionDataCodec=b6;exports.getSecp256r1VerifyInstructionDataDecoder=_A;exports.getSecp256r1VerifyInstructionDataEncoder=vA;exports.getSendAndConfirmTransaction=Xu;exports.getSettingsCodec=Ev;exports.getSettingsCreationArgsCodec=yb;exports.getSettingsCreationArgsDecoder=Ft;exports.getSettingsCreationArgsEncoder=Ht;exports.getSettingsDecoder=Vc;exports.getSettingsDiscriminatorBytes=Cv;exports.getSettingsEncoder=Al;exports.getSettingsFromIndex=ue;exports.getSettingsIndexWithAddressCodec=fb;exports.getSettingsIndexWithAddressDecoder=zt;exports.getSettingsIndexWithAddressEncoder=Gt;exports.getSettingsMutArgsCodec=Cb;exports.getSettingsMutArgsDecoder=j;exports.getSettingsMutArgsEncoder=K;exports.getSettingsReadonlyArgsCodec=Mb;exports.getSettingsReadonlyArgsDecoder=jt;exports.getSettingsReadonlyArgsEncoder=Kt;exports.getSignedSecp256r1Key=p2;exports.getSignedTransactionManager=f5;exports.getSolanaRpc=ce;exports.getSolanaRpcEndpoint=Zu;exports.getSplInterfacePdaArgsCodec=bb;exports.getSplInterfacePdaArgsDecoder=qt;exports.getSplInterfacePdaArgsEncoder=Jt;exports.getTokenMetadataCodec=Wb;exports.getTokenMetadataDecoder=Fn;exports.getTokenMetadataEncoder=Hn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=aL;exports.getTokenTransferIntentCompressedInstruction=ad;exports.getTokenTransferIntentCompressedInstructionAsync=dL;exports.getTokenTransferIntentCompressedInstructionDataCodec=iL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=cd;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Vs;exports.getTokenTransferIntentDiscriminatorBytes=Xk;exports.getTokenTransferIntentInstruction=$i;exports.getTokenTransferIntentInstructionAsync=$k;exports.getTokenTransferIntentInstructionDataCodec=Qk;exports.getTokenTransferIntentInstructionDataDecoder=Qi;exports.getTokenTransferIntentInstructionDataEncoder=ws;exports.getTransactionBufferAddress=uA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=ML;exports.getTransactionBufferCloseCompressedInstruction=Sd;exports.getTransactionBufferCloseCompressedInstructionDataCodec=hL;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=fd;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=ld;exports.getTransactionBufferCloseDiscriminatorBytes=lL;exports.getTransactionBufferCloseInstruction=pd;exports.getTransactionBufferCloseInstructionDataCodec=fL;exports.getTransactionBufferCloseInstructionDataDecoder=gd;exports.getTransactionBufferCloseInstructionDataEncoder=Ad;exports.getTransactionBufferCodec=_v;exports.getTransactionBufferCreateArgsCodec=Bb;exports.getTransactionBufferCreateArgsDecoder=Zt;exports.getTransactionBufferCreateArgsEncoder=Yt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=zL;exports.getTransactionBufferCreateCompressedInstruction=vd;exports.getTransactionBufferCreateCompressedInstructionDataCodec=KL;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=_d;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=bd;exports.getTransactionBufferCreateDiscriminatorBytes=LL;exports.getTransactionBufferCreateInstruction=Pd;exports.getTransactionBufferCreateInstructionDataCodec=OL;exports.getTransactionBufferCreateInstructionDataDecoder=Dd;exports.getTransactionBufferCreateInstructionDataEncoder=Ed;exports.getTransactionBufferDecoder=Jc;exports.getTransactionBufferDiscriminatorBytes=bv;exports.getTransactionBufferEncoder=_l;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=iO;exports.getTransactionBufferExecuteCompressedInstruction=Gd;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=dO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Fd;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Hd;exports.getTransactionBufferExecuteDiscriminatorBytes=$L;exports.getTransactionBufferExecuteInstruction=Bd;exports.getTransactionBufferExecuteInstructionDataCodec=eO;exports.getTransactionBufferExecuteInstructionDataDecoder=Od;exports.getTransactionBufferExecuteInstructionDataEncoder=Ld;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=DO;exports.getTransactionBufferExtendCompressedInstruction=tu;exports.getTransactionBufferExtendCompressedInstructionDataCodec=PO;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=eu;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=$d;exports.getTransactionBufferExtendDiscriminatorBytes=TO;exports.getTransactionBufferExtendInstruction=Yd;exports.getTransactionBufferExtendInstructionDataCodec=lO;exports.getTransactionBufferExtendInstructionDataDecoder=qd;exports.getTransactionBufferExtendInstructionDataEncoder=Jd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=FO;exports.getTransactionBufferVoteCompressedInstruction=pu;exports.getTransactionBufferVoteCompressedInstructionDataCodec=GO;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=gu;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Au;exports.getTransactionBufferVoteDiscriminatorBytes=WO;exports.getTransactionBufferVoteInstruction=au;exports.getTransactionBufferVoteInstructionDataCodec=kO;exports.getTransactionBufferVoteInstructionDataDecoder=cu;exports.getTransactionBufferVoteInstructionDataEncoder=ou;exports.getTransactionExecuteCompressedDiscriminatorBytes=sB;exports.getTransactionExecuteCompressedInstruction=Pu;exports.getTransactionExecuteCompressedInstructionDataCodec=oB;exports.getTransactionExecuteCompressedInstructionDataDecoder=Du;exports.getTransactionExecuteCompressedInstructionDataEncoder=Eu;exports.getTransactionExecuteDiscriminatorBytes=ZO;exports.getTransactionExecuteInstruction=Su;exports.getTransactionExecuteInstructionDataCodec=XO;exports.getTransactionExecuteInstructionDataDecoder=fu;exports.getTransactionExecuteInstructionDataEncoder=lu;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=CB;exports.getTransactionExecuteSyncCompressedInstruction=Bu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=EB;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ou;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Lu;exports.getTransactionExecuteSyncDiscriminatorBytes=pB;exports.getTransactionExecuteSyncInstruction=vu;exports.getTransactionExecuteSyncInstructionDataCodec=mB;exports.getTransactionExecuteSyncInstructionDataDecoder=_u;exports.getTransactionExecuteSyncInstructionDataEncoder=bu;exports.getTransactionMessageAddressTableLookupCodec=zb;exports.getTransactionMessageAddressTableLookupDecoder=As;exports.getTransactionMessageAddressTableLookupEncoder=us;exports.getTransactionMessageCodec=Hb;exports.getTransactionMessageDecoder=Qt;exports.getTransactionMessageEncoder=Xt;exports.getTransferFeeAccountExtensionCodec=Jb;exports.getTransferFeeAccountExtensionDecoder=zn;exports.getTransferFeeAccountExtensionEncoder=Gn;exports.getTransferHookAccountExtensionCodec=Zb;exports.getTransferHookAccountExtensionDecoder=jn;exports.getTransferHookAccountExtensionEncoder=Kn;exports.getUserAccountAddress=N;exports.getUserCodec=e_;exports.getUserCreationArgsCodec=s_;exports.getUserCreationArgsDecoder=Ie;exports.getUserCreationArgsEncoder=xe;exports.getUserDecoder=$;exports.getUserEncoder=Xe;exports.getUserMutArgsCodec=i_;exports.getUserMutArgsDecoder=$e;exports.getUserMutArgsEncoder=Qe;exports.getUserReadOnlyArgsCodec=g_;exports.getUserReadOnlyArgsDecoder=be;exports.getUserReadOnlyArgsEncoder=Re;exports.getUserReadOnlyOrMutateArgsCodec=T_;exports.getUserReadOnlyOrMutateArgsDecoder=es;exports.getUserReadOnlyOrMutateArgsEncoder=$n;exports.getUserRoleCodec=I_;exports.getUserRoleDecoder=je;exports.getUserRoleEncoder=Ke;exports.getWalletAddressFromIndex=Qw;exports.getWalletAddressFromSettings=ve;exports.getWhitelistedAddressTreeCodec=Lv;exports.getWhitelistedAddressTreeDecoder=$c;exports.getWhitelistedAddressTreeDiscriminatorBytes=kv;exports.getWhitelistedAddressTreeEncoder=Zl;exports.getWhitelistedAddressTreeFromIndex=Ys;exports.getWhitelistedAddressTreeIndexFromAddress=Vw;exports.getWhitelistedAddressTreesAddress=sA;exports.identifyMultiWalletAccount=iN;exports.identifyMultiWalletInstruction=dN;exports.initialize=dw;exports.isConfigAction=Jh;exports.isExtensionStruct=AR;exports.isMultiWalletError=TN;exports.isUserReadOnlyOrMutateArgs=f_;exports.migrateSettings=a6;exports.migrateUsers=m6;exports.nativeTransferIntent=eV;exports.parseAddWhitelistedAddressTreesInstruction=rU;exports.parseChangeConfigCompressedInstruction=IU;exports.parseChangeConfigInstruction=gU;exports.parseCreateCompressedWalletInstruction=vU;exports.parseCreateDomainConfigInstruction=HU;exports.parseCreateDomainUserAccountInstruction=XU;exports.parseCreateGlobalCounterInstruction=cW;exports.parseCreateUserAccountsInstruction=TW;exports.parseDecompressSettingsAccountInstruction=PW;exports.parseDisableDomainConfigInstruction=WW;exports.parseEditDomainConfigInstruction=GW;exports.parseEditTransactionManagerUrlInstruction=QW;exports.parseEditUserDelegateInstruction=ak;exports.parseMigrateCompressedSettingsInstruction=Tk;exports.parseMigrateCompressedUsersInstruction=Pk;exports.parseNativeTransferIntentCompressedInstruction=zk;exports.parseNativeTransferIntentInstruction=Lk;exports.parseSecp256r1VerifyInstruction=_6;exports.parseTokenTransferIntentCompressedInstruction=uL;exports.parseTokenTransferIntentInstruction=eL;exports.parseTransactionBufferCloseCompressedInstruction=RL;exports.parseTransactionBufferCloseInstruction=SL;exports.parseTransactionBufferCreateCompressedInstruction=jL;exports.parseTransactionBufferCreateInstruction=BL;exports.parseTransactionBufferExecuteCompressedInstruction=uO;exports.parseTransactionBufferExecuteInstruction=tO;exports.parseTransactionBufferExtendCompressedInstruction=MO;exports.parseTransactionBufferExtendInstruction=fO;exports.parseTransactionBufferVoteCompressedInstruction=zO;exports.parseTransactionBufferVoteInstruction=LO;exports.parseTransactionExecuteCompressedInstruction=cB;exports.parseTransactionExecuteInstruction=QO;exports.parseTransactionExecuteSyncCompressedInstruction=DB;exports.parseTransactionExecuteSyncInstruction=yB;exports.pollJitoBundleConfirmation=q2;exports.prepareChangeConfigArgs=IH;exports.prepareTransactionBundle=bH;exports.prepareTransactionMessage=FH;exports.prepareTransactionSync=JH;exports.retrieveTransactionManager=l5;exports.sendJitoBundle=kP;exports.serializeConfigActions=S5;exports.signAndSendBundledTransactions=J2;exports.signAndSendTransaction=t5;exports.tokenTransferIntent=pV;exports.userReadOnlyOrMutateArgs=l_;exports.vaultTransactionMessageDeserialize=ju;exports.vaultTransactionMessageSerialize=Ku;exports.voteTransactionBuffer=jA;//# sourceMappingURL=index.cjs.map
3
3
  //# sourceMappingURL=index.cjs.map