@revibase/core 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -87
- package/dist/index.d.ts +140 -87
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var gill=require('gill'),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
|
|
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'),browser=require('@simplewebauthn/browser'),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 cn=1644,mr=2e5,Po=1.1,Mo=30,ho=3e3,Le=3,Oe=500,yr=2,Tr=3e4,an=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Ro="https://mainnet.block-engine.jito.wtf/api/v1",bo="https://bundles.jito.wtf/api/v1/bundles/tip_floor",_o="landed_tips_75th_percentile",vo=255,Uo=400,Wo=429,dn=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);}},Be=class extends Ee{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},oe=class extends Ee{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},K=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;}},ko=class extends Ee{constructor(r,s,t){super(r,"TRANSACTION_ERROR",{signature:s,logs:t});this.signature=s;this.logs=t;}},me=class extends Ee{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},lr=class extends Ee{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},fr=class extends Ee{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var Lo=new Uint8Array([201,232,212,229,59,241,106,197]);function Eh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Lo)}function _g(){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:Lo}))}function Oo(){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 Dh(){return gill.combineCodec(_g(),Oo())}function Bo(e){return gill.decodeAccount(e,Oo())}async function No(e,n,r){let s=await vg(e,n,r);return gill.assertAccountExists(s),s}async function vg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Bo(s)}async function Ph(e,n,r){let s=await Ug(e,n,r);return gill.assertAccountsExist(s),s}async function Ug(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Bo(t))}function Mh(){return 846}var Ho=new Uint8Array([42,206,176,58,175,129,130,233]);function bh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ho)}function jg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Ho}))}function Fo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function _h(){return gill.combineCodec(jg(),Fo())}function Go(e){return gill.decodeAccount(e,Fo())}async function vh(e,n,r){let s=await Jg(e,n,r);return gill.assertAccountExists(s),s}async function Jg(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Go(s)}async function Uh(e,n,r){let s=await qg(e,n,r);return gill.assertAccountsExist(s),s}async function qg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Go(t))}function Wh(){return 24}function un(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function An(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Oh(){return gill.combineCodec(un(),An())}function gn(){return gill.getStructEncoder([["memberKey",H()],["permissions",ze()],["userArgs",je()]])}function pn(){return gill.getStructDecoder([["memberKey",ce()],["permissions",Ke()],["userArgs",Je()]])}function Vh(){return gill.combineCodec(gn(),pn())}function mn(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function yn(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Gh(){return gill.combineCodec(mn(),yn())}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 Jh(){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 Xh(){return gill.combineCodec(Mt(),ht())}function Tn(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function ln(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function eR(){return gill.combineCodec(Tn(),ln())}function Cn(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function En(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function nR(){return gill.combineCodec(Cn(),En())}function Rt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(bt())]])}function j(){return gill.getStructDecoder([["data",gill.getOptionDecoder(_t())]])}function aR(){return gill.combineCodec(Rt(),j())}function bt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(vt())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function _t(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Ut())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function AR(){return gill.combineCodec(bt(),_t())}function Wt(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",Pn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(Dn()))],["hasDelegate",gill.getBooleanEncoder()],["isFrozen",gill.getBooleanEncoder()]])}function kt(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",Mn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Lt()))],["hasDelegate",gill.getBooleanDecoder()],["isFrozen",gill.getBooleanDecoder()]])}function yR(){return gill.combineCodec(Wt(),kt())}function bn(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",vn()]])}function _n(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",Un()]])}function SR(){return gill.combineCodec(bn(),_n())}function vn(){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",Ln()]])}function Un(){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",On()]])}function ER(){return gill.combineCodec(vn(),Un())}function qe(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(wn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(gn())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Hn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Ye(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Vn())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(pn())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Fn())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function hR(){return gill.combineCodec(qe(),Ye())}function RR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function bR(e,n){return n.__kind===e}function Gn(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ze()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",xe()]])}function zn(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Xe()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Ie()]])}function WR(){return gill.combineCodec(Gn(),zn())}function wn(){return gill.getStructEncoder([["memberKey",H()],["permissions",ze()]])}function Vn(){return gill.getStructDecoder([["memberKey",ce()],["permissions",Ke()]])}function BR(){return gill.combineCodec(wn(),Vn())}function Ot(){return gill.getStructEncoder([["memberKey",H()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Bt(){return gill.getStructDecoder([["memberKey",ce()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function HR(){return gill.combineCodec(Ot(),Bt())}function Dn(){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([Yn()])]])],["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([Kn()])]])],["PermanentDelegateAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Jn()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Xn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([$n()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([Tn()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([bn()])]])]])}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([Zn()])]])],["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([jn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([qn()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Qn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([es()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([ln()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([_n()])]])]])}function KR(){return gill.combineCodec(Dn(),Lt())}function jR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function JR(e,n){return n.__kind===e}function ts(){return gill.getStructEncoder([["settingsMutArgs",J()],["transactionManager",gill.getOptionEncoder(Nt())]])}function rs(){return gill.getStructDecoder([["settingsMutArgs",q()],["transactionManager",gill.getOptionDecoder(wt())]])}function XR(){return gill.combineCodec(ts(),rs())}function vt(){return gill.getStructEncoder([["pubkey",H()],["role",gill.getU8Encoder()],["permissions",ze()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function Ut(){return gill.getStructDecoder([["pubkey",ce()],["role",gill.getU8Decoder()],["permissions",Ke()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function tb(){return gill.combineCodec(vt(),Ut())}function H(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function ce(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function sb(){return gill.combineCodec(H(),ce())}function os(){return gill.getStructEncoder([["authorityCreationArgs",xe()],["compressedProofArgs",C()]])}function cs(){return gill.getStructDecoder([["authorityCreationArgs",Ie()],["compressedProofArgs",E()]])}function ib(){return gill.combineCodec(os(),cs())}function Vt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function Ht(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function Ab(){return gill.combineCodec(Vt(),Ht())}function Pn(){return gill.getStructEncoder([["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()],["proveByIndex",gill.getBooleanEncoder()]])}function Mn(){return gill.getStructDecoder([["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()],["proveByIndex",gill.getBooleanDecoder()]])}function mb(){return gill.combineCodec(Pn(),Mn())}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 lb(){return gill.combineCodec(Dt(),Pt())}function Kn(){return gill.getStructEncoder([])}function jn(){return gill.getStructDecoder([])}function xb(){return gill.combineCodec(Kn(),jn())}function Jn(){return gill.getStructEncoder([])}function qn(){return gill.getStructDecoder([])}function Eb(){return gill.combineCodec(Jn(),qn())}function ze(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Ke(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function Mb(){return gill.combineCodec(ze(),Ke())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Cn())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(En())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function _b(){return gill.combineCodec(C(),E())}function Hn(){return gill.getStructEncoder([["memberKey",H()],["userArgs",je()]])}function Fn(){return gill.getStructDecoder([["memberKey",ce()],["userArgs",Je()]])}function kb(){return gill.combineCodec(Hn(),Fn())}function Ln(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function On(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function Bb(){return gill.combineCodec(Ln(),On())}function ds(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Ft(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function Vb(){return gill.combineCodec(ds(),Ft())}function F(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function G(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function Gb(){return gill.combineCodec(F(),G())}function $(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",F()]])}function ee(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",G()]])}function Jb(){return gill.combineCodec($(),ee())}function Gt(){return gill.getStructEncoder([["addressTreeInfo",Vt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function zt(){return gill.getStructDecoder([["addressTreeInfo",Ht()],["outputStateTreeIndex",gill.getU8Decoder()]])}function Xb(){return gill.combineCodec(Gt(),zt())}function us(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function As(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function e_(){return gill.combineCodec(us(),As())}function gs(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function ps(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function n_(){return gill.combineCodec(gs(),ps())}function J(){return gill.getStructEncoder([["accountMeta",Ct()],["data",Rt()]])}function q(){return gill.getStructDecoder([["accountMeta",Et()],["data",j()]])}function a_(){return gill.combineCodec(J(),q())}function Kt(){return gill.getStructEncoder([["accountMeta",Mt()],["data",Rt()]])}function jt(){return gill.getStructDecoder([["accountMeta",ht()],["data",j()]])}function A_(){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 m_(){return gill.combineCodec(Jt(),qt())}function Yn(){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(un())]])}function Zn(){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(An())]])}function f_(){return gill.combineCodec(Yn(),Zn())}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 C_(){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(mn())],["addressTableLookups",gill.getArrayEncoder(xs())]])}function Qt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(yn())],["addressTableLookups",gill.getArrayDecoder(Is())]])}function M_(){return gill.combineCodec(Xt(),Qt())}function xs(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Is(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function b_(){return gill.combineCodec(xs(),Is())}function Xn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function Qn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function U_(){return gill.combineCodec(Xn(),Qn())}function $n(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function es(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function L_(){return gill.combineCodec($n(),es())}var Cs=(a=>(a[a.Ble=0]="Ble",a[a.Cable=1]="Cable",a[a.Hybrid=2]="Hybrid",a[a.Internal=3]="Internal",a[a.Nfc=4]="Nfc",a[a.SmartCard=5]="SmartCard",a[a.Usb=6]="Usb",a))(Cs||{});function $t(){return gill.getEnumEncoder(Cs)}function er(){return gill.getEnumDecoder(Cs)}function N_(){return gill.combineCodec($t(),er())}function rt(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",H()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder($t()))],["wallets",gill.getArrayEncoder(gs())],["role",Ze()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function Y(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",ce()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(er()))],["wallets",gill.getArrayDecoder(ps())],["role",Xe()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function F_(){return gill.combineCodec(rt(),Y())}function xe(){return gill.getStructEncoder([["addressTreeInfo",Vt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ie(){return gill.getStructDecoder([["addressTreeInfo",Ht()],["outputStateTreeIndex",gill.getU8Decoder()]])}function j_(){return gill.combineCodec(xe(),Ie())}function nt(){return gill.getStructEncoder([["accountMeta",Ct()],["data",rt()]])}function st(){return gill.getStructDecoder([["accountMeta",Et()],["data",Y()]])}function Z_(){return gill.combineCodec(nt(),st())}function Nt(){return gill.getStructEncoder([["accountMeta",Mt()],["data",rt()]])}function wt(){return gill.getStructDecoder([["accountMeta",ht()],["data",Y()]])}function ev(){return gill.combineCodec(Nt(),wt())}function je(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Nt()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([nt()])]])]])}function Je(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([wt()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([st()])]])]])}function sv(){return gill.combineCodec(je(),Je())}function ov(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function cv(e,n){return n.__kind===e}var Ne=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(Ne||{});function Ze(){return gill.getEnumEncoder(Ne)}function Xe(){return gill.getEnumDecoder(Ne)}function dv(){return gill.combineCodec(Ze(),Xe())}var Qc=new Uint8Array([223,179,163,190,177,224,67,173]);function gU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Qc)}function kl(){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:Qc}))}function Lr(){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 pU(){return gill.combineCodec(kl(),Lr())}function $c(e){return gill.decodeAccount(e,Lr())}async function mU(e,n,r){let s=await Es(e,n,r);return gill.assertAccountExists(s),s}async function Es(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return $c(s)}async function yU(e,n,r){let s=await Ll(e,n,r);return gill.assertAccountsExist(s),s}async function Ll(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>$c(t))}var sa=new Uint8Array([90,36,35,219,93,225,110,96]);function SU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(sa)}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",H()],["executor",H()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(H())],["expectedSecp256r1Signers",gill.getArrayEncoder(Ot())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:sa}))}function oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",ce()],["executor",ce()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(ce())],["expectedSecp256r1Signers",gill.getArrayDecoder(Bt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function xU(){return gill.combineCodec($l(),oa())}function ca(e){return gill.decodeAccount(e,oa())}async function aa(e,n,r){let s=await ef(e,n,r);return gill.assertAccountExists(s),s}async function ef(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ca(s)}async function IU(e,n,r){let s=await tf(e,n,r);return gill.assertAccountsExist(s),s}async function tf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ca(t))}var ua=new Uint8Array([105,23,173,2,197,255,80,87]);function DU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ua)}function xf(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:ua}))}function Aa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function PU(){return gill.combineCodec(xf(),Aa())}function ga(e){return gill.decodeAccount(e,Aa())}async function pa(e,n,r){let s=await If(e,n,r);return gill.assertAccountExists(s),s}async function If(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ga(s)}async function MU(e,n,r){let s=await Cf(e,n,r);return gill.assertAccountsExist(s),s}async function Cf(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ga(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 ya(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:ma(r.value)?gill.upgradeRoleToSigner(s):s,...ma(r.value)?{signer:r.value}:{}})}}function ma(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var la=new Uint8Array([8]);function GU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(la)}function vs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:la}))}function fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function zU(){return gill.combineCodec(vs(),fa())}async function Sa(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:vs().encode(c),programAddress:r})}function KU(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:vs().encode(c),programAddress:r})}function jU(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:fa().decode(e.data)}}var Da=new Uint8Array([9]);function $U(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Da)}function Ws(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(qe())],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["compressedProofArgs",gill.getOptionEncoder(C())]]),e=>({...e,discriminator:Da}))}function Pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(Ye())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function eW(){return gill.combineCodec(Ws(),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},i={args:c};t.settings.value||(t.settings.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getU128Encoder().encode(ya(c.settingsIndex))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ws().encode(c),programAddress:r})}function tW(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ws().encode(c),programAddress:r})}function rW(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 va=new Uint8Array([19]);function dW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(va)}function Ua(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(qe())],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:va}))}function Wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Ye())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function uW(){return gill.combineCodec(Ua(),Wa())}function ka(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ua().encode(c),programAddress:r})}function AW(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Wa().decode(e.data)}}var Ba=new Uint8Array([18]);function fW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ba)}function ks(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["settingsCreation",Gt()],["userArgs",je()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Ba}))}function Na(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["settingsCreation",zt()],["userArgs",Je()],["settingsIndex",gill.getU128Decoder()]])}function SW(){return gill.combineCodec(ks(),Na())}async function wa(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:ks().encode(c),programAddress:r})}function xW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:ks().encode(c),programAddress:r})}function IW(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:Na().decode(e.data)}}var Ja=new Uint8Array([0]);function RW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function Os(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",xe()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Ja}))}function qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",Ie()],["compressedProofArgs",E()]])}function bW(){return gill.combineCodec(Os(),qa())}async function Ya(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Os().encode(c),programAddress:r})}function _W(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Os().encode(c),programAddress:r})}function vW(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:qa().decode(e.data)}}var Qa=new Uint8Array([4]);function NW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qa)}function Bs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",ds()],["role",Ze()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder($t())],["userAccountCreationArgs",xe()],["linkWalletArgs",gill.getOptionEncoder(ts())]]),e=>({...e,discriminator:Qa}))}function $a(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",Ft()],["role",Xe()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(er())],["userAccountCreationArgs",Ie()],["linkWalletArgs",gill.getOptionDecoder(rs())]])}function wW(){return gill.combineCodec(Bs(),$a())}async function ei(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:Bs().encode(c),programAddress:r})}function VW(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:Bs().encode(c),programAddress:r})}function HW(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:$a().decode(e.data)}}var ri=new Uint8Array([3]);function JW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function ws(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:ri}))}function ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function qW(){return gill.combineCodec(ws(),ni())}async function si(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(c),a=y(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:ws().encode({}),programAddress:r})}function YW(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(c),a=y(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:ws().encode({}),programAddress:r})}function ZW(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:ni().decode(e.data)}}var ci=new Uint8Array([5]);function nk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ci)}function Hs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(Gn())]]),e=>({...e,discriminator:ci}))}function ai(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(zn())]])}function sk(){return gill.combineCodec(Hs(),ai())}async function ii(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Hs().encode(c),programAddress:r})}function ok(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:Hs().encode(c),programAddress:r})}function ck(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:ai().decode(e.data)}}var Ai=new Uint8Array([17]);function pk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ai)}function gi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",J()],["compressedProofArgs",C()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Ai}))}function pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",q()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function mk(){return gill.combineCodec(gi(),pi())}function mi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:gi().encode(c),programAddress:r})}function yk(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:pi().decode(e.data)}}var li=new Uint8Array([2]);function Ik(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(li)}function fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:li}))}function Si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function Ck(){return gill.combineCodec(fi(),Si())}function xi(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:fi().encode(c),programAddress:r})}function Ek(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:Si().decode(e.data)}}var Di=new Uint8Array([1]);function _k(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Di)}function Gs(){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(os())]]),e=>({...e,discriminator:Di}))}function Pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(cs())]])}function vk(){return gill.combineCodec(Gs(),Pi())}async function Uk(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Gs().encode(c),programAddress:r})}function Mi(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Gs().encode(c),programAddress:r})}function Wk(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:Pi().decode(e.data)}}var bi=new Uint8Array([6]);function Vk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bi)}function _i(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",nt()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",C()]]),e=>({...e,discriminator:bi}))}function vi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",st()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function Hk(){return gill.combineCodec(_i(),vi())}function Ui(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:_i().encode(c),programAddress:r})}function Fk(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:vi().decode(e.data)}}var Li=new Uint8Array([7]);function Yk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Li)}function Oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",nt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["delegateTo",gill.getOptionEncoder(us())],["oldSettingsMutArgs",gill.getOptionEncoder(J())],["newSettingsMutArgs",gill.getOptionEncoder(J())],["compressedProofArgs",C()]]),e=>({...e,discriminator:Li}))}function Bi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",st()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["delegateTo",gill.getOptionDecoder(As())],["oldSettingsMutArgs",gill.getOptionDecoder(q())],["newSettingsMutArgs",gill.getOptionDecoder(q())],["compressedProofArgs",E()]])}function Zk(){return gill.combineCodec(Oi(),Bi())}function Ni(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...a],data:Oi().encode(c),programAddress:r})}function Xk(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:Bi().decode(e.data)}}var Hi=new Uint8Array([32]);function sL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hi)}function Fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",bt()],["compressedProofArgs",C()],["settingsCreationArgs",Gt()]]),e=>({...e,discriminator:Hi}))}function Gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",_t()],["compressedProofArgs",E()],["settingsCreationArgs",zt()]])}function oL(){return gill.combineCodec(Fi(),Gi())}function zi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:Fi().encode(c),programAddress:r})}function cL(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:Gi().decode(e.data)}}var Ji=new Uint8Array([31]);function pL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ji)}function qi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",rt()],["compressedProofArgs",C()],["userCreationArgs",xe()]]),e=>({...e,discriminator:Ji}))}function Yi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Y()],["compressedProofArgs",E()],["userCreationArgs",Ie()]])}function mL(){return gill.combineCodec(qi(),Yi())}function Zi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.authority),...a],data:qi().encode(c),programAddress:r})}function yL(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:Yi().decode(e.data)}}var Qi=new Uint8Array([29]);function CL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qi)}function zs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Qi}))}function $i(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function EL(){return gill.combineCodec(zs(),$i())}async function DL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:zs().encode(c),programAddress:r})}function ed(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:zs().encode(c),programAddress:r})}function PL(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:$i().decode(e.data)}}var nd=new Uint8Array([27]);function UL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(nd)}function sd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:nd}))}function od(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function WL(){return gill.combineCodec(sd(),od())}function cd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:sd().encode(c),programAddress:r})}function kL(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:od().decode(e.data)}}var ud=new Uint8Array([30]);function HL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ud)}function Js(){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(C())],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:ud}))}function Ad(){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(E())],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function FL(){return gill.combineCodec(Js(),Ad())}async function GL(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(O(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Js().encode(c),programAddress:r})}function gd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:Js().encode(c),programAddress:r})}function zL(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:Ad().decode(e.data)}}var fd=new Uint8Array([28]);function XL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(fd)}function qs(){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($())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:fd}))}function Sd(){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(ee())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function QL(){return gill.combineCodec(qs(),Sd())}async function $L(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.source.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getAddressEncoder().encode(O(t.tokenProgram.value)),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(O(t.destination.value)),gill.getBytesEncoder().encode(new Uint8Array([9,21,163,87,35,121,78,143,182,93,7,91,107,114,105,156,56,221,2,229,148,139,117,176,229,160,65,142,128,151,91,68])),gill.getAddressEncoder().encode(O(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:qs().encode(c),programAddress:r})}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},source:{value:e.source??null,isWritable:false},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},sourceCtokenTokenAccount:{value:e.sourceCtokenTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},destinationCtokenTokenAccount:{value:e.destinationCtokenTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},compressedTokenProgramAuthority:{value:e.compressedTokenProgramAuthority??null,isWritable:false},splInterfacePda:{value:e.splInterfacePda??null,isWritable:true},compressibleConfig:{value:e.compressibleConfig??null,isWritable:false},rentSponsor:{value:e.rentSponsor??null,isWritable:true},compressedTokenProgram:{value:e.compressedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.compressedTokenProgramAuthority.value||(t.compressedTokenProgramAuthority.value="GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy"),t.compressedTokenProgram.value||(t.compressedTokenProgram.value="cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceSplTokenAccount),o(t.sourceCtokenTokenAccount),o(t.destination),o(t.destinationSplTokenAccount),o(t.destinationCtokenTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.compressedTokenProgramAuthority),o(t.splInterfacePda),o(t.compressibleConfig),o(t.rentSponsor),o(t.compressedTokenProgram),...a],data:qs().encode(c),programAddress:r})}function eO(e){if(e.accounts.length<17)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:s(),destinationCtokenTokenAccount:s(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:s(),compressibleConfig:r(),rentSponsor:s(),compressedTokenProgram:r()},data:Sd().decode(e.data)}}var Ed=new Uint8Array([13]);function aO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ed)}function Dd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Ed}))}function Pd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function iO(){return gill.combineCodec(Dd(),Pd())}function Md(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Dd().encode(c),programAddress:r})}function dO(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:Pd().decode(e.data)}}var bd=new Uint8Array([23]);function TO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bd)}function _d(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:bd}))}function vd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function lO(){return gill.combineCodec(_d(),vd())}function Ud(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:_d().encode(c),programAddress:r})}function fO(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:vd().decode(e.data)}}var Ld=new Uint8Array([10]);function PO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ld)}function Od(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Yt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Ld}))}function Bd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function MO(){return gill.combineCodec(Od(),Bd())}function Nd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Od().encode(c),programAddress:r})}function hO(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:Bd().decode(e.data)}}var Hd=new Uint8Array([20]);function kO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hd)}function Fd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Yt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Kt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Hd}))}function Gd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Zt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",jt()],["compressedProofArgs",E()]])}function LO(){return gill.combineCodec(Fd(),Gd())}function zd(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Fd().encode(c),programAddress:r})}function OO(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Gd().decode(e.data)}}var Jd=new Uint8Array([14]);function GO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jd)}function qd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Jd}))}function Yd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function zO(){return gill.combineCodec(qd(),Yd())}function Zd(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:qd().encode(c),programAddress:r})}function KO(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:Yd().decode(e.data)}}var $d=new Uint8Array([24]);function QO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($d)}function eu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:$d}))}function tu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function $O(){return gill.combineCodec(eu(),tu())}function ru(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:eu().encode(c),programAddress:r})}function eB(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:tu().decode(e.data)}}var ou=new Uint8Array([12]);function cB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ou)}function cu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:ou}))}function au(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function aB(){return gill.combineCodec(cu(),au())}function iu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:cu().encode(c),programAddress:r})}function iB(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:au().decode(e.data)}}var Au=new Uint8Array([22]);function mB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Au)}function gu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Au}))}function pu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function yB(){return gill.combineCodec(gu(),pu())}function mu(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:gu().encode(c),programAddress:r})}function TB(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:pu().decode(e.data)}}var lu=new Uint8Array([11]);function EB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lu)}function fu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:lu}))}function Su(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function DB(){return gill.combineCodec(fu(),Su())}function xu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:fu().encode(c),programAddress:r})}function PB(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Su().decode(e.data)}}var Eu=new Uint8Array([21]);function UB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Eu)}function Du(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",Kt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Eu}))}function Pu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",jt()],["compressedProofArgs",E()]])}function WB(){return gill.combineCodec(Du(),Pu())}function Mu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Du().encode(c),programAddress:r})}function kB(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:Pu().decode(e.data)}}var bu=new Uint8Array([15]);function VB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bu)}function _u(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:bu}))}function vu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function HB(){return gill.combineCodec(_u(),vu())}function Uu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},i=m({}),a=y(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:_u().encode({}),programAddress:r})}function FB(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:vu().decode(e.data)}}var Lu=new Uint8Array([25]);function qB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Lu)}function Ou(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Lu}))}function Bu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function YB(){return gill.combineCodec(Ou(),Bu())}function Nu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:Ou().encode(c),programAddress:r})}function ZB(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:Bu().decode(e.data)}}var Hu=new Uint8Array([16]);function nN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Hu)}function Fu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Xt()],["secp256r1VerifyArgs",gill.getArrayEncoder($())]]),e=>({...e,discriminator:Hu}))}function Gu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Qt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function sN(){return gill.combineCodec(Fu(),Gu())}function zu(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Fu().encode(c),programAddress:r})}function oN(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:Gu().decode(e.data)}}var Ju=new Uint8Array([26]);function gN(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ju)}function qu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Xt()],["secp256r1VerifyArgs",gill.getArrayEncoder($())],["settingsMutArgs",J()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Ju}))}function Yu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Qt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsMutArgs",q()],["compressedProofArgs",E()]])}function pN(){return gill.combineCodec(qu(),Yu())}function Zu(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=y(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:qu().encode(c),programAddress:r})}function mN(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:Yu().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",VE=(c=>(c[c.DomainConfig=0]="DomainConfig",c[c.GlobalCounter=1]="GlobalCounter",c[c.Settings=2]="Settings",c[c.TransactionBuffer=3]="TransactionBuffer",c[c.WhitelistedAddressTree=4]="WhitelistedAddressTree",c))(VE||{});function QN(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([201,232,212,229,59,241,106,197])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([42,206,176,58,175,129,130,233])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([223,179,163,190,177,224,67,173])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([90,36,35,219,93,225,110,96])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(new Uint8Array([105,23,173,2,197,255,80,87])),0))return 4;throw new Error("The provided account could not be identified as a multiWallet account.")}var HE=(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))(HE||{});function $N(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 GE=6e3,zE=6001,KE=6002,jE=6003,JE=6004,qE=6005,YE=6006,ZE=6007,XE=6008,QE=6009,$E=6010,eD=6011,tD=6012,rD=6013,nD=6014,sD=6015,oD=6016,cD=6017,aD=6018,iD=6019,dD=6020,uD=6021,AD=6022,gD=6023,pD=6024,mD=6025,yD=6026,TD=6027,lD=6028,fD=6029,SD=6030,xD=6031,ID=6032,CD=6033,ED=6034,DD=6035,PD=6036,MD=6037,hD=6038,RD=6039,bD=6040,_D=6041,vD=6042,UD=6043,WD=6044,kD=6045,LD=6046,OD=6047,BD=6048,ND=6049,wD=6050,VD=6051,HD=6052,FD=6053,GD=6054,zD=6055,KD=6056,jD=6057,JD=6058,qD=6059,YD=6060,ZD=6061,XD=6062,QD=6063,$D=6064,eP=6065,tP=6066,rP=6067,nP=6068,sP=6069,oP=6070,cP=6071,aP=6072,iP=6073,dP=6074,uP=6075,AP=6076,gP=6077,pP=6078,mP=6079,yP=6080,TP=6081,lP=6082,fP=6083,SP=6084,xP=6085,IP=6086,Xu;process.env.NODE_ENV!=="production"&&(Xu={[xD]:"This member is already delegated to another wallet.",[ZE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[gP]:"Clock sysvar access failed. This may indicate a system error.",[VD]:"Missing credential id.",[FD]:"The domain configuration account is disabled. Please contact support or try again later.",[GD]:"Missing domain configuration account.",[uP]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[IP]:"Duplicate address tree detected. This address tree is already in the whitelist.",[$E]:"Duplicate public keys detected among members. Each member must have a unique key.",[QE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[uD]:"No members provided. A multisig wallet must contain at least one member.",[YD]:"Slot numbers list is empty. At least one slot number is required for validation.",[aD]:"Expected a User with Administrator role for this instruction.",[XE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[oD]:"Expected a User with Transaction Manager role for this instruction.",[bD]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[_D]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[vD]:"Declared buffer size does not match the actual serialized size.",[qD]:"Failed to compute hash. This may indicate a system error.",[ED]:"Not enough members with vote permission to meet the approval threshold.",[ID]:"At least one signer with execute permission is required to proceed.",[CD]:"At least one signer with initiate permission is required to perform this action.",[yD]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[dP]:"Invalid account index in transaction message. The account index is out of bounds.",[jD]:"Address Tree supplied is not part of the whitelisted address trees.",[iD]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[lD]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[RD]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[ZD]:"Member key conversion failed. The provided key format is invalid.",[DD]:"Only delegated members are allowed for this transaction.",[mD]:"Unexpected number of accounts provided for this instruction.",[rD]:"User with Permanent Member role must have a delegated wallet.",[zE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[JE]:"The extracted public key has an invalid length or encoding.",[GE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[jE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[wD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[BD]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[gD]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[cP]:"Invalid source type for token transfer. The source account type is not supported.",[cD]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[sD]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[pD]:"Malformed transaction message: structure or formatting does not match the expected layout.",[yP]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[TD]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[mP]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[oP]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[qE]:"The extracted WebAuthn signed message payload is malformed.",[LD]:"An input string exceeds the maximum allowed character length.",[zD]:"This member is not registered under the provided domain configuration.",[$D]:"Member not found in settings. Cannot remove a member that does not exist.",[iP]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[fD]:"A required account is missing from the instruction context.",[XD]:"Compressed proof arguments are missing. Required for compressed account operations.",[rP]:"Missing compressed token account. Required for token transfer operations.",[TP]:"Missing destination token account. Required for token transfer operations.",[sP]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[QD]:"Light CPI accounts are missing. Required for compressed account operations.",[SD]:"User mutation arguments are required when performing add or remove delegate operations.",[SP]:"Missing new authority account. Required for domain configuration updates.",[fP]:"Missing settings account. Required for delegate operations on compressed wallets.",[JD]:"Compressed settings data is missing. The settings account must be initialized with data.",[lP]:"Missing source token account. Required for token transfer operations.",[nP]:"Missing SPL interface PDA. Required for token transfer operations.",[OD]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[AP]:"User account address is missing. Required for secp256r1 signature verification.",[xP]:"Missing whitelisted address trees account. Required for domain configuration updates.",[MD]:"No valid signer found in this transaction.",[dD]:"Only one administrator is allowed per wallet.",[tD]:"Only one permanent member is allowed per wallet.",[nD]:"Only one transaction manager is allowed per wallet.",[KD]:"The given origin index is not in the whitelisted origins.",[tP]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[eD]:"Permanent members cannot be removed from a wallet.",[kD]:"Writable CPI calls to protected accounts are not permitted.",[YE]:"The rpIdHash extracted from the signed message does not match the expected value.",[eP]:"Settings key mismatch. The provided settings key does not match the expected value.",[KE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[ND]:"The specified slot number was not found in the provided slot history.",[aP]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[AD]:"Too many members: a maximum of 4 members are supported.",[UD]:"This transaction has expired. It must be executed within 3 minutes of approval.",[WD]:"This transaction has not yet reached the required approval threshold.",[HD]:"Missing transports.",[hD]:"Only the transaction creator or rent payer may close this transaction buffer.",[pP]:"Unauthorized: Only the admin account is allowed to perform this action.",[PD]:"Member is not part of the expected signers for this transaction."});function ow(e){return process.env.NODE_ENV!=="production"?Xu[e]:"Error message not available in production bundles."}function cw(e,n,r){return gill.isProgramError(e,n,A,r)}async function lw({admin:e,addressTree:n}){return Sa({payer:e,addressTree:n,remainingAccounts:[]})}var nr={Ed25519:1,Secp256r1:2};var Qu=f__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),Ew=f__default.default.object({transactionActionType:Qu,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(),$u=f__default.default.object({transactionActionType:Qu,transactionAddress:f__default.default.string(),transactionMessageBytes:f__default.default.string()}).strict(),eA=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(),tA=f__default.default.object({signer:f__default.default.string(),userAddressTreeIndex:f__default.default.number().optional(),additionalInfo:f__default.default.looseObject({}).optional()}).strict(),CP=f__default.default.object({transactionPayload:$u,slotHash:f__default.default.string(),slotNumber:f__default.default.string(),originIndex:f__default.default.number(),crossOrigin:f__default.default.boolean()}).strict(),Dw=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(),Pw=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:$u}).strict()}).strict(),Mw=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("message"),payload:tA.extend(eA.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(),hw=f__default.default.object({phase:f__default.default.literal("complete"),data:f__default.default.object({type:f__default.default.literal("transaction"),payload:tA.extend(eA.shape).extend(CP.shape).extend({clientSignature:f__default.default.object({clientOrigin:f__default.default.string()}).strict()})}).strict()}).strict();var ve={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},we=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,s)=>r|s,0))}static all(){return new e(Object.values(ve).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Xs=33,Ve=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!==Xs)throw new Error(`Invalid public key length, expected ${Xs} 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===Xs)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 Ve{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 PP(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function MP(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var nA=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(PP())],["addressTableLookups",gill.getArrayCodec(MP())]]);function sA(e){return nA.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 oA(e){let n=nA.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var re={};function cA(){if(!re.solanaRpcEndpoint)throw new Be("RPC endpoint");return re.solanaRpcEndpoint}function Me(){if(!re.lightProtocolRpc)throw new Be("Light Protocol RPC");return re.lightProtocolRpc}function ne(){if(!re.solanaRpc)throw new Be("Solana RPC");return re.solanaRpc}function aA(){if(!re.sendAndConfirm)throw new Be("Send and confirm transaction function");return re.sendAndConfirm}function iA(){if(!re.computeEstimate)throw new Be("Compute budget estimate function");return re.computeEstimate}function $s(){return re.jitoTipsConfig?re.jitoTipsConfig:{blockEngineUrl:Ro,getJitoTipsUrl:bo,priority:_o}}function Xw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){re.solanaRpcEndpoint=e,re.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});re.solanaRpc=t,re.sendAndConfirm=c,re.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:t}),re.jitoTipsConfig=s??null;}async function sr(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 or(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 d2(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 u2(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 A2(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Fe(n)),c=JSON.parse(new TextDecoder().decode(Fe(r))),i=AA(c),a=pA(new Uint8Array(Fe(s))),o=await mt({rpIdHash:t.subarray(0,32)});return new P(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Fe(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:eo(e.clientSignature.clientOrigin,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function eo(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function m2(e){return sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(JSON.stringify(e))))}function y2(e){return to(e.data.payload.authResponse)}function T2(e,n,r,s){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...eo(n,r,s)]))}async function l2(e,n,r,s,t,c){let i;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 oe("Slot sysvar","Unable to fetch slot sysvar data");let u=gill.getBase64Encoder().encode(o[0]);c=gill.getU64Decoder().decode(u.subarray(0,8)).toString(),i=u.subarray(8,40),t=gill.getBase58Decoder().decode(i);}else i=new Uint8Array(gill.getBase58Encoder().encode(t));let a=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...sha2_js.sha256(typeof e.transactionMessageBytes=="string"?new Uint8Array(Fe(e.transactionMessageBytes)):e.transactionMessageBytes),...i,...eo(n,r,s)]));return {slotNumber:c,slotHash:t,challenge:a}}function to(e){return sha2_js.sha256(Jr(e))}function f2(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Fe(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return c}async function S2(e,n){let{data:r}=await No(ne(),e),t=gA(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 NP(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 AA(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 gA(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function pA(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let I=n&127;r+=I;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),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)),b=(l>p?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),x=NP(b);return new Uint8Array([...g,...x])}function Jr(e){return new Uint8Array([...new Uint8Array(Fe(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Fe(e.response.clientDataJSON)))])}var wP={backoffBase:2,maxDelayMs:3e4,retryOnRateLimit:true};function VP(e,n,r=2,s=3e4){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function HP(e){return new Promise(n=>setTimeout(n,e))}async function ar(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t=2,maxDelayMs:c=3e4,shouldRetry:i}={...wP,...n},a;for(let o=1;o<=r;o++)try{return await e()}catch(u){if(a=u,i&&!i(u,o))throw u;if(o>=r)break;let d=VP(o,s,t,c);await HP(d);}throw new lr(e.name||"retryWithBackoff",r,a)}async function yt(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 ar(e,{...n,shouldRetry:n.shouldRetry??r})}function yA(e,n,r,s){if(e<n||e>r)throw new K(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function TA(e,n){if(e<0)throw new K(`${n} must be non-negative, got ${e}`)}function ir(e,n){if(e.length===0)throw new K(`${n} cannot be empty`)}function lA(e,n){if(e.trim().length===0)throw new K(`${n} cannot be empty`)}async function ro(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 i=Math.ceil((s.unitsConsumed??0)*1.1);return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function xA(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function IA(e,n){ir(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new K(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await yt(()=>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 sr(r,n);let s=await or(r);if(!s.result||s.error)throw new me(`Unable to simulate bundle: ${JSON.stringify(s.error??s.result)}`);if(typeof s.result.value.summary!="string"&&s.result.value.summary.failed){let{TransactionFailure:t}=s.result.value.summary.failed.error,[,c]=t;throw new me(`Simulation failed: ${c}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function Z(e,n=0){let r=e instanceof P?e:void 0,s=r?.verifyArgs&&n!==-1?gill.some({signedMessageIndex:n,truncatedClientDataJson:r.verifyArgs.truncatedClientDataJson,slotNumber:r.verifyArgs.slotNumber,originIndex:r.originIndex,crossOrigin:r.crossOrigin,clientAndDeviceHash:r.clientAndDeviceHash}):gill.none(),t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs.clientDataJson?Jr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function he(e){if(e instanceof Ve)return {keyType:nr.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:nr.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function SA(e){return e instanceof P?e.toString():e.address.toString()}function fe(e){let n=new Set,r=[];for(let t of e)n.has(SA(t))||(r.push(t),n.add(SA(t)));let s=r.filter(t=>t instanceof P);if(s.length>1)throw new K(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function CA({payer:e,tipAmount:n}){let r=an[Math.floor(Math.random()*an.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function EA(e){return typeof e=="string"?e:e.toString()}function DA(e){return e.toString()}async function no(e,n,r){let s=e?.get(n);if(s)return s;let t=await r();return t&&e&&e.set(n,t),t}var B=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=await Me().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,u=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=u);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function qr(e,n){let r=EA(e);return no(n,r,()=>Me().getCompressedAccount(e))}async function ct(e,n){let r=DA(e);return no(n,r,()=>ne().getAccountInfo(e,{encoding:"base64"}).send())}async function ye(e,n){let s=(await Promise.all(e.map(async t=>qr(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new oe("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 U(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function Ae(e,n,r,s,t){if(t.length===0)return [];let c=t.map((u,d)=>({treeInfo:n[d],root:r[d],rootIndex:s[d],address:u.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],c),a=await e.getOutputTreeIndex();return t.map((u,d)=>({addressTreeInfo:i[d],outputStateTreeIndex:a,address:u.address,type:u.type}))}function de(e,n,r,s,t,c,i){let a=[];for(let d=0;d<n.length;d++)a.push({treeInfo:n[d],rootIndex:s[d],leafIndex:r[d],proveByIndex:t[d],hash:c[d].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new K("Unable to parse state tree data");return c.map((d,g)=>({data:i.decode(d.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(d.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function Re(e,n,r,s,t){let c=null,i=null,a=null,o=new B;if(e){await o.addSystemAccounts();let{address:u}=await ae(n,r),d=(await ye([{address:u,type:"Settings"}],t))[0];s?a={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:a=await w([d],[]);let g=o.packTreeInfos([{treeInfo:a.treeInfos[0],rootIndex:a.rootIndices[0],leafIndex:a.leafIndices[0],proveByIndex:a.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!g)throw new K("Unable to parse state tree data");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0]},data:j().decode(d.data?.data)},i={accountMeta:{address:new Uint8Array(d.address),treeInfo:g.packedTreeInfos[0],outputStateTreeIndex:g.outputTreeIndex},data:j().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:a,packedAccounts:o,settingsMutArgs:i}}async function w(e,n,r=3,s=500){return ar(()=>Me().getValidityProofV0(e,n),{maxRetries:r,initialDelayMs:s})}async function be(){return (await Yr()).length-1}var so;async function Yr(){if(!so){let{data:e}=await pa(ne(),await RA());so=e.whitelistedAddressTrees;}return so}function hA(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 ur(e,n,r){let s=await AM(e,n,r);if(!s)throw new oe("User account");return s}async function AM(e,n,r){let{address:s}=await N(e,n),t=await qr(s,r);return t?.data?.data?Y().decode(t.data.data):null}async function l5(e,{member:n,credentialId:r}){let s=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)s.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(he(n)))}});else if(r)s.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(new Uint8Array(browser.base64URLStringToBuffer(r)))}});else return null;let t=await Me().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:s});return t.items.filter(c=>!!c.data).length?t.items.map(c=>Y().decode(c.data?.data))[0]:null}async function Zr(e,n,r){let s=await gM(e,n,r);if(!s)throw new oe("Settings account");return s}async function gM(e,n,r){try{let{address:s}=await ae(e,n),t=await qr(s,r);if(!t?.data?.data)throw new oe("Compressed settings account");let c=j().decode(t.data.data);if(c.data.__option==="None")throw new oe("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let s=await Es(ne(),await ue(e));return s.exists?{...s.data,isCompressed:false}:null}}async function f5(e,n,r){let s=await ur(e,n,r);if(s.role===1||s.role===0){let t=[],[c,i]=await Promise.all([Me().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(H().encode(he(e)))}}]}),ne().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(H().encode(he(e)))}}]}).send()]);return c.items.forEach(a=>{if(a.data?.data){let o=j().decode(a.data.data);o.data.__option==="Some"&&t.push({...o.data.value,isCompressed:true});}}),i.forEach(a=>{let o=Lr().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...o,isCompressed:false});}),t}else return await Promise.all(s.wallets.map(t=>Zr(t.index,t.settingsAddressTreeIndex,r)))}async function co(e){TA(e,"index");let n=await Yr();if(e>=n.length)throw new K(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function S5(e){let r=(await Yr()).findIndex(s=>s.toString()===e);if(r===-1)throw new oe("Address tree",`Address ${e} not found in whitelist`);return r}async function ae(e,n=0){let r=await co(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 co(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof Ve?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 mt({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new K("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function kA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function RA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function LA(e,n,r){yA(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 Ve?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ue(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function ue(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function v5(e){let n=await ue(e);return await Ue(n)}async function U5(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function F5(e){ir(e,"bundle");let n=await ro(e,true),r=await IA(n.map(gill.getBase64EncodedWireTransaction),cA()),s=await ro(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await yM(s.map(gill.getBase64EncodedWireTransaction))}async function yM(e,n=3,r=500,s=$s()){ir(e,"serializedTransactions");let{blockEngineUrl:t}=s,c=`${t}/bundles`,i=await yt(()=>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 sr(i,c);let a=await or(i);if(a.error)throw new me(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);if(!a.result)throw new me("No bundle ID returned from Jito");return a.result}async function G5(e,n=30,r=3e3,s=$s()){lA(e,"bundleId");let{blockEngineUrl:t}=s,c=`${t}/getBundleStatuses`;return ar(async()=>{let i=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await sr(i,c);let a=await or(i);if(a.error)throw new me(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new me("Bundle not yet confirmed",e);let o=a.result.value[0];if(o.confirmation_status==="confirmed"||o.confirmation_status==="finalized"){let u=o.transactions[o.transactions.length-1];if(!u)throw new me("No transactions in confirmed bundle",e);return u}throw new me(`Bundle status: ${o.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:i=>i instanceof me||i instanceof De})}async function Z5({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[i,a]=await Promise.all([iA()(c),xA(ne(),c.instructions.flatMap(u=>u.accounts??[]))]),o=Math.ceil(i*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await aA()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function g6(e,n){if(n.threshold>1)throw new K("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(o=>NA(o.pubkey)===e);if(!r)throw new oe("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new oe("Permissions","No permissions found for the current member");let t=we.has(s,ve.InitiateTransaction),c=we.has(s,ve.VoteTransaction),i=we.has(s,ve.ExecuteTransaction);if(t&&c&&i)return {};if(!c||!i)throw new fr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(o=>o.role===0);if(!a)throw new oe("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(NA(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function p6({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await ur(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new oe("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return WM(n,c.transactionManagerUrl.value,e,s)}function WM(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let i=await yt(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),{maxRetries:3,initialDelayMs:500});if(!i.ok)throw new De(`Transaction manager request failed: ${i.statusText}`,i.status,n);let a=await i.json();if("error"in a)throw new De(`Transaction manager error: ${a.error}`,i.status,n);return a.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function NA(e){return e.keyType===nr.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function m6(e){let n=e.map(c=>qe().encode(c)),r=4+n.reduce((c,i)=>c+i.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)s.set(c,t),t+=c.length;return s}function y6(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let c=0;c<r;c++){let i=Ye().read(e,n);t[c]=i[0],n=i[1];}if(n!==e.length)throw new K(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function v6({payer:e,rpId:n,origins:r,authority:s}){let t=await mt({rpId:n}),c=new B;await c.addSystemAccounts();let i=await be(),{address:a,addressTree:o}=await N(s.address,i),u=[{address:a,tree:o,queue:o,type:"User"}],d=await w([],u),g=(await Ae(c,d.treeInfos,d.roots,d.rootIndices,u))[0],{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=U(d,l);return await Ya({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function G6({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await ae(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await ye(i,t):[],o=await be(),{address:u,addressTree:d}=await N(r.member,o),g=[{address:u,type:"User",tree:d,queue:d}],p=await w(a,g),l=null,S=null,b=a.filter(z=>z.type==="Settings"),x=a.filter(z=>z.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,j())[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,Y())[0]);let I=await Ae(c,p.treeInfos.slice(a.length),p.roots.slice(a.length),p.rootIndices.slice(a.length),g),{remainingAccounts:_,systemOffset:v}=c.toAccountMetas(),D=U(p,v);return await ei({payer:n,authority:e,compressedProofArgs:D,member:Ft().decode(r.member.toBuffer()),credentialId:new Uint8Array(browser.base64URLStringToBuffer(r.credentialId)),transports:r.transports,role:r.role,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:I[0],domainConfig:s,remainingAccounts:_})}async function J6({payer:e}){let n=await kA();return si({payer:e,globalCounter:n})}async function X6({admin:e,rpId:n,disable:r}){let s=await mt({rpId:n});return xi({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function sV({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await ae(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await w([],a),u=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=U(o,g);return zi({compressedProofArgs:p,args:e,authority:n,settingsCreationArgs:u,remainingAccounts:d})}async function AV({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new B;await t.addSystemAccounts();let{address:c,addressTree:i}=await N(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await w([],a),u=(await Ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:d,systemOffset:g}=t.toAccountMetas(),p=U(o,g);return Zi({compressedProofArgs:p,args:e,authority:n,userCreationArgs:u,remainingAccounts:d})}function OM(e,n,r,s){let t=BM(e,n),c=NM(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 BM(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function NM(e,n){return n<e.header.numSignerAccounts}async function Qr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=oA(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(a=>a.lookupTableAddress),ne()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,o]of t.staticAccounts.entries())i.push({address:o,role:OM(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let u of a.writableIndexes){let d=o[u];if(!d)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${u}`);i.push({address:d,role:gill.AccountRole.WRITABLE});}for(let u of a.readonlyIndexes){let d=o[u];if(!d)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${u}`);i.push({address:d,role:gill.AccountRole.READONLY});}}for(let a of s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(u=>u.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}var lt=33,ft=64,Ao=14,KM=2,jM=gill.address("Secp256r1SigVerify1111111111111111111111111");function JM(){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 qM(){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 zA(){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=qM();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=Ao;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),lt).decode(e,n);n+=lt;let u=gill.fixDecoderSize(gill.getBytesDecoder(),ft).decode(e,n);n+=ft;let d=t[a].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),d).decode(e,n);n+=d,i.push({publicKey:o,signature:u,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function KA(){return gill.createEncoder({getSizeFromValue:e=>{let n=Ao*e.offsets.length,r=e.payload.reduce((s,t)=>s+lt+ft+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=JM();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),lt).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),ft).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function MV(){return gill.combineCodec(KA(),zA())}function V(e,n){let r=e.length,s=KM+r*Ao,t=[];for(let o=0;o<r;o++){let{message:u}=e[o],d=s,g=d+lt,p=g+ft;t.push({publicKeyOffset:d,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:u.length,messageInstructionIndex:65535}),s+=lt+ft+u.length;}let c=n?.programAddress??jM,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:KA().encode(i)}}function hV(e){return {programAddress:e.programAddress,accounts:{},data:zA().decode(e.data)}}async function jA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let u=await Ue(e),{accountMetas:d,addressLookupTableAccounts:g}=await Qr({transactionMessageBytes:r,walletAddress:u,additionalSigners:i,addressesByLookupTableAddress:t}),p=[];return c.length>0&&p.push(V(c)),p.push(o?Nu({transactionBuffer:n,payer:s.address,remainingAccounts:d,settingsKey:e}):Uu({transactionBuffer:n,payer:s.address,settings:e})),a&&p.push(CA({payer:s,tipAmount:a})),{instructions:p,addressLookupTableAccounts:g}}async function JA({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:u}){let d=fe(s),g=await ue(e),p=await Ue(g),[{accountMetas:l,addressLookupTableAccounts:S,transactionMessage:b},{settingsMutArgs:x,proof:I,packedAccounts:_}]=await Promise.all([Qr({transactionMessageBytes:r,walletAddress:p,additionalSigners:d.filter(te=>!(te instanceof P)),addressesByLookupTableAddress:c}),Re(a,e,n,o,u)]);_.addPreAccounts(l);let v=d.filter(te=>te instanceof P),{secp256r1VerifyArgs:D}=ZM(v,i,_),{remainingAccounts:z,systemOffset:X}=_.toAccountMetas();return {instructions:XM({secp256r1VerifyInput:i,transactionMessage:b,accountMetas:l,compressed:a,payer:t,settingsMutArgs:x,proof:I,systemOffset:X,secp256r1VerifyArgs:D,settings:g,remainingAccounts:z}),addressLookupTableAccounts:S}}function ZM(e,n,r){let s=[];for(let t of e){let c=n.length,{domainConfig:i,verifyArgs:a,signature:o,publicKey:u,message:d}=Z(t,c);d&&o&&u&&n.push({message:d,signature:o,publicKey:u}),i&&(r.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]),a.__option==="Some"&&s.push({domainConfigKey:i,verifyArgs:a.value}));}return {secp256r1VerifyArgs:s}}function XM({secp256r1VerifyInput:e,transactionMessage:n,accountMetas:r,compressed:s,payer:t,settingsMutArgs:c,proof:i,systemOffset:a,secp256r1VerifyArgs:o,settings:u,remainingAccounts:d}){let g=[];e.length>0&&g.push(V(e));let p=QM(n,r);if(s){if(!t||!c)throw new Error("Payer not found or proof args is missing.");let l=U(i,a);g.push(Zu({secp256r1VerifyArgs:o,transactionMessage:p,settingsMutArgs:c,compressedProofArgs:l,payer:t,remainingAccounts:d}));}else g.push(zu({secp256r1VerifyArgs:o,settings:u,transactionMessage:p,remainingAccounts:d}));return g}function QM(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 XV({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=fe(s),u=await ue(e),d=await Ue(u),[{packedAccounts:g,proof:p,settingsMutArgs:l},{value:S}]=await Promise.all([Re(a,e,n,false,t),ct(d,t)]);if((S?.lamports??0)<BigInt(c))throw new Error("Insufficient balance");let b=[],x=[];for(let D of o)if(D instanceof P){let z=b.length,{domainConfig:X,verifyArgs:ie,signature:te,publicKey:Te,message:le}=Z(D,z);le&&te&&Te&&b.push({message:le,signature:te,publicKey:Te}),X&&(g.addPreAccounts([{address:X,role:gill.AccountRole.READONLY}]),ie.__option==="Some"&&x.push({domainConfigKey:X,verifyArgs:ie.value}));}else g.addPreAccounts([{address:D.address,role:gill.AccountRole.READONLY_SIGNER,signer:D}]);let{remainingAccounts:I,systemOffset:_}=g.toAccountMetas(),v=[];if(b.length>0&&v.push(V(b)),a){if(!i||!l)throw new Error("Payer not found or proof args is missing.");let D=U(p,_);v.push(cd({amount:c,settingsMutArgs:l,compressedProofArgs:D,payer:i,secp256r1VerifyArgs:x,source:d,destination:r,remainingAccounts:I}));}else v.push(ed({amount:c,secp256r1VerifyArgs:x,source:d,destination:r,settings:u,remainingAccounts:I}));return v}var sh=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),oh=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),en=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function u8({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,splInterfacePdaArgs:u={index:0,restricted:false},compressed:d=false}){let g=fe(t),p=await ue(e),l=await Ue(p),S=W=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(W),gill.getAddressEncoder().encode(en),gill.getAddressEncoder().encode(s)],programAddress:en}),b=()=>{let W=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(s)];return u.restricted&&W.push(gill.getUtf8Encoder().encode("restricted")),u.index>0&&W.push(gill.getU8Encoder().encode(u.index)),W},[x,[I],_,[v],[D]]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,l,o),S(l),programs.getAssociatedTokenAccountAddress(s,r,o),S(r),gill.getProgramDerivedAddress({seeds:b(),programAddress:en})]),[z,X,ie,te]=await Promise.all([ct(_,c),ct(x,c),ct(I,c),ih(d,e,n,c)]),Te=!!z.value,le=!!X.value,Ge=!!ie.value,_e=le?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(X.value.data[0])).amount:BigInt(0),ut=BigInt(Ge?dh(new Uint8Array(gill.getBase64Encoder().encode(ie.value.data[0])))?.amount??0:0),Ar=Te?_:void 0,sn=Te?void 0:v,St=le&&(_e+ut<BigInt(i)||ut>BigInt(0)||!Te)||!le&&Te,T=!Te,[pe,fo]=await Promise.all([ah(l,s,_e,ut,BigInt(i),d?3:4),ch(St,D,c)]),Q=pe.reduce((W,se)=>W+se.parsed.amount.toNumber(),0);if(_e+ut+BigInt(Q)<BigInt(i))throw new Error("Insufficient balance");let At=null,We=null,ke=new B;if(fo&&ke.addPreAccounts([{address:s,role:gill.AccountRole.WRITABLE}]),te||pe.length){await ke.addSystemAccounts();let W=[];if(pe.length&&W.push(...pe.map(se=>({hash:se.compressedAccount.hash,tree:se.compressedAccount.treeInfo.tree,queue:se.compressedAccount.treeInfo.queue,data:se.compressedAccount.data,address:se.compressedAccount.address}))),te&&W.push(te),We=await w(W,[]),te){let se=pe.length;At=de(ke,We.treeInfos.slice(se),We.leafIndices.slice(se),We.rootIndices.slice(se),We.proveByIndices.slice(se),W.slice(se),j())[0];}}let gg=pe.length&&We?gill.some(pe.map((W,se)=>({isFrozen:W.parsed.state===programs.AccountState.Frozen,hasDelegate:W.parsed.delegate!=null,amount:W.parsed.amount.toNumber(),merkleContext:{leafIndex:W.compressedAccount.leafIndex,merkleTreePubkeyIndex:ke.insertOrGet(W.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:ke.insertOrGet(W.compressedAccount.treeInfo.queue.toString()),proveByIndex:W.compressedAccount.proveByIndex},rootIndex:We.rootIndices[se],version:hA(W.compressedAccount.data?.discriminator),tlv:W.parsed.tlv?gill.some(gill.getArrayDecoder(Lt()).decode(W.parsed.tlv)):gill.none()}))):gill.none(),gr=[],So=[];for(let W of g)if(W instanceof P){let se=gr.length,{domainConfig:on,verifyArgs:Io,signature:Co,publicKey:Eo,message:Do}=Z(W,se);Do&&Co&&Eo&&gr.push({message:Do,signature:Co,publicKey:Eo}),on&&(ke.addPreAccounts([{address:on,role:gill.AccountRole.READONLY}]),Io.__option==="Some"&&So.push({domainConfigKey:on,verifyArgs:Io.value}));}else ke.addPreAccounts([{address:W.address,role:gill.AccountRole.READONLY_SIGNER,signer:W}]);let{remainingAccounts:pg,systemOffset:mg}=ke.toAccountMetas(),pr=[];gr.length>0&&pr.push(V(gr));let yg=U(We,mg),Tg=St?D:void 0,lg=T?oh:void 0,fg=St?gill.some(u):gill.none(),xo={amount:i,secp256r1VerifyArgs:So,source:l,destination:r,sourceCtokenTokenAccount:I,sourceSplTokenAccount:x,destinationCtokenTokenAccount:sn,destinationSplTokenAccount:Ar,mint:s,tokenProgram:o,remainingAccounts:pg,payer:a,sourceCompressedTokenAccounts:gg,compressedProofArgs:yg,compressibleConfig:sh,splInterfacePda:Tg,rentSponsor:lg,splInterfacePdaArgs:fg};if(d){if(!At)throw new Error("Payer not found or proof args is missing.");pr.push(xd({...xo,settingsMutArgs:At}));}else pr.push(gd({...xo,settings:p}));return pr}async function ch(e,n,r){if(!e)return false;let{value:s}=await ct(n,r);return !s}async function ah(e,n,r,s,t,c){let i=t-r-s;if(i<=0)return [];let o=(await Me().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(g=>!!g.compressedAccount.data?.data.length&&g.compressedAccount.owner.toString()===en.toString()&&!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>=i)break;u+=BigInt(g.parsed.amount.toNumber()),d.push(g);}if(u<i)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 ih(e,n,r,s){if(!e)return null;let{address:t}=await ae(n,r);return (await ye([{address:t,type:"Settings"}],s))[0]}function dh(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 I8({signers:e,payer:n,changeConfigArgs:r}){let{index:s,configActions:t,compressed:c,packedAccounts:i,proof:a,settingsMutArgs:o}=r,u=fe(e),d=u.filter(_=>!(_ instanceof P));i.addPreAccounts(d.map(_=>({address:_.address,role:gill.AccountRole.READONLY_SIGNER,signer:_})));let g=u.filter(_=>_ instanceof P),p=[],l=[];for(let _ of g){let v=l.length,{domainConfig:D,verifyArgs:z,signature:X,publicKey:ie,message:te}=Z(_,v);te&&X&&ie&&l.push({message:te,signature:X,publicKey:ie}),D&&(i.addPreAccounts([{address:D,role:gill.AccountRole.READONLY}]),z.__option==="Some"&&p.push({domainConfigKey:D,verifyArgs:z.value}));}let{remainingAccounts:S,systemOffset:b}=i.toAccountMetas(),x=U(a,b),I=[];if(l.length>0&&I.push(V(l)),c){if(!o)throw new Error("Payer not found or proof args is missing.");I.push(ka({configActions:t,payer:n,compressedProofArgs:x,settingsMutArgs:o,remainingAccounts:S,secp256r1VerifyArgs:p}));}else I.push(await Ma({settingsIndex:s,configActions:t,payer:n,compressedProofArgs:x,remainingAccounts:S,secp256r1VerifyArgs:p}));return I}async function R8({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 be(),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),i=await Ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),u=U(c,o);return await ii({compressedProofArgs:u,payer:n,createUserArgs:e.map((d,g)=>({member:d.member.address,role:d.role,userCreationArgs:i[g],transactionManagerUrl:d.role===0?d.transactionManagerUrl:null})),remainingAccounts:a})}async function L8({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let c=new B;await c.addSystemAccounts();let i=[],a=[];a.push(...await ye([{address:(await N(r.address,s)).address,type:"User"}],t));let o=await be(),{address:u,addressTree:d}=await ae(e,o);i.push({address:u,queue:d,tree:d,type:"Settings"});let g=a.length,p=await w(a,i),l=de(c,p.treeInfos.slice(0,g),p.leafIndices.slice(0,g),p.rootIndices.slice(0,g),p.proveByIndices.slice(0,g),a.filter(v=>v.type==="User"),Y())[0],b=(await Ae(c,p.treeInfos.slice(g),p.roots.slice(g),p.rootIndices.slice(g),i)).find(v=>v.type==="Settings")??null,{remainingAccounts:x,systemOffset:I}=c.toAccountMetas(),_=U(p,I);if(!b)throw new Error("Settings creation args is missing.");return await wa({settingsIndex:e,payer:n,initialMember:r,userArgs:l.data.role===3?{__kind:"Mutate",fields:[l]}:{__kind:"Read",fields:[l]},compressedProofArgs:_,settingsCreation:b,remainingAccounts:x})}async function z8({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:c,proof:i,settingsMutArgs:a}=await Re(true,e,n,false,t);if(!a)throw new Error("Proof args is missing");let o=fe(s),u=o.filter(I=>I instanceof P),d=[],g=[];for(let I of u){let _=d.length,{domainConfig:v,verifyArgs:D,signature:z,publicKey:X,message:ie}=Z(I,_);ie&&z&&X&&d.push({message:ie,signature:z,publicKey:X}),v&&(c.addPreAccounts([{address:v,role:gill.AccountRole.READONLY}]),D.__option==="Some"&&g.push({domainConfigKey:v,verifyArgs:D.value}));}c.addPreAccounts(o.filter(I=>"address"in I).map(I=>({address:I.address,role:gill.AccountRole.READONLY_SIGNER,signer:I})));let{remainingAccounts:p,systemOffset:l}=c.toAccountMetas(),S=U(i,l),b=[];d.length>0&&b.push(V(d));let x=await ue(e);return b.push(mi({settings:x,payer:r,settingsMutArgs:a,compressedProofArgs:S,secp256r1VerifyArgs:g,remainingAccounts:p})),b}async function X8({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new B;await i.addSystemAccounts();let a=await be(),{address:o,addressTree:u}=await N(r.address,a),d=[{address:o,tree:u,queue:u,type:"User"}],g=await w([],d),p=(await Ae(i,g.treeInfos,g.roots,g.rootIndices,d))[0],l=i.toAccountMetas();c=l.remainingAccounts,t={compressedProofArgs:U(g,l.systemOffset),authorityCreationArgs:p};}return Mi({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function nH({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new B;await s.addSystemAccounts();let t=await ye([{address:(await N(e.address,n)).address,type:"User"}]),c=await w(t,[]),i=de(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,Y())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),u=U(c,o);return Ui({authority:e,transactionManagerUrl:r,compressedProofArgs:u,userMutArgs:i,remainingAccounts:a})}async function pH({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:u}=Z(n),d=[];a&&o&&u&&d.push({message:a,signature:o,publicKey:u});let g=await ur(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,I=g.wallets.find(_e=>_e.isDelegate);I&&((await Zr(I.index,I.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(I.index,I.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):l=await ue(I.index)),s&&((await Zr(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ae(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):b=await ue(s.index));let _=new B;await _.addSystemAccounts();let v=await ye(p,t),D=await w(v,[]),z=de(_,D.treeInfos.slice(0,1),D.leafIndices.slice(0,1),D.rootIndices.slice(0,1),D.proveByIndices.slice(0,1),v.slice(0,1),Y())[0],X=S?gill.some(de(_,D.treeInfos.slice(S.start,S.end),D.leafIndices.slice(S.start,S.end),D.rootIndices.slice(S.start,S.end),D.proveByIndices.slice(S.start,S.end),v.slice(S.start,S.end),j())[0]):gill.none(),ie=x?gill.some(de(_,D.treeInfos.slice(x.start,x.end),D.leafIndices.slice(x.start,x.end),D.rootIndices.slice(x.start,x.end),D.proveByIndices.slice(x.start,x.end),v.slice(x.start,x.end),j())[0]):gill.none(),{remainingAccounts:te,systemOffset:Te}=_.toAccountMetas(),le=U(D,Te),Ge=[];return d.length>0&&Ge.push(V(d)),Ge.push(Ni({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof P?void 0:n,oldSettings:l,oldSettingsMutArgs:X,newSettings:b,newSettingsMutArgs:ie,compressedProofArgs:le,userMutArgs:z,remainingAccounts:te})),Ge}async function bH({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await aa(ne(),s),o=a.data.multiWalletSettings,{packedAccounts:u,proof:d,settingsMutArgs:g}=await Re(c,e,n,false,i),{remainingAccounts:p,systemOffset:l}=u.toAccountMetas(),{domainConfig:S,verifyArgs:b,message:x,signature:I,publicKey:_}=Z(r),v=[];if(x&&I&&_&&v.push(V([{message:x,signature:I,publicKey:_}])),c){if(!t||!g)throw new Error("Payer not found or proof args is missing.");let D=U(d,l);v.push(Ud({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:b,settingsMutArgs:g,payer:t,compressedProofArgs:D,remainingAccounts:p}));}else v.push(Md({transactionBuffer:s,domainConfig:S,closer:r instanceof P?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:b,remainingAccounts:[]}));return v}function rg({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:u,expectedSecp256r1Signers:d}){let{domainConfig:g,verifyArgs:p,message:l,signature:S,publicKey:b}=Z(n),x=[];if(l&&S&&b&&x.push(V([{message:l,signature:S,publicKey:b}])),u){let{settingsReadonlyArgs:I,compressedProofArgs:_,remainingAccounts:v}=u;x.push(zd({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:d},settingsReadonlyArgs:I,compressedProofArgs:_,remainingAccounts:v}));}else x.push(Nd({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof P?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:d},remainingAccounts:[]}));return x}function ng({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=Z(e),u=[];return a&&i&&o&&u.push(V([{message:a,signature:i,publicKey:o}])),s?u.push(ru({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(Zd({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof P?void 0:e,remainingAccounts:[]})),u}function sg({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?mu({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):iu({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function og({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=Z(n),u=[];return o&&i&&a&&u.push(V([{message:o,signature:i,publicKey:a}])),s?u.push(Mu({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(xu({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof P?void 0:n,remainingAccounts:[]})),u}async function fF({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let c=await ph(r),i=new B,a=null,o=null,u=[];if(c.length||t){let g=await mh({packedAccounts:i,userAccounts:c,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:s});a=g.proof,o=g.settingsMutArgs??null,u=g.userMutArgs??[];}return {configActions:await yh({configActionsArgs:r,userMutArgs:u,index:e}),index:e,proof:a,settingsMutArgs:o,packedAccounts:i,compressed:t}}async function ph(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 mh({packedAccounts:e,userAccounts:n,compressed:r,index:s,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let l=(await ae(s,t)).address;i.push({address:l,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await ye(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let o=await w(a,[]),u=[],d=[];for(let l of a)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,j())[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,Y());}return {proof:o,settingsMutArgs:g,userMutArgs:p}}async function yh({index:e,configActionsArgs:n,userMutArgs:r}){let s=[];for(let t of n)switch(t.type){case "AddMembers":{let c=[];for(let i of t.members){let a=await N(i.member,i.userAddressTreeIndex).then(o=>r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(o.address))))));if(!a)throw new Error("Unable to find user account");c.push(fh({permissionArgs:i.permissions,userMutArgs:a,pubkey:i.member}));}s.push({__kind:t.type,fields:[c]});break}case "RemoveMembers":{let c=await Promise.all(t.members.map(i=>N(i.member,i.userAddressTreeIndex).then(a=>{let o=r.find(u=>utils_js.equalBytes(new Uint8Array(u.accountMeta.address),new Uint8Array(gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address)))));if(!o)throw new Error("Unable to find user account");return lh({pubkey:i.member,userMutArgs:o})})));s.push({__kind:t.type,fields:[c]});break}case "EditPermissions":{let c=t.members.map(i=>Th({permissionArgs:i.permissions,pubkey:i.member}));s.push({__kind:t.type,fields:[c]});break}default:s.push({__kind:t.type,fields:[t.threshold]});}return s}function Th({pubkey:e,permissionArgs:n}){return {memberKey:he(e),permissions:dg(n)}}function lh({pubkey:e,userMutArgs:n}){let r=n.data.role;if(r===2)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:he(e),userArgs:r===3?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function fh({pubkey:e,permissionArgs:n,userMutArgs:r}){if(r.data.role===2)throw new Error("A permanent member can only belong to one wallet.");if(r.data.role===0&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:he(e),permissions:dg(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function dg(e){let n=[];return e.initiate&&n.push(ve.InitiateTransaction),e.vote&&n.push(ve.VoteTransaction),e.execute&&n.push(ve.ExecuteTransaction),we.fromPermissions(n)}async function MF({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,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 LA(S,t instanceof P?t:t.address,b),I=[],_=[];for(let Q=0;Q<s.length;Q+=p){let At=s.subarray(Q,Q+p);I.push(At),_.push(sha2_js.sha256(At));}let v=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:D,settingsMutArgs:z,proof:X,packedAccounts:ie}=await Re(u,n,r,false,l),{remainingAccounts:te,systemOffset:Te}=ie.toAccountMetas(),le=X&&D&&z?{settingsReadonlyArgs:D,settingsMutArgs:z,compressedProofArgs:U(X,Te),remainingAccounts:te,payer:e}:null,Ge=fe([t,...c?[c]:[],...d]).filter(Q=>Q instanceof P).map(Q=>({memberKey:he(Q),messageHash:to(Q.authResponse)})),_e=rg({finalBufferHash:v,finalBufferSize:s.length,bufferIndex:b,payer:e,transactionBufferAddress:x,settings:S,creator:t,preauthorizeExecution:!c,bufferExtendHashes:_,compressedArgs:le,expectedSecp256r1Signers:Ge}),ut=I.map(Q=>sg({transactionMessageBytes:Q,transactionBufferAddress:x,settings:S,compressed:u})),Ar=d.map(Q=>og({voter:Q,transactionBufferAddress:x,settings:S,compressedArgs:le})),sn=ng({compressedArgs:le,settings:S,executor:c,transactionBufferAddress:x}),{instructions:St,addressLookupTableAccounts:T}=await jA({compressed:u,settings:S,transactionMessageBytes:s,transactionBufferAddress:x,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),pe=Q=>({payer:e,instructions:Q,addressesByLookupTableAddress:T});return [pe(_e),...ut.map(Q=>pe([Q])),...Ar.length?[pe(Ar.flat())]:[],pe(sn),pe(St)]}var rn=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:c.length};{if(r.length===0)throw new Error("Expected at least one writable signer key");let[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(u=>u===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var nn=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function Ag({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=rn.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let p of a){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)}),i.writable.push(...b.writable),i.readonly.push(...b.readonly);}}let[o,u]=t.getMessageComponents(),g=new nn(u,i).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:u,addressTableLookups:c}}function wF({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Ag({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return sA(s)}async function zF({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:u=false}){let{instructions:d,addressLookupTableAccounts:g}=await JA({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:u,cachedAccounts:a});return {payer:e,instructions:d,addressesByLookupTableAddress:g}}
|
|
2
|
+
exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=la;exports.AuthenticationContextSchema=eA;exports.BACKOFF_MAX_DELAY_MS=Tr;exports.BUNDLE_POLL_DELAY_MS=ho;exports.BUNDLE_POLL_MAX_RETRIES=Mo;exports.BaseResponseSchema=tA;exports.BundleError=me;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=va;exports.CHANGE_CONFIG_DISCRIMINATOR=Da;exports.COMPUTE_UNIT_MULTIPLIER=Po;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=Ba;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Ja;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Qa;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=ri;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=ci;exports.CompleteMessageRequestSchema=Mw;exports.CompleteTransactionRequestSchema=hw;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Ai;exports.DEFAULT_JITO_BLOCK_ENGINE_URL=Ro;exports.DEFAULT_JITO_TIPS_URL=bo;exports.DEFAULT_JITO_TIP_PRIORITY=_o;exports.DEFAULT_NETWORK_RETRY_DELAY_MS=Oe;exports.DEFAULT_NETWORK_RETRY_MAX_RETRIES=Le;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=li;exports.DOMAIN_CONFIG_DISCRIMINATOR=Lo;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=Di;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=bi;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=Li;exports.EXPONENTIAL_BACKOFF_BASE=yr;exports.GLOBAL_COUNTER_DISCRIMINATOR=Ho;exports.HTTP_STATUS_BAD_REQUEST=Uo;exports.HTTP_STATUS_INTERNAL_SERVER_ERROR=dn;exports.HTTP_STATUS_TOO_MANY_REQUESTS=Wo;exports.JITO_TIP_ACCOUNTS=an;exports.KeyType=nr;exports.MAX_TRANSACTION_BUFFER_INDEX=vo;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=Hi;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=Ji;exports.MIN_COMPUTE_UNITS=mr;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=xD;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=ZE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=gP;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=VD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=FD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=GD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=uP;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=IP;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=$E;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=QE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=uD;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=YD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=aD;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=XE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=oD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=bD;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=_D;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=vD;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=qD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=ED;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=ID;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=CD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=yD;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=dP;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=jD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=iD;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=lD;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=RD;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=ZD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=DD;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=mD;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=rD;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=zE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=JE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=GE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=jE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=wD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=BD;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=gD;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=cP;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=cD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=sD;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=pD;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=yP;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=TD;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=mP;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=oP;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=qE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=LD;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=zD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=$D;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=iP;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=fD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=XD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=rP;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=TP;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=sP;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=QD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=SD;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=SP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=fP;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=JD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=lP;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=nP;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=OD;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=AP;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=xP;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=MD;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=dD;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=tD;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=nD;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=KD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=tP;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=eD;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=kD;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=YE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=eP;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=KE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=ND;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=aP;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=AD;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=UD;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=WD;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=HD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=hD;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=pP;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=PD;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=VE;exports.MultiWalletInstruction=HE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=nd;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Qi;exports.NetworkError=De;exports.NotFoundError=oe;exports.NotInitializedError=Be;exports.Permission=ve;exports.PermissionError=fr;exports.Permissions=we;exports.RetryExhaustedError=lr;exports.RevibaseError=Ee;exports.SETTINGS_DISCRIMINATOR=Qc;exports.Secp256r1Key=Ve;exports.SignedSecp256r1Key=P;exports.StartMessageRequestSchema=Dw;exports.StartTransactionRequestSchema=Pw;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=fd;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=ud;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=bd;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Ed;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Hd;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=Ld;exports.TRANSACTION_BUFFER_DISCRIMINATOR=sa;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=$d;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Jd;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Au;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=ou;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Eu;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=lu;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=Lu;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=bu;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Ju;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Hu;exports.TRANSACTION_SIZE_LIMIT=cn;exports.TransactionActionTypeSchema=Qu;exports.TransactionDetailsSchema=CP;exports.TransactionError=ko;exports.TransactionPayloadSchema=Ew;exports.TransactionPayloadWithBase64MessageBytesSchema=$u;exports.Transports=Cs;exports.UserRole=Ne;exports.ValidationError=K;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=ua;exports.addWhitelistedAddressTrees=lw;exports.base64URLStringToBuffer=Fe;exports.bufferToBase64URLString=f2;exports.changeConfig=I8;exports.closeTransactionBuffer=bH;exports.configAction=RR;exports.convertMemberKeyToString=NA;exports.convertPubkeyCompressedToCose=u2;exports.convertPubkeyCoseToCompressed=d2;exports.createClientAuthorizationCompleteRequestChallenge=y2;exports.createClientAuthorizationStartRequestChallenge=m2;exports.createDomainConfig=v6;exports.createDomainUserAccounts=G6;exports.createGlobalCounter=J6;exports.createMessageChallenge=T2;exports.createTransactionBuffer=rg;exports.createTransactionChallenge=l2;exports.createTransactionManagerSigner=WM;exports.createUserAccounts=R8;exports.createWallet=L8;exports.decodeDomainConfig=Bo;exports.decodeGlobalCounter=Go;exports.decodeSettings=$c;exports.decodeTransactionBuffer=ca;exports.decodeWhitelistedAddressTree=ga;exports.decompressSettingsAccount=z8;exports.deserializeConfigActions=y6;exports.disableDomainConfig=X6;exports.editDomainConfig=X8;exports.editTransactionManagerUrl=nH;exports.editUserDelegate=pH;exports.executeTransaction=jA;exports.executeTransactionBuffer=ng;exports.executeTransactionSync=JA;exports.extendTransactionBuffer=sg;exports.extensionStruct=jR;exports.fetchAllDomainConfig=Ph;exports.fetchAllGlobalCounter=Uh;exports.fetchAllMaybeDomainConfig=Ug;exports.fetchAllMaybeGlobalCounter=qg;exports.fetchAllMaybeSettings=Ll;exports.fetchAllMaybeTransactionBuffer=tf;exports.fetchAllMaybeWhitelistedAddressTree=Cf;exports.fetchAllSettings=yU;exports.fetchAllSettingsAccountByMember=f5;exports.fetchAllTransactionBuffer=IU;exports.fetchAllWhitelistedAddressTree=MU;exports.fetchDomainConfig=No;exports.fetchGlobalCounter=vh;exports.fetchMaybeDomainConfig=vg;exports.fetchMaybeGlobalCounter=Jg;exports.fetchMaybeSettings=Es;exports.fetchMaybeSettingsAccountData=gM;exports.fetchMaybeTransactionBuffer=ef;exports.fetchMaybeUserAccountData=AM;exports.fetchMaybeWhitelistedAddressTree=If;exports.fetchSettings=mU;exports.fetchSettingsAccountData=Zr;exports.fetchTransactionBuffer=aa;exports.fetchUserAccountByFilters=l5;exports.fetchUserAccountData=ur;exports.fetchWhitelistedAddressTree=pa;exports.getAddMemberArgsCodec=Vh;exports.getAddMemberArgsDecoder=pn;exports.getAddMemberArgsEncoder=gn;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=GU;exports.getAddWhitelistedAddressTreesInstruction=KU;exports.getAddWhitelistedAddressTreesInstructionAsync=Sa;exports.getAddWhitelistedAddressTreesInstructionDataCodec=zU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=fa;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=vs;exports.getAdditionalMetadataCodec=Oh;exports.getAdditionalMetadataDecoder=An;exports.getAdditionalMetadataEncoder=un;exports.getChangeConfigCompressedDiscriminatorBytes=dW;exports.getChangeConfigCompressedInstruction=ka;exports.getChangeConfigCompressedInstructionDataCodec=uW;exports.getChangeConfigCompressedInstructionDataDecoder=Wa;exports.getChangeConfigCompressedInstructionDataEncoder=Ua;exports.getChangeConfigDiscriminatorBytes=$U;exports.getChangeConfigInstruction=tW;exports.getChangeConfigInstructionAsync=Ma;exports.getChangeConfigInstructionDataCodec=eW;exports.getChangeConfigInstructionDataDecoder=Pa;exports.getChangeConfigInstructionDataEncoder=Ws;exports.getClientAndDeviceHash=eo;exports.getCompiledInstructionCodec=Gh;exports.getCompiledInstructionDecoder=yn;exports.getCompiledInstructionEncoder=mn;exports.getCompressedAccountMetaCodec=Jh;exports.getCompressedAccountMetaDecoder=Et;exports.getCompressedAccountMetaEncoder=Ct;exports.getCompressedAccountMetaReadOnlyCodec=Xh;exports.getCompressedAccountMetaReadOnlyDecoder=ht;exports.getCompressedAccountMetaReadOnlyEncoder=Mt;exports.getCompressedOnlyExtensionCodec=eR;exports.getCompressedOnlyExtensionDecoder=ln;exports.getCompressedOnlyExtensionEncoder=Tn;exports.getCompressedProofCodec=nR;exports.getCompressedProofDecoder=En;exports.getCompressedProofEncoder=Cn;exports.getCompressedSettingsAddressFromIndex=ae;exports.getCompressedSettingsCodec=aR;exports.getCompressedSettingsDataCodec=AR;exports.getCompressedSettingsDataDecoder=_t;exports.getCompressedSettingsDataEncoder=bt;exports.getCompressedSettingsDecoder=j;exports.getCompressedSettingsEncoder=Rt;exports.getCompressedTokenArgsCodec=yR;exports.getCompressedTokenArgsDecoder=kt;exports.getCompressedTokenArgsEncoder=Wt;exports.getCompressibleExtensionCodec=SR;exports.getCompressibleExtensionDecoder=_n;exports.getCompressibleExtensionEncoder=bn;exports.getCompressionInfoCodec=ER;exports.getCompressionInfoDecoder=Un;exports.getCompressionInfoEncoder=vn;exports.getComputeBudgetEstimate=iA;exports.getConfigActionCodec=hR;exports.getConfigActionDecoder=Ye;exports.getConfigActionEncoder=qe;exports.getCreateCompressedWalletDiscriminatorBytes=fW;exports.getCreateCompressedWalletInstruction=xW;exports.getCreateCompressedWalletInstructionAsync=wa;exports.getCreateCompressedWalletInstructionDataCodec=SW;exports.getCreateCompressedWalletInstructionDataDecoder=Na;exports.getCreateCompressedWalletInstructionDataEncoder=ks;exports.getCreateDomainConfigDiscriminatorBytes=RW;exports.getCreateDomainConfigInstruction=_W;exports.getCreateDomainConfigInstructionAsync=Ya;exports.getCreateDomainConfigInstructionDataCodec=bW;exports.getCreateDomainConfigInstructionDataDecoder=qa;exports.getCreateDomainConfigInstructionDataEncoder=Os;exports.getCreateDomainUserAccountDiscriminatorBytes=NW;exports.getCreateDomainUserAccountInstruction=VW;exports.getCreateDomainUserAccountInstructionAsync=ei;exports.getCreateDomainUserAccountInstructionDataCodec=wW;exports.getCreateDomainUserAccountInstructionDataDecoder=$a;exports.getCreateDomainUserAccountInstructionDataEncoder=Bs;exports.getCreateGlobalCounterDiscriminatorBytes=JW;exports.getCreateGlobalCounterInstruction=YW;exports.getCreateGlobalCounterInstructionAsync=si;exports.getCreateGlobalCounterInstructionDataCodec=qW;exports.getCreateGlobalCounterInstructionDataDecoder=ni;exports.getCreateGlobalCounterInstructionDataEncoder=ws;exports.getCreateUserAccountArgsCodec=WR;exports.getCreateUserAccountArgsDecoder=zn;exports.getCreateUserAccountArgsEncoder=Gn;exports.getCreateUserAccountsDiscriminatorBytes=nk;exports.getCreateUserAccountsInstruction=ok;exports.getCreateUserAccountsInstructionAsync=ii;exports.getCreateUserAccountsInstructionDataCodec=sk;exports.getCreateUserAccountsInstructionDataDecoder=ai;exports.getCreateUserAccountsInstructionDataEncoder=Hs;exports.getDecompressSettingsAccountDiscriminatorBytes=pk;exports.getDecompressSettingsAccountInstruction=mi;exports.getDecompressSettingsAccountInstructionDataCodec=mk;exports.getDecompressSettingsAccountInstructionDataDecoder=pi;exports.getDecompressSettingsAccountInstructionDataEncoder=gi;exports.getDisableDomainConfigDiscriminatorBytes=Ik;exports.getDisableDomainConfigInstruction=xi;exports.getDisableDomainConfigInstructionDataCodec=Ck;exports.getDisableDomainConfigInstructionDataDecoder=Si;exports.getDisableDomainConfigInstructionDataEncoder=fi;exports.getDomainConfigAddress=mt;exports.getDomainConfigCodec=Dh;exports.getDomainConfigDecoder=Oo;exports.getDomainConfigDiscriminatorBytes=Eh;exports.getDomainConfigEncoder=_g;exports.getDomainConfigSize=Mh;exports.getEditDomainConfigDiscriminatorBytes=_k;exports.getEditDomainConfigInstruction=Mi;exports.getEditDomainConfigInstructionAsync=Uk;exports.getEditDomainConfigInstructionDataCodec=vk;exports.getEditDomainConfigInstructionDataDecoder=Pi;exports.getEditDomainConfigInstructionDataEncoder=Gs;exports.getEditMemberArgsCodec=BR;exports.getEditMemberArgsDecoder=Vn;exports.getEditMemberArgsEncoder=wn;exports.getEditTransactionManagerUrlDiscriminatorBytes=Vk;exports.getEditTransactionManagerUrlInstruction=Ui;exports.getEditTransactionManagerUrlInstructionDataCodec=Hk;exports.getEditTransactionManagerUrlInstructionDataDecoder=vi;exports.getEditTransactionManagerUrlInstructionDataEncoder=_i;exports.getEditUserDelegateDiscriminatorBytes=Yk;exports.getEditUserDelegateInstruction=Ni;exports.getEditUserDelegateInstructionDataCodec=Zk;exports.getEditUserDelegateInstructionDataDecoder=Bi;exports.getEditUserDelegateInstructionDataEncoder=Oi;exports.getExpectedSecp256r1SignersCodec=HR;exports.getExpectedSecp256r1SignersDecoder=Bt;exports.getExpectedSecp256r1SignersEncoder=Ot;exports.getExtensionStructCodec=KR;exports.getExtensionStructDecoder=Lt;exports.getExtensionStructEncoder=Dn;exports.getGlobalCounterAddress=kA;exports.getGlobalCounterCodec=_h;exports.getGlobalCounterDecoder=Fo;exports.getGlobalCounterDiscriminatorBytes=bh;exports.getGlobalCounterEncoder=jg;exports.getGlobalCounterSize=Wh;exports.getJitoTipsConfig=$s;exports.getLightCpiSigner=U5;exports.getLightProtocolRpc=Me;exports.getLinkWalletArgsCodec=XR;exports.getLinkWalletArgsDecoder=rs;exports.getLinkWalletArgsEncoder=ts;exports.getMemberCodec=tb;exports.getMemberDecoder=Ut;exports.getMemberEncoder=vt;exports.getMemberKeyCodec=sb;exports.getMemberKeyDecoder=ce;exports.getMemberKeyEncoder=H;exports.getMigrateCompressedSettingsDiscriminatorBytes=sL;exports.getMigrateCompressedSettingsInstruction=zi;exports.getMigrateCompressedSettingsInstructionDataCodec=oL;exports.getMigrateCompressedSettingsInstructionDataDecoder=Gi;exports.getMigrateCompressedSettingsInstructionDataEncoder=Fi;exports.getMigrateCompressedUsersDiscriminatorBytes=pL;exports.getMigrateCompressedUsersInstruction=Zi;exports.getMigrateCompressedUsersInstructionDataCodec=mL;exports.getMigrateCompressedUsersInstructionDataDecoder=Yi;exports.getMigrateCompressedUsersInstructionDataEncoder=qi;exports.getMultiWalletErrorMessage=ow;exports.getNativeTransferIntentCompressedDiscriminatorBytes=UL;exports.getNativeTransferIntentCompressedInstruction=cd;exports.getNativeTransferIntentCompressedInstructionDataCodec=WL;exports.getNativeTransferIntentCompressedInstructionDataDecoder=od;exports.getNativeTransferIntentCompressedInstructionDataEncoder=sd;exports.getNativeTransferIntentDiscriminatorBytes=CL;exports.getNativeTransferIntentInstruction=ed;exports.getNativeTransferIntentInstructionAsync=DL;exports.getNativeTransferIntentInstructionDataCodec=EL;exports.getNativeTransferIntentInstructionDataDecoder=$i;exports.getNativeTransferIntentInstructionDataEncoder=zs;exports.getNewAuthorityArgsCodec=ib;exports.getNewAuthorityArgsDecoder=cs;exports.getNewAuthorityArgsEncoder=os;exports.getOriginIndex=S2;exports.getPackedAddressTreeInfoCodec=Ab;exports.getPackedAddressTreeInfoDecoder=Ht;exports.getPackedAddressTreeInfoEncoder=Vt;exports.getPackedMerkleContextCodec=mb;exports.getPackedMerkleContextDecoder=Mn;exports.getPackedMerkleContextEncoder=Pn;exports.getPackedStateTreeInfoCodec=lb;exports.getPackedStateTreeInfoDecoder=Pt;exports.getPackedStateTreeInfoEncoder=Dt;exports.getPausableAccountExtensionCodec=xb;exports.getPausableAccountExtensionDecoder=jn;exports.getPausableAccountExtensionEncoder=Kn;exports.getPermanentDelegateAccountExtensionCodec=Eb;exports.getPermanentDelegateAccountExtensionDecoder=qn;exports.getPermanentDelegateAccountExtensionEncoder=Jn;exports.getPermissionsCodec=Mb;exports.getPermissionsDecoder=Ke;exports.getPermissionsEncoder=ze;exports.getProofArgsCodec=_b;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=kb;exports.getRemoveMemberArgsDecoder=Fn;exports.getRemoveMemberArgsEncoder=Hn;exports.getRentConfigCodec=Bb;exports.getRentConfigDecoder=On;exports.getRentConfigEncoder=Ln;exports.getSecp256r1MessageHash=to;exports.getSecp256r1PubkeyCodec=Vb;exports.getSecp256r1PubkeyDecoder=Ft;exports.getSecp256r1PubkeyEncoder=ds;exports.getSecp256r1SignatureOffsetsDataDecoder=qM;exports.getSecp256r1SignatureOffsetsDataEncoder=JM;exports.getSecp256r1VerifyArgsCodec=Gb;exports.getSecp256r1VerifyArgsDecoder=G;exports.getSecp256r1VerifyArgsEncoder=F;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=Jb;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=ee;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=$;exports.getSecp256r1VerifyInstruction=V;exports.getSecp256r1VerifyInstructionDataCodec=MV;exports.getSecp256r1VerifyInstructionDataDecoder=zA;exports.getSecp256r1VerifyInstructionDataEncoder=KA;exports.getSendAndConfirmTransaction=aA;exports.getSettingsCodec=pU;exports.getSettingsCreationArgsCodec=Xb;exports.getSettingsCreationArgsDecoder=zt;exports.getSettingsCreationArgsEncoder=Gt;exports.getSettingsDecoder=Lr;exports.getSettingsDiscriminatorBytes=gU;exports.getSettingsEncoder=kl;exports.getSettingsFromIndex=ue;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=n_;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=ps;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=gs;exports.getSettingsIndexWithAddressCodec=e_;exports.getSettingsIndexWithAddressDecoder=As;exports.getSettingsIndexWithAddressEncoder=us;exports.getSettingsMutArgsCodec=a_;exports.getSettingsMutArgsDecoder=q;exports.getSettingsMutArgsEncoder=J;exports.getSettingsReadonlyArgsCodec=A_;exports.getSettingsReadonlyArgsDecoder=jt;exports.getSettingsReadonlyArgsEncoder=Kt;exports.getSignedSecp256r1Key=A2;exports.getSignedTransactionManager=p6;exports.getSolanaRpc=ne;exports.getSolanaRpcEndpoint=cA;exports.getSplInterfacePdaArgsCodec=m_;exports.getSplInterfacePdaArgsDecoder=qt;exports.getSplInterfacePdaArgsEncoder=Jt;exports.getTokenMetadataCodec=f_;exports.getTokenMetadataDecoder=Zn;exports.getTokenMetadataEncoder=Yn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=XL;exports.getTokenTransferIntentCompressedInstruction=xd;exports.getTokenTransferIntentCompressedInstructionAsync=$L;exports.getTokenTransferIntentCompressedInstructionDataCodec=QL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Sd;exports.getTokenTransferIntentCompressedInstructionDataEncoder=qs;exports.getTokenTransferIntentDiscriminatorBytes=HL;exports.getTokenTransferIntentInstruction=gd;exports.getTokenTransferIntentInstructionAsync=GL;exports.getTokenTransferIntentInstructionDataCodec=FL;exports.getTokenTransferIntentInstructionDataDecoder=Ad;exports.getTokenTransferIntentInstructionDataEncoder=Js;exports.getTransactionBufferAddress=LA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=TO;exports.getTransactionBufferCloseCompressedInstruction=Ud;exports.getTransactionBufferCloseCompressedInstructionDataCodec=lO;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=vd;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=_d;exports.getTransactionBufferCloseDiscriminatorBytes=aO;exports.getTransactionBufferCloseInstruction=Md;exports.getTransactionBufferCloseInstructionDataCodec=iO;exports.getTransactionBufferCloseInstructionDataDecoder=Pd;exports.getTransactionBufferCloseInstructionDataEncoder=Dd;exports.getTransactionBufferCodec=xU;exports.getTransactionBufferCreateArgsCodec=C_;exports.getTransactionBufferCreateArgsDecoder=Zt;exports.getTransactionBufferCreateArgsEncoder=Yt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=kO;exports.getTransactionBufferCreateCompressedInstruction=zd;exports.getTransactionBufferCreateCompressedInstructionDataCodec=LO;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=Gd;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Fd;exports.getTransactionBufferCreateDiscriminatorBytes=PO;exports.getTransactionBufferCreateInstruction=Nd;exports.getTransactionBufferCreateInstructionDataCodec=MO;exports.getTransactionBufferCreateInstructionDataDecoder=Bd;exports.getTransactionBufferCreateInstructionDataEncoder=Od;exports.getTransactionBufferDecoder=oa;exports.getTransactionBufferDiscriminatorBytes=SU;exports.getTransactionBufferEncoder=$l;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=QO;exports.getTransactionBufferExecuteCompressedInstruction=ru;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=$O;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=tu;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=eu;exports.getTransactionBufferExecuteDiscriminatorBytes=GO;exports.getTransactionBufferExecuteInstruction=Zd;exports.getTransactionBufferExecuteInstructionDataCodec=zO;exports.getTransactionBufferExecuteInstructionDataDecoder=Yd;exports.getTransactionBufferExecuteInstructionDataEncoder=qd;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=mB;exports.getTransactionBufferExtendCompressedInstruction=mu;exports.getTransactionBufferExtendCompressedInstructionDataCodec=yB;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=pu;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=gu;exports.getTransactionBufferExtendDiscriminatorBytes=cB;exports.getTransactionBufferExtendInstruction=iu;exports.getTransactionBufferExtendInstructionDataCodec=aB;exports.getTransactionBufferExtendInstructionDataDecoder=au;exports.getTransactionBufferExtendInstructionDataEncoder=cu;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=UB;exports.getTransactionBufferVoteCompressedInstruction=Mu;exports.getTransactionBufferVoteCompressedInstructionDataCodec=WB;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Pu;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Du;exports.getTransactionBufferVoteDiscriminatorBytes=EB;exports.getTransactionBufferVoteInstruction=xu;exports.getTransactionBufferVoteInstructionDataCodec=DB;exports.getTransactionBufferVoteInstructionDataDecoder=Su;exports.getTransactionBufferVoteInstructionDataEncoder=fu;exports.getTransactionExecuteCompressedDiscriminatorBytes=qB;exports.getTransactionExecuteCompressedInstruction=Nu;exports.getTransactionExecuteCompressedInstructionDataCodec=YB;exports.getTransactionExecuteCompressedInstructionDataDecoder=Bu;exports.getTransactionExecuteCompressedInstructionDataEncoder=Ou;exports.getTransactionExecuteDiscriminatorBytes=VB;exports.getTransactionExecuteInstruction=Uu;exports.getTransactionExecuteInstructionDataCodec=HB;exports.getTransactionExecuteInstructionDataDecoder=vu;exports.getTransactionExecuteInstructionDataEncoder=_u;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=gN;exports.getTransactionExecuteSyncCompressedInstruction=Zu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=pN;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Yu;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=qu;exports.getTransactionExecuteSyncDiscriminatorBytes=nN;exports.getTransactionExecuteSyncInstruction=zu;exports.getTransactionExecuteSyncInstructionDataCodec=sN;exports.getTransactionExecuteSyncInstructionDataDecoder=Gu;exports.getTransactionExecuteSyncInstructionDataEncoder=Fu;exports.getTransactionMessageAddressTableLookupCodec=b_;exports.getTransactionMessageAddressTableLookupDecoder=Is;exports.getTransactionMessageAddressTableLookupEncoder=xs;exports.getTransactionMessageCodec=M_;exports.getTransactionMessageDecoder=Qt;exports.getTransactionMessageEncoder=Xt;exports.getTransferFeeAccountExtensionCodec=U_;exports.getTransferFeeAccountExtensionDecoder=Qn;exports.getTransferFeeAccountExtensionEncoder=Xn;exports.getTransferHookAccountExtensionCodec=L_;exports.getTransferHookAccountExtensionDecoder=es;exports.getTransferHookAccountExtensionEncoder=$n;exports.getTransportsCodec=N_;exports.getTransportsDecoder=er;exports.getTransportsEncoder=$t;exports.getUserAccountAddress=N;exports.getUserCodec=F_;exports.getUserCreationArgsCodec=j_;exports.getUserCreationArgsDecoder=Ie;exports.getUserCreationArgsEncoder=xe;exports.getUserDecoder=Y;exports.getUserEncoder=rt;exports.getUserMutArgsCodec=Z_;exports.getUserMutArgsDecoder=st;exports.getUserMutArgsEncoder=nt;exports.getUserReadOnlyArgsCodec=ev;exports.getUserReadOnlyArgsDecoder=wt;exports.getUserReadOnlyArgsEncoder=Nt;exports.getUserReadOnlyOrMutateArgsCodec=sv;exports.getUserReadOnlyOrMutateArgsDecoder=Je;exports.getUserReadOnlyOrMutateArgsEncoder=je;exports.getUserRoleCodec=dv;exports.getUserRoleDecoder=Xe;exports.getUserRoleEncoder=Ze;exports.getWalletAddressFromIndex=v5;exports.getWalletAddressFromSettings=Ue;exports.getWhitelistedAddressTreeCodec=PU;exports.getWhitelistedAddressTreeDecoder=Aa;exports.getWhitelistedAddressTreeDiscriminatorBytes=DU;exports.getWhitelistedAddressTreeEncoder=xf;exports.getWhitelistedAddressTreeFromIndex=co;exports.getWhitelistedAddressTreeIndexFromAddress=S5;exports.getWhitelistedAddressTreesAddress=RA;exports.identifyMultiWalletAccount=QN;exports.identifyMultiWalletInstruction=$N;exports.initialize=Xw;exports.isConfigAction=bR;exports.isExtensionStruct=JR;exports.isMultiWalletError=cw;exports.isUserReadOnlyOrMutateArgs=cv;exports.migrateSettings=sV;exports.migrateUsers=AV;exports.nativeTransferIntent=XV;exports.parseAddWhitelistedAddressTreesInstruction=jU;exports.parseChangeConfigCompressedInstruction=AW;exports.parseChangeConfigInstruction=rW;exports.parseCreateCompressedWalletInstruction=IW;exports.parseCreateDomainConfigInstruction=vW;exports.parseCreateDomainUserAccountInstruction=HW;exports.parseCreateGlobalCounterInstruction=ZW;exports.parseCreateUserAccountsInstruction=ck;exports.parseDecompressSettingsAccountInstruction=yk;exports.parseDisableDomainConfigInstruction=Ek;exports.parseEditDomainConfigInstruction=Wk;exports.parseEditTransactionManagerUrlInstruction=Fk;exports.parseEditUserDelegateInstruction=Xk;exports.parseMigrateCompressedSettingsInstruction=cL;exports.parseMigrateCompressedUsersInstruction=yL;exports.parseNativeTransferIntentCompressedInstruction=kL;exports.parseNativeTransferIntentInstruction=PL;exports.parseSecp256r1VerifyInstruction=hV;exports.parseTokenTransferIntentCompressedInstruction=eO;exports.parseTokenTransferIntentInstruction=zL;exports.parseTransactionBufferCloseCompressedInstruction=fO;exports.parseTransactionBufferCloseInstruction=dO;exports.parseTransactionBufferCreateCompressedInstruction=OO;exports.parseTransactionBufferCreateInstruction=hO;exports.parseTransactionBufferExecuteCompressedInstruction=eB;exports.parseTransactionBufferExecuteInstruction=KO;exports.parseTransactionBufferExtendCompressedInstruction=TB;exports.parseTransactionBufferExtendInstruction=iB;exports.parseTransactionBufferVoteCompressedInstruction=kB;exports.parseTransactionBufferVoteInstruction=PB;exports.parseTransactionExecuteCompressedInstruction=ZB;exports.parseTransactionExecuteInstruction=FB;exports.parseTransactionExecuteSyncCompressedInstruction=mN;exports.parseTransactionExecuteSyncInstruction=oN;exports.pollJitoBundleConfirmation=G5;exports.prepareChangeConfigArgs=fF;exports.prepareTransactionBundle=MF;exports.prepareTransactionMessage=wF;exports.prepareTransactionSync=zF;exports.retrieveTransactionManager=g6;exports.sendJitoBundle=yM;exports.serializeConfigActions=m6;exports.signAndSendBundledTransactions=F5;exports.signAndSendTransaction=Z5;exports.tokenTransferIntent=u8;exports.userReadOnlyOrMutateArgs=ov;exports.vaultTransactionMessageDeserialize=oA;exports.vaultTransactionMessageSerialize=sA;exports.voteTransactionBuffer=og;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|