@revibase/core 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -14
- package/dist/index.d.ts +56 -14
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var gill=require('gill'),yr=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha256=require('@noble/hashes/sha256'),web3_js=require('@solana/web3.js'),programs=require('gill/programs'),superstruct=require('superstruct'),tinyCbor=require('@levischuck/tiny-cbor'),p256=require('@noble/curves/p256'),utils=require('@noble/curves/utils'),sha2=require('@noble/hashes/sha2'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var yr__default=/*#__PURE__*/_interopDefault(yr);var Gn=new Uint8Array([201,232,212,229,59,241,106,197]);function GC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gn)}function ru(){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:Gn}))}function Fn(){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 FC(){return gill.combineCodec(ru(),Fn())}function zn(e){return gill.decodeAccount(e,Fn())}async function Kn(e,n,r){let s=await nu(e,n,r);return gill.assertAccountExists(s),s}async function nu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return zn(s)}async function zC(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=>zn(t))}function KC(){return 846}var qn=new Uint8Array([42,206,176,58,175,129,130,233]);function qC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(qn)}function fu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:qn}))}function Yn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function YC(){return gill.combineCodec(fu(),Yn())}function Zn(e){return gill.decodeAccount(e,Yn())}async function ZC(e,n,r){let s=await Su(e,n,r);return gill.assertAccountExists(s),s}async function Su(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Zn(s)}async function XC(e,n,r){let s=await xu(e,n,r);return gill.assertAccountsExist(s),s}async function xu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Zn(t))}function $C(){return 24}function Sr(){return gill.getStructEncoder([["memberKey",J()],["permissions",be()],["verifyArgs",gill.getOptionEncoder(B())],["userArgs",et()],["delegateOperation",Re()]])}function xr(){return gill.getStructDecoder([["memberKey",j()],["permissions",_e()],["verifyArgs",gill.getOptionDecoder(w())],["userArgs",tt()],["delegateOperation",ve()]])}function rD(){return gill.combineCodec(Sr(),xr())}function Ir(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Cr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function oD(){return gill.combineCodec(Ir(),Cr())}function rt(){return gill.getStructEncoder([["treeInfo",st()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function nt(){return gill.getStructDecoder([["treeInfo",ot()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function dD(){return gill.combineCodec(rt(),nt())}function ct(){return gill.getStructEncoder([["treeInfo",st()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function at(){return gill.getStructDecoder([["treeInfo",ot()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function yD(){return gill.combineCodec(ct(),at())}function Pr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Rr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function TD(){return gill.combineCodec(Pr(),Rr())}function it(){return gill.getStructEncoder([["data",gill.getOptionEncoder(dt())]])}function q(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ut())]])}function xD(){return gill.combineCodec(it(),q())}function dt(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(At())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ut(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(gt())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function MD(){return gill.combineCodec(dt(),ut())}function yt(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(_r())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Sr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Wr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function pt(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Ur())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(xr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Lr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function RD(){return gill.combineCodec(yt(),pt())}function vD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function bD(e,n){return n.__kind===e}function Or(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Ue()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Ae()]])}function Br(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",We()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",ge()]])}function LD(){return gill.combineCodec(Or(),Br())}var Kt=(s=>(s[s.Add=0]="Add",s[s.Remove=1]="Remove",s[s.Ignore=2]="Ignore",s))(Kt||{});function Re(){return gill.getEnumEncoder(Kt)}function ve(){return gill.getEnumDecoder(Kt)}function wD(){return gill.combineCodec(Re(),ve())}function _r(){return gill.getStructEncoder([["memberKey",J()],["permissions",be()],["userArgs",gill.getOptionEncoder(ye())],["delegateOperation",Re()]])}function Ur(){return gill.getStructDecoder([["memberKey",j()],["permissions",_e()],["userArgs",gill.getOptionDecoder(pe())],["delegateOperation",ve()]])}function VD(){return gill.combineCodec(_r(),Ur())}function mt(){return gill.getStructEncoder([["memberKey",J()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Tt(){return gill.getStructDecoder([["memberKey",j()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function KD(){return gill.combineCodec(mt(),Tt())}function wr(){return gill.getStructEncoder([["settingsMutArgs",fe()],["transactionManager",gill.getOptionEncoder(ye())]])}function kr(){return gill.getStructDecoder([["settingsMutArgs",Se()],["transactionManager",gill.getOptionDecoder(pe())]])}function YD(){return gill.combineCodec(wr(),kr())}function At(){return gill.getStructEncoder([["pubkey",J()],["permissions",be()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()]])}function gt(){return gill.getStructDecoder([["pubkey",j()],["permissions",_e()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()]])}function QD(){return gill.combineCodec(At(),gt())}function J(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function j(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function rM(){return gill.combineCodec(J(),j())}function Nr(){return gill.getStructEncoder([["authorityCreationArgs",Ae()],["compressedProofArgs",M()]])}function Hr(){return gill.getStructDecoder([["authorityCreationArgs",ge()],["compressedProofArgs",E()]])}function cM(){return gill.combineCodec(Nr(),Hr())}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 dM(){return gill.combineCodec(lt(),ft())}function st(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function ot(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function gM(){return gill.combineCodec(st(),ot())}function be(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function _e(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function mM(){return gill.combineCodec(be(),_e())}function M(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Pr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Rr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function SM(){return gill.combineCodec(M(),E())}function Wr(){return gill.getStructEncoder([["memberKey",J()],["userArgs",et()]])}function Lr(){return gill.getStructDecoder([["memberKey",j()],["userArgs",tt()]])}function DM(){return gill.combineCodec(Wr(),Lr())}function Vr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function St(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function hM(){return gill.combineCodec(Vr(),St())}function B(){return gill.getStructEncoder([["signedMessageIndex",gill.getU8Encoder()],["slotNumber",gill.getU64Encoder()],["originIndex",gill.getU8Encoder()],["crossOrigin",gill.getBooleanEncoder()],["truncatedClientDataJson",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["requestedClientAndDeviceHash",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())],["requestedClientAndDeviceHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function vM(){return gill.combineCodec(B(),w())}function Y(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",B()]])}function Z(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",w()]])}function WM(){return gill.combineCodec(Y(),Z())}function xt(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function It(){return gill.getStructDecoder([["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()]])}function wM(){return gill.combineCodec(xt(),It())}function Gr(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Fr(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function HM(){return gill.combineCodec(Gr(),Fr())}function fe(){return gill.getStructEncoder([["accountMeta",rt()],["data",it()]])}function Se(){return gill.getStructDecoder([["accountMeta",nt()],["data",q()]])}function zM(){return gill.combineCodec(fe(),Se())}function Q(){return gill.getStructEncoder([["accountMeta",ct()],["data",it()]])}function ee(){return gill.getStructDecoder([["accountMeta",at()],["data",q()]])}function qM(){return gill.combineCodec(Q(),ee())}function Ct(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(mt()))]])}function Dt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(Tt()))]])}function $M(){return gill.combineCodec(Ct(),Dt())}function Mt(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(Ir())],["addressTableLookups",gill.getArrayEncoder(zr())]])}function Et(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(Cr())],["addressTableLookups",gill.getArrayDecoder(Kr())]])}function rE(){return gill.combineCodec(Mt(),Et())}function zr(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Kr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function oE(){return gill.combineCodec(zr(),Kr())}function Le(){return gill.getStructEncoder([["member",J()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",Ue()],["delegatedTo",gill.getOptionEncoder(Gr())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function X(){return gill.getStructDecoder([["member",j()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",We()],["delegatedTo",gill.getOptionDecoder(Fr())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function dE(){return gill.combineCodec(Le(),X())}function Ae(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ge(){return gill.getStructDecoder([["addressTreeInfo",ft()],["outputStateTreeIndex",gill.getU8Decoder()]])}function yE(){return gill.combineCodec(Ae(),ge())}function ye(){return gill.getStructEncoder([["accountMeta",rt()],["data",Le()]])}function pe(){return gill.getStructDecoder([["accountMeta",nt()],["data",X()]])}function lE(){return gill.combineCodec(ye(),pe())}function qr(){return gill.getStructEncoder([["accountMeta",ct()],["data",Le()]])}function Yr(){return gill.getStructDecoder([["accountMeta",at()],["data",X()]])}function IE(){return gill.combineCodec(qr(),Yr())}function et(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([qr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([ye()])]])]])}function tt(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Yr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([pe()])]])]])}function EE(){return gill.combineCodec(et(),tt())}function hE(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function PE(e,n){return n.__kind===e}var He=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(He||{});function Ue(){return gill.getEnumEncoder(He)}function We(){return gill.getEnumDecoder(He)}function bE(){return gill.combineCodec(Ue(),We())}var Ws=new Uint8Array([223,179,163,190,177,224,67,173]);function fh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ws)}function Wy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(At(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),7)]]),e=>({...e,discriminator:Ws}))}function Ls(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(gt(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),7)]])}function Sh(){return gill.combineCodec(Wy(),Ls())}function Os(e){return gill.decodeAccount(e,Ls())}async function xh(e,n,r){let s=await $r(e,n,r);return gill.assertAccountExists(s),s}async function $r(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Os(s)}async function Ih(e,n,r){let s=await Ly(e,n,r);return gill.assertAccountsExist(s),s}async function Ly(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Os(t))}function Ch(){return 184}var Hs=new Uint8Array([90,36,35,219,93,225,110,96]);function hh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hs)}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",J()],["executor",J()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(J())],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(mt()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Hs}))}function Vs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",j()],["executor",j()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(j())],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(Tt()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Ph(){return gill.combineCodec(ep(),Vs())}function Gs(e){return gill.decodeAccount(e,Vs())}async function Fs(e,n,r){let s=await tp(e,n,r);return gill.assertAccountExists(s),s}async function tp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gs(s)}async function Rh(e,n,r){let s=await rp(e,n,r);return gill.assertAccountsExist(s),s}async function rp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gs(t))}var Js=new Uint8Array([105,23,173,2,197,255,80,87]);function _h(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Js)}function xp(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Js}))}function js(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function Uh(){return gill.combineCodec(xp(),js())}function qs(e){return gill.decodeAccount(e,js())}async function Ys(e,n,r){let s=await Ip(e,n,r);return gill.assertAccountExists(s),s}async function Ip(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return qs(s)}async function Wh(e,n,r){let s=await Cp(e,n,r);return gill.assertAccountsExist(s),s}async function Cp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>qs(t))}function p({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 Xs(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function G(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:G(r.value),role:Zs(r.value)?gill.upgradeRoleToSigner(s):s,...Zs(r.value)?{signer:r.value}:{}})}}function Zs(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Qs=new Uint8Array([7]);function Zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Qs)}function cn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Qs}))}function eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function Xh(){return gill.combineCodec(cn(),eo())}async function to(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}},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=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:cn().encode(c),programAddress:r})}function $h(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}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:cn().encode(c),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:eo().decode(e.data)}}var oo=new Uint8Array([8]);function cP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(oo)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(yt())],["compressedProofArgs",gill.getOptionEncoder(M())]]),e=>({...e,discriminator:oo}))}function co(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(pt())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function aP(){return gill.combineCodec(an(),co())}async function ao(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.settings.value||(t.settings.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getU128Encoder().encode(Xs(c.settingsIndex))]})),t.authority.value||(t.authority.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(G(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:an().encode(c),programAddress:r})}function iP(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:an().encode(c),programAddress:r})}function dP(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:co().decode(e.data)}}var Ao=new Uint8Array([19]);function TP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ao)}function go(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(yt())],["settingsMut",fe()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ao}))}function yo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(pt())],["settingsMut",Se()],["compressedProofArgs",E()]])}function lP(){return gill.combineCodec(go(),yo())}function po(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:go().encode(c),programAddress:r})}function fP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:yo().decode(e.data)}}var lo=new Uint8Array([16]);function EP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lo)}function fo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",fe()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:lo}))}function So(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["settingsMutArgs",Se()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function hP(){return gill.combineCodec(fo(),So())}function xo(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:fo().encode(c),programAddress:r})}function PP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:So().decode(e.data)}}var Ro=new Uint8Array([0]);function LP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function un(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",Ae()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ro}))}function vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",ge()],["compressedProofArgs",E()]])}function OP(){return gill.combineCodec(un(),vo())}async function bo(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}},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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:un().encode(c),programAddress:r})}function BP(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}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:un().encode(c),programAddress:r})}function wP(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:vo().decode(e.data)}}var Uo=new Uint8Array([4]);function zP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Uo)}function gn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["member",Vr()],["role",Ue()],["userAccountCreationArgs",Ae()],["linkWalletArgs",gill.getOptionEncoder(wr())]]),e=>({...e,discriminator:Uo}))}function Wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",St()],["role",We()],["userAccountCreationArgs",ge()],["linkWalletArgs",gill.getOptionDecoder(kr())]])}function KP(){return gill.combineCodec(gn(),Wo())}async function Lo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:gn().encode(c),programAddress:r})}function JP(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:gn().encode(c),programAddress:r})}function jP(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:Wo().decode(e.data)}}var Bo=new Uint8Array([3]);function QP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bo)}function pn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Bo}))}function wo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function eR(){return gill.combineCodec(pn(),wo())}async function ko(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:pn().encode({}),programAddress:r})}function tR(e,n){let r=n?.programAddress??u,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:pn().encode({}),programAddress:r})}function rR(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:wo().decode(e.data)}}var Vo=new Uint8Array([18]);function dR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vo)}function mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["compressedProofArgs",M()],["settingsCreation",xt()],["userMutArgs",ye()],["settingsIndex",gill.getU128Encoder()],["delegateOperation",Re()]]),e=>({...e,discriminator:Vo}))}function Go(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["compressedProofArgs",E()],["settingsCreation",It()],["userMutArgs",pe()],["settingsIndex",gill.getU128Decoder()],["delegateOperation",ve()]])}function uR(){return gill.combineCodec(mn(),Go())}async function Fo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:mn().encode(c),programAddress:r})}function AR(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},initialMember:{value:e.initialMember??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:mn().encode(c),programAddress:r})}function gR(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r(),whitelistedAddressTrees:r()},data:Go().decode(e.data)}}var Ko=new Uint8Array([5]);function SR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ko)}function ln(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayEncoder(Or())]]),e=>({...e,discriminator:Ko}))}function Jo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(Br())]])}function xR(){return gill.combineCodec(ln(),Jo())}async function jo(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:ln().encode(c),programAddress:r})}function IR(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:ln().encode(c),programAddress:r})}function CR(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:Jo().decode(e.data)}}var Zo=new Uint8Array([17]);function vR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zo)}function Xo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",fe()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Zo}))}function $o(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",Se()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function bR(){return gill.combineCodec(Xo(),$o())}function Qo(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Xo().encode(c),programAddress:r})}function _R(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:$o().decode(e.data)}}var rc=new Uint8Array([2]);function wR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(rc)}function nc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:rc}))}function sc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function kR(){return gill.combineCodec(nc(),sc())}function oc(e,n){let r=n?.programAddress??u,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:nc().encode(c),programAddress:r})}function NR(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:sc().decode(e.data)}}var dc=new Uint8Array([1]);function JR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(dc)}function Sn(){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(Nr())]]),e=>({...e,discriminator:dc}))}function uc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Hr())]])}function jR(){return gill.combineCodec(Sn(),uc())}async function qR(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}},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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Sn().encode(c),programAddress:r})}function Ac(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}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:Sn().encode(c),programAddress:r})}function YR(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:uc().decode(e.data)}}var pc=new Uint8Array([6]);function rv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pc)}function mc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",ye()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",M()]]),e=>({...e,discriminator:pc}))}function Tc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",pe()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function nv(){return gill.combineCodec(mc(),Tc())}function lc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:false}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:mc().encode(c),programAddress:r})}function sv(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:Tc().decode(e.data)}}var xc=new Uint8Array([32]);function Av(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xc)}function Ic(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",dt()],["compressedProofArgs",M()],["settingsCreationArgs",xt()]]),e=>({...e,discriminator:xc}))}function Cc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ut()],["compressedProofArgs",E()],["settingsCreationArgs",It()]])}function gv(){return gill.combineCodec(Ic(),Cc())}function Dc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:Ic().encode(c),programAddress:r})}function yv(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:Cc().decode(e.data)}}var hc=new Uint8Array([31]);function xv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(hc)}function Pc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Le()],["compressedProofArgs",M()],["userCreationArgs",Ae()]]),e=>({...e,discriminator:hc}))}function Rc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",X()],["compressedProofArgs",E()],["userCreationArgs",ge()]])}function Iv(){return gill.combineCodec(Pc(),Rc())}function vc(e,n){let r=n?.programAddress??u,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:Pc().encode(c),programAddress:r})}function Cv(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:Rc().decode(e.data)}}var _c=new Uint8Array([29]);function vv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(_c)}function xn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:_c}))}function Uc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function bv(){return gill.combineCodec(xn(),Uc())}async function _v(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(G(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:xn().encode(c),programAddress:r})}function Wc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:xn().encode(c),programAddress:r})}function Uv(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:Uc().decode(e.data)}}var Bc=new Uint8Array([27]);function Nv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bc)}function wc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Bc}))}function kc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function Hv(){return gill.combineCodec(wc(),kc())}function Nc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:wc().encode(c),programAddress:r})}function Vv(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:kc().decode(e.data)}}var Vc=new Uint8Array([30]);function qv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vc)}function Cn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Vc}))}function Gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function Yv(){return gill.combineCodec(Cn(),Gc())}async function Zv(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(G(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(G(t.source.value)),gill.getAddressEncoder().encode(G(t.tokenProgram.value)),gill.getAddressEncoder().encode(G(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(G(t.destination.value)),gill.getAddressEncoder().encode(G(t.tokenProgram.value)),gill.getAddressEncoder().encode(G(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Cn().encode(c),programAddress:r})}function Fc(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Cn().encode(c),programAddress:r})}function Xv(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Gc().decode(e.data)}}var jc=new Uint8Array([28]);function sb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(jc)}function Dn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:jc}))}function qc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function ob(){return gill.combineCodec(Dn(),qc())}async function cb(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(G(t.source.value)),gill.getAddressEncoder().encode(G(t.tokenProgram.value)),gill.getAddressEncoder().encode(G(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(G(t.destination.value)),gill.getAddressEncoder().encode(G(t.tokenProgram.value)),gill.getAddressEncoder().encode(G(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Dn().encode(c),programAddress:r})}function Yc(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Dn().encode(c),programAddress:r})}function ab(e){if(e.accounts.length<11)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:qc().decode(e.data)}}var $c=new Uint8Array([12]);function pb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($c)}function Qc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:$c}))}function ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function mb(){return gill.combineCodec(Qc(),ea())}function ta(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Qc().encode(c),programAddress:r})}function Tb(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:ea().decode(e.data)}}var sa=new Uint8Array([23]);function Db(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(sa)}function oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:sa}))}function ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function Mb(){return gill.combineCodec(oa(),ca())}function aa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:oa().encode(c),programAddress:r})}function Eb(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:ca().decode(e.data)}}var ua=new Uint8Array([9]);function Ub(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ua)}function Aa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:ua}))}function ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Wb(){return gill.combineCodec(Aa(),ga())}function ya(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:Aa().encode(c),programAddress:r})}function Lb(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:ga().decode(e.data)}}var Ta=new Uint8Array([20]);function Vb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ta)}function la(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Ct()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ta}))}function fa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function Gb(){return gill.combineCodec(la(),fa())}function Sa(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:la().encode(c),programAddress:r})}function Fb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:fa().decode(e.data)}}var Ca=new Uint8Array([13]);function Zb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function Da(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:Ca}))}function Ma(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Xb(){return gill.combineCodec(Da(),Ma())}function Ea(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Da().encode(c),programAddress:r})}function $b(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ma().decode(e.data)}}var Ra=new Uint8Array([24]);function o_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ra)}function va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ra}))}function ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function c_(){return gill.combineCodec(va(),ba())}function _a(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:va().encode(c),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:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:ba().decode(e.data)}}var La=new Uint8Array([11]);function y_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(La)}function Oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:La}))}function Ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function p_(){return gill.combineCodec(Oa(),Ba())}function wa(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:Oa().encode(c),programAddress:r})}function m_(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:Ba().decode(e.data)}}var Ha=new Uint8Array([22]);function I_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ha)}function Va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ha}))}function Ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function C_(){return gill.combineCodec(Va(),Ga())}function Fa(e,n){let r=n?.programAddress??u,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Va().encode(c),programAddress:r})}function D_(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:Ga().decode(e.data)}}var Ja=new Uint8Array([10]);function b_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function ja(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:Ja}))}function qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function __(){return gill.combineCodec(ja(),qa())}function Ya(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ja().encode(c),programAddress:r})}function U_(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:qa().decode(e.data)}}var $a=new Uint8Array([21]);function N_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($a)}function Qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:$a}))}function ei(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function H_(){return gill.combineCodec(Qa(),ei())}function ti(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Qa().encode(c),programAddress:r})}function V_(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:ei().decode(e.data)}}var si=new Uint8Array([14]);function j_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(si)}function oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:si}))}function ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function q_(){return gill.combineCodec(oi(),ci())}function ai(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=p({}),a=m(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:oi().encode({}),programAddress:r})}function Y_(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:ci().decode(e.data)}}var ui=new Uint8Array([25]);function tU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ui)}function Ai(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ui}))}function gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function rU(){return gill.combineCodec(Ai(),gi())}function yi(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:Ai().encode(c),programAddress:r})}function nU(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:gi().decode(e.data)}}var Ti=new Uint8Array([15]);function uU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ti)}function li(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())]]),e=>({...e,discriminator:Ti}))}function fi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())]])}function AU(){return gill.combineCodec(li(),fi())}function Si(e,n){let r=n?.programAddress??u,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:li().encode(c),programAddress:r})}function gU(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:fi().decode(e.data)}}var Ci=new Uint8Array([26]);function SU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ci)}function Di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Mt()],["secp256r1VerifyArgs",gill.getArrayEncoder(Y())],["settingsReadonlyArgs",Q()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ci}))}function Mi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayDecoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",E()]])}function xU(){return gill.combineCodec(Di(),Mi())}function Ei(e,n){let r=n?.programAddress??u,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Di().encode(c),programAddress:r})}function IU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===u?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Mi().decode(e.data)}}var u="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",qS=(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))(qS||{});function oW(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 YS=(l=>(l[l.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",l[l.ChangeConfig=1]="ChangeConfig",l[l.ChangeConfigCompressed=2]="ChangeConfigCompressed",l[l.CompressSettingsAccount=3]="CompressSettingsAccount",l[l.CreateDomainConfig=4]="CreateDomainConfig",l[l.CreateDomainUserAccount=5]="CreateDomainUserAccount",l[l.CreateGlobalCounter=6]="CreateGlobalCounter",l[l.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",l[l.CreateUserAccounts=8]="CreateUserAccounts",l[l.DecompressSettingsAccount=9]="DecompressSettingsAccount",l[l.DisableDomainConfig=10]="DisableDomainConfig",l[l.EditDomainConfig=11]="EditDomainConfig",l[l.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",l[l.MigrateCompressedSettings=13]="MigrateCompressedSettings",l[l.MigrateCompressedUsers=14]="MigrateCompressedUsers",l[l.NativeTransferIntent=15]="NativeTransferIntent",l[l.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",l[l.TokenTransferIntent=17]="TokenTransferIntent",l[l.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",l[l.TransactionBufferClose=19]="TransactionBufferClose",l[l.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",l[l.TransactionBufferCreate=21]="TransactionBufferCreate",l[l.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",l[l.TransactionBufferExecute=23]="TransactionBufferExecute",l[l.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",l[l.TransactionBufferExtend=25]="TransactionBufferExtend",l[l.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",l[l.TransactionBufferVote=27]="TransactionBufferVote",l[l.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",l[l.TransactionExecute=29]="TransactionExecute",l[l.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",l[l.TransactionExecuteSync=31]="TransactionExecuteSync",l[l.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",l))(YS||{});function cW(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var XS=6e3,$S=6001,QS=6002,ex=6003,tx=6004,rx=6005,nx=6006,sx=6007,ox=6008,cx=6009,ax=6010,ix=6011,dx=6012,ux=6013,Ax=6014,gx=6015,yx=6016,px=6017,mx=6018,Tx=6019,lx=6020,fx=6021,Sx=6022,xx=6023,Ix=6024,Cx=6025,Dx=6026,Mx=6027,Ex=6028,hx=6029,Px=6030,Rx=6031,vx=6032,bx=6033,_x=6034,Ux=6035,Wx=6036,Lx=6037,Ox=6038,Bx=6039,wx=6040,kx=6041,Nx=6042,Hx=6043,Vx=6044,Gx=6045,Fx=6046,zx=6047,Kx=6048,Jx=6049,jx=6050,qx=6051,hi;process.env.NODE_ENV!=="production"&&(hi={[hx]:"This member is already delegated to another wallet.",[sx]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[zx]:"The domain configuration account is disabled. Please contact support or try again later.",[Kx]:"Missing domain configuration account.",[ax]:"Duplicate public keys detected among members. Each member must have a unique key.",[cx]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[Tx]:"No members provided. A multisig wallet must contain at least one member.",[px]:"Expected a User with Administrator role for this instruction.",[ox]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[gx]:"Expected a User with Transaction Manager role for this instruction.",[Lx]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Ox]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Bx]:"Declared buffer size does not match the actual serialized size.",[vx]:"Not enough members with vote permission to meet the approval threshold.",[Px]:"At least one signer with execute permission is required to proceed.",[Rx]:"At least one signer with initiate permission is required to perform this action.",[Ix]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[qx]:"Address Tree supplied is not part of the whitelisted address trees",[mx]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[Dx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Wx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[xx]:"Unexpected number of accounts provided for this instruction.",[$S]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[tx]:"The extracted public key has an invalid length or encoding.",[XS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[ex]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Gx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[fx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[yx]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[Ax]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[Sx]:"Malformed transaction message: structure or formatting does not match the expected layout.",[Cx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[rx]:"The extracted WebAuthn signed message payload is malformed.",[Hx]:"An input string exceeds the maximum allowed character length.",[Jx]:"This member is not registered under the provided domain configuration.",[Mx]:"A required account is missing from the instruction context.",[Vx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[Ex]:"User mutation arguments are required when performing add or remove delegate operations.",[_x]:"No valid signer found in this transaction.",[dx]:"Only one permanent member is allowed per wallet.",[ux]:"Only one transaction manager is allowed per wallet.",[jx]:"The given origin index is not in the whitelisted origins.",[ix]:"Permanent members cannot be removed from a wallet.",[Nx]:"Writable CPI calls to protected accounts are not permitted.",[nx]:"The rpIdHash extracted from the signed message does not match the expected value.",[QS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Fx]:"The specified slot number was not found in the provided slot history.",[lx]:"Too many members: a maximum of 4 members are supported.",[wx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[kx]:"This transaction has not yet reached the required approval threshold.",[Ux]:"Only the transaction creator or rent payer may close this transaction buffer.",[bx]:"Member is not part of the expected signers for this transaction."});function gW(e){return process.env.NODE_ENV!=="production"?hi[e]:"Error message not available in production bundles."}function yW(e,n,r){return gill.isProgramError(e,n,u,r)}var bt={Ed25519:1,Secp256r1:2};var xe={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Me=class e{constructor(n){this.mask=n;}static fromPermissions(n){return new e(n.reduce((r,s)=>r|s,0))}static all(){return new e(Object.values(xe).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var hn=33,ie=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==hn)throw new Error(`Invalid public key length, expected ${hn} 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===hn)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()}},I=class extends ie{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;requestedClientAndDeviceHash;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.requestedClientAndDeviceHash=r.requestedClientAndDeviceHash;}};function Xx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function $x(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ri=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Xx())],["addressTableLookups",gill.getArrayCodec($x())]]);function vi(e){return Ri.encode({numSigners:e.header.numSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,accountKeys:e.staticAccounts,instructions:e.instructions.map(r=>({programAddressIndex:r.programAddressIndex,accountIndices:r.accountIndices??[],data:Array.from(r.data??[])})),addressTableLookups:e.version!=="legacy"?e.addressTableLookups?.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes,writableIndexes:r.writableIndexes}))??[]:[]})}function bi(e){let n=Ri.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:u,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var _i="revibase.com",Ui="https://auth.revibase.com",Wi="https://api.revibase.com";async function vn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await te().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((s.unitsConsumed??0)*1.1)||8e5;return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function Bi(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function wi(e,n){if(e.length===0)throw new Error("Bundle is empty.");for(let c=0;c<e.length;c++){if(e[c].length>1644)throw new Error(`Transaction ${c} exceeds maximum length, ${e[c].length}. Retry again.`);console.log(`Transaction ${c} length: ${e[c].length}`);}let r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})});if(!r.ok)throw console.error(await r.json()),new Error("Failed to simulate bundle");let{result:s,error:t}=await r.json();if(!s||t)throw console.error(t??s),new Error(`Unable to simulate bundle: ${JSON.stringify(t??s)}`);if(typeof s.value.summary!="string"&&s.value.summary.failed){let{TransactionFailure:c}=s.value.summary.failed.error,[,i]=c;throw console.error(t??s),new Error(`Simulation failed: ${i}`)}return s.value.transactionResults.map(c=>c.unitsConsumed)}function H(e,n=0){let r=e instanceof I?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,requestedClientAndDeviceHash:r.requestedClientAndDeviceHash}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs?.clientDataJson?new Uint8Array([...r.authData,...sha256.sha256(r.verifyArgs.clientDataJson)]):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function Ge(e){if(e instanceof ie)return {keyType:bt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:bt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function Oi(e){return e instanceof I?e.toString():e.address.toString()}function de(e){let n=new Set,r=[];for(let s of e)n.has(Oi(s))||(r.push(s),n.add(Oi(s)));if(r.filter(s=>s instanceof I).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function ki({payer:e,tipAmount:n}){let r=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],s=r[Math.floor(Math.random()*r.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(s),amount:n})}async function Ni(e){let n=await fetch(`${e}/getRandomPayer`),{randomPayer:r}=await n.json();return {address:gill.address(r),async signTransactions(s){let t={publicKey:r,transactions:s.map(a=>gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)))},i=await(await fetch(`${e}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(a=>({[gill.address(r)]:gill.getBase58Encoder().encode(a)}))}}}var Fe=null,er=null,tr=null,rr=null,nr,Qt=null,bn=null,sr=null,_n=null,Un=null,Hi=null;function ze(){if(!Fe)throw new Error("Rpc is not initialized yet.");return Fe}function Ke(){if(!er)throw new Error("Rpc is not initialized yet");return er}function te(){if(!tr)throw new Error("Rpc is not initialized yet");return tr}function Vi(){if(!rr)throw new Error("Rpc is not initialized yet.");return rr}function Gi(){if(!nr)throw new Error("Rpc is not initialized yet");return nr}async function rL(){return Qt||(Qt=await Ni(bn??Wi)),Qt}function Wn(){if(!sr)throw new Error("Jito Bundle Config is not set.");return sr}function he(){return _n??Ui}function Fi(){return Un??_i}function or(){return Hi}function nL(){er=null,tr=null,Fe=null,Qt=null,bn=null,sr=null,_n=null,Un=null,rr=null,nr=null;}function sL({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,rpId:i,additionalInfo:a}){Fe=e,er=stateless_js.createRpc(Fe,r,n);let{rpc:o,sendAndConfirmTransaction:d}=gill.createSolanaClient({urlOrMoniker:Fe});rr=d,nr=programs.estimateComputeUnitLimitFactory({rpc:o}),tr=o,bn=t??null,sr=s??null,_n=c??null,Un=i??null,Hi=a??null;}var _=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(u.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=ze().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ke().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function cr(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await stateless_js.rpcRequest(Ke().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),t;if(stateless_js.featureFlags.isV2()?t=superstruct.create(s,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):t=superstruct.create(s,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in t)throw new web3_js.SolanaJSONRPCError(t.error,`failed to get info for compressed account ${e?e.toString():""}`);if(t.result.value===null)return null;let c=stateless_js.featureFlags.isV2()?t.result.value.merkleContext.tree:t.result.value.tree,i=ze().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ke().getStateTreeInfos(),a=stateless_js.getStateTreeInfoByPubkey(i,c),o=t.result.value,d=stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(a,o.hash,o.leafIndex),o.owner,stateless_js.bn(o.lamports),o.data?stateless_js.parseAccountData(o.data):void 0,o.address||void 0);return d&&n?.set(e.toString(),d),d}}async function ce(e,n){let s=(await Promise.all(e.map(async t=>cr(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new Error("Unable to find compressed account.");return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function v(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function ne(e,n,r,s,t){if(t.length===0)return [];let c=t.map((d,A)=>({treeInfo:n[A],root:r[A],rootIndex:s[A],address:d.address.toArray()})),{addressTrees:i}=e.packTreeInfos([],c),a=await e.getOutputTreeIndex();return t.map((d,A)=>({addressTreeInfo:i[A],outputStateTreeIndex:a,address:d.address,type:d.type}))}function se(e,n,r,s,t,c,i){let a=[];for(let A=0;A<n.length;A++)a.push({treeInfo:n[A],rootIndex:s[A],leafIndex:r[A],proveByIndex:t[A],hash:c[A].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new Error("Unable to parsed data.");return c.map((A,g)=>({data:i.decode(A.data.data),accountMeta:{treeInfo:o.packedTreeInfos[g],address:new Uint8Array(A.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function me(e,n,r,s,t){let c=null,i=null,a=new _;if(e){await a.addSystemAccounts();let{address:o}=await $(n,r),d=(await ce([{address:o,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await k([d],[]);let A=a.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!A)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:A.packedTreeInfos[0]},data:q().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:a}}async function k(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Ke().getValidityProofV0(e,n)}catch(c){if(console.error(`Attempt ${t}, Get Validity Proof failed. ${c}`),t++,t>=r)throw new Error(`Failed to get validity proof after ${r} attempts: ${c}`);await new Promise(i=>setTimeout(i,s));}throw new Error(`Failed to get validity proof after ${r} attempts`)}async function Te(){return (await ar()).length-1}var Ln;async function ar(){if(!Ln){let{data:e}=await Ys(te(),await Zi());Ln=e.whitelistedAddressTrees;}return Ln}async function Xi(e,n,r){let s=await NI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function NI(e,n,r){let{address:s}=await U(e,n),t=await cr(s,r);return t?.data?.data?X().decode(t.data.data):null}async function $i(e,n,r){let s=await HI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function HI(e,n,r){try{let{address:s}=await $(e,n),t=await cr(s,r);if(!t?.data?.data)return null;let c=q().decode(t.data.data);return c.data.__option==="None"?null:{...c.data.value,isCompressed:!0}}catch{let s=await $r(te(),await re(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function On(e){let n=await ar();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function ir(e){let r=(await ar()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function $(e,n=0){let r=await On(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function U(e,n=0){let r=await On(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof ie?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(u.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function je({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha256.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new Error("RpId not found.");if(!e)throw new Error("RpIdHash not found.");let[r]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function nd(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Zi(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function sd(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof ie?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ie(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 re(e){let[n]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function od(e){let n=await re(e);return await Ie(n)}async function BL(){let[e]=await gill.getProgramDerivedAddress({programAddress:u,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}var qe=null,ad=2e3,id=3e3,FI=300*1e3;async function ur({authUrl:e,additionalInfo:n,signer:r,popUp:s=null,data:t}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");return new Promise((c,i)=>{let a=new URL(e).origin,o=null,d=setInterval(()=>{s&&s.closed&&(g(),i(new Error("User closed the authentication window")));},500),A=setTimeout(()=>{y("Authentication timeout."),g(),i(new Error("Authentication timed out"));},FI);function g(){clearInterval(d),clearTimeout(A),o&&clearTimeout(o),qe&&window.removeEventListener("message",qe),s&&s.close();}if(s?s.location.replace(e):s=gd(e),!s){i(new Error("Disable your popup blocker to continue."));return}function y(...T){n?.debug&&console.debug("[Popup]",...T);}let f=T=>{let C=T.origin===a,D=T.source===s;if(!C||!D||!T.isTrusted||!s){y("Ignored message from unknown source",T);return}switch(T.data.type){case "popup-ready":y("Popup is ready, sending auth data"),s.postMessage({type:"popup-init",payload:{signer:r?.toString(),data:t,additionalInfo:n}},a),o=setTimeout(()=>{g(),i(new Error("User closed the authentication window"));},ad+id);break;case "popup-complete":y("Received completion message");try{let b=JSON.parse(T.data.payload);g(),c(b);}catch{i(new Error("Failed to parse response payload"));}break;case "popup-heartbeat":y("Received heartbeat"),o&&(clearTimeout(o),o=setTimeout(()=>{g(),i(new Error("User closed the authentication window"));},ad+id));break;case "popup-closed":y("Popup explicitly closed"),g(),i(new Error("User closed the authentication window"));break;default:y("Unknown message type",T.data.type);}};qe&&window.removeEventListener("message",qe),qe=f,window.addEventListener("message",qe);})}function Ar(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ce(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return c}function gr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function zI(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 dd(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 ud(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function Ad(e){if(e.length===64)return e;if(e[0]!==48)throw new Error("Invalid DER sequence");let n=e[1],r=2;if(n>128){let b=n&127;r+=b;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,A=o[0]===0&&o.length>32?o.slice(1):o;if(d.length>32||A.length>32)throw new Error("r or s length > 32 bytes");let g=new Uint8Array(32);g.set(d,32-d.length);let y=p256.p256.Point.CURVE().n>>1n,f=BigInt("0x"+gr(A)),C=(f>y?p256.p256.Point.CURVE().n-f:f).toString(16).padStart(64,"0"),D=zI(C);return new Uint8Array([...g,...D])}function gd(e=`${he()}/loading`){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let n=window.innerWidth||screen.availWidth,r=window.innerHeight||screen.availHeight,s=n<=768,t,c,i,a;if(s)t=n,c=r,i=0,a=0;else {let A=window.screenLeft??window.screenX,g=window.screenTop??window.screenY,y=window.innerWidth??document.documentElement.clientWidth??screen.width,f=window.innerHeight??document.documentElement.clientHeight??screen.height;t=500,c=600,a=A+(y-t)/2,i=g+(f-c)/2;}let o=[`width=${t}`,`height=${c}`,`top=${i}`,`left=${a}`,"toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes"].join(","),d=window.open(e,"_blank",o);return d&&d.focus(),d}function tO(e){let n=tinyCbor.decodeCBOR(e),r=p256.p256.Point.fromAffine({x:BigInt("0x"+gr(n.get(-2))),y:BigInt("0x"+gr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Td(e){let r=p256.p256.Point.fromBytes(new Uint8Array(gill.getBase58Encoder().encode(e))).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function rO(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Ce(n)),c=JSON.parse(new TextDecoder().decode(Ce(r))),i=dd(c),a=Ad(new Uint8Array(Ce(s))),o=await je({rpIdHash:t.subarray(0,32)});return new I(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Ce(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},requestedClientAndDeviceHash:sha2.sha256(new Uint8Array([...new TextEncoder().encode(e.requestedClient),...gill.getBase58Encoder().encode(e.deviceSignature.publicKey)])),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin})}function nO(e,n){let{authResponse:r,transactionPayload:s,slotHash:t,requestedClient:c,deviceSignature:i}=e,{response:{authenticatorData:a,clientDataJSON:o}}=r,d=new Uint8Array(Ce(a)),A=JSON.parse(new TextDecoder().decode(Ce(o))),{transactionActionType:g,transactionAddress:y,transactionMessageBytes:f}=s,T=sha2.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(g),...gill.getAddressEncoder().encode(gill.address(y)),...sha2.sha256(new Uint8Array(gill.getBase64Encoder().encode(f))),...gill.getBase58Encoder().encode(t),...sha2.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(c),...gill.getBase58Encoder().encode(i.publicKey)]))]));if(!utils.equalBytes(new Uint8Array(Ce(A.challenge)),T))throw new Error("Invalid challenge");let C=sha2.sha256(new Uint8Array([...d,...sha2.sha256(new Uint8Array(Ce(o)))]));if(!utils.equalBytes(C,n))throw new Error("Invalid message hash")}async function sO(e,n){let{data:r}=await Kn(te(),e),t=ud(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}async function TO(e){let n=await vn(e,true),r=await wi(n.map(gill.getBase64EncodedWireTransaction),ze()),s=await vn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await AC(s.map(gill.getBase64EncodedWireTransaction))}async function lO({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await te().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions([...e],c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(s.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([Gi()(c),Bi(te(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil(i*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await Vi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function AC(e,n=10,r=1e3,s=Wn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/bundles`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})});if(i.status===429&&c<n){await new Promise(o=>setTimeout(o,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);return a.result}throw new Error("Failed to send bundle after retries.")}async function fO(e,n=30,r=3e3,s=Wn()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/getBundleStatuses`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});if(i.status===429&&c<n){await new Promise(d=>setTimeout(d,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);let o=a.result;if(o.value.length){let d=o.value[0];if(d.confirmation_status==="confirmed"||d.confirmation_status==="finalized")return d.transactions[d.transactions.length-1]}if(c<n){await new Promise(d=>setTimeout(d,r));continue}}throw new Error("Failed to get bundle status after retries.")}async function SO(e,n,r,s){let t=await $i(n,r,s);if(t.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:c}=t.members.find(A=>fd(A.pubkey)===e.toString())??{};if(!c)throw new Error("No permissions found for the current member.");let i=Me.has(c,xe.InitiateTransaction),a=Me.has(c,xe.VoteTransaction),o=Me.has(c,xe.ExecuteTransaction);if(i&&a&&o)return {};if(!a||!o)throw new Error("Signer lacks the required Vote/Execute permissions.");let d=t.members.find(A=>A.role===2);if(!d)throw new Error("No transaction manager available in wallet.");return {transactionManagerAddress:gill.address(fd(d.pubkey)),userAddressTreeIndex:d.userAddressTreeIndex}}async function xO({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await Xi(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return gC(n,c.transactionManagerUrl.value,e,s)}function gC(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r&&(c.authResponses=r);let a=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json();if("error"in a)throw new Error(a.error);return a.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function fd(e){return e.keyType===bt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function NO({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let{addDelegates:i,removeDelegates:a}=await pC(r),o=new _,d=null,A=null,g=[];if(i.length||a.length||t){let S=await mC({packedAccounts:o,addDelegates:i,removeDelegates:a,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:c});d=S.proof,A=S.settingsMutArgs??null,g=S.userMutArgs??[];}let{configActions:y,secp256r1VerifyInput:f}=await TC({configActionsArgs:r,packedAccounts:o,userMutArgs:g}),{remainingAccounts:T,systemOffset:C}=o.toAccountMetas(),D=v(d,C);return {instructions:t?[po({configActions:y,payer:s,authority:gill.createNoopSigner(await od(e)),compressedProofArgs:D,settingsMut:A,remainingAccounts:T})]:[await ao({settingsIndex:e,configActions:y,payer:s,compressedProofArgs:D,remainingAccounts:T})],secp256r1VerifyInput:f}}async function pC(e){let n=[],r=[];for(let s of e)switch(s.type){case "AddMembers":{let t=s.members.map(i=>U(i.member instanceof I?i.member:i.delegateOperation===0?i.member.address:i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i of c)n.push({address:i.address,type:"User"});break}case "RemoveMembers":{let t=s.members.map(i=>U(i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i of c)r.push({address:i.address,type:"User"});break}case "EditPermissions":{let t=s.members.map(i=>i.delegateOperation===2?Promise.resolve(void 0):U(i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i=0;i<c.length;i++){let a=c[i],o=s.members[i];a&&(o.delegateOperation===0?n.push({address:a.address,type:"User"}):r.push({address:a.address,type:"User"}));}break}}return {addDelegates:n,removeDelegates:r}}async function mC({packedAccounts:e,addDelegates:n,removeDelegates:r,compressed:s,index:t,settingsAddressTreeIndex:c,cachedAccounts:i}){await e.addSystemAccounts();let a=[];if(s){let T=(await $(t,c)).address;a.push({address:T,type:"Settings"});}r.length&&a.push(...r),n.length&&a.push(...n);let o=a.length?await ce(a,i):[];if(!o.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let d=await k(o,[]),A=[],g=[];for(let T of o)T.type==="Settings"?A.push(T):T.type==="User"&&g.push(T);let y,f=[];if(s&&d&&(y=se(e,d.treeInfos.slice(0,1),d.leafIndices.slice(0,1),d.rootIndices.slice(0,1),d.proveByIndices.slice(0,1),A,q())[0]),g.length&&d){let T=s?1:0;f=se(e,d.treeInfos.slice(T),d.leafIndices.slice(T),d.rootIndices.slice(T),d.proveByIndices.slice(T),g,X());}return {proof:d,settingsMutArgs:y,userMutArgs:f}}async function TC({configActionsArgs:e,packedAccounts:n,userMutArgs:r}){let s=[],t=[];for(let c of e)switch(c.type){case "AddMembers":{let i=[];for(let a of c.members)if(a.member instanceof I){let o=s.length,{message:d,signature:A,publicKey:g,domainConfig:y}=H(a.member,o);d&&A&&g&&s.push({message:d,signature:A,publicKey:g}),y&&n.addPreAccounts([{address:y,role:gill.AccountRole.READONLY}]);let f=await U(a.member,a.userAddressTreeIndex).then(T=>r.find(C=>new yr__default.default(new Uint8Array(C.accountMeta.address)).eq(T.address)));if(!f)throw new Error("Unable to find user account");i.push(xd({permissionArgs:a.permissions,index:o,userMutArgs:f,pubkey:a.member,delegateOperation:a.delegateOperation}));}else {a.delegateOperation===0&&n.addPreAccounts([{address:a.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:a.member}]);let o=a.delegateOperation===0?a.member.address:a.member,d=await U(o,a.userAddressTreeIndex).then(A=>r.find(g=>new yr__default.default(new Uint8Array(g.accountMeta.address)).eq(A.address)));if(!d)throw new Error("Unable to find user account");i.push(xd({permissionArgs:a.permissions,index:-1,userMutArgs:d,pubkey:a.member,delegateOperation:a.delegateOperation}));}t.push({__kind:c.type,fields:[i]});break}case "RemoveMembers":{let i=c.members.map(o=>U(o.member,o.userAddressTreeIndex).then(d=>{let A=r.find(g=>new yr__default.default(new Uint8Array(g.accountMeta.address)).eq(d.address));if(!A)throw new Error("Unable to find user account");return fC({pubkey:o.member,userMutArgs:A})})),a=await Promise.all(i);t.push({__kind:c.type,fields:[a]});break}case "EditPermissions":{let i=c.members.map(o=>(o.delegateOperation!==2?U(o.member,o.userAddressTreeIndex).then(d=>r.find(A=>new yr__default.default(new Uint8Array(A.accountMeta.address)).eq(d.address))):Promise.resolve(void 0)).then(d=>lC({permissionArgs:o.permissions,userMutArgs:d,pubkey:o.member,delegateOperation:o.delegateOperation}))),a=await Promise.all(i);t.push({__kind:c.type,fields:[a]});break}default:t.push({__kind:c.type,fields:[c.threshold]});}return {configActions:t,secp256r1VerifyInput:s}}function lC({pubkey:e,permissionArgs:n,userMutArgs:r,delegateOperation:s}){if(s!==2){if(!r)throw new Error("User args is missing");if(r.data.role!==0)throw new Error("Only user with member role is allowed to change delegate.")}return {memberKey:Ge(e),permissions:Dd(n),userArgs:r?gill.some(r):gill.none(),delegateOperation:s}}function fC({pubkey:e,userMutArgs:n}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:Ge(e),userArgs:n.data.delegatedTo.__option==="Some"?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function xd({pubkey:e,permissionArgs:n,index:r,userMutArgs:s,delegateOperation:t}){if(s.data.role===1){if(t!==0)throw new Error("Permanent members must also be delegates");if(s.data.delegatedTo.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}else if(s.data.role===2){if(n.execute||n.vote)throw new Error("Transaction Manager can only have initiate permission");if(t!==2)throw new Error("Transaction Manager cannot be a delegate.")}else if(s.data.role===3&&t!==2)throw new Error("Administrator cannot be a delegate.");return {memberKey:Ge(e),permissions:Dd(n),verifyArgs:e instanceof I&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin,requestedClientAndDeviceHash:e.requestedClientAndDeviceHash}):gill.none(),userArgs:t===0?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]},delegateOperation:t}}function Dd(e){let n=[];return e.initiate&&n.push(xe.InitiateTransaction),e.vote&&n.push(xe.VoteTransaction),e.execute&&n.push(xe.ExecuteTransaction),Me.fromPermissions(n)}var Ze=33,Xe=64,Hn=14,EC=2,hC=gill.address("Secp256r1SigVerify1111111111111111111111111");function PC(){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 RC(){return gill.getStructDecoder([["signatureOffset",gill.getU16Decoder()],["signatureInstructionIndex",gill.getU16Decoder()],["publicKeyOffset",gill.getU16Decoder()],["publicKeyInstructionIndex",gill.getU16Decoder()],["messageDataOffset",gill.getU16Decoder()],["messageDataSize",gill.getU16Decoder()],["messageInstructionIndex",gill.getU16Decoder()]])}function Pd(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let s=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=RC();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=Hn;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Ze).decode(e,n);n+=Ze;let d=gill.fixDecoderSize(gill.getBytesDecoder(),Xe).decode(e,n);n+=Xe;let A=t[a].messageDataSize,g=gill.fixDecoderSize(gill.getBytesDecoder(),A).decode(e,n);n+=A,i.push({publicKey:o,signature:d,message:g});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function Rd(){return gill.createEncoder({getSizeFromValue:e=>{let n=Hn*e.offsets.length,r=e.payload.reduce((s,t)=>s+Ze+Xe+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=PC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Ze).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Xe).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function GO(){return gill.combineCodec(Rd(),Pd())}function F(e,n){let r=e.length,s=EC+r*Hn,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],A=s,g=A+Ze,y=g+Xe;t.push({publicKeyOffset:A,publicKeyInstructionIndex:65535,signatureOffset:g,signatureInstructionIndex:65535,messageDataOffset:y,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Ze+Xe+d.length;}let c=n?.programAddress??hC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Rd().encode(i)}}function FO(e){return {programAddress:e.programAddress,accounts:{},data:Pd().decode(e.data)}}async function QO({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=await re(e),{address:a}=await $(e,n),o=await ce([{address:a,type:"Settings"}],t),d=await k(o,[]),A=se(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(x=>x.type==="Settings"),q())[0],g=de(s),y=g.filter(x=>x instanceof I),f=[],T=[];for(let x of y){let L=f.length,{domainConfig:N,verifyArgs:V,signature:W,publicKey:K,message:O}=H(x,L);O&&W&&K&&f.push({message:O,signature:W,publicKey:K}),N&&(c.addPreAccounts([{address:N,role:gill.AccountRole.READONLY}]),V?.__option==="Some"&&T.push({domainConfigKey:N,verifyArgs:V.value}));}c.addPreAccounts(g.filter(x=>"address"in x).map(x=>({address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x})));let{remainingAccounts:C,systemOffset:D}=c.toAccountMetas(),b=v(d,D),S=[];return f.length>0&&S.push(F(f)),S.push(xo({settings:i,settingsMutArgs:A,compressedProofArgs:b,payer:r,secp256r1VerifyArgs:T,remainingAccounts:C})),S}async function rB({admin:e,addressTree:n}){return to({payer:e,addressTree:n,remainingAccounts:[]})}async function dB({payer:e,rpId:n,origins:r,authority:s}){let t=await je({rpId:n}),c=new _;await c.addSystemAccounts();let i=await Te(),{address:a,addressTree:o}=await U(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],A=await k([],d),g=(await ne(c,A.treeInfos,A.roots,A.rootIndices,d))[0],{remainingAccounts:y,systemOffset:f}=c.toAccountMetas(),T=v(A,f);return await bo({origins:r,authorityCreationArgs:g,authority:s,compressedProofArgs:T,payer:e,domainConfig:t,rpId:n,remainingAccounts:y})}async function SB({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await $(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await U(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await ce(i,t):[],o=await Te(),{address:d,addressTree:A}=await U(r.member,o),g=[{address:d,type:"User",tree:A,queue:A}],y=await k(a,g),f=null,T=null,C=a.filter(N=>N.type==="Settings"),D=a.filter(N=>N.type==="User");C.length&&(f=se(c,y.treeInfos.slice(0,1),y.leafIndices.slice(0,1),y.rootIndices.slice(0,1),y.proveByIndices.slice(0,1),C,q())[0]),D.length&&(T=se(c,y.treeInfos.slice(1,2),y.leafIndices.slice(1,2),y.rootIndices.slice(1,2),y.proveByIndices.slice(1,2),D,X())[0]);let b=await ne(c,y.treeInfos.slice(a.length),y.roots.slice(a.length),y.rootIndices.slice(a.length),g),{remainingAccounts:S,systemOffset:x}=c.toAccountMetas(),L=v(y,x);return await Lo({payer:n,authority:e,compressedProofArgs:L,member:St().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:f?gill.some({settingsMutArgs:f,transactionManager:T?gill.some(T):gill.none()}):gill.none(),userAccountCreationArgs:b[0],domainConfig:s,remainingAccounts:S})}async function DB({payer:e}){let n=await nd();return ko({payer:e,globalCounter:n})}async function bB({createUserArgs:e,payer:n}){let r=new _;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:g,addressTree:y}=await U(A.member.address,s);return {address:g,tree:y,queue:y,type:"User"}})),c=await k([],t),i=await ne(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=v(c,o);return await jo({compressedProofArgs:d,payer:n,createUserArgs:e.map((A,g)=>({member:A.member.address,role:A.role,userCreationArgs:i[g],transactionManagerUrl:A.role===2?A.transactionManagerUrl:null})),remainingAccounts:a})}async function LB({admin:e,rpId:n,disable:r}){let s=await je({rpId:n});return oc({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function VB({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new _;await i.addSystemAccounts();let a=await Te(),{address:o,addressTree:d}=await U(r.address,a),A=[{address:o,tree:d,queue:d,type:"User"}],g=await k([],A),y=(await ne(i,g.treeInfos,g.roots,g.rootIndices,A))[0],f=i.toAccountMetas();c=f.remainingAccounts,t={compressedProofArgs:v(g,f.systemOffset),authorityCreationArgs:y};}return Ac({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function jB({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new _;await s.addSystemAccounts();let t=await ce([{address:(await U(e.address,n)).address,type:"User"}]),c=await k(t,[]),i=se(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,X())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=v(c,o);return lc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function ew({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:i}=await $(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await k([],a),d=(await ne(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return Dc({compressedProofArgs:y,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:A})}async function aw({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:i}=await U(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await k([],a),d=(await ne(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:A,systemOffset:g}=t.toAccountMetas(),y=v(o,g);return vc({compressedProofArgs:y,args:e,authority:n,userCreationArgs:d,remainingAccounts:A})}async function Rw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,delegateOperation:t,cachedAccounts:c}){let{domainConfig:i,verifyArgs:a,message:o,signature:d,publicKey:A}=H(r),g=[];o&&d&&A&&g.push({message:o,signature:d,publicKey:A});let y=new _;await y.addSystemAccounts();let f=[],T=[];T.push(...await ce([{address:(await U("address"in r?r.address:r,s)).address,type:"User"}],c));let C=await Te(),{address:D,addressTree:b}=await $(e,C);f.push({address:D,queue:b,tree:b,type:"Settings"});let S=T.length,x=await k(T,f),L=se(y,x.treeInfos.slice(0,S),x.leafIndices.slice(0,S),x.rootIndices.slice(0,S),x.proveByIndices.slice(0,S),T.filter(ae=>ae.type==="User"),X())[0],V=(await ne(y,x.treeInfos.slice(S),x.roots.slice(S),x.rootIndices.slice(S),f)).find(ae=>ae.type==="Settings")??null;i?y.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]):"address"in r&&y.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:W,systemOffset:K}=y.toAccountMetas(),O=v(x,K),le=[];if(!V)throw new Error("Settings creation args is missing.");return le.push(await Fo({settingsIndex:e,payer:n,initialMember:r instanceof I?void 0:r,secp256r1VerifyArgs:a,domainConfig:i,userMutArgs:L,compressedProofArgs:O,settingsCreation:V,delegateOperation:t,remainingAccounts:W})),{instructions:le,secp256r1VerifyInput:g}}async function kw({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=await ce([{address:(await $(e,n)).address,type:"Settings"}],t),a=await k(i,[]),o=se(c,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,i.filter(S=>S.type==="Settings"),q())[0],d=de(s),A=d.filter(S=>S instanceof I),g=[],y=[];for(let S of A){let x=g.length,{domainConfig:L,verifyArgs:N,signature:V,publicKey:W,message:K}=H(S,x);K&&V&&W&&g.push({message:K,signature:V,publicKey:W}),L&&(c.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),N?.__option==="Some"&&y.push({domainConfigKey:L,verifyArgs:N.value}));}c.addPreAccounts(d.filter(S=>"address"in S).map(S=>({address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S})));let{remainingAccounts:f,systemOffset:T}=c.toAccountMetas(),C=v(a,T),D=[];g.length>0&&D.push(F(g));let b=await re(e);return D.push(Qo({settings:b,payer:r,settingsMut:o,compressedProofArgs:C,secp256r1VerifyArgs:y,remainingAccounts:f})),D}function WC(e,n,r,s){let t=LC(e,n),c=OC(e,n)&&r!==s;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function LC(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function OC(e,n){return n<e.header.numSignerAccounts}async function pr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=bi(n);if(t.version==="legacy")throw new Error("Only versioned transaction is allowed.");let c=r??(t.addressTableLookups?await gill.fetchAddressesForLookupTables(t.addressTableLookups.map(a=>a.lookupTableAddress),te()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,o]of t.staticAccounts.entries())i.push({address:o,role:WC(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.WRITABLE});}for(let d of a.readonlyIndexes){let A=o[d];if(!A)throw new Error(`Address lookup table account ${a.lookupTableAddress} does not contain address at index ${d}`);i.push({address:A,role:gill.AccountRole.READONLY});}}for(let a of s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(d=>d.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}async function Ld({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Ie(e),{accountMetas:A,addressLookupTableAccounts:g}=await pr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),y=[];return c.length>0&&y.push(F(c)),y.push(o?yi({transactionBuffer:n,payer:s.address,remainingAccounts:A,settingsKey:e}):ai({transactionBuffer:n,payer:s.address,settings:e})),a&&y.push(ki({payer:s,tipAmount:a})),{instructions:y,addressLookupTableAccounts:g}}async function Od({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let A=de(s),g=await re(e),y=await Ie(g),[{accountMetas:f,addressLookupTableAccounts:T,transactionMessage:C},{settingsReadonlyArgs:D,proof:b,packedAccounts:S}]=await Promise.all([pr({transactionMessageBytes:r,walletAddress:y,additionalSigners:A.filter(O=>!(O instanceof I)),addressesByLookupTableAddress:c}),me(a,e,n,o,d)]);S.addPreAccounts(f);let x=A.filter(O=>O instanceof I),L=[];for(let O of x){let le=i.length,{domainConfig:ae,verifyArgs:Pe,signature:De,publicKey:Wt,message:Lt}=H(O,le);Lt&&De&&Wt&&i.push({message:Lt,signature:De,publicKey:Wt}),ae&&(S.addPreAccounts([{address:ae,role:gill.AccountRole.READONLY}]),Pe?.__option==="Some"&&L.push({domainConfigKey:ae,verifyArgs:Pe.value}));}let{remainingAccounts:N,systemOffset:V}=S.toAccountMetas(),W=[];i.length>0&&W.push(F(i));let K=wC(C,f);if(a){if(!t||!D)throw new Error("Payer not found or proof args is missing.");let O=v(b,V);W.push(Ei({secp256r1VerifyArgs:L,transactionMessage:K,settingsReadonlyArgs:D,compressedProofArgs:O,payer:t,remainingAccounts:N}));}else W.push(Si({secp256r1VerifyArgs:L,settings:g,transactionMessage:K,remainingAccounts:N}));return {instructions:W,addressLookupTableAccounts:T}}function wC(e,n){if(e.version==="legacy")throw new Error("Only versioned transaction is allowed.");return {numSigners:e.header.numSignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numAccountKeys:e.staticAccounts.length,instructions:e.instructions.map(r=>({...r,accountIndices:new Uint8Array(r.accountIndices??[]),data:new Uint8Array(r.data??[])})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(s=>s.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function gk({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=de(s),d=await re(e),A=await Ie(d),{settingsReadonlyArgs:g,proof:y,packedAccounts:f}=await me(a,e,n,false,t),T=[],C=[];for(let x of o)if(x instanceof I){let L=T.length,{domainConfig:N,verifyArgs:V,signature:W,publicKey:K,message:O}=H(x,L);O&&W&&K&&T.push({message:O,signature:W,publicKey:K}),N&&(f.addPreAccounts([{address:N,role:gill.AccountRole.READONLY}]),V?.__option==="Some"&&C.push({domainConfigKey:N,verifyArgs:V.value}));}else f.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:D,systemOffset:b}=f.toAccountMetas(),S=[];if(T.length>0&&S.push(F(T)),a){if(!i||!g)throw new Error("Payer not found or proof args is missing.");let x=v(y,b);S.push(Nc({amount:c,settingsReadonlyArgs:g,compressedProofArgs:x,payer:i,secp256r1VerifyArgs:C,source:A,destination:r,remainingAccounts:D}));}else S.push(Wc({amount:c,secp256r1VerifyArgs:C,source:A,destination:r,settings:d,remainingAccounts:D}));return S}async function Ck({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,compressed:d=false}){let A=de(t),g=await re(e),y=await Ie(g),[f,T]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,y,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:C,proof:D,packedAccounts:b}=await me(d,e,n,false,c),S=[],x=[];for(let W of A)if(W instanceof I){let K=S.length,{domainConfig:O,verifyArgs:le,signature:ae,publicKey:Pe,message:De}=H(W,K);De&&ae&&Pe&&S.push({message:De,signature:ae,publicKey:Pe}),O&&(b.addPreAccounts([{address:O,role:gill.AccountRole.READONLY}]),le?.__option==="Some"&&x.push({domainConfigKey:O,verifyArgs:le.value}));}else b.addPreAccounts([{address:W.address,role:gill.AccountRole.READONLY_SIGNER,signer:W}]);let{remainingAccounts:L,systemOffset:N}=b.toAccountMetas(),V=[];if(S.length>0&&V.push(F(S)),d){if(!a||!C)throw new Error("Payer not found or proof args is missing.");let W=v(D,N);V.push(Yc({amount:i,settingsReadonlyArgs:C,compressedProofArgs:W,payer:a,secp256r1VerifyArgs:x,source:y,sourceTokenAccount:f,destination:r,destinationTokenAccount:T,mint:s,tokenProgram:o,remainingAccounts:L}));}else V.push(Fc({amount:i,secp256r1VerifyArgs:x,source:y,sourceTokenAccount:f,destination:r,destinationTokenAccount:T,settings:g,mint:s,tokenProgram:o,remainingAccounts:L}));return V}async function Wk({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await Fs(te(),s),o=a.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:A,packedAccounts:g}=await me(c,e,n,false,i),{remainingAccounts:y,systemOffset:f}=g.toAccountMetas(),{domainConfig:T,verifyArgs:C,message:D,signature:b,publicKey:S}=H(r),x=[];if(D&&b&&S&&x.push(F([{message:D,signature:b,publicKey:S}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let L=v(A,f);x.push(aa({transactionBuffer:s,domainConfig:T,closer:r instanceof I?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:C,settingsReadonlyArgs:d,payer:t,compressedProofArgs:L,remainingAccounts:y}));}else x.push(ta({transactionBuffer:s,domainConfig:T,closer:r instanceof I?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:C,remainingAccounts:[]}));return x}function Nd({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:d,expectedSecp256r1Signers:A}){let{domainConfig:g,verifyArgs:y,message:f,signature:T,publicKey:C}=H(n),D=[];if(f&&T&&C&&D.push(F([{message:f,signature:T,publicKey:C}])),d){let{settingsReadonlyArgs:b,compressedProofArgs:S,remainingAccounts:x}=d;D.push(Sa({transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof I?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:A},settingsReadonlyArgs:b,compressedProofArgs:S,remainingAccounts:x}));}else D.push(ya({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:y,creator:n instanceof I?void 0:n,domainConfig:g,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:A},remainingAccounts:[]}));return D}function Hd({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=H(e),d=[];return a&&i&&o&&d.push(F([{message:a,signature:i,publicKey:o}])),s?d.push(_a({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof I?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Ea({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof I?void 0:e,remainingAccounts:[]})),d}function Vd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?Fa({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):wa({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Gd({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=H(n),d=[];return o&&i&&a&&d.push(F([{message:o,signature:i,publicKey:a}])),s?d.push(ti({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof I?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Ya({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof I?void 0:n,remainingAccounts:[]})),d}async function f2({message:e,signer:n,popUp:r}){let s=await ur({authUrl:`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"message",payload:e},signer:n,popUp:r,additionalInfo:or()});return {...s,signer:new ie(s.signer),userAddressTreeIndex:s.userAddressTree?await ir(s.userAddressTree):void 0}}async function D2({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){let c=await ur({authUrl:`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}`,data:{type:"transaction",payload:JSON.stringify({transactionActionType:e,transactionAddress:n,transactionMessageBytes:Ar(r)})},additionalInfo:or(),signer:s,popUp:t});return {...c,signer:new ie(c.signer),userAddressTreeIndex:c.userAddressTree?await ir(c.userAddressTree):void 0}}async function R2({message:e,response:n,expectedRPID:r=Fi(),expectedOrigin:s=he()}){let{verified:t}=await server.verifyAuthenticationResponse({response:n.authResponse,expectedChallenge:Ar(new Uint8Array([...new TextEncoder().encode(n.requestedClient),...new TextEncoder().encode(e)])),expectedOrigin:s,expectedRPID:r,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:Td(n.signer.toString()),counter:0}});return t}async function H2({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o,compressed:d=false,additionalVoters:A=[],additionalSigners:g=[],chunkSize:y=Math.ceil(s.length/2),cachedAccounts:f}){let T=await re(n),C=Math.floor(Math.random()*255),D=await sd(T,t instanceof I?t:t.address,C),b=[],S=[];for(let z=0;z<s.length;z+=y){let Vn=s.subarray(z,z+y);b.push(Vn),S.push(sha256.sha256(Vn));}let x=sha256.sha256(new Uint8Array(s)),{settingsReadonlyArgs:L,proof:N,packedAccounts:V}=await me(d,n,r,false,f),{remainingAccounts:W,systemOffset:K}=V.toAccountMetas(),O=L?{settingsReadonlyArgs:L,compressedProofArgs:v(N,K),remainingAccounts:W,payer:e}:null,le=de([t,...c?[c]:[],...A]).filter(z=>z instanceof I).map(z=>({memberKey:Ge(z),messageHash:sha256.sha256(new Uint8Array([...z.authData,...sha256.sha256(z.verifyArgs.clientDataJson)]))})),ae=Nd({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:C,payer:e,transactionBufferAddress:D,settings:T,creator:t,preauthorizeExecution:!c,bufferExtendHashes:S,compressedArgs:O,expectedSecp256r1Signers:le}),Pe=b.map(z=>Vd({transactionMessageBytes:z,transactionBufferAddress:D,settings:T,compressed:d})),De=A.map(z=>Gd({voter:z,transactionBufferAddress:D,settings:T,compressedArgs:O})),Wt=Hd({compressedArgs:O,settings:T,executor:c,transactionBufferAddress:D}),{instructions:Lt,addressLookupTableAccounts:zd}=await Ld({compressed:d,settings:T,transactionMessageBytes:s,transactionBufferAddress:D,payer:e,additionalSigners:g,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),l=z=>({payer:e,instructions:z,addressesByLookupTableAddress:zd});return [l(ae),...Pe.map(z=>l([z])),...De.length?[l(De.flat())]:[],l(Wt),l(Lt)]}var lr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:c.length};{if(r.length===0)throw new Error("Expected at least one writable signer key");let[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var fr=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function Fd({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=lr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let y of a){let f=t.extractTableLookup(y);if(f!==void 0){let{addressTableLookup:T,drainedKeys:C}=f;c.push({readonlyIndexes:T.readonlyIndexes,readableIndices:T.readonlyIndexes,writableIndexes:T.writableIndexes,writableIndices:T.writableIndexes,lookupTableAddress:gill.address(T.lookupTableAddress)}),i.writable.push(...C.writable),i.readonly.push(...C.readonly);}}let[o,d]=t.getMessageComponents(),g=new fr(d,i).compileInstructions(r);return {version:0,header:o,instructions:g,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function Q2({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Fd({instructions:e,payer:n,recentBlockhash:u,addressesByLookupTableAddress:r});return vi(s)}async function sN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:d=false}){let{instructions:A,addressLookupTableAccounts:g}=await Od({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:d,cachedAccounts:a});return {payer:e,instructions:A,addressesByLookupTableAddress:g}}
|
|
2
|
-
exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Qs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=Ao;exports.CHANGE_CONFIG_DISCRIMINATOR=oo;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=lo;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=Ro;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Uo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Bo;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Vo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Ko;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Zo;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=rc;exports.DOMAIN_CONFIG_DISCRIMINATOR=Gn;exports.DelegateOp=Kt;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=dc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=pc;exports.GLOBAL_COUNTER_DISCRIMINATOR=qn;exports.KeyType=bt;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=xc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=hc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=hx;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=sx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=zx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Kx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=ax;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=cx;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=Tx;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=px;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=ox;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=gx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=Lx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Ox;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Bx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=vx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=Px;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=Rx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=Ix;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=qx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=mx;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=Dx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Wx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=xx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=$S;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=tx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=XS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=ex;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Gx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=fx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=yx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=Ax;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=Sx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=Cx;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=rx;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=Hx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Jx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=Mx;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Vx;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=Ex;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=_x;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=dx;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ux;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=jx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=ix;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Nx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=nx;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=QS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Fx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=lx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=wx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=kx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=Ux;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=bx;exports.MULTI_WALLET_PROGRAM_ADDRESS=u;exports.MultiWalletAccount=qS;exports.MultiWalletInstruction=YS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Bc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=_c;exports.Permission=xe;exports.Permissions=Me;exports.SETTINGS_DISCRIMINATOR=Ws;exports.Secp256r1Key=ie;exports.SignedSecp256r1Key=I;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=jc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Vc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=sa;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=$c;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=Ta;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=ua;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Hs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ra;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Ca;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Ha;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=La;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=$a;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Ja;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=ui;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=si;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Ci;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=Ti;exports.UserRole=He;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Js;exports.addWhitelistedAddressTrees=rB;exports.changeConfig=NO;exports.closeTransactionBuffer=Wk;exports.compressSettingsAccount=QO;exports.configAction=vD;exports.convertMemberKeyToString=fd;exports.convertPubkeyCompressedToCose=Td;exports.convertPubkeyCoseToCompressed=tO;exports.createDomainConfig=dB;exports.createDomainUserAccounts=SB;exports.createGlobalCounter=DB;exports.createPopUp=gd;exports.createTransactionBuffer=Nd;exports.createTransactionManagerSigner=gC;exports.createUserAccounts=bB;exports.createWallet=Rw;exports.decodeDomainConfig=zn;exports.decodeGlobalCounter=Zn;exports.decodeSettings=Os;exports.decodeTransactionBuffer=Gs;exports.decodeWhitelistedAddressTree=qs;exports.decompressSettingsAccount=kw;exports.disableDomainConfig=LB;exports.editDomainConfig=VB;exports.editTransactionManagerUrl=jB;exports.executeTransaction=Ld;exports.executeTransactionBuffer=Hd;exports.executeTransactionSync=Od;exports.extendTransactionBuffer=Vd;exports.fetchAllDomainConfig=zC;exports.fetchAllGlobalCounter=XC;exports.fetchAllMaybeDomainConfig=su;exports.fetchAllMaybeGlobalCounter=xu;exports.fetchAllMaybeSettings=Ly;exports.fetchAllMaybeTransactionBuffer=rp;exports.fetchAllMaybeWhitelistedAddressTree=Cp;exports.fetchAllSettings=Ih;exports.fetchAllTransactionBuffer=Rh;exports.fetchAllWhitelistedAddressTree=Wh;exports.fetchDomainConfig=Kn;exports.fetchGlobalCounter=ZC;exports.fetchMaybeDomainConfig=nu;exports.fetchMaybeGlobalCounter=Su;exports.fetchMaybeSettings=$r;exports.fetchMaybeSettingsAccountData=HI;exports.fetchMaybeTransactionBuffer=tp;exports.fetchMaybeUserAccountData=NI;exports.fetchMaybeWhitelistedAddressTree=Ip;exports.fetchSettings=xh;exports.fetchSettingsAccountData=$i;exports.fetchTransactionBuffer=Fs;exports.fetchUserAccountData=Xi;exports.fetchWhitelistedAddressTree=Ys;exports.getAddMemberArgsCodec=rD;exports.getAddMemberArgsDecoder=xr;exports.getAddMemberArgsEncoder=Sr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=Zh;exports.getAddWhitelistedAddressTreesInstruction=$h;exports.getAddWhitelistedAddressTreesInstructionAsync=to;exports.getAddWhitelistedAddressTreesInstructionDataCodec=Xh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=eo;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=cn;exports.getAuthEndpoint=he;exports.getChangeConfigCompressedDiscriminatorBytes=TP;exports.getChangeConfigCompressedInstruction=po;exports.getChangeConfigCompressedInstructionDataCodec=lP;exports.getChangeConfigCompressedInstructionDataDecoder=yo;exports.getChangeConfigCompressedInstructionDataEncoder=go;exports.getChangeConfigDiscriminatorBytes=cP;exports.getChangeConfigInstruction=iP;exports.getChangeConfigInstructionAsync=ao;exports.getChangeConfigInstructionDataCodec=aP;exports.getChangeConfigInstructionDataDecoder=co;exports.getChangeConfigInstructionDataEncoder=an;exports.getCompiledInstructionCodec=oD;exports.getCompiledInstructionDecoder=Cr;exports.getCompiledInstructionEncoder=Ir;exports.getCompressSettingsAccountDiscriminatorBytes=EP;exports.getCompressSettingsAccountInstruction=xo;exports.getCompressSettingsAccountInstructionDataCodec=hP;exports.getCompressSettingsAccountInstructionDataDecoder=So;exports.getCompressSettingsAccountInstructionDataEncoder=fo;exports.getCompressedAccountMetaCodec=dD;exports.getCompressedAccountMetaDecoder=nt;exports.getCompressedAccountMetaEncoder=rt;exports.getCompressedAccountMetaReadOnlyCodec=yD;exports.getCompressedAccountMetaReadOnlyDecoder=at;exports.getCompressedAccountMetaReadOnlyEncoder=ct;exports.getCompressedProofCodec=TD;exports.getCompressedProofDecoder=Rr;exports.getCompressedProofEncoder=Pr;exports.getCompressedSettingsAddressFromIndex=$;exports.getCompressedSettingsCodec=xD;exports.getCompressedSettingsDataCodec=MD;exports.getCompressedSettingsDataDecoder=ut;exports.getCompressedSettingsDataEncoder=dt;exports.getCompressedSettingsDecoder=q;exports.getCompressedSettingsEncoder=it;exports.getComputeBudgetEstimate=Gi;exports.getConfigActionCodec=RD;exports.getConfigActionDecoder=pt;exports.getConfigActionEncoder=yt;exports.getCreateDomainConfigDiscriminatorBytes=LP;exports.getCreateDomainConfigInstruction=BP;exports.getCreateDomainConfigInstructionAsync=bo;exports.getCreateDomainConfigInstructionDataCodec=OP;exports.getCreateDomainConfigInstructionDataDecoder=vo;exports.getCreateDomainConfigInstructionDataEncoder=un;exports.getCreateDomainUserAccountDiscriminatorBytes=zP;exports.getCreateDomainUserAccountInstruction=JP;exports.getCreateDomainUserAccountInstructionAsync=Lo;exports.getCreateDomainUserAccountInstructionDataCodec=KP;exports.getCreateDomainUserAccountInstructionDataDecoder=Wo;exports.getCreateDomainUserAccountInstructionDataEncoder=gn;exports.getCreateGlobalCounterDiscriminatorBytes=QP;exports.getCreateGlobalCounterInstruction=tR;exports.getCreateGlobalCounterInstructionAsync=ko;exports.getCreateGlobalCounterInstructionDataCodec=eR;exports.getCreateGlobalCounterInstructionDataDecoder=wo;exports.getCreateGlobalCounterInstructionDataEncoder=pn;exports.getCreateMultiWalletCompressedDiscriminatorBytes=dR;exports.getCreateMultiWalletCompressedInstruction=AR;exports.getCreateMultiWalletCompressedInstructionAsync=Fo;exports.getCreateMultiWalletCompressedInstructionDataCodec=uR;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Go;exports.getCreateMultiWalletCompressedInstructionDataEncoder=mn;exports.getCreateUserAccountArgsCodec=LD;exports.getCreateUserAccountArgsDecoder=Br;exports.getCreateUserAccountArgsEncoder=Or;exports.getCreateUserAccountsDiscriminatorBytes=SR;exports.getCreateUserAccountsInstruction=IR;exports.getCreateUserAccountsInstructionAsync=jo;exports.getCreateUserAccountsInstructionDataCodec=xR;exports.getCreateUserAccountsInstructionDataDecoder=Jo;exports.getCreateUserAccountsInstructionDataEncoder=ln;exports.getDecompressSettingsAccountDiscriminatorBytes=vR;exports.getDecompressSettingsAccountInstruction=Qo;exports.getDecompressSettingsAccountInstructionDataCodec=bR;exports.getDecompressSettingsAccountInstructionDataDecoder=$o;exports.getDecompressSettingsAccountInstructionDataEncoder=Xo;exports.getDelegateOpCodec=wD;exports.getDelegateOpDecoder=ve;exports.getDelegateOpEncoder=Re;exports.getDisableDomainConfigDiscriminatorBytes=wR;exports.getDisableDomainConfigInstruction=oc;exports.getDisableDomainConfigInstructionDataCodec=kR;exports.getDisableDomainConfigInstructionDataDecoder=sc;exports.getDisableDomainConfigInstructionDataEncoder=nc;exports.getDomainConfigAddress=je;exports.getDomainConfigCodec=FC;exports.getDomainConfigDecoder=Fn;exports.getDomainConfigDiscriminatorBytes=GC;exports.getDomainConfigEncoder=ru;exports.getDomainConfigSize=KC;exports.getEditDomainConfigDiscriminatorBytes=JR;exports.getEditDomainConfigInstruction=Ac;exports.getEditDomainConfigInstructionAsync=qR;exports.getEditDomainConfigInstructionDataCodec=jR;exports.getEditDomainConfigInstructionDataDecoder=uc;exports.getEditDomainConfigInstructionDataEncoder=Sn;exports.getEditMemberArgsCodec=VD;exports.getEditMemberArgsDecoder=Ur;exports.getEditMemberArgsEncoder=_r;exports.getEditTransactionManagerUrlDiscriminatorBytes=rv;exports.getEditTransactionManagerUrlInstruction=lc;exports.getEditTransactionManagerUrlInstructionDataCodec=nv;exports.getEditTransactionManagerUrlInstructionDataDecoder=Tc;exports.getEditTransactionManagerUrlInstructionDataEncoder=mc;exports.getExpectedSecp256r1SignersCodec=KD;exports.getExpectedSecp256r1SignersDecoder=Tt;exports.getExpectedSecp256r1SignersEncoder=mt;exports.getFeePayer=rL;exports.getGlobalAdditonalInfo=or;exports.getGlobalCounterAddress=nd;exports.getGlobalCounterCodec=YC;exports.getGlobalCounterDecoder=Yn;exports.getGlobalCounterDiscriminatorBytes=qC;exports.getGlobalCounterEncoder=fu;exports.getGlobalCounterSize=$C;exports.getJitoTipsConfig=Wn;exports.getLightCpiSigner=BL;exports.getLightProtocolRpc=Ke;exports.getLinkWalletArgsCodec=YD;exports.getLinkWalletArgsDecoder=kr;exports.getLinkWalletArgsEncoder=wr;exports.getMemberCodec=QD;exports.getMemberDecoder=gt;exports.getMemberEncoder=At;exports.getMemberKeyCodec=rM;exports.getMemberKeyDecoder=j;exports.getMemberKeyEncoder=J;exports.getMigrateCompressedSettingsDiscriminatorBytes=Av;exports.getMigrateCompressedSettingsInstruction=Dc;exports.getMigrateCompressedSettingsInstructionDataCodec=gv;exports.getMigrateCompressedSettingsInstructionDataDecoder=Cc;exports.getMigrateCompressedSettingsInstructionDataEncoder=Ic;exports.getMigrateCompressedUsersDiscriminatorBytes=xv;exports.getMigrateCompressedUsersInstruction=vc;exports.getMigrateCompressedUsersInstructionDataCodec=Iv;exports.getMigrateCompressedUsersInstructionDataDecoder=Rc;exports.getMigrateCompressedUsersInstructionDataEncoder=Pc;exports.getMultiWalletErrorMessage=gW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Nv;exports.getNativeTransferIntentCompressedInstruction=Nc;exports.getNativeTransferIntentCompressedInstructionDataCodec=Hv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=kc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=wc;exports.getNativeTransferIntentDiscriminatorBytes=vv;exports.getNativeTransferIntentInstruction=Wc;exports.getNativeTransferIntentInstructionAsync=_v;exports.getNativeTransferIntentInstructionDataCodec=bv;exports.getNativeTransferIntentInstructionDataDecoder=Uc;exports.getNativeTransferIntentInstructionDataEncoder=xn;exports.getNewAuthorityArgsCodec=cM;exports.getNewAuthorityArgsDecoder=Hr;exports.getNewAuthorityArgsEncoder=Nr;exports.getOriginIndex=sO;exports.getPackedAddressTreeInfoCodec=dM;exports.getPackedAddressTreeInfoDecoder=ft;exports.getPackedAddressTreeInfoEncoder=lt;exports.getPackedStateTreeInfoCodec=gM;exports.getPackedStateTreeInfoDecoder=ot;exports.getPackedStateTreeInfoEncoder=st;exports.getPermissionsCodec=mM;exports.getPermissionsDecoder=_e;exports.getPermissionsEncoder=be;exports.getProofArgsCodec=SM;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=M;exports.getRemoveMemberArgsCodec=DM;exports.getRemoveMemberArgsDecoder=Lr;exports.getRemoveMemberArgsEncoder=Wr;exports.getRpId=Fi;exports.getSecp256r1PubkeyCodec=hM;exports.getSecp256r1PubkeyDecoder=St;exports.getSecp256r1PubkeyEncoder=Vr;exports.getSecp256r1SignatureOffsetsDataDecoder=RC;exports.getSecp256r1SignatureOffsetsDataEncoder=PC;exports.getSecp256r1VerifyArgsCodec=vM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=B;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=WM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=Z;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Y;exports.getSecp256r1VerifyInstruction=F;exports.getSecp256r1VerifyInstructionDataCodec=GO;exports.getSecp256r1VerifyInstructionDataDecoder=Pd;exports.getSecp256r1VerifyInstructionDataEncoder=Rd;exports.getSendAndConfirmTransaction=Vi;exports.getSettingsCodec=Sh;exports.getSettingsCreationArgsCodec=wM;exports.getSettingsCreationArgsDecoder=It;exports.getSettingsCreationArgsEncoder=xt;exports.getSettingsDecoder=Ls;exports.getSettingsDiscriminatorBytes=fh;exports.getSettingsEncoder=Wy;exports.getSettingsFromIndex=re;exports.getSettingsIndexWithAddressCodec=HM;exports.getSettingsIndexWithAddressDecoder=Fr;exports.getSettingsIndexWithAddressEncoder=Gr;exports.getSettingsMutArgsCodec=zM;exports.getSettingsMutArgsDecoder=Se;exports.getSettingsMutArgsEncoder=fe;exports.getSettingsReadonlyArgsCodec=qM;exports.getSettingsReadonlyArgsDecoder=ee;exports.getSettingsReadonlyArgsEncoder=Q;exports.getSettingsSize=Ch;exports.getSignedSecp256r1Key=rO;exports.getSignedTransactionManager=xO;exports.getSolanaRpc=te;exports.getSolanaRpcEndpoint=ze;exports.getTokenTransferIntentCompressedDiscriminatorBytes=sb;exports.getTokenTransferIntentCompressedInstruction=Yc;exports.getTokenTransferIntentCompressedInstructionAsync=cb;exports.getTokenTransferIntentCompressedInstructionDataCodec=ob;exports.getTokenTransferIntentCompressedInstructionDataDecoder=qc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=Dn;exports.getTokenTransferIntentDiscriminatorBytes=qv;exports.getTokenTransferIntentInstruction=Fc;exports.getTokenTransferIntentInstructionAsync=Zv;exports.getTokenTransferIntentInstructionDataCodec=Yv;exports.getTokenTransferIntentInstructionDataDecoder=Gc;exports.getTokenTransferIntentInstructionDataEncoder=Cn;exports.getTransactionBufferAddress=sd;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=Db;exports.getTransactionBufferCloseCompressedInstruction=aa;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Mb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ca;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=oa;exports.getTransactionBufferCloseDiscriminatorBytes=pb;exports.getTransactionBufferCloseInstruction=ta;exports.getTransactionBufferCloseInstructionDataCodec=mb;exports.getTransactionBufferCloseInstructionDataDecoder=ea;exports.getTransactionBufferCloseInstructionDataEncoder=Qc;exports.getTransactionBufferCodec=Ph;exports.getTransactionBufferCreateArgsCodec=$M;exports.getTransactionBufferCreateArgsDecoder=Dt;exports.getTransactionBufferCreateArgsEncoder=Ct;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Vb;exports.getTransactionBufferCreateCompressedInstruction=Sa;exports.getTransactionBufferCreateCompressedInstructionDataCodec=Gb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=fa;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=la;exports.getTransactionBufferCreateDiscriminatorBytes=Ub;exports.getTransactionBufferCreateInstruction=ya;exports.getTransactionBufferCreateInstructionDataCodec=Wb;exports.getTransactionBufferCreateInstructionDataDecoder=ga;exports.getTransactionBufferCreateInstructionDataEncoder=Aa;exports.getTransactionBufferDecoder=Vs;exports.getTransactionBufferDiscriminatorBytes=hh;exports.getTransactionBufferEncoder=ep;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=o_;exports.getTransactionBufferExecuteCompressedInstruction=_a;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=c_;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=ba;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=va;exports.getTransactionBufferExecuteDiscriminatorBytes=Zb;exports.getTransactionBufferExecuteInstruction=Ea;exports.getTransactionBufferExecuteInstructionDataCodec=Xb;exports.getTransactionBufferExecuteInstructionDataDecoder=Ma;exports.getTransactionBufferExecuteInstructionDataEncoder=Da;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=I_;exports.getTransactionBufferExtendCompressedInstruction=Fa;exports.getTransactionBufferExtendCompressedInstructionDataCodec=C_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Ga;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Va;exports.getTransactionBufferExtendDiscriminatorBytes=y_;exports.getTransactionBufferExtendInstruction=wa;exports.getTransactionBufferExtendInstructionDataCodec=p_;exports.getTransactionBufferExtendInstructionDataDecoder=Ba;exports.getTransactionBufferExtendInstructionDataEncoder=Oa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=N_;exports.getTransactionBufferVoteCompressedInstruction=ti;exports.getTransactionBufferVoteCompressedInstructionDataCodec=H_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=ei;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Qa;exports.getTransactionBufferVoteDiscriminatorBytes=b_;exports.getTransactionBufferVoteInstruction=Ya;exports.getTransactionBufferVoteInstructionDataCodec=__;exports.getTransactionBufferVoteInstructionDataDecoder=qa;exports.getTransactionBufferVoteInstructionDataEncoder=ja;exports.getTransactionExecuteCompressedDiscriminatorBytes=tU;exports.getTransactionExecuteCompressedInstruction=yi;exports.getTransactionExecuteCompressedInstructionDataCodec=rU;exports.getTransactionExecuteCompressedInstructionDataDecoder=gi;exports.getTransactionExecuteCompressedInstructionDataEncoder=Ai;exports.getTransactionExecuteDiscriminatorBytes=j_;exports.getTransactionExecuteInstruction=ai;exports.getTransactionExecuteInstructionDataCodec=q_;exports.getTransactionExecuteInstructionDataDecoder=ci;exports.getTransactionExecuteInstructionDataEncoder=oi;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=SU;exports.getTransactionExecuteSyncCompressedInstruction=Ei;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=xU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Mi;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=Di;exports.getTransactionExecuteSyncDiscriminatorBytes=uU;exports.getTransactionExecuteSyncInstruction=Si;exports.getTransactionExecuteSyncInstructionDataCodec=AU;exports.getTransactionExecuteSyncInstructionDataDecoder=fi;exports.getTransactionExecuteSyncInstructionDataEncoder=li;exports.getTransactionMessageAddressTableLookupCodec=oE;exports.getTransactionMessageAddressTableLookupDecoder=Kr;exports.getTransactionMessageAddressTableLookupEncoder=zr;exports.getTransactionMessageCodec=rE;exports.getTransactionMessageDecoder=Et;exports.getTransactionMessageEncoder=Mt;exports.getUserAccountAddress=U;exports.getUserCodec=dE;exports.getUserCreationArgsCodec=yE;exports.getUserCreationArgsDecoder=ge;exports.getUserCreationArgsEncoder=Ae;exports.getUserDecoder=X;exports.getUserEncoder=Le;exports.getUserMutArgsCodec=lE;exports.getUserMutArgsDecoder=pe;exports.getUserMutArgsEncoder=ye;exports.getUserReadOnlyArgsCodec=IE;exports.getUserReadOnlyArgsDecoder=Yr;exports.getUserReadOnlyArgsEncoder=qr;exports.getUserReadOnlyOrMutateArgsCodec=EE;exports.getUserReadOnlyOrMutateArgsDecoder=tt;exports.getUserReadOnlyOrMutateArgsEncoder=et;exports.getUserRoleCodec=bE;exports.getUserRoleDecoder=We;exports.getUserRoleEncoder=Ue;exports.getWalletAddressFromIndex=od;exports.getWalletAddressFromSettings=Ie;exports.getWhitelistedAddressTreeCodec=Uh;exports.getWhitelistedAddressTreeDecoder=js;exports.getWhitelistedAddressTreeDiscriminatorBytes=_h;exports.getWhitelistedAddressTreeEncoder=xp;exports.getWhitelistedAddressTreeFromIndex=On;exports.getWhitelistedAddressTreeIndexFromAddress=ir;exports.getWhitelistedAddressTreesAddress=Zi;exports.identifyMultiWalletAccount=oW;exports.identifyMultiWalletInstruction=cW;exports.initialize=sL;exports.isConfigAction=bD;exports.isMultiWalletError=yW;exports.isUserReadOnlyOrMutateArgs=PE;exports.migrateSettings=ew;exports.migrateUsers=aw;exports.nativeTransferIntent=gk;exports.parseAddWhitelistedAddressTreesInstruction=Qh;exports.parseChangeConfigCompressedInstruction=fP;exports.parseChangeConfigInstruction=dP;exports.parseCompressSettingsAccountInstruction=PP;exports.parseCreateDomainConfigInstruction=wP;exports.parseCreateDomainUserAccountInstruction=jP;exports.parseCreateGlobalCounterInstruction=rR;exports.parseCreateMultiWalletCompressedInstruction=gR;exports.parseCreateUserAccountsInstruction=CR;exports.parseDecompressSettingsAccountInstruction=_R;exports.parseDisableDomainConfigInstruction=NR;exports.parseEditDomainConfigInstruction=YR;exports.parseEditTransactionManagerUrlInstruction=sv;exports.parseMigrateCompressedSettingsInstruction=yv;exports.parseMigrateCompressedUsersInstruction=Cv;exports.parseNativeTransferIntentCompressedInstruction=Vv;exports.parseNativeTransferIntentInstruction=Uv;exports.parseSecp256r1VerifyInstruction=FO;exports.parseTokenTransferIntentCompressedInstruction=ab;exports.parseTokenTransferIntentInstruction=Xv;exports.parseTransactionBufferCloseCompressedInstruction=Eb;exports.parseTransactionBufferCloseInstruction=Tb;exports.parseTransactionBufferCreateCompressedInstruction=Fb;exports.parseTransactionBufferCreateInstruction=Lb;exports.parseTransactionBufferExecuteCompressedInstruction=a_;exports.parseTransactionBufferExecuteInstruction=$b;exports.parseTransactionBufferExtendCompressedInstruction=D_;exports.parseTransactionBufferExtendInstruction=m_;exports.parseTransactionBufferVoteCompressedInstruction=V_;exports.parseTransactionBufferVoteInstruction=U_;exports.parseTransactionExecuteCompressedInstruction=nU;exports.parseTransactionExecuteInstruction=Y_;exports.parseTransactionExecuteSyncCompressedInstruction=IU;exports.parseTransactionExecuteSyncInstruction=gU;exports.pollJitoBundleConfirmation=fO;exports.prepareTransactionBundle=H2;exports.prepareTransactionMessage=Q2;exports.prepareTransactionSync=sN;exports.retrieveTransactionManager=SO;exports.sendJitoBundle=AC;exports.signAndSendBundledTransactions=TO;exports.signAndSendTransaction=lO;exports.signMessageWithPasskey=f2;exports.signTransactionWithPasskey=D2;exports.tokenTransferIntent=Ck;exports.uninitialize=nL;exports.userReadOnlyOrMutateArgs=hE;exports.vaultTransactionMessageDeserialize=bi;exports.vaultTransactionMessageSerialize=vi;exports.verifyMessage=R2;exports.verifyTransactionAuthResponseWithMessageHash=nO;exports.voteTransactionBuffer=Gd;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var gill=require('gill'),ir=require('bn.js'),stateless_js=require('@lightprotocol/stateless.js'),sha2_js=require('@noble/hashes/sha2.js'),web3_js=require('@solana/web3.js'),superstruct=require('superstruct'),programs=require('gill/programs'),tinyCbor=require('@levischuck/tiny-cbor'),nist_js=require('@noble/curves/nist.js'),utils_js=require('@noble/curves/utils.js'),ed25519_js=require('@noble/curves/ed25519.js'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ir__default=/*#__PURE__*/_interopDefault(ir);var On=new Uint8Array([201,232,212,229,59,241,106,197]);function GC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(On)}function Zd(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["authority",gill.getAddressEncoder()],["rpIdHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["bump",gill.getU8Encoder()],["isDisabled",gill.getU8Encoder()],["rpIdLength",gill.getU8Encoder()],["numOrigins",gill.getU8Encoder()],["rpId",gill.fixEncoderSize(gill.getBytesEncoder(),255)],["origins",gill.fixEncoderSize(gill.getBytesEncoder(),515)]]),e=>({...e,discriminator:On}))}function Ln(){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 FC(){return gill.combineCodec(Zd(),Ln())}function Bn(e){return gill.decodeAccount(e,Ln())}async function wn(e,n,r){let s=await Xd(e,n,r);return gill.assertAccountExists(s),s}async function Xd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Bn(s)}async function zC(e,n,r){let s=await $d(e,n,r);return gill.assertAccountsExist(s),s}async function $d(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Bn(t))}function KC(){return 846}var Hn=new Uint8Array([42,206,176,58,175,129,130,233]);function qC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hn)}function gu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Hn}))}function Vn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function YC(){return gill.combineCodec(gu(),Vn())}function Gn(e){return gill.decodeAccount(e,Vn())}async function ZC(e,n,r){let s=await yu(e,n,r);return gill.assertAccountExists(s),s}async function yu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gn(s)}async function XC(e,n,r){let s=await pu(e,n,r);return gill.assertAccountsExist(s),s}async function pu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gn(t))}function $C(){return 24}function yr(){return gill.getStructEncoder([["memberKey",j()],["permissions",Ue()],["verifyArgs",gill.getOptionEncoder(B())],["userArgs",tt()],["delegateOperation",be()]])}function pr(){return gill.getStructDecoder([["memberKey",q()],["permissions",We()],["verifyArgs",gill.getOptionDecoder(w())],["userArgs",rt()],["delegateOperation",_e()]])}function rD(){return gill.combineCodec(yr(),pr())}function mr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Tr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function oD(){return gill.combineCodec(mr(),Tr())}function nt(){return gill.getStructEncoder([["treeInfo",ot()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function st(){return gill.getStructDecoder([["treeInfo",ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function dD(){return gill.combineCodec(nt(),st())}function at(){return gill.getStructEncoder([["treeInfo",ot()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function it(){return gill.getStructDecoder([["treeInfo",ct()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function yD(){return gill.combineCodec(at(),it())}function Ir(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Cr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function TD(){return gill.combineCodec(Ir(),Cr())}function dt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(ut())]])}function Y(){return gill.getStructDecoder([["data",gill.getOptionDecoder(At())]])}function xD(){return gill.combineCodec(dt(),Y())}function ut(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(gt())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function At(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(yt())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function MD(){return gill.combineCodec(ut(),At())}function pt(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Er())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(yr())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Pr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function mt(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(hr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(pr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Rr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function RD(){return gill.combineCodec(pt(),mt())}function vD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function bD(e,n){return n.__kind===e}function vr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",Oe()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",ge()]])}function br(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Le()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",ye()]])}function OD(){return gill.combineCodec(vr(),br())}var Jt=(s=>(s[s.Add=0]="Add",s[s.Remove=1]="Remove",s[s.Ignore=2]="Ignore",s))(Jt||{});function be(){return gill.getEnumEncoder(Jt)}function _e(){return gill.getEnumDecoder(Jt)}function wD(){return gill.combineCodec(be(),_e())}function Er(){return gill.getStructEncoder([["memberKey",j()],["permissions",Ue()],["userArgs",gill.getOptionEncoder(pe())],["delegateOperation",be()]])}function hr(){return gill.getStructDecoder([["memberKey",q()],["permissions",We()],["userArgs",gill.getOptionDecoder(me())],["delegateOperation",_e()]])}function VD(){return gill.combineCodec(Er(),hr())}function Tt(){return gill.getStructEncoder([["memberKey",j()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function ft(){return gill.getStructDecoder([["memberKey",q()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function KD(){return gill.combineCodec(Tt(),ft())}function _r(){return gill.getStructEncoder([["settingsMutArgs",Se()],["transactionManager",gill.getOptionEncoder(pe())]])}function Ur(){return gill.getStructDecoder([["settingsMutArgs",xe()],["transactionManager",gill.getOptionDecoder(me())]])}function YD(){return gill.combineCodec(_r(),Ur())}function gt(){return gill.getStructEncoder([["pubkey",j()],["permissions",Ue()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()]])}function yt(){return gill.getStructDecoder([["pubkey",q()],["permissions",We()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()]])}function QD(){return gill.combineCodec(gt(),yt())}function j(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function q(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function rM(){return gill.combineCodec(j(),q())}function Wr(){return gill.getStructEncoder([["authorityCreationArgs",ge()],["compressedProofArgs",C()]])}function Or(){return gill.getStructDecoder([["authorityCreationArgs",ye()],["compressedProofArgs",D()]])}function cM(){return gill.combineCodec(Wr(),Or())}function lt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function St(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function dM(){return gill.combineCodec(lt(),St())}function ot(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function ct(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function gM(){return gill.combineCodec(ot(),ct())}function Ue(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function We(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function mM(){return gill.combineCodec(Ue(),We())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Ir())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function D(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Cr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function SM(){return gill.combineCodec(C(),D())}function Pr(){return gill.getStructEncoder([["memberKey",j()],["userArgs",tt()]])}function Rr(){return gill.getStructDecoder([["memberKey",q()],["userArgs",rt()]])}function DM(){return gill.combineCodec(Pr(),Rr())}function Lr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function xt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function hM(){return gill.combineCodec(Lr(),xt())}function B(){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 vM(){return gill.combineCodec(B(),w())}function Z(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",B()]])}function X(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",w()]])}function WM(){return gill.combineCodec(Z(),X())}function It(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function Ct(){return gill.getStructDecoder([["addressTreeInfo",St()],["outputStateTreeIndex",gill.getU8Decoder()]])}function wM(){return gill.combineCodec(It(),Ct())}function Br(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function wr(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function HM(){return gill.combineCodec(Br(),wr())}function Se(){return gill.getStructEncoder([["accountMeta",nt()],["data",dt()]])}function xe(){return gill.getStructDecoder([["accountMeta",st()],["data",Y()]])}function zM(){return gill.combineCodec(Se(),xe())}function ee(){return gill.getStructEncoder([["accountMeta",at()],["data",dt()]])}function te(){return gill.getStructDecoder([["accountMeta",it()],["data",Y()]])}function qM(){return gill.combineCodec(ee(),te())}function Dt(){return gill.getStructEncoder([["bufferIndex",gill.getU8Encoder()],["preauthorizeExecution",gill.getBooleanEncoder()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["finalBufferHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["finalBufferSize",gill.getU16Encoder()],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(Tt()))]])}function Mt(){return gill.getStructDecoder([["bufferIndex",gill.getU8Decoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(ft()))]])}function $M(){return gill.combineCodec(Dt(),Mt())}function Et(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(mr())],["addressTableLookups",gill.getArrayEncoder(kr())]])}function ht(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(Tr())],["addressTableLookups",gill.getArrayDecoder(Nr())]])}function rE(){return gill.combineCodec(Et(),ht())}function kr(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function Nr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function oE(){return gill.combineCodec(kr(),Nr())}function Be(){return gill.getStructEncoder([["member",j()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",Oe()],["delegatedTo",gill.getOptionEncoder(Br())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function $(){return gill.getStructDecoder([["member",q()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Le()],["delegatedTo",gill.getOptionDecoder(wr())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function dE(){return gill.combineCodec(Be(),$())}function ge(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ye(){return gill.getStructDecoder([["addressTreeInfo",St()],["outputStateTreeIndex",gill.getU8Decoder()]])}function yE(){return gill.combineCodec(ge(),ye())}function pe(){return gill.getStructEncoder([["accountMeta",nt()],["data",Be()]])}function me(){return gill.getStructDecoder([["accountMeta",st()],["data",$()]])}function fE(){return gill.combineCodec(pe(),me())}function Gr(){return gill.getStructEncoder([["accountMeta",at()],["data",Be()]])}function Fr(){return gill.getStructDecoder([["accountMeta",it()],["data",$()]])}function IE(){return gill.combineCodec(Gr(),Fr())}function tt(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Gr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([pe()])]])]])}function rt(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Fr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([me()])]])]])}function EE(){return gill.combineCodec(tt(),rt())}function hE(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function PE(e,n){return n.__kind===e}var Fe=(t=>(t[t.Member=0]="Member",t[t.PermanentMember=1]="PermanentMember",t[t.TransactionManager=2]="TransactionManager",t[t.Administrator=3]="Administrator",t))(Fe||{});function Oe(){return gill.getEnumEncoder(Fe)}function Le(){return gill.getEnumDecoder(Fe)}function bE(){return gill.combineCodec(Oe(),Le())}var Es=new Uint8Array([223,179,163,190,177,224,67,173]);function lh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Es)}function Py(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()],["members",gill.getArrayEncoder(gt(),{size:4})],["membersLen",gill.getU8Encoder()],["threshold",gill.getU8Encoder()],["multiWalletBump",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()],["padding",gill.fixEncoderSize(gill.getBytesEncoder(),7)]]),e=>({...e,discriminator:Es}))}function hs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(yt(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),7)]])}function Sh(){return gill.combineCodec(Py(),hs())}function Ps(e){return gill.decodeAccount(e,hs())}async function xh(e,n,r){let s=await Jr(e,n,r);return gill.assertAccountExists(s),s}async function Jr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ps(s)}async function Ih(e,n,r){let s=await Ry(e,n,r);return gill.assertAccountsExist(s),s}async function Ry(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ps(t))}function Ch(){return 184}var Us=new Uint8Array([90,36,35,219,93,225,110,96]);function hh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Us)}function qy(){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",j()],["executor",j()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(j())],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(Tt()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Us}))}function Ws(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["multiWalletSettings",gill.getAddressDecoder()],["multiWalletBump",gill.getU8Decoder()],["canExecute",gill.getBooleanDecoder()],["preauthorizeExecution",gill.getBooleanDecoder()],["validTill",gill.getU64Decoder()],["payer",gill.getAddressDecoder()],["bump",gill.getU8Decoder()],["bufferIndex",gill.getU8Decoder()],["finalBufferHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["finalBufferSize",gill.getU16Decoder()],["creator",q()],["executor",q()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder(q())],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(ft()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function Ph(){return gill.combineCodec(qy(),Ws())}function Os(e){return gill.decodeAccount(e,Ws())}async function Ls(e,n,r){let s=await Yy(e,n,r);return gill.assertAccountExists(s),s}async function Yy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Os(s)}async function Rh(e,n,r){let s=await Zy(e,n,r);return gill.assertAccountsExist(s),s}async function Zy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Os(t))}var ks=new Uint8Array([105,23,173,2,197,255,80,87]);function _h(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ks)}function pp(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:ks}))}function Ns(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function Uh(){return gill.combineCodec(pp(),Ns())}function Hs(e){return gill.decodeAccount(e,Ns())}async function Vs(e,n,r){let s=await mp(e,n,r);return gill.assertAccountExists(s),s}async function mp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Hs(s)}async function Wh(e,n,r){let s=await Tp(e,n,r);return gill.assertAccountsExist(s),s}async function Tp(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Hs(t))}function p({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 Fs(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function F(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:F(r.value),role:Gs(r.value)?gill.upgradeRoleToSigner(s):s,...Gs(r.value)?{signer:r.value}:{}})}}function Gs(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Ks=new Uint8Array([7]);function Zh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ks)}function en(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ks}))}function Js(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function Xh(){return gill.combineCodec(en(),Js())}async function js(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:en().encode(c),programAddress:r})}function $h(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:en().encode(c),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:Js().decode(e.data)}}var Xs=new Uint8Array([8]);function cP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xs)}function tn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(pt())],["compressedProofArgs",gill.getOptionEncoder(C())]]),e=>({...e,discriminator:Xs}))}function $s(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(mt())],["compressedProofArgs",gill.getOptionDecoder(D())]])}function aP(){return gill.combineCodec(tn(),$s())}async function Qs(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.settings.value||(t.settings.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getU128Encoder().encode(Fs(c.settingsIndex))]})),t.authority.value||(t.authority.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(F(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:tn().encode(c),programAddress:r})}function iP(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.authority),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:tn().encode(c),programAddress:r})}function dP(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),authority:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:$s().decode(e.data)}}var ro=new Uint8Array([19]);function TP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ro)}function no(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(pt())],["settingsMut",Se()],["compressedProofArgs",C()]]),e=>({...e,discriminator:ro}))}function so(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(mt())],["settingsMut",xe()],["compressedProofArgs",D()]])}function fP(){return gill.combineCodec(no(),so())}function oo(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:no().encode(c),programAddress:r})}function lP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),authority:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:so().decode(e.data)}}var io=new Uint8Array([16]);function EP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(io)}function uo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["settingsMutArgs",Se()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())]]),e=>({...e,discriminator:io}))}function Ao(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["settingsMutArgs",xe()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())]])}function hP(){return gill.combineCodec(uo(),Ao())}function go(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}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:uo().encode(c),programAddress:r})}function PP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ao().decode(e.data)}}var xo=new Uint8Array([0]);function OP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xo)}function nn(){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",ge()],["compressedProofArgs",C()]]),e=>({...e,discriminator:xo}))}function Io(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["rpId",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["origins",gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["authorityCreationArgs",ye()],["compressedProofArgs",D()]])}function LP(){return gill.combineCodec(nn(),Io())}async function Co(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:nn().encode(c),programAddress:r})}function BP(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:nn().encode(c),programAddress:r})}function wP(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{domainConfig:r(),payer:r(),authority:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Io().decode(e.data)}}var Mo=new Uint8Array([4]);function zP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function on(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",Lr()],["role",Oe()],["userAccountCreationArgs",ge()],["linkWalletArgs",gill.getOptionEncoder(_r())]]),e=>({...e,discriminator:Mo}))}function Eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["member",xt()],["role",Le()],["userAccountCreationArgs",ye()],["linkWalletArgs",gill.getOptionDecoder(Ur())]])}function KP(){return gill.combineCodec(on(),Eo())}async function ho(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:on().encode(c),programAddress:r})}function JP(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:on().encode(c),programAddress:r})}function jP(e){if(e.accounts.length<4)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:r(),authority:r(),whitelistedAddressTrees:r()},data:Eo().decode(e.data)}}var Ro=new Uint8Array([3]);function QP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ro)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Ro}))}function vo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function eR(){return gill.combineCodec(an(),vo())}async function bo(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=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:an().encode({}),programAddress:r})}function tR(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=p(c),a=m(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:an().encode({}),programAddress:r})}function rR(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:vo().decode(e.data)}}var Wo=new Uint8Array([18]);function dR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wo)}function dn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["compressedProofArgs",C()],["settingsCreation",It()],["userMutArgs",pe()],["settingsIndex",gill.getU128Encoder()],["delegateOperation",be()]]),e=>({...e,discriminator:Wo}))}function Oo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["compressedProofArgs",D()],["settingsCreation",Ct()],["userMutArgs",me()],["settingsIndex",gill.getU128Decoder()],["delegateOperation",_e()]])}function uR(){return gill.combineCodec(dn(),Oo())}async function Lo(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},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:dn().encode(c),programAddress:r})}function AR(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},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},globalCounter:{value:e.globalCounter??null,isWritable:true},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.initialMember),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),o(t.globalCounter),o(t.whitelistedAddressTrees),...a],data:dn().encode(c),programAddress:r})}function gR(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),initialMember:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s(),globalCounter:r(),whitelistedAddressTrees:r()},data:Oo().decode(e.data)}}var wo=new Uint8Array([5]);function SR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wo)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(vr())]]),e=>({...e,discriminator:wo}))}function ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayDecoder(br())]])}function xR(){return gill.combineCodec(An(),ko())}async function No(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:An().encode(c),programAddress:r})}function IR(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:An().encode(c),programAddress:r})}function CR(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:ko().decode(e.data)}}var Go=new Uint8Array([17]);function vR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Go)}function Fo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",Se()],["compressedProofArgs",C()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())]]),e=>({...e,discriminator:Go}))}function zo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",xe()],["compressedProofArgs",D()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())]])}function bR(){return gill.combineCodec(Fo(),zo())}function Ko(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Fo().encode(c),programAddress:r})}function _R(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:zo().decode(e.data)}}var qo=new Uint8Array([2]);function wR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(qo)}function Yo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:qo}))}function Zo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function kR(){return gill.combineCodec(Yo(),Zo())}function Xo(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:Yo().encode(c),programAddress:r})}function NR(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:Zo().decode(e.data)}}var tc=new Uint8Array([1]);function JR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tc)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder(Wr())]]),e=>({...e,discriminator:tc}))}function rc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Or())]])}function jR(){return gill.combineCodec(yn(),rc())}async function qR(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:yn().encode(c),programAddress:r})}function nc(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:yn().encode(c),programAddress:r})}function YR(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:rc().decode(e.data)}}var cc=new Uint8Array([6]);function rv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(cc)}function ac(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",pe()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",C()]]),e=>({...e,discriminator:cc}))}function ic(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",me()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",D()]])}function nv(){return gill.combineCodec(ac(),ic())}function dc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:false}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:ac().encode(c),programAddress:r})}function sv(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:ic().decode(e.data)}}var gc=new Uint8Array([32]);function Av(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(gc)}function yc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",ut()],["compressedProofArgs",C()],["settingsCreationArgs",It()]]),e=>({...e,discriminator:gc}))}function pc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",At()],["compressedProofArgs",D()],["settingsCreationArgs",Ct()]])}function gv(){return gill.combineCodec(yc(),pc())}function mc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:yc().encode(c),programAddress:r})}function yv(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:pc().decode(e.data)}}var lc=new Uint8Array([31]);function xv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lc)}function Sc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Be()],["compressedProofArgs",C()],["userCreationArgs",ge()]]),e=>({...e,discriminator:lc}))}function xc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",$()],["compressedProofArgs",D()],["userCreationArgs",ye()]])}function Iv(){return gill.combineCodec(Sc(),xc())}function Ic(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.authority),...a],data:Sc().encode(c),programAddress:r})}function Cv(e){if(e.accounts.length<1)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{authority:r()},data:xc().decode(e.data)}}var Dc=new Uint8Array([29]);function vv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Dc)}function pn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())]]),e=>({...e,discriminator:Dc}))}function Mc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())]])}function bv(){return gill.combineCodec(pn(),Mc())}async function _v(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(F(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:pn().encode(c),programAddress:r})}function Ec(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:pn().encode(c),programAddress:r})}function Uv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Mc().decode(e.data)}}var Rc=new Uint8Array([27]);function Nv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Rc)}function vc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Rc}))}function bc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function Hv(){return gill.combineCodec(vc(),bc())}function _c(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:vc().encode(c),programAddress:r})}function Vv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:bc().decode(e.data)}}var Wc=new Uint8Array([30]);function qv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wc)}function Tn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())]]),e=>({...e,discriminator:Wc}))}function Oc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())]])}function Yv(){return gill.combineCodec(Tn(),Oc())}async function Zv(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.source.value||(t.source.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,95,119,97,108,108,101,116])),gill.getAddressEncoder().encode(F(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(F(t.source.value)),gill.getAddressEncoder().encode(F(t.tokenProgram.value)),gill.getAddressEncoder().encode(F(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(F(t.destination.value)),gill.getAddressEncoder().encode(F(t.tokenProgram.value)),gill.getAddressEncoder().encode(F(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Tn().encode(c),programAddress:r})}function Lc(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:Tn().encode(c),programAddress:r})}function Xv(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===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Oc().decode(e.data)}}var Nc=new Uint8Array([28]);function sb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Nc)}function fn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Nc}))}function Hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function ob(){return gill.combineCodec(fn(),Hc())}async function cb(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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.sourceTokenAccount.value||(t.sourceTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(F(t.source.value)),gill.getAddressEncoder().encode(F(t.tokenProgram.value)),gill.getAddressEncoder().encode(F(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(F(t.destination.value)),gill.getAddressEncoder().encode(F(t.tokenProgram.value)),gill.getAddressEncoder().encode(F(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:fn().encode(c),programAddress:r})}function Vc(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},sourceTokenAccount:{value:e.sourceTokenAccount??null,isWritable:true},destination:{value:e.destination??null,isWritable:false},destinationTokenAccount:{value:e.destinationTokenAccount??null,isWritable:true},tokenProgram:{value:e.tokenProgram??null,isWritable:false},mint:{value:e.mint??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},associatedTokenProgram:{value:e.associatedTokenProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.tokenProgram.value||(t.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.sourceTokenAccount),o(t.destination),o(t.destinationTokenAccount),o(t.tokenProgram),o(t.mint),o(t.systemProgram),o(t.associatedTokenProgram),...a],data:fn().encode(c),programAddress:r})}function ab(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===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),sourceTokenAccount:r(),destination:r(),destinationTokenAccount:r(),tokenProgram:r(),mint:r(),systemProgram:r(),associatedTokenProgram:r()},data:Hc().decode(e.data)}}var zc=new Uint8Array([12]);function pb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zc)}function Kc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:zc}))}function Jc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function mb(){return gill.combineCodec(Kc(),Jc())}function jc(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},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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Kc().encode(c),programAddress:r})}function Tb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:Jc().decode(e.data)}}var Zc=new Uint8Array([23]);function Db(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Zc)}function Xc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:Zc}))}function $c(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function Mb(){return gill.combineCodec(Xc(),$c())}function Qc(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.rentCollector),o(t.domainConfig),o(t.transactionBuffer),o(t.closer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Xc().encode(c),programAddress:r})}function Eb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),rentCollector:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:$c().decode(e.data)}}var ra=new Uint8Array([9]);function Ub(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ra)}function na(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:ra}))}function sa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Mt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Wb(){return gill.combineCodec(na(),sa())}function oa(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:na().encode(c),programAddress:r})}function Ob(e){if(e.accounts.length<8)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:sa().decode(e.data)}}var ia=new Uint8Array([20]);function Vb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ia)}function da(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Dt()],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:ia}))}function ua(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",Mt()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function Gb(){return gill.combineCodec(da(),ua())}function Aa(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.creator),o(t.systemProgram),o(t.instructionsSysvar),o(t.slotHashSysvar),...a],data:da().encode(c),programAddress:r})}function Fb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:ua().decode(e.data)}}var pa=new Uint8Array([13]);function Zb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pa)}function ma(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:pa}))}function Ta(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Xb(){return gill.combineCodec(ma(),Ta())}function fa(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:ma().encode(c),programAddress:r})}function $b(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ta().decode(e.data)}}var xa=new Uint8Array([24]);function o_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xa)}function Ia(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:xa}))}function Ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function c_(){return gill.combineCodec(Ia(),Ca())}function Da(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.executor),o(t.transactionBuffer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ia().encode(c),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===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),executor:s(),transactionBuffer:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ca().decode(e.data)}}var ha=new Uint8Array([11]);function y_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ha)}function Pa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:ha}))}function Ra(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function p_(){return gill.combineCodec(Pa(),Ra())}function va(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:Pa().encode(c),programAddress:r})}function m_(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:Ra().decode(e.data)}}var Ua=new Uint8Array([22]);function I_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ua)}function Wa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:Ua}))}function Oa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["settingsKey",gill.getAddressDecoder()]])}function C_(){return gill.combineCodec(Wa(),Oa())}function La(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Wa().encode(c),programAddress:r})}function D_(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:Oa().decode(e.data)}}var ka=new Uint8Array([10]);function b_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ka)}function Na(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())]]),e=>({...e,discriminator:ka}))}function Ha(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function __(){return gill.combineCodec(Na(),Ha())}function Va(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Na().encode(c),programAddress:r})}function U_(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ha().decode(e.data)}}var za=new Uint8Array([21]);function N_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(za)}function Ka(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(B())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:za}))}function Ja(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function H_(){return gill.combineCodec(Ka(),Ja())}function ja(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.transactionBuffer),o(t.voter),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ka().encode(c),programAddress:r})}function V_(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),voter:s(),systemProgram:r(),slotHashSysvar:s(),instructionsSysvar:s()},data:Ja().decode(e.data)}}var Za=new Uint8Array([14]);function j_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Za)}function Xa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Za}))}function $a(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function q_(){return gill.combineCodec(Xa(),$a())}function Qa(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=p({}),a=m(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:Xa().encode({}),programAddress:r})}function Y_(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:$a().decode(e.data)}}var ri=new Uint8Array([25]);function tU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ri)}function ni(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:ri}))}function si(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function rU(){return gill.combineCodec(ni(),si())}function oi(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=p({args:c}),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:ni().encode(c),programAddress:r})}function nU(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:si().decode(e.data)}}var ii=new Uint8Array([15]);function uU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ii)}function di(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())]]),e=>({...e,discriminator:ii}))}function ui(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",ht()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())]])}function AU(){return gill.combineCodec(di(),ui())}function Ai(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:di().encode(c),programAddress:r})}function gU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:ui().decode(e.data)}}var pi=new Uint8Array([26]);function SU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(pi)}function mi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Et()],["secp256r1VerifyArgs",gill.getArrayEncoder(Z())],["settingsReadonlyArgs",ee()],["compressedProofArgs",C()]]),e=>({...e,discriminator:pi}))}function Ti(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",ht()],["secp256r1VerifyArgs",gill.getArrayDecoder(X())],["settingsReadonlyArgs",te()],["compressedProofArgs",D()]])}function xU(){return gill.combineCodec(mi(),Ti())}function fi(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=p(i),o=m(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:mi().encode(c),programAddress:r})}function IU(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),slotHashSysvar:s(),instructionsSysvar:r()},data:Ti().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",JS=(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))(JS||{});function oW(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 jS=(T=>(T[T.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",T[T.ChangeConfig=1]="ChangeConfig",T[T.ChangeConfigCompressed=2]="ChangeConfigCompressed",T[T.CompressSettingsAccount=3]="CompressSettingsAccount",T[T.CreateDomainConfig=4]="CreateDomainConfig",T[T.CreateDomainUserAccount=5]="CreateDomainUserAccount",T[T.CreateGlobalCounter=6]="CreateGlobalCounter",T[T.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",T[T.CreateUserAccounts=8]="CreateUserAccounts",T[T.DecompressSettingsAccount=9]="DecompressSettingsAccount",T[T.DisableDomainConfig=10]="DisableDomainConfig",T[T.EditDomainConfig=11]="EditDomainConfig",T[T.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",T[T.MigrateCompressedSettings=13]="MigrateCompressedSettings",T[T.MigrateCompressedUsers=14]="MigrateCompressedUsers",T[T.NativeTransferIntent=15]="NativeTransferIntent",T[T.NativeTransferIntentCompressed=16]="NativeTransferIntentCompressed",T[T.TokenTransferIntent=17]="TokenTransferIntent",T[T.TokenTransferIntentCompressed=18]="TokenTransferIntentCompressed",T[T.TransactionBufferClose=19]="TransactionBufferClose",T[T.TransactionBufferCloseCompressed=20]="TransactionBufferCloseCompressed",T[T.TransactionBufferCreate=21]="TransactionBufferCreate",T[T.TransactionBufferCreateCompressed=22]="TransactionBufferCreateCompressed",T[T.TransactionBufferExecute=23]="TransactionBufferExecute",T[T.TransactionBufferExecuteCompressed=24]="TransactionBufferExecuteCompressed",T[T.TransactionBufferExtend=25]="TransactionBufferExtend",T[T.TransactionBufferExtendCompressed=26]="TransactionBufferExtendCompressed",T[T.TransactionBufferVote=27]="TransactionBufferVote",T[T.TransactionBufferVoteCompressed=28]="TransactionBufferVoteCompressed",T[T.TransactionExecute=29]="TransactionExecute",T[T.TransactionExecuteCompressed=30]="TransactionExecuteCompressed",T[T.TransactionExecuteSync=31]="TransactionExecuteSync",T[T.TransactionExecuteSyncCompressed=32]="TransactionExecuteSyncCompressed",T))(jS||{});function cW(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([7])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([19])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 3;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([0])),0))return 4;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([4])),0))return 5;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([3])),0))return 6;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([18])),0))return 7;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([5])),0))return 8;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),0))return 9;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([2])),0))return 10;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([1])),0))return 11;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([6])),0))return 12;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 32;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var YS=6e3,ZS=6001,XS=6002,$S=6003,QS=6004,ex=6005,tx=6006,rx=6007,nx=6008,sx=6009,ox=6010,cx=6011,ax=6012,ix=6013,dx=6014,ux=6015,Ax=6016,gx=6017,yx=6018,px=6019,mx=6020,Tx=6021,fx=6022,lx=6023,Sx=6024,xx=6025,Ix=6026,Cx=6027,Dx=6028,Mx=6029,Ex=6030,hx=6031,Px=6032,Rx=6033,vx=6034,bx=6035,_x=6036,Ux=6037,Wx=6038,Ox=6039,Lx=6040,Bx=6041,wx=6042,kx=6043,Nx=6044,Hx=6045,Vx=6046,Gx=6047,Fx=6048,zx=6049,Kx=6050,Jx=6051,li;process.env.NODE_ENV!=="production"&&(li={[Mx]:"This member is already delegated to another wallet.",[rx]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[Gx]:"The domain configuration account is disabled. Please contact support or try again later.",[Fx]:"Missing domain configuration account.",[ox]:"Duplicate public keys detected among members. Each member must have a unique key.",[sx]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[px]:"No members provided. A multisig wallet must contain at least one member.",[gx]:"Expected a User with Administrator role for this instruction.",[nx]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[ux]:"Expected a User with Transaction Manager role for this instruction.",[Ux]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Wx]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Ox]:"Declared buffer size does not match the actual serialized size.",[Px]:"Not enough members with vote permission to meet the approval threshold.",[Ex]:"At least one signer with execute permission is required to proceed.",[hx]:"At least one signer with initiate permission is required to perform this action.",[Sx]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[Jx]:"Address Tree supplied is not part of the whitelisted address trees",[yx]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[Ix]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[_x]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[lx]:"Unexpected number of accounts provided for this instruction.",[ZS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[QS]:"The extracted public key has an invalid length or encoding.",[YS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[$S]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Hx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[Tx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[Ax]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[dx]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[fx]:"Malformed transaction message: structure or formatting does not match the expected layout.",[xx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[ex]:"The extracted WebAuthn signed message payload is malformed.",[kx]:"An input string exceeds the maximum allowed character length.",[zx]:"This member is not registered under the provided domain configuration.",[Cx]:"A required account is missing from the instruction context.",[Nx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[Dx]:"User mutation arguments are required when performing add or remove delegate operations.",[vx]:"No valid signer found in this transaction.",[ax]:"Only one permanent member is allowed per wallet.",[ix]:"Only one transaction manager is allowed per wallet.",[Kx]:"The given origin index is not in the whitelisted origins.",[cx]:"Permanent members cannot be removed from a wallet.",[wx]:"Writable CPI calls to protected accounts are not permitted.",[tx]:"The rpIdHash extracted from the signed message does not match the expected value.",[XS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Vx]:"The specified slot number was not found in the provided slot history.",[mx]:"Too many members: a maximum of 4 members are supported.",[Lx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Bx]:"This transaction has not yet reached the required approval threshold.",[bx]:"Only the transaction creator or rent payer may close this transaction buffer.",[Rx]:"Member is not part of the expected signers for this transaction."});function gW(e){return process.env.NODE_ENV!=="production"?li[e]:"Error message not available in production bundles."}function yW(e,n,r){return gill.isProgramError(e,n,A,r)}var _t={Ed25519:1,Secp256r1:2};var Ie={InitiateTransaction:1,VoteTransaction:2,ExecuteTransaction:4},Ee=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 xn=33,de=class{_bn;constructor(n){typeof n=="string"?this._bn=new Uint8Array(gill.getBase58Encoder().encode(n)):this._bn=new Uint8Array(n),this.validateKeyLength(this._bn);}validateKeyLength(n){if(n.length!==xn)throw new Error(`Invalid public key length, expected ${xn} 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===xn)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()}},I=class extends de{verifyArgs;domainConfig;authData;signature;originIndex;crossOrigin;clientAndDeviceHash;authResponse;constructor(n,r){super(n),this.verifyArgs=r.verifyArgs,this.domainConfig=r.domainConfig,this.authData=r.authData,this.signature=r.signature,this.originIndex=r.originIndex,this.crossOrigin=r.crossOrigin,this.clientAndDeviceHash=r.clientAndDeviceHash,this.authResponse=r.authResponse;}};function Yx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Zx(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var xi=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Yx())],["addressTableLookups",gill.getArrayCodec(Zx())]]);function Ii(e){return xi.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 Ci(e){let n=xi.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var Di="revibase.com",Mi="https://auth.revibase.com",Ei="https://api.revibase.com";var Ke=null,Pi=2e3,Ri=3e3,Qx=300*1e3;async function er({authUrl:e,signer:n,popUp:r=null,data:s}){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");return new Promise((t,c)=>{let i=new URL(e).origin,a=null,o=setInterval(()=>{r&&r.closed&&(u(),c(new Error("User closed the authentication window")));},500),d=setTimeout(()=>{u(),c(new Error("Authentication timed out"));},Qx);function u(){clearInterval(o),clearTimeout(d),a&&clearTimeout(a),Ke&&window.removeEventListener("message",Ke),r&&r.close();}if(r?r.location.replace(e):r=Ui(e),!r){c(new Error("Disable your popup blocker to continue."));return}let y=g=>{let l=g.origin===i,f=g.source===r;if(!(!l||!f||!g.isTrusted||!r))switch(g.data.type){case "popup-ready":r.postMessage({type:"popup-init",payload:{signer:n?.toString(),data:s}},i),a=setTimeout(()=>{u(),c(new Error("User closed the authentication window"));},Pi+Ri);break;case "popup-complete":try{let M=JSON.parse(g.data.payload);u(),t(M);}catch{c(new Error("Failed to parse response payload"));}break;case "popup-heartbeat":a&&(clearTimeout(a),a=setTimeout(()=>{u(),c(new Error("User closed the authentication window"));},Pi+Ri));break;case "popup-closed":u(),c(new Error("User closed the authentication window"));break}};Ke&&window.removeEventListener("message",Ke),Ke=y,window.addEventListener("message",Ke);})}function tr(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ce(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return c}function rr(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function eI(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 vi(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 bi(e,n){let r=[],s=0,t=new TextDecoder;for(let c=0;c<n;c++){if(s+2>e.length)throw new Error("MaxLengthExceeded");let i=e[s]|e[s+1]<<8;if(s+=2,s+i>e.length)throw new Error("MaxLengthExceeded");let a=e.slice(s,s+i),o=t.decode(a);r.push(o),s+=i;}return r}function _i(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 U=n&127;r+=U;}if(e[r]!==2)throw new Error("Expected INTEGER for r");let s=e[r+1],t=r+2,c=e.slice(t,t+s);if(r=t+s,e[r]!==2)throw new Error("Expected INTEGER for s");let i=e[r+1],a=r+2,o=e.slice(a,a+i),d=c[0]===0&&c.length>32?c.slice(1):c,u=o[0]===0&&o.length>32?o.slice(1):o;if(d.length>32||u.length>32)throw new Error("r or s length > 32 bytes");let y=new Uint8Array(32);y.set(d,32-d.length);let g=nist_js.p256.Point.CURVE().n>>1n,l=BigInt("0x"+rr(u)),M=(l>g?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),E=eI(M);return new Uint8Array([...y,...E])}function Ui(e=`${Pe()}/loading`){if(typeof window>"u")throw new Error("Function can only be called in a browser environment");let n=window.innerWidth||screen.availWidth,r=window.innerHeight||screen.availHeight,s=n<=768,t,c,i,a;if(s)t=n,c=r,i=0,a=0;else {let u=window.screenLeft??window.screenX,y=window.screenTop??window.screenY,g=window.innerWidth??document.documentElement.clientWidth??screen.width,l=window.innerHeight??document.documentElement.clientHeight??screen.height;t=500,c=600,a=u+(g-t)/2,i=y+(l-c)/2;}let o=[`width=${t}`,`height=${c}`,`top=${i}`,`left=${a}`,"toolbar=no","location=no","status=no","menubar=no","scrollbars=yes","resizable=yes"].join(","),d=window.open(e,"_blank",o);return d&&d.focus(),d}function oO(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+rr(n.get(-2))),y:BigInt("0x"+rr(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Li(e){let r=nist_js.p256.Point.fromBytes(new Uint8Array(gill.getBase58Encoder().encode(e))).toBytes(false),s=new Map;return s.set(1,2),s.set(3,-7),s.set(-1,1),s.set(-2,r.slice(1,33)),s.set(-3,r.slice(33,65)),new Uint8Array(tinyCbor.encodeCBOR(s))}async function cO(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Ce(n)),c=JSON.parse(new TextDecoder().decode(Ce(r))),i=vi(c),a=_i(new Uint8Array(Ce(s))),o=await Je({rpIdHash:t.subarray(0,32)});return new I(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Ce(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:sr(e.clientId,e.deviceSignature.publicKey),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}function aO(e,n){let{authResponse:r,transactionPayload:s,slotHash:t,clientId:c,deviceSignature:i}=e,{response:{clientDataJSON:a}}=r,o=JSON.parse(new TextDecoder().decode(Ce(a))),{transactionActionType:d,transactionAddress:u,transactionMessageBytes:y}=s,g=sha2_js.sha256(new Uint8Array([...gill.getUtf8Encoder().encode(d),...gill.getAddressEncoder().encode(gill.address(u)),...sha2_js.sha256(new Uint8Array(gill.getBase64Encoder().encode(y))),...gill.getBase58Encoder().encode(t),...sr(c,i.publicKey)]));if(!utils_js.equalBytes(new Uint8Array(Ce(o.challenge)),g))throw new Error("Invalid challenge");let l=Wt(r);if(!utils_js.equalBytes(l,n))throw new Error("Invalid message hash")}async function iO(e,n){let{data:r}=await wn(re(),e),t=bi(new Uint8Array(r.origins),r.numOrigins).findIndex(c=>c===n);if(t===-1)throw new Error("Origin not found in domain config");return t}function sr(e,n){return sha2_js.sha256(new Uint8Array([...new TextEncoder().encode(e),...gill.getBase58Encoder().encode(n)]))}function Wt(e){return sha2_js.sha256(Cn(e))}function Cn(e){return new Uint8Array([...new Uint8Array(Ce(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Ce(e.response.clientDataJSON)))])}async function Mn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await re().getLatestBlockhash().send()).value;return await Promise.all(e.map(async s=>await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions(s.instructions,c),c=>gill.setTransactionMessageFeePayerSigner(s.payer,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(r,c),c=>s.addressesByLookupTableAddress?gill.compressTransactionMessageUsingAddressLookupTables(c,s.addressesByLookupTableAddress):c,async c=>{let i=Math.ceil((s.unitsConsumed??0)*1.1)||8e5;return i>2e5?gill.prependTransactionMessageInstructions([programs.getSetComputeUnitLimitInstruction({units:i})],c):c},async c=>n?gill.compileTransaction(await c):await gill.signTransactionMessageWithSigners(await c))))}async function ki(e,n){let s=(await e.getRecentPrioritizationFees(n.filter(c=>c.role===gill.AccountRole.WRITABLE||c.role===gill.AccountRole.WRITABLE_SIGNER).map(c=>c.address)).send()).map(c=>Number(c.prioritizationFee));s.sort((c,i)=>c-i);let t=Math.floor(s.length/2);return s.length%2===0?Math.round((s[t-1]+s[t])/2):s[t]}async function Ni(e,n){if(e.length===0)throw new Error("Bundle is empty.");for(let c=0;c<e.length;c++){if(e[c].length>1644)throw new Error(`Transaction ${c} exceeds maximum length, ${e[c].length}. Retry again.`);console.log(`Transaction ${c} length: ${e[c].length}`);}let r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:"2",method:"simulateBundle",params:[{encodedTransactions:e},{skipSigVerify:true,replaceRecentBlockhash:true,preExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]})),postExecutionAccountsConfigs:e.map(()=>({encoding:"base64",addresses:[]}))}]})});if(!r.ok)throw console.error(await r.json()),new Error("Failed to simulate bundle");let{result:s,error:t}=await r.json();if(!s||t)throw console.error(t??s),new Error(`Unable to simulate bundle: ${JSON.stringify(t??s)}`);if(typeof s.value.summary!="string"&&s.value.summary.failed){let{TransactionFailure:c}=s.value.summary.failed.error,[,i]=c;throw console.error(t??s),new Error(`Simulation failed: ${i}`)}return s.value.transactionResults.map(c=>c.unitsConsumed)}function V(e,n=0){let r=e instanceof I?e:void 0,s=r?.verifyArgs&&n!==-1?gill.some({signedMessageIndex:n,truncatedClientDataJson:r.verifyArgs.truncatedClientDataJson,slotNumber:r.verifyArgs.slotNumber,originIndex:r.originIndex,crossOrigin:r.crossOrigin,clientAndDeviceHash:r.clientAndDeviceHash}):null,t=r?.domainConfig?r.domainConfig:void 0,c=r?.verifyArgs?r.signature:void 0,i=r?.authData&&r.verifyArgs?.clientDataJson?Cn(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function je(e){if(e instanceof de)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 wi(e){return e instanceof I?e.toString():e.address.toString()}function ue(e){let n=new Set,r=[];for(let s of e)n.has(wi(s))||(r.push(s),n.add(wi(s)));if(r.filter(s=>s instanceof I).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function Hi({payer:e,tipAmount:n}){let r=["HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe","ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49","96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5","Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY","DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh","ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt","3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT","DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"],s=r[Math.floor(Math.random()*r.length)];return programs.getTransferSolInstruction({source:e,destination:gill.address(s),amount:n})}async function Vi(e){let n=await fetch(`${e}/getRandomPayer`),{randomPayer:r}=await n.json();return {address:gill.address(r),async signTransactions(s){let t={publicKey:r,transactions:s.map(a=>gill.getBase64Decoder().decode(gill.getTransactionEncoder().encode(a)))},i=await(await fetch(`${e}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if("error"in i)throw new Error(i.error);return i.signatures.map(a=>({[gill.address(r)]:gill.getBase58Encoder().encode(a)}))}}}var v={};function qe(){if(!v.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return v.solanaRpcEndpoint}function Ne(){if(!v.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return v.lightProtocolRpc}function re(){if(!v.solanaRpc)throw new Error("Rpc is not initialized yet");return v.solanaRpc}function Gi(){if(!v.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return v.sendAndConfirm}function Fi(){if(!v.computeEstimate)throw new Error("Rpc is not initialized yet");return v.computeEstimate}async function MO(){return v.feePayer||(v.feePayer=await Vi(v.apiEndpoint??Ei)),v.feePayer}function En(){if(!v.jitoTipsConfig)throw new Error("Jito Bundle Config is not set.");return v.jitoTipsConfig}function Pe(){return v.authEndpoint??Mi}function zi(){return v.rpId??Di}function Ye(){if(!v.clientSettings)throw new Error("No client settings found.");return v.clientSettings}function EO(){Object.keys(v).forEach(e=>{v[e]=void 0;});}function hO({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,rpId:i,clientSettings:a}){v.solanaRpcEndpoint=e,v.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:o,sendAndConfirmTransaction:d}=gill.createSolanaClient({urlOrMoniker:e});v.solanaRpc=o,v.sendAndConfirm=d,v.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:o}),v.apiEndpoint=t??null,v.jitoTipsConfig=s??null,v.authEndpoint=c??null,v.rpId=i??null,v.clientSettings=a??null;}var _=class{preAccounts;systemAccounts;nextIndex;map;outputTreeIndex;constructor(){this.preAccounts=[],this.systemAccounts=[],this.nextIndex=0,this.map=new Map,this.outputTreeIndex=-1;}addPreAccounts(n){this.preAccounts.push(...n);}getAccountRole(n,r){return n?r?gill.AccountRole.WRITABLE_SIGNER:gill.AccountRole.READONLY_SIGNER:r?gill.AccountRole.WRITABLE:gill.AccountRole.READONLY}async addSystemAccounts(){this.systemAccounts.push(...stateless_js.getLightSystemAccountMetasV2({selfProgram:new web3_js.PublicKey(A.toString())}).map(n=>({address:gill.address(n.pubkey.toString()),role:this.getAccountRole(n.isSigner,n.isWritable)})));}insertOrGet(n){return this.insertOrGetConfig(n,gill.AccountRole.WRITABLE)}insertOrGetConfig(n,r){if(!this.map.has(n)){let s=this.nextIndex++,t={address:gill.address(n),role:r};this.map.set(n,{index:s,accountMeta:t});}return this.map.get(n).index}packOutputTreeIndex(n){if(n.treeType===stateless_js.TreeType.StateV1)return this.insertOrGet(n.tree.toString());if(n.treeType===stateless_js.TreeType.StateV2)return this.insertOrGet(n.queue.toString());throw new Error("Tree type not supported")}async getOutputTreeIndex(){if(this.outputTreeIndex!==-1)return this.outputTreeIndex;let n=qe().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().getStateTreeInfos(),r=stateless_js.selectStateTreeInfo(n);return this.packOutputTreeIndex(r)}packTreeInfos(n,r){let s=[],t=[];for(let c of n){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());s.push({rootIndex:c.rootIndex,merkleTreePubkeyIndex:i,queuePubkeyIndex:a,leafIndex:c.leafIndex,proveByIndex:c.proveByIndex});let o=c.treeInfo.nextTreeInfo??c.treeInfo,d=this.packOutputTreeIndex(o);this.outputTreeIndex===-1&&(this.outputTreeIndex=d);}for(let c of r){let i=this.insertOrGet(c.treeInfo.tree.toString()),a=this.insertOrGet(c.treeInfo.queue.toString());t.push({rootIndex:c.rootIndex,addressMerkleTreePubkeyIndex:i,addressQueuePubkeyIndex:a});}return {stateTrees:s.length>0?{packedTreeInfos:s,outputTreeIndex:this.outputTreeIndex}:void 0,addressTrees:t}}hashSetAccountsToMetas(){return Array.from(this.map.entries()).sort((r,s)=>r[1].index-s[1].index).map(([,{accountMeta:r}])=>({...r}))}getOffsets(){let n=this.preAccounts.length,r=n+this.systemAccounts.length;return [n,r]}toAccountMetas(){let n=this.hashSetAccountsToMetas(),[r,s]=this.getOffsets();return {remainingAccounts:[...this.preAccounts,...this.systemAccounts,...n],systemOffset:r,packedOffset:s}}};async function or(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await ji(e);return s&&n?.set(e.toString(),s),s}}async function ae(e,n){let s=(await Promise.all(e.map(async t=>or(t.address,n)))).filter(t=>t!==null).filter(t=>t.data!==null&&t.address!==null);if(s.length!==e.length)throw new Error("Unable to find compressed account.");return s.map((t,c)=>({...t,type:e[c].type,tree:t.treeInfo.tree,queue:t.treeInfo.queue}))}function b(e,n){return {proof:e?.compressedProof?gill.some({a:new Uint8Array(e.compressedProof.a),b:new Uint8Array(e.compressedProof.b),c:new Uint8Array(e.compressedProof.c)}):null,lightCpiAccountsStartIndex:n}}async function se(e,n,r,s,t){if(t.length===0)return [];let c=t.map((d,u)=>({treeInfo:n[u],root:r[u],rootIndex:s[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 oe(e,n,r,s,t,c,i){let a=[];for(let u=0;u<n.length;u++)a.push({treeInfo:n[u],rootIndex:s[u],leafIndex:r[u],proveByIndex:t[u],hash:c[u].hash});let o=e.packTreeInfos(a,[]).stateTrees;if(!o)throw new Error("Unable to parsed data.");return c.map((u,y)=>({data:i.decode(u.data.data),accountMeta:{treeInfo:o.packedTreeInfos[y],address:new Uint8Array(u.address),outputStateTreeIndex:o.outputTreeIndex}}))}async function fe(e,n,r,s,t){let c=null,i=null,a=new _;if(e){await a.addSystemAccounts();let{address:o}=await Q(n,r),d=(await ae([{address:o,type:"Settings"}],t))[0];s?i={rootIndices:[0],roots:[],leafIndices:[d.leafIndex],leaves:[],treeInfos:[d.treeInfo],proveByIndices:[d.proveByIndex],compressedProof:{a:Array.from(crypto.getRandomValues(new Uint8Array(32))),b:Array.from(crypto.getRandomValues(new Uint8Array(32))),c:Array.from(crypto.getRandomValues(new Uint8Array(32)))}}:i=await k([d],[]);let u=a.packTreeInfos([{treeInfo:i.treeInfos[0],rootIndex:i.rootIndices[0],leafIndex:i.leafIndices[0],proveByIndex:i.proveByIndices[0],hash:d.hash}],[]).stateTrees;if(!u)throw new Error("Unable to parsed data.");c={accountMeta:{address:new Uint8Array(d.address),treeInfo:u.packedTreeInfos[0]},data:Y().decode(d.data?.data)};}return {settingsReadonlyArgs:c,proof:i,packedAccounts:a}}async function k(e,n,r=10,s=400){let t=1;for(;t<r;)try{return await Ne().getValidityProofV0(e,n)}catch(c){if(console.error(`Attempt ${t}, Get Validity Proof failed. ${c}`),t++,t>=r)throw new Error(`Failed to get validity proof after ${r} attempts: ${c}`);await new Promise(i=>setTimeout(i,s));}throw new Error(`Failed to get validity proof after ${r} attempts`)}async function le(){return (await cr()).length-1}var hn;async function cr(){if(!hn){let{data:e}=await Vs(re(),await qi());hn=e.whitelistedAddressTrees;}return hn}async function Qi(e,n,r){let s=await KI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function KI(e,n,r){let{address:s}=await W(e,n),t=await or(s,r);return t?.data?.data?$().decode(t.data.data):null}async function ed(e,n,r){let s=await JI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function JI(e,n,r){try{let{address:s}=await Q(e,n),t=await or(s,r);if(!t?.data?.data)return null;let c=Y().decode(t.data.data);return c.data.__option==="None"?null:{...c.data.value,isCompressed:!0}}catch{let s=await Jr(re(),await ne(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function Pn(e){let n=await cr();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function $O(e){let r=(await cr()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function ji(e){let n=await stateless_js.rpcRequest(Ne().compressionApiEndpoint,stateless_js.versionedEndpoint("getCompressedAccount"),{hash:void 0,address:e?stateless_js.encodeBN254toBase58(e):void 0}),r;if(stateless_js.featureFlags.isV2()?r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResultV2))):r=superstruct.create(n,stateless_js.jsonRpcResultAndContext(superstruct.nullable(stateless_js.CompressedAccountResult))),"error"in r)throw new web3_js.SolanaJSONRPCError(r.error,`failed to get info for compressed account ${e?e.toString():""}`);if(r.result.value===null)return null;let s=stateless_js.featureFlags.isV2()?r.result.value.merkleContext.tree:r.result.value.tree,t=qe().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Ne().getStateTreeInfos(),c=stateless_js.getStateTreeInfoByPubkey(t,s),i=r.result.value;return stateless_js.createCompressedAccountWithMerkleContextLegacy(stateless_js.createMerkleContextLegacy(c,i.hash,i.leafIndex),i.owner,stateless_js.bn(i.lamports),i.data?stateless_js.parseAccountData(i.data):void 0,i.address||void 0)}async function Q(e,n=0){let r=await Pn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function W(e,n=0){let r=await Pn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof de?e.toTruncatedBuffer():new Uint8Array(gill.getAddressEncoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A.toString())).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function Je({rpIdHash:e,rpId:n}){if(!e)if(n)e=sha2_js.sha256(new Uint8Array(gill.getUtf8Encoder().encode(n)));else throw new Error("RpId not found.");if(!e)throw new Error("RpIdHash not found.");let[r]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("domain_config"),e]});return r}async function od(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function qi(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function cd(e,n,r){if(r>255)throw new Error("Index cannot be greater than 255.");let[s]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getAddressEncoder().encode(e),gill.getUtf8Encoder().encode("transaction_buffer"),n instanceof de?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function De(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 ne(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function ad(e){let n=await ne(e);return await De(n)}async function aL(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function xL(e){let n=await Mn(e,true),r=await Ni(n.map(gill.getBase64EncodedWireTransaction),qe()),s=await Mn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await iC(s.map(gill.getBase64EncodedWireTransaction))}async function IL({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await re().getLatestBlockhash().send(),t=await gill.pipe(gill.createTransactionMessage({version:0}),c=>gill.appendTransactionMessageInstructions([...e],c),c=>gill.setTransactionMessageFeePayerSigner(n,c),c=>gill.setTransactionMessageLifetimeUsingBlockhash(s.value,c),c=>r?gill.compressTransactionMessageUsingAddressLookupTables(c,r):c,async c=>{let[i,a]=await Promise.all([Fi()(c),ki(re(),c.instructions.flatMap(d=>d.accounts??[]))]),o=Math.ceil(i*1.1);return gill.prependTransactionMessageInstructions([...o>2e5?[programs.getSetComputeUnitLimitInstruction({units:o})]:[],...a>0?[programs.getSetComputeUnitPriceInstruction({microLamports:a})]:[]],c)},async c=>await gill.signTransactionMessageWithSigners(await c));return await Gi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function iC(e,n=10,r=1e3,s=En()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/bundles`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"sendBundle",params:[e,{encoding:"base64"}]})});if(i.status===429&&c<n){await new Promise(o=>setTimeout(o,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);return a.result}throw new Error("Failed to send bundle after retries.")}async function CL(e,n=30,r=3e3,s=En()){let{blockEngineUrl:t}=s;for(let c=1;c<=n;c++){let i=await fetch(`${t}/getBundleStatuses`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBundleStatuses",params:[[e]]})});if(i.status===429&&c<n){await new Promise(d=>setTimeout(d,r));continue}let a=await i.json();if(a.error)throw new Error(`Error sending bundles: ${JSON.stringify(a.error,null,2)}`);let o=a.result;if(o.value.length){let d=o.value[0];if(d.confirmation_status==="confirmed"||d.confirmation_status==="finalized")return d.transactions[d.transactions.length-1]}if(c<n){await new Promise(d=>setTimeout(d,r));continue}}throw new Error("Failed to get bundle status after retries.")}async function DL(e,n,r,s){let t=await ed(n,r,s);if(t.threshold>1)throw new Error("Multi-signature transactions with threshold > 1 are not supported yet.");let{permissions:c}=t.members.find(u=>ud(u.pubkey)===e.toString())??{};if(!c)throw new Error("No permissions found for the current member.");let i=Ee.has(c,Ie.InitiateTransaction),a=Ee.has(c,Ie.VoteTransaction),o=Ee.has(c,Ie.ExecuteTransaction);if(i&&a&&o)return {};if(!a||!o)throw new Error("Signer lacks the required Vote/Execute permissions.");let d=t.members.find(u=>u.role===2);if(!d)throw new Error("No transaction manager available in wallet.");return {transactionManagerAddress:gill.address(ud(d.pubkey)),userAddressTreeIndex:d.userAddressTreeIndex}}async function ML({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await Qi(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return dC(n,c.transactionManagerUrl.value,e,s)}function dC(e,n,r,s){return {address:e,async signTransactions(t){let c={publicKey:e.toString(),transactions:t.map(gill.getBase64EncodedWireTransaction)};if(s&&(c.transactionMessageBytes=gill.getBase64Decoder().decode(s)),r){let{clientId:o,signClientMessage:d}=Ye();c.authResponses=await Promise.all(r.map(async u=>({...u,clientSignature:{clientId:o,signature:(await d("complete",gill.getBase64Decoder().decode(Wt(u.authResponse)))).signature}})));}let a=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json();if("error"in a)throw new Error(a.error);return a.signatures.map(o=>({[e]:gill.getBase58Encoder().encode(o)}))}}}function ud(e){return e.keyType===_t.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function FL({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let{addDelegates:i,removeDelegates:a}=await AC(r),o=new _,d=null,u=null,y=[];if(i.length||a.length||t){let S=await gC({packedAccounts:o,addDelegates:i,removeDelegates:a,compressed:t,index:e,settingsAddressTreeIndex:n,cachedAccounts:c});d=S.proof,u=S.settingsMutArgs??null,y=S.userMutArgs??[];}let{configActions:g,secp256r1VerifyInput:l}=await yC({configActionsArgs:r,packedAccounts:o,userMutArgs:y}),{remainingAccounts:f,systemOffset:M}=o.toAccountMetas(),E=b(d,M);return {instructions:t?[oo({configActions:g,payer:s,authority:gill.createNoopSigner(await ad(e)),compressedProofArgs:E,settingsMut:u,remainingAccounts:f})]:[await Qs({settingsIndex:e,configActions:g,payer:s,compressedProofArgs:E,remainingAccounts:f})],secp256r1VerifyInput:l}}async function AC(e){let n=[],r=[];for(let s of e)switch(s.type){case "AddMembers":{let t=s.members.map(i=>W(i.member instanceof I?i.member:i.delegateOperation===0?i.member.address:i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i of c)n.push({address:i.address,type:"User"});break}case "RemoveMembers":{let t=s.members.map(i=>W(i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i of c)r.push({address:i.address,type:"User"});break}case "EditPermissions":{let t=s.members.map(i=>i.delegateOperation===2?Promise.resolve(void 0):W(i.member,i.userAddressTreeIndex)),c=await Promise.all(t);for(let i=0;i<c.length;i++){let a=c[i],o=s.members[i];a&&(o.delegateOperation===0?n.push({address:a.address,type:"User"}):r.push({address:a.address,type:"User"}));}break}}return {addDelegates:n,removeDelegates:r}}async function gC({packedAccounts:e,addDelegates:n,removeDelegates:r,compressed:s,index:t,settingsAddressTreeIndex:c,cachedAccounts:i}){await e.addSystemAccounts();let a=[];if(s){let f=(await Q(t,c)).address;a.push({address:f,type:"Settings"});}r.length&&a.push(...r),n.length&&a.push(...n);let o=a.length?await ae(a,i):[];if(!o.length)return {proof:null,settingsMutArgs:void 0,userMutArgs:[]};let d=await k(o,[]),u=[],y=[];for(let f of o)f.type==="Settings"?u.push(f):f.type==="User"&&y.push(f);let g,l=[];if(s&&d&&(g=oe(e,d.treeInfos.slice(0,1),d.leafIndices.slice(0,1),d.rootIndices.slice(0,1),d.proveByIndices.slice(0,1),u,Y())[0]),y.length&&d){let f=s?1:0;l=oe(e,d.treeInfos.slice(f),d.leafIndices.slice(f),d.rootIndices.slice(f),d.proveByIndices.slice(f),y,$());}return {proof:d,settingsMutArgs:g,userMutArgs:l}}async function yC({configActionsArgs:e,packedAccounts:n,userMutArgs:r}){let s=[],t=[];for(let c of e)switch(c.type){case "AddMembers":{let i=[];for(let a of c.members)if(a.member instanceof I){let o=s.length,{message:d,signature:u,publicKey:y,domainConfig:g}=V(a.member,o);d&&u&&y&&s.push({message:d,signature:u,publicKey:y}),g&&n.addPreAccounts([{address:g,role:gill.AccountRole.READONLY}]);let l=await W(a.member,a.userAddressTreeIndex).then(f=>r.find(M=>new ir__default.default(new Uint8Array(M.accountMeta.address)).eq(f.address)));if(!l)throw new Error("Unable to find user account");i.push(gd({permissionArgs:a.permissions,index:o,userMutArgs:l,pubkey:a.member,delegateOperation:a.delegateOperation}));}else {a.delegateOperation===0&&n.addPreAccounts([{address:a.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:a.member}]);let o=a.delegateOperation===0?a.member.address:a.member,d=await W(o,a.userAddressTreeIndex).then(u=>r.find(y=>new ir__default.default(new Uint8Array(y.accountMeta.address)).eq(u.address)));if(!d)throw new Error("Unable to find user account");i.push(gd({permissionArgs:a.permissions,index:-1,userMutArgs:d,pubkey:a.member,delegateOperation:a.delegateOperation}));}t.push({__kind:c.type,fields:[i]});break}case "RemoveMembers":{let i=c.members.map(o=>W(o.member,o.userAddressTreeIndex).then(d=>{let u=r.find(y=>new ir__default.default(new Uint8Array(y.accountMeta.address)).eq(d.address));if(!u)throw new Error("Unable to find user account");return mC({pubkey:o.member,userMutArgs:u})})),a=await Promise.all(i);t.push({__kind:c.type,fields:[a]});break}case "EditPermissions":{let i=c.members.map(o=>(o.delegateOperation!==2?W(o.member,o.userAddressTreeIndex).then(d=>r.find(u=>new ir__default.default(new Uint8Array(u.accountMeta.address)).eq(d.address))):Promise.resolve(void 0)).then(d=>pC({permissionArgs:o.permissions,userMutArgs:d,pubkey:o.member,delegateOperation:o.delegateOperation}))),a=await Promise.all(i);t.push({__kind:c.type,fields:[a]});break}default:t.push({__kind:c.type,fields:[c.threshold]});}return {configActions:t,secp256r1VerifyInput:s}}function pC({pubkey:e,permissionArgs:n,userMutArgs:r,delegateOperation:s}){if(s!==2){if(!r)throw new Error("User args is missing");if(r.data.role!==0)throw new Error("Only user with member role is allowed to change delegate.")}return {memberKey:je(e),permissions:md(n),userArgs:r?gill.some(r):gill.none(),delegateOperation:s}}function mC({pubkey:e,userMutArgs:n}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:je(e),userArgs:n.data.delegatedTo.__option==="Some"?{__kind:"Mutate",fields:[n]}:{__kind:"Read",fields:[n]}}}function gd({pubkey:e,permissionArgs:n,index:r,userMutArgs:s,delegateOperation:t}){if(s.data.role===1){if(t!==0)throw new Error("Permanent members must also be delegates");if(s.data.delegatedTo.__option==="Some")throw new Error("This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.")}else if(s.data.role===2){if(n.execute||n.vote)throw new Error("Transaction Manager can only have initiate permission");if(t!==2)throw new Error("Transaction Manager cannot be a delegate.")}else if(s.data.role===3&&t!==2)throw new Error("Administrator cannot be a delegate.");return {memberKey:je(e),permissions:md(n),verifyArgs:e instanceof I&&e.verifyArgs&&r!==-1?gill.some({truncatedClientDataJson:e.verifyArgs.truncatedClientDataJson,slotNumber:e.verifyArgs.slotNumber,signedMessageIndex:r,originIndex:e.originIndex,crossOrigin:e.crossOrigin,clientAndDeviceHash:e.clientAndDeviceHash}):gill.none(),userArgs:t===0?{__kind:"Mutate",fields:[s]}:{__kind:"Read",fields:[s]},delegateOperation:t}}function md(e){let n=[];return e.initiate&&n.push(Ie.InitiateTransaction),e.vote&&n.push(Ie.VoteTransaction),e.execute&&n.push(Ie.ExecuteTransaction),Ee.fromPermissions(n)}var Xe=33,$e=64,Un=14,CC=2,DC=gill.address("Secp256r1SigVerify1111111111111111111111111");function MC(){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 EC(){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 Sd(){return gill.createDecoder({read:(e,n=0)=>{let r=gill.getU8Decoder().decode(e,n);n+=1;let s=gill.getU8Decoder().decode(e,n);n+=1;let t=[],c=EC();for(let a=0;a<r;a++)t.push(c.decode(e,n)),n+=Un;let i=[];for(let a=0;a<r;a++){let o=gill.fixDecoderSize(gill.getBytesDecoder(),Xe).decode(e,n);n+=Xe;let d=gill.fixDecoderSize(gill.getBytesDecoder(),$e).decode(e,n);n+=$e;let u=t[a].messageDataSize,y=gill.fixDecoderSize(gill.getBytesDecoder(),u).decode(e,n);n+=u,i.push({publicKey:o,signature:d,message:y});}return [{numSignatures:r,padding:s,offsets:t,payload:i},n]}})}function xd(){return gill.createEncoder({getSizeFromValue:e=>{let n=Un*e.offsets.length,r=e.payload.reduce((s,t)=>s+Xe+$e+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=MC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Xe).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),$e).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function JL(){return gill.combineCodec(xd(),Sd())}function z(e,n){let r=e.length,s=CC+r*Un,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],u=s,y=u+Xe,g=y+$e;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:y,signatureInstructionIndex:65535,messageDataOffset:g,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Xe+$e+d.length;}let c=n?.programAddress??DC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:xd().encode(i)}}function jL(e){return {programAddress:e.programAddress,accounts:{},data:Sd().decode(e.data)}}async function nB({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=await ne(e),{address:a}=await Q(e,n),o=await ae([{address:a,type:"Settings"}],t),d=await k(o,[]),u=oe(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(x=>x.type==="Settings"),Y())[0],y=ue(s),g=y.filter(x=>x instanceof I),l=[],f=[];for(let x of g){let O=l.length,{domainConfig:L,verifyArgs:K,signature:N,publicKey:H,message:G}=V(x,O);G&&N&&H&&l.push({message:G,signature:N,publicKey:H}),L&&(c.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),K?.__option==="Some"&&f.push({domainConfigKey:L,verifyArgs:K.value}));}c.addPreAccounts(y.filter(x=>"address"in x).map(x=>({address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x})));let{remainingAccounts:M,systemOffset:E}=c.toAccountMetas(),U=b(d,E),S=[];return l.length>0&&S.push(z(l)),S.push(go({settings:i,settingsMutArgs:u,compressedProofArgs:U,payer:r,secp256r1VerifyArgs:f,remainingAccounts:M})),S}async function cB({admin:e,addressTree:n}){return js({payer:e,addressTree:n,remainingAccounts:[]})}async function yB({payer:e,rpId:n,origins:r,authority:s}){let t=await Je({rpId:n}),c=new _;await c.addSystemAccounts();let i=await le(),{address:a,addressTree:o}=await W(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],u=await k([],d),y=(await se(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:g,systemOffset:l}=c.toAccountMetas(),f=b(u,l);return await Co({origins:r,authorityCreationArgs:y,authority:s,compressedProofArgs:f,payer:e,domainConfig:t,rpId:n,remainingAccounts:g})}async function DB({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await Q(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await W(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await ae(i,t):[],o=await le(),{address:d,addressTree:u}=await W(r.member,o),y=[{address:d,type:"User",tree:u,queue:u}],g=await k(a,y),l=null,f=null,M=a.filter(L=>L.type==="Settings"),E=a.filter(L=>L.type==="User");M.length&&(l=oe(c,g.treeInfos.slice(0,1),g.leafIndices.slice(0,1),g.rootIndices.slice(0,1),g.proveByIndices.slice(0,1),M,Y())[0]),E.length&&(f=oe(c,g.treeInfos.slice(1,2),g.leafIndices.slice(1,2),g.rootIndices.slice(1,2),g.proveByIndices.slice(1,2),E,$())[0]);let U=await se(c,g.treeInfos.slice(a.length),g.roots.slice(a.length),g.rootIndices.slice(a.length),y),{remainingAccounts:S,systemOffset:x}=c.toAccountMetas(),O=b(g,x);return await ho({payer:n,authority:e,compressedProofArgs:O,member:xt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:f?gill.some(f):gill.none()}):gill.none(),userAccountCreationArgs:U[0],domainConfig:s,remainingAccounts:S})}async function PB({payer:e}){let n=await od();return bo({payer:e,globalCounter:n})}async function OB({createUserArgs:e,payer:n}){let r=new _;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let s=await le(),t=await Promise.all(e.map(async u=>{let{address:y,addressTree:g}=await W(u.member.address,s);return {address:y,tree:g,queue:g,type:"User"}})),c=await k([],t),i=await se(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=b(c,o);return await No({compressedProofArgs:d,payer:n,createUserArgs:e.map((u,y)=>({member:u.member.address,role:u.role,userCreationArgs:i[y],transactionManagerUrl:u.role===2?u.transactionManagerUrl:null})),remainingAccounts:a})}async function kB({admin:e,rpId:n,disable:r}){let s=await Je({rpId:n});return Xo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function KB({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new _;await i.addSystemAccounts();let a=await le(),{address:o,addressTree:d}=await W(r.address,a),u=[{address:o,tree:d,queue:d,type:"User"}],y=await k([],u),g=(await se(i,y.treeInfos,y.roots,y.rootIndices,u))[0],l=i.toAccountMetas();c=l.remainingAccounts,t={compressedProofArgs:b(y,l.systemOffset),authorityCreationArgs:g};}return nc({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function XB({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new _;await s.addSystemAccounts();let t=await ae([{address:(await W(e.address,n)).address,type:"User"}]),c=await k(t,[]),i=oe(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,$())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=b(c,o);return dc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function sw({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:i}=await Q(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await k([],a),d=(await se(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:y}=t.toAccountMetas(),g=b(o,y);return mc({compressedProofArgs:g,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:u})}async function Aw({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new _;await t.addSystemAccounts();let{address:c,addressTree:i}=await W(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await k([],a),d=(await se(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:y}=t.toAccountMetas(),g=b(o,y);return Ic({compressedProofArgs:g,args:e,authority:n,userCreationArgs:d,remainingAccounts:u})}async function Uw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,delegateOperation:t,cachedAccounts:c}){let{domainConfig:i,verifyArgs:a,message:o,signature:d,publicKey:u}=V(r),y=[];o&&d&&u&&y.push({message:o,signature:d,publicKey:u});let g=new _;await g.addSystemAccounts();let l=[],f=[];f.push(...await ae([{address:(await W("address"in r?r.address:r,s)).address,type:"User"}],c));let M=await le(),{address:E,addressTree:U}=await Q(e,M);l.push({address:E,queue:U,tree:U,type:"Settings"});let S=f.length,x=await k(f,l),O=oe(g,x.treeInfos.slice(0,S),x.leafIndices.slice(0,S),x.rootIndices.slice(0,S),x.proveByIndices.slice(0,S),f.filter(ie=>ie.type==="User"),$())[0],K=(await se(g,x.treeInfos.slice(S),x.roots.slice(S),x.rootIndices.slice(S),l)).find(ie=>ie.type==="Settings")??null;i?g.addPreAccounts([{address:i,role:gill.AccountRole.READONLY}]):"address"in r&&g.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:N,systemOffset:H}=g.toAccountMetas(),G=b(x,H),Te=[];if(!K)throw new Error("Settings creation args is missing.");return Te.push(await Lo({settingsIndex:e,payer:n,initialMember:r instanceof I?void 0:r,secp256r1VerifyArgs:a,domainConfig:i,userMutArgs:O,compressedProofArgs:G,settingsCreation:K,delegateOperation:t,remainingAccounts:N})),{instructions:Te,secp256r1VerifyInput:y}}async function Gw({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new _;await c.addSystemAccounts();let i=await ae([{address:(await Q(e,n)).address,type:"Settings"}],t),a=await k(i,[]),o=oe(c,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,i.filter(S=>S.type==="Settings"),Y())[0],d=ue(s),u=d.filter(S=>S instanceof I),y=[],g=[];for(let S of u){let x=y.length,{domainConfig:O,verifyArgs:L,signature:K,publicKey:N,message:H}=V(S,x);H&&K&&N&&y.push({message:H,signature:K,publicKey:N}),O&&(c.addPreAccounts([{address:O,role:gill.AccountRole.READONLY}]),L?.__option==="Some"&&g.push({domainConfigKey:O,verifyArgs:L.value}));}c.addPreAccounts(d.filter(S=>"address"in S).map(S=>({address:S.address,role:gill.AccountRole.READONLY_SIGNER,signer:S})));let{remainingAccounts:l,systemOffset:f}=c.toAccountMetas(),M=b(a,f),E=[];y.length>0&&E.push(z(y));let U=await ne(e);return E.push(Ko({settings:U,payer:r,settingsMut:o,compressedProofArgs:M,secp256r1VerifyArgs:g,remainingAccounts:l})),E}function bC(e,n,r,s){let t=_C(e,n),c=UC(e,n)&&r!==s;return t&&c?gill.AccountRole.WRITABLE_SIGNER:t&&!c?gill.AccountRole.WRITABLE:!t&&c?gill.AccountRole.READONLY_SIGNER:gill.AccountRole.READONLY}function _C(e,n){let r=e.staticAccounts.length,{numSignerAccounts:s,numReadonlySignerAccounts:t,numReadonlyNonSignerAccounts:c}=e.header,i=s-t,a=r-s-c;return n>=r?false:n<i?true:n>=s?n-s<a:false}function UC(e,n){return n<e.header.numSignerAccounts}async function dr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Ci(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),re()):{}),i=[];i.push(...t.addressTableLookups?.map(a=>({role:gill.AccountRole.READONLY,address:a.lookupTableAddress}))??[]);for(let[a,o]of t.staticAccounts.entries())i.push({address:o,role:bC(t,a,o,e)});if(t.addressTableLookups)for(let a of t.addressTableLookups){let o=c[a.lookupTableAddress];if(!o)throw new Error(`Address lookup table account ${a.lookupTableAddress} not found`);for(let d of a.writableIndexes){let u=o[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=o[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 s?.filter(o=>o.address!==e)??[]){let o=i.findIndex(d=>d.address===a.address);o===-1?i.push({address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}):i[o].role===gill.AccountRole.READONLY||i[o].role===gill.AccountRole.READONLY_SIGNER?i[o]={address:a.address,role:gill.AccountRole.READONLY_SIGNER,signer:a}:(i[o].role===gill.AccountRole.WRITABLE||i[o].role===gill.AccountRole.WRITABLE_SIGNER)&&(i[o]={address:a.address,role:gill.AccountRole.WRITABLE_SIGNER,signer:a});}return {accountMetas:i,addressLookupTableAccounts:c,transactionMessage:t}}async function hd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await De(e),{accountMetas:u,addressLookupTableAccounts:y}=await dr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),g=[];return c.length>0&&g.push(z(c)),g.push(o?oi({transactionBuffer:n,payer:s.address,remainingAccounts:u,settingsKey:e}):Qa({transactionBuffer:n,payer:s.address,settings:e})),a&&g.push(Hi({payer:s,tipAmount:a})),{instructions:g,addressLookupTableAccounts:y}}async function Pd({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let u=ue(s),y=await ne(e),g=await De(y),[{accountMetas:l,addressLookupTableAccounts:f,transactionMessage:M},{settingsReadonlyArgs:E,proof:U,packedAccounts:S}]=await Promise.all([dr({transactionMessageBytes:r,walletAddress:g,additionalSigners:u.filter(G=>!(G instanceof I)),addressesByLookupTableAddress:c}),fe(a,e,n,o,d)]);S.addPreAccounts(l);let x=u.filter(G=>G instanceof I),O=[];for(let G of x){let Te=i.length,{domainConfig:ie,verifyArgs:Re,signature:Me,publicKey:ve,message:Lt}=V(G,Te);Lt&&Me&&ve&&i.push({message:Lt,signature:Me,publicKey:ve}),ie&&(S.addPreAccounts([{address:ie,role:gill.AccountRole.READONLY}]),Re?.__option==="Some"&&O.push({domainConfigKey:ie,verifyArgs:Re.value}));}let{remainingAccounts:L,systemOffset:K}=S.toAccountMetas(),N=[];i.length>0&&N.push(z(i));let H=OC(M,l);if(a){if(!t||!E)throw new Error("Payer not found or proof args is missing.");let G=b(U,K);N.push(fi({secp256r1VerifyArgs:O,transactionMessage:H,settingsReadonlyArgs:E,compressedProofArgs:G,payer:t,remainingAccounts:L}));}else N.push(Ai({secp256r1VerifyArgs:O,settings:y,transactionMessage:H,remainingAccounts:L}));return {instructions:N,addressLookupTableAccounts:f}}function OC(e,n){if(e.version==="legacy")throw new Error("Only versioned transaction is allowed.");return {numSigners:e.header.numSignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numAccountKeys:e.staticAccounts.length,instructions:e.instructions.map(r=>({...r,accountIndices:new Uint8Array(r.accountIndices??[]),data:new Uint8Array(r.data??[])})),addressTableLookups:e.addressTableLookups?.map(r=>({lookupTableAddressIndex:n.findIndex(s=>s.address===r.lookupTableAddress),writableIndexes:new Uint8Array(r.writableIndexes),readonlyIndexes:new Uint8Array(r.readonlyIndexes)}))??[]}}async function Tk({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=ue(s),d=await ne(e),u=await De(d),{settingsReadonlyArgs:y,proof:g,packedAccounts:l}=await fe(a,e,n,false,t),f=[],M=[];for(let x of o)if(x instanceof I){let O=f.length,{domainConfig:L,verifyArgs:K,signature:N,publicKey:H,message:G}=V(x,O);G&&N&&H&&f.push({message:G,signature:N,publicKey:H}),L&&(l.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),K?.__option==="Some"&&M.push({domainConfigKey:L,verifyArgs:K.value}));}else l.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:E,systemOffset:U}=l.toAccountMetas(),S=[];if(f.length>0&&S.push(z(f)),a){if(!i||!y)throw new Error("Payer not found or proof args is missing.");let x=b(g,U);S.push(_c({amount:c,settingsReadonlyArgs:y,compressedProofArgs:x,payer:i,secp256r1VerifyArgs:M,source:u,destination:r,remainingAccounts:E}));}else S.push(Ec({amount:c,secp256r1VerifyArgs:M,source:u,destination:r,settings:d,remainingAccounts:E}));return S}async function hk({index:e,settingsAddressTreeIndex:n,destination:r,mint:s,signers:t,cachedAccounts:c,amount:i,payer:a,tokenProgram:o,createAtaIfNeeded:d=true,compressed:u=false}){let y=ue(t),g=await ne(e),l=await De(g),[f,M]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,l,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:E,proof:U,packedAccounts:S}=await fe(u,e,n,false,c),x=[],O=[];for(let H of y)if(H instanceof I){let G=x.length,{domainConfig:Te,verifyArgs:ie,signature:Re,publicKey:Me,message:ve}=V(H,G);ve&&Re&&Me&&x.push({message:ve,signature:Re,publicKey:Me}),Te&&(S.addPreAccounts([{address:Te,role:gill.AccountRole.READONLY}]),ie?.__option==="Some"&&O.push({domainConfigKey:Te,verifyArgs:ie.value}));}else S.addPreAccounts([{address:H.address,role:gill.AccountRole.READONLY_SIGNER,signer:H}]);let{remainingAccounts:L,systemOffset:K}=S.toAccountMetas(),N=[];if(x.length>0&&N.push(z(x)),u){if(!a||!E)throw new Error("Payer not found or proof args is missing.");let H=b(U,K);N.push(Vc({amount:i,createAtaIfNeeded:d,settingsReadonlyArgs:E,compressedProofArgs:H,payer:a,secp256r1VerifyArgs:O,source:l,sourceTokenAccount:f,destination:r,destinationTokenAccount:M,mint:s,tokenProgram:o,remainingAccounts:L}));}else N.push(Lc({amount:i,createAtaIfNeeded:d,secp256r1VerifyArgs:O,source:l,sourceTokenAccount:f,destination:r,destinationTokenAccount:M,settings:g,mint:s,tokenProgram:o,remainingAccounts:L}));return N}async function wk({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await Ls(re(),s),o=a.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:u,packedAccounts:y}=await fe(c,e,n,false,i),{remainingAccounts:g,systemOffset:l}=y.toAccountMetas(),{domainConfig:f,verifyArgs:M,message:E,signature:U,publicKey:S}=V(r),x=[];if(E&&U&&S&&x.push(z([{message:E,signature:U,publicKey:S}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let O=b(u,l);x.push(Qc({transactionBuffer:s,domainConfig:f,closer:r instanceof I?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:M,settingsReadonlyArgs:d,payer:t,compressedProofArgs:O,remainingAccounts:g}));}else x.push(jc({transactionBuffer:s,domainConfig:f,closer:r instanceof I?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:M,remainingAccounts:[]}));return x}function _d({payer:e,creator:n,bufferIndex:r,settings:s,transactionBufferAddress:t,finalBufferHash:c,finalBufferSize:i,preauthorizeExecution:a,bufferExtendHashes:o,compressedArgs:d,expectedSecp256r1Signers:u}){let{domainConfig:y,verifyArgs:g,message:l,signature:f,publicKey:M}=V(n),E=[];if(l&&f&&M&&E.push(z([{message:l,signature:f,publicKey:M}])),d){let{settingsReadonlyArgs:U,compressedProofArgs:S,remainingAccounts:x}=d;E.push(Aa({transactionBuffer:t,payer:e,secp256r1VerifyArgs:g,creator:n instanceof I?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},settingsReadonlyArgs:U,compressedProofArgs:S,remainingAccounts:x}));}else E.push(oa({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:g,creator:n instanceof I?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},remainingAccounts:[]}));return E}function Ud({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=V(e),d=[];return a&&i&&o&&d.push(z([{message:a,signature:i,publicKey:o}])),s?d.push(Da({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof I?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(fa({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof I?void 0:e,remainingAccounts:[]})),d}function Wd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?La({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):va({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function Od({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=V(n),d=[];return o&&i&&a&&d.push(z([{message:o,signature:i,publicKey:a}])),s?d.push(ja({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof I?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Va({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof I?void 0:n,remainingAccounts:[]})),d}async function DN({message:e,signer:n,popUp:r}){let{clientId:s,signClientMessage:t}=Ye(),c={type:"message",payload:e},i=gill.getBase64Decoder().decode(new Uint8Array([...new TextEncoder().encode(JSON.stringify(c)),...n?n.toBuffer():[]])),{signature:a,expiry:o}=await t("start",i),d=`${Pe()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(s)}&signature=${encodeURIComponent(a)}&expiry=${encodeURIComponent(o)}`,u=await er({authUrl:d,data:c,signer:n,popUp:r});return {...u,signer:new de(u.signer)}}async function vN({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){let{clientId:c,signClientMessage:i}=Ye(),a={type:"transaction",payload:JSON.stringify({transactionActionType:e,transactionAddress:n,transactionMessageBytes:tr(r)})},o=gill.getBase64Decoder().decode(new Uint8Array([...new TextEncoder().encode(JSON.stringify(a)),...s?s.toBuffer():[]])),{signature:d,expiry:u}=await i("start",o),y=`${Pe()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(c)}&signature=${encodeURIComponent(d)}&expiry=${encodeURIComponent(u)}`,g=await er({authUrl:y,data:a,signer:s,popUp:t});return {...g,signer:new de(g.signer)}}async function BN({message:e,response:n,expectedRPID:r=zi(),expectedOrigin:s=Pe()}){let t=new Uint8Array([...new TextEncoder().encode(e),...sr(n.clientId,n.deviceSignature.publicKey)]),c=ed25519_js.ed25519.verify(new Uint8Array(gill.getBase58Encoder().encode(n.deviceSignature.signature)),t,new Uint8Array(gill.getBase58Encoder().encode(n.deviceSignature.publicKey))),{verified:i}=await server.verifyAuthenticationResponse({response:n.authResponse,expectedChallenge:tr(t),expectedOrigin:s,expectedRPID:r,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:Li(n.signer.toString()),counter:0}});return i&&c}async function qN({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,creator:t,executor:c,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o,compressed:d=false,additionalVoters:u=[],additionalSigners:y=[],chunkSize:g=Math.ceil(s.length/2),cachedAccounts:l}){let f=await ne(n),M=Math.floor(Math.random()*255),E=await cd(f,t instanceof I?t:t.address,M),U=[],S=[];for(let J=0;J<s.length;J+=g){let Wn=s.subarray(J,J+g);U.push(Wn),S.push(sha2_js.sha256(Wn));}let x=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:O,proof:L,packedAccounts:K}=await fe(d,n,r,false,l),{remainingAccounts:N,systemOffset:H}=K.toAccountMetas(),G=O?{settingsReadonlyArgs:O,compressedProofArgs:b(L,H),remainingAccounts:N,payer:e}:null,Te=ue([t,...c?[c]:[],...u]).filter(J=>J instanceof I).map(J=>({memberKey:je(J),messageHash:Wt(J.authResponse)})),ie=_d({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:M,payer:e,transactionBufferAddress:E,settings:f,creator:t,preauthorizeExecution:!c,bufferExtendHashes:S,compressedArgs:G,expectedSecp256r1Signers:Te}),Re=U.map(J=>Wd({transactionMessageBytes:J,transactionBufferAddress:E,settings:f,compressed:d})),Me=u.map(J=>Od({voter:J,transactionBufferAddress:E,settings:f,compressedArgs:G})),ve=Ud({compressedArgs:G,settings:f,executor:c,transactionBufferAddress:E}),{instructions:Lt,addressLookupTableAccounts:kd}=await hd({compressed:d,settings:f,transactionMessageBytes:s,transactionBufferAddress:E,payer:e,additionalSigners:y,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),T=J=>({payer:e,instructions:J,addressesByLookupTableAddress:kd});return [T(ie),...Re.map(J=>T([J])),...Me.length?[T(Me.flat())]:[],T(ve),T(Lt)]}var Ar=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:c.length};{if(r.length===0)throw new Error("Expected at least one writable signer key");let[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var gr=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function wd({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=Ar.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let g of a){let l=t.extractTableLookup(g);if(l!==void 0){let{addressTableLookup:f,drainedKeys:M}=l;c.push({readonlyIndexes:f.readonlyIndexes,readableIndices:f.readonlyIndexes,writableIndexes:f.writableIndexes,writableIndices:f.writableIndexes,lookupTableAddress:gill.address(f.lookupTableAddress)}),i.writable.push(...M.writable),i.readonly.push(...M.readonly);}}let[o,d]=t.getMessageComponents(),y=new gr(d,i).compileInstructions(r);return {version:0,header:o,instructions:y,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function a2({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=wd({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return Ii(s)}async function g2({payer:e,index:n,settingsAddressTreeIndex:r,transactionMessageBytes:s,signers:t,secp256r1VerifyInput:c,addressesByLookupTableAddress:i,cachedAccounts:a,compressed:o=false,simulateProof:d=false}){let{instructions:u,addressLookupTableAccounts:y}=await Pd({index:n,settingsAddressTreeIndex:r,payer:e,signers:t,transactionMessageBytes:s,secp256r1VerifyInput:c,compressed:o,addressesByLookupTableAddress:i,simulateProof:d,cachedAccounts:a});return {payer:e,instructions:u,addressesByLookupTableAddress:y}}
|
|
2
|
+
exports.ADD_WHITELISTED_ADDRESS_TREES_DISCRIMINATOR=Ks;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=ro;exports.CHANGE_CONFIG_DISCRIMINATOR=Xs;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=io;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=xo;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=Mo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Ro;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=Wo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=wo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=Go;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=qo;exports.DOMAIN_CONFIG_DISCRIMINATOR=On;exports.DelegateOp=Jt;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=tc;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=cc;exports.GLOBAL_COUNTER_DISCRIMINATOR=Hn;exports.KeyType=_t;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=gc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=lc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=Mx;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=rx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Gx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Fx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=ox;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=sx;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=px;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=gx;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=nx;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=ux;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=Ux;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Wx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Ox;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=Px;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=Ex;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=hx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=Sx;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=Jx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=yx;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=Ix;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=_x;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=lx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=ZS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=QS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=YS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=$S;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Hx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=Tx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=Ax;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=dx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=fx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=xx;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=ex;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=kx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=zx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=Cx;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Nx;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=Dx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=vx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=ax;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ix;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=Kx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=cx;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=wx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=tx;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=XS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Vx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=mx;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=Lx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Bx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=bx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Rx;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=JS;exports.MultiWalletInstruction=jS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Rc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Dc;exports.Permission=Ie;exports.Permissions=Ee;exports.SETTINGS_DISCRIMINATOR=Es;exports.Secp256r1Key=de;exports.SignedSecp256r1Key=I;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Nc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Wc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=Zc;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=zc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=ia;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=ra;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Us;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=xa;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=pa;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=Ua;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=ha;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=za;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=ka;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=ri;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=Za;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=pi;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=ii;exports.UserRole=Fe;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=ks;exports.addWhitelistedAddressTrees=cB;exports.changeConfig=FL;exports.closeTransactionBuffer=wk;exports.compressSettingsAccount=nB;exports.configAction=vD;exports.convertMemberKeyToString=ud;exports.convertPubkeyCompressedToCose=Li;exports.convertPubkeyCoseToCompressed=oO;exports.createDomainConfig=yB;exports.createDomainUserAccounts=DB;exports.createGlobalCounter=PB;exports.createPopUp=Ui;exports.createTransactionBuffer=_d;exports.createTransactionManagerSigner=dC;exports.createUserAccounts=OB;exports.createWallet=Uw;exports.decodeDomainConfig=Bn;exports.decodeGlobalCounter=Gn;exports.decodeSettings=Ps;exports.decodeTransactionBuffer=Os;exports.decodeWhitelistedAddressTree=Hs;exports.decompressSettingsAccount=Gw;exports.disableDomainConfig=kB;exports.editDomainConfig=KB;exports.editTransactionManagerUrl=XB;exports.executeTransaction=hd;exports.executeTransactionBuffer=Ud;exports.executeTransactionSync=Pd;exports.extendTransactionBuffer=Wd;exports.fetchAllDomainConfig=zC;exports.fetchAllGlobalCounter=XC;exports.fetchAllMaybeDomainConfig=$d;exports.fetchAllMaybeGlobalCounter=pu;exports.fetchAllMaybeSettings=Ry;exports.fetchAllMaybeTransactionBuffer=Zy;exports.fetchAllMaybeWhitelistedAddressTree=Tp;exports.fetchAllSettings=Ih;exports.fetchAllTransactionBuffer=Rh;exports.fetchAllWhitelistedAddressTree=Wh;exports.fetchCompressedAccount=ji;exports.fetchDomainConfig=wn;exports.fetchGlobalCounter=ZC;exports.fetchMaybeDomainConfig=Xd;exports.fetchMaybeGlobalCounter=yu;exports.fetchMaybeSettings=Jr;exports.fetchMaybeSettingsAccountData=JI;exports.fetchMaybeTransactionBuffer=Yy;exports.fetchMaybeUserAccountData=KI;exports.fetchMaybeWhitelistedAddressTree=mp;exports.fetchSettings=xh;exports.fetchSettingsAccountData=ed;exports.fetchTransactionBuffer=Ls;exports.fetchUserAccountData=Qi;exports.fetchWhitelistedAddressTree=Vs;exports.getAddMemberArgsCodec=rD;exports.getAddMemberArgsDecoder=pr;exports.getAddMemberArgsEncoder=yr;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=Zh;exports.getAddWhitelistedAddressTreesInstruction=$h;exports.getAddWhitelistedAddressTreesInstructionAsync=js;exports.getAddWhitelistedAddressTreesInstructionDataCodec=Xh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Js;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=en;exports.getAuthEndpoint=Pe;exports.getChangeConfigCompressedDiscriminatorBytes=TP;exports.getChangeConfigCompressedInstruction=oo;exports.getChangeConfigCompressedInstructionDataCodec=fP;exports.getChangeConfigCompressedInstructionDataDecoder=so;exports.getChangeConfigCompressedInstructionDataEncoder=no;exports.getChangeConfigDiscriminatorBytes=cP;exports.getChangeConfigInstruction=iP;exports.getChangeConfigInstructionAsync=Qs;exports.getChangeConfigInstructionDataCodec=aP;exports.getChangeConfigInstructionDataDecoder=$s;exports.getChangeConfigInstructionDataEncoder=tn;exports.getClientAndDeviceHash=sr;exports.getClientSettings=Ye;exports.getCompiledInstructionCodec=oD;exports.getCompiledInstructionDecoder=Tr;exports.getCompiledInstructionEncoder=mr;exports.getCompressSettingsAccountDiscriminatorBytes=EP;exports.getCompressSettingsAccountInstruction=go;exports.getCompressSettingsAccountInstructionDataCodec=hP;exports.getCompressSettingsAccountInstructionDataDecoder=Ao;exports.getCompressSettingsAccountInstructionDataEncoder=uo;exports.getCompressedAccountMetaCodec=dD;exports.getCompressedAccountMetaDecoder=st;exports.getCompressedAccountMetaEncoder=nt;exports.getCompressedAccountMetaReadOnlyCodec=yD;exports.getCompressedAccountMetaReadOnlyDecoder=it;exports.getCompressedAccountMetaReadOnlyEncoder=at;exports.getCompressedProofCodec=TD;exports.getCompressedProofDecoder=Cr;exports.getCompressedProofEncoder=Ir;exports.getCompressedSettingsAddressFromIndex=Q;exports.getCompressedSettingsCodec=xD;exports.getCompressedSettingsDataCodec=MD;exports.getCompressedSettingsDataDecoder=At;exports.getCompressedSettingsDataEncoder=ut;exports.getCompressedSettingsDecoder=Y;exports.getCompressedSettingsEncoder=dt;exports.getComputeBudgetEstimate=Fi;exports.getConfigActionCodec=RD;exports.getConfigActionDecoder=mt;exports.getConfigActionEncoder=pt;exports.getCreateDomainConfigDiscriminatorBytes=OP;exports.getCreateDomainConfigInstruction=BP;exports.getCreateDomainConfigInstructionAsync=Co;exports.getCreateDomainConfigInstructionDataCodec=LP;exports.getCreateDomainConfigInstructionDataDecoder=Io;exports.getCreateDomainConfigInstructionDataEncoder=nn;exports.getCreateDomainUserAccountDiscriminatorBytes=zP;exports.getCreateDomainUserAccountInstruction=JP;exports.getCreateDomainUserAccountInstructionAsync=ho;exports.getCreateDomainUserAccountInstructionDataCodec=KP;exports.getCreateDomainUserAccountInstructionDataDecoder=Eo;exports.getCreateDomainUserAccountInstructionDataEncoder=on;exports.getCreateGlobalCounterDiscriminatorBytes=QP;exports.getCreateGlobalCounterInstruction=tR;exports.getCreateGlobalCounterInstructionAsync=bo;exports.getCreateGlobalCounterInstructionDataCodec=eR;exports.getCreateGlobalCounterInstructionDataDecoder=vo;exports.getCreateGlobalCounterInstructionDataEncoder=an;exports.getCreateMultiWalletCompressedDiscriminatorBytes=dR;exports.getCreateMultiWalletCompressedInstruction=AR;exports.getCreateMultiWalletCompressedInstructionAsync=Lo;exports.getCreateMultiWalletCompressedInstructionDataCodec=uR;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Oo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=dn;exports.getCreateUserAccountArgsCodec=OD;exports.getCreateUserAccountArgsDecoder=br;exports.getCreateUserAccountArgsEncoder=vr;exports.getCreateUserAccountsDiscriminatorBytes=SR;exports.getCreateUserAccountsInstruction=IR;exports.getCreateUserAccountsInstructionAsync=No;exports.getCreateUserAccountsInstructionDataCodec=xR;exports.getCreateUserAccountsInstructionDataDecoder=ko;exports.getCreateUserAccountsInstructionDataEncoder=An;exports.getDecompressSettingsAccountDiscriminatorBytes=vR;exports.getDecompressSettingsAccountInstruction=Ko;exports.getDecompressSettingsAccountInstructionDataCodec=bR;exports.getDecompressSettingsAccountInstructionDataDecoder=zo;exports.getDecompressSettingsAccountInstructionDataEncoder=Fo;exports.getDelegateOpCodec=wD;exports.getDelegateOpDecoder=_e;exports.getDelegateOpEncoder=be;exports.getDisableDomainConfigDiscriminatorBytes=wR;exports.getDisableDomainConfigInstruction=Xo;exports.getDisableDomainConfigInstructionDataCodec=kR;exports.getDisableDomainConfigInstructionDataDecoder=Zo;exports.getDisableDomainConfigInstructionDataEncoder=Yo;exports.getDomainConfigAddress=Je;exports.getDomainConfigCodec=FC;exports.getDomainConfigDecoder=Ln;exports.getDomainConfigDiscriminatorBytes=GC;exports.getDomainConfigEncoder=Zd;exports.getDomainConfigSize=KC;exports.getEditDomainConfigDiscriminatorBytes=JR;exports.getEditDomainConfigInstruction=nc;exports.getEditDomainConfigInstructionAsync=qR;exports.getEditDomainConfigInstructionDataCodec=jR;exports.getEditDomainConfigInstructionDataDecoder=rc;exports.getEditDomainConfigInstructionDataEncoder=yn;exports.getEditMemberArgsCodec=VD;exports.getEditMemberArgsDecoder=hr;exports.getEditMemberArgsEncoder=Er;exports.getEditTransactionManagerUrlDiscriminatorBytes=rv;exports.getEditTransactionManagerUrlInstruction=dc;exports.getEditTransactionManagerUrlInstructionDataCodec=nv;exports.getEditTransactionManagerUrlInstructionDataDecoder=ic;exports.getEditTransactionManagerUrlInstructionDataEncoder=ac;exports.getExpectedSecp256r1SignersCodec=KD;exports.getExpectedSecp256r1SignersDecoder=ft;exports.getExpectedSecp256r1SignersEncoder=Tt;exports.getFeePayer=MO;exports.getGlobalCounterAddress=od;exports.getGlobalCounterCodec=YC;exports.getGlobalCounterDecoder=Vn;exports.getGlobalCounterDiscriminatorBytes=qC;exports.getGlobalCounterEncoder=gu;exports.getGlobalCounterSize=$C;exports.getJitoTipsConfig=En;exports.getLightCpiSigner=aL;exports.getLightProtocolRpc=Ne;exports.getLinkWalletArgsCodec=YD;exports.getLinkWalletArgsDecoder=Ur;exports.getLinkWalletArgsEncoder=_r;exports.getMemberCodec=QD;exports.getMemberDecoder=yt;exports.getMemberEncoder=gt;exports.getMemberKeyCodec=rM;exports.getMemberKeyDecoder=q;exports.getMemberKeyEncoder=j;exports.getMigrateCompressedSettingsDiscriminatorBytes=Av;exports.getMigrateCompressedSettingsInstruction=mc;exports.getMigrateCompressedSettingsInstructionDataCodec=gv;exports.getMigrateCompressedSettingsInstructionDataDecoder=pc;exports.getMigrateCompressedSettingsInstructionDataEncoder=yc;exports.getMigrateCompressedUsersDiscriminatorBytes=xv;exports.getMigrateCompressedUsersInstruction=Ic;exports.getMigrateCompressedUsersInstructionDataCodec=Iv;exports.getMigrateCompressedUsersInstructionDataDecoder=xc;exports.getMigrateCompressedUsersInstructionDataEncoder=Sc;exports.getMultiWalletErrorMessage=gW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Nv;exports.getNativeTransferIntentCompressedInstruction=_c;exports.getNativeTransferIntentCompressedInstructionDataCodec=Hv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=bc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=vc;exports.getNativeTransferIntentDiscriminatorBytes=vv;exports.getNativeTransferIntentInstruction=Ec;exports.getNativeTransferIntentInstructionAsync=_v;exports.getNativeTransferIntentInstructionDataCodec=bv;exports.getNativeTransferIntentInstructionDataDecoder=Mc;exports.getNativeTransferIntentInstructionDataEncoder=pn;exports.getNewAuthorityArgsCodec=cM;exports.getNewAuthorityArgsDecoder=Or;exports.getNewAuthorityArgsEncoder=Wr;exports.getOriginIndex=iO;exports.getPackedAddressTreeInfoCodec=dM;exports.getPackedAddressTreeInfoDecoder=St;exports.getPackedAddressTreeInfoEncoder=lt;exports.getPackedStateTreeInfoCodec=gM;exports.getPackedStateTreeInfoDecoder=ct;exports.getPackedStateTreeInfoEncoder=ot;exports.getPermissionsCodec=mM;exports.getPermissionsDecoder=We;exports.getPermissionsEncoder=Ue;exports.getProofArgsCodec=SM;exports.getProofArgsDecoder=D;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=DM;exports.getRemoveMemberArgsDecoder=Rr;exports.getRemoveMemberArgsEncoder=Pr;exports.getRpId=zi;exports.getSecp256r1Message=Cn;exports.getSecp256r1MessageHash=Wt;exports.getSecp256r1PubkeyCodec=hM;exports.getSecp256r1PubkeyDecoder=xt;exports.getSecp256r1PubkeyEncoder=Lr;exports.getSecp256r1SignatureOffsetsDataDecoder=EC;exports.getSecp256r1SignatureOffsetsDataEncoder=MC;exports.getSecp256r1VerifyArgsCodec=vM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=B;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=WM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=X;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Z;exports.getSecp256r1VerifyInstruction=z;exports.getSecp256r1VerifyInstructionDataCodec=JL;exports.getSecp256r1VerifyInstructionDataDecoder=Sd;exports.getSecp256r1VerifyInstructionDataEncoder=xd;exports.getSendAndConfirmTransaction=Gi;exports.getSettingsCodec=Sh;exports.getSettingsCreationArgsCodec=wM;exports.getSettingsCreationArgsDecoder=Ct;exports.getSettingsCreationArgsEncoder=It;exports.getSettingsDecoder=hs;exports.getSettingsDiscriminatorBytes=lh;exports.getSettingsEncoder=Py;exports.getSettingsFromIndex=ne;exports.getSettingsIndexWithAddressCodec=HM;exports.getSettingsIndexWithAddressDecoder=wr;exports.getSettingsIndexWithAddressEncoder=Br;exports.getSettingsMutArgsCodec=zM;exports.getSettingsMutArgsDecoder=xe;exports.getSettingsMutArgsEncoder=Se;exports.getSettingsReadonlyArgsCodec=qM;exports.getSettingsReadonlyArgsDecoder=te;exports.getSettingsReadonlyArgsEncoder=ee;exports.getSettingsSize=Ch;exports.getSignedSecp256r1Key=cO;exports.getSignedTransactionManager=ML;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=qe;exports.getTokenTransferIntentCompressedDiscriminatorBytes=sb;exports.getTokenTransferIntentCompressedInstruction=Vc;exports.getTokenTransferIntentCompressedInstructionAsync=cb;exports.getTokenTransferIntentCompressedInstructionDataCodec=ob;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Hc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=fn;exports.getTokenTransferIntentDiscriminatorBytes=qv;exports.getTokenTransferIntentInstruction=Lc;exports.getTokenTransferIntentInstructionAsync=Zv;exports.getTokenTransferIntentInstructionDataCodec=Yv;exports.getTokenTransferIntentInstructionDataDecoder=Oc;exports.getTokenTransferIntentInstructionDataEncoder=Tn;exports.getTransactionBufferAddress=cd;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=Db;exports.getTransactionBufferCloseCompressedInstruction=Qc;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Mb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=$c;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=Xc;exports.getTransactionBufferCloseDiscriminatorBytes=pb;exports.getTransactionBufferCloseInstruction=jc;exports.getTransactionBufferCloseInstructionDataCodec=mb;exports.getTransactionBufferCloseInstructionDataDecoder=Jc;exports.getTransactionBufferCloseInstructionDataEncoder=Kc;exports.getTransactionBufferCodec=Ph;exports.getTransactionBufferCreateArgsCodec=$M;exports.getTransactionBufferCreateArgsDecoder=Mt;exports.getTransactionBufferCreateArgsEncoder=Dt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Vb;exports.getTransactionBufferCreateCompressedInstruction=Aa;exports.getTransactionBufferCreateCompressedInstructionDataCodec=Gb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=ua;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=da;exports.getTransactionBufferCreateDiscriminatorBytes=Ub;exports.getTransactionBufferCreateInstruction=oa;exports.getTransactionBufferCreateInstructionDataCodec=Wb;exports.getTransactionBufferCreateInstructionDataDecoder=sa;exports.getTransactionBufferCreateInstructionDataEncoder=na;exports.getTransactionBufferDecoder=Ws;exports.getTransactionBufferDiscriminatorBytes=hh;exports.getTransactionBufferEncoder=qy;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=o_;exports.getTransactionBufferExecuteCompressedInstruction=Da;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=c_;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ca;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Ia;exports.getTransactionBufferExecuteDiscriminatorBytes=Zb;exports.getTransactionBufferExecuteInstruction=fa;exports.getTransactionBufferExecuteInstructionDataCodec=Xb;exports.getTransactionBufferExecuteInstructionDataDecoder=Ta;exports.getTransactionBufferExecuteInstructionDataEncoder=ma;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=I_;exports.getTransactionBufferExtendCompressedInstruction=La;exports.getTransactionBufferExtendCompressedInstructionDataCodec=C_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Oa;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Wa;exports.getTransactionBufferExtendDiscriminatorBytes=y_;exports.getTransactionBufferExtendInstruction=va;exports.getTransactionBufferExtendInstructionDataCodec=p_;exports.getTransactionBufferExtendInstructionDataDecoder=Ra;exports.getTransactionBufferExtendInstructionDataEncoder=Pa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=N_;exports.getTransactionBufferVoteCompressedInstruction=ja;exports.getTransactionBufferVoteCompressedInstructionDataCodec=H_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Ja;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Ka;exports.getTransactionBufferVoteDiscriminatorBytes=b_;exports.getTransactionBufferVoteInstruction=Va;exports.getTransactionBufferVoteInstructionDataCodec=__;exports.getTransactionBufferVoteInstructionDataDecoder=Ha;exports.getTransactionBufferVoteInstructionDataEncoder=Na;exports.getTransactionExecuteCompressedDiscriminatorBytes=tU;exports.getTransactionExecuteCompressedInstruction=oi;exports.getTransactionExecuteCompressedInstructionDataCodec=rU;exports.getTransactionExecuteCompressedInstructionDataDecoder=si;exports.getTransactionExecuteCompressedInstructionDataEncoder=ni;exports.getTransactionExecuteDiscriminatorBytes=j_;exports.getTransactionExecuteInstruction=Qa;exports.getTransactionExecuteInstructionDataCodec=q_;exports.getTransactionExecuteInstructionDataDecoder=$a;exports.getTransactionExecuteInstructionDataEncoder=Xa;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=SU;exports.getTransactionExecuteSyncCompressedInstruction=fi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=xU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ti;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=mi;exports.getTransactionExecuteSyncDiscriminatorBytes=uU;exports.getTransactionExecuteSyncInstruction=Ai;exports.getTransactionExecuteSyncInstructionDataCodec=AU;exports.getTransactionExecuteSyncInstructionDataDecoder=ui;exports.getTransactionExecuteSyncInstructionDataEncoder=di;exports.getTransactionMessageAddressTableLookupCodec=oE;exports.getTransactionMessageAddressTableLookupDecoder=Nr;exports.getTransactionMessageAddressTableLookupEncoder=kr;exports.getTransactionMessageCodec=rE;exports.getTransactionMessageDecoder=ht;exports.getTransactionMessageEncoder=Et;exports.getUserAccountAddress=W;exports.getUserCodec=dE;exports.getUserCreationArgsCodec=yE;exports.getUserCreationArgsDecoder=ye;exports.getUserCreationArgsEncoder=ge;exports.getUserDecoder=$;exports.getUserEncoder=Be;exports.getUserMutArgsCodec=fE;exports.getUserMutArgsDecoder=me;exports.getUserMutArgsEncoder=pe;exports.getUserReadOnlyArgsCodec=IE;exports.getUserReadOnlyArgsDecoder=Fr;exports.getUserReadOnlyArgsEncoder=Gr;exports.getUserReadOnlyOrMutateArgsCodec=EE;exports.getUserReadOnlyOrMutateArgsDecoder=rt;exports.getUserReadOnlyOrMutateArgsEncoder=tt;exports.getUserRoleCodec=bE;exports.getUserRoleDecoder=Le;exports.getUserRoleEncoder=Oe;exports.getWalletAddressFromIndex=ad;exports.getWalletAddressFromSettings=De;exports.getWhitelistedAddressTreeCodec=Uh;exports.getWhitelistedAddressTreeDecoder=Ns;exports.getWhitelistedAddressTreeDiscriminatorBytes=_h;exports.getWhitelistedAddressTreeEncoder=pp;exports.getWhitelistedAddressTreeFromIndex=Pn;exports.getWhitelistedAddressTreeIndexFromAddress=$O;exports.getWhitelistedAddressTreesAddress=qi;exports.identifyMultiWalletAccount=oW;exports.identifyMultiWalletInstruction=cW;exports.initialize=hO;exports.isConfigAction=bD;exports.isMultiWalletError=yW;exports.isUserReadOnlyOrMutateArgs=PE;exports.migrateSettings=sw;exports.migrateUsers=Aw;exports.nativeTransferIntent=Tk;exports.parseAddWhitelistedAddressTreesInstruction=Qh;exports.parseChangeConfigCompressedInstruction=lP;exports.parseChangeConfigInstruction=dP;exports.parseCompressSettingsAccountInstruction=PP;exports.parseCreateDomainConfigInstruction=wP;exports.parseCreateDomainUserAccountInstruction=jP;exports.parseCreateGlobalCounterInstruction=rR;exports.parseCreateMultiWalletCompressedInstruction=gR;exports.parseCreateUserAccountsInstruction=CR;exports.parseDecompressSettingsAccountInstruction=_R;exports.parseDisableDomainConfigInstruction=NR;exports.parseEditDomainConfigInstruction=YR;exports.parseEditTransactionManagerUrlInstruction=sv;exports.parseMigrateCompressedSettingsInstruction=yv;exports.parseMigrateCompressedUsersInstruction=Cv;exports.parseNativeTransferIntentCompressedInstruction=Vv;exports.parseNativeTransferIntentInstruction=Uv;exports.parseSecp256r1VerifyInstruction=jL;exports.parseTokenTransferIntentCompressedInstruction=ab;exports.parseTokenTransferIntentInstruction=Xv;exports.parseTransactionBufferCloseCompressedInstruction=Eb;exports.parseTransactionBufferCloseInstruction=Tb;exports.parseTransactionBufferCreateCompressedInstruction=Fb;exports.parseTransactionBufferCreateInstruction=Ob;exports.parseTransactionBufferExecuteCompressedInstruction=a_;exports.parseTransactionBufferExecuteInstruction=$b;exports.parseTransactionBufferExtendCompressedInstruction=D_;exports.parseTransactionBufferExtendInstruction=m_;exports.parseTransactionBufferVoteCompressedInstruction=V_;exports.parseTransactionBufferVoteInstruction=U_;exports.parseTransactionExecuteCompressedInstruction=nU;exports.parseTransactionExecuteInstruction=Y_;exports.parseTransactionExecuteSyncCompressedInstruction=IU;exports.parseTransactionExecuteSyncInstruction=gU;exports.pollJitoBundleConfirmation=CL;exports.prepareTransactionBundle=qN;exports.prepareTransactionMessage=a2;exports.prepareTransactionSync=g2;exports.retrieveTransactionManager=DL;exports.sendJitoBundle=iC;exports.signAndSendBundledTransactions=xL;exports.signAndSendTransaction=IL;exports.signMessageWithPasskey=DN;exports.signTransactionWithPasskey=vN;exports.tokenTransferIntent=hk;exports.uninitialize=EO;exports.userReadOnlyOrMutateArgs=hE;exports.vaultTransactionMessageDeserialize=Ci;exports.vaultTransactionMessageSerialize=Ii;exports.verifyMessage=BN;exports.verifyTransactionAuthResponseWithMessageHash=aO;exports.voteTransactionBuffer=Od;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|