@revibase/core 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +486 -44
- package/dist/index.d.ts +486 -44
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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'),g=require('zod'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),jsonCanonicalize=require('json-canonicalize'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var g__default=/*#__PURE__*/_interopDefault(g);var ts=new Uint8Array([201,232,212,229,59,241,106,197]);function vC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ts)}function lu(){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:ts}))}function rs(){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 UC(){return gill.combineCodec(lu(),rs())}function ns(e){return gill.decodeAccount(e,rs())}async function ss(e,n,r){let s=await fu(e,n,r);return gill.assertAccountExists(s),s}async function fu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ns(s)}async function LC(e,n,r){let s=await Su(e,n,r);return gill.assertAccountsExist(s),s}async function Su(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ns(t))}function WC(){return 846}var as=new Uint8Array([42,206,176,58,175,129,130,233]);function NC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(as)}function Lu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:as}))}function is(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function kC(){return gill.combineCodec(Lu(),is())}function ds(e){return gill.decodeAccount(e,is())}async function wC(e,n,r){let s=await Wu(e,n,r);return gill.assertAccountExists(s),s}async function Wu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return ds(s)}async function HC(e,n,r){let s=await Ou(e,n,r);return gill.assertAccountsExist(s),s}async function Ou(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ds(t))}function VC(){return 24}function Pr(){return gill.getStructEncoder([["memberKey",N()],["permissions",_e()],["userArgs",Ue()]])}function br(){return gill.getStructDecoder([["memberKey",X()],["permissions",ve()],["userArgs",Le()]])}function KC(){return gill.combineCodec(Pr(),br())}function _r(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function vr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function JC(){return gill.combineCodec(_r(),vr())}function st(){return gill.getStructEncoder([["treeInfo",ct()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function ot(){return gill.getStructDecoder([["treeInfo",at()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function $C(){return gill.combineCodec(st(),ot())}function it(){return gill.getStructEncoder([["treeInfo",ct()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function dt(){return gill.getStructDecoder([["treeInfo",at()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function rD(){return gill.combineCodec(it(),dt())}function Br(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Nr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function oD(){return gill.combineCodec(Br(),Nr())}function ut(){return gill.getStructEncoder([["data",gill.getOptionEncoder(kr())]])}function Z(){return gill.getStructDecoder([["data",gill.getOptionDecoder(wr())]])}function dD(){return gill.combineCodec(ut(),Z())}function kr(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(At())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function wr(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(gt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function yD(){return gill.combineCodec(kr(),wr())}function We(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Gr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Pr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(zr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Oe(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Fr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(br())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Kr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function lD(){return gill.combineCodec(We(),Oe())}function fD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function SD(e,n){return n.__kind===e}function jr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Be()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",fe()]])}function qr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Ne()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",Se()]])}function CD(){return gill.combineCodec(jr(),qr())}function Gr(){return gill.getStructEncoder([["memberKey",N()],["permissions",_e()]])}function Fr(){return gill.getStructDecoder([["memberKey",X()],["permissions",ve()]])}function hD(){return gill.combineCodec(Gr(),Fr())}function yt(){return gill.getStructEncoder([["memberKey",N()],["messageHash",gill.getOptionEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))]])}function pt(){return gill.getStructDecoder([["memberKey",X()],["messageHash",gill.getOptionDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))]])}function vD(){return gill.combineCodec(yt(),pt())}function Jr(){return gill.getStructEncoder([["settingsMutArgs",H()],["transactionManager",gill.getOptionEncoder(Tt())]])}function Yr(){return gill.getStructDecoder([["settingsMutArgs",V()],["transactionManager",gill.getOptionDecoder(mt())]])}function OD(){return gill.combineCodec(Jr(),Yr())}function At(){return gill.getStructEncoder([["pubkey",N()],["role",gill.getU8Encoder()],["permissions",_e()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function gt(){return gill.getStructDecoder([["pubkey",X()],["role",gill.getU8Decoder()],["permissions",ve()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function wD(){return gill.combineCodec(At(),gt())}function N(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function X(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function GD(){return gill.combineCodec(N(),X())}function $r(){return gill.getStructEncoder([["authorityCreationArgs",fe()],["compressedProofArgs",M()]])}function Qr(){return gill.getStructDecoder([["authorityCreationArgs",Se()],["compressedProofArgs",R()]])}function jD(){return gill.combineCodec($r(),Qr())}function lt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function ft(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function YD(){return gill.combineCodec(lt(),ft())}function ct(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function at(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function $D(){return gill.combineCodec(ct(),at())}function _e(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function ve(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function tM(){return gill.combineCodec(_e(),ve())}function M(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Br())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function R(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Nr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function oM(){return gill.combineCodec(M(),R())}function zr(){return gill.getStructEncoder([["memberKey",N()],["userArgs",Ue()]])}function Kr(){return gill.getStructDecoder([["memberKey",X()],["userArgs",Le()]])}function dM(){return gill.combineCodec(zr(),Kr())}function en(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function St(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function gM(){return gill.combineCodec(en(),St())}function k(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["clientAndDeviceHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function w(){return gill.getStructDecoder([["signedMessageIndex",gill.getU8Decoder()],["slotNumber",gill.getU64Decoder()],["originIndex",gill.getU8Decoder()],["crossOrigin",gill.getBooleanDecoder()],["truncatedClientDataJson",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["clientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function TM(){return gill.combineCodec(k(),w())}function tn(){return gill.getStructEncoder([["verifyArgs",k()],["domainConfigIndex",gill.getU8Encoder()]])}function rn(){return gill.getStructDecoder([["verifyArgs",w()],["domainConfigIndex",gill.getU8Decoder()]])}function SM(){return gill.combineCodec(tn(),rn())}function nn(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function sn(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function EM(){return gill.combineCodec(nn(),sn())}function on(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function cn(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function MM(){return gill.combineCodec(on(),cn())}function H(){return gill.getStructEncoder([["accountMeta",st()],["data",ut()]])}function V(){return gill.getStructDecoder([["accountMeta",ot()],["data",Z()]])}function bM(){return gill.combineCodec(H(),V())}function xt(){return gill.getStructEncoder([["accountMeta",it()],["data",ut()]])}function It(){return gill.getStructDecoder([["accountMeta",dt()],["data",Z()]])}function LM(){return gill.combineCodec(xt(),It())}function Et(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(yt())]])}function Ct(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(pt())]])}function NM(){return gill.combineCodec(Et(),Ct())}function Dt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(_r())],["addressTableLookups",gill.getArrayEncoder(an())]])}function Mt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(vr())],["addressTableLookups",gill.getArrayDecoder(dn())]])}function VM(){return gill.combineCodec(Dt(),Mt())}function an(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function dn(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function zM(){return gill.combineCodec(an(),dn())}function z(){return gill.getDiscriminatedUnionEncoder([["Ed25519",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])],["Secp256r1",gill.getStructEncoder([["fields",gill.getTupleEncoder([tn()])]])]])}function K(){return gill.getDiscriminatedUnionDecoder([["Ed25519",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])],["Secp256r1",gill.getStructDecoder([["fields",gill.getTupleDecoder([rn()])]])]])}function JM(){return gill.combineCodec(z(),K())}function YM(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function XM(e,n){return n.__kind===e}var un=(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))(un||{});function Rt(){return gill.getEnumEncoder(un)}function ht(){return gill.getEnumDecoder(un)}function QM(){return gill.combineCodec(Rt(),ht())}function Pt(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",N()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Rt()))],["wallets",gill.getArrayEncoder(on())],["role",Be()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function q(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",X()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(ht()))],["wallets",gill.getArrayDecoder(cn())],["role",Ne()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function nR(){return gill.combineCodec(Pt(),q())}function fe(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Se(){return gill.getStructDecoder([["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()]])}function aR(){return gill.combineCodec(fe(),Se())}function ke(){return gill.getStructEncoder([["accountMeta",st()],["data",Pt()]])}function we(){return gill.getStructDecoder([["accountMeta",ot()],["data",q()]])}function AR(){return gill.combineCodec(ke(),we())}function Tt(){return gill.getStructEncoder([["accountMeta",it()],["data",Pt()]])}function mt(){return gill.getStructDecoder([["accountMeta",dt()],["data",q()]])}function TR(){return gill.combineCodec(Tt(),mt())}function Ue(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Tt()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([ke()])]])]])}function Le(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([mt()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([we()])]])]])}function SR(){return gill.combineCodec(Ue(),Le())}function xR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function IR(e,n){return n.__kind===e}var Ce=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(Ce||{});function Be(){return gill.getEnumEncoder(Ce)}function Ne(){return gill.getEnumDecoder(Ce)}function DR(){return gill.combineCodec(Be(),Ne())}var eo=new Uint8Array([223,179,163,190,177,224,67,173]);function yh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(eo)}function np(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(At())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:eo}))}function nr(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(gt())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function ph(){return gill.combineCodec(np(),nr())}function to(e){return gill.decodeAccount(e,nr())}async function Th(e,n,r){let s=await An(e,n,r);return gill.assertAccountExists(s),s}async function An(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return to(s)}async function mh(e,n,r){let s=await sp(e,n,r);return gill.assertAccountsExist(s),s}async function sp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>to(t))}var co=new Uint8Array([90,36,35,219,93,225,110,96]);function xh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(co)}function Ep(){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",N()],["executor",N()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(N())],["expectedSigners",gill.getArrayEncoder(yt())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:co}))}function ao(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",X()],["executor",X()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(X())],["expectedSigners",gill.getArrayDecoder(pt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Ih(){return gill.combineCodec(Ep(),ao())}function io(e){return gill.decodeAccount(e,ao())}async function uo(e,n,r){let s=await Cp(e,n,r);return gill.assertAccountExists(s),s}async function Cp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return io(s)}async function Eh(e,n,r){let s=await Dp(e,n,r);return gill.assertAccountsExist(s),s}async function Dp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>io(t))}var yo=new Uint8Array([105,23,173,2,197,255,80,87]);function Mh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(yo)}function Gp(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:yo}))}function po(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function Rh(){return gill.combineCodec(Gp(),po())}function To(e){return gill.decodeAccount(e,po())}async function mo(e,n,r){let s=await Fp(e,n,r);return gill.assertAccountExists(s),s}async function Fp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return To(s)}async function hh(e,n,r){let s=await zp(e,n,r);return gill.assertAccountsExist(s),s}async function zp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>To(t))}function T({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 J(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function m(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let s=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:J(r.value),role:lo(r.value)?gill.upgradeRoleToSigner(s):s,...lo(r.value)?{signer:r.value}:{}})}}function lo(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var So=new Uint8Array([8]);function zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(So)}function Sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:So}))}function xo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function Kh(){return gill.combineCodec(Sn(),xo())}async function Io(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.whitelistedAddressTrees),c(t.payer),c(t.systemProgram),...a],data:Sn().encode(o),programAddress:r})}function jh(e,n){let r=n?.programAddress??u,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.whitelistedAddressTrees),c(t.payer),c(t.systemProgram),...a],data:Sn().encode(o),programAddress:r})}function qh(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:xo().decode(e.data)}}var Ro=new Uint8Array([9]);function eP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function ho(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(We())],["signers",gill.getArrayEncoder(z())],["compressedProofArgs",gill.getOptionEncoder(M())]]),e=>({...e,discriminator:Ro}))}function Po(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Oe())],["signers",gill.getArrayDecoder(K())],["compressedProofArgs",gill.getOptionDecoder(R())]])}function tP(){return gill.combineCodec(ho(),Po())}function bo(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.payer),c(t.systemProgram),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:ho().encode(o),programAddress:r})}function rP(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Po().decode(e.data)}}var Wo=new Uint8Array([19]);function dP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wo)}function Oo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(We())],["signers",gill.getArrayEncoder(z())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Wo}))}function Bo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Oe())],["signers",gill.getArrayDecoder(K())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function uP(){return gill.combineCodec(Oo(),Bo())}function No(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Oo().encode(o),programAddress:r})}function AP(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Bo().decode(e.data)}}var Ho=new Uint8Array([18]);function fP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ho)}function xn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()],["userArgs",Ue()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:Ho}))}function Vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",R()],["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()],["userArgs",Le()],["settingsIndex",gill.getU128Decoder()]])}function SP(){return gill.combineCodec(xn(),Vo())}async function Go(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.initialMember),c(t.systemProgram),c(t.globalCounter),c(t.whitelistedAddressTrees),...a],data:xn().encode(o),programAddress:r})}function xP(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.initialMember),c(t.systemProgram),c(t.globalCounter),c(t.whitelistedAddressTrees),...a],data:xn().encode(o),programAddress:r})}function IP(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:Vo().decode(e.data)}}var Xo=new Uint8Array([0]);function PP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xo)}function En(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",fe()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Xo}))}function Zo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",Se()],["compressedProofArgs",R()]])}function bP(){return gill.combineCodec(En(),Zo())}async function $o(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.domainConfig),c(t.payer),c(t.authority),c(t.systemProgram),c(t.whitelistedAddressTrees),...a],data:En().encode(o),programAddress:r})}function _P(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.domainConfig),c(t.payer),c(t.authority),c(t.systemProgram),c(t.whitelistedAddressTrees),...a],data:En().encode(o),programAddress:r})}function vP(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:Zo().decode(e.data)}}var tc=new Uint8Array([4]);function kP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tc)}function Cn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["member",en()],["role",Be()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Rt())],["userAccountCreationArgs",fe()],["linkWalletArgs",gill.getOptionEncoder(Jr())]]),e=>({...e,discriminator:tc}))}function rc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",R()],["member",St()],["role",Ne()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(ht())],["userAccountCreationArgs",Se()],["linkWalletArgs",gill.getOptionDecoder(Yr())]])}function wP(){return gill.combineCodec(Cn(),rc())}async function nc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.domainConfig),c(t.authority),c(t.whitelistedAddressTrees),...a],data:Cn().encode(o),programAddress:r})}function HP(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.domainConfig),c(t.authority),c(t.whitelistedAddressTrees),...a],data:Cn().encode(o),programAddress:r})}function VP(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:rc().decode(e.data)}}var oc=new Uint8Array([3]);function qP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oc)}function Mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:oc}))}function cc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function JP(){return gill.combineCodec(Mn(),cc())}async function ac(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={};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=T(o),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Mn().encode({}),programAddress:r})}function YP(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=T(o),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Mn().encode({}),programAddress:r})}function XP(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:cc().decode(e.data)}}var dc=new Uint8Array([5]);function nb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(dc)}function hn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayEncoder(jr())]]),e=>({...e,discriminator:dc}))}function uc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",R()],["createUserArgs",gill.getArrayDecoder(qr())]])}function sb(){return gill.combineCodec(hn(),uc())}async function Ac(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.systemProgram),c(t.whitelistedAddressTrees),...a],data:hn().encode(o),programAddress:r})}function ob(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.systemProgram),c(t.whitelistedAddressTrees),...a],data:hn().encode(o),programAddress:r})}function cb(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:uc().decode(e.data)}}var pc=new Uint8Array([17]);function yb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pc)}function Tc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",H()],["compressedProofArgs",M()],["signers",gill.getArrayEncoder(z())]]),e=>({...e,discriminator:pc}))}function mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",V()],["compressedProofArgs",R()],["signers",gill.getArrayDecoder(K())]])}function pb(){return gill.combineCodec(Tc(),mc())}function lc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.payer),c(t.systemProgram),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Tc().encode(o),programAddress:r})}function Tb(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:mc().decode(e.data)}}var xc=new Uint8Array([2]);function Ib(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xc)}function Ic(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:xc}))}function Ec(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function Eb(){return gill.combineCodec(Ic(),Ec())}function Cc(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.domainConfig),c(t.admin),...a],data:Ic().encode(o),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:{domainConfig:r(),admin:r()},data:Ec().decode(e.data)}}var hc=new Uint8Array([1]);function _b(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(hc)}function bn(){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($r())]]),e=>({...e,discriminator:hc}))}function Pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Qr())]])}function vb(){return gill.combineCodec(bn(),Pc())}async function Ub(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};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=T(i),c=m(r);return Object.freeze({accounts:[c(t.domainConfig),c(t.authority),c(t.newAuthority),c(t.whitelistedAddressTrees),c(t.systemProgram),...a],data:bn().encode(o),programAddress:r})}function bc(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.domainConfig),c(t.authority),c(t.newAuthority),c(t.whitelistedAddressTrees),c(t.systemProgram),...a],data:bn().encode(o),programAddress:r})}function Lb(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:Pc().decode(e.data)}}var Uc=new Uint8Array([6]);function Hb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uc)}function Lc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",ke()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",M()]]),e=>({...e,discriminator:Uc}))}function Wc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",we()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",R()]])}function Vb(){return gill.combineCodec(Lc(),Wc())}function Oc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.authority),...a],data:Lc().encode(o),programAddress:r})}function Gb(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:Wc().decode(e.data)}}var kc=new Uint8Array([7]);function Yb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(kc)}function wc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",ke()],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["delegateTo",gill.getOptionEncoder(nn())],["oldSettingsMutArgs",gill.getOptionEncoder(H())],["newSettingsMutArgs",gill.getOptionEncoder(H())],["compressedProofArgs",M()]]),e=>({...e,discriminator:kc}))}function Hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",we()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["delegateTo",gill.getOptionDecoder(sn())],["oldSettingsMutArgs",gill.getOptionDecoder(V())],["newSettingsMutArgs",gill.getOptionDecoder(V())],["compressedProofArgs",R()]])}function Xb(){return gill.combineCodec(wc(),Hc())}function Vc(e,n){let r=n?.programAddress??u,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.feePayer),c(t.signer),c(t.oldSettings),c(t.newSettings),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.domainConfig),...a],data:wc().encode(o),programAddress:r})}function Zb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:Hc().decode(e.data)}}var Fc=new Uint8Array([29]);function s_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fc)}function _n(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(z())]]),e=>({...e,discriminator:Fc}))}function zc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(K())]])}function o_(){return gill.combineCodec(_n(),zc())}async function c_(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(J(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.destination),c(t.systemProgram),...a],data:_n().encode(o),programAddress:r})}function Kc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.destination),c(t.systemProgram),...a],data:_n().encode(o),programAddress:r})}function a_(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:zc().decode(e.data)}}var Jc=new Uint8Array([27]);function p_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function Yc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(z())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Jc}))}function Xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(K())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function T_(){return gill.combineCodec(Yc(),Xc())}function Zc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.destination),c(t.systemProgram),...a],data:Yc().encode(o),programAddress:r})}function m_(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Xc().decode(e.data)}}var Qc=new Uint8Array([30]);function C_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qc)}function Un(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(z())]]),e=>({...e,discriminator:Qc}))}function ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(K())]])}function D_(){return gill.combineCodec(Un(),ea())}async function ta(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(J(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceSplTokenAccount.value||(t.sourceSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.sourceSplTokenAccount),c(t.destination),c(t.destinationSplTokenAccount),c(t.tokenProgram),c(t.mint),c(t.associatedTokenProgram),c(t.systemProgram),...a],data:Un().encode(o),programAddress:r})}function M_(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.sourceSplTokenAccount),c(t.destination),c(t.destinationSplTokenAccount),c(t.tokenProgram),c(t.mint),c(t.associatedTokenProgram),c(t.systemProgram),...a],data:Un().encode(o),programAddress:r})}function R_(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),destination:r(),destinationSplTokenAccount:r(),tokenProgram:r(),mint:r(),associatedTokenProgram:r(),systemProgram:r()},data:ea().decode(e.data)}}var oa=new Uint8Array([28]);function L_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oa)}function Ln(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(z())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:oa}))}function ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(K())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function W_(){return gill.combineCodec(Ln(),ca())}async function aa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};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(J(t.source.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(J(t.destination.value)),gill.getAddressEncoder().encode(J(t.tokenProgram.value)),gill.getAddressEncoder().encode(J(t.mint.value))]})),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.sourceSplTokenAccount),c(t.destination),c(t.destinationSplTokenAccount),c(t.tokenProgram),c(t.mint),c(t.associatedTokenProgram),c(t.systemProgram),...a],data:Ln().encode(o),programAddress:r})}function O_(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceSplTokenAccount:{value:e.sourceSplTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationSplTokenAccount:{value:e.destinationSplTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.slotHashSysvar),c(t.instructionsSysvar),c(t.source),c(t.sourceSplTokenAccount),c(t.destination),c(t.destinationSplTokenAccount),c(t.tokenProgram),c(t.mint),c(t.associatedTokenProgram),c(t.systemProgram),...a],data:Ln().encode(o),programAddress:r})}function B_(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),destination:r(),destinationSplTokenAccount:r(),tokenProgram:r(),mint:r(),associatedTokenProgram:r(),systemProgram:r()},data:ca().decode(e.data)}}var ua=new Uint8Array([13]);function F_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ua)}function Aa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:ua}))}function ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function z_(){return gill.combineCodec(Aa(),ga())}function ya(e,n){let r=n?.programAddress??u,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}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.payer),c(t.domainConfig),c(t.transactionBuffer),c(t.closer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Aa().encode(o),programAddress:r})}function K_(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:ga().decode(e.data)}}var ma=new Uint8Array([23]);function $_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ma)}function la(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ma}))}function fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function Q_(){return gill.combineCodec(la(),fa())}function Sa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.rentCollector),c(t.domainConfig),c(t.transactionBuffer),c(t.closer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:la().encode(o),programAddress:r})}function ev(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:fa().decode(e.data)}}var Ea=new Uint8Array([10]);function av(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ea)}function Ca(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Et()],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:Ea}))}function Da(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function iv(){return gill.combineCodec(Ca(),Da())}function Ma(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.payer),c(t.domainConfig),c(t.transactionBuffer),c(t.creator),c(t.systemProgram),c(t.instructionsSysvar),c(t.slotHashSysvar),...a],data:Ca().encode(o),programAddress:r})}function dv(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:Da().decode(e.data)}}var Pa=new Uint8Array([20]);function mv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pa)}function ba(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Et()],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",xt()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Pa}))}function _a(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",It()],["compressedProofArgs",R()]])}function lv(){return gill.combineCodec(ba(),_a())}function va(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.domainConfig),c(t.transactionBuffer),c(t.creator),c(t.systemProgram),c(t.instructionsSysvar),c(t.slotHashSysvar),...a],data:ba().encode(o),programAddress:r})}function fv(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:_a().decode(e.data)}}var Wa=new Uint8Array([14]);function Mv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wa)}function Oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:Wa}))}function Ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Rv(){return gill.combineCodec(Oa(),Ba())}function Na(e,n){let r=n?.programAddress??u,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}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.domainConfig),c(t.executor),c(t.transactionBuffer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Oa().encode(o),programAddress:r})}function hv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ba().decode(e.data)}}var Ha=new Uint8Array([24]);function Wv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ha)}function Va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ha}))}function Ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function Ov(){return gill.combineCodec(Va(),Ga())}function Fa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.domainConfig),c(t.executor),c(t.transactionBuffer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Va().encode(o),programAddress:r})}function Bv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ga().decode(e.data)}}var ja=new Uint8Array([12]);function Gv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ja)}function qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:ja}))}function Ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Fv(){return gill.combineCodec(qa(),Ja())}function Ya(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.transactionBuffer),...a],data:qa().encode(o),programAddress:r})}function zv(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:Ja().decode(e.data)}}var $a=new Uint8Array([22]);function Xv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($a)}function Qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:$a}))}function ei(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function Zv(){return gill.combineCodec(Qa(),ei())}function ti(e,n){let r=n?.programAddress??u,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.transactionBuffer),...a],data:Qa().encode(o),programAddress:r})}function $v(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:ei().decode(e.data)}}var si=new Uint8Array([11]);function oU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(si)}function oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())]]),e=>({...e,discriminator:si}))}function ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function cU(){return gill.combineCodec(oi(),ci())}function ai(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.domainConfig),c(t.transactionBuffer),c(t.voter),c(t.systemProgram),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:oi().encode(o),programAddress:r})}function aU(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ci().decode(e.data)}}var ui=new Uint8Array([21]);function pU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ui)}function Ai(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(k())],["settingsReadonlyArgs",xt()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ui}))}function gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",It()],["compressedProofArgs",R()]])}function TU(){return gill.combineCodec(Ai(),gi())}function yi(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.domainConfig),c(t.transactionBuffer),c(t.voter),c(t.systemProgram),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Ai().encode(o),programAddress:r})}function mU(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:gi().decode(e.data)}}var mi=new Uint8Array([15]);function EU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mi)}function li(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:mi}))}function fi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function CU(){return gill.combineCodec(li(),fi())}function Si(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},i=T({}),a=m(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:li().encode({}),programAddress:r})}function DU(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:fi().decode(e.data)}}var Ei=new Uint8Array([25]);function _U(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ei)}function Ci(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ei}))}function Di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function vU(){return gill.combineCodec(Ci(),Di())}function Mi(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},o={...e},a=T({args:o}),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.transactionBuffer),...a],data:Ci().encode(o),programAddress:r})}function UU(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:Di().decode(e.data)}}var Pi=new Uint8Array([16]);function wU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pi)}function bi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Dt()],["signers",gill.getArrayEncoder(z())]]),e=>({...e,discriminator:Pi}))}function _i(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Mt()],["signers",gill.getArrayDecoder(K())]])}function HU(){return gill.combineCodec(bi(),_i())}function vi(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.settings),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:bi().encode(o),programAddress:r})}function VU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:_i().decode(e.data)}}var Wi=new Uint8Array([26]);function JU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wi)}function Oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Dt()],["signers",gill.getArrayEncoder(z())],["settingsMutArgs",H()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Wi}))}function Bi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Mt()],["signers",gill.getArrayDecoder(K())],["settingsMutArgs",V()],["compressedProofArgs",R()]])}function YU(){return gill.combineCodec(Oi(),Bi())}function Ni(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},o={...e},i={args:o};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=T(i),c=m(r);return Object.freeze({accounts:[c(t.payer),c(t.slotHashSysvar),c(t.instructionsSysvar),...a],data:Oi().encode(o),programAddress:r})}function XU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Bi().decode(e.data)}}var u="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",tx=(o=>(o[o.DomainConfig=0]="DomainConfig",o[o.GlobalCounter=1]="GlobalCounter",o[o.Settings=2]="Settings",o[o.TransactionBuffer=3]="TransactionBuffer",o[o.WhitelistedAddressTree=4]="WhitelistedAddressTree",o))(tx||{});function UL(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 rx=(l=>(l[l.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",l[l.ChangeConfig=1]="ChangeConfig",l[l.ChangeConfigCompressed=2]="ChangeConfigCompressed",l[l.CreateCompressedWallet=3]="CreateCompressedWallet",l[l.CreateDomainConfig=4]="CreateDomainConfig",l[l.CreateDomainUserAccount=5]="CreateDomainUserAccount",l[l.CreateGlobalCounter=6]="CreateGlobalCounter",l[l.CreateUserAccounts=7]="CreateUserAccounts",l[l.DecompressSettingsAccount=8]="DecompressSettingsAccount",l[l.DisableDomainConfig=9]="DisableDomainConfig",l[l.EditDomainConfig=10]="EditDomainConfig",l[l.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",l[l.EditUserDelegate=12]="EditUserDelegate",l[l.NativeTransferIntent=13]="NativeTransferIntent",l[l.NativeTransferIntentCompressed=14]="NativeTransferIntentCompressed",l[l.TokenTransferIntent=15]="TokenTransferIntent",l[l.TokenTransferIntentCompressed=16]="TokenTransferIntentCompressed",l[l.TransactionBufferClose=17]="TransactionBufferClose",l[l.TransactionBufferCloseCompressed=18]="TransactionBufferCloseCompressed",l[l.TransactionBufferCreate=19]="TransactionBufferCreate",l[l.TransactionBufferCreateCompressed=20]="TransactionBufferCreateCompressed",l[l.TransactionBufferExecute=21]="TransactionBufferExecute",l[l.TransactionBufferExecuteCompressed=22]="TransactionBufferExecuteCompressed",l[l.TransactionBufferExtend=23]="TransactionBufferExtend",l[l.TransactionBufferExtendCompressed=24]="TransactionBufferExtendCompressed",l[l.TransactionBufferVote=25]="TransactionBufferVote",l[l.TransactionBufferVoteCompressed=26]="TransactionBufferVoteCompressed",l[l.TransactionExecute=27]="TransactionExecute",l[l.TransactionExecuteCompressed=28]="TransactionExecuteCompressed",l[l.TransactionExecuteSync=29]="TransactionExecuteSync",l[l.TransactionExecuteSyncCompressed=30]="TransactionExecuteSyncCompressed",l))(rx||{});function LL(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([29])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 30;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var sx=6e3,ox=6001,cx=6002,ax=6003,ix=6004,dx=6005,ux=6006,Ax=6007,gx=6008,yx=6009,px=6010,Tx=6011,mx=6012,lx=6013,fx=6014,Sx=6015,xx=6016,Ix=6017,Ex=6018,Cx=6019,Dx=6020,Mx=6021,Rx=6022,hx=6023,Px=6024,bx=6025,_x=6026,vx=6027,Ux=6028,Lx=6029,Wx=6030,Ox=6031,Bx=6032,Nx=6033,kx=6034,wx=6035,Hx=6036,Vx=6037,Gx=6038,Fx=6039,zx=6040,Kx=6041,jx=6042,qx=6043,Jx=6044,Yx=6045,Xx=6046,Zx=6047,$x=6048,Qx=6049,eI=6050,tI=6051,rI=6052,nI=6053,sI=6054,oI=6055,cI=6056,aI=6057,iI=6058,dI=6059,uI=6060,AI=6061,gI=6062,yI=6063,pI=6064,TI=6065,mI=6066,lI=6067,fI=6068,SI=6069,xI=6070,II=6071,EI=6072,CI=6073,DI=6074,MI=6075,RI=6076,hI=6077,PI=6078,bI=6079,_I=6080,vI=6081,UI=6082,LI=6083,WI=6084,OI=6085,BI=6086,ki;process.env.NODE_ENV!=="production"&&(ki={[Ox]:"This member is already delegated to another wallet.",[Ax]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[hI]:"Clock sysvar access failed. This may indicate a system error.",[tI]:"Missing credential id.",[nI]:"The domain configuration account is disabled. Please contact support or try again later.",[sI]:"Missing domain configuration account.",[MI]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[BI]:"Duplicate address tree detected. This address tree is already in the whitelist.",[px]:"Duplicate public keys detected among members. Each member must have a unique key.",[yx]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[Mx]:"No members provided. A multisig wallet must contain at least one member.",[uI]:"Slot numbers list is empty. At least one slot number is required for validation.",[Ex]:"Expected a User with Administrator role for this instruction.",[gx]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[xx]:"Expected a User with Transaction Manager role for this instruction.",[zx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Kx]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[jx]:"Declared buffer size does not match the actual serialized size.",[dI]:"Failed to compute hash. This may indicate a system error.",[kx]:"Not enough members with vote permission to meet the approval threshold.",[Bx]:"At least one signer with execute permission is required to proceed.",[Nx]:"At least one signer with initiate permission is required to perform this action.",[_x]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[DI]:"Invalid account index in transaction message. The account index is out of bounds.",[aI]:"Address Tree supplied is not part of the whitelisted address trees.",[Cx]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[Ux]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Fx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[AI]:"Member key conversion failed. The provided key format is invalid.",[wx]:"Only delegated members are allowed for this transaction.",[bx]:"Unexpected number of accounts provided for this instruction.",[lx]:"User with Permanent Member role must have a delegated wallet.",[ox]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[ix]:"The extracted public key has an invalid length or encoding.",[sx]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[ax]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[eI]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[$x]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[hx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[II]:"Invalid source type for token transfer. The source account type is not supported.",[Ix]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[Sx]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[Px]:"Malformed transaction message: structure or formatting does not match the expected layout.",[_I]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[vx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[bI]:"Invalid user configuration. Transaction manager URL must be empty for non-transaction-manager users.",[xI]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[dx]:"The extracted WebAuthn signed message payload is malformed.",[Xx]:"An input string exceeds the maximum allowed character length.",[oI]:"This member is not registered under the provided domain configuration.",[pI]:"Member not found in settings. Cannot remove a member that does not exist.",[CI]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[Lx]:"A required account is missing from the instruction context.",[gI]:"Compressed proof arguments are missing. Required for compressed account operations.",[lI]:"Missing compressed token account. Required for token transfer operations.",[vI]:"Missing destination token account. Required for token transfer operations.",[SI]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[yI]:"Light CPI accounts are missing. Required for compressed account operations.",[Wx]:"User mutation arguments are required when performing add or remove delegate operations.",[WI]:"Missing new authority account. Required for domain configuration updates.",[LI]:"Missing settings account. Required for delegate operations on compressed wallets.",[iI]:"Compressed settings data is missing. The settings account must be initialized with data.",[UI]:"Missing source token account. Required for token transfer operations.",[fI]:"Missing SPL interface PDA. Required for token transfer operations.",[Zx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[RI]:"User account address is missing. Required for secp256r1 signature verification.",[OI]:"Missing whitelisted address trees account. Required for domain configuration updates.",[Vx]:"No valid signer found in this transaction.",[Dx]:"Only one administrator is allowed per wallet.",[mx]:"Only one permanent member is allowed per wallet.",[fx]:"Only one transaction manager is allowed per wallet.",[cI]:"The given origin index is not in the whitelisted origins.",[mI]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[Tx]:"Permanent members cannot be removed from a wallet.",[Yx]:"Writable CPI calls to protected accounts are not permitted.",[ux]:"The rpIdHash extracted from the signed message does not match the expected value.",[TI]:"Settings key mismatch. The provided settings key does not match the expected value.",[cx]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Qx]:"The specified slot number was not found in the provided slot history.",[EI]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[Rx]:"Too many members: a maximum of 4 members are supported.",[qx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Jx]:"This transaction has not yet reached the required approval threshold.",[rI]:"Missing transports.",[Gx]:"Only the transaction creator or rent payer may close this transaction buffer.",[PI]:"Unauthorized: Only the admin account is allowed to perform this action.",[Hx]:"Member is not part of the expected signers for this transaction."});function wL(e){return process.env.NODE_ENV!=="production"?ki[e]:"Error message not available in production bundles."}function HL(e,n,r){return gill.isProgramError(e,n,u,r)}async function ZL({admin:e,addressTree:n}){return Io({payer:e,addressTree:n,remainingAccounts:[]})}var xe=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);}},Ve=class extends xe{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},Y=class extends xe{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},P=class extends xe{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},ge=class extends xe{constructor(r,s,t){super(r,"NETWORK_ERROR",{statusCode:s,url:t});this.statusCode=s;this.url=t;}};var se=class extends xe{constructor(r,s,t){super(r,"BUNDLE_ERROR",{bundleId:s,attempt:t});this.bundleId=s;this.attempt=t;}},gr=class extends xe{constructor(r,s,t){super(`Operation "${r}" failed after ${s} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=s;this.lastError=t;}},yr=class extends xe{constructor(r,s,t){super(r,"PERMISSION_ERROR",{required:s,actual:t});this.required=s;this.actual=t;}};var _t={Ed25519:1,Secp256r1:2};var NI=g__default.default.looseObject({publicKey:g__default.default.string(),walletAddress:g__default.default.string(),settingsIndexWithAddress:g__default.default.object({index:g__default.default.union([g__default.default.number(),g__default.default.bigint()]),settingsAddressTreeIndex:g__default.default.number()}),username:g__default.default.string().optional(),profilePictureUrl:g__default.default.string().optional()}),wi=g__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),sW=g__default.default.object({transactionActionType:wi,transactionAddress:g__default.default.string(),transactionMessageBytes:g__default.default.array(g__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),kI=g__default.default.object({transactionActionType:wi,transactionAddress:g__default.default.string(),transactionMessageBytes:g__default.default.base64()}).strict(),wI=g__default.default.union([g__default.default.object({type:g__default.default.literal("Ephemeral"),secretKey:g__default.default.string()}),g__default.default.object({type:g__default.default.literal("Default"),publickey:g__default.default.string(),endpoint:g__default.default.string()})]).array().optional(),Hi=g__default.default.object({phase:g__default.default.literal("start"),redirectOrigin:g__default.default.url(),signer:g__default.default.string().optional(),rid:g__default.default.string(),validTill:g__default.default.number(),data:g__default.default.object({type:g__default.default.literal("message"),payload:g__default.default.string(),trustedDeviceCheck:g__default.default.boolean()}).strict()}).strict(),Vi=g__default.default.object({phase:g__default.default.literal("start"),redirectOrigin:g__default.default.url(),signer:g__default.default.string().optional(),rid:g__default.default.string(),validTill:g__default.default.number(),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:kI,sendTx:g__default.default.boolean(),additionalSigners:wI}).strict()}).strict(),Gi=g__default.default.object({startRequest:g__default.default.union([Hi,Vi]),authResponse:g__default.default.custom(),client:g__default.default.object({clientOrigin:g__default.default.url(),jws:g__default.default.string()}).strict(),device:g__default.default.object({jwk:g__default.default.base64(),jws:g__default.default.string()}).strict(),authProvider:g__default.default.object({jwk:g__default.default.base64(),jws:g__default.default.string()}).strict().optional()}).strict(),Fi=g__default.default.object({signer:g__default.default.string(),userAddressTreeIndex:g__default.default.number().optional(),additionalInfo:g__default.default.looseObject({}).optional()}).strict(),HI=g__default.default.object({slotHash:g__default.default.string(),slotNumber:g__default.default.string(),originIndex:g__default.default.number(),crossOrigin:g__default.default.boolean()}).strict(),oW=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("message"),payload:Fi.extend(Gi.shape).extend({id:g__default.default.string().optional(),client:g__default.default.object({clientOrigin:g__default.default.url()}).strict()})}).strict()}).strict(),cW=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:Fi.extend(Gi.shape).extend(HI.shape).extend({client:g__default.default.object({clientOrigin:g__default.default.url()}).strict()})}).strict()}).strict(),aW=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:g__default.default.object({startRequest:g__default.default.union([Vi,Hi]),txSig:g__default.default.string(),user:NI})}).strict()}).strict();var Ie={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},De=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,s)=>r|s,0))}static all(){return new e(Object.values(Ie).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var Bn=33,Me=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==Bn)throw new Error(`Invalid public key length, expected ${Bn} 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===Bn)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()}},b=class extends Me{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function FI(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function zI(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ki=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(FI())],["addressTableLookups",gill.getArrayCodec(zI())]]);function ji(e){return Ki.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 qi(e){let n=Ki.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:u,staticAccounts:n.accountKeys,version:0}}var kn=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Ji="https://mainnet.block-engine.jito.wtf/api/v1",Yi="https://bundles.jito.wtf/api/v1/bundles/tip_floor",Xi="landed_tips_75th_percentile";var ee={};function Zi(){if(!ee.solanaRpcEndpoint)throw new Ve("RPC endpoint");return ee.solanaRpcEndpoint}function he(){if(!ee.lightProtocolRpc)throw new Ve("Light Protocol RPC");return ee.lightProtocolRpc}function j(){if(!ee.solanaRpc)throw new Ve("Solana RPC");return ee.solanaRpc}function $i(){if(!ee.sendAndConfirm)throw new Ve("Send and confirm transaction function");return ee.sendAndConfirm}function wn(){return ee.jitoTipsConfig?ee.jitoTipsConfig:{blockEngineUrl:Ji,getJitoTipsUrl:Yi,priority:Xi}}function vW({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s}){ee.solanaRpcEndpoint=e,ee.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:o}=gill.createSolanaClient({urlOrMoniker:e});ee.solanaRpc=t,ee.sendAndConfirm=o,ee.jitoTipsConfig=s??null;}async function vt(e,n){if(!e.ok)throw new ge(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function Ut(e){try{return await e.json()}catch(n){throw new ge(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function jW(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Tr(n.get(-2))),y:BigInt("0x"+Tr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function qW(e){let r=nist_js.p256.Point.fromBytes(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 JW(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=ue(n),o=JSON.parse(gill.getUtf8Decoder().decode(ue(r))),i=nd(o),a=od(ue(s)),c=await Ye({rpIdHash:t.subarray(0,32)});return new b(e.signer.toString(),{verifyArgs:{clientDataJson:ue(r),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:Hn(e.client.clientOrigin,e.device.jwk,e.startRequest.rid),domainConfig:c,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function Hn(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase64Encoder().encode(n),...gill.getBase64Encoder().encode(r)]))}function YW(e){return sha2_js.sha256(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function XW(e){return Vn(e.data.payload.authResponse)}function ZW(e,n,r,s){let t=Hn(n,r,s);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function $W(e,n,r,s,t,o){let i;if(!t||!o){let A=(await j().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!A)throw new Y("Slot sysvar","Unable to fetch slot sysvar data");let y=gill.getBase64Encoder().encode(A[0]);o=gill.getU64Decoder().decode(y.subarray(0,8)).toString(),i=y.subarray(8,40),t=gill.getBase58Decoder().decode(i);}else i=gill.getBase58Encoder().encode(t);let a=sha2_js.sha256(typeof e.transactionMessageBytes=="string"?gill.getBase64Encoder().encode(e.transactionMessageBytes):e.transactionMessageBytes),c=Hn(n,r,s),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...a,...i,...c]));return {slotNumber:o,slotHash:t,challenge:d}}function Vn(e){let n=mr(e);return sha2_js.sha256(n)}function QW(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ue(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),o=new ArrayBuffer(t.length),i=new Uint8Array(o);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return i}async function eO(e,n){let{data:r}=await ss(j(),e),t=sd(r.origins,r.numOrigins).findIndex(o=>o===n);if(t===-1)throw new Y("Origin","Origin not found in domain config");return t}function tO(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function rO(e){return JSON.parse(gill.getUtf8Decoder().decode(gill.getBase64Encoder().encode(e)))}function Tr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function QI(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 nd(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 sd(e,n){let r=[],s=0,t=new TextDecoder;for(let o=0;o<n;o++){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),c=t.decode(a);r.push(c),s+=i;}return r}function od(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 _=n&127;r+=_;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,o=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,c=e.slice(a,a+i),d=o[0]===0&&o.length>32?o.slice(1):o,A=c[0]===0&&c.length>32?c.slice(1):c;if(d.length>32||A.length>32)throw new Error("r or s length > 32 bytes");let y=new Uint8Array(32);y.set(d,32-d.length);let p=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+Tr(A)),I=(f>p?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=QI(I);return new Uint8Array([...y,...x])}function mr(e){let n=ue(e.response.clientDataJSON),r=ue(e.response.authenticatorData),s=sha2_js.sha256(n);return new Uint8Array([...r,...s])}var eE=400,tE=429,ad=500,rE=3,nE=500,sE=2,oE=3e4,id={backoffBase:sE,maxDelayMs:oE,retryOnRateLimit:true,initialDelayMs:nE,maxRetries:rE};function dd(e){return e===tE}function ud(e){return e>=ad}function cE(e){return e>=eE&&e<ad}function aE(e){return dd(e)||ud(e)}function iE(e,n,r){return e instanceof Response?dd(e.status)?r.retryOnRateLimit??true:cE(e.status)?false:ud(e.status):e instanceof TypeError||e instanceof Error}function dE(e,n,r,s){let t=n*Math.pow(r,e-1);return Math.min(t,s)}function uE(e){return new Promise(n=>setTimeout(n,e))}async function Ot(e,n){let{maxRetries:r,initialDelayMs:s,backoffBase:t,maxDelayMs:o,shouldRetry:i}={...id,...n},a;for(let c=1;c<=r;c++)try{return await e()}catch(d){if(a=d,i&&!i(d,c))throw d;if(c>=r)break;let A=dE(c,s,t,o);await uE(A);}throw new gr(e.name||"retryWithBackoff",r,a)}async function Xe(e,n){let r={...id,...n},s=(o,i)=>iE(o,i,r);return Ot(async()=>{let o=await e();if(!o.ok&&aE(o.status))throw o;return o},{...r,shouldRetry:n?.shouldRetry??s})}function Ad(...e){return n=>e.some(r=>n instanceof r)}function gd(e,n,r,s){if(e<n||e>r)throw new P(`${s} must be between ${n} and ${r} (inclusive), got ${e}`)}function yd(e,n){if(e<0)throw new P(`${n} must be non-negative, got ${e}`)}function Bt(e,n){if(e.length===0)throw new P(`${n} cannot be empty`)}function pd(e,n){if(e.trim().length===0)throw new P(`${n} cannot be empty`)}async function Fn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await j().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),o=>gill.appendTransactionMessageInstructions(s.instructions,o),o=>gill.setTransactionMessageFeePayerSigner(s.payer,o),o=>gill.setTransactionMessageLifetimeUsingBlockhash(r,o),o=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(o,s.addressesByLookupTableAddress):o,async o=>{let i=Math.ceil((s.unitsConsumed??0)*1.1);return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],o):o},async o=>n?gill.compileTransaction(await o):await gill.signTransactionMessageWithSigners(await o))))}async function Sd(e){let n=gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:8e5}),programs.getSetComputeUnitPriceInstruction({microLamports:1e4})],e),r=gill.getBase64EncodedWireTransaction(gill.compileTransaction(n));if(r.length>1644)throw new P(`Transaction exceeds maximum length of ${1644} bytes (actual: ${r.length} bytes)`);let s=await j().simulateTransaction(r,{encoding:"base64"}).send();if(s.value.err){if(s.value.logs){let o=["Transaction simulation failed:","",...s.value.logs].join(`
|
|
2
|
-
`);throw new Error(
|
|
3
|
-
`);throw new Error(t)}return s.value.unitsConsumed}async function xd(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(o=>o.role===gill.AccountRole.WRITABLE||o.role===gill.AccountRole.WRITABLE_SIGNER).map(o=>o.address)).send()).map(o=>Number(o.prioritizationFee));s.sort((o,i)=>o-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 Id(e,n){Bt(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new P(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await Xe(()=>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:[]}))}]})}));await vt(r,n);let s=await Ut(r);if(!s.result||s.error)throw new se(`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,[,o]=t;throw new se(`Simulation failed: ${o}`)}return s.result.value.transactionResults.map(t=>t.unitsConsumed)}function oe(e,n=0){let r=e instanceof b?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,o=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs.clientDataJson?mr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:o,message:i,publicKey:a}}function Pe(e,n,r=[]){let s=[];for(let t of e)if(t instanceof b){let o=r.length,{domainConfig:i,verifyArgs:a,signature:c,publicKey:d,message:A}=oe(t,o);if(A&&c&&d&&r.push({message:A,signature:c,publicKey:d}),i){let y=n.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]).get(i)?.index;a.__option==="Some"&&y!==void 0&&s.push({__kind:"Secp256r1",fields:[{domainConfigIndex:y,verifyArgs:a.value}]});}}else {let o=n.addPreAccounts([{address:t.address,role:gill.AccountRole.READONLY_SIGNER,signer:t}]).get(t.address)?.index;o!==void 0&&s.push({__kind:"Ed25519",fields:[o]});}return {secp256r1VerifyInput:r,transactionSyncSigners:s}}function ye(e){if(e instanceof Me)return {keyType:_t.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:_t.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function Td(e){return e instanceof b?e.toString():e.address.toString()}function ae(e){let n=new Set,r=[];for(let t of e)n.has(Td(t))||(r.push(t),n.add(Td(t)));let s=r.filter(t=>t instanceof b);if(s.length>1)throw new P(`More than 1 Secp256r1 signers in an instruction is not supported (found ${s.length})`);return r}function Ed({payer:e,tipAmount:n}){let r=kn[Math.floor(Math.random()*kn.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function Cd(e){return typeof e=="string"?e:e.toString()}function Dd(e){return e.toString()}async function zn(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 G=class{systemAccounts;nextPreIndex;preMap;nextPackedIndex;packedMap;outputTreeIndex;constructor(){this.systemAccounts=[],this.nextPreIndex=0,this.preMap=new Map,this.nextPackedIndex=0,this.packedMap=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){for(let r of n)this.insertOrGet(r.address.toString(),r,false);return this.preMap}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(u.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n,r={address:gill.address(n),role:gill.AccountRole.WRITABLE},s=true){let t=s?this.packedMap:this.preMap;if(!t.has(n)){let o=s?this.nextPackedIndex++:this.nextPreIndex++;t.set(n,{index:o,accountMeta:r});}return t.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 he().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let o of n){let i=this.insertOrGet(o.treeInfo.tree.toString()),a=this.insertOrGet(o.treeInfo.queue.toString());s.push({rootIndex:o.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:o.leafIndex,proveByIndex:o.proveByIndex});let c=o.treeInfo.nextTreeInfo??o.treeInfo,d=this.packOutputTreeIndex(c);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let o of r){let i=this.insertOrGet(o.treeInfo.tree.toString()),a=this.insertOrGet(o.treeInfo.queue.toString());t.push({rootIndex:o.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(n){return Array.from(n.entries()).sort((s,t)=>s[1].index-t[1].index).map(([,{accountMeta:s}])=>({...s}))}getOffsets(n){let r=n,s=r+this.systemAccounts.length;return [r,s]}toAccountMetas(){let n=this.hashSetAccountsToMetas(this.preMap),r=this.hashSetAccountsToMetas(this.packedMap),[s,t]=this.getOffsets(n.length);return {remainingAccounts:[...n,...this.systemAccounts,...r],systemOffset:s,packedOffset:t}}};async function Sr(e,n){let r=Cd(e);return zn(n,r,()=>he().getCompressedAccount(e))}async function xr(e,n){let r=Dd(e);return zn(n,r,()=>j().getAccountInfo(e,{encoding:"base64"}).send())}async function Ae(e,n){let r=(await Promise.all(e.map(s=>Sr(s.address,n)))).filter(s=>s!==null).filter(s=>s.data!==null&&s.address!==null);if(r.length!==e.length)throw new Y("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((s,t)=>({...s,type:e[t].type,tree:s.treeInfo.tree,queue:s.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 pe(e,n,r,s,t){if(t.length===0)return [];let o=t.map((d,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:d.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],o),a=await e.getOutputTreeIndex();return t.map((d,A)=>({addressTreeInfo:i[A],outputStateTreeIndex:a,address:d.address,type:d.type}))}function te(e,n,r,s,t,o,i){let a=[];for(let A=0;A<n.length;A++)a.push({treeInfo:n[A],rootIndex:s[A],leafIndex:r[A],proveByIndex:t[A],hash:o[A].hash});let c=e.packTreeInfos(a,[]).stateTrees;if(!c)throw new P("Unable to parse state tree data");return o.map((A,y)=>({data:i.decode(A.data.data),accountMeta:{treeInfo:c.packedTreeInfos[y],address:new Uint8Array(A.address),outputStateTreeIndex:c.outputTreeIndex}}))}async function ie(e,n,r,s,t){let o=null,i=null,a=null,c=new G;if(e){await c.addSystemAccounts();let{address:d}=await ce(n,r),A=(await Ae([{address:d,type:"Settings"}],t))[0];s?a={rootIndices:[0],roots:[],leafIndices:[A.leafIndex],leaves:[],treeInfos:[A.treeInfo],proveByIndices:[A.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:a=await $([A],[]);let y=c.packTreeInfos([{treeInfo:a.treeInfos[0],rootIndex:a.rootIndices[0],leafIndex:a.leafIndices[0],proveByIndex:a.proveByIndices[0],hash:A.hash}],[]).stateTrees;if(!y)throw new P("Unable to parse state tree data");let p=Z().decode(A.data?.data);o={accountMeta:{address:new Uint8Array(A.address),treeInfo:y.packedTreeInfos[0]},data:p},i={accountMeta:{address:new Uint8Array(A.address),treeInfo:y.packedTreeInfos[0],outputStateTreeIndex:y.outputTreeIndex},data:p};}return {settingsReadonlyArgs:o,proof:a,packedAccounts:c,settingsMutArgs:i}}async function $(e,n){return Ot(()=>he().getValidityProofV0(e,n))}async function Te(){return (await Ir()).length-1}var Kn;async function Ir(){if(!Kn){let{data:e}=await mo(j(),await hd());Kn=e.whitelistedAddressTrees;}return Kn}async function kt(e,n,r){let s=await UE(e,n,r);if(!s)throw new Y("User account");return s}async function UE(e,n,r){let{address:s}=await O(e,n),t=await Sr(s,r);return t?.data?.data?q().decode(t.data.data):null}async function XO(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(N().encode(ye(n)))}});else if(r)s.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(ue(r))}});else return null;let t=await he().getCompressedAccountsByOwner(new web3_js.PublicKey(u.toString()),{filters:s});return t.items.filter(o=>!!o.data).length?t.items.map(o=>q().decode(o.data?.data))[0]:null}async function Er(e,n,r){let s=await LE(e,n,r);if(!s)throw new Y("Settings account");return s}async function LE(e,n,r){try{let{address:s}=await ce(e,n),t=await Sr(s,r);if(!t?.data?.data)throw new Y("Compressed settings account");let o=Z().decode(t.data.data);if(o.data.__option==="None")throw new Y("Compressed settings account");return {...o.data.value,isCompressed:!0}}catch{let s=await An(j(),e);return s.exists?{...s.data,isCompressed:false}:null}}async function ZO(e,n,r){let s=await kt(e,n,r);if(s.role===1||s.role===0){let t=[],[o,i]=await Promise.all([he().getCompressedAccountsByOwner(new web3_js.PublicKey(u.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(N().encode(ye(e)))}}]}),j().getProgramAccounts(u,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(N().encode(ye(e)))}}]}).send()]);return o.items.forEach(a=>{if(a.data?.data){let c=Z().decode(a.data.data);c.data.__option==="Some"&&t.push({...c.data.value,isCompressed:true});}}),i.forEach(a=>{let c=nr().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...c,isCompressed:false});}),t}else return await Promise.all(s.wallets.map(async t=>Er(await me(t.index),t.settingsAddressTreeIndex,r)))}async function qn(e){yd(e,"index");let n=await Ir();if(e>=n.length)throw new P(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function $O(e){let r=(await Ir()).findIndex(s=>s.toString()===e);if(r===-1)throw new Y("Address tree",`Address ${e} not found in whitelist`);return r}async function ce(e,n=0){let r=await qn(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function O(e,n=0){let r=await qn(n),s=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof Me?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function Ye({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new P("Either rpId or rpIdHash must be provided");let[r]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function Ud(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function hd(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function Ld(e,n,r){gd(r,0,255,"buffer_index");let[s]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Me?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ee(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("vault")]});return n}async function me(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function dB(e){let n=await me(e);return await Ee(n)}async function uB(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function SB(e){Bt(e,"bundle");let n=await Fn(e,true),r=await Id(n.map(gill.getBase64EncodedWireTransaction),Zi()),s=await Fn(e.map((o,i)=>({...o,unitsConsumed:r[i]})));return await NE(s.map(gill.getBase64EncodedWireTransaction))}async function NE(e,n=wn(),r){Bt(e,"serializedTransactions");let{blockEngineUrl:s}=n,t=`${s}/bundles`,o=await Xe(()=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),r);await vt(o,t);let i=await Ut(o);if(i.error)throw new se(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new se("No bundle ID returned from Jito");return i.result}async function xB(e,n=30,r=3e3,s=wn()){pd(e,"bundleId");let{blockEngineUrl:t}=s,o=`${t}/getBundleStatuses`;return Ot(async()=>{let i=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});await vt(i,o);let a=await Ut(i);if(a.error)throw new se(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new se("Bundle not yet confirmed",e);let c=a.result.value[0];if(c.confirmation_status==="confirmed"||c.confirmation_status==="finalized"){let d=c.transactions[c.transactions.length-1];if(!d)throw new se("No transactions in confirmed bundle",e);return d}throw new se(`Bundle status: ${c.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:Ad(se,ge)})}async function hB({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await j().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),o=>gill.appendTransactionMessageInstructions(e,o),o=>gill.setTransactionMessageFeePayerSigner(n,o),o=>gill.setTransactionMessageLifetimeUsingBlockhash(s.value,o),o=>r?gill.compressTransactionMessageUsingAddressLookupTables(o,r):o,async o=>{let[i,a]=await Promise.all([Sd(o),xd(j(),o.instructions.flatMap(d=>d.accounts??[]))]),c=Math.ceil((Number(i)??0)*1.1);return gill.prependTransactionMessageInstructions([...c>2e5?[programs.getSetComputeUnitLimitInstruction({units:c})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],o)},async o=>await gill.signTransactionMessageWithSigners(await o));return await $i()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function GB(e,n){if(n.threshold>1)throw new P("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(c=>Nd(c.pubkey)===e);if(!r)throw new Y("Member",`Signer ${e} not found in settings`);let{permissions:s}=r;if(!s)throw new Y("Permissions","No permissions found for the current member");let t=De.has(s,Ie.InitiateTransaction),o=De.has(s,Ie.VoteTransaction),i=De.has(s,Ie.ExecuteTransaction);if(t&&o&&i)return {};if(!o||!i)throw new yr("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[o?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(c=>c.role===0);if(!a)throw new Y("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(Nd(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function FB({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let o=await kt(n,r,t);if(o.transactionManagerUrl.__option==="None")throw new Y("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return eC(n,o.transactionManagerUrl.value,e,s)}function eC(e,n,r,s){return {address:e,async signTransactions(t){let o=await Xe(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicKey:e.toString(),payload:t.map(a=>({transaction:gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)),transactionMessageBytes:s?gill.getBase64Decoder().decode(s):void 0,authResponses:r}))})}));if(!o.ok)throw new ge(`Transaction manager request failed: ${o.statusText}`,o.status,n);let i=await o.json();if("error"in i)throw new ge(`Transaction manager error: ${i.error}`,o.status,n);return i.signatures.map(a=>({[e]:gill.getBase58Encoder().encode(a)}))}}}function Nd(e){return e.keyType===_t.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function zB(e){let n=e.map(o=>We().encode(o)),r=4+n.reduce((o,i)=>o+i.length,0),s=new Uint8Array(r),t=0;s.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let o of n)s.set(o,t),t+=o.length;return s}function KB(e){let n=0,[r,s]=gill.getU32Decoder().read(e,n);n=s;let t=new Array(r);for(let o=0;o<r;o++){let i=Oe().read(e,n);t[o]=i[0],n=i[1];}if(n!==e.length)throw new P(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function aN({payer:e,rpId:n,origins:r,authority:s}){let t=await Ye({rpId:n}),o=new G;await o.addSystemAccounts();let i=await Te(),{address:a,addressTree:c}=await O(s.address,i),d=[{address:a,tree:c,queue:c,type:"User"}],A=await $([],d),y=(await pe(o,A.treeInfos,A.roots,A.rootIndices,d))[0],{remainingAccounts:p,systemOffset:f}=o.toAccountMetas(),S=U(A,f);return await $o({origins:r,authorityCreationArgs:y,authority:s,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:p})}async function fN({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let o=new G;await o.addSystemAccounts();let i=[];r.settings&&(r.transactionManager&&i.push({address:(await O(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}),i.push({address:(await ce(r.settings,r.settingsAddressTreeIndex)).address,type:"Settings"}));let a=i.length?await Ae(i,t):[],c=await Te(),{address:d,addressTree:A}=await O(r.member,c),y=[{address:d,type:"User",tree:A,queue:A}],p=await $(a,y),f=null,S=null,I=a.filter(W=>W.type==="Settings"),x=a.filter(W=>W.type==="User");if(x.length&&(S=te(o,p.treeInfos.slice(0,1),p.leafIndices.slice(0,1),p.rootIndices.slice(0,1),p.proveByIndices.slice(0,1),x,q())[0]),I.length){let W=x.length,F=W+1;f=te(o,p.treeInfos.slice(W,F),p.leafIndices.slice(W,F),p.rootIndices.slice(W,F),p.proveByIndices.slice(W,F),I,Z())[0];}let _=(await pe(o,p.treeInfos.slice(a.length),p.roots.slice(a.length),p.rootIndices.slice(a.length),y))[0],{remainingAccounts:h,systemOffset:v}=o.toAccountMetas(),L=U(p,v);return await nc({payer:n,authority:e,compressedProofArgs:L,member:St().decode(r.member.toBuffer()),credentialId:ue(r.credentialId),transports:r.transports,role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:_,domainConfig:s,remainingAccounts:h})}async function EN({payer:e}){let n=await Ud();return ac({payer:e,globalCounter:n})}async function RN({admin:e,rpId:n,disable:r}){let s=await Ye({rpId:n});return Cc({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}function rC(e,n,r,s){let t=nC(e,n),o=sC(e,n)&&r!==s;return t&&o?gill.AccountRole.WRITABLE_SIGNER:t&&!o?gill.AccountRole.WRITABLE:!t&&o?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function nC(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:o}=e.header,i=s-t,a=r-s-o;return n>=r?false:n<i?true:n>=s?n-s<a:false}function sC(e,n){return n<e.header.numSignerAccounts}async function Cr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=qi(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let o=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(a=>a.lookupTableAddress),j()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,c]of t.staticAccounts.entries())i.push({address:c,role:rC(t,a,c,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let c=o[a.lookupTableAddress];if(!c)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let A=c[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.WRITABLE});}for(let d of a.readonlyIndexes){let A=c[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.READONLY});}}for(let a of s?.filter(c=>c.address!==e)??[]){let c=i.findIndex(d=>d.address===a.address);c===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[c].role===gill.AccountRole.READONLY||i[c].role===gill.AccountRole.READONLY_SIGNER?i[c]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[c].role===gill.AccountRole.WRITABLE||i[c].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[c]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:o,transactionMessage:t}}var $e=33,Qe=64,Zn=14,AC=2,gC=gill.address("Secp256r1SigVerify1111111111111111111111111");function yC(){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 pC(){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 Fd(){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=[],o=pC();for(let a=0;a<r;a++)t.push(o.decode(e,n)),n+=Zn;let i=[];for(let a=0;a<r;a++){let c=gill.fixDecoderSize(gill.getBytesDecoder(),$e).decode(e,n);n+=$e;let d=gill.fixDecoderSize(gill.getBytesDecoder(),Qe).decode(e,n);n+=Qe;let A=t[a].messageDataSize,y=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,i.push({publicKey:c,signature:d,message:y});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function zd(){return gill.createEncoder({getSizeFromValue:e=>{let n=Zn*e.offsets.length,r=e.payload.reduce((s,t)=>s+$e+Qe+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let s=yC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),$e).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Qe).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function wN(){return gill.combineCodec(zd(),Fd())}function B(e,n){let r=e.length,s=AC+r*Zn,t=[];for(let c=0;c<r;c++){let{message:d}=e[c],A=s,y=A+$e,p=y+Qe;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:y,signatureInstructionIndex:65535,messageDataOffset:p,messageDataSize:d.length,messageInstructionIndex:65535}),s+=$e+Qe+d.length;}let o=n?.programAddress??gC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:o,data:zd().encode(i)}}function HN(e){return {programAddress:e.programAddress,accounts:{},data:Fd().decode(e.data)}}async function Kd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:o=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:c=false}){let d=await Ee(e),{accountMetas:A,addressLookupTableAccounts:y}=await Cr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),p=[];return o.length>0&&p.push(B(o)),p.push(c?Mi({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):Si({transactionBuffer:n,payer:s.address,settings:e})),a&&p.push(Ed({payer:s,tipAmount:a})),{instructions:p,addressLookupTableAccounts:y}}async function jd({settings:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,additionalSigners:s,signers:t,payer:o,addressesByLookupTableAddress:i,secp256r1VerifyInput:a=[],compressed:c=false,simulateProof:d=false,cachedAccounts:A}){let y=ae(t),p=await Ee(e),[{accountMetas:f,addressLookupTableAccounts:S,transactionMessage:I},{settingsMutArgs:x,proof:_,packedAccounts:h}]=await Promise.all([Cr({transactionMessageBytes:r,walletAddress:p,additionalSigners:s,addressesByLookupTableAddress:i}),ie(c,e,n,d,A)]);h.addPreAccounts(f);let{secp256r1VerifyInput:v,transactionSyncSigners:L}=Pe(y,h,a),{remainingAccounts:W,systemOffset:F}=h.toAccountMetas(),ne=[];v.length>0&&ne.push(B(v));let je=TC(I,f);if(c){if(!o||!x)throw new P("Payer not found or proof args are missing for executeTransactionSync.");let be=U(_,F);ne.push(Ni({signers:L,transactionMessage:je,settingsMutArgs:x,compressedProofArgs:be,payer:o,remainingAccounts:W}));}else ne.push(vi({signers:L,settings:e,transactionMessage:je,remainingAccounts:W}));return {instructions:ne,addressLookupTableAccounts:S}}function TC(e,n){if(e.version==="legacy")throw new P("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:r.data??[]})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(s=>s.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function Tk({settings:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:o,payer:i,compressed:a=false}){let c=ae(s),d=await Ee(e),[{packedAccounts:A,proof:y,settingsMutArgs:p},{value:f}]=await Promise.all([ie(a,e,n,false,t),xr(d,t)]);if((f?.lamports??0)<BigInt(o))throw new P("Insufficient balance for native transfer.");let{secp256r1VerifyInput:S,transactionSyncSigners:I}=Pe(c,A),{remainingAccounts:x,systemOffset:_}=A.toAccountMetas(),h=[];if(S.length>0&&h.push(B(S)),a){if(!i||!p)throw new Error("Payer not found or proof args is missing.");let v=U(y,_);h.push(Zc({amount:o,settingsMutArgs:p,compressedProofArgs:v,payer:i,signers:I,source:d,destination:r,remainingAccounts:x}));}else h.push(Kc({amount:o,signers:I,source:d,destination:r,settings:e,remainingAccounts:x}));return h}async function hk({settings:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:o,amount:i,payer:a,tokenProgram:c,compressed:d=false}){let A=ae(t),y=await Ee(e),p=await programs.getAssociatedTokenAccountAddress(s,y,c),[{packedAccounts:f,proof:S,settingsMutArgs:I},{value:x}]=await Promise.all([ie(d,e,n,false,o),xr(p,o)]);if((x?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(x.data[0])).amount:0)<i)throw new P("Insufficient balance for token transfer.");let{secp256r1VerifyInput:h,transactionSyncSigners:v}=Pe(A,f),{remainingAccounts:L,systemOffset:W}=f.toAccountMetas(),F=[];if(h.length>0&&F.push(B(h)),d){if(!a||!I)throw new Error("Payer not found or proof args is missing.");let ne=U(S,W);F.push(await aa({amount:i,settingsMutArgs:I,compressedProofArgs:ne,payer:a,signers:v,source:y,destination:r,remainingAccounts:L,sourceSplTokenAccount:p,tokenProgram:c,mint:s}));}else F.push(await ta({amount:i,signers:v,source:y,destination:r,settings:e,remainingAccounts:L,sourceSplTokenAccount:p,tokenProgram:c,mint:s}));return F}async function wk({signers:e,payer:n,changeConfigArgs:r}){let{settings:s,configActions:t,compressed:o,packedAccounts:i,proof:a,settingsMutArgs:c}=r,d=ae(e),A=[],y=[];for(let x of d)if(x instanceof b){let _=y.length,{domainConfig:h,verifyArgs:v,signature:L,publicKey:W,message:F}=oe(x,_);if(F&&L&&W&&y.push({message:F,signature:L,publicKey:W}),h){let ne=i.addPreAccounts([{address:h,role:gill.AccountRole.READONLY}]).get(h)?.index;v.__option==="Some"&&ne!==void 0&&A.push({__kind:"Secp256r1",fields:[{domainConfigIndex:ne,verifyArgs:v.value}]});}}else {let _=i.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]).get(x.address)?.index;_!==void 0&&A.push({__kind:"Ed25519",fields:[_]});}let{remainingAccounts:p,systemOffset:f}=i.toAccountMetas(),S=U(a,f),I=[];if(y.length>0&&I.push(B(y)),o){if(!c)throw new P("Proof args are missing for compressed changeConfig.");I.push(No({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:c,remainingAccounts:p,signers:A}));}else I.push(bo({settings:s,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:p,signers:A}));return I}async function jk({createUserArgs:e,payer:n}){let r=new G;await r.addSystemAccounts(),r.addPreAccounts(e.map(A=>({address:A.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:A.member})));let s=await Te(),t=await Promise.all(e.map(async A=>{let{address:y,addressTree:p}=await O(A.member.address,s);return {address:y,tree:p,queue:p,type:"User"}})),o=await $([],t),i=await pe(r,o.treeInfos,o.roots,o.rootIndices,t),{remainingAccounts:a,systemOffset:c}=r.toAccountMetas(),d=U(o,c);return await Ac({compressedProofArgs:d,payer:n,createUserArgs:e.map((A,y)=>({member:A.member.address,role:A.role,userCreationArgs:i[y],transactionManagerUrl:A.role===0?A.transactionManagerUrl:null})),remainingAccounts:a})}async function Qk({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let o=new G;await o.addSystemAccounts();let i=[],a=[];a.push(...await Ae([{address:(await O(r.address,s)).address,type:"User"}],t));let c=await Te(),{address:d,addressTree:A}=await ce(await me(e),c);i.push({address:d,queue:A,tree:A,type:"Settings"});let y=a.length,p=await $(a,i),f=te(o,p.treeInfos.slice(0,y),p.leafIndices.slice(0,y),p.rootIndices.slice(0,y),p.proveByIndices.slice(0,y),a.filter(v=>v.type==="User"),q())[0],I=(await pe(o,p.treeInfos.slice(y),p.roots.slice(y),p.rootIndices.slice(y),i)).find(v=>v.type==="Settings")??null,{remainingAccounts:x,systemOffset:_}=o.toAccountMetas(),h=U(p,_);if(!I)throw new Error("Settings creation args is missing.");return await Go({settingsIndex:e,payer:n,initialMember:r,userArgs:f.data.role===3?{__kind:"Mutate",fields:[f]}:{__kind:"Read",fields:[f]},compressedProofArgs:h,...I,remainingAccounts:x})}async function dw({settings:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let{packedAccounts:o,proof:i,settingsMutArgs:a}=await ie(true,e,n,false,t);if(!a)throw new P("Proof args are missing for settings account.");let c=ae(s),{secp256r1VerifyInput:d,transactionSyncSigners:A}=Pe(c,o),{remainingAccounts:y,systemOffset:p}=o.toAccountMetas(),f=U(i,p),S=[];return d.length>0&&S.push(B(d)),S.push(lc({settings:e,payer:r,settingsMutArgs:a,compressedProofArgs:f,signers:A,remainingAccounts:y})),S}async function mw({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,o=[];if(r){let i=new G;await i.addSystemAccounts();let a=await Te(),{address:c,addressTree:d}=await O(r.address,a),A=[{address:c,tree:d,queue:d,type:"User"}],y=await $([],A),p=(await pe(i,y.treeInfos,y.roots,y.rootIndices,A))[0],f=i.toAccountMetas();o=f.remainingAccounts,t={compressedProofArgs:U(y,f.systemOffset),authorityCreationArgs:p};}return bc({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:o})}async function Ew({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new G;await s.addSystemAccounts();let t=await Ae([{address:(await O(e.address,n)).address,type:"User"}]),o=await $(t,[]),i=te(s,o.treeInfos,o.leafIndices,o.rootIndices,o.proveByIndices,t,q())[0],{remainingAccounts:a,systemOffset:c}=s.toAccountMetas(),d=U(o,c);return Oc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function Uw({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:o,verifyArgs:i,message:a,signature:c,publicKey:d}=oe(n),A=[];a&&c&&d&&A.push({message:a,signature:c,publicKey:d});let y=await kt(n instanceof b?n:n.address,r,t),p=[];p.push({address:(await O(n instanceof b?n:n.address,r)).address,type:"User"});let f,S=null,I,x=null,_=y.wallets.find(le=>le.isDelegate);if(_){let le=await me(_.index);(await Er(le,_.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ce(le,_.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:p.length-1,end:p.length}):f=await me(_.index);}if(s){let le=await me(s.index);(await Er(le,s.settingsAddressTreeIndex,t)).isCompressed?(p.push({address:(await ce(le,s.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:p.length-1,end:p.length}):I=await me(s.index);}let h=new G;await h.addSystemAccounts();let v=await Ae(p,t),L=await $(v,[]),W=te(h,L.treeInfos.slice(0,1),L.leafIndices.slice(0,1),L.rootIndices.slice(0,1),L.proveByIndices.slice(0,1),v.slice(0,1),q())[0],F=S?gill.some(te(h,L.treeInfos.slice(S.start,S.end),L.leafIndices.slice(S.start,S.end),L.rootIndices.slice(S.start,S.end),L.proveByIndices.slice(S.start,S.end),v.slice(S.start,S.end),Z())[0]):gill.none(),ne=x?gill.some(te(h,L.treeInfos.slice(x.start,x.end),L.leafIndices.slice(x.start,x.end),L.rootIndices.slice(x.start,x.end),L.proveByIndices.slice(x.start,x.end),v.slice(x.start,x.end),Z())[0]):gill.none(),{remainingAccounts:je,systemOffset:be}=h.toAccountMetas(),hr=U(L,be),et=[];return A.length>0&&et.push(B(A)),et.push(Vc({secp256r1VerifyArgs:i,domainConfig:o,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof b?void 0:n,oldSettings:f,oldSettingsMutArgs:F,newSettings:I,newSettingsMutArgs:ne,compressedProofArgs:hr,userMutArgs:W,remainingAccounts:je})),et}async function Yw({settingsAddressTreeIndex:e,closer:n,transactionBufferAddress:r,payer:s,compressed:t=false,cachedAccounts:o}){let i=await uo(j(),r),a=i.data.multiWalletSettings,{packedAccounts:c,proof:d,settingsMutArgs:A}=await ie(t,a,e,false,o),{remainingAccounts:y,systemOffset:p}=c.toAccountMetas(),{domainConfig:f,verifyArgs:S,message:I,signature:x,publicKey:_}=oe(n),h=[];if(I&&x&&_&&h.push(B([{message:I,signature:x,publicKey:_}])),t){if(!s||!A)throw new P("Payer not found or proof args are missing for closing buffer.");let v=U(d,p);h.push(Sa({transactionBuffer:r,domainConfig:f,closer:n instanceof b?void 0:n,rentCollector:i.data.payer,secp256r1VerifyArgs:S,settingsMutArgs:A,payer:s,compressedProofArgs:v,remainingAccounts:y}));}else h.push(ya({transactionBuffer:r,domainConfig:f,closer:n instanceof b?void 0:n,settings:a,payer:i.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return h}function Jd({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:o,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:c,compressedArgs:d,expectedSigners:A}){let{domainConfig:y,verifyArgs:p,message:f,signature:S,publicKey:I}=oe(n),x=[];if(f&&S&&I&&x.push(B([{message:f,signature:S,publicKey:I}])),d){let{settingsReadonlyArgs:_,compressedProofArgs:h,remainingAccounts:v}=d;x.push(va({transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof b?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:o,finalBufferSize:i,bufferExtendHashes:c,preauthorizeExecution:a,expectedSigners:A},settingsReadonlyArgs:_,compressedProofArgs:h,remainingAccounts:v}));}else x.push(Ma({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:p,creator:n instanceof b?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:o,finalBufferSize:i,bufferExtendHashes:c,preauthorizeExecution:a,expectedSigners:A},remainingAccounts:[]}));return x}function Yd({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:o,signature:i,message:a,publicKey:c}=oe(e),d=[];return a&&i&&c&&d.push(B([{message:a,signature:i,publicKey:c}])),s?d.push(Fa({transactionBuffer:n,secp256r1VerifyArgs:o,domainConfig:t,executor:e instanceof b?void 0:e,settingsMutArgs:s.settingsMutArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Na({settings:r,transactionBuffer:n,secp256r1VerifyArgs:o,domainConfig:t,executor:e instanceof b?void 0:e,remainingAccounts:[]})),d}function Xd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?ti({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Ya({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Zd({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:o,signature:i,publicKey:a,message:c}=oe(n),d=[];return c&&i&&a&&d.push(B([{message:c,signature:i,publicKey:a}])),s?d.push(yi({transactionBuffer:r,secp256r1VerifyArgs:o,domainConfig:t,voter:n instanceof b?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(ai({settings:e,transactionBuffer:r,secp256r1VerifyArgs:o,domainConfig:t,voter:n instanceof b?void 0:n,remainingAccounts:[]})),d}async function k2({settings:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:s,compressed:t=false}){let o=await EC(r),i=new G,a=null,c=null,d=[];if(o.length||t){let y=await CC({packedAccounts:i,userAccounts:o,compressed:t,settings:e,settingsAddressTreeIndex:n,cachedAccounts:s});a=y.proof,c=y.settingsMutArgs??null,d=y.userMutArgs??[];}return {configActions:await DC({configActionsArgs:r,userMutArgs:d}),settings:e,proof:a,settingsMutArgs:c,packedAccounts:i,compressed:t}}async function EC(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let s=await Promise.all(r.members.map(t=>O(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let s=await Promise.all(r.members.map(t=>O(t.member,t.userAddressTreeIndex)));for(let t of s)n.push({address:t.address,type:"User"});break}}return n}async function CC({packedAccounts:e,userAccounts:n,compressed:r,settings:s,settingsAddressTreeIndex:t,cachedAccounts:o}){await e.addSystemAccounts();let i=[];if(r){let f=(await ce(s,t)).address;i.push({address:f,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await Ae(i,o):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let c=await $(a,[]),d=[],A=[];for(let f of a)f.type==="Settings"?d.push(f):f.type==="User"&&A.push(f);let y,p=[];if(r&&c&&(y=te(e,c.treeInfos.slice(0,1),c.leafIndices.slice(0,1),c.rootIndices.slice(0,1),c.proveByIndices.slice(0,1),d,Z())[0]),A.length&&c){let f=r?1:0;p=te(e,c.treeInfos.slice(f),c.leafIndices.slice(f),c.rootIndices.slice(f),c.proveByIndices.slice(f),A,q());}return {proof:c,settingsMutArgs:y,userMutArgs:p}}async function DC({configActionsArgs:e,userMutArgs:n}){let r=[];for(let s of e)switch(s.type){case "AddMembers":{let t=[];for(let o of s.members){let i=await O(o.member,o.userAddressTreeIndex).then(a=>n.find(c=>utils_js.equalBytes(c.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address)))));if(!i)throw new Error("Unable to find user account");t.push(hC({permissionArgs:o.permissions,userMutArgs:i,pubkey:o.member}));}r.push({__kind:s.type,fields:[t]});break}case "RemoveMembers":{let t=await Promise.all(s.members.map(o=>O(o.member,o.userAddressTreeIndex).then(i=>{let a=n.find(c=>utils_js.equalBytes(c.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address))));if(!a)throw new Error("Unable to find user account");return RC({pubkey:o.member,userMutArgs:a})})));r.push({__kind:s.type,fields:[t]});break}case "EditPermissions":{let t=s.members.map(o=>MC({permissionArgs:o.permissions,pubkey:o.member}));r.push({__kind:s.type,fields:[t]});break}default:r.push({__kind:s.type,fields:[s.threshold]});}return r}function MC({pubkey:e,permissionArgs:n}){return {memberKey:ye(e),permissions:tu(n)}}function RC({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:ye(e),userArgs:r===3?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function hC({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:ye(e),permissions:tu(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function tu(e){let n=[];return e.initiate&&n.push(Ie.InitiateTransaction),e.vote&&n.push(Ie.VoteTransaction),e.execute&&n.push(Ie.ExecuteTransaction),De.fromPermissions(n)}async function j2({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:o,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:c,compressed:d=false,additionalVoters:A=[],additionalSigners:y=[],chunkSize:p=Math.ceil(s.length/2),cachedAccounts:f}){let S=Math.floor(Math.random()*255),I=await Ld(n,t instanceof b?t:t.address,S),x=[],_=[];for(let Q=0;Q<s.length;Q+=p){let es=s.subarray(Q,Q+p);x.push(es),_.push(sha2_js.sha256(es));}let h=sha2_js.sha256(s),{settingsReadonlyArgs:v,settingsMutArgs:L,proof:W,packedAccounts:F}=await ie(d,n,r,false,f),{remainingAccounts:ne,systemOffset:je}=F.toAccountMetas(),be=W&&v&&L?{settingsReadonlyArgs:v,settingsMutArgs:L,compressedProofArgs:U(W,je),remainingAccounts:ne,payer:e}:null,hr=ae([t,...o?[o]:[],...A]).map(Q=>({memberKey:ye(Q),messageHash:Q instanceof b?Vn(Q.authResponse):null})),et=Jd({finalBufferHash:h,finalBufferSize:s.length,bufferIndex:S,payer:e,transactionBufferAddress:I,settings:n,creator:t,preauthorizeExecution:!o,bufferExtendHashes:_,compressedArgs:be,expectedSigners:hr}),le=x.map(Q=>Xd({transactionMessageBytes:Q,transactionBufferAddress:I,settings:n,compressed:d})),Ht=A.map(Q=>Zd({voter:Q,transactionBufferAddress:I,settings:n,compressedArgs:be})),su=Yd({compressedArgs:be,settings:n,executor:o,transactionBufferAddress:I}),{instructions:l,addressLookupTableAccounts:ou}=await Kd({compressed:d,settings:n,transactionMessageBytes:s,transactionBufferAddress:I,payer:e,additionalSigners:y,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:c}),tt=Q=>({payer:e,instructions:Q,addressesByLookupTableAddress:ou});return [tt(et),...le.map(Q=>tt([Q])),...Ht.length?[tt(Ht.flat())]:[],tt(su),tt(l)]}var Mr=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},o=t(r);o.isSigner=true,o.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let c=t(a.address);c.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,c.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(([,d])=>d.isSigner&&d.isWritable),s=n.filter(([,d])=>d.isSigner&&!d.isWritable),t=n.filter(([,d])=>!d.isSigner&&d.isWritable),o=n.filter(([,d])=>!d.isSigner&&!d.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:o.length};if(r.length===0)throw new Error("Expected at least one writable signer key");let[a]=r[0];if(a!==this.payer)throw new Error("Expected first writable signer key to be the fee payer");let c=[...r.map(([d])=>d),...s.map(([d])=>d),...t.map(([d])=>d),...o.map(([d])=>d)];return [i,c]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,o]=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:o}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[o,i]of this.keyMetaMap.entries())if(r(i)){let a=o,c=n.findIndex(d=>d===a);if(c>=0){if(c>=256)throw new Error("Max lookup table index exceeded");s.push(c),t.push(a),this.keyMetaMap.delete(o);}}return [s,t]}};var Rr=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((o,i)=>{s.set(o,i);});let t=o=>{let i=s.get(o);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(o=>({programAddressIndex:t(o.programAddress),accountIndices:o.accounts?.map(i=>t(i.address))??[],data:o.data}))}};function nu({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=Mr.compile(r,e),o=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let p of a){let f=t.extractTableLookup(p);if(f!==void 0){let{addressTableLookup:S,drainedKeys:I}=f;o.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),i.writable.push(...I.writable),i.readonly.push(...I.readonly);}}let[c,d]=t.getMessageComponents(),y=new Rr(d,i).compileInstructions(r);return {version:0,header:c,instructions:y,lifetimeToken:n,staticAccounts:d,addressTableLookups:o}}function o8({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=nu({instructions:e,payer:n,recentBlockhash:u,addressesByLookupTableAddress:r});return new Uint8Array(ji(s))}async function u8({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,additionalSigners:o,secp256r1VerifyInput:i,addressesByLookupTableAddress:a,cachedAccounts:c,compressed:d=false,simulateProof:A=false}){let{instructions:y,addressLookupTableAccounts:p}=await jd({settings:n,settingsAddressTreeIndex:r,payer:e,signers:t,additionalSigners:o,transactionMessageBytes:s,secp256r1VerifyInput:i,compressed:d,addressesByLookupTableAddress:a,simulateProof:A,cachedAccounts:c});return {payer:e,instructions:y,addressesByLookupTableAddress:p}}exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=So;exports.AdditionalSignersSchema=wI;exports.AuthenticationContextSchema=Gi;exports.BaseResponseSchema=Fi;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=Wo;exports.CHANGE_CONFIG_DISCRIMINATOR=Ro;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=Ho;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Xo;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=tc;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=oc;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=dc;exports.CompleteMessageRequestSchema=oW;exports.CompleteSendTransactionRequestSchema=aW;exports.CompleteTransactionRequestSchema=cW;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=pc;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=xc;exports.DOMAIN_CONFIG_DISCRIMINATOR=ts;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=hc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=Uc;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=kc;exports.GLOBAL_COUNTER_DISCRIMINATOR=as;exports.KeyType=_t;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=Ox;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=Ax;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=hI;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=tI;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=nI;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=sI;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=MI;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=BI;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=px;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=yx;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=Mx;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=uI;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=Ex;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=gx;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=xx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=zx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Kx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=jx;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=dI;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=kx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=Bx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=Nx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=_x;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=DI;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=aI;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=Cx;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=Ux;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Fx;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=AI;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=wx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=bx;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=lx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=ox;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=ix;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=sx;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=ax;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=eI;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=$x;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=hx;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=II;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=Ix;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=Sx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=Px;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=_I;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=vx;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=bI;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=xI;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=dx;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=Xx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=oI;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=pI;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=CI;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=Lx;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=gI;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=lI;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=vI;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=SI;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=yI;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=Wx;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=WI;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=LI;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=iI;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=UI;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=fI;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Zx;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=RI;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=OI;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=Vx;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=Dx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=mx;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=fx;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=cI;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=mI;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=Tx;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Yx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=ux;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=TI;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=cx;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Qx;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=EI;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=Rx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=qx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Jx;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=rI;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=Gx;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=PI;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Hx;exports.MULTI_WALLET_PROGRAM_ADDRESS=u;exports.MultiWalletAccount=tx;exports.MultiWalletInstruction=rx;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Jc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Fc;exports.Permission=Ie;exports.Permissions=De;exports.SETTINGS_DISCRIMINATOR=eo;exports.Secp256r1Key=Me;exports.SignedSecp256r1Key=b;exports.StartMessageRequestSchema=Hi;exports.StartTransactionRequestSchema=Vi;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=oa;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Qc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=ma;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=ua;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Pa;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=Ea;exports.TRANSACTION_BUFFER_DISCRIMINATOR=co;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ha;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Wa;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=$a;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=ja;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=ui;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=si;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=Ei;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=mi;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Wi;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Pi;exports.TransactionActionTypeSchema=wi;exports.TransactionDetailsSchema=HI;exports.TransactionPayloadSchema=sW;exports.TransactionPayloadWithBase64MessageBytesSchema=kI;exports.Transports=un;exports.UserInfoSchema=NI;exports.UserRole=Ce;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=yo;exports.addWhitelistedAddressTrees=ZL;exports.base64URLStringToBuffer=ue;exports.bufferToBase64URLString=QW;exports.changeConfig=wk;exports.closeTransactionBuffer=Yw;exports.configAction=fD;exports.convertBase64StringToJWK=rO;exports.convertJWKToBase64String=tO;exports.convertMemberKeyToString=Nd;exports.convertPubkeyCompressedToCose=qW;exports.convertPubkeyCoseToCompressed=jW;exports.createClientAuthorizationCompleteRequestChallenge=XW;exports.createClientAuthorizationStartRequestChallenge=YW;exports.createDomainConfig=aN;exports.createDomainUserAccounts=fN;exports.createGlobalCounter=EN;exports.createMessageChallenge=ZW;exports.createTransactionBuffer=Jd;exports.createTransactionChallenge=$W;exports.createTransactionManagerSigner=eC;exports.createUserAccounts=jk;exports.createWallet=Qk;exports.decodeDomainConfig=ns;exports.decodeGlobalCounter=ds;exports.decodeSettings=to;exports.decodeTransactionBuffer=io;exports.decodeWhitelistedAddressTree=To;exports.decompressSettingsAccount=dw;exports.deserializeConfigActions=KB;exports.disableDomainConfig=RN;exports.editDomainConfig=mw;exports.editTransactionManagerUrl=Ew;exports.editUserDelegate=Uw;exports.executeTransaction=Kd;exports.executeTransactionBuffer=Yd;exports.executeTransactionSync=jd;exports.extendTransactionBuffer=Xd;exports.fetchAllDomainConfig=LC;exports.fetchAllGlobalCounter=HC;exports.fetchAllMaybeDomainConfig=Su;exports.fetchAllMaybeGlobalCounter=Ou;exports.fetchAllMaybeSettings=sp;exports.fetchAllMaybeTransactionBuffer=Dp;exports.fetchAllMaybeWhitelistedAddressTree=zp;exports.fetchAllSettings=mh;exports.fetchAllSettingsAccountByMember=ZO;exports.fetchAllTransactionBuffer=Eh;exports.fetchAllWhitelistedAddressTree=hh;exports.fetchDomainConfig=ss;exports.fetchGlobalCounter=wC;exports.fetchMaybeDomainConfig=fu;exports.fetchMaybeGlobalCounter=Wu;exports.fetchMaybeSettings=An;exports.fetchMaybeSettingsAccountData=LE;exports.fetchMaybeTransactionBuffer=Cp;exports.fetchMaybeUserAccountData=UE;exports.fetchMaybeWhitelistedAddressTree=Fp;exports.fetchSettings=Th;exports.fetchSettingsAccountData=Er;exports.fetchTransactionBuffer=uo;exports.fetchUserAccountByFilters=XO;exports.fetchUserAccountData=kt;exports.fetchWhitelistedAddressTree=mo;exports.getAddMemberArgsCodec=KC;exports.getAddMemberArgsDecoder=br;exports.getAddMemberArgsEncoder=Pr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=zh;exports.getAddWhitelistedAddressTreesInstruction=jh;exports.getAddWhitelistedAddressTreesInstructionAsync=Io;exports.getAddWhitelistedAddressTreesInstructionDataCodec=Kh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=xo;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Sn;exports.getChangeConfigCompressedDiscriminatorBytes=dP;exports.getChangeConfigCompressedInstruction=No;exports.getChangeConfigCompressedInstructionDataCodec=uP;exports.getChangeConfigCompressedInstructionDataDecoder=Bo;exports.getChangeConfigCompressedInstructionDataEncoder=Oo;exports.getChangeConfigDiscriminatorBytes=eP;exports.getChangeConfigInstruction=bo;exports.getChangeConfigInstructionDataCodec=tP;exports.getChangeConfigInstructionDataDecoder=Po;exports.getChangeConfigInstructionDataEncoder=ho;exports.getClientAndDeviceHash=Hn;exports.getCompiledInstructionCodec=JC;exports.getCompiledInstructionDecoder=vr;exports.getCompiledInstructionEncoder=_r;exports.getCompressedAccountMetaCodec=$C;exports.getCompressedAccountMetaDecoder=ot;exports.getCompressedAccountMetaEncoder=st;exports.getCompressedAccountMetaReadOnlyCodec=rD;exports.getCompressedAccountMetaReadOnlyDecoder=dt;exports.getCompressedAccountMetaReadOnlyEncoder=it;exports.getCompressedProofCodec=oD;exports.getCompressedProofDecoder=Nr;exports.getCompressedProofEncoder=Br;exports.getCompressedSettingsAddress=ce;exports.getCompressedSettingsCodec=dD;exports.getCompressedSettingsDataCodec=yD;exports.getCompressedSettingsDataDecoder=wr;exports.getCompressedSettingsDataEncoder=kr;exports.getCompressedSettingsDecoder=Z;exports.getCompressedSettingsEncoder=ut;exports.getConfigActionCodec=lD;exports.getConfigActionDecoder=Oe;exports.getConfigActionEncoder=We;exports.getCreateCompressedWalletDiscriminatorBytes=fP;exports.getCreateCompressedWalletInstruction=xP;exports.getCreateCompressedWalletInstructionAsync=Go;exports.getCreateCompressedWalletInstructionDataCodec=SP;exports.getCreateCompressedWalletInstructionDataDecoder=Vo;exports.getCreateCompressedWalletInstructionDataEncoder=xn;exports.getCreateDomainConfigDiscriminatorBytes=PP;exports.getCreateDomainConfigInstruction=_P;exports.getCreateDomainConfigInstructionAsync=$o;exports.getCreateDomainConfigInstructionDataCodec=bP;exports.getCreateDomainConfigInstructionDataDecoder=Zo;exports.getCreateDomainConfigInstructionDataEncoder=En;exports.getCreateDomainUserAccountDiscriminatorBytes=kP;exports.getCreateDomainUserAccountInstruction=HP;exports.getCreateDomainUserAccountInstructionAsync=nc;exports.getCreateDomainUserAccountInstructionDataCodec=wP;exports.getCreateDomainUserAccountInstructionDataDecoder=rc;exports.getCreateDomainUserAccountInstructionDataEncoder=Cn;exports.getCreateGlobalCounterDiscriminatorBytes=qP;exports.getCreateGlobalCounterInstruction=YP;exports.getCreateGlobalCounterInstructionAsync=ac;exports.getCreateGlobalCounterInstructionDataCodec=JP;exports.getCreateGlobalCounterInstructionDataDecoder=cc;exports.getCreateGlobalCounterInstructionDataEncoder=Mn;exports.getCreateUserAccountArgsCodec=CD;exports.getCreateUserAccountArgsDecoder=qr;exports.getCreateUserAccountArgsEncoder=jr;exports.getCreateUserAccountsDiscriminatorBytes=nb;exports.getCreateUserAccountsInstruction=ob;exports.getCreateUserAccountsInstructionAsync=Ac;exports.getCreateUserAccountsInstructionDataCodec=sb;exports.getCreateUserAccountsInstructionDataDecoder=uc;exports.getCreateUserAccountsInstructionDataEncoder=hn;exports.getDecompressSettingsAccountDiscriminatorBytes=yb;exports.getDecompressSettingsAccountInstruction=lc;exports.getDecompressSettingsAccountInstructionDataCodec=pb;exports.getDecompressSettingsAccountInstructionDataDecoder=mc;exports.getDecompressSettingsAccountInstructionDataEncoder=Tc;exports.getDisableDomainConfigDiscriminatorBytes=Ib;exports.getDisableDomainConfigInstruction=Cc;exports.getDisableDomainConfigInstructionDataCodec=Eb;exports.getDisableDomainConfigInstructionDataDecoder=Ec;exports.getDisableDomainConfigInstructionDataEncoder=Ic;exports.getDomainConfigAddress=Ye;exports.getDomainConfigCodec=UC;exports.getDomainConfigDecoder=rs;exports.getDomainConfigDiscriminatorBytes=vC;exports.getDomainConfigEncoder=lu;exports.getDomainConfigSize=WC;exports.getEditDomainConfigDiscriminatorBytes=_b;exports.getEditDomainConfigInstruction=bc;exports.getEditDomainConfigInstructionAsync=Ub;exports.getEditDomainConfigInstructionDataCodec=vb;exports.getEditDomainConfigInstructionDataDecoder=Pc;exports.getEditDomainConfigInstructionDataEncoder=bn;exports.getEditMemberArgsCodec=hD;exports.getEditMemberArgsDecoder=Fr;exports.getEditMemberArgsEncoder=Gr;exports.getEditTransactionManagerUrlDiscriminatorBytes=Hb;exports.getEditTransactionManagerUrlInstruction=Oc;exports.getEditTransactionManagerUrlInstructionDataCodec=Vb;exports.getEditTransactionManagerUrlInstructionDataDecoder=Wc;exports.getEditTransactionManagerUrlInstructionDataEncoder=Lc;exports.getEditUserDelegateDiscriminatorBytes=Yb;exports.getEditUserDelegateInstruction=Vc;exports.getEditUserDelegateInstructionDataCodec=Xb;exports.getEditUserDelegateInstructionDataDecoder=Hc;exports.getEditUserDelegateInstructionDataEncoder=wc;exports.getExpectedSignerCodec=vD;exports.getExpectedSignerDecoder=pt;exports.getExpectedSignerEncoder=yt;exports.getGlobalCounterAddress=Ud;exports.getGlobalCounterCodec=kC;exports.getGlobalCounterDecoder=is;exports.getGlobalCounterDiscriminatorBytes=NC;exports.getGlobalCounterEncoder=Lu;exports.getGlobalCounterSize=VC;exports.getJitoTipsConfig=wn;exports.getLightCpiSigner=uB;exports.getLightProtocolRpc=he;exports.getLinkWalletArgsCodec=OD;exports.getLinkWalletArgsDecoder=Yr;exports.getLinkWalletArgsEncoder=Jr;exports.getMemberCodec=wD;exports.getMemberDecoder=gt;exports.getMemberEncoder=At;exports.getMemberKeyCodec=GD;exports.getMemberKeyDecoder=X;exports.getMemberKeyEncoder=N;exports.getMultiWalletErrorMessage=wL;exports.getNativeTransferIntentCompressedDiscriminatorBytes=p_;exports.getNativeTransferIntentCompressedInstruction=Zc;exports.getNativeTransferIntentCompressedInstructionDataCodec=T_;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Xc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=Yc;exports.getNativeTransferIntentDiscriminatorBytes=s_;exports.getNativeTransferIntentInstruction=Kc;exports.getNativeTransferIntentInstructionAsync=c_;exports.getNativeTransferIntentInstructionDataCodec=o_;exports.getNativeTransferIntentInstructionDataDecoder=zc;exports.getNativeTransferIntentInstructionDataEncoder=_n;exports.getNewAuthorityArgsCodec=jD;exports.getNewAuthorityArgsDecoder=Qr;exports.getNewAuthorityArgsEncoder=$r;exports.getOriginIndex=eO;exports.getPackedAddressTreeInfoCodec=YD;exports.getPackedAddressTreeInfoDecoder=ft;exports.getPackedAddressTreeInfoEncoder=lt;exports.getPackedStateTreeInfoCodec=$D;exports.getPackedStateTreeInfoDecoder=at;exports.getPackedStateTreeInfoEncoder=ct;exports.getPermissionsCodec=tM;exports.getPermissionsDecoder=ve;exports.getPermissionsEncoder=_e;exports.getProofArgsCodec=oM;exports.getProofArgsDecoder=R;exports.getProofArgsEncoder=M;exports.getRemoveMemberArgsCodec=dM;exports.getRemoveMemberArgsDecoder=Kr;exports.getRemoveMemberArgsEncoder=zr;exports.getSecp256r1MessageHash=Vn;exports.getSecp256r1PubkeyCodec=gM;exports.getSecp256r1PubkeyDecoder=St;exports.getSecp256r1PubkeyEncoder=en;exports.getSecp256r1SignatureOffsetsDataDecoder=pC;exports.getSecp256r1SignatureOffsetsDataEncoder=yC;exports.getSecp256r1VerifyArgsCodec=TM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=k;exports.getSecp256r1VerifyArgsWithDomainConfigIndexCodec=SM;exports.getSecp256r1VerifyArgsWithDomainConfigIndexDecoder=rn;exports.getSecp256r1VerifyArgsWithDomainConfigIndexEncoder=tn;exports.getSecp256r1VerifyInstruction=B;exports.getSecp256r1VerifyInstructionDataCodec=wN;exports.getSecp256r1VerifyInstructionDataDecoder=Fd;exports.getSecp256r1VerifyInstructionDataEncoder=zd;exports.getSendAndConfirmTransaction=$i;exports.getSettingsCodec=ph;exports.getSettingsDecoder=nr;exports.getSettingsDiscriminatorBytes=yh;exports.getSettingsEncoder=np;exports.getSettingsFromIndex=me;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=MM;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=cn;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=on;exports.getSettingsIndexWithAddressCodec=EM;exports.getSettingsIndexWithAddressDecoder=sn;exports.getSettingsIndexWithAddressEncoder=nn;exports.getSettingsMutArgsCodec=bM;exports.getSettingsMutArgsDecoder=V;exports.getSettingsMutArgsEncoder=H;exports.getSettingsReadonlyArgsCodec=LM;exports.getSettingsReadonlyArgsDecoder=It;exports.getSettingsReadonlyArgsEncoder=xt;exports.getSignedSecp256r1Key=JW;exports.getSignedTransactionManager=FB;exports.getSolanaRpc=j;exports.getSolanaRpcEndpoint=Zi;exports.getTokenTransferIntentCompressedDiscriminatorBytes=L_;exports.getTokenTransferIntentCompressedInstruction=O_;exports.getTokenTransferIntentCompressedInstructionAsync=aa;exports.getTokenTransferIntentCompressedInstructionDataCodec=W_;exports.getTokenTransferIntentCompressedInstructionDataDecoder=ca;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Ln;exports.getTokenTransferIntentDiscriminatorBytes=C_;exports.getTokenTransferIntentInstruction=M_;exports.getTokenTransferIntentInstructionAsync=ta;exports.getTokenTransferIntentInstructionDataCodec=D_;exports.getTokenTransferIntentInstructionDataDecoder=ea;exports.getTokenTransferIntentInstructionDataEncoder=Un;exports.getTransactionBufferAddress=Ld;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=$_;exports.getTransactionBufferCloseCompressedInstruction=Sa;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Q_;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=fa;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=la;exports.getTransactionBufferCloseDiscriminatorBytes=F_;exports.getTransactionBufferCloseInstruction=ya;exports.getTransactionBufferCloseInstructionDataCodec=z_;exports.getTransactionBufferCloseInstructionDataDecoder=ga;exports.getTransactionBufferCloseInstructionDataEncoder=Aa;exports.getTransactionBufferCodec=Ih;exports.getTransactionBufferCreateArgsCodec=NM;exports.getTransactionBufferCreateArgsDecoder=Ct;exports.getTransactionBufferCreateArgsEncoder=Et;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=mv;exports.getTransactionBufferCreateCompressedInstruction=va;exports.getTransactionBufferCreateCompressedInstructionDataCodec=lv;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=_a;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=ba;exports.getTransactionBufferCreateDiscriminatorBytes=av;exports.getTransactionBufferCreateInstruction=Ma;exports.getTransactionBufferCreateInstructionDataCodec=iv;exports.getTransactionBufferCreateInstructionDataDecoder=Da;exports.getTransactionBufferCreateInstructionDataEncoder=Ca;exports.getTransactionBufferDecoder=ao;exports.getTransactionBufferDiscriminatorBytes=xh;exports.getTransactionBufferEncoder=Ep;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=Wv;exports.getTransactionBufferExecuteCompressedInstruction=Fa;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=Ov;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ga;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Va;exports.getTransactionBufferExecuteDiscriminatorBytes=Mv;exports.getTransactionBufferExecuteInstruction=Na;exports.getTransactionBufferExecuteInstructionDataCodec=Rv;exports.getTransactionBufferExecuteInstructionDataDecoder=Ba;exports.getTransactionBufferExecuteInstructionDataEncoder=Oa;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=Xv;exports.getTransactionBufferExtendCompressedInstruction=ti;exports.getTransactionBufferExtendCompressedInstructionDataCodec=Zv;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=ei;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Qa;exports.getTransactionBufferExtendDiscriminatorBytes=Gv;exports.getTransactionBufferExtendInstruction=Ya;exports.getTransactionBufferExtendInstructionDataCodec=Fv;exports.getTransactionBufferExtendInstructionDataDecoder=Ja;exports.getTransactionBufferExtendInstructionDataEncoder=qa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=pU;exports.getTransactionBufferVoteCompressedInstruction=yi;exports.getTransactionBufferVoteCompressedInstructionDataCodec=TU;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=gi;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Ai;exports.getTransactionBufferVoteDiscriminatorBytes=oU;exports.getTransactionBufferVoteInstruction=ai;exports.getTransactionBufferVoteInstructionDataCodec=cU;exports.getTransactionBufferVoteInstructionDataDecoder=ci;exports.getTransactionBufferVoteInstructionDataEncoder=oi;exports.getTransactionExecuteCompressedDiscriminatorBytes=_U;exports.getTransactionExecuteCompressedInstruction=Mi;exports.getTransactionExecuteCompressedInstructionDataCodec=vU;exports.getTransactionExecuteCompressedInstructionDataDecoder=Di;exports.getTransactionExecuteCompressedInstructionDataEncoder=Ci;exports.getTransactionExecuteDiscriminatorBytes=EU;exports.getTransactionExecuteInstruction=Si;exports.getTransactionExecuteInstructionDataCodec=CU;exports.getTransactionExecuteInstructionDataDecoder=fi;exports.getTransactionExecuteInstructionDataEncoder=li;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=JU;exports.getTransactionExecuteSyncCompressedInstruction=Ni;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=YU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Bi;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Oi;exports.getTransactionExecuteSyncDiscriminatorBytes=wU;exports.getTransactionExecuteSyncInstruction=vi;exports.getTransactionExecuteSyncInstructionDataCodec=HU;exports.getTransactionExecuteSyncInstructionDataDecoder=_i;exports.getTransactionExecuteSyncInstructionDataEncoder=bi;exports.getTransactionMessageAddressTableLookupCodec=zM;exports.getTransactionMessageAddressTableLookupDecoder=dn;exports.getTransactionMessageAddressTableLookupEncoder=an;exports.getTransactionMessageCodec=VM;exports.getTransactionMessageDecoder=Mt;exports.getTransactionMessageEncoder=Dt;exports.getTransactionSyncSignersCodec=JM;exports.getTransactionSyncSignersDecoder=K;exports.getTransactionSyncSignersEncoder=z;exports.getTransportsCodec=QM;exports.getTransportsDecoder=ht;exports.getTransportsEncoder=Rt;exports.getUserAccountAddress=O;exports.getUserCodec=nR;exports.getUserCreationArgsCodec=aR;exports.getUserCreationArgsDecoder=Se;exports.getUserCreationArgsEncoder=fe;exports.getUserDecoder=q;exports.getUserEncoder=Pt;exports.getUserMutArgsCodec=AR;exports.getUserMutArgsDecoder=we;exports.getUserMutArgsEncoder=ke;exports.getUserReadOnlyArgsCodec=TR;exports.getUserReadOnlyArgsDecoder=mt;exports.getUserReadOnlyArgsEncoder=Tt;exports.getUserReadOnlyOrMutateArgsCodec=SR;exports.getUserReadOnlyOrMutateArgsDecoder=Le;exports.getUserReadOnlyOrMutateArgsEncoder=Ue;exports.getUserRoleCodec=DR;exports.getUserRoleDecoder=Ne;exports.getUserRoleEncoder=Be;exports.getWalletAddressFromIndex=dB;exports.getWalletAddressFromSettings=Ee;exports.getWhitelistedAddressTreeCodec=Rh;exports.getWhitelistedAddressTreeDecoder=po;exports.getWhitelistedAddressTreeDiscriminatorBytes=Mh;exports.getWhitelistedAddressTreeEncoder=Gp;exports.getWhitelistedAddressTreeFromIndex=qn;exports.getWhitelistedAddressTreeIndexFromAddress=$O;exports.getWhitelistedAddressTreesAddress=hd;exports.identifyMultiWalletAccount=UL;exports.identifyMultiWalletInstruction=LL;exports.initialize=vW;exports.isConfigAction=SD;exports.isMultiWalletError=HL;exports.isTransactionSyncSigners=XM;exports.isUserReadOnlyOrMutateArgs=IR;exports.nativeTransferIntent=Tk;exports.parseAddWhitelistedAddressTreesInstruction=qh;exports.parseChangeConfigCompressedInstruction=AP;exports.parseChangeConfigInstruction=rP;exports.parseCreateCompressedWalletInstruction=IP;exports.parseCreateDomainConfigInstruction=vP;exports.parseCreateDomainUserAccountInstruction=VP;exports.parseCreateGlobalCounterInstruction=XP;exports.parseCreateUserAccountsInstruction=cb;exports.parseDecompressSettingsAccountInstruction=Tb;exports.parseDisableDomainConfigInstruction=Cb;exports.parseEditDomainConfigInstruction=Lb;exports.parseEditTransactionManagerUrlInstruction=Gb;exports.parseEditUserDelegateInstruction=Zb;exports.parseNativeTransferIntentCompressedInstruction=m_;exports.parseNativeTransferIntentInstruction=a_;exports.parseSecp256r1VerifyInstruction=HN;exports.parseTokenTransferIntentCompressedInstruction=B_;exports.parseTokenTransferIntentInstruction=R_;exports.parseTransactionBufferCloseCompressedInstruction=ev;exports.parseTransactionBufferCloseInstruction=K_;exports.parseTransactionBufferCreateCompressedInstruction=fv;exports.parseTransactionBufferCreateInstruction=dv;exports.parseTransactionBufferExecuteCompressedInstruction=Bv;exports.parseTransactionBufferExecuteInstruction=hv;exports.parseTransactionBufferExtendCompressedInstruction=$v;exports.parseTransactionBufferExtendInstruction=zv;exports.parseTransactionBufferVoteCompressedInstruction=mU;exports.parseTransactionBufferVoteInstruction=aU;exports.parseTransactionExecuteCompressedInstruction=UU;exports.parseTransactionExecuteInstruction=DU;exports.parseTransactionExecuteSyncCompressedInstruction=XU;exports.parseTransactionExecuteSyncInstruction=VU;exports.pollJitoBundleConfirmation=xB;exports.prepareChangeConfigArgs=k2;exports.prepareTransactionBundle=j2;exports.prepareTransactionMessage=o8;exports.prepareTransactionSync=u8;exports.retrieveTransactionManager=GB;exports.sendJitoBundle=NE;exports.serializeConfigActions=zB;exports.signAndSendBundledTransactions=SB;exports.signAndSendTransaction=hB;exports.tokenTransferIntent=hk;exports.transactionSyncSigners=YM;exports.userReadOnlyOrMutateArgs=xR;exports.vaultTransactionMessageDeserialize=qi;exports.vaultTransactionMessageSerialize=ji;exports.voteTransactionBuffer=Zd;//# 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'),g=require('zod'),programs=require('gill/programs'),nist_js=require('@noble/curves/nist.js'),tinyCbor=require('@levischuck/tiny-cbor'),jsonCanonicalize=require('json-canonicalize'),compressedToken=require('@lightprotocol/compressed-token'),fh=require('bn.js'),utils_js=require('@noble/curves/utils.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var g__default=/*#__PURE__*/_interopDefault(g);var fh__default=/*#__PURE__*/_interopDefault(fh);var ss=new Uint8Array([201,232,212,229,59,241,106,197]);function Jh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ss)}function ZA(){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:ss}))}function cs(){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 Yh(){return gill.combineCodec(ZA(),cs())}function as(e){return gill.decodeAccount(e,cs())}async function is(e,n,r){let o=await XA(e,n,r);return gill.assertAccountExists(o),o}async function XA(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return as(o)}async function Zh(e,n,r){let o=await QA(e,n,r);return gill.assertAccountsExist(o),o}async function QA(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>as(t))}function Xh(){return 846}var As=new Uint8Array([42,206,176,58,175,129,130,233]);function eM(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(As)}function gg(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:As}))}function gs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function tM(){return gill.combineCodec(gg(),gs())}function ps(e){return gill.decodeAccount(e,gs())}async function rM(e,n,r){let o=await pg(e,n,r);return gill.assertAccountExists(o),o}async function pg(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return ps(o)}async function nM(e,n,r){let o=await mg(e,n,r);return gill.assertAccountsExist(o),o}async function mg(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>ps(t))}function oM(){return 24}var jr=(r=>(r[r.Initialized=0]="Initialized",r[r.Frozen=1]="Frozen",r))(jr||{});function qr(){return gill.getEnumEncoder(jr)}function Jr(){return gill.getEnumDecoder(jr)}function aM(){return gill.combineCodec(qr(),Jr())}function Yr(){return gill.getStructEncoder([["key",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["value",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Zr(){return gill.getStructDecoder([["key",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["value",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function uM(){return gill.combineCodec(Yr(),Zr())}function Xr(){return gill.getStructEncoder([["memberKey",V()],["permissions",Be()],["userArgs",we()]])}function Qr(){return gill.getStructDecoder([["memberKey",$()],["permissions",Ne()],["userArgs",He()]])}function mM(){return gill.combineCodec(Xr(),Qr())}function $r(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function en(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function yM(){return gill.combineCodec($r(),en())}function mt(){return gill.getStructEncoder([["treeInfo",Tt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function lt(){return gill.getStructDecoder([["treeInfo",yt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function IM(){return gill.combineCodec(mt(),lt())}function ft(){return gill.getStructEncoder([["treeInfo",Tt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function St(){return gill.getStructDecoder([["treeInfo",yt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function PM(){return gill.combineCodec(ft(),St())}function tn(){return gill.getStructEncoder([["delegatedAmount",gill.getU64Encoder()],["withheldTransferFee",gill.getU64Encoder()],["isAta",gill.getU8Encoder()]])}function rn(){return gill.getStructDecoder([["delegatedAmount",gill.getU64Decoder()],["withheldTransferFee",gill.getU64Decoder()],["isAta",gill.getU8Decoder()]])}function RM(){return gill.combineCodec(tn(),rn())}function an(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function dn(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function vM(){return gill.combineCodec(an(),dn())}function xt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(un())]])}function j(){return gill.getStructDecoder([["data",gill.getOptionDecoder(An())]])}function LM(){return gill.combineCodec(xt(),j())}function un(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(It())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]])}function An(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Ct())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function wM(){return gill.combineCodec(un(),An())}function Et(){return gill.getStructEncoder([["version",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()],["amount",gill.getU64Encoder()],["merkleContext",pn()],["tlv",gill.getOptionEncoder(gill.getArrayEncoder(gn()))],["state",qr()]])}function Dt(){return gill.getStructDecoder([["version",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()],["amount",gill.getU64Decoder()],["merkleContext",mn()],["tlv",gill.getOptionDecoder(gill.getArrayDecoder(Pt()))],["state",Jr()]])}function GM(){return gill.combineCodec(Et(),Dt())}function yn(){return gill.getStructEncoder([["decimalsOption",gill.getU8Encoder()],["decimals",gill.getU8Encoder()],["compressionOnly",gill.getBooleanEncoder()],["isAta",gill.getU8Encoder()],["info",Sn()]])}function fn(){return gill.getStructDecoder([["decimalsOption",gill.getU8Decoder()],["decimals",gill.getU8Decoder()],["compressionOnly",gill.getBooleanDecoder()],["isAta",gill.getU8Decoder()],["info",xn()]])}function qM(){return gill.combineCodec(yn(),fn())}function Sn(){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",En()]])}function xn(){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",Dn()]])}function XM(){return gill.combineCodec(Sn(),xn())}function Ve(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Mn())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Xr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(bn())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function Fe(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Rn())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Qr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(_n())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function tR(){return gill.combineCodec(Ve(),Fe())}function rR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function nR(e,n){return n.__kind===e}function vn(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ge()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Pe()]])}function Un(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",ze()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",he()]])}function aR(){return gill.combineCodec(vn(),Un())}function Mn(){return gill.getStructEncoder([["memberKey",V()],["permissions",Be()]])}function Rn(){return gill.getStructDecoder([["memberKey",$()],["permissions",Ne()]])}function AR(){return gill.combineCodec(Mn(),Rn())}function ht(){return gill.getStructEncoder([["memberKey",V()],["messageHash",gill.getOptionEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))]])}function Mt(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.getOptionDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))]])}function lR(){return gill.combineCodec(ht(),Mt())}function gn(){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([Bn()])]])],["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([Ln()])]])],["TransferFeeAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([wn()])]])],["TransferHookAccount",gill.getStructEncoder([["fields",gill.getTupleEncoder([Vn()])]])],["CompressedOnly",gill.getStructEncoder([["fields",gill.getTupleEncoder([tn()])]])],["Compressible",gill.getStructEncoder([["fields",gill.getTupleEncoder([yn()])]])]])}function Pt(){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([Nn()])]])],["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([Wn()])]])],["PermanentDelegateAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([On()])]])],["TransferFeeAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Hn()])]])],["TransferHookAccount",gill.getStructDecoder([["fields",gill.getTupleDecoder([Fn()])]])],["CompressedOnly",gill.getStructDecoder([["fields",gill.getTupleDecoder([rn()])]])],["Compressible",gill.getStructDecoder([["fields",gill.getTupleDecoder([fn()])]])]])}function SR(){return gill.combineCodec(gn(),Pt())}function xR(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function IR(e,n){return n.__kind===e}function Gn(){return gill.getStructEncoder([["settingsMutArgs",z()],["transactionManager",gill.getOptionEncoder(Rt())]])}function zn(){return gill.getStructDecoder([["settingsMutArgs",K()],["transactionManager",gill.getOptionDecoder(bt())]])}function PR(){return gill.combineCodec(Gn(),zn())}function It(){return gill.getStructEncoder([["pubkey",V()],["role",gill.getU8Encoder()],["permissions",Be()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function Ct(){return gill.getStructDecoder([["pubkey",$()],["role",gill.getU8Decoder()],["permissions",Ne()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function bR(){return gill.combineCodec(It(),Ct())}function V(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function $(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function UR(){return gill.combineCodec(V(),$())}function qn(){return gill.getStructEncoder([["authorityCreationArgs",Pe()],["compressedProofArgs",C()]])}function Jn(){return gill.getStructDecoder([["authorityCreationArgs",he()],["compressedProofArgs",E()]])}function OR(){return gill.combineCodec(qn(),Jn())}function _t(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function vt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function wR(){return gill.combineCodec(_t(),vt())}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 FR(){return gill.combineCodec(pn(),mn())}function Tt(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function yt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function KR(){return gill.combineCodec(Tt(),yt())}function kn(){return gill.getStructEncoder([])}function Wn(){return gill.getStructDecoder([])}function JR(){return gill.combineCodec(kn(),Wn())}function Ln(){return gill.getStructEncoder([])}function On(){return gill.getStructDecoder([])}function XR(){return gill.combineCodec(Ln(),On())}function Be(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Ne(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function eb(){return gill.combineCodec(Be(),Ne())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(an())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(dn())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function ob(){return gill.combineCodec(C(),E())}function bn(){return gill.getStructEncoder([["memberKey",V()],["userArgs",we()]])}function _n(){return gill.getStructDecoder([["memberKey",$()],["userArgs",He()]])}function ib(){return gill.combineCodec(bn(),_n())}function En(){return gill.getStructEncoder([["baseRent",gill.getU16Encoder()],["compressionCost",gill.getU16Encoder()],["lamportsPerBytePerEpoch",gill.getU8Encoder()],["maxFundedEpochs",gill.getU8Encoder()],["maxTopUp",gill.getU16Encoder()]])}function Dn(){return gill.getStructDecoder([["baseRent",gill.getU16Decoder()],["compressionCost",gill.getU16Decoder()],["lamportsPerBytePerEpoch",gill.getU8Decoder()],["maxFundedEpochs",gill.getU8Decoder()],["maxTopUp",gill.getU16Decoder()]])}function Ab(){return gill.combineCodec(En(),Dn())}function Xn(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function Ut(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function mb(){return gill.combineCodec(Xn(),Ut())}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 yb(){return gill.combineCodec(F(),G())}function Qn(){return gill.getStructEncoder([["verifyArgs",F()],["domainConfigIndex",gill.getU8Encoder()]])}function $n(){return gill.getStructDecoder([["verifyArgs",G()],["domainConfigIndex",gill.getU8Decoder()]])}function Ib(){return gill.combineCodec(Qn(),$n())}function eo(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function to(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function Db(){return gill.combineCodec(eo(),to())}function ro(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getBooleanEncoder()]])}function no(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getBooleanDecoder()]])}function Mb(){return gill.combineCodec(ro(),no())}function z(){return gill.getStructEncoder([["accountMeta",mt()],["data",xt()]])}function K(){return gill.getStructDecoder([["accountMeta",lt()],["data",j()]])}function vb(){return gill.combineCodec(z(),K())}function kt(){return gill.getStructEncoder([["accountMeta",ft()],["data",xt()]])}function Wt(){return gill.getStructDecoder([["accountMeta",St()],["data",j()]])}function Lb(){return gill.combineCodec(kt(),Wt())}function Lt(){return gill.getStructEncoder([["index",gill.getU8Encoder()],["restricted",gill.getBooleanEncoder()]])}function Ot(){return gill.getStructDecoder([["index",gill.getU8Decoder()],["restricted",gill.getBooleanDecoder()]])}function Nb(){return gill.combineCodec(Lt(),Ot())}function Bn(){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(Yr())]])}function Nn(){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(Zr())]])}function Fb(){return gill.combineCodec(Bn(),Nn())}function Bt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSigners",gill.getArrayEncoder(ht())]])}function Nt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSigners",gill.getArrayDecoder(Mt())]])}function jb(){return gill.combineCodec(Bt(),Nt())}function wt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder($r())],["addressTableLookups",gill.getArrayEncoder(Ao())]])}function Ht(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(en())],["addressTableLookups",gill.getArrayDecoder(go())]])}function Zb(){return gill.combineCodec(wt(),Ht())}function Ao(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function go(){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(Ao(),go())}function q(){return gill.getDiscriminatedUnionEncoder([["Ed25519",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])],["Secp256r1",gill.getStructEncoder([["fields",gill.getTupleEncoder([Qn()])]])]])}function J(){return gill.getDiscriminatedUnionDecoder([["Ed25519",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])],["Secp256r1",gill.getStructDecoder([["fields",gill.getTupleDecoder([$n()])]])]])}function n_(){return gill.combineCodec(q(),J())}function o_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function s_(e,n){return n.__kind===e}function wn(){return gill.getStructEncoder([["withheldAmount",gill.getU64Encoder()]])}function Hn(){return gill.getStructDecoder([["withheldAmount",gill.getU64Decoder()]])}function i_(){return gill.combineCodec(wn(),Hn())}function Vn(){return gill.getStructEncoder([["transferring",gill.getU8Encoder()]])}function Fn(){return gill.getStructDecoder([["transferring",gill.getU8Decoder()]])}function A_(){return gill.combineCodec(Vn(),Fn())}var po=(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))(po||{});function Vt(){return gill.getEnumEncoder(po)}function Ft(){return gill.getEnumDecoder(po)}function m_(){return gill.combineCodec(Vt(),Ft())}function Gt(){return gill.getStructEncoder([["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["member",V()],["credentialId",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder()))],["transports",gill.getOptionEncoder(gill.getArrayEncoder(Vt()))],["wallets",gill.getArrayEncoder(ro())],["role",Ge()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function X(){return gill.getStructDecoder([["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["member",$()],["credentialId",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder()))],["transports",gill.getOptionDecoder(gill.getArrayDecoder(Ft()))],["wallets",gill.getArrayDecoder(no())],["role",ze()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function f_(){return gill.combineCodec(Gt(),X())}function Pe(){return gill.getStructEncoder([["addressTreeInfo",_t()],["outputStateTreeIndex",gill.getU8Encoder()]])}function he(){return gill.getStructDecoder([["addressTreeInfo",vt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function C_(){return gill.combineCodec(Pe(),he())}function Ye(){return gill.getStructEncoder([["accountMeta",mt()],["data",Gt()]])}function Ze(){return gill.getStructDecoder([["accountMeta",lt()],["data",X()]])}function h_(){return gill.combineCodec(Ye(),Ze())}function Rt(){return gill.getStructEncoder([["accountMeta",ft()],["data",Gt()]])}function bt(){return gill.getStructDecoder([["accountMeta",St()],["data",X()]])}function __(){return gill.combineCodec(Rt(),bt())}function we(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Rt()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([Ye()])]])]])}function He(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([bt()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([Ze()])]])]])}function W_(){return gill.combineCodec(we(),He())}function L_(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function O_(e,n){return n.__kind===e}var _e=(t=>(t[t.TransactionManager=0]="TransactionManager",t[t.Administrator=1]="Administrator",t[t.PermanentMember=2]="PermanentMember",t[t.Member=3]="Member",t))(_e||{});function Ge(){return gill.getEnumEncoder(_e)}function ze(){return gill.getEnumDecoder(_e)}function w_(){return gill.combineCodec(Ge(),ze())}var Dc=new Uint8Array([223,179,163,190,177,224,67,173]);function Gv(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Dc)}function s1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(It())],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["latestSlotNumber",gill.getU64Encoder()]]),e=>({...e,discriminator:Dc}))}function Sr(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(Ct())],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["latestSlotNumber",gill.getU64Decoder()]])}function zv(){return gill.combineCodec(s1(),Sr())}function Pc(e){return gill.decodeAccount(e,Sr())}async function Kv(e,n,r){let o=await mo(e,n,r);return gill.assertAccountExists(o),o}async function mo(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Pc(o)}async function jv(e,n,r){let o=await c1(e,n,r);return gill.assertAccountsExist(o),o}async function c1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Pc(t))}var _c=new Uint8Array([90,36,35,219,93,225,110,96]);function Zv(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(_c)}function D1(){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",V()],["executor",V()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(V())],["expectedSigners",gill.getArrayEncoder(ht())],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:_c}))}function vc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",$()],["executor",$()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder($())],["expectedSigners",gill.getArrayDecoder(Mt())],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Xv(){return gill.combineCodec(D1(),vc())}function Uc(e){return gill.decodeAccount(e,vc())}async function kc(e,n,r){let o=await P1(e,n,r);return gill.assertAccountExists(o),o}async function P1(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Uc(o)}async function Qv(e,n,r){let o=await h1(e,n,r);return gill.assertAccountsExist(o),o}async function h1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Uc(t))}var Oc=new Uint8Array([105,23,173,2,197,255,80,87]);function tU(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Oc)}function z1(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Oc}))}function Bc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function rU(){return gill.combineCodec(z1(),Bc())}function Nc(e){return gill.decodeAccount(e,Bc())}async function wc(e,n,r){let o=await K1(e,n,r);return gill.assertAccountExists(o),o}async function K1(e,n,r){let o=await gill.fetchEncodedAccount(e,n,r);return Nc(o)}async function nU(e,n,r){let o=await j1(e,n,r);return gill.assertAccountsExist(o),o}async function j1(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Nc(t))}function l({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 B(e){if(!e)throw new Error("Expected a Address.");return typeof e=="object"&&"address"in e?e.address:Array.isArray(e)?e[0]:e}function T(e,n){return r=>{if(!r.value)return Object.freeze({address:e,role:gill.AccountRole.READONLY});let o=r.isWritable?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY;return Object.freeze({address:B(r.value),role:Hc(r.value)?gill.upgradeRoleToSigner(o):o,...Hc(r.value)?{signer:r.value}:{}})}}function Hc(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Fc=new Uint8Array([8]);function xU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Fc)}function Co(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Fc}))}function Gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function IU(){return gill.combineCodec(Co(),Gc())}async function zc(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...a],data:Co().encode(c),programAddress:r})}function CU(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.whitelistedAddressTrees),s(t.payer),s(t.systemProgram),...a],data:Co().encode(c),programAddress:r})}function EU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{whitelistedAddressTrees:r(),payer:r(),systemProgram:r()},data:Gc().decode(e.data)}}var Yc=new Uint8Array([9]);function _U(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yc)}function Zc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ve())],["signers",gill.getArrayEncoder(q())],["compressedProofArgs",gill.getOptionEncoder(C())]]),e=>({...e,discriminator:Yc}))}function Xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Fe())],["signers",gill.getArrayDecoder(J())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function vU(){return gill.combineCodec(Zc(),Xc())}function Qc(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Zc().encode(c),programAddress:r})}function UU(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:Xc().decode(e.data)}}var na=new Uint8Array([19]);function wU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(na)}function oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(Ve())],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:na}))}function sa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(Fe())],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function HU(){return gill.combineCodec(oa(),sa())}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},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:oa().encode(c),programAddress:r})}function VU(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:sa().decode(e.data)}}var da=new Uint8Array([18]);function JU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(da)}function Eo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["addressTreeInfo",_t()],["outputStateTreeIndex",gill.getU8Encoder()],["userArgs",we()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:da}))}function ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["addressTreeInfo",vt()],["outputStateTreeIndex",gill.getU8Decoder()],["userArgs",He()],["settingsIndex",gill.getU128Decoder()]])}function YU(){return gill.combineCodec(Eo(),ua())}async function Aa(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...a],data:Eo().encode(c),programAddress:r})}function ZU(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.initialMember),s(t.systemProgram),s(t.globalCounter),s(t.whitelistedAddressTrees),...a],data:Eo().encode(c),programAddress:r})}function XU(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:r(),systemProgram:r(),globalCounter:r(),whitelistedAddressTrees:r()},data:ua().decode(e.data)}}var Sa=new Uint8Array([0]);function ok(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sa)}function Po(){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",Pe()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Sa}))}function xa(){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",he()],["compressedProofArgs",E()]])}function sk(){return gill.combineCodec(Po(),xa())}async function Ia(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:Po().encode(c),programAddress:r})}function ck(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.payer),s(t.authority),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:Po().encode(c),programAddress:r})}function ak(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:xa().decode(e.data)}}var Da=new Uint8Array([4]);function mk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Da)}function ho(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",Xn()],["role",Ge()],["credentialId",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["transports",gill.getArrayEncoder(Vt())],["userAccountCreationArgs",Pe()],["linkWalletArgs",gill.getOptionEncoder(Gn())]]),e=>({...e,discriminator:Da}))}function Pa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",Ut()],["role",ze()],["credentialId",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["transports",gill.getArrayDecoder(Ft())],["userAccountCreationArgs",he()],["linkWalletArgs",gill.getOptionDecoder(zn())]])}function lk(){return gill.combineCodec(ho(),Pa())}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},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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...a],data:ho().encode(c),programAddress:r})}function Tk(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=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.authority),s(t.whitelistedAddressTrees),...a],data:ho().encode(c),programAddress:r})}function yk(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:Pa().decode(e.data)}}var Ra=new Uint8Array([3]);function Ek(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ra)}function Ro(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ra}))}function ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function Dk(){return gill.combineCodec(Ro(),ba())}async function _a(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=l(c),a=T(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Ro().encode({}),programAddress:r})}function Pk(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=l(c),a=T(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:Ro().encode({}),programAddress:r})}function hk(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:ba().decode(e.data)}}var Ua=new Uint8Array([5]);function kk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ua)}function _o(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(vn())]]),e=>({...e,discriminator:Ua}))}function ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(Un())]])}function Wk(){return gill.combineCodec(_o(),ka())}async function Wa(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:_o().encode(c),programAddress:r})}function Lk(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.systemProgram),s(t.whitelistedAddressTrees),...a],data:_o().encode(c),programAddress:r})}function Ok(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:ka().decode(e.data)}}var Ba=new Uint8Array([17]);function Gk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ba)}function Na(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMutArgs",z()],["compressedProofArgs",C()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:Ba}))}function wa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMutArgs",K()],["compressedProofArgs",E()],["signers",gill.getArrayDecoder(J())]])}function zk(){return gill.combineCodec(Na(),wa())}function Ha(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Na().encode(c),programAddress:r})}function Kk(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:wa().decode(e.data)}}var Ga=new Uint8Array([2]);function Xk(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ga)}function za(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:Ga}))}function Ka(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function Qk(){return gill.combineCodec(za(),Ka())}function ja(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=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.admin),...a],data:za().encode(c),programAddress:r})}function $k(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{domainConfig:r(),admin:r()},data:Ka().decode(e.data)}}var Za=new Uint8Array([1]);function cW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Za)}function Uo(){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(qn())]]),e=>({...e,discriminator:Za}))}function Xa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Jn())]])}function aW(){return gill.combineCodec(Uo(),Xa())}async function iW(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...a],data:Uo().encode(c),programAddress:r})}function Qa(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.domainConfig),s(t.authority),s(t.newAuthority),s(t.whitelistedAddressTrees),s(t.systemProgram),...a],data:Uo().encode(c),programAddress:r})}function dW(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:o(),whitelistedAddressTrees:o(),systemProgram:r()},data:Xa().decode(e.data)}}var ti=new Uint8Array([6]);function TW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ti)}function ri(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Ye()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",C()]]),e=>({...e,discriminator:ti}))}function ni(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Ze()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function yW(){return gill.combineCodec(ri(),ni())}function oi(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.authority),...a],data:ri().encode(c),programAddress:r})}function fW(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{authority:r()},data:ni().decode(e.data)}}var ai=new Uint8Array([7]);function PW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ai)}function ii(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",Ye()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["delegateTo",gill.getOptionEncoder(eo())],["oldSettingsMutArgs",gill.getOptionEncoder(z())],["newSettingsMutArgs",gill.getOptionEncoder(z())],["compressedProofArgs",C()]]),e=>({...e,discriminator:ai}))}function di(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",Ze()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["delegateTo",gill.getOptionDecoder(to())],["oldSettingsMutArgs",gill.getOptionDecoder(K())],["newSettingsMutArgs",gill.getOptionDecoder(K())],["compressedProofArgs",E()]])}function hW(){return gill.combineCodec(ii(),di())}function ui(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.feePayer),s(t.signer),s(t.oldSettings),s(t.newSettings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.domainConfig),...a],data:ii().encode(c),programAddress:r})}function MW(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:o(),oldSettings:o(),newSettings:o(),slotHashSysvar:o(),instructionsSysvar:o(),domainConfig:o()},data:di().decode(e.data)}}var gi=new Uint8Array([29]);function WW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gi)}function ko(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:gi}))}function pi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(J())]])}function LW(){return gill.combineCodec(ko(),pi())}async function OW(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(B(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:ko().encode(c),programAddress:r})}function mi(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:ko().encode(c),programAddress:r})}function BW(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:pi().decode(e.data)}}var yi=new Uint8Array([27]);function zW(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(yi)}function fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:yi}))}function Si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function KW(){return gill.combineCodec(fi(),Si())}function xi(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.destination),s(t.systemProgram),...a],data:fi().encode(c),programAddress:r})}function jW(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Si().decode(e.data)}}var hi=new Uint8Array([30]);function $W(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(hi)}function Wo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Lt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getArrayEncoder(Et())],["compressedProofArgs",gill.getOptionEncoder(C())],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:hi}))}function Mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Ot())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getArrayDecoder(Dt())],["compressedProofArgs",gill.getOptionDecoder(E())],["signers",gill.getArrayDecoder(J())]])}function eL(){return gill.combineCodec(Wo(),Mi())}async function tL(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:true},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(B(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(B(t.source.value)),gill.getAddressEncoder().encode(B(t.tokenProgram.value)),gill.getAddressEncoder().encode(B(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(B(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(B(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(B(t.destination.value)),gill.getAddressEncoder().encode(B(t.tokenProgram.value)),gill.getAddressEncoder().encode(B(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(B(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(B(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Wo().encode(c),programAddress:r})}function Ri(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:true},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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Wo().encode(c),programAddress:r})}function rL(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:Mi().decode(e.data)}}var Ui=new Uint8Array([28]);function dL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ui)}function Lo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["splInterfacePdaArgs",gill.getOptionEncoder(Lt())],["amount",gill.getU64Encoder()],["sourceCompressedTokenAccounts",gill.getArrayEncoder(Et())],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Ui}))}function ki(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["splInterfacePdaArgs",gill.getOptionDecoder(Ot())],["amount",gill.getU64Decoder()],["sourceCompressedTokenAccounts",gill.getArrayDecoder(Dt())],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function uL(){return gill.combineCodec(Lo(),ki())}async function AL(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:true},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(B(t.source.value)),gill.getAddressEncoder().encode(B(t.tokenProgram.value)),gill.getAddressEncoder().encode(B(t.mint.value))]})),t.sourceCtokenTokenAccount.value||(t.sourceCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(B(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(B(t.mint.value))]})),t.destinationSplTokenAccount.value||(t.destinationSplTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(B(t.destination.value)),gill.getAddressEncoder().encode(B(t.tokenProgram.value)),gill.getAddressEncoder().encode(B(t.mint.value))]})),t.destinationCtokenTokenAccount.value||(t.destinationCtokenTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",seeds:[gill.getAddressEncoder().encode(B(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(B(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Lo().encode(c),programAddress:r})}function Wi(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:true},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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),s(t.source),s(t.sourceSplTokenAccount),s(t.sourceCtokenTokenAccount),s(t.destination),s(t.destinationSplTokenAccount),s(t.destinationCtokenTokenAccount),s(t.tokenProgram),s(t.mint),s(t.systemProgram),s(t.compressedTokenProgramAuthority),s(t.splInterfacePda),s(t.compressibleConfig),s(t.rentSponsor),s(t.compressedTokenProgram),...a],data:Lo().encode(c),programAddress:r})}function gL(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r(),source:r(),sourceSplTokenAccount:r(),sourceCtokenTokenAccount:r(),destination:r(),destinationSplTokenAccount:o(),destinationCtokenTokenAccount:o(),tokenProgram:r(),mint:r(),systemProgram:r(),compressedTokenProgramAuthority:r(),splInterfacePda:o(),compressibleConfig:r(),rentSponsor:o(),compressedTokenProgram:r()},data:ki().decode(e.data)}}var Bi=new Uint8Array([13]);function SL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bi)}function Ni(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Bi}))}function wi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function xL(){return gill.combineCodec(Ni(),wi())}function Hi(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Ni().encode(c),programAddress:r})}function IL(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:wi().decode(e.data)}}var Gi=new Uint8Array([23]);function RL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gi)}function zi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Gi}))}function Ki(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function bL(){return gill.combineCodec(zi(),Ki())}function ji(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.rentCollector),s(t.domainConfig),s(t.transactionBuffer),s(t.closer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:zi().encode(c),programAddress:r})}function _L(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:o(),transactionBuffer:r(),closer:o(),slotHashSysvar:o(),instructionsSysvar:o()},data:Ki().decode(e.data)}}var Yi=new Uint8Array([10]);function BL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yi)}function Zi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Bt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:Yi}))}function Xi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Nt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function NL(){return gill.combineCodec(Zi(),Xi())}function Qi(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...a],data:Zi().encode(c),programAddress:r})}function wL(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:Xi().decode(e.data)}}var td=new Uint8Array([20]);function jL(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(td)}function rd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Bt()],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",kt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:td}))}function nd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Nt()],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",Wt()],["compressedProofArgs",E()]])}function qL(){return gill.combineCodec(rd(),nd())}function od(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.creator),s(t.systemProgram),s(t.instructionsSysvar),s(t.slotHashSysvar),...a],data:rd().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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),creator:o(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:o()},data:nd().decode(e.data)}}var ad=new Uint8Array([14]);function tO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ad)}function id(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:ad}))}function dd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function rO(){return gill.combineCodec(id(),dd())}function ud(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:id().encode(c),programAddress:r})}function nO(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:dd().decode(e.data)}}var pd=new Uint8Array([24]);function uO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pd)}function md(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:pd}))}function ld(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function AO(){return gill.combineCodec(md(),ld())}function Td(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.executor),s(t.transactionBuffer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:md().encode(c),programAddress:r})}function gO(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),executor:o(),transactionBuffer:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:ld().decode(e.data)}}var Sd=new Uint8Array([12]);function fO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Sd)}function xd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Sd}))}function Id(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function SO(){return gill.combineCodec(xd(),Id())}function Cd(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=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.transactionBuffer),...a],data:xd().encode(c),programAddress:r})}function xO(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),transactionBuffer:r()},data:Id().decode(e.data)}}var Pd=new Uint8Array([22]);function hO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Pd)}function hd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Pd}))}function Md(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function MO(){return gill.combineCodec(hd(),Md())}function Rd(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.transactionBuffer),...a],data:hd().encode(c),programAddress:r})}function RO(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{transactionBuffer:r()},data:Md().decode(e.data)}}var vd=new Uint8Array([11]);function LO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(vd)}function Ud(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())]]),e=>({...e,discriminator:vd}))}function kd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())]])}function OO(){return gill.combineCodec(Ud(),kd())}function Wd(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Ud().encode(c),programAddress:r})}function BO(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:kd().decode(e.data)}}var Bd=new Uint8Array([21]);function zO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bd)}function Nd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(F())],["settingsReadonlyArgs",kt()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Bd}))}function wd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(G())],["settingsReadonlyArgs",Wt()],["compressedProofArgs",E()]])}function KO(){return gill.combineCodec(Nd(),wd())}function Hd(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.domainConfig),s(t.transactionBuffer),s(t.voter),s(t.systemProgram),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:Nd().encode(c),programAddress:r})}function jO(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:o(),transactionBuffer:r(),voter:o(),systemProgram:r(),slotHashSysvar:o(),instructionsSysvar:o()},data:wd().decode(e.data)}}var Gd=new Uint8Array([15]);function QO(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Gd)}function zd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Gd}))}function Kd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function $O(){return gill.combineCodec(zd(),Kd())}function jd(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=l({}),a=T(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:zd().encode({}),programAddress:r})}function eB(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:Kd().decode(e.data)}}var Yd=new Uint8Array([25]);function cB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Yd)}function Zd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Yd}))}function Xd(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function aB(){return gill.combineCodec(Zd(),Xd())}function Qd(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=l({args:c}),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.transactionBuffer),...a],data:Zd().encode(c),programAddress:r})}function iB(e){if(e.accounts.length<2)throw new Error("Not enough accounts");let n=0,r=()=>{let o=e.accounts[n];return n+=1,o};return {programAddress:e.programAddress,accounts:{payer:r(),transactionBuffer:r()},data:Xd().decode(e.data)}}var tu=new Uint8Array([16]);function lB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tu)}function ru(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",wt()],["signers",gill.getArrayEncoder(q())]]),e=>({...e,discriminator:tu}))}function nu(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Ht()],["signers",gill.getArrayDecoder(J())]])}function TB(){return gill.combineCodec(ru(),nu())}function ou(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.settings),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:ru().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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:nu().decode(e.data)}}var au=new Uint8Array([26]);function DB(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(au)}function iu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",wt()],["signers",gill.getArrayEncoder(q())],["settingsMutArgs",z()],["compressedProofArgs",C()]]),e=>({...e,discriminator:au}))}function du(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Ht()],["signers",gill.getArrayDecoder(J())],["settingsMutArgs",K()],["compressedProofArgs",E()]])}function PB(){return gill.combineCodec(iu(),du())}function uu(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=l(i),s=T(r);return Object.freeze({accounts:[s(t.payer),s(t.slotHashSysvar),s(t.instructionsSysvar),...a],data:iu().encode(c),programAddress:r})}function hB(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},o=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:o(),instructionsSysvar:r()},data:du().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",tE=(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))(tE||{});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 rE=(y=>(y[y.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",y[y.ChangeConfig=1]="ChangeConfig",y[y.ChangeConfigCompressed=2]="ChangeConfigCompressed",y[y.CreateCompressedWallet=3]="CreateCompressedWallet",y[y.CreateDomainConfig=4]="CreateDomainConfig",y[y.CreateDomainUserAccount=5]="CreateDomainUserAccount",y[y.CreateGlobalCounter=6]="CreateGlobalCounter",y[y.CreateUserAccounts=7]="CreateUserAccounts",y[y.DecompressSettingsAccount=8]="DecompressSettingsAccount",y[y.DisableDomainConfig=9]="DisableDomainConfig",y[y.EditDomainConfig=10]="EditDomainConfig",y[y.EditTransactionManagerUrl=11]="EditTransactionManagerUrl",y[y.EditUserDelegate=12]="EditUserDelegate",y[y.NativeTransferIntent=13]="NativeTransferIntent",y[y.NativeTransferIntentCompressed=14]="NativeTransferIntentCompressed",y[y.TokenTransferIntent=15]="TokenTransferIntent",y[y.TokenTransferIntentCompressed=16]="TokenTransferIntentCompressed",y[y.TransactionBufferClose=17]="TransactionBufferClose",y[y.TransactionBufferCloseCompressed=18]="TransactionBufferCloseCompressed",y[y.TransactionBufferCreate=19]="TransactionBufferCreate",y[y.TransactionBufferCreateCompressed=20]="TransactionBufferCreateCompressed",y[y.TransactionBufferExecute=21]="TransactionBufferExecute",y[y.TransactionBufferExecuteCompressed=22]="TransactionBufferExecuteCompressed",y[y.TransactionBufferExtend=23]="TransactionBufferExtend",y[y.TransactionBufferExtendCompressed=24]="TransactionBufferExtendCompressed",y[y.TransactionBufferVote=25]="TransactionBufferVote",y[y.TransactionBufferVoteCompressed=26]="TransactionBufferVoteCompressed",y[y.TransactionExecute=27]="TransactionExecute",y[y.TransactionExecuteCompressed=28]="TransactionExecuteCompressed",y[y.TransactionExecuteSync=29]="TransactionExecuteSync",y[y.TransactionExecuteSyncCompressed=30]="TransactionExecuteSyncCompressed",y))(rE||{});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([29])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 30;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var oE=6e3,sE=6001,cE=6002,aE=6003,iE=6004,dE=6005,uE=6006,AE=6007,gE=6008,pE=6009,mE=6010,lE=6011,TE=6012,yE=6013,fE=6014,SE=6015,xE=6016,IE=6017,CE=6018,EE=6019,DE=6020,PE=6021,hE=6022,ME=6023,RE=6024,bE=6025,_E=6026,vE=6027,UE=6028,kE=6029,WE=6030,LE=6031,OE=6032,BE=6033,NE=6034,wE=6035,HE=6036,VE=6037,FE=6038,GE=6039,zE=6040,KE=6041,jE=6042,qE=6043,JE=6044,YE=6045,ZE=6046,XE=6047,QE=6048,$E=6049,eD=6050,tD=6051,rD=6052,nD=6053,oD=6054,sD=6055,cD=6056,aD=6057,iD=6058,dD=6059,uD=6060,AD=6061,gD=6062,pD=6063,mD=6064,lD=6065,TD=6066,yD=6067,fD=6068,SD=6069,xD=6070,ID=6071,CD=6072,ED=6073,DD=6074,PD=6075,hD=6076,MD=6077,RD=6078,bD=6079,_D=6080,vD=6081,UD=6082,kD=6083,WD=6084,LD=6085,OD=6086,Au;process.env.NODE_ENV!=="production"&&(Au={[LE]:"This member is already delegated to another wallet.",[AE]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[MD]:"Clock sysvar access failed. This may indicate a system error.",[tD]:"Missing credential id.",[nD]:"The domain configuration account is disabled. Please contact support or try again later.",[oD]:"Missing domain configuration account.",[PD]:"Domain configuration account key mismatch. The provided domain config does not match the expected value.",[OD]:"Duplicate address tree detected. This address tree is already in the whitelist.",[mE]:"Duplicate public keys detected among members. Each member must have a unique key.",[pE]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[PE]:"No members provided. A multisig wallet must contain at least one member.",[uD]:"Slot numbers list is empty. At least one slot number is required for validation.",[CE]:"Expected a User with Administrator role for this instruction.",[gE]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[xE]:"Expected a User with Transaction Manager role for this instruction.",[zE]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[KE]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[jE]:"Declared buffer size does not match the actual serialized size.",[dD]:"Failed to compute hash. This may indicate a system error.",[NE]:"Not enough members with vote permission to meet the approval threshold.",[OE]:"At least one signer with execute permission is required to proceed.",[BE]:"At least one signer with initiate permission is required to perform this action.",[_E]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[DD]:"Invalid account index in transaction message. The account index is out of bounds.",[aD]:"Address Tree supplied is not part of the whitelisted address trees.",[EE]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[UE]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[GE]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[AD]:"Member key conversion failed. The provided key format is invalid.",[wE]:"Only delegated members are allowed for this transaction.",[bE]:"Unexpected number of accounts provided for this instruction.",[yE]:"User with Permanent Member role must have a delegated wallet.",[sE]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[iE]:"The extracted public key has an invalid length or encoding.",[oE]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[aE]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[eD]:"The specified slot number is not recent enough. Slot must be within the recent slot history window.",[QE]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[ME]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[ID]:"Invalid source type for token transfer. The source account type is not supported.",[IE]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[SE]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[RE]:"Malformed transaction message: structure or formatting does not match the expected layout.",[_D]:"Invalid user configuration. Credential ID and transports must be none for ed25519 members.",[vE]:"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.",[xD]:"Light CPI account operation failed. The account may be invalid or uninitialized.",[dE]:"The extracted WebAuthn signed message payload is malformed.",[ZE]:"An input string exceeds the maximum allowed character length.",[sD]:"This member is not registered under the provided domain configuration.",[mD]:"Member not found in settings. Cannot remove a member that does not exist.",[ED]:"Member not found in settings members list. Cannot update delegate flag for a non-existent member.",[kE]:"A required account is missing from the instruction context.",[gD]:"Compressed proof arguments are missing. Required for compressed account operations.",[yD]:"Missing compressed token account. Required for token transfer operations.",[vD]:"Missing destination token account. Required for token transfer operations.",[SD]:"Missing instructions sysvar account. Required for secp256r1 signature verification.",[pD]:"Light CPI accounts are missing. Required for compressed account operations.",[WE]:"User mutation arguments are required when performing add or remove delegate operations.",[WD]:"Missing new authority account. Required for domain configuration updates.",[kD]:"Missing settings account. Required for delegate operations on compressed wallets.",[iD]:"Compressed settings data is missing. The settings account must be initialized with data.",[UD]:"Missing source token account. Required for token transfer operations.",[fD]:"Missing SPL interface PDA. Required for token transfer operations.",[XE]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[hD]:"User account address is missing. Required for secp256r1 signature verification.",[LD]:"Missing whitelisted address trees account. Required for domain configuration updates.",[VE]:"No valid signer found in this transaction.",[DE]:"Only one administrator is allowed per wallet.",[TE]:"Only one permanent member is allowed per wallet.",[fE]:"Only one transaction manager is allowed per wallet.",[cD]:"The given origin index is not in the whitelisted origins.",[TD]:"Payer account mismatch. The provided payer does not match the transaction buffer payer.",[lE]:"Permanent members cannot be removed from a wallet.",[YE]:"Writable CPI calls to protected accounts are not permitted.",[uE]:"The rpIdHash extracted from the signed message does not match the expected value.",[lD]:"Settings key mismatch. The provided settings key does not match the expected value.",[cE]:"The signature index provided is out of bounds for the secp256r1 instruction.",[$E]:"The specified slot number was not found in the provided slot history.",[CD]:"Source account mismatch. The provided source account does not match the expected wallet vault address.",[hE]:"Too many members: a maximum of 4 members are supported.",[qE]:"This transaction has expired. It must be executed within 3 minutes of approval.",[JE]:"This transaction has not yet reached the required approval threshold.",[rD]:"Missing transports.",[FE]:"Only the transaction creator or rent payer may close this transaction buffer.",[RD]:"Unauthorized: Only the admin account is allowed to perform this action.",[HE]:"Member is not part of the expected signers for this transaction."});function lN(e){return process.env.NODE_ENV!=="production"?Au[e]:"Error message not available in production bundles."}function TN(e,n,r){return gill.isProgramError(e,n,A,r)}async function MN({admin:e,addressTree:n}){return zc({payer:e,addressTree:n,remainingAccounts:[]})}var Me=class extends Error{constructor(r,o,t){super(r);this.code=o;this.cause=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},Xe=class extends Me{constructor(n){super(`${n} is not initialized. Please call initialize() first.`,"NOT_INITIALIZED");}},Q=class extends Me{constructor(n,r){super(`${n} not found.${r?` ${r}`:""}`,"NOT_FOUND");}},b=class extends Me{constructor(n,r){super(n,"VALIDATION_ERROR",{field:r});}},Te=class extends Me{constructor(r,o,t){super(r,"NETWORK_ERROR",{statusCode:o,url:t});this.statusCode=o;this.url=t;}};var ae=class extends Me{constructor(r,o,t){super(r,"BUNDLE_ERROR",{bundleId:o,attempt:t});this.bundleId=o;this.attempt=t;}},br=class extends Me{constructor(r,o,t){super(`Operation "${r}" failed after ${o} attempts.`,"RETRY_EXHAUSTED",{lastError:t});this.attempts=o;this.lastError=t;}},_r=class extends Me{constructor(r,o,t){super(r,"PERMISSION_ERROR",{required:o,actual:t});this.required=o;this.actual=t;}};var jt={Ed25519:1,Secp256r1:2};var BD=g__default.default.looseObject({publicKey:g__default.default.string(),walletAddress:g__default.default.string(),settingsIndexWithAddress:g__default.default.object({index:g__default.default.union([g__default.default.number(),g__default.default.bigint()]),settingsAddressTreeIndex:g__default.default.number()}),username:g__default.default.string().optional(),profilePictureUrl:g__default.default.string().optional()}),gu=g__default.default.enum(["create","create_with_preauthorized_execution","execute","vote","sync","close","decompress","transfer_intent","change_delegate","change_config"]),WN=g__default.default.object({transactionActionType:gu,transactionAddress:g__default.default.string(),transactionMessageBytes:g__default.default.array(g__default.default.number().int().min(0).max(255)).transform(e=>new Uint8Array(e))}).strict(),ND=g__default.default.object({transactionActionType:gu,transactionAddress:g__default.default.string(),transactionMessageBytes:g__default.default.base64()}).strict(),wD=g__default.default.union([g__default.default.object({type:g__default.default.literal("Ephemeral"),secretKey:g__default.default.string()}),g__default.default.object({type:g__default.default.literal("Default"),publickey:g__default.default.string(),endpoint:g__default.default.string()})]).array().optional(),pu=g__default.default.object({phase:g__default.default.literal("start"),redirectOrigin:g__default.default.url(),signer:g__default.default.string().optional(),rid:g__default.default.string(),validTill:g__default.default.number(),data:g__default.default.object({type:g__default.default.literal("message"),payload:g__default.default.string(),trustedDeviceCheck:g__default.default.boolean()}).strict()}).strict(),mu=g__default.default.object({phase:g__default.default.literal("start"),redirectOrigin:g__default.default.url(),signer:g__default.default.string().optional(),rid:g__default.default.string(),validTill:g__default.default.number(),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:ND,sendTx:g__default.default.boolean(),additionalSigners:wD}).strict()}).strict(),lu=g__default.default.object({startRequest:g__default.default.union([pu,mu]),authResponse:g__default.default.custom(),client:g__default.default.object({clientOrigin:g__default.default.url(),jws:g__default.default.string()}).strict(),device:g__default.default.object({jwk:g__default.default.base64(),jws:g__default.default.string()}).strict(),authProvider:g__default.default.object({jwk:g__default.default.base64(),jws:g__default.default.string()}).strict().optional()}).strict(),Tu=g__default.default.object({signer:g__default.default.string(),userAddressTreeIndex:g__default.default.number().optional(),additionalInfo:g__default.default.looseObject({}).optional()}).strict(),HD=g__default.default.object({slotHash:g__default.default.string(),slotNumber:g__default.default.string(),originIndex:g__default.default.number(),crossOrigin:g__default.default.boolean()}).strict(),LN=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("message"),payload:Tu.extend(lu.shape).extend({id:g__default.default.string().optional(),client:g__default.default.object({clientOrigin:g__default.default.url()}).strict()})}).strict()}).strict(),ON=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:Tu.extend(lu.shape).extend(HD.shape).extend({client:g__default.default.object({clientOrigin:g__default.default.url()}).strict()})}).strict()}).strict(),BN=g__default.default.object({phase:g__default.default.literal("complete"),data:g__default.default.object({type:g__default.default.literal("transaction"),payload:g__default.default.object({startRequest:g__default.default.union([mu,pu]),txSig:g__default.default.string(),user:BD})}).strict()}).strict();var Re={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},ve=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,o)=>r|o,0))}static all(){return new e(Object.values(Re).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var No=33,Ue=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!==No)throw new Error(`Invalid public key length, expected ${No} 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===No)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()}},_=class extends Ue{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 GD(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function zD(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var fu=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(GD())],["addressTableLookups",gill.getArrayCodec(zD())]]);function Su(e){return fu.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 xu(e){let n=fu.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}}var Ho=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],Iu="https://mainnet.block-engine.jito.wtf/api/v1",Cu="https://bundles.jito.wtf/api/v1/bundles/tip_floor",Eu="landed_tips_75th_percentile";var ne={};function Du(){if(!ne.solanaRpcEndpoint)throw new Xe("RPC endpoint");return ne.solanaRpcEndpoint}function ye(){if(!ne.lightProtocolRpc)throw new Xe("Light Protocol RPC");return ne.lightProtocolRpc}function Y(){if(!ne.solanaRpc)throw new Xe("Solana RPC");return ne.solanaRpc}function Pu(){if(!ne.sendAndConfirm)throw new Xe("Send and confirm transaction function");return ne.sendAndConfirm}function Vo(){return ne.jitoTipsConfig?ne.jitoTipsConfig:{blockEngineUrl:Iu,getJitoTipsUrl:Cu,priority:Eu}}function aw({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:o}){ne.solanaRpcEndpoint=e,ne.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:t,sendAndConfirmTransaction:c}=gill.createSolanaClient({urlOrMoniker:e});ne.solanaRpc=t,ne.sendAndConfirm=c,ne.jitoTipsConfig=o??null;}async function qt(e,n){if(!e.ok)throw new Te(`Request failed: ${e.statusText} (${e.status})`,e.status,n);return e}async function Jt(e){try{return await e.json()}catch(n){throw new Te(`Failed to parse JSON response: ${n instanceof Error?n.message:String(n)}`,e.status,e.url)}}function Cw(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+Ur(n.get(-2))),y:BigInt("0x"+Ur(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Ew(e){let r=nist_js.p256.Point.fromBytes(gill.getBase58Encoder().encode(e)).toBytes(false),o=new Map;return o.set(1,2),o.set(3,-7),o.set(-1,1),o.set(-2,r.slice(1,33)),o.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(o))}async function Dw(e){let{authenticatorData:n,clientDataJSON:r,signature:o}=e.authResponse.response,t=me(n),c=JSON.parse(gill.getUtf8Decoder().decode(me(r))),i=_u(c),a=Uu(me(o)),s=await at({rpIdHash:t.subarray(0,32)});return new _(e.signer.toString(),{verifyArgs:{clientDataJson:me(r),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:gill.getBase58Encoder().encode(e.slotHash)},clientAndDeviceHash:Fo(e.client.clientOrigin,e.device.jwk,e.startRequest.rid),domainConfig:s,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function Fo(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...gill.getBase64Encoder().encode(n),...gill.getBase64Encoder().encode(r)]))}function Pw(e){return sha2_js.sha256(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function hw(e){return Go(e.data.payload.authResponse)}function Mw(e,n,r,o){let t=Fo(n,r,o);return sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e),...t]))}async function Rw(e,n,r,o,t,c){let i;if(!t||!c){let u=(await Y().getAccountInfo(gill.address("SysvarS1otHashes111111111111111111111111111"),{encoding:"base64",commitment:"confirmed",dataSlice:{offset:8,length:40}}).send()).value?.data;if(!u)throw new Q("Slot sysvar","Unable to fetch slot sysvar data");let p=gill.getBase64Encoder().encode(u[0]);c=gill.getU64Decoder().decode(p.subarray(0,8)).toString(),i=p.subarray(8,40),t=gill.getBase58Decoder().decode(i);}else i=gill.getBase58Encoder().encode(t);let a=sha2_js.sha256(typeof e.transactionMessageBytes=="string"?gill.getBase64Encoder().encode(e.transactionMessageBytes):e.transactionMessageBytes),s=Fo(n,r,o),d=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(e.transactionActionType),...gill.getBase58Encoder().encode(e.transactionAddress),...a,...i,...s]));return {slotNumber:c,slotHash:t,challenge:d}}function Go(e){let n=kr(e);return sha2_js.sha256(n)}function bw(e){let n="";for(let o of e)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function me(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,o=n.padEnd(n.length+r,"="),t=atob(o),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return i}async function _w(e,n){let{data:r}=await is(Y(),e),t=vu(r.origins,r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Q("Origin","Origin not found in domain config");return t}function vw(e){return gill.getBase64Decoder().decode(gill.getUtf8Encoder().encode(jsonCanonicalize.canonicalize(e)))}function Uw(e){return JSON.parse(gill.getUtf8Decoder().decode(gill.getBase64Encoder().encode(e)))}function Ur(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function $D(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 _u(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 o=JSON.stringify(r);return new TextEncoder().encode(o.slice(1,-1))}function vu(e,n){let r=[],o=0,t=new TextDecoder;for(let c=0;c<n;c++){if(o+2>e.length)throw new Error("MaxLengthExceeded");let i=e[o]|e[o+1]<<8;if(o+=2,o+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(o,o+i),s=t.decode(a);r.push(s),o+=i;}return r}function Uu(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 M=n&127;r+=M;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let o=e[r+1],t=r+2,c=e.slice(t,t+o);if(r=t+o,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,s=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,u=s[0]===0&&s.length>32?s.slice(1):s;if(d.length>32||u.length>32)throw new Error("r or s length > 32 bytes");let p=new Uint8Array(32);p.set(d,32-d.length);let m=nist_js.p256.Point.CURVE().n>>1n,f=BigInt("0x"+Ur(u)),I=(f>m?nist_js.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),x=$D(I);return new Uint8Array([...p,...x])}function kr(e){let n=me(e.response.clientDataJSON),r=me(e.response.authenticatorData),o=sha2_js.sha256(n);return new Uint8Array([...r,...o])}var eP=400,tP=429,Wu=500,rP=3,nP=500,oP=2,sP=3e4,Lu={backoffBase:oP,maxDelayMs:sP,retryOnRateLimit:true,initialDelayMs:nP,maxRetries:rP};function Ou(e){return e===tP}function Bu(e){return e>=Wu}function cP(e){return e>=eP&&e<Wu}function aP(e){return Ou(e)||Bu(e)}function iP(e,n,r){return e instanceof Response?Ou(e.status)?r.retryOnRateLimit??true:cP(e.status)?false:Bu(e.status):e instanceof TypeError||e instanceof Error}function dP(e,n,r,o){let t=n*Math.pow(r,e-1);return Math.min(t,o)}function uP(e){return new Promise(n=>setTimeout(n,e))}async function Xt(e,n){let{maxRetries:r,initialDelayMs:o,backoffBase:t,maxDelayMs:c,shouldRetry:i}={...Lu,...n},a;for(let s=1;s<=r;s++)try{return await e()}catch(d){if(a=d,i&&!i(d,s))throw d;if(s>=r)break;let u=dP(s,o,t,c);await uP(u);}throw new br(e.name||"retryWithBackoff",r,a)}async function it(e,n){let r={...Lu,...n},o=(c,i)=>iP(c,i,r);return Xt(async()=>{let c=await e();if(!c.ok&&aP(c.status))throw c;return c},{...r,shouldRetry:n?.shouldRetry??o})}function Nu(...e){return n=>e.some(r=>n instanceof r)}function wu(e,n,r,o){if(e<n||e>r)throw new b(`${o} must be between ${n} and ${r} (inclusive), got ${e}`)}function Hu(e,n){if(e<0)throw new b(`${n} must be non-negative, got ${e}`)}function Qt(e,n){if(e.length===0)throw new b(`${n} cannot be empty`)}function Vu(e,n){if(e.trim().length===0)throw new b(`${n} cannot be empty`)}async function Ko(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await Y().getLatestBlockhash().send()).value;return await Promise.all(e.map(async o=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(o.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(o.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>o.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,o.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((o.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 ju(e){let n=gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:8e5}),programs.getSetComputeUnitPriceInstruction({microLamports:1e4})],e),r=gill.getBase64EncodedWireTransaction(gill.compileTransaction(n));if(r.length>1644)throw new b(`Transaction exceeds maximum length of ${1644} bytes (actual: ${r.length} bytes)`);let o=await Y().simulateTransaction(r,{encoding:"base64"}).send();if(o.value.err){if(o.value.logs){let c=["Transaction simulation failed:","",...o.value.logs].join(`
|
|
2
|
+
`);throw new Error(c)}let t=["Transaction simulation failed:","",o.value.err.toString()].join(`
|
|
3
|
+
`);throw new Error(t)}return o.value.unitsConsumed}async function qu(e,n){let o=(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));o.sort((c,i)=>c-i);let t=Math.floor(o.length/2);return o.length%2===0?Math.round((o[t-1]+o[t])/2):o[t]}async function Ju(e,n){Qt(e,"bundle");for(let t=0;t<e.length;t++)if(e[t].length>1644)throw new b(`Transaction ${t} exceeds maximum length of ${1644} bytes (actual: ${e[t].length} bytes)`);let r=await it(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})}));await qt(r,n);let o=await Jt(r);if(!o.result||o.error)throw new ae(`Unable to simulate bundle: ${JSON.stringify(o.error??o.result)}`);if(typeof o.result.value.summary!="string"&&o.result.value.summary.failed){let{TransactionFailure:t}=o.result.value.summary.failed.error,[,c]=t;throw new ae(`Simulation failed: ${c}`)}return o.result.value.transactionResults.map(t=>t.unitsConsumed)}function ie(e,n=0){let r=e instanceof _?e:void 0,o=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?kr(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:o,signature:c,message:i,publicKey:a}}function We(e,n,r=[]){let o=[];for(let t of e)if(t instanceof _){let c=r.length,{domainConfig:i,verifyArgs:a,signature:s,publicKey:d,message:u}=ie(t,c);if(u&&s&&d&&r.push({message:u,signature:s,publicKey:d}),i){let p=n.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]).get(i)?.index;a.__option==="Some"&&p!==void 0&&o.push({__kind:"Secp256r1",fields:[{domainConfigIndex:p,verifyArgs:a.value}]});}}else {let c=n.addPreAccounts([{address:t.address,role:gill.AccountRole.READONLY_SIGNER,signer:t}]).get(t.address)?.index;c!==void 0&&o.push({__kind:"Ed25519",fields:[c]});}return {secp256r1VerifyInput:r,transactionSyncSigners:o}}function fe(e){if(e instanceof Ue)return {keyType:jt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:jt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function Fu(e){return e instanceof _?e.toString():e.address.toString()}function ue(e){let n=new Set,r=[];for(let t of e)n.has(Fu(t))||(r.push(t),n.add(Fu(t)));let o=r.filter(t=>t instanceof _);if(o.length>1)throw new b(`More than 1 Secp256r1 signers in an instruction is not supported (found ${o.length})`);return r}function Yu({payer:e,tipAmount:n}){let r=Ho[Math.floor(Math.random()*Ho.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(r),amount:n})}function Zu(e){return typeof e=="string"?e:e.toString()}function Xu(e){return e.toString()}async function jo(e,n,r){let o=e?.get(n);if(o)return o;let t=await r();return t&&e&&e.set(n,t),t}var N=class{systemAccounts;nextPreIndex;preMap;nextPackedIndex;packedMap;outputTreeIndex;constructor(){this.systemAccounts=[],this.nextPreIndex=0,this.preMap=new Map,this.nextPackedIndex=0,this.packedMap=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){for(let r of n)this.insertOrGet(r.address.toString(),r,false);return this.preMap}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,r={address:gill.address(n),role:gill.AccountRole.WRITABLE},o=true){let t=o?this.packedMap:this.preMap;if(!t.has(n)){let c=o?this.nextPackedIndex++:this.nextPreIndex++;t.set(n,{index:c,accountMeta:r});}return t.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 ye().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let o=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());o.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let s=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(s);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:o.length>0?{packedTreeInfos:o,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(n){return Array.from(n.entries()).sort((o,t)=>o[1].index-t[1].index).map(([,{accountMeta:o}])=>({...o}))}getOffsets(n){let r=n,o=r+this.systemAccounts.length;return [r,o]}toAccountMetas(){let n=this.hashSetAccountsToMetas(this.preMap),r=this.hashSetAccountsToMetas(this.packedMap),[o,t]=this.getOffsets(n.length);return {remainingAccounts:[...n,...this.systemAccounts,...r],systemOffset:o,packedOffset:t}}};async function Or(e,n){let r=Zu(e);return jo(n,r,()=>ye().getCompressedAccount(e))}async function $e(e,n){let r=Xu(e);return jo(n,r,()=>Y().getAccountInfo(e,{encoding:"base64"}).send())}async function de(e,n){let r=(await Promise.all(e.map(o=>Or(o.address,n)))).filter(o=>o!==null).filter(o=>o.data!==null&&o.address!==null);if(r.length!==e.length)throw new Q("Compressed account",`Expected ${e.length} accounts but found ${r.length}`);return r.map((o,t)=>({...o,type:e[t].type,tree:o.treeInfo.tree,queue:o.treeInfo.queue}))}function v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function Se(e,n,r,o,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:o[u],address:d.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],c),a=await e.getOutputTreeIndex();return t.map((d,u)=>({addressTreeInfo:i[u],outputStateTreeIndex:a,address:d.address,type:d.type}))}function re(e,n,r,o,t,c,i){let a=[];for(let u=0;u<n.length;u++)a.push({treeInfo:n[u],rootIndex:o[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let s=e.packTreeInfos(a,[]).stateTrees;if(!s)throw new b("Unable to parse state tree data");return c.map((u,p)=>({data:i.decode(u.data.data),accountMeta:{treeInfo:s.packedTreeInfos[p],address:new Uint8Array(u.address),outputStateTreeIndex:s.outputTreeIndex}}))}async function xe(e,n,r,o,t){let c=null,i=null,a=null,s=new N;if(e){await s.addSystemAccounts();let{address:d}=await oe(n,r),u=(await de([{address:d,type:"Settings"}],t))[0];o?a={rootIndices:[0],roots:[],leafIndices:[u.leafIndex],leaves:[],treeInfos:[u.treeInfo],proveByIndices:[u.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 Z([u],[]);let p=s.packTreeInfos([{treeInfo:a.treeInfos[0],rootIndex:a.rootIndices[0],leafIndex:a.leafIndices[0],proveByIndex:a.proveByIndices[0],hash:u.hash}],[]).stateTrees;if(!p)throw new b("Unable to parse state tree data");let m=j().decode(u.data?.data);c={accountMeta:{address:new Uint8Array(u.address),treeInfo:p.packedTreeInfos[0]},data:m},i={accountMeta:{address:new Uint8Array(u.address),treeInfo:p.packedTreeInfos[0],outputStateTreeIndex:p.outputTreeIndex},data:m};}return {settingsReadonlyArgs:c,proof:a,packedAccounts:s,settingsMutArgs:i}}async function Z(e,n){return Xt(()=>ye().getValidityProofV0(e,n))}async function Ie(){return (await Br()).length-1}var qo;async function Br(){if(!qo){let{data:e}=await wc(Y(),await tA());qo=e.whitelistedAddressTrees;}return qo}function eA(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 er(e,n,r){let o=await UP(e,n,r);if(!o)throw new Q("User account");return o}async function UP(e,n,r){let{address:o}=await w(e,n),t=await Or(o,r);return t?.data?.data?X().decode(t.data.data):null}async function h2(e,{member:n,credentialId:r}){let o=[{memcmp:{offset:1,encoding:"base58",bytes:e}}];if(n)o.push({memcmp:{offset:33,encoding:"base58",bytes:gill.getBase58Decoder().decode(V().encode(fe(n)))}});else if(r)o.push({memcmp:{offset:72,encoding:"base58",bytes:gill.getBase58Decoder().decode(me(r))}});else return null;let t=await ye().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:o});return t.items.filter(c=>!!c.data).length?t.items.map(c=>X().decode(c.data?.data))[0]:null}async function Nr(e,n,r){let o=await kP(e,n,r);if(!o)throw new Q("Settings account");return o}async function kP(e,n,r){try{let{address:o}=await oe(e,n),t=await Or(o,r);if(!t?.data?.data)throw new Q("Compressed settings account");let c=j().decode(t.data.data);if(c.data.__option==="None")throw new Q("Compressed settings account");return {...c.data.value,isCompressed:!0}}catch{let o=await mo(Y(),e);return o.exists?{...o.data,isCompressed:false}:null}}async function M2(e,n,r){let o=await er(e,n,r);if(o.role===1||o.role===0){let t=[],[c,i]=await Promise.all([ye().getCompressedAccountsByOwner(new web3_js.PublicKey(A.toString()),{filters:[{memcmp:{offset:20,encoding:"base58",bytes:gill.getBase58Decoder().decode(V().encode(fe(e)))}}]}),Y().getProgramAccounts(A,{encoding:"base64",filters:[{memcmp:{offset:BigInt(20),encoding:"base64",bytes:gill.getBase64Decoder().decode(V().encode(fe(e)))}}]}).send()]);return c.items.forEach(a=>{if(a.data?.data){let s=j().decode(a.data.data);s.data.__option==="Some"&&t.push({...s.data.value,isCompressed:true});}}),i.forEach(a=>{let s=Sr().decode(gill.getBase64Encoder().encode(a.account.data[0]));t.push({...s,isCompressed:false});}),t}else return await Promise.all(o.wallets.map(async t=>Nr(await Ce(t.index),t.settingsAddressTreeIndex,r)))}async function Yo(e){Hu(e,"index");let n=await Br();if(e>=n.length)throw new b(`Address tree index ${e} is out of bounds (max: ${n.length-1})`);return n[e]}async function R2(e){let r=(await Br()).findIndex(o=>o.toString()===e);if(r===-1)throw new Q("Address tree",`Address ${e} not found in whitelist`);return r}async function oe(e,n=0){let r=await Yo(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function w(e,n=0){let r=await Yo(n),o=stateless_js.deriveAddressSeedV2([gill.getUtf8Encoder().encode("user"),e instanceof Ue?e.toTruncatedBuffer():gill.getAddressEncoder().encode(e)]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(o,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function at({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(gill.getUtf8Encoder().encode(n));else throw new b("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 cA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function tA(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function aA(e,n,r){wu(r,0,255,"buffer_index");let[o]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof Ue?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return o}async function be(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 Ce(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function w2(e){let n=await Ce(e);return await be(n)}async function H2(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function Y2(e){Qt(e,"bundle");let n=await Ko(e,true),r=await Ju(n.map(gill.getBase64EncodedWireTransaction),Du()),o=await Ko(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await BP(o.map(gill.getBase64EncodedWireTransaction))}async function BP(e,n=Vo(),r){Qt(e,"serializedTransactions");let{blockEngineUrl:o}=n,t=`${o}/bundles`,c=await it(()=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})}),r);await qt(c,t);let i=await Jt(c);if(i.error)throw new ae(`Error sending bundles: ${JSON.stringify(i.error,null,2)}`);if(!i.result)throw new ae("No bundle ID returned from Jito");return i.result}async function Z2(e,n=30,r=3e3,o=Vo()){Vu(e,"bundleId");let{blockEngineUrl:t}=o,c=`${t}/getBundleStatuses`;return Xt(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 qt(i,c);let a=await Jt(i);if(a.error)throw new ae(`Error getting bundle status: ${JSON.stringify(a.error,null,2)}`,e);if(!a.result?.value?.length)throw new ae("Bundle not yet confirmed",e);let s=a.result.value[0];if(s.confirmation_status==="confirmed"||s.confirmation_status==="finalized"){let d=s.transactions[s.transactions.length-1];if(!d)throw new ae("No transactions in confirmed bundle",e);return d}throw new ae(`Bundle status: ${s.confirmation_status}`,e)},{maxRetries:n,initialDelayMs:r,shouldRetry:Nu(ae,Te)})}async function n8({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=await Y().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(e,c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(o.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([ju(c),qu(Y(),c.instructions.flatMap(d=>d.accounts??[]))]),s=Math.ceil((Number(i)??0)*1.1);return gill.prependTransactionMessageInstructions([...s>2e5?[programs.getSetComputeUnitLimitInstruction({units:s})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await Pu()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}function f8(e,n){if(n.threshold>1)throw new b("Multi-signature transactions with threshold > 1 are not supported yet.");let r=n.members.find(s=>AA(s.pubkey)===e);if(!r)throw new Q("Member",`Signer ${e} not found in settings`);let{permissions:o}=r;if(!o)throw new Q("Permissions","No permissions found for the current member");let t=ve.has(o,Re.InitiateTransaction),c=ve.has(o,Re.VoteTransaction),i=ve.has(o,Re.ExecuteTransaction);if(t&&c&&i)return {};if(!c||!i)throw new _r("Signer lacks the required Vote/Execute permissions.",["VoteTransaction","ExecuteTransaction"],[c?"VoteTransaction":void 0,i?"ExecuteTransaction":void 0].filter(Boolean));let a=n.members.find(s=>s.role===0);if(!a)throw new Q("Transaction manager","No transaction manager available in wallet");return {transactionManagerAddress:gill.address(AA(a.pubkey)),userAddressTreeIndex:a.userAddressTreeIndex}}async function S8({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:o,cachedAccounts:t}){if(!n)return null;let c=await er(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Q("Transaction manager endpoint","Transaction manager endpoint is missing for this account");return eh(n,c.transactionManagerUrl.value,e,o)}function eh(e,n,r,o){return {address:e,async signTransactions(t){let c=await it(()=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicKey:e.toString(),payload:t.map(a=>({transaction:gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)),transactionMessageBytes:o?gill.getBase64Decoder().decode(o):void 0,authResponses:r}))})}));if(!c.ok)throw new Te(`Transaction manager request failed: ${c.statusText}`,c.status,n);let i=await c.json();if("error"in i)throw new Te(`Transaction manager error: ${i.error}`,c.status,n);return i.signatures.map(a=>({[e]:gill.getBase58Encoder().encode(a)}))}}}function AA(e){return e.keyType===jt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}function x8(e){let n=e.map(c=>Ve().encode(c)),r=4+n.reduce((c,i)=>c+i.length,0),o=new Uint8Array(r),t=0;o.set(gill.getU32Encoder().encode(e.length),t),t+=4;for(let c of n)o.set(c,t),t+=c.length;return o}function I8(e){let n=0,[r,o]=gill.getU32Decoder().read(e,n);n=o;let t=new Array(r);for(let c=0;c<r;c++){let i=Fe().read(e,n);t[c]=i[0],n=i[1];}if(n!==e.length)throw new b(`Trailing bytes detected: expected ${e.length} bytes but consumed ${n}`);return t}async function B8({payer:e,rpId:n,origins:r,authority:o}){let t=await at({rpId:n}),c=new N;await c.addSystemAccounts();let i=await Ie(),{address:a,addressTree:s}=await w(o.address,i),d=[{address:a,tree:s,queue:s,type:"User"}],u=await Z([],d),p=(await Se(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:m,systemOffset:f}=c.toAccountMetas(),S=v(u,f);return await Ia({origins:r,authorityCreationArgs:p,authority:o,compressedProofArgs:S,payer:e,domainConfig:t,rpId:n,remainingAccounts:m})}async function J8({authority:e,payer:n,createUserArgs:r,domainConfig:o,cachedAccounts:t}){let c=new N;await c.addSystemAccounts();let i=[];r.settings&&(r.transactionManager&&i.push({address:(await w(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}),i.push({address:(await oe(r.settings,r.settingsAddressTreeIndex)).address,type:"Settings"}));let a=i.length?await de(i,t):[],s=await Ie(),{address:d,addressTree:u}=await w(r.member,s),p=[{address:d,type:"User",tree:u,queue:u}],m=await Z(a,p),f=null,S=null,I=a.filter(k=>k.type==="Settings"),x=a.filter(k=>k.type==="User");if(x.length&&(S=re(c,m.treeInfos.slice(0,1),m.leafIndices.slice(0,1),m.rootIndices.slice(0,1),m.proveByIndices.slice(0,1),x,X())[0]),I.length){let k=x.length,ee=k+1;f=re(c,m.treeInfos.slice(k,ee),m.leafIndices.slice(k,ee),m.rootIndices.slice(k,ee),m.proveByIndices.slice(k,ee),I,j())[0];}let M=(await Se(c,m.treeInfos.slice(a.length),m.roots.slice(a.length),m.rootIndices.slice(a.length),p))[0],{remainingAccounts:R,systemOffset:U}=c.toAccountMetas(),W=v(m,U);return await ha({payer:n,authority:e,compressedProofArgs:W,member:Ut().decode(r.member.toBuffer()),credentialId:me(r.credentialId),transports:r.transports,role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:S?gill.some(S):gill.none()}):gill.none(),userAccountCreationArgs:M,domainConfig:o,remainingAccounts:R})}async function Q8({payer:e}){let n=await cA();return _a({payer:e,globalCounter:n})}async function rH({admin:e,rpId:n,disable:r}){let o=await at({rpId:n});return ja({domainConfig:o,admin:e,disable:r,remainingAccounts:[]})}function rh(e,n,r,o){let t=nh(e,n),c=oh(e,n)&&r!==o;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function nh(e,n){let r=e.staticAccounts.length,{numSignerAccounts:o,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=o-t,a=r-o-c;return n>=r?false:n<i?true:n>=o?n-o<a:false}function oh(e,n){return n<e.header.numSignerAccounts}async function wr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:o}){let t=xu(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),Y()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,s]of t.staticAccounts.entries())i.push({address:s,role:rh(t,a,s,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let s=c[a.lookupTableAddress];if(!s)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:u,role:gill.AccountRole.WRITABLE});}for(let d of a.readonlyIndexes){let u=s[d];if(!u)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:u,role:gill.AccountRole.READONLY});}}for(let a of o?.filter(s=>s.address!==e)??[]){let s=i.findIndex(d=>d.address===a.address);s===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[s].role===gill.AccountRole.READONLY||i[s].role===gill.AccountRole.READONLY_SIGNER?i[s]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[s].role===gill.AccountRole.WRITABLE||i[s].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[s]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}var ut=33,At=64,$o=14,Ah=2,gh=gill.address("Secp256r1SigVerify1111111111111111111111111");function ph(){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 mh(){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 yA(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let o=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=mh();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=$o;let i=[];for(let a=0;a<r;a++){let s=gill.fixDecoderSize(gill.getBytesDecoder(),ut).decode(e,n);n+=ut;let d=gill.fixDecoderSize(gill.getBytesDecoder(),At).decode(e,n);n+=At;let u=t[a].messageDataSize,p=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,i.push({publicKey:s,signature:d,message:p});}return [{numSignatures:r,padding:o,offsets:t,payload:i},n]}})}function fA(){return gill.createEncoder({getSizeFromValue:e=>{let n=$o*e.offsets.length,r=e.payload.reduce((o,t)=>o+ut+At+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 o=ph();for(let t of e.offsets)r=o.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),ut).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),At).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function lH(){return gill.combineCodec(fA(),yA())}function H(e,n){let r=e.length,o=Ah+r*$o,t=[];for(let s=0;s<r;s++){let{message:d}=e[s],u=o,p=u+ut,m=p+At;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:p,signatureInstructionIndex:65535,messageDataOffset:m,messageDataSize:d.length,messageInstructionIndex:65535}),o+=ut+At+d.length;}let c=n?.programAddress??gh,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:fA().encode(i)}}function TH(e){return {programAddress:e.programAddress,accounts:{},data:yA().decode(e.data)}}async function SA({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:o,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:s=false}){let d=await be(e),{accountMetas:u,addressLookupTableAccounts:p}=await wr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),m=[];return c.length>0&&m.push(H(c)),m.push(s?Qd({transactionBuffer:n,payer:o.address,remainingAccounts:u,settingsKey:e}):jd({transactionBuffer:n,payer:o.address,settings:e})),a&&m.push(Yu({payer:o,tipAmount:a})),{instructions:m,addressLookupTableAccounts:p}}async function xA({settings:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,additionalSigners:o,signers:t,payer:c,addressesByLookupTableAddress:i,secp256r1VerifyInput:a=[],compressed:s=false,simulateProof:d=false,cachedAccounts:u}){let p=ue(t),m=await be(e),[{accountMetas:f,addressLookupTableAccounts:S,transactionMessage:I},{settingsMutArgs:x,proof:M,packedAccounts:R}]=await Promise.all([wr({transactionMessageBytes:r,walletAddress:m,additionalSigners:o,addressesByLookupTableAddress:i}),xe(s,e,n,d,u)]);R.addPreAccounts(f);let{secp256r1VerifyInput:U,transactionSyncSigners:W}=We(p,R,a),{remainingAccounts:k,systemOffset:ee}=R.toAccountMetas(),se=[];U.length>0&&se.push(H(U));let Ee=lh(I,f);if(s){if(!c||!x)throw new b("Payer not found or proof args are missing for executeTransactionSync.");let De=v(M,ee);se.push(uu({signers:W,transactionMessage:Ee,settingsMutArgs:x,compressedProofArgs:De,payer:c,remainingAccounts:k}));}else se.push(ou({signers:W,settings:e,transactionMessage:Ee,remainingAccounts:k}));return {instructions:se,addressLookupTableAccounts:S}}function lh(e,n){if(e.version==="legacy")throw new b("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:r.data??[]})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(o=>o.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function KH({settings:e,settingsAddressTreeIndex:n,destination:r,signers:o,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let s=ue(o),d=await be(e),[{packedAccounts:u,proof:p,settingsMutArgs:m},{value:f}]=await Promise.all([xe(a,e,n,false,t),$e(d,t)]);if((f?.lamports??0)<BigInt(c))throw new b("Insufficient balance for native transfer.");let{secp256r1VerifyInput:S,transactionSyncSigners:I}=We(s,u),{remainingAccounts:x,systemOffset:M}=u.toAccountMetas(),R=[];if(S.length>0&&R.push(H(S)),a){if(!i||!m)throw new Error("Payer not found or proof args is missing.");let U=v(p,M);R.push(xi({amount:c,settingsMutArgs:m,compressedProofArgs:U,payer:i,signers:I,source:d,destination:r,remainingAccounts:x}));}else R.push(mi({amount:c,signers:I,source:d,destination:r,settings:e,remainingAccounts:x}));return R}var Dh=gill.address("ACXg8a7VaqecBWrSbdu73W4Pg9gsqXJ3EXAqkHyhvVXg"),Ph=gill.address("r18WwUxfG8kQ69bQPAB2jV6zGNKy3GosFGctjQoV4ti"),Vr=gill.address("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m");async function i5({settings:e,settingsAddressTreeIndex:n,destination:r,mint:o,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:s,splInterfacePdaArgs:d={index:0,restricted:false},compressed:u=false,useDestinationSplAccount:p=false}){let m=ue(t),f=await be(e),S=await hh(o,r,f,s,d),[I,x]=await Promise.all([Mh(S,c),Lh(u,e,n,c)]),M=Rh(I,S,i,p),[R,U]=await Promise.all([Wh(f,o,M.splBalance,M.cTokenBalance,BigInt(i),u),kh(M.requireSplInterface,S.splInterfacePda,c)]),W=BigInt(R.reduce((Oe,ns)=>Oe+(ns.parsed.amount.toNumber()??0),0));if(M.splBalance+M.cTokenBalance+W<BigInt(i))throw new b("Insufficient balance for token transfer.");let k=new N;U&&k.addPreAccounts([{address:o,role:gill.AccountRole.WRITABLE}]);let ee=bh(R,x),{proof:se,settingsMutArgs:Ee}=await _h(k,ee,x),De=vh(R,se,k),{secp256r1VerifyInput:nt,transactionSyncSigners:Le}=We(m,k),{remainingAccounts:ge,systemOffset:ot}=k.toAccountMetas(),Kr=v(se,ot),y=[];nt.length>0&&y.push(H(nt));let rr=Uh({amount:i,transactionSyncSigners:Le,walletAddress:f,destination:r,addresses:S,balances:M,mint:o,tokenProgram:s,remainingAccounts:ge,payer:a,sourceCompressedTokenAccounts:De,compressedProofArgs:Kr,splInterfacePdaArgs:d});if(u){if(!Ee)throw new Error("Payer not found or proof args is missing.");y.push(Wi({...rr,settingsMutArgs:Ee}));}else y.push(Ri({...rr,settings:e}));return y}async function hh(e,n,r,o,t){let c=m=>gill.getProgramDerivedAddress({seeds:[gill.getAddressEncoder().encode(m),gill.getAddressEncoder().encode(Vr),gill.getAddressEncoder().encode(e)],programAddress:Vr}),i=[gill.getUtf8Encoder().encode("pool"),gill.getAddressEncoder().encode(e)];t.restricted&&i.push(gill.getUtf8Encoder().encode("restricted")),t.index>0&&i.push(gill.getU8Encoder().encode(t.index));let[a,[s],d,[u],[p]]=await Promise.all([programs.getAssociatedTokenAccountAddress(e,r,o),c(r),programs.getAssociatedTokenAccountAddress(e,n,o),c(n),gill.getProgramDerivedAddress({seeds:i,programAddress:Vr})]);return {sourceSplAta:a,sourceCtokenAta:s,destinationSplAta:d,destinationCTokenAta:u,splInterfacePda:p}}async function Mh(e,n){let[r,o,t]=await Promise.all([$e(e.destinationSplAta,n),$e(e.sourceSplAta,n),$e(e.sourceCtokenAta,n)]);return {destinationSplAtaInfo:r,sourceSplAtaInfo:o,sourceCTokenAtaInfo:t}}function Rh(e,n,r,o){let t=!!e.destinationSplAtaInfo.value,c=!!e.sourceSplAtaInfo.value,i=!!e.sourceCTokenAtaInfo.value,a=c?programs.getTokenDecoder().decode(gill.getBase64Encoder().encode(e.sourceSplAtaInfo.value.data[0])).amount:BigInt(0),s=BigInt(i?Oh(gill.getBase64Encoder().encode(e.sourceCTokenAtaInfo.value.data[0]))?.amount??0:0),d=t||o?n.destinationSplAta:void 0,u=t||o?void 0:n.destinationCTokenAta,p=c&&(a+s<BigInt(r)||s>BigInt(0)||!t)||!c&&t;return {splBalance:a,cTokenBalance:s,destinationSplTokenAccount:d,destinationCtokenTokenAccount:u,requireSplInterface:p,requireRentSponsor:a+s<BigInt(r)||!t}}function bh(e,n){let r=[];return e.forEach(o=>r.push({hash:o.compressedAccount.hash,tree:o.compressedAccount.treeInfo.tree,queue:o.compressedAccount.treeInfo.queue,data:o.compressedAccount.data,address:o.compressedAccount.address})),n&&r.push(n),r}async function _h(e,n,r){let o=null,t=null;return n.length===0?{proof:t,settingsMutArgs:o}:(await e.addSystemAccounts(),t=await Z(n,[]),r&&(o=re(e,t.treeInfos.slice(-1),t.leafIndices.slice(-1),t.rootIndices.slice(-1),t.proveByIndices.slice(-1),n.slice(-1),j())[0]),{proof:t,settingsMutArgs:o})}function vh(e,n,r){return !n||!e.length?[]:e.map(o=>({amount:o.parsed.amount.toNumber(),merkleContext:{leafIndex:o.compressedAccount.leafIndex,merkleTreePubkeyIndex:r.insertOrGet(o.compressedAccount.treeInfo.tree.toString()),queuePubkeyIndex:r.insertOrGet(o.compressedAccount.treeInfo.queue.toString()),proveByIndex:o.compressedAccount.proveByIndex},rootIndex:n.rootIndices[0],version:eA(o.compressedAccount.data?.discriminator),tlv:o.parsed.tlv?gill.some(gill.getArrayDecoder(Pt()).decode(o.parsed.tlv)):gill.none(),state:o.parsed.state}))}function Uh({amount:e,transactionSyncSigners:n,walletAddress:r,destination:o,addresses:t,balances:c,mint:i,tokenProgram:a,remainingAccounts:s,payer:d,sourceCompressedTokenAccounts:u,compressedProofArgs:p,splInterfacePdaArgs:m}){return {amount:e,signers:n,source:r,destination:o,sourceCtokenTokenAccount:t.sourceCtokenAta,sourceSplTokenAccount:t.sourceSplAta,destinationCtokenTokenAccount:c.destinationCtokenTokenAccount,destinationSplTokenAccount:c.destinationSplTokenAccount,mint:i,tokenProgram:a,remainingAccounts:s,payer:d,sourceCompressedTokenAccounts:u,compressedProofArgs:p,compressibleConfig:Dh,splInterfacePda:c.requireSplInterface?t.splInterfacePda:void 0,rentSponsor:c.requireRentSponsor?Ph:void 0,splInterfacePdaArgs:c.requireSplInterface?gill.some(m):gill.none()}}async function kh(e,n,r){if(!e)return false;let{value:o}=await $e(n,r);return !o}async function Wh(e,n,r,o,t,c){let i=t-r-o;if(i<=0)return [];let s=(await ye().getCompressedTokenAccountsByOwner(new web3_js.PublicKey(e),{mint:new web3_js.PublicKey(n)})).items.filter(u=>!!u.compressedAccount.data?.data.length&&u.compressedAccount.owner.toString()===Vr.toString()&&!u.parsed.amount.isZero());return s.length===0?[]:compressedToken.selectMinCompressedTokenAccountsForDecompression(s,new fh__default.default(i),c?3:4,{treeType:stateless_js.TreeType.StateV2}).selectedAccounts}async function Lh(e,n,r,o){if(!e)return null;let{address:t}=await oe(n,r);return (await de([{address:t,type:"Settings"}],o))[0]??null}function Oh(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 x5({signers:e,payer:n,changeConfigArgs:r}){let{settings:o,configActions:t,compressed:c,packedAccounts:i,proof:a,settingsMutArgs:s}=r,d=ue(e),u=[],p=[];for(let x of d)if(x instanceof _){let M=p.length,{domainConfig:R,verifyArgs:U,signature:W,publicKey:k,message:ee}=ie(x,M);if(ee&&W&&k&&p.push({message:ee,signature:W,publicKey:k}),R){let se=i.addPreAccounts([{address:R,role:gill.AccountRole.READONLY}]).get(R)?.index;U.__option==="Some"&&se!==void 0&&u.push({__kind:"Secp256r1",fields:[{domainConfigIndex:se,verifyArgs:U.value}]});}}else {let M=i.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]).get(x.address)?.index;M!==void 0&&u.push({__kind:"Ed25519",fields:[M]});}let{remainingAccounts:m,systemOffset:f}=i.toAccountMetas(),S=v(a,f),I=[];if(p.length>0&&I.push(H(p)),c){if(!s)throw new b("Proof args are missing for compressed changeConfig.");I.push(ca({configActions:t,payer:n,compressedProofArgs:S,settingsMutArgs:s,remainingAccounts:m,signers:u}));}else I.push(Qc({settings:o,configActions:t,payer:n,compressedProofArgs:S,remainingAccounts:m,signers:u}));return I}async function M5({createUserArgs:e,payer:n}){let r=new N;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let o=await Ie(),t=await Promise.all(e.map(async u=>{let{address:p,addressTree:m}=await w(u.member.address,o);return {address:p,tree:m,queue:m,type:"User"}})),c=await Z([],t),i=await Se(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:s}=r.toAccountMetas(),d=v(c,s);return await Wa({compressedProofArgs:d,payer:n,createUserArgs:e.map((u,p)=>({member:u.member.address,role:u.role,userCreationArgs:i[p],transactionManagerUrl:u.role===0?u.transactionManagerUrl:null})),remainingAccounts:a})}async function W5({index:e,payer:n,initialMember:r,userAddressTreeIndex:o,cachedAccounts:t}){let c=new N;await c.addSystemAccounts();let i=[],a=[];a.push(...await de([{address:(await w(r.address,o)).address,type:"User"}],t));let s=await Ie(),{address:d,addressTree:u}=await oe(await Ce(e),s);i.push({address:d,queue:u,tree:u,type:"Settings"});let p=a.length,m=await Z(a,i),f=re(c,m.treeInfos.slice(0,p),m.leafIndices.slice(0,p),m.rootIndices.slice(0,p),m.proveByIndices.slice(0,p),a.filter(U=>U.type==="User"),X())[0],I=(await Se(c,m.treeInfos.slice(p),m.roots.slice(p),m.rootIndices.slice(p),i)).find(U=>U.type==="Settings")??null,{remainingAccounts:x,systemOffset:M}=c.toAccountMetas(),R=v(m,M);if(!I)throw new Error("Settings creation args is missing.");return await Aa({settingsIndex:e,payer:n,initialMember:r,userArgs:f.data.role===3?{__kind:"Mutate",fields:[f]}:{__kind:"Read",fields:[f]},compressedProofArgs:R,...I,remainingAccounts:x})}async function z5({settings:e,settingsAddressTreeIndex:n,payer:r,signers:o,cachedAccounts:t}){let{packedAccounts:c,proof:i,settingsMutArgs:a}=await xe(true,e,n,false,t);if(!a)throw new b("Proof args are missing for settings account.");let s=ue(o),{secp256r1VerifyInput:d,transactionSyncSigners:u}=We(s,c),{remainingAccounts:p,systemOffset:m}=c.toAccountMetas(),f=v(i,m),S=[];return d.length>0&&S.push(H(d)),S.push(Ha({settings:e,payer:r,settingsMutArgs:a,compressedProofArgs:f,signers:u,remainingAccounts:p})),S}async function X5({authority:e,domainConfig:n,newAuthority:r,newOrigins:o}){let t=null,c=[];if(r){let i=new N;await i.addSystemAccounts();let a=await Ie(),{address:s,addressTree:d}=await w(r.address,a),u=[{address:s,tree:d,queue:d,type:"User"}],p=await Z([],u),m=(await Se(i,p.treeInfos,p.roots,p.rootIndices,u))[0],f=i.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(p,f.systemOffset),authorityCreationArgs:m};}return Qa({domainConfig:n,authority:e,newOrigins:o?gill.some(o):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function n6({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let o=new N;await o.addSystemAccounts();let t=await de([{address:(await w(e.address,n)).address,type:"User"}]),c=await Z(t,[]),i=re(o,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,X())[0],{remainingAccounts:a,systemOffset:s}=o.toAccountMetas(),d=v(c,s);return oi({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function p6({payer:e,user:n,userAddressTreeIndex:r,newDelegate:o,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:s,publicKey:d}=ie(n),u=[];a&&s&&d&&u.push({message:a,signature:s,publicKey:d});let p=await er(n instanceof _?n:n.address,r,t),m=[];m.push({address:(await w(n instanceof _?n:n.address,r)).address,type:"User"});let f,S=null,I,x=null,M=p.wallets.find(ge=>ge.isDelegate);if(M){let ge=await Ce(M.index);(await Nr(ge,M.settingsAddressTreeIndex,t)).isCompressed?(m.push({address:(await oe(ge,M.settingsAddressTreeIndex)).address,type:"Settings"}),S={start:m.length-1,end:m.length}):f=await Ce(M.index);}if(o){let ge=await Ce(o.index);(await Nr(ge,o.settingsAddressTreeIndex,t)).isCompressed?(m.push({address:(await oe(ge,o.settingsAddressTreeIndex)).address,type:"Settings"}),x={start:m.length-1,end:m.length}):I=await Ce(o.index);}let R=new N;await R.addSystemAccounts();let U=await de(m,t),W=await Z(U,[]),k=re(R,W.treeInfos.slice(0,1),W.leafIndices.slice(0,1),W.rootIndices.slice(0,1),W.proveByIndices.slice(0,1),U.slice(0,1),X())[0],ee=S?gill.some(re(R,W.treeInfos.slice(S.start,S.end),W.leafIndices.slice(S.start,S.end),W.rootIndices.slice(S.start,S.end),W.proveByIndices.slice(S.start,S.end),U.slice(S.start,S.end),j())[0]):gill.none(),se=x?gill.some(re(R,W.treeInfos.slice(x.start,x.end),W.leafIndices.slice(x.start,x.end),W.rootIndices.slice(x.start,x.end),W.proveByIndices.slice(x.start,x.end),U.slice(x.start,x.end),j())[0]):gill.none(),{remainingAccounts:Ee,systemOffset:De}=R.toAccountMetas(),nt=v(W,De),Le=[];return u.length>0&&Le.push(H(u)),Le.push(ui({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:o?gill.some(o):gill.none(),feePayer:e,signer:n instanceof _?void 0:n,oldSettings:f,oldSettingsMutArgs:ee,newSettings:I,newSettingsMutArgs:se,compressedProofArgs:nt,userMutArgs:k,remainingAccounts:Ee})),Le}async function _6({settingsAddressTreeIndex:e,closer:n,transactionBufferAddress:r,payer:o,compressed:t=false,cachedAccounts:c}){let i=await kc(Y(),r),a=i.data.multiWalletSettings,{packedAccounts:s,proof:d,settingsMutArgs:u}=await xe(t,a,e,false,c),{remainingAccounts:p,systemOffset:m}=s.toAccountMetas(),{domainConfig:f,verifyArgs:S,message:I,signature:x,publicKey:M}=ie(n),R=[];if(I&&x&&M&&R.push(H([{message:I,signature:x,publicKey:M}])),t){if(!o||!u)throw new b("Payer not found or proof args are missing for closing buffer.");let U=v(d,m);R.push(ji({transactionBuffer:r,domainConfig:f,closer:n instanceof _?void 0:n,rentCollector:i.data.payer,secp256r1VerifyArgs:S,settingsMutArgs:u,payer:o,compressedProofArgs:U,remainingAccounts:p}));}else R.push(Hi({transactionBuffer:r,domainConfig:f,closer:n instanceof _?void 0:n,settings:a,payer:i.data.payer,secp256r1VerifyArgs:S,remainingAccounts:[]}));return R}function bA({payer:e,creator:n,bufferIndex:r,settings:o,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:s,compressedArgs:d,expectedSigners:u}){let{domainConfig:p,verifyArgs:m,message:f,signature:S,publicKey:I}=ie(n),x=[];if(f&&S&&I&&x.push(H([{message:f,signature:S,publicKey:I}])),d){let{settingsReadonlyArgs:M,compressedProofArgs:R,remainingAccounts:U}=d;x.push(od({transactionBuffer:t,payer:e,secp256r1VerifyArgs:m,creator:n instanceof _?void 0:n,domainConfig:p,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:s,preauthorizeExecution:a,expectedSigners:u},settingsReadonlyArgs:M,compressedProofArgs:R,remainingAccounts:U}));}else x.push(Qi({settings:o,transactionBuffer:t,payer:e,secp256r1VerifyArgs:m,creator:n instanceof _?void 0:n,domainConfig:p,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:s,preauthorizeExecution:a,expectedSigners:u},remainingAccounts:[]}));return x}function _A({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:s}=ie(e),d=[];return a&&i&&s&&d.push(H([{message:a,signature:i,publicKey:s}])),o?d.push(Td({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof _?void 0:e,settingsMutArgs:o.settingsMutArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push(ud({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof _?void 0:e,remainingAccounts:[]})),d}function vA({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:o=false}){return o?Rd({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):Cd({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function UA({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:o}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:s}=ie(n),d=[];return s&&i&&a&&d.push(H([{message:s,signature:i,publicKey:a}])),o?d.push(Hd({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof _?void 0:n,settingsReadonlyArgs:o.settingsReadonlyArgs,payer:o.payer,compressedProofArgs:o.compressedProofArgs,remainingAccounts:o.remainingAccounts})):d.push(Wd({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof _?void 0:n,remainingAccounts:[]})),d}async function SV({settings:e,settingsAddressTreeIndex:n,configActionsArgs:r,cachedAccounts:o,compressed:t=false}){let c=await Hh(r),i=new N,a=null,s=null,d=[];if(c.length||t){let p=await Vh({packedAccounts:i,userAccounts:c,compressed:t,settings:e,settingsAddressTreeIndex:n,cachedAccounts:o});a=p.proof,s=p.settingsMutArgs??null,d=p.userMutArgs??[];}return {configActions:await Fh({configActionsArgs:r,userMutArgs:d}),settings:e,proof:a,settingsMutArgs:s,packedAccounts:i,compressed:t}}async function Hh(e){let n=[];for(let r of e)switch(r.type){case "AddMembers":{let o=await Promise.all(r.members.map(t=>w(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}case "RemoveMembers":{let o=await Promise.all(r.members.map(t=>w(t.member,t.userAddressTreeIndex)));for(let t of o)n.push({address:t.address,type:"User"});break}}return n}async function Vh({packedAccounts:e,userAccounts:n,compressed:r,settings:o,settingsAddressTreeIndex:t,cachedAccounts:c}){await e.addSystemAccounts();let i=[];if(r){let f=(await oe(o,t)).address;i.push({address:f,type:"Settings"});}n.length&&i.push(...n);let a=i.length?await de(i,c):[];if(!a.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let s=await Z(a,[]),d=[],u=[];for(let f of a)f.type==="Settings"?d.push(f):f.type==="User"&&u.push(f);let p,m=[];if(r&&s&&(p=re(e,s.treeInfos.slice(0,1),s.leafIndices.slice(0,1),s.rootIndices.slice(0,1),s.proveByIndices.slice(0,1),d,j())[0]),u.length&&s){let f=r?1:0;m=re(e,s.treeInfos.slice(f),s.leafIndices.slice(f),s.rootIndices.slice(f),s.proveByIndices.slice(f),u,X());}return {proof:s,settingsMutArgs:p,userMutArgs:m}}async function Fh({configActionsArgs:e,userMutArgs:n}){let r=[];for(let o of e)switch(o.type){case "AddMembers":{let t=[];for(let c of o.members){let i=await w(c.member,c.userAddressTreeIndex).then(a=>n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(a.address)))));if(!i)throw new Error("Unable to find user account");t.push(Kh({permissionArgs:c.permissions,userMutArgs:i,pubkey:c.member}));}r.push({__kind:o.type,fields:[t]});break}case "RemoveMembers":{let t=await Promise.all(o.members.map(c=>w(c.member,c.userAddressTreeIndex).then(i=>{let a=n.find(s=>utils_js.equalBytes(s.accountMeta.address,gill.getBase58Encoder().encode(stateless_js.encodeBN254toBase58(i.address))));if(!a)throw new Error("Unable to find user account");return zh({pubkey:c.member,userMutArgs:a})})));r.push({__kind:o.type,fields:[t]});break}case "EditPermissions":{let t=o.members.map(c=>Gh({permissionArgs:c.permissions,pubkey:c.member}));r.push({__kind:o.type,fields:[t]});break}default:r.push({__kind:o.type,fields:[o.threshold]});}return r}function Gh({pubkey:e,permissionArgs:n}){return {memberKey:fe(e),permissions:OA(n)}}function zh({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:fe(e),userArgs:r===3?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function Kh({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:fe(e),permissions:OA(n),userArgs:r.data.role===3?{__kind:"Mutate",fields:[r]}:{__kind:"Read",fields:[r]}}}function OA(e){let n=[];return e.initiate&&n.push(Re.InitiateTransaction),e.vote&&n.push(Re.VoteTransaction),e.execute&&n.push(Re.ExecuteTransaction),ve.fromPermissions(n)}async function MV({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:s,compressed:d=false,additionalVoters:u=[],additionalSigners:p=[],chunkSize:m=Math.ceil(o.length/2),cachedAccounts:f}){let S=Math.floor(Math.random()*255),I=await aA(n,t instanceof _?t:t.address,S),x=[],M=[];for(let te=0;te<o.length;te+=m){let os=o.subarray(te,te+m);x.push(os),M.push(sha2_js.sha256(os));}let R=sha2_js.sha256(o),{settingsReadonlyArgs:U,settingsMutArgs:W,proof:k,packedAccounts:ee}=await xe(d,n,r,false,f),{remainingAccounts:se,systemOffset:Ee}=ee.toAccountMetas(),De=k&&U&&W?{settingsReadonlyArgs:U,settingsMutArgs:W,compressedProofArgs:v(k,Ee),remainingAccounts:se,payer:e}:null,nt=ue([t,...c?[c]:[],...u]).map(te=>({memberKey:fe(te),messageHash:te instanceof _?Go(te.authResponse):null})),Le=bA({finalBufferHash:R,finalBufferSize:o.length,bufferIndex:S,payer:e,transactionBufferAddress:I,settings:n,creator:t,preauthorizeExecution:!c,bufferExtendHashes:M,compressedArgs:De,expectedSigners:nt}),ge=x.map(te=>vA({transactionMessageBytes:te,transactionBufferAddress:I,settings:n,compressed:d})),ot=u.map(te=>UA({voter:te,transactionBufferAddress:I,settings:n,compressedArgs:De})),Kr=_A({compressedArgs:De,settings:n,executor:c,transactionBufferAddress:I}),{instructions:y,addressLookupTableAccounts:rr}=await SA({compressed:d,settings:n,transactionMessageBytes:o,transactionBufferAddress:I,payer:e,additionalSigners:p,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:s}),Oe=te=>({payer:e,instructions:te,addressesByLookupTableAddress:rr});return [Oe(Le),...ge.map(te=>Oe([te])),...ot.length?[Oe(ot.flat())]:[],Oe(Kr),Oe(y)]}var Gr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let o=new Map,t=i=>{let a=o.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},o.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 s=t(a.address);s.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,s.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,o)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,d])=>d.isSigner&&d.isWritable),o=n.filter(([,d])=>d.isSigner&&!d.isWritable),t=n.filter(([,d])=>!d.isSigner&&d.isWritable),c=n.filter(([,d])=>!d.isSigner&&!d.isWritable),i={numSignerAccounts:r.length+o.length,numReadonlySignerAccounts:o.length,numReadonlyNonSignerAccounts:c.length};if(r.length===0)throw new Error("Expected at least one writable signer key");let[a]=r[0];if(a!==this.payer)throw new Error("Expected first writable signer key to be the fee payer");let s=[...r.map(([d])=>d),...o.map(([d])=>d),...t.map(([d])=>d),...c.map(([d])=>d)];return [i,s]}extractTableLookup(n){let[r,o]=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:o,readonly:c}}}drainKeysFoundInLookupTable(n,r){let o=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,s=n.findIndex(d=>d===a);if(s>=0){if(s>=256)throw new Error("Max lookup table index exceeded");o.push(s),t.push(a),this.keyMetaMap.delete(c);}}return [o,t]}};var zr=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 o=new Map;this.keySegments().flat().forEach((c,i)=>{o.set(c,i);});let t=c=>{let i=o.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 NA({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:o}){let t=Gr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(o??{});for(let m of a){let f=t.extractTableLookup(m);if(f!==void 0){let{addressTableLookup:S,drainedKeys:I}=f;c.push({readonlyIndexes:S.readonlyIndexes,readableIndices:S.readonlyIndexes,writableIndexes:S.writableIndexes,writableIndices:S.writableIndexes,lookupTableAddress:gill.address(S.lookupTableAddress)}),i.writable.push(...I.writable),i.readonly.push(...I.readonly);}}let[s,d]=t.getMessageComponents(),p=new zr(d,i).compileInstructions(r);return {version:0,header:s,instructions:p,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function HV({instructions:e,payer:n,addressesByLookupTableAddress:r}){let o=NA({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return new Uint8Array(Su(o))}async function KV({payer:e,settings:n,settingsAddressTreeIndex:r,transactionMessageBytes:o,signers:t,additionalSigners:c,secp256r1VerifyInput:i,addressesByLookupTableAddress:a,cachedAccounts:s,compressed:d=false,simulateProof:u=false}){let{instructions:p,addressLookupTableAccounts:m}=await xA({settings:n,settingsAddressTreeIndex:r,payer:e,signers:t,additionalSigners:c,transactionMessageBytes:o,secp256r1VerifyInput:i,compressed:d,addressesByLookupTableAddress:a,simulateProof:u,cachedAccounts:s});return {payer:e,instructions:p,addressesByLookupTableAddress:m}}exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Fc;exports.AccountState=jr;exports.AdditionalSignersSchema=wD;exports.AuthenticationContextSchema=lu;exports.BaseResponseSchema=Tu;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=na;exports.CHANGE_CONFIG_DISCRIMINATOR=Yc;exports.CREATE_COMPRESSED_WALLET_DISCRIMINATOR=da;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Sa;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Da;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ra;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Ua;exports.CompleteMessageRequestSchema=LN;exports.CompleteSendTransactionRequestSchema=BN;exports.CompleteTransactionRequestSchema=ON;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Ba;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=Ga;exports.DOMAIN_CONFIG_DISCRIMINATOR=ss;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=Za;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=ti;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=ai;exports.GLOBAL_COUNTER_DISCRIMINATOR=As;exports.KeyType=jt;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=LE;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=AE;exports.MULTI_WALLET_ERROR__CLOCK_SYSVAR_ACCESS_FAILED=MD;exports.MULTI_WALLET_ERROR__CREDENTIAL_ID_IS_MISSING=tD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=nD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=oD;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_KEY_MISMATCH=PD;exports.MULTI_WALLET_ERROR__DUPLICATE_ADDRESS_TREE=OD;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=mE;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=pE;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=PE;exports.MULTI_WALLET_ERROR__EMPTY_SLOT_NUMBERS=uD;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=CE;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=gE;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=xE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=zE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=KE;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=jE;exports.MULTI_WALLET_ERROR__HASH_COMPUTATION_FAILED=dD;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=NE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=OE;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=BE;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=_E;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT_INDEX=DD;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=aD;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=EE;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=UE;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=GE;exports.MULTI_WALLET_ERROR__INVALID_MEMBER_KEY_FORMAT=AD;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=wE;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=bE;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=yE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=sE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=iE;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=oE;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=aE;exports.MULTI_WALLET_ERROR__INVALID_SLOT_NUMBER=eD;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=QE;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=ME;exports.MULTI_WALLET_ERROR__INVALID_TOKEN_SOURCE_TYPE=ID;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=IE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=SE;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=RE;exports.MULTI_WALLET_ERROR__INVALID_USER_ED25519_CONFIG=_D;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=vE;exports.MULTI_WALLET_ERROR__INVALID_USER_TRANSACTION_MANAGER_CONFIG=bD;exports.MULTI_WALLET_ERROR__LIGHT_CPI_ACCOUNT_ERROR=xD;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=dE;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=ZE;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=sD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND=mD;exports.MULTI_WALLET_ERROR__MEMBER_NOT_FOUND_IN_SETTINGS=ED;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=kE;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_PROOF_ARGS=gD;exports.MULTI_WALLET_ERROR__MISSING_COMPRESSED_TOKEN_ACCOUNT=yD;exports.MULTI_WALLET_ERROR__MISSING_DESTINATION_TOKEN_ACCOUNT=vD;exports.MULTI_WALLET_ERROR__MISSING_INSTRUCTIONS_SYSVAR=SD;exports.MULTI_WALLET_ERROR__MISSING_LIGHT_CPI_ACCOUNTS=pD;exports.MULTI_WALLET_ERROR__MISSING_MUTATION_USER_ARGS=WE;exports.MULTI_WALLET_ERROR__MISSING_NEW_AUTHORITY=WD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_ACCOUNT_FOR_DELEGATE=kD;exports.MULTI_WALLET_ERROR__MISSING_SETTINGS_DATA=iD;exports.MULTI_WALLET_ERROR__MISSING_SOURCE_TOKEN_ACCOUNT=UD;exports.MULTI_WALLET_ERROR__MISSING_SPL_INTERFACE_PDA=fD;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=XE;exports.MULTI_WALLET_ERROR__MISSING_USER_ACCOUNT_ADDRESS=hD;exports.MULTI_WALLET_ERROR__MISSING_WHITELISTED_ADDRESS_TREES=LD;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=VE;exports.MULTI_WALLET_ERROR__ONLY_ONE_ADMINISTRATOR_ALLOWED=DE;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=TE;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=fE;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=cD;exports.MULTI_WALLET_ERROR__PAYER_MISMATCH=TD;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=lE;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=YE;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=uE;exports.MULTI_WALLET_ERROR__SETTINGS_KEY_MISMATCH=lD;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=cE;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=$E;exports.MULTI_WALLET_ERROR__SOURCE_ACCOUNT_MISMATCH=CD;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=hE;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=qE;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=JE;exports.MULTI_WALLET_ERROR__TRANSPORTS_IS_MISSING=rD;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=FE;exports.MULTI_WALLET_ERROR__UNAUTHORIZED_ADMIN_ONLY=RD;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=HE;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=tE;exports.MultiWalletInstruction=rE;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=yi;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=gi;exports.Permission=Re;exports.Permissions=ve;exports.SETTINGS_DISCRIMINATOR=Dc;exports.Secp256r1Key=Ue;exports.SignedSecp256r1Key=_;exports.StartMessageRequestSchema=pu;exports.StartTransactionRequestSchema=mu;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Ui;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=hi;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Gi;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Bi;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=td;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=Yi;exports.TRANSACTION_BUFFER_DISCRIMINATOR=_c;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=pd;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=ad;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Pd;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Sd;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Bd;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=vd;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=Yd;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Gd;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=au;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=tu;exports.TransactionActionTypeSchema=gu;exports.TransactionDetailsSchema=HD;exports.TransactionPayloadSchema=WN;exports.TransactionPayloadWithBase64MessageBytesSchema=ND;exports.Transports=po;exports.UserInfoSchema=BD;exports.UserRole=_e;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Oc;exports.addWhitelistedAddressTrees=MN;exports.base64URLStringToBuffer=me;exports.bufferToBase64URLString=bw;exports.changeConfig=x5;exports.closeTransactionBuffer=_6;exports.configAction=rR;exports.convertBase64StringToJWK=Uw;exports.convertJWKToBase64String=vw;exports.convertMemberKeyToString=AA;exports.convertPubkeyCompressedToCose=Ew;exports.convertPubkeyCoseToCompressed=Cw;exports.createClientAuthorizationCompleteRequestChallenge=hw;exports.createClientAuthorizationStartRequestChallenge=Pw;exports.createDomainConfig=B8;exports.createDomainUserAccounts=J8;exports.createGlobalCounter=Q8;exports.createMessageChallenge=Mw;exports.createTransactionBuffer=bA;exports.createTransactionChallenge=Rw;exports.createTransactionManagerSigner=eh;exports.createUserAccounts=M5;exports.createWallet=W5;exports.decodeDomainConfig=as;exports.decodeGlobalCounter=ps;exports.decodeSettings=Pc;exports.decodeTransactionBuffer=Uc;exports.decodeWhitelistedAddressTree=Nc;exports.decompressSettingsAccount=z5;exports.deserializeConfigActions=I8;exports.disableDomainConfig=rH;exports.editDomainConfig=X5;exports.editTransactionManagerUrl=n6;exports.editUserDelegate=p6;exports.executeTransaction=SA;exports.executeTransactionBuffer=_A;exports.executeTransactionSync=xA;exports.extendTransactionBuffer=vA;exports.extensionStruct=xR;exports.fetchAllDomainConfig=Zh;exports.fetchAllGlobalCounter=nM;exports.fetchAllMaybeDomainConfig=QA;exports.fetchAllMaybeGlobalCounter=mg;exports.fetchAllMaybeSettings=c1;exports.fetchAllMaybeTransactionBuffer=h1;exports.fetchAllMaybeWhitelistedAddressTree=j1;exports.fetchAllSettings=jv;exports.fetchAllSettingsAccountByMember=M2;exports.fetchAllTransactionBuffer=Qv;exports.fetchAllWhitelistedAddressTree=nU;exports.fetchDomainConfig=is;exports.fetchGlobalCounter=rM;exports.fetchMaybeDomainConfig=XA;exports.fetchMaybeGlobalCounter=pg;exports.fetchMaybeSettings=mo;exports.fetchMaybeSettingsAccountData=kP;exports.fetchMaybeTransactionBuffer=P1;exports.fetchMaybeUserAccountData=UP;exports.fetchMaybeWhitelistedAddressTree=K1;exports.fetchSettings=Kv;exports.fetchSettingsAccountData=Nr;exports.fetchTransactionBuffer=kc;exports.fetchUserAccountByFilters=h2;exports.fetchUserAccountData=er;exports.fetchWhitelistedAddressTree=wc;exports.getAccountStateCodec=aM;exports.getAccountStateDecoder=Jr;exports.getAccountStateEncoder=qr;exports.getAddMemberArgsCodec=mM;exports.getAddMemberArgsDecoder=Qr;exports.getAddMemberArgsEncoder=Xr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=xU;exports.getAddWhitelistedAddressTreesInstruction=CU;exports.getAddWhitelistedAddressTreesInstructionAsync=zc;exports.getAddWhitelistedAddressTreesInstructionDataCodec=IU;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Gc;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Co;exports.getAdditionalMetadataCodec=uM;exports.getAdditionalMetadataDecoder=Zr;exports.getAdditionalMetadataEncoder=Yr;exports.getChangeConfigCompressedDiscriminatorBytes=wU;exports.getChangeConfigCompressedInstruction=ca;exports.getChangeConfigCompressedInstructionDataCodec=HU;exports.getChangeConfigCompressedInstructionDataDecoder=sa;exports.getChangeConfigCompressedInstructionDataEncoder=oa;exports.getChangeConfigDiscriminatorBytes=_U;exports.getChangeConfigInstruction=Qc;exports.getChangeConfigInstructionDataCodec=vU;exports.getChangeConfigInstructionDataDecoder=Xc;exports.getChangeConfigInstructionDataEncoder=Zc;exports.getClientAndDeviceHash=Fo;exports.getCompiledInstructionCodec=yM;exports.getCompiledInstructionDecoder=en;exports.getCompiledInstructionEncoder=$r;exports.getCompressedAccountMetaCodec=IM;exports.getCompressedAccountMetaDecoder=lt;exports.getCompressedAccountMetaEncoder=mt;exports.getCompressedAccountMetaReadOnlyCodec=PM;exports.getCompressedAccountMetaReadOnlyDecoder=St;exports.getCompressedAccountMetaReadOnlyEncoder=ft;exports.getCompressedOnlyExtensionCodec=RM;exports.getCompressedOnlyExtensionDecoder=rn;exports.getCompressedOnlyExtensionEncoder=tn;exports.getCompressedProofCodec=vM;exports.getCompressedProofDecoder=dn;exports.getCompressedProofEncoder=an;exports.getCompressedSettingsAddress=oe;exports.getCompressedSettingsCodec=LM;exports.getCompressedSettingsDataCodec=wM;exports.getCompressedSettingsDataDecoder=An;exports.getCompressedSettingsDataEncoder=un;exports.getCompressedSettingsDecoder=j;exports.getCompressedSettingsEncoder=xt;exports.getCompressedTokenArgsCodec=GM;exports.getCompressedTokenArgsDecoder=Dt;exports.getCompressedTokenArgsEncoder=Et;exports.getCompressibleExtensionCodec=qM;exports.getCompressibleExtensionDecoder=fn;exports.getCompressibleExtensionEncoder=yn;exports.getCompressionInfoCodec=XM;exports.getCompressionInfoDecoder=xn;exports.getCompressionInfoEncoder=Sn;exports.getConfigActionCodec=tR;exports.getConfigActionDecoder=Fe;exports.getConfigActionEncoder=Ve;exports.getCreateCompressedWalletDiscriminatorBytes=JU;exports.getCreateCompressedWalletInstruction=ZU;exports.getCreateCompressedWalletInstructionAsync=Aa;exports.getCreateCompressedWalletInstructionDataCodec=YU;exports.getCreateCompressedWalletInstructionDataDecoder=ua;exports.getCreateCompressedWalletInstructionDataEncoder=Eo;exports.getCreateDomainConfigDiscriminatorBytes=ok;exports.getCreateDomainConfigInstruction=ck;exports.getCreateDomainConfigInstructionAsync=Ia;exports.getCreateDomainConfigInstructionDataCodec=sk;exports.getCreateDomainConfigInstructionDataDecoder=xa;exports.getCreateDomainConfigInstructionDataEncoder=Po;exports.getCreateDomainUserAccountDiscriminatorBytes=mk;exports.getCreateDomainUserAccountInstruction=Tk;exports.getCreateDomainUserAccountInstructionAsync=ha;exports.getCreateDomainUserAccountInstructionDataCodec=lk;exports.getCreateDomainUserAccountInstructionDataDecoder=Pa;exports.getCreateDomainUserAccountInstructionDataEncoder=ho;exports.getCreateGlobalCounterDiscriminatorBytes=Ek;exports.getCreateGlobalCounterInstruction=Pk;exports.getCreateGlobalCounterInstructionAsync=_a;exports.getCreateGlobalCounterInstructionDataCodec=Dk;exports.getCreateGlobalCounterInstructionDataDecoder=ba;exports.getCreateGlobalCounterInstructionDataEncoder=Ro;exports.getCreateUserAccountArgsCodec=aR;exports.getCreateUserAccountArgsDecoder=Un;exports.getCreateUserAccountArgsEncoder=vn;exports.getCreateUserAccountsDiscriminatorBytes=kk;exports.getCreateUserAccountsInstruction=Lk;exports.getCreateUserAccountsInstructionAsync=Wa;exports.getCreateUserAccountsInstructionDataCodec=Wk;exports.getCreateUserAccountsInstructionDataDecoder=ka;exports.getCreateUserAccountsInstructionDataEncoder=_o;exports.getDecompressSettingsAccountDiscriminatorBytes=Gk;exports.getDecompressSettingsAccountInstruction=Ha;exports.getDecompressSettingsAccountInstructionDataCodec=zk;exports.getDecompressSettingsAccountInstructionDataDecoder=wa;exports.getDecompressSettingsAccountInstructionDataEncoder=Na;exports.getDisableDomainConfigDiscriminatorBytes=Xk;exports.getDisableDomainConfigInstruction=ja;exports.getDisableDomainConfigInstructionDataCodec=Qk;exports.getDisableDomainConfigInstructionDataDecoder=Ka;exports.getDisableDomainConfigInstructionDataEncoder=za;exports.getDomainConfigAddress=at;exports.getDomainConfigCodec=Yh;exports.getDomainConfigDecoder=cs;exports.getDomainConfigDiscriminatorBytes=Jh;exports.getDomainConfigEncoder=ZA;exports.getDomainConfigSize=Xh;exports.getEditDomainConfigDiscriminatorBytes=cW;exports.getEditDomainConfigInstruction=Qa;exports.getEditDomainConfigInstructionAsync=iW;exports.getEditDomainConfigInstructionDataCodec=aW;exports.getEditDomainConfigInstructionDataDecoder=Xa;exports.getEditDomainConfigInstructionDataEncoder=Uo;exports.getEditMemberArgsCodec=AR;exports.getEditMemberArgsDecoder=Rn;exports.getEditMemberArgsEncoder=Mn;exports.getEditTransactionManagerUrlDiscriminatorBytes=TW;exports.getEditTransactionManagerUrlInstruction=oi;exports.getEditTransactionManagerUrlInstructionDataCodec=yW;exports.getEditTransactionManagerUrlInstructionDataDecoder=ni;exports.getEditTransactionManagerUrlInstructionDataEncoder=ri;exports.getEditUserDelegateDiscriminatorBytes=PW;exports.getEditUserDelegateInstruction=ui;exports.getEditUserDelegateInstructionDataCodec=hW;exports.getEditUserDelegateInstructionDataDecoder=di;exports.getEditUserDelegateInstructionDataEncoder=ii;exports.getExpectedSignerCodec=lR;exports.getExpectedSignerDecoder=Mt;exports.getExpectedSignerEncoder=ht;exports.getExtensionStructCodec=SR;exports.getExtensionStructDecoder=Pt;exports.getExtensionStructEncoder=gn;exports.getGlobalCounterAddress=cA;exports.getGlobalCounterCodec=tM;exports.getGlobalCounterDecoder=gs;exports.getGlobalCounterDiscriminatorBytes=eM;exports.getGlobalCounterEncoder=gg;exports.getGlobalCounterSize=oM;exports.getJitoTipsConfig=Vo;exports.getLightCpiSigner=H2;exports.getLightProtocolRpc=ye;exports.getLinkWalletArgsCodec=PR;exports.getLinkWalletArgsDecoder=zn;exports.getLinkWalletArgsEncoder=Gn;exports.getMemberCodec=bR;exports.getMemberDecoder=Ct;exports.getMemberEncoder=It;exports.getMemberKeyCodec=UR;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=V;exports.getMultiWalletErrorMessage=lN;exports.getNativeTransferIntentCompressedDiscriminatorBytes=zW;exports.getNativeTransferIntentCompressedInstruction=xi;exports.getNativeTransferIntentCompressedInstructionDataCodec=KW;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Si;exports.getNativeTransferIntentCompressedInstructionDataEncoder=fi;exports.getNativeTransferIntentDiscriminatorBytes=WW;exports.getNativeTransferIntentInstruction=mi;exports.getNativeTransferIntentInstructionAsync=OW;exports.getNativeTransferIntentInstructionDataCodec=LW;exports.getNativeTransferIntentInstructionDataDecoder=pi;exports.getNativeTransferIntentInstructionDataEncoder=ko;exports.getNewAuthorityArgsCodec=OR;exports.getNewAuthorityArgsDecoder=Jn;exports.getNewAuthorityArgsEncoder=qn;exports.getOriginIndex=_w;exports.getPackedAddressTreeInfoCodec=wR;exports.getPackedAddressTreeInfoDecoder=vt;exports.getPackedAddressTreeInfoEncoder=_t;exports.getPackedMerkleContextCodec=FR;exports.getPackedMerkleContextDecoder=mn;exports.getPackedMerkleContextEncoder=pn;exports.getPackedStateTreeInfoCodec=KR;exports.getPackedStateTreeInfoDecoder=yt;exports.getPackedStateTreeInfoEncoder=Tt;exports.getPausableAccountExtensionCodec=JR;exports.getPausableAccountExtensionDecoder=Wn;exports.getPausableAccountExtensionEncoder=kn;exports.getPermanentDelegateAccountExtensionCodec=XR;exports.getPermanentDelegateAccountExtensionDecoder=On;exports.getPermanentDelegateAccountExtensionEncoder=Ln;exports.getPermissionsCodec=eb;exports.getPermissionsDecoder=Ne;exports.getPermissionsEncoder=Be;exports.getProofArgsCodec=ob;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=ib;exports.getRemoveMemberArgsDecoder=_n;exports.getRemoveMemberArgsEncoder=bn;exports.getRentConfigCodec=Ab;exports.getRentConfigDecoder=Dn;exports.getRentConfigEncoder=En;exports.getSecp256r1MessageHash=Go;exports.getSecp256r1PubkeyCodec=mb;exports.getSecp256r1PubkeyDecoder=Ut;exports.getSecp256r1PubkeyEncoder=Xn;exports.getSecp256r1SignatureOffsetsDataDecoder=mh;exports.getSecp256r1SignatureOffsetsDataEncoder=ph;exports.getSecp256r1VerifyArgsCodec=yb;exports.getSecp256r1VerifyArgsDecoder=G;exports.getSecp256r1VerifyArgsEncoder=F;exports.getSecp256r1VerifyArgsWithDomainConfigIndexCodec=Ib;exports.getSecp256r1VerifyArgsWithDomainConfigIndexDecoder=$n;exports.getSecp256r1VerifyArgsWithDomainConfigIndexEncoder=Qn;exports.getSecp256r1VerifyInstruction=H;exports.getSecp256r1VerifyInstructionDataCodec=lH;exports.getSecp256r1VerifyInstructionDataDecoder=yA;exports.getSecp256r1VerifyInstructionDataEncoder=fA;exports.getSendAndConfirmTransaction=Pu;exports.getSettingsCodec=zv;exports.getSettingsDecoder=Sr;exports.getSettingsDiscriminatorBytes=Gv;exports.getSettingsEncoder=s1;exports.getSettingsFromIndex=Ce;exports.getSettingsIndexWithAddressAndDelegateInfoCodec=Mb;exports.getSettingsIndexWithAddressAndDelegateInfoDecoder=no;exports.getSettingsIndexWithAddressAndDelegateInfoEncoder=ro;exports.getSettingsIndexWithAddressCodec=Db;exports.getSettingsIndexWithAddressDecoder=to;exports.getSettingsIndexWithAddressEncoder=eo;exports.getSettingsMutArgsCodec=vb;exports.getSettingsMutArgsDecoder=K;exports.getSettingsMutArgsEncoder=z;exports.getSettingsReadonlyArgsCodec=Lb;exports.getSettingsReadonlyArgsDecoder=Wt;exports.getSettingsReadonlyArgsEncoder=kt;exports.getSignedSecp256r1Key=Dw;exports.getSignedTransactionManager=S8;exports.getSolanaRpc=Y;exports.getSolanaRpcEndpoint=Du;exports.getSplInterfacePdaArgsCodec=Nb;exports.getSplInterfacePdaArgsDecoder=Ot;exports.getSplInterfacePdaArgsEncoder=Lt;exports.getTokenMetadataCodec=Fb;exports.getTokenMetadataDecoder=Nn;exports.getTokenMetadataEncoder=Bn;exports.getTokenTransferIntentCompressedDiscriminatorBytes=dL;exports.getTokenTransferIntentCompressedInstruction=Wi;exports.getTokenTransferIntentCompressedInstructionAsync=AL;exports.getTokenTransferIntentCompressedInstructionDataCodec=uL;exports.getTokenTransferIntentCompressedInstructionDataDecoder=ki;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Lo;exports.getTokenTransferIntentDiscriminatorBytes=$W;exports.getTokenTransferIntentInstruction=Ri;exports.getTokenTransferIntentInstructionAsync=tL;exports.getTokenTransferIntentInstructionDataCodec=eL;exports.getTokenTransferIntentInstructionDataDecoder=Mi;exports.getTokenTransferIntentInstructionDataEncoder=Wo;exports.getTransactionBufferAddress=aA;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=RL;exports.getTransactionBufferCloseCompressedInstruction=ji;exports.getTransactionBufferCloseCompressedInstructionDataCodec=bL;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=Ki;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=zi;exports.getTransactionBufferCloseDiscriminatorBytes=SL;exports.getTransactionBufferCloseInstruction=Hi;exports.getTransactionBufferCloseInstructionDataCodec=xL;exports.getTransactionBufferCloseInstructionDataDecoder=wi;exports.getTransactionBufferCloseInstructionDataEncoder=Ni;exports.getTransactionBufferCodec=Xv;exports.getTransactionBufferCreateArgsCodec=jb;exports.getTransactionBufferCreateArgsDecoder=Nt;exports.getTransactionBufferCreateArgsEncoder=Bt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=jL;exports.getTransactionBufferCreateCompressedInstruction=od;exports.getTransactionBufferCreateCompressedInstructionDataCodec=qL;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=nd;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=rd;exports.getTransactionBufferCreateDiscriminatorBytes=BL;exports.getTransactionBufferCreateInstruction=Qi;exports.getTransactionBufferCreateInstructionDataCodec=NL;exports.getTransactionBufferCreateInstructionDataDecoder=Xi;exports.getTransactionBufferCreateInstructionDataEncoder=Zi;exports.getTransactionBufferDecoder=vc;exports.getTransactionBufferDiscriminatorBytes=Zv;exports.getTransactionBufferEncoder=D1;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=uO;exports.getTransactionBufferExecuteCompressedInstruction=Td;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=AO;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=ld;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=md;exports.getTransactionBufferExecuteDiscriminatorBytes=tO;exports.getTransactionBufferExecuteInstruction=ud;exports.getTransactionBufferExecuteInstructionDataCodec=rO;exports.getTransactionBufferExecuteInstructionDataDecoder=dd;exports.getTransactionBufferExecuteInstructionDataEncoder=id;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=hO;exports.getTransactionBufferExtendCompressedInstruction=Rd;exports.getTransactionBufferExtendCompressedInstructionDataCodec=MO;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Md;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=hd;exports.getTransactionBufferExtendDiscriminatorBytes=fO;exports.getTransactionBufferExtendInstruction=Cd;exports.getTransactionBufferExtendInstructionDataCodec=SO;exports.getTransactionBufferExtendInstructionDataDecoder=Id;exports.getTransactionBufferExtendInstructionDataEncoder=xd;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=zO;exports.getTransactionBufferVoteCompressedInstruction=Hd;exports.getTransactionBufferVoteCompressedInstructionDataCodec=KO;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=wd;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Nd;exports.getTransactionBufferVoteDiscriminatorBytes=LO;exports.getTransactionBufferVoteInstruction=Wd;exports.getTransactionBufferVoteInstructionDataCodec=OO;exports.getTransactionBufferVoteInstructionDataDecoder=kd;exports.getTransactionBufferVoteInstructionDataEncoder=Ud;exports.getTransactionExecuteCompressedDiscriminatorBytes=cB;exports.getTransactionExecuteCompressedInstruction=Qd;exports.getTransactionExecuteCompressedInstructionDataCodec=aB;exports.getTransactionExecuteCompressedInstructionDataDecoder=Xd;exports.getTransactionExecuteCompressedInstructionDataEncoder=Zd;exports.getTransactionExecuteDiscriminatorBytes=QO;exports.getTransactionExecuteInstruction=jd;exports.getTransactionExecuteInstructionDataCodec=$O;exports.getTransactionExecuteInstructionDataDecoder=Kd;exports.getTransactionExecuteInstructionDataEncoder=zd;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=DB;exports.getTransactionExecuteSyncCompressedInstruction=uu;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=PB;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=du;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=iu;exports.getTransactionExecuteSyncDiscriminatorBytes=lB;exports.getTransactionExecuteSyncInstruction=ou;exports.getTransactionExecuteSyncInstructionDataCodec=TB;exports.getTransactionExecuteSyncInstructionDataDecoder=nu;exports.getTransactionExecuteSyncInstructionDataEncoder=ru;exports.getTransactionMessageAddressTableLookupCodec=$b;exports.getTransactionMessageAddressTableLookupDecoder=go;exports.getTransactionMessageAddressTableLookupEncoder=Ao;exports.getTransactionMessageCodec=Zb;exports.getTransactionMessageDecoder=Ht;exports.getTransactionMessageEncoder=wt;exports.getTransactionSyncSignersCodec=n_;exports.getTransactionSyncSignersDecoder=J;exports.getTransactionSyncSignersEncoder=q;exports.getTransferFeeAccountExtensionCodec=i_;exports.getTransferFeeAccountExtensionDecoder=Hn;exports.getTransferFeeAccountExtensionEncoder=wn;exports.getTransferHookAccountExtensionCodec=A_;exports.getTransferHookAccountExtensionDecoder=Fn;exports.getTransferHookAccountExtensionEncoder=Vn;exports.getTransportsCodec=m_;exports.getTransportsDecoder=Ft;exports.getTransportsEncoder=Vt;exports.getUserAccountAddress=w;exports.getUserCodec=f_;exports.getUserCreationArgsCodec=C_;exports.getUserCreationArgsDecoder=he;exports.getUserCreationArgsEncoder=Pe;exports.getUserDecoder=X;exports.getUserEncoder=Gt;exports.getUserMutArgsCodec=h_;exports.getUserMutArgsDecoder=Ze;exports.getUserMutArgsEncoder=Ye;exports.getUserReadOnlyArgsCodec=__;exports.getUserReadOnlyArgsDecoder=bt;exports.getUserReadOnlyArgsEncoder=Rt;exports.getUserReadOnlyOrMutateArgsCodec=W_;exports.getUserReadOnlyOrMutateArgsDecoder=He;exports.getUserReadOnlyOrMutateArgsEncoder=we;exports.getUserRoleCodec=w_;exports.getUserRoleDecoder=ze;exports.getUserRoleEncoder=Ge;exports.getWalletAddressFromIndex=w2;exports.getWalletAddressFromSettings=be;exports.getWhitelistedAddressTreeCodec=rU;exports.getWhitelistedAddressTreeDecoder=Bc;exports.getWhitelistedAddressTreeDiscriminatorBytes=tU;exports.getWhitelistedAddressTreeEncoder=z1;exports.getWhitelistedAddressTreeFromIndex=Yo;exports.getWhitelistedAddressTreeIndexFromAddress=R2;exports.getWhitelistedAddressTreesAddress=tA;exports.identifyMultiWalletAccount=iN;exports.identifyMultiWalletInstruction=dN;exports.initialize=aw;exports.isConfigAction=nR;exports.isExtensionStruct=IR;exports.isMultiWalletError=TN;exports.isTransactionSyncSigners=s_;exports.isUserReadOnlyOrMutateArgs=O_;exports.nativeTransferIntent=KH;exports.parseAddWhitelistedAddressTreesInstruction=EU;exports.parseChangeConfigCompressedInstruction=VU;exports.parseChangeConfigInstruction=UU;exports.parseCreateCompressedWalletInstruction=XU;exports.parseCreateDomainConfigInstruction=ak;exports.parseCreateDomainUserAccountInstruction=yk;exports.parseCreateGlobalCounterInstruction=hk;exports.parseCreateUserAccountsInstruction=Ok;exports.parseDecompressSettingsAccountInstruction=Kk;exports.parseDisableDomainConfigInstruction=$k;exports.parseEditDomainConfigInstruction=dW;exports.parseEditTransactionManagerUrlInstruction=fW;exports.parseEditUserDelegateInstruction=MW;exports.parseNativeTransferIntentCompressedInstruction=jW;exports.parseNativeTransferIntentInstruction=BW;exports.parseSecp256r1VerifyInstruction=TH;exports.parseTokenTransferIntentCompressedInstruction=gL;exports.parseTokenTransferIntentInstruction=rL;exports.parseTransactionBufferCloseCompressedInstruction=_L;exports.parseTransactionBufferCloseInstruction=IL;exports.parseTransactionBufferCreateCompressedInstruction=JL;exports.parseTransactionBufferCreateInstruction=wL;exports.parseTransactionBufferExecuteCompressedInstruction=gO;exports.parseTransactionBufferExecuteInstruction=nO;exports.parseTransactionBufferExtendCompressedInstruction=RO;exports.parseTransactionBufferExtendInstruction=xO;exports.parseTransactionBufferVoteCompressedInstruction=jO;exports.parseTransactionBufferVoteInstruction=BO;exports.parseTransactionExecuteCompressedInstruction=iB;exports.parseTransactionExecuteInstruction=eB;exports.parseTransactionExecuteSyncCompressedInstruction=hB;exports.parseTransactionExecuteSyncInstruction=yB;exports.pollJitoBundleConfirmation=Z2;exports.prepareChangeConfigArgs=SV;exports.prepareTransactionBundle=MV;exports.prepareTransactionMessage=HV;exports.prepareTransactionSync=KV;exports.retrieveTransactionManager=f8;exports.sendJitoBundle=BP;exports.serializeConfigActions=x8;exports.signAndSendBundledTransactions=Y2;exports.signAndSendTransaction=n8;exports.tokenTransferIntent=i5;exports.transactionSyncSigners=o_;exports.userReadOnlyOrMutateArgs=L_;exports.vaultTransactionMessageDeserialize=xu;exports.vaultTransactionMessageSerialize=Su;exports.voteTransactionBuffer=UA;//# sourceMappingURL=index.cjs.map
|
|
4
4
|
//# sourceMappingURL=index.cjs.map
|