@revibase/core 0.0.14 → 0.0.16
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 +158 -137
- package/dist/index.d.ts +158 -137
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var gill=require('gill'),cr=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'),ed25519_js=require('@noble/curves/ed25519.js'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var cr__default=/*#__PURE__*/_interopDefault(cr);var On=new Uint8Array([201,232,212,229,59,241,106,197]);function wC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(On)}function Yd(){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 kC(){return gill.combineCodec(Yd(),Ln())}function Bn(e){return gill.decodeAccount(e,Ln())}async function wn(e,n,r){let s=await Zd(e,n,r);return gill.assertAccountExists(s),s}async function Zd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Bn(s)}async function NC(e,n,r){let s=await Xd(e,n,r);return gill.assertAccountsExist(s),s}async function Xd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Bn(t))}function HC(){return 846}var Hn=new Uint8Array([42,206,176,58,175,129,130,233]);function FC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Hn)}function Au(){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 zC(){return gill.combineCodec(Au(),Vn())}function Gn(e){return gill.decodeAccount(e,Vn())}async function KC(e,n,r){let s=await gu(e,n,r);return gill.assertAccountExists(s),s}async function gu(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Gn(s)}async function JC(e,n,r){let s=await yu(e,n,r);return gill.assertAccountsExist(s),s}async function yu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Gn(t))}function jC(){return 24}function Ar(){return gill.getStructEncoder([["memberKey",j()],["permissions",_e()],["verifyArgs",gill.getOptionEncoder(B())],["userArgs",tt()],["delegateOperation",ve()]])}function gr(){return gill.getStructDecoder([["memberKey",q()],["permissions",Ue()],["verifyArgs",gill.getOptionDecoder(w())],["userArgs",rt()],["delegateOperation",be()]])}function XC(){return gill.combineCodec(Ar(),gr())}function yr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function pr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function eD(){return gill.combineCodec(yr(),pr())}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 sD(){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 iD(){return gill.combineCodec(at(),it())}function Sr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function xr(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function AD(){return gill.combineCodec(Sr(),xr())}function dt(){return gill.getStructEncoder([["data",gill.getOptionEncoder(ut())]])}function Y(){return gill.getStructDecoder([["data",gill.getOptionDecoder(At())]])}function mD(){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 SD(){return gill.combineCodec(ut(),At())}function pt(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Dr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Ar())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Er())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function mt(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Mr())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(gr())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(hr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function DD(){return gill.combineCodec(pt(),mt())}function MD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function ED(e,n){return n.__kind===e}function Pr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",We()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",ge()]])}function Rr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Oe()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",ye()]])}function vD(){return gill.combineCodec(Pr(),Rr())}var zt=(s=>(s[s.Add=0]="Add",s[s.Remove=1]="Remove",s[s.Ignore=2]="Ignore",s))(zt||{});function ve(){return gill.getEnumEncoder(zt)}function be(){return gill.getEnumDecoder(zt)}function UD(){return gill.combineCodec(ve(),be())}function Dr(){return gill.getStructEncoder([["memberKey",j()],["permissions",_e()],["userArgs",gill.getOptionEncoder(pe())],["delegateOperation",ve()]])}function Mr(){return gill.getStructDecoder([["memberKey",q()],["permissions",Ue()],["userArgs",gill.getOptionDecoder(me())],["delegateOperation",be()]])}function BD(){return gill.combineCodec(Dr(),Mr())}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 HD(){return gill.combineCodec(Tt(),ft())}function vr(){return gill.getStructEncoder([["settingsMutArgs",Se()],["transactionManager",gill.getOptionEncoder(pe())]])}function br(){return gill.getStructDecoder([["settingsMutArgs",xe()],["transactionManager",gill.getOptionDecoder(me())]])}function zD(){return gill.combineCodec(vr(),br())}function gt(){return gill.getStructEncoder([["pubkey",j()],["permissions",_e()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()]])}function yt(){return gill.getStructDecoder([["pubkey",q()],["permissions",Ue()],["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 XD(){return gill.combineCodec(j(),q())}function _r(){return gill.getStructEncoder([["authorityCreationArgs",ge()],["compressedProofArgs",C()]])}function Ur(){return gill.getStructDecoder([["authorityCreationArgs",ye()],["compressedProofArgs",D()]])}function tM(){return gill.combineCodec(_r(),Ur())}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 sM(){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 aM(){return gill.combineCodec(ot(),ct())}function _e(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function Ue(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function uM(){return gill.combineCodec(_e(),Ue())}function C(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(Sr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function D(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(xr())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function pM(){return gill.combineCodec(C(),D())}function Er(){return gill.getStructEncoder([["memberKey",j()],["userArgs",tt()]])}function hr(){return gill.getStructDecoder([["memberKey",q()],["userArgs",rt()]])}function lM(){return gill.combineCodec(Er(),hr())}function Wr(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function xt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function IM(){return gill.combineCodec(Wr(),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 MM(){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 RM(){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 UM(){return gill.combineCodec(It(),Ct())}function Or(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function Lr(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function LM(){return gill.combineCodec(Or(),Lr())}function Se(){return gill.getStructEncoder([["accountMeta",nt()],["data",dt()]])}function xe(){return gill.getStructDecoder([["accountMeta",st()],["data",Y()]])}function NM(){return gill.combineCodec(Se(),xe())}function ee(){return gill.getStructEncoder([["accountMeta",at()],["data",dt()]])}function te(){return gill.getStructDecoder([["accountMeta",it()],["data",Y()]])}function FM(){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 jM(){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(yr())],["addressTableLookups",gill.getArrayEncoder(Br())]])}function ht(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(pr())],["addressTableLookups",gill.getArrayDecoder(wr())]])}function XM(){return gill.combineCodec(Et(),ht())}function Br(){return gill.getStructEncoder([["lookupTableAddressIndex",gill.getU8Encoder()],["writableIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["readonlyIndexes",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function wr(){return gill.getStructDecoder([["lookupTableAddressIndex",gill.getU8Decoder()],["writableIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["readonlyIndexes",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function eE(){return gill.combineCodec(Br(),wr())}function Le(){return gill.getStructEncoder([["member",j()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",We()],["delegatedTo",gill.getOptionEncoder(Or())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function $(){return gill.getStructDecoder([["member",q()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Oe()],["delegatedTo",gill.getOptionDecoder(Lr())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function sE(){return gill.combineCodec(Le(),$())}function ge(){return gill.getStructEncoder([["addressTreeInfo",lt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ye(){return gill.getStructDecoder([["addressTreeInfo",St()],["outputStateTreeIndex",gill.getU8Decoder()]])}function iE(){return gill.combineCodec(ge(),ye())}function pe(){return gill.getStructEncoder([["accountMeta",nt()],["data",Le()]])}function me(){return gill.getStructDecoder([["accountMeta",st()],["data",$()]])}function gE(){return gill.combineCodec(pe(),me())}function Hr(){return gill.getStructEncoder([["accountMeta",at()],["data",Le()]])}function Vr(){return gill.getStructDecoder([["accountMeta",it()],["data",$()]])}function TE(){return gill.combineCodec(Hr(),Vr())}function tt(){return gill.getDiscriminatedUnionEncoder([["Read",gill.getStructEncoder([["fields",gill.getTupleEncoder([Hr()])]])],["Mutate",gill.getStructEncoder([["fields",gill.getTupleEncoder([pe()])]])]])}function rt(){return gill.getDiscriminatedUnionDecoder([["Read",gill.getStructDecoder([["fields",gill.getTupleDecoder([Vr()])]])],["Mutate",gill.getStructDecoder([["fields",gill.getTupleDecoder([me()])]])]])}function xE(){return gill.combineCodec(tt(),rt())}function IE(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function CE(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 We(){return gill.getEnumEncoder(Fe)}function Oe(){return gill.getEnumDecoder(Fe)}function EE(){return gill.combineCodec(We(),Oe())}var Es=new Uint8Array([223,179,163,190,177,224,67,173]);function yh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Es)}function hy(){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 ph(){return gill.combineCodec(hy(),hs())}function Ps(e){return gill.decodeAccount(e,hs())}async function mh(e,n,r){let s=await zr(e,n,r);return gill.assertAccountExists(s),s}async function zr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ps(s)}async function Th(e,n,r){let s=await Py(e,n,r);return gill.assertAccountsExist(s),s}async function Py(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ps(t))}function fh(){return 184}var Us=new Uint8Array([90,36,35,219,93,225,110,96]);function Ih(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Us)}function jy(){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 Ch(){return gill.combineCodec(jy(),Ws())}function Os(e){return gill.decodeAccount(e,Ws())}async function Ls(e,n,r){let s=await qy(e,n,r);return gill.assertAccountExists(s),s}async function qy(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Os(s)}async function Dh(e,n,r){let s=await Yy(e,n,r);return gill.assertAccountsExist(s),s}async function Yy(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 hh(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(ks)}function yp(){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 Ph(){return gill.combineCodec(yp(),Ns())}function Hs(e){return gill.decodeAccount(e,Ns())}async function Vs(e,n,r){let s=await pp(e,n,r);return gill.assertAccountExists(s),s}async function pp(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Hs(s)}async function Rh(e,n,r){let s=await mp(e,n,r);return gill.assertAccountsExist(s),s}async function mp(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 Kh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ks)}function $r(){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 Jh(){return gill.combineCodec($r(),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:$r().encode(c),programAddress:r})}function jh(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:$r().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 tP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xs)}function Qr(){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 rP(){return gill.combineCodec(Qr(),$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:Qr().encode(c),programAddress:r})}function nP(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:Qr().encode(c),programAddress:r})}function sP(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 AP(){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 gP(){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 yP(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 xP(){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 IP(){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 CP(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 vP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xo)}function tn(){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 bP(){return gill.combineCodec(tn(),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:tn().encode(c),programAddress:r})}function _P(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:tn().encode(c),programAddress:r})}function UP(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 NP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function nn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["member",Wr()],["role",We()],["userAccountCreationArgs",ge()],["linkWalletArgs",gill.getOptionEncoder(vr())]]),e=>({...e,discriminator:Mo}))}function Eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["member",xt()],["role",Oe()],["userAccountCreationArgs",ye()],["linkWalletArgs",gill.getOptionDecoder(br())]])}function HP(){return gill.combineCodec(nn(),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:nn().encode(c),programAddress:r})}function VP(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:nn().encode(c),programAddress:r})}function GP(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 on(){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 YP(){return gill.combineCodec(on(),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:on().encode({}),programAddress:r})}function ZP(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:on().encode({}),programAddress:r})}function XP(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{globalCounter:r(),payer:r(),systemProgram:r()},data:vo().decode(e.data)}}var Wo=new Uint8Array([18]);function sR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wo)}function cn(){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",ve()]]),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",be()]])}function oR(){return gill.combineCodec(cn(),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:cn().encode(c),programAddress:r})}function cR(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:cn().encode(c),programAddress:r})}function aR(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 pR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(wo)}function dn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",C()],["createUserArgs",gill.getArrayEncoder(Pr())]]),e=>({...e,discriminator:wo}))}function ko(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",D()],["createUserArgs",gill.getArrayDecoder(Rr())]])}function mR(){return gill.combineCodec(dn(),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:dn().encode(c),programAddress:r})}function TR(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:dn().encode(c),programAddress:r})}function fR(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 MR(){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 ER(){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 hR(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 UR(){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 WR(){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 OR(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 VR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(tc)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["newOrigins",gill.getOptionEncoder(gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())))],["newAuthorityArgs",gill.getOptionEncoder(_r())]]),e=>({...e,discriminator: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(Ur())]])}function GR(){return gill.combineCodec(An(),rc())}async function FR(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:An().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:An().encode(c),programAddress:r})}function zR(e){if(e.accounts.length<5)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{domainConfig:r(),authority:r(),newAuthority:s(),whitelistedAddressTrees:s(),systemProgram:r()},data:rc().decode(e.data)}}var cc=new Uint8Array([6]);function XR(){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 $R(){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 QR(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 cv(){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 av(){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 iv(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 mv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(lc)}function Sc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Le()],["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 Tv(){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 fv(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 Mv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Dc)}function gn(){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 Ev(){return gill.combineCodec(gn(),Mc())}async function hv(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:gn().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:gn().encode(c),programAddress:r})}function Pv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{settings:r(),slotHashSysvar:s(),instructionsSysvar:r(),source:r(),destination:r(),systemProgram:r()},data:Mc().decode(e.data)}}var Rc=new Uint8Array([27]);function Ov(){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 Lv(){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 Bv(e){if(e.accounts.length<6)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===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 Fv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wc)}function pn(){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 zv(){return gill.combineCodec(pn(),Oc())}async function Kv(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:pn().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:pn().encode(c),programAddress:r})}function Jv(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 Qv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Nc)}function mn(){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 eb(){return gill.combineCodec(mn(),Hc())}async function tb(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:mn().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:mn().encode(c),programAddress:r})}function rb(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 db(){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 ub(){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 Ab(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 lb(){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 Sb(){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 xb(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 Pb(){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 Rb(){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 vb(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 Bb(){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 wb(){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 kb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:ua().decode(e.data)}}var pa=new Uint8Array([13]);function Kb(){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 Jb(){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 jb(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 e_(){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 t_(){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 r_(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 i_(){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 d_(){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 u_(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 T_(){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 f_(){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 l_(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 E_(){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 h_(){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 P_(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 O_(){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 L_(){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 B_(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 G_(){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 F_(){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 z_(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 Z_(){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 X_(){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 $_(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 oU(){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 cU(){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 aU(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 pU(){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 mU(){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 TU(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",KS=(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))(KS||{});function eW(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 tW(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 qS=6e3,YS=6001,ZS=6002,XS=6003,$S=6004,QS=6005,ex=6006,tx=6007,rx=6008,nx=6009,sx=6010,ox=6011,cx=6012,ax=6013,ix=6014,dx=6015,ux=6016,Ax=6017,gx=6018,yx=6019,px=6020,mx=6021,Tx=6022,fx=6023,lx=6024,Sx=6025,xx=6026,Ix=6027,Cx=6028,Dx=6029,Mx=6030,Ex=6031,hx=6032,Px=6033,Rx=6034,vx=6035,bx=6036,_x=6037,Ux=6038,Wx=6039,Ox=6040,Lx=6041,Bx=6042,wx=6043,kx=6044,Nx=6045,Hx=6046,Vx=6047,Gx=6048,Fx=6049,zx=6050,Kx=6051,li;process.env.NODE_ENV!=="production"&&(li={[Dx]:"This member is already delegated to another wallet.",[tx]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[Vx]:"The domain configuration account is disabled. Please contact support or try again later.",[Gx]:"Missing domain configuration account.",[sx]:"Duplicate public keys detected among members. Each member must have a unique key.",[nx]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[yx]:"No members provided. A multisig wallet must contain at least one member.",[Ax]:"Expected a User with Administrator role for this instruction.",[rx]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[dx]:"Expected a User with Transaction Manager role for this instruction.",[_x]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[Ux]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Wx]:"Declared buffer size does not match the actual serialized size.",[hx]:"Not enough members with vote permission to meet the approval threshold.",[Mx]:"At least one signer with execute permission is required to proceed.",[Ex]:"At least one signer with initiate permission is required to perform this action.",[lx]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[Kx]:"Address Tree supplied is not part of the whitelisted address trees",[gx]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[xx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[bx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[fx]:"Unexpected number of accounts provided for this instruction.",[YS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[$S]:"The extracted public key has an invalid length or encoding.",[qS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[XS]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Nx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[mx]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[ux]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[ix]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[Tx]:"Malformed transaction message: structure or formatting does not match the expected layout.",[Sx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[QS]:"The extracted WebAuthn signed message payload is malformed.",[wx]:"An input string exceeds the maximum allowed character length.",[Fx]:"This member is not registered under the provided domain configuration.",[Ix]:"A required account is missing from the instruction context.",[kx]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[Cx]:"User mutation arguments are required when performing add or remove delegate operations.",[Rx]:"No valid signer found in this transaction.",[cx]:"Only one permanent member is allowed per wallet.",[ax]:"Only one transaction manager is allowed per wallet.",[zx]:"The given origin index is not in the whitelisted origins.",[ox]:"Permanent members cannot be removed from a wallet.",[Bx]:"Writable CPI calls to protected accounts are not permitted.",[ex]:"The rpIdHash extracted from the signed message does not match the expected value.",[ZS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Hx]:"The specified slot number was not found in the provided slot history.",[px]:"Too many members: a maximum of 4 members are supported.",[Ox]:"This transaction has expired. It must be executed within 3 minutes of approval.",[Lx]:"This transaction has not yet reached the required approval threshold.",[vx]:"Only the transaction creator or rent payer may close this transaction buffer.",[Px]:"Member is not part of the expected signers for this transaction."});function aW(e){return process.env.NODE_ENV!=="production"?li[e]:"Error message not available in production bundles."}function iW(e,n,r){return gill.isProgramError(e,n,A,r)}var _t={Ed25519:1,Secp256r1:2};var Ie={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(Ie).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var ln=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!==ln)throw new Error(`Invalid public key length, expected ${ln} 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===ln)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 qx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Yx(){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(qx())],["addressTableLookups",gill.getArrayCodec(Yx())]]);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,$x=300*1e3;async function $t({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"));},$x);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 Qt(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ke(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 er(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function Qx(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"+er(u)),M=(l>g?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),E=Qx(M);return new Uint8Array([...y,...E])}function Ui(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 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 QW(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+er(n.get(-2))),y:BigInt("0x"+er(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Oi(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 eO(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(ke(n)),c=JSON.parse(new TextDecoder().decode(ke(r))),i=vi(c),a=_i(new Uint8Array(ke(s))),o=await Je({rpIdHash:t.subarray(0,32)});return new I(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(ke(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:In(e.clientId,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}async function tO(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 In(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getBase58Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function rr(e){return sha2_js.sha256(Cn(e))}function Cn(e){return new Uint8Array([...new Uint8Array(ke(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(ke(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 wi(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 ki(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 Bi(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(Bi(s))||(r.push(s),n.add(Bi(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 Ni({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 Hi(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 Vi(){if(!v.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return v.sendAndConfirm}function Gi(){if(!v.computeEstimate)throw new Error("Rpc is not initialized yet");return v.computeEstimate}async function fO(){return v.feePayer||(v.feePayer=await Hi(v.apiEndpoint??Ei)),v.feePayer}function En(){if(!v.jitoTipsConfig)throw new Error("Jito Bundle Config is not set.");return v.jitoTipsConfig}function he(){return v.authEndpoint??Mi}function Fi(){return v.rpId??Di}function Ye(){if(!v.clientSettings)throw new Error("No client settings found.");return v.clientSettings}function lO(){Object.keys(v).forEach(e=>{v[e]=void 0;});}function SO({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 nr(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=>nr(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 sr()).length-1}var hn;async function sr(){if(!hn){let{data:e}=await Vs(re(),await ji());hn=e.whitelistedAddressTrees;}return hn}async function $i(e,n,r){let s=await HI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function HI(e,n,r){let{address:s}=await W(e,n),t=await nr(s,r);return t?.data?.data?$().decode(t.data.data):null}async function Qi(e,n,r){let s=await VI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function VI(e,n,r){try{let{address:s}=await Q(e,n),t=await nr(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 zr(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 sr();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function KO(e){let r=(await sr()).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 sd(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function ji(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function od(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 Ce(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 cd(e){let n=await ne(e);return await Ce(n)}async function eL(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function yL(e){let n=await Mn(e,true),r=await ki(n.map(gill.getBase64EncodedWireTransaction),qe()),s=await Mn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await nC(s.map(gill.getBase64EncodedWireTransaction))}async function pL({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([Gi()(c),wi(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 Vi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function nC(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 mL(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 TL(e,n,r,s){let t=await Qi(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=>dd(u.pubkey)===e.toString())??{};if(!c)throw new Error("No permissions found for the current member.");let i=Me.has(c,Ie.InitiateTransaction),a=Me.has(c,Ie.VoteTransaction),o=Me.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(dd(d.pubkey)),userAddressTreeIndex:d.userAddressTreeIndex}}async function fL({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await $i(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return sC(n,c.transactionManagerUrl.value,e,s)}function sC(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(rr(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 dd(e){return e.keyType===_t.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function BL({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let{addDelegates:i,removeDelegates:a}=await cC(r),o=new _,d=null,u=null,y=[];if(i.length||a.length||t){let S=await aC({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 iC({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 cd(e)),compressedProofArgs:E,settingsMut:u,remainingAccounts:f})]:[await Qs({settingsIndex:e,configActions:g,payer:s,compressedProofArgs:E,remainingAccounts:f})],secp256r1VerifyInput:l}}async function cC(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 aC({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 iC({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 cr__default.default(new Uint8Array(M.accountMeta.address)).eq(f.address)));if(!l)throw new Error("Unable to find user account");i.push(Ad({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 cr__default.default(new Uint8Array(y.accountMeta.address)).eq(u.address)));if(!d)throw new Error("Unable to find user account");i.push(Ad({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 cr__default.default(new Uint8Array(y.accountMeta.address)).eq(d.address));if(!u)throw new Error("Unable to find user account");return uC({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 cr__default.default(new Uint8Array(u.accountMeta.address)).eq(d.address))):Promise.resolve(void 0)).then(d=>dC({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 dC({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:pd(n),userArgs:r?gill.some(r):gill.none(),delegateOperation:s}}function uC({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 Ad({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:pd(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 pd(e){let n=[];return e.initiate&&n.push(Ie.InitiateTransaction),e.vote&&n.push(Ie.VoteTransaction),e.execute&&n.push(Ie.ExecuteTransaction),Me.fromPermissions(n)}var Xe=33,$e=64,Un=14,fC=2,lC=gill.address("Secp256r1SigVerify1111111111111111111111111");function SC(){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 xC(){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 ld(){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=xC();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 Sd(){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=SC();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 NL(){return gill.combineCodec(Sd(),ld())}function z(e,n){let r=e.length,s=fC+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??lC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Sd().encode(i)}}function HL(e){return {programAddress:e.programAddress,accounts:{},data:ld().decode(e.data)}}async function ZL({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 QL({admin:e,addressTree:n}){return js({payer:e,addressTree:n,remainingAccounts:[]})}async function cB({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 TB({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 xB({payer:e}){let n=await sd();return bo({payer:e,globalCounter:n})}async function PB({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 _B({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 zB({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 XB({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 sw({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 Ew({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 Lw({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 EC(e,n,r,s){let t=hC(e,n),c=PC(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 hC(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 PC(e,n){return n<e.header.numSignerAccounts}async function ar({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:EC(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 Ed({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Ce(e),{accountMetas:u,addressLookupTableAccounts:y}=await ar({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(Ni({payer:s,tipAmount:a})),{instructions:g,addressLookupTableAccounts:y}}async function hd({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 Ce(y),[{accountMetas:l,addressLookupTableAccounts:f,transactionMessage:M},{settingsReadonlyArgs:E,proof:U,packedAccounts:S}]=await Promise.all([ar({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:Pe,signature:De,publicKey:Re,message:Wt}=V(G,Te);Wt&&De&&Re&&i.push({message:Wt,signature:De,publicKey:Re}),ie&&(S.addPreAccounts([{address:ie,role:gill.AccountRole.READONLY}]),Pe?.__option==="Some"&&O.push({domainConfigKey:ie,verifyArgs:Pe.value}));}let{remainingAccounts:L,systemOffset:K}=S.toAccountMetas(),N=[];i.length>0&&N.push(z(i));let H=vC(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 vC(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 dk({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 Ce(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 Sk({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 Ce(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:Pe,publicKey:De,message:Re}=V(H,G);Re&&Pe&&De&&x.push({message:Re,signature:Pe,publicKey:De}),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 bk({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 bd({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 _d({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 Ud({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 Wd({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 TN({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=`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(s)}&signature=${encodeURIComponent(a)}&expiry=${encodeURIComponent(o)}`,u=await $t({authUrl:d,data:c,signer:n,popUp:r});return {...u,signer:new de(u.signer)}}async function CN({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:Qt(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=`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(c)}&signature=${encodeURIComponent(d)}&expiry=${encodeURIComponent(u)}`,g=await $t({authUrl:y,data:a,signer:s,popUp:t});return {...g,signer:new de(g.signer)}}async function vN({message:e,response:n,expectedRPID:r=Fi(),expectedOrigin:s=he()}){let t=new Uint8Array([...new TextEncoder().encode(e),...In(n.clientId,n.deviceSignature.publicKey,n.nonce)]),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:Qt(t),expectedOrigin:s,expectedRPID:r,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:Oi(n.signer.toString()),counter:0}});return i&&c}async function VN({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 od(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:rr(J.authResponse)})),ie=bd({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:M,payer:e,transactionBufferAddress:E,settings:f,creator:t,preauthorizeExecution:!c,bufferExtendHashes:S,compressedArgs:G,expectedSecp256r1Signers:Te}),Pe=U.map(J=>Ud({transactionMessageBytes:J,transactionBufferAddress:E,settings:f,compressed:d})),De=u.map(J=>Wd({voter:J,transactionBufferAddress:E,settings:f,compressedArgs:G})),Re=_d({compressedArgs:G,settings:f,executor:c,transactionBufferAddress:E}),{instructions:Wt,addressLookupTableAccounts:wd}=await Ed({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:wd});return [T(ie),...Pe.map(J=>T([J])),...De.length?[T(De.flat())]:[],T(Re),T(Wt)]}var dr=class e{payer;keyMetaMap;constructor(n,r){this.payer=n,this.keyMetaMap=r;}static compile(n,r){let s=new Map,t=i=>{let a=s.get(i);return a===void 0&&(a={isSigner:false,isWritable:false,isInvoked:false},s.set(i,a)),a},c=t(r);c.isSigner=true,c.isWritable=true;for(let i of n){t(i.programAddress).isInvoked=false;for(let a of i.accounts??[]){let o=t(a.address);o.isSigner||=a.role===gill.AccountRole.READONLY_SIGNER||a.role===gill.AccountRole.WRITABLE_SIGNER,o.isWritable||=a.role===gill.AccountRole.WRITABLE||a.role===gill.AccountRole.WRITABLE_SIGNER;}}return new e(r,s)}getMessageComponents(){let n=[...this.keyMetaMap.entries()];if(n.length>256)throw new Error("Max static account keys length exceeded");let r=n.filter(([,o])=>o.isSigner&&o.isWritable),s=n.filter(([,o])=>o.isSigner&&!o.isWritable),t=n.filter(([,o])=>!o.isSigner&&o.isWritable),c=n.filter(([,o])=>!o.isSigner&&!o.isWritable),i={numSignerAccounts:r.length+s.length,numReadonlySignerAccounts:s.length,numReadonlyNonSignerAccounts:c.length};{if(r.length===0)throw new Error("Expected at least one writable signer key");let[o]=r[0];if(o!==this.payer)throw new Error("Expected first writable signer key to be the fee payer")}let a=[...r.map(([o])=>o),...s.map(([o])=>o),...t.map(([o])=>o),...c.map(([o])=>o)];return [i,a]}extractTableLookup(n){let[r,s]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&i.isWritable),[t,c]=this.drainKeysFoundInLookupTable(n[1],i=>!i.isSigner&&!i.isInvoked&&!i.isWritable);if(!(r.length===0&&t.length===0))return {addressTableLookup:{lookupTableAddress:n[0],writableIndexes:r,readonlyIndexes:t},drainedKeys:{writable:s,readonly:c}}}drainKeysFoundInLookupTable(n,r){let s=new Array,t=new Array;for(let[c,i]of this.keyMetaMap.entries())if(r(i)){let a=c,o=n.findIndex(d=>d===a);if(o>=0){if(o>=256)throw new Error("Max lookup table index exceeded");s.push(o),t.push(a),this.keyMetaMap.delete(c);}}return [s,t]}};var ur=class{staticAccountKeys;accountKeysFromLookups;constructor(n,r){this.staticAccountKeys=n,this.accountKeysFromLookups=r;}keySegments(){let n=[this.staticAccountKeys];return this.accountKeysFromLookups&&(n.push(this.accountKeysFromLookups.writable),n.push(this.accountKeysFromLookups.readonly)),n}get(n){for(let r of this.keySegments()){if(n<r.length)return r[n];n-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(n){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let s=new Map;this.keySegments().flat().forEach((c,i)=>{s.set(c,i);});let t=c=>{let i=s.get(c);if(i===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return i};return n.map(c=>({programAddressIndex:t(c.programAddress),accountIndices:c.accounts?.map(i=>t(i.address))??[],data:c.data}))}};function Bd({payer:e,recentBlockhash:n,instructions:r,addressesByLookupTableAddress:s}){let t=dr.compile(r,e),c=new Array,i={writable:[],readonly:[]},a=Object.entries(s??{});for(let 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 ur(d,i).compileInstructions(r);return {version:0,header:o,instructions:y,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function e2({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Bd({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return Ii(s)}async function o2({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 hd({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=zt;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=Dx;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=tx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Vx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Gx;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=sx;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=nx;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=yx;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=Ax;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=rx;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=dx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=_x;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=Ux;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Wx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=hx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=Mx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=Ex;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=lx;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=Kx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=gx;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=xx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=bx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=fx;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=YS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=$S;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=qS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=XS;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Nx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=mx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=ux;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=ix;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=Tx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=Sx;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=QS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=wx;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=Fx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=Ix;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=kx;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=Cx;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=Rx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=cx;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ax;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=zx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=ox;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=Bx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=ex;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=ZS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Hx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=px;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=Ox;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=Lx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=vx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Px;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=KS;exports.MultiWalletInstruction=JS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Rc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Dc;exports.Permission=Ie;exports.Permissions=Me;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=QL;exports.changeConfig=BL;exports.closeTransactionBuffer=bk;exports.compressSettingsAccount=ZL;exports.configAction=MD;exports.convertMemberKeyToString=dd;exports.convertPubkeyCompressedToCose=Oi;exports.convertPubkeyCoseToCompressed=QW;exports.createDomainConfig=cB;exports.createDomainUserAccounts=TB;exports.createGlobalCounter=xB;exports.createPopUp=Ui;exports.createTransactionBuffer=bd;exports.createTransactionManagerSigner=sC;exports.createUserAccounts=PB;exports.createWallet=Ew;exports.decodeDomainConfig=Bn;exports.decodeGlobalCounter=Gn;exports.decodeSettings=Ps;exports.decodeTransactionBuffer=Os;exports.decodeWhitelistedAddressTree=Hs;exports.decompressSettingsAccount=Lw;exports.disableDomainConfig=_B;exports.editDomainConfig=kB;exports.editTransactionManagerUrl=zB;exports.executeTransaction=Ed;exports.executeTransactionBuffer=_d;exports.executeTransactionSync=hd;exports.extendTransactionBuffer=Ud;exports.fetchAllDomainConfig=NC;exports.fetchAllGlobalCounter=JC;exports.fetchAllMaybeDomainConfig=Xd;exports.fetchAllMaybeGlobalCounter=yu;exports.fetchAllMaybeSettings=Py;exports.fetchAllMaybeTransactionBuffer=Yy;exports.fetchAllMaybeWhitelistedAddressTree=mp;exports.fetchAllSettings=Th;exports.fetchAllTransactionBuffer=Dh;exports.fetchAllWhitelistedAddressTree=Rh;exports.fetchCompressedAccount=Ji;exports.fetchDomainConfig=wn;exports.fetchGlobalCounter=KC;exports.fetchMaybeDomainConfig=Zd;exports.fetchMaybeGlobalCounter=gu;exports.fetchMaybeSettings=zr;exports.fetchMaybeSettingsAccountData=VI;exports.fetchMaybeTransactionBuffer=qy;exports.fetchMaybeUserAccountData=HI;exports.fetchMaybeWhitelistedAddressTree=pp;exports.fetchSettings=mh;exports.fetchSettingsAccountData=Qi;exports.fetchTransactionBuffer=Ls;exports.fetchUserAccountData=$i;exports.fetchWhitelistedAddressTree=Vs;exports.getAddMemberArgsCodec=XC;exports.getAddMemberArgsDecoder=gr;exports.getAddMemberArgsEncoder=Ar;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=Kh;exports.getAddWhitelistedAddressTreesInstruction=jh;exports.getAddWhitelistedAddressTreesInstructionAsync=js;exports.getAddWhitelistedAddressTreesInstructionDataCodec=Jh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Js;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=$r;exports.getAuthEndpoint=he;exports.getChangeConfigCompressedDiscriminatorBytes=AP;exports.getChangeConfigCompressedInstruction=oo;exports.getChangeConfigCompressedInstructionDataCodec=gP;exports.getChangeConfigCompressedInstructionDataDecoder=so;exports.getChangeConfigCompressedInstructionDataEncoder=no;exports.getChangeConfigDiscriminatorBytes=tP;exports.getChangeConfigInstruction=nP;exports.getChangeConfigInstructionAsync=Qs;exports.getChangeConfigInstructionDataCodec=rP;exports.getChangeConfigInstructionDataDecoder=$s;exports.getChangeConfigInstructionDataEncoder=Qr;exports.getClientAndDeviceHash=In;exports.getClientSettings=Ye;exports.getCompiledInstructionCodec=eD;exports.getCompiledInstructionDecoder=pr;exports.getCompiledInstructionEncoder=yr;exports.getCompressSettingsAccountDiscriminatorBytes=xP;exports.getCompressSettingsAccountInstruction=go;exports.getCompressSettingsAccountInstructionDataCodec=IP;exports.getCompressSettingsAccountInstructionDataDecoder=Ao;exports.getCompressSettingsAccountInstructionDataEncoder=uo;exports.getCompressedAccountMetaCodec=sD;exports.getCompressedAccountMetaDecoder=st;exports.getCompressedAccountMetaEncoder=nt;exports.getCompressedAccountMetaReadOnlyCodec=iD;exports.getCompressedAccountMetaReadOnlyDecoder=it;exports.getCompressedAccountMetaReadOnlyEncoder=at;exports.getCompressedProofCodec=AD;exports.getCompressedProofDecoder=xr;exports.getCompressedProofEncoder=Sr;exports.getCompressedSettingsAddressFromIndex=Q;exports.getCompressedSettingsCodec=mD;exports.getCompressedSettingsDataCodec=SD;exports.getCompressedSettingsDataDecoder=At;exports.getCompressedSettingsDataEncoder=ut;exports.getCompressedSettingsDecoder=Y;exports.getCompressedSettingsEncoder=dt;exports.getComputeBudgetEstimate=Gi;exports.getConfigActionCodec=DD;exports.getConfigActionDecoder=mt;exports.getConfigActionEncoder=pt;exports.getCreateDomainConfigDiscriminatorBytes=vP;exports.getCreateDomainConfigInstruction=_P;exports.getCreateDomainConfigInstructionAsync=Co;exports.getCreateDomainConfigInstructionDataCodec=bP;exports.getCreateDomainConfigInstructionDataDecoder=Io;exports.getCreateDomainConfigInstructionDataEncoder=tn;exports.getCreateDomainUserAccountDiscriminatorBytes=NP;exports.getCreateDomainUserAccountInstruction=VP;exports.getCreateDomainUserAccountInstructionAsync=ho;exports.getCreateDomainUserAccountInstructionDataCodec=HP;exports.getCreateDomainUserAccountInstructionDataDecoder=Eo;exports.getCreateDomainUserAccountInstructionDataEncoder=nn;exports.getCreateGlobalCounterDiscriminatorBytes=qP;exports.getCreateGlobalCounterInstruction=ZP;exports.getCreateGlobalCounterInstructionAsync=bo;exports.getCreateGlobalCounterInstructionDataCodec=YP;exports.getCreateGlobalCounterInstructionDataDecoder=vo;exports.getCreateGlobalCounterInstructionDataEncoder=on;exports.getCreateMultiWalletCompressedDiscriminatorBytes=sR;exports.getCreateMultiWalletCompressedInstruction=cR;exports.getCreateMultiWalletCompressedInstructionAsync=Lo;exports.getCreateMultiWalletCompressedInstructionDataCodec=oR;exports.getCreateMultiWalletCompressedInstructionDataDecoder=Oo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=cn;exports.getCreateUserAccountArgsCodec=vD;exports.getCreateUserAccountArgsDecoder=Rr;exports.getCreateUserAccountArgsEncoder=Pr;exports.getCreateUserAccountsDiscriminatorBytes=pR;exports.getCreateUserAccountsInstruction=TR;exports.getCreateUserAccountsInstructionAsync=No;exports.getCreateUserAccountsInstructionDataCodec=mR;exports.getCreateUserAccountsInstructionDataDecoder=ko;exports.getCreateUserAccountsInstructionDataEncoder=dn;exports.getDecompressSettingsAccountDiscriminatorBytes=MR;exports.getDecompressSettingsAccountInstruction=Ko;exports.getDecompressSettingsAccountInstructionDataCodec=ER;exports.getDecompressSettingsAccountInstructionDataDecoder=zo;exports.getDecompressSettingsAccountInstructionDataEncoder=Fo;exports.getDelegateOpCodec=UD;exports.getDelegateOpDecoder=be;exports.getDelegateOpEncoder=ve;exports.getDisableDomainConfigDiscriminatorBytes=UR;exports.getDisableDomainConfigInstruction=Xo;exports.getDisableDomainConfigInstructionDataCodec=WR;exports.getDisableDomainConfigInstructionDataDecoder=Zo;exports.getDisableDomainConfigInstructionDataEncoder=Yo;exports.getDomainConfigAddress=Je;exports.getDomainConfigCodec=kC;exports.getDomainConfigDecoder=Ln;exports.getDomainConfigDiscriminatorBytes=wC;exports.getDomainConfigEncoder=Yd;exports.getDomainConfigSize=HC;exports.getEditDomainConfigDiscriminatorBytes=VR;exports.getEditDomainConfigInstruction=nc;exports.getEditDomainConfigInstructionAsync=FR;exports.getEditDomainConfigInstructionDataCodec=GR;exports.getEditDomainConfigInstructionDataDecoder=rc;exports.getEditDomainConfigInstructionDataEncoder=An;exports.getEditMemberArgsCodec=BD;exports.getEditMemberArgsDecoder=Mr;exports.getEditMemberArgsEncoder=Dr;exports.getEditTransactionManagerUrlDiscriminatorBytes=XR;exports.getEditTransactionManagerUrlInstruction=dc;exports.getEditTransactionManagerUrlInstructionDataCodec=$R;exports.getEditTransactionManagerUrlInstructionDataDecoder=ic;exports.getEditTransactionManagerUrlInstructionDataEncoder=ac;exports.getExpectedSecp256r1SignersCodec=HD;exports.getExpectedSecp256r1SignersDecoder=ft;exports.getExpectedSecp256r1SignersEncoder=Tt;exports.getFeePayer=fO;exports.getGlobalCounterAddress=sd;exports.getGlobalCounterCodec=zC;exports.getGlobalCounterDecoder=Vn;exports.getGlobalCounterDiscriminatorBytes=FC;exports.getGlobalCounterEncoder=Au;exports.getGlobalCounterSize=jC;exports.getJitoTipsConfig=En;exports.getLightCpiSigner=eL;exports.getLightProtocolRpc=Ne;exports.getLinkWalletArgsCodec=zD;exports.getLinkWalletArgsDecoder=br;exports.getLinkWalletArgsEncoder=vr;exports.getMemberCodec=qD;exports.getMemberDecoder=yt;exports.getMemberEncoder=gt;exports.getMemberKeyCodec=XD;exports.getMemberKeyDecoder=q;exports.getMemberKeyEncoder=j;exports.getMigrateCompressedSettingsDiscriminatorBytes=cv;exports.getMigrateCompressedSettingsInstruction=mc;exports.getMigrateCompressedSettingsInstructionDataCodec=av;exports.getMigrateCompressedSettingsInstructionDataDecoder=pc;exports.getMigrateCompressedSettingsInstructionDataEncoder=yc;exports.getMigrateCompressedUsersDiscriminatorBytes=mv;exports.getMigrateCompressedUsersInstruction=Ic;exports.getMigrateCompressedUsersInstructionDataCodec=Tv;exports.getMigrateCompressedUsersInstructionDataDecoder=xc;exports.getMigrateCompressedUsersInstructionDataEncoder=Sc;exports.getMultiWalletErrorMessage=aW;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Ov;exports.getNativeTransferIntentCompressedInstruction=_c;exports.getNativeTransferIntentCompressedInstructionDataCodec=Lv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=bc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=vc;exports.getNativeTransferIntentDiscriminatorBytes=Mv;exports.getNativeTransferIntentInstruction=Ec;exports.getNativeTransferIntentInstructionAsync=hv;exports.getNativeTransferIntentInstructionDataCodec=Ev;exports.getNativeTransferIntentInstructionDataDecoder=Mc;exports.getNativeTransferIntentInstructionDataEncoder=gn;exports.getNewAuthorityArgsCodec=tM;exports.getNewAuthorityArgsDecoder=Ur;exports.getNewAuthorityArgsEncoder=_r;exports.getOriginIndex=tO;exports.getPackedAddressTreeInfoCodec=sM;exports.getPackedAddressTreeInfoDecoder=St;exports.getPackedAddressTreeInfoEncoder=lt;exports.getPackedStateTreeInfoCodec=aM;exports.getPackedStateTreeInfoDecoder=ct;exports.getPackedStateTreeInfoEncoder=ot;exports.getPermissionsCodec=uM;exports.getPermissionsDecoder=Ue;exports.getPermissionsEncoder=_e;exports.getProofArgsCodec=pM;exports.getProofArgsDecoder=D;exports.getProofArgsEncoder=C;exports.getRemoveMemberArgsCodec=lM;exports.getRemoveMemberArgsDecoder=hr;exports.getRemoveMemberArgsEncoder=Er;exports.getRpId=Fi;exports.getSecp256r1Message=Cn;exports.getSecp256r1MessageHash=rr;exports.getSecp256r1PubkeyCodec=IM;exports.getSecp256r1PubkeyDecoder=xt;exports.getSecp256r1PubkeyEncoder=Wr;exports.getSecp256r1SignatureOffsetsDataDecoder=xC;exports.getSecp256r1SignatureOffsetsDataEncoder=SC;exports.getSecp256r1VerifyArgsCodec=MM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=B;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=RM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=X;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Z;exports.getSecp256r1VerifyInstruction=z;exports.getSecp256r1VerifyInstructionDataCodec=NL;exports.getSecp256r1VerifyInstructionDataDecoder=ld;exports.getSecp256r1VerifyInstructionDataEncoder=Sd;exports.getSendAndConfirmTransaction=Vi;exports.getSettingsCodec=ph;exports.getSettingsCreationArgsCodec=UM;exports.getSettingsCreationArgsDecoder=Ct;exports.getSettingsCreationArgsEncoder=It;exports.getSettingsDecoder=hs;exports.getSettingsDiscriminatorBytes=yh;exports.getSettingsEncoder=hy;exports.getSettingsFromIndex=ne;exports.getSettingsIndexWithAddressCodec=LM;exports.getSettingsIndexWithAddressDecoder=Lr;exports.getSettingsIndexWithAddressEncoder=Or;exports.getSettingsMutArgsCodec=NM;exports.getSettingsMutArgsDecoder=xe;exports.getSettingsMutArgsEncoder=Se;exports.getSettingsReadonlyArgsCodec=FM;exports.getSettingsReadonlyArgsDecoder=te;exports.getSettingsReadonlyArgsEncoder=ee;exports.getSettingsSize=fh;exports.getSignedSecp256r1Key=eO;exports.getSignedTransactionManager=fL;exports.getSolanaRpc=re;exports.getSolanaRpcEndpoint=qe;exports.getTokenTransferIntentCompressedDiscriminatorBytes=Qv;exports.getTokenTransferIntentCompressedInstruction=Vc;exports.getTokenTransferIntentCompressedInstructionAsync=tb;exports.getTokenTransferIntentCompressedInstructionDataCodec=eb;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Hc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=mn;exports.getTokenTransferIntentDiscriminatorBytes=Fv;exports.getTokenTransferIntentInstruction=Lc;exports.getTokenTransferIntentInstructionAsync=Kv;exports.getTokenTransferIntentInstructionDataCodec=zv;exports.getTokenTransferIntentInstructionDataDecoder=Oc;exports.getTokenTransferIntentInstructionDataEncoder=pn;exports.getTransactionBufferAddress=od;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=lb;exports.getTransactionBufferCloseCompressedInstruction=Qc;exports.getTransactionBufferCloseCompressedInstructionDataCodec=Sb;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=$c;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=Xc;exports.getTransactionBufferCloseDiscriminatorBytes=db;exports.getTransactionBufferCloseInstruction=jc;exports.getTransactionBufferCloseInstructionDataCodec=ub;exports.getTransactionBufferCloseInstructionDataDecoder=Jc;exports.getTransactionBufferCloseInstructionDataEncoder=Kc;exports.getTransactionBufferCodec=Ch;exports.getTransactionBufferCreateArgsCodec=jM;exports.getTransactionBufferCreateArgsDecoder=Mt;exports.getTransactionBufferCreateArgsEncoder=Dt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Bb;exports.getTransactionBufferCreateCompressedInstruction=Aa;exports.getTransactionBufferCreateCompressedInstructionDataCodec=wb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=ua;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=da;exports.getTransactionBufferCreateDiscriminatorBytes=Pb;exports.getTransactionBufferCreateInstruction=oa;exports.getTransactionBufferCreateInstructionDataCodec=Rb;exports.getTransactionBufferCreateInstructionDataDecoder=sa;exports.getTransactionBufferCreateInstructionDataEncoder=na;exports.getTransactionBufferDecoder=Ws;exports.getTransactionBufferDiscriminatorBytes=Ih;exports.getTransactionBufferEncoder=jy;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=e_;exports.getTransactionBufferExecuteCompressedInstruction=Da;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=t_;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ca;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Ia;exports.getTransactionBufferExecuteDiscriminatorBytes=Kb;exports.getTransactionBufferExecuteInstruction=fa;exports.getTransactionBufferExecuteInstructionDataCodec=Jb;exports.getTransactionBufferExecuteInstructionDataDecoder=Ta;exports.getTransactionBufferExecuteInstructionDataEncoder=ma;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=T_;exports.getTransactionBufferExtendCompressedInstruction=La;exports.getTransactionBufferExtendCompressedInstructionDataCodec=f_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Oa;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Wa;exports.getTransactionBufferExtendDiscriminatorBytes=i_;exports.getTransactionBufferExtendInstruction=va;exports.getTransactionBufferExtendInstructionDataCodec=d_;exports.getTransactionBufferExtendInstructionDataDecoder=Ra;exports.getTransactionBufferExtendInstructionDataEncoder=Pa;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=O_;exports.getTransactionBufferVoteCompressedInstruction=ja;exports.getTransactionBufferVoteCompressedInstructionDataCodec=L_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=Ja;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=Ka;exports.getTransactionBufferVoteDiscriminatorBytes=E_;exports.getTransactionBufferVoteInstruction=Va;exports.getTransactionBufferVoteInstructionDataCodec=h_;exports.getTransactionBufferVoteInstructionDataDecoder=Ha;exports.getTransactionBufferVoteInstructionDataEncoder=Na;exports.getTransactionExecuteCompressedDiscriminatorBytes=Z_;exports.getTransactionExecuteCompressedInstruction=oi;exports.getTransactionExecuteCompressedInstructionDataCodec=X_;exports.getTransactionExecuteCompressedInstructionDataDecoder=si;exports.getTransactionExecuteCompressedInstructionDataEncoder=ni;exports.getTransactionExecuteDiscriminatorBytes=G_;exports.getTransactionExecuteInstruction=Qa;exports.getTransactionExecuteInstructionDataCodec=F_;exports.getTransactionExecuteInstructionDataDecoder=$a;exports.getTransactionExecuteInstructionDataEncoder=Xa;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=pU;exports.getTransactionExecuteSyncCompressedInstruction=fi;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=mU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=Ti;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=mi;exports.getTransactionExecuteSyncDiscriminatorBytes=oU;exports.getTransactionExecuteSyncInstruction=Ai;exports.getTransactionExecuteSyncInstructionDataCodec=cU;exports.getTransactionExecuteSyncInstructionDataDecoder=ui;exports.getTransactionExecuteSyncInstructionDataEncoder=di;exports.getTransactionMessageAddressTableLookupCodec=eE;exports.getTransactionMessageAddressTableLookupDecoder=wr;exports.getTransactionMessageAddressTableLookupEncoder=Br;exports.getTransactionMessageCodec=XM;exports.getTransactionMessageDecoder=ht;exports.getTransactionMessageEncoder=Et;exports.getUserAccountAddress=W;exports.getUserCodec=sE;exports.getUserCreationArgsCodec=iE;exports.getUserCreationArgsDecoder=ye;exports.getUserCreationArgsEncoder=ge;exports.getUserDecoder=$;exports.getUserEncoder=Le;exports.getUserMutArgsCodec=gE;exports.getUserMutArgsDecoder=me;exports.getUserMutArgsEncoder=pe;exports.getUserReadOnlyArgsCodec=TE;exports.getUserReadOnlyArgsDecoder=Vr;exports.getUserReadOnlyArgsEncoder=Hr;exports.getUserReadOnlyOrMutateArgsCodec=xE;exports.getUserReadOnlyOrMutateArgsDecoder=rt;exports.getUserReadOnlyOrMutateArgsEncoder=tt;exports.getUserRoleCodec=EE;exports.getUserRoleDecoder=Oe;exports.getUserRoleEncoder=We;exports.getWalletAddressFromIndex=cd;exports.getWalletAddressFromSettings=Ce;exports.getWhitelistedAddressTreeCodec=Ph;exports.getWhitelistedAddressTreeDecoder=Ns;exports.getWhitelistedAddressTreeDiscriminatorBytes=hh;exports.getWhitelistedAddressTreeEncoder=yp;exports.getWhitelistedAddressTreeFromIndex=Pn;exports.getWhitelistedAddressTreeIndexFromAddress=KO;exports.getWhitelistedAddressTreesAddress=ji;exports.identifyMultiWalletAccount=eW;exports.identifyMultiWalletInstruction=tW;exports.initialize=SO;exports.isConfigAction=ED;exports.isMultiWalletError=iW;exports.isUserReadOnlyOrMutateArgs=CE;exports.migrateSettings=XB;exports.migrateUsers=sw;exports.nativeTransferIntent=dk;exports.parseAddWhitelistedAddressTreesInstruction=qh;exports.parseChangeConfigCompressedInstruction=yP;exports.parseChangeConfigInstruction=sP;exports.parseCompressSettingsAccountInstruction=CP;exports.parseCreateDomainConfigInstruction=UP;exports.parseCreateDomainUserAccountInstruction=GP;exports.parseCreateGlobalCounterInstruction=XP;exports.parseCreateMultiWalletCompressedInstruction=aR;exports.parseCreateUserAccountsInstruction=fR;exports.parseDecompressSettingsAccountInstruction=hR;exports.parseDisableDomainConfigInstruction=OR;exports.parseEditDomainConfigInstruction=zR;exports.parseEditTransactionManagerUrlInstruction=QR;exports.parseMigrateCompressedSettingsInstruction=iv;exports.parseMigrateCompressedUsersInstruction=fv;exports.parseNativeTransferIntentCompressedInstruction=Bv;exports.parseNativeTransferIntentInstruction=Pv;exports.parseSecp256r1VerifyInstruction=HL;exports.parseTokenTransferIntentCompressedInstruction=rb;exports.parseTokenTransferIntentInstruction=Jv;exports.parseTransactionBufferCloseCompressedInstruction=xb;exports.parseTransactionBufferCloseInstruction=Ab;exports.parseTransactionBufferCreateCompressedInstruction=kb;exports.parseTransactionBufferCreateInstruction=vb;exports.parseTransactionBufferExecuteCompressedInstruction=r_;exports.parseTransactionBufferExecuteInstruction=jb;exports.parseTransactionBufferExtendCompressedInstruction=l_;exports.parseTransactionBufferExtendInstruction=u_;exports.parseTransactionBufferVoteCompressedInstruction=B_;exports.parseTransactionBufferVoteInstruction=P_;exports.parseTransactionExecuteCompressedInstruction=$_;exports.parseTransactionExecuteInstruction=z_;exports.parseTransactionExecuteSyncCompressedInstruction=TU;exports.parseTransactionExecuteSyncInstruction=aU;exports.pollJitoBundleConfirmation=mL;exports.prepareTransactionBundle=VN;exports.prepareTransactionMessage=e2;exports.prepareTransactionSync=o2;exports.retrieveTransactionManager=TL;exports.sendJitoBundle=nC;exports.signAndSendBundledTransactions=yL;exports.signAndSendTransaction=pL;exports.signMessageWithPasskey=TN;exports.signTransactionWithPasskey=CN;exports.tokenTransferIntent=Sk;exports.uninitialize=lO;exports.userReadOnlyOrMutateArgs=IE;exports.vaultTransactionMessageDeserialize=Ci;exports.vaultTransactionMessageSerialize=Ii;exports.verifyMessage=vN;exports.voteTransactionBuffer=Wd;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var gill=require('gill'),Rn=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'),ed25519_js=require('@noble/curves/ed25519.js'),server=require('@simplewebauthn/server');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Rn__default=/*#__PURE__*/_interopDefault(Rn);var On=new Uint8Array([201,232,212,229,59,241,106,197]);function WC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(On)}function Jd(){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 wn(){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 LC(){return gill.combineCodec(Jd(),wn())}function kn(e){return gill.decodeAccount(e,wn())}async function Nn(e,n,r){let s=await jd(e,n,r);return gill.assertAccountExists(s),s}async function jd(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return kn(s)}async function BC(e,n,r){let s=await qd(e,n,r);return gill.assertAccountsExist(s),s}async function qd(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>kn(t))}function OC(){return 846}var Gn=new Uint8Array([42,206,176,58,175,129,130,233]);function NC(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Gn)}function iu(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["index",gill.getU128Encoder()]]),e=>({...e,discriminator:Gn}))}function Fn(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()]])}function HC(){return gill.combineCodec(iu(),Fn())}function zn(e){return gill.decodeAccount(e,Fn())}async function VC(e,n,r){let s=await du(e,n,r);return gill.assertAccountExists(s),s}async function du(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return zn(s)}async function GC(e,n,r){let s=await uu(e,n,r);return gill.assertAccountsExist(s),s}async function uu(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>zn(t))}function FC(){return 24}function ur(){return gill.getStructEncoder([["memberKey",X()],["permissions",ve()],["verifyArgs",gill.getOptionEncoder(O())],["userMutArgs",de()]])}function Ar(){return gill.getStructDecoder([["memberKey",$()],["permissions",be()],["verifyArgs",gill.getOptionDecoder(w())],["userMutArgs",ue()]])}function jC(){return gill.combineCodec(ur(),Ar())}function gr(){return gill.getStructEncoder([["programAddressIndex",gill.getU8Encoder()],["accountIndices",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["data",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]])}function yr(){return gill.getStructDecoder([["programAddressIndex",gill.getU8Decoder()],["accountIndices",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())],["data",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function ZC(){return gill.combineCodec(gr(),yr())}function et(){return gill.getStructEncoder([["treeInfo",rt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["outputStateTreeIndex",gill.getU8Encoder()]])}function tt(){return gill.getStructDecoder([["treeInfo",nt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["outputStateTreeIndex",gill.getU8Decoder()]])}function eD(){return gill.combineCodec(et(),tt())}function mr(){return gill.getStructEncoder([["treeInfo",rt()],["address",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function pr(){return gill.getStructDecoder([["treeInfo",nt()],["address",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function sD(){return gill.combineCodec(mr(),pr())}function xr(){return gill.getStructEncoder([["a",gill.fixEncoderSize(gill.getBytesEncoder(),32)],["b",gill.fixEncoderSize(gill.getBytesEncoder(),64)],["c",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function Ir(){return gill.getStructDecoder([["a",gill.fixDecoderSize(gill.getBytesDecoder(),32)],["b",gill.fixDecoderSize(gill.getBytesDecoder(),64)],["c",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function aD(){return gill.combineCodec(xr(),Ir())}function st(){return gill.getStructEncoder([["data",gill.getOptionEncoder(ot())]])}function z(){return gill.getStructDecoder([["data",gill.getOptionDecoder(ct())]])}function AD(){return gill.combineCodec(st(),z())}function ot(){return gill.getStructEncoder([["threshold",gill.getU8Encoder()],["bump",gill.getU8Encoder()],["index",gill.getU128Encoder()],["multiWalletBump",gill.getU8Encoder()],["members",gill.getArrayEncoder(at())],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function ct(){return gill.getStructDecoder([["threshold",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["index",gill.getU128Decoder()],["multiWalletBump",gill.getU8Decoder()],["members",gill.getArrayDecoder(it())],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function pD(){return gill.combineCodec(ot(),ct())}function dt(){return gill.getDiscriminatedUnionEncoder([["EditPermissions",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(Mr())])]])],["AddMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(ur())])]])],["RemoveMembers",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getArrayEncoder(hr())])]])],["SetThreshold",gill.getStructEncoder([["fields",gill.getTupleEncoder([gill.getU8Encoder()])]])]])}function ut(){return gill.getDiscriminatedUnionDecoder([["EditPermissions",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Er())])]])],["AddMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Ar())])]])],["RemoveMembers",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getArrayDecoder(Pr())])]])],["SetThreshold",gill.getStructDecoder([["fields",gill.getTupleDecoder([gill.getU8Decoder()])]])]])}function SD(){return gill.combineCodec(dt(),ut())}function xD(e,n){return Array.isArray(n)?{__kind:e,fields:n}:{__kind:e,...n??{}}}function ID(e,n){return n.__kind===e}function Rr(){return gill.getStructEncoder([["member",gill.getAddressEncoder()],["role",_e()],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userCreationArgs",Te()]])}function vr(){return gill.getStructDecoder([["member",gill.getAddressDecoder()],["role",Ue()],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userCreationArgs",fe()]])}function ED(){return gill.combineCodec(Rr(),vr())}function Mr(){return gill.getStructEncoder([["memberKey",X()],["permissions",ve()]])}function Er(){return gill.getStructDecoder([["memberKey",$()],["permissions",be()]])}function vD(){return gill.combineCodec(Mr(),Er())}function At(){return gill.getStructEncoder([["memberKey",X()],["messageHash",gill.fixEncoderSize(gill.getBytesEncoder(),32)]])}function gt(){return gill.getStructDecoder([["memberKey",$()],["messageHash",gill.fixDecoderSize(gill.getBytesDecoder(),32)]])}function WD(){return gill.combineCodec(At(),gt())}function br(){return gill.getStructEncoder([["settingsMutArgs",Ae()],["transactionManager",gill.getOptionEncoder(de())]])}function _r(){return gill.getStructDecoder([["settingsMutArgs",ge()],["transactionManager",gill.getOptionDecoder(ue())]])}function wD(){return gill.combineCodec(br(),_r())}function at(){return gill.getStructEncoder([["pubkey",X()],["permissions",ve()],["role",gill.getU8Encoder()],["userAddressTreeIndex",gill.getU8Encoder()],["isDelegate",gill.getU8Encoder()]])}function it(){return gill.getStructDecoder([["pubkey",$()],["permissions",be()],["role",gill.getU8Decoder()],["userAddressTreeIndex",gill.getU8Decoder()],["isDelegate",gill.getU8Decoder()]])}function VD(){return gill.combineCodec(at(),it())}function X(){return gill.getStructEncoder([["keyType",gill.getU8Encoder()],["key",gill.fixEncoderSize(gill.getBytesEncoder(),33)]])}function $(){return gill.getStructDecoder([["keyType",gill.getU8Decoder()],["key",gill.fixDecoderSize(gill.getBytesDecoder(),33)]])}function zD(){return gill.combineCodec(X(),$())}function Lr(){return gill.getStructEncoder([["authorityCreationArgs",Te()],["compressedProofArgs",M()]])}function Br(){return gill.getStructDecoder([["authorityCreationArgs",fe()],["compressedProofArgs",E()]])}function qD(){return gill.combineCodec(Lr(),Br())}function yt(){return gill.getStructEncoder([["addressMerkleTreePubkeyIndex",gill.getU8Encoder()],["addressQueuePubkeyIndex",gill.getU8Encoder()],["rootIndex",gill.getU16Encoder()]])}function mt(){return gill.getStructDecoder([["addressMerkleTreePubkeyIndex",gill.getU8Decoder()],["addressQueuePubkeyIndex",gill.getU8Decoder()],["rootIndex",gill.getU16Decoder()]])}function XD(){return gill.combineCodec(yt(),mt())}function rt(){return gill.getStructEncoder([["rootIndex",gill.getU16Encoder()],["proveByIndex",gill.getBooleanEncoder()],["merkleTreePubkeyIndex",gill.getU8Encoder()],["queuePubkeyIndex",gill.getU8Encoder()],["leafIndex",gill.getU32Encoder()]])}function nt(){return gill.getStructDecoder([["rootIndex",gill.getU16Decoder()],["proveByIndex",gill.getBooleanDecoder()],["merkleTreePubkeyIndex",gill.getU8Decoder()],["queuePubkeyIndex",gill.getU8Decoder()],["leafIndex",gill.getU32Decoder()]])}function eM(){return gill.combineCodec(rt(),nt())}function ve(){return gill.getStructEncoder([["mask",gill.getU8Encoder()]])}function be(){return gill.getStructDecoder([["mask",gill.getU8Decoder()]])}function nM(){return gill.combineCodec(ve(),be())}function M(){return gill.getStructEncoder([["proof",gill.getOptionEncoder(xr())],["lightCpiAccountsStartIndex",gill.getU8Encoder()]])}function E(){return gill.getStructDecoder([["proof",gill.getOptionDecoder(Ir())],["lightCpiAccountsStartIndex",gill.getU8Decoder()]])}function aM(){return gill.combineCodec(M(),E())}function hr(){return gill.getStructEncoder([["memberKey",X()],["userMutArgs",de()]])}function Pr(){return gill.getStructDecoder([["memberKey",$()],["userMutArgs",ue()]])}function AM(){return gill.combineCodec(hr(),Pr())}function Or(){return gill.getTupleEncoder([gill.fixEncoderSize(gill.getBytesEncoder(),33)])}function pt(){return gill.getTupleDecoder([gill.fixDecoderSize(gill.getBytesDecoder(),33)])}function mM(){return gill.combineCodec(Or(),pt())}function O(){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 fM(){return gill.combineCodec(O(),w())}function Q(){return gill.getStructEncoder([["domainConfigKey",gill.getAddressEncoder()],["verifyArgs",O()]])}function ee(){return gill.getStructDecoder([["domainConfigKey",gill.getAddressDecoder()],["verifyArgs",w()]])}function IM(){return gill.combineCodec(Q(),ee())}function Tt(){return gill.getStructEncoder([["addressTreeInfo",yt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function ft(){return gill.getStructDecoder([["addressTreeInfo",mt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function EM(){return gill.combineCodec(Tt(),ft())}function lt(){return gill.getStructEncoder([["index",gill.getU128Encoder()],["settingsAddressTreeIndex",gill.getU8Encoder()]])}function St(){return gill.getStructDecoder([["index",gill.getU128Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()]])}function RM(){return gill.combineCodec(lt(),St())}function Ae(){return gill.getStructEncoder([["accountMeta",et()],["data",st()]])}function ge(){return gill.getStructDecoder([["accountMeta",tt()],["data",z()]])}function UM(){return gill.combineCodec(Ae(),ge())}function ne(){return gill.getStructEncoder([["accountMeta",mr()],["data",st()]])}function se(){return gill.getStructDecoder([["accountMeta",pr()],["data",z()]])}function OM(){return gill.combineCodec(ne(),se())}function xt(){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(At()))]])}function It(){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(gt()))]])}function HM(){return gill.combineCodec(xt(),It())}function Ct(){return gill.getStructEncoder([["numSigners",gill.getU8Encoder()],["numWritableSigners",gill.getU8Encoder()],["numWritableNonSigners",gill.getU8Encoder()],["numAccountKeys",gill.getU8Encoder()],["instructions",gill.getArrayEncoder(gr())],["addressTableLookups",gill.getArrayEncoder(wr())]])}function Dt(){return gill.getStructDecoder([["numSigners",gill.getU8Decoder()],["numWritableSigners",gill.getU8Decoder()],["numWritableNonSigners",gill.getU8Decoder()],["numAccountKeys",gill.getU8Decoder()],["instructions",gill.getArrayDecoder(yr())],["addressTableLookups",gill.getArrayDecoder(kr())]])}function zM(){return gill.combineCodec(Ct(),Dt())}function wr(){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 jM(){return gill.combineCodec(wr(),kr())}function Mt(){return gill.getStructEncoder([["member",X()],["domainConfig",gill.getOptionEncoder(gill.getAddressEncoder())],["role",_e()],["delegatedTo",gill.getOptionEncoder(lt())],["transactionManagerUrl",gill.getOptionEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["userAddressTreeIndex",gill.getU8Encoder()]])}function te(){return gill.getStructDecoder([["member",$()],["domainConfig",gill.getOptionDecoder(gill.getAddressDecoder())],["role",Ue()],["delegatedTo",gill.getOptionDecoder(St())],["transactionManagerUrl",gill.getOptionDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder()))],["userAddressTreeIndex",gill.getU8Decoder()]])}function XM(){return gill.combineCodec(Mt(),te())}function Te(){return gill.getStructEncoder([["addressTreeInfo",yt()],["outputStateTreeIndex",gill.getU8Encoder()]])}function fe(){return gill.getStructDecoder([["addressTreeInfo",mt()],["outputStateTreeIndex",gill.getU8Decoder()]])}function tE(){return gill.combineCodec(Te(),fe())}function de(){return gill.getStructEncoder([["accountMeta",et()],["data",Mt()]])}function ue(){return gill.getStructDecoder([["accountMeta",tt()],["data",te()]])}function oE(){return gill.combineCodec(de(),ue())}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 _e(){return gill.getEnumEncoder(He)}function Ue(){return gill.getEnumDecoder(He)}function iE(){return gill.combineCodec(_e(),Ue())}var Is=new Uint8Array([223,179,163,190,177,224,67,173]);function jE(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Is)}function gy(){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(),3)]]),e=>({...e,discriminator:Is}))}function Cs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["index",gill.getU128Decoder()],["members",gill.getArrayDecoder(it(),{size:4})],["membersLen",gill.getU8Decoder()],["threshold",gill.getU8Decoder()],["multiWalletBump",gill.getU8Decoder()],["bump",gill.getU8Decoder()],["settingsAddressTreeIndex",gill.getU8Decoder()],["padding",gill.fixDecoderSize(gill.getBytesDecoder(),3)]])}function qE(){return gill.combineCodec(gy(),Cs())}function Ds(e){return gill.decodeAccount(e,Cs())}async function YE(e,n,r){let s=await Fr(e,n,r);return gill.assertAccountExists(s),s}async function Fr(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Ds(s)}async function ZE(e,n,r){let s=await yy(e,n,r);return gill.assertAccountsExist(s),s}async function yy(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Ds(t))}function XE(){return 184}var Rs=new Uint8Array([90,36,35,219,93,225,110,96]);function th(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Rs)}function Wy(){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",X()],["executor",X()],["bufferExtendHashes",gill.getArrayEncoder(gill.fixEncoderSize(gill.getBytesEncoder(),32))],["voters",gill.getArrayEncoder(X())],["expectedSecp256r1Signers",gill.getOptionEncoder(gill.getArrayEncoder(At()))],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Rs}))}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",$()],["executor",$()],["bufferExtendHashes",gill.getArrayDecoder(gill.fixDecoderSize(gill.getBytesDecoder(),32))],["voters",gill.getArrayDecoder($())],["expectedSecp256r1Signers",gill.getOptionDecoder(gill.getArrayDecoder(gt()))],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function rh(){return gill.combineCodec(Wy(),vs())}function bs(e){return gill.decodeAccount(e,vs())}async function _s(e,n,r){let s=await Ly(e,n,r);return gill.assertAccountExists(s),s}async function Ly(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return bs(s)}async function nh(e,n,r){let s=await By(e,n,r);return gill.assertAccountsExist(s),s}async function By(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>bs(t))}var Ls=new Uint8Array([105,23,173,2,197,255,80,87]);function ch(){return gill.fixEncoderSize(gill.getBytesEncoder(),8).encode(Ls)}function Qy(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),8)],["whitelistedAddressTrees",gill.getArrayEncoder(gill.getAddressEncoder())],["bump",gill.getU8Encoder()]]),e=>({...e,discriminator:Ls}))}function Bs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),8)],["whitelistedAddressTrees",gill.getArrayDecoder(gill.getAddressDecoder())],["bump",gill.getU8Decoder()]])}function ah(){return gill.combineCodec(Qy(),Bs())}function Os(e){return gill.decodeAccount(e,Bs())}async function ws(e,n,r){let s=await em(e,n,r);return gill.assertAccountExists(s),s}async function em(e,n,r){let s=await gill.fetchEncodedAccount(e,n,r);return Os(s)}async function ih(e,n,r){let s=await tm(e,n,r);return gill.assertAccountsExist(s),s}async function tm(e,n,r){return (await gill.fetchEncodedAccounts(e,n,r)).map(t=>Os(t))}function m({args:e}){if(!e)return [];let{remainingAccounts:n}=e;return n.map(r=>r.signer?{address:r.address,role:r.role,signer:r.signer}:{address:r.address,role:r.role})}function Ns(e){if(e==null)throw new Error("Expected a value but received null or undefined.");return e}function K(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 p(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:K(r.value),role:ks(r.value)?gill.upgradeRoleToSigner(s):s,...ks(r.value)?{signer:r.value}:{}})}}function ks(e){return !!e&&typeof e=="object"&&"address"in e&&gill.isTransactionSigner(e)}var Vs=new Uint8Array([8]);function Eh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vs)}function Xr(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["addressTree",gill.getAddressEncoder()]]),e=>({...e,discriminator:Vs}))}function Gs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["addressTree",gill.getAddressDecoder()]])}function hh(){return gill.combineCodec(Xr(),Gs())}async function Fs(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Xr().encode(c),programAddress:r})}function Ph(e,n){let r=n?.programAddress??A,t={whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.whitelistedAddressTrees),o(t.payer),o(t.systemProgram),...a],data:Xr().encode(c),programAddress:r})}function Rh(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:Gs().decode(e.data)}}var js=new Uint8Array([9]);function Bh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(js)}function $r(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsIndex",gill.getU128Encoder()],["configActions",gill.getArrayEncoder(dt())],["compressedProofArgs",gill.getOptionEncoder(M())]]),e=>({...e,discriminator:js}))}function qs(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsIndex",gill.getU128Decoder()],["configActions",gill.getArrayDecoder(ut())],["compressedProofArgs",gill.getOptionDecoder(E())]])}function Oh(){return gill.combineCodec($r(),qs())}async function Ys(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(Ns(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(K(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=m(i),o=p(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:$r().encode(c),programAddress:r})}function wh(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=m(i),o=p(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:$r().encode(c),programAddress:r})}function kh(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:qs().decode(e.data)}}var $s=new Uint8Array([20]);function Kh(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($s)}function Qs(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["configActions",gill.getArrayEncoder(dt())],["settingsMut",Ae()],["compressedProofArgs",M()]]),e=>({...e,discriminator:$s}))}function eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["configActions",gill.getArrayDecoder(ut())],["settingsMut",ge()],["compressedProofArgs",E()]])}function Jh(){return gill.combineCodec(Qs(),eo())}function to(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=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.authority),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Qs().encode(c),programAddress:r})}function jh(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:eo().decode(e.data)}}var so=new Uint8Array([17]);function eP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(so)}function oo(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["settingsMutArgs",Ae()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:so}))}function co(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["settingsMutArgs",ge()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function tP(){return gill.combineCodec(oo(),co())}function ao(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=m(i),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:oo().encode(c),programAddress:r})}function rP(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:co().decode(e.data)}}var To=new Uint8Array([0]);function dP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(To)}function en(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["rpId",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["origins",gill.getArrayEncoder(gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder()))],["authorityCreationArgs",Te()],["compressedProofArgs",M()]]),e=>({...e,discriminator:To}))}function fo(){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",fe()],["compressedProofArgs",E()]])}function uP(){return gill.combineCodec(en(),fo())}async function lo(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:en().encode(c),programAddress:r})}function AP(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},authority:{value:e.authority??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.payer),o(t.authority),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:en().encode(c),programAddress:r})}function gP(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:fo().decode(e.data)}}var xo=new Uint8Array([4]);function SP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xo)}function rn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["member",Or()],["role",_e()],["userAccountCreationArgs",Te()],["linkWalletArgs",gill.getOptionEncoder(br())]]),e=>({...e,discriminator:xo}))}function Io(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["member",pt()],["role",Ue()],["userAccountCreationArgs",fe()],["linkWalletArgs",gill.getOptionDecoder(_r())]])}function xP(){return gill.combineCodec(rn(),Io())}async function Co(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:rn().encode(c),programAddress:r})}function IP(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},authority:{value:e.authority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.domainConfig),o(t.authority),o(t.whitelistedAddressTrees),...a],data:rn().encode(c),programAddress:r})}function CP(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:Io().decode(e.data)}}var Mo=new Uint8Array([3]);function RP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Mo)}function sn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:Mo}))}function Eo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function vP(){return gill.combineCodec(sn(),Eo())}async function ho(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.globalCounter.value||(t.globalCounter.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([103,108,111,98,97,108,95,99,111,117,110,116,101,114]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(c),a=p(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:sn().encode({}),programAddress:r})}function bP(e,n){let r=n?.programAddress??A,t={globalCounter:{value:e.globalCounter??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let i=m(c),a=p(r);return Object.freeze({accounts:[a(t.globalCounter),a(t.payer),a(t.systemProgram),...i],data:sn().encode({}),programAddress:r})}function _P(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:Eo().decode(e.data)}}var vo=new Uint8Array([19]);function kP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(vo)}function on(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["compressedProofArgs",M()],["settingsCreation",Tt()],["userMutArgs",de()],["settingsIndex",gill.getU128Encoder()]]),e=>({...e,discriminator:vo}))}function bo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["compressedProofArgs",E()],["settingsCreation",ft()],["userMutArgs",ue()],["settingsIndex",gill.getU128Decoder()]])}function NP(){return gill.combineCodec(on(),bo())}async function _o(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=m(i),o=p(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:on().encode(c),programAddress:r})}function HP(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=m(i),o=p(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:on().encode(c),programAddress:r})}function VP(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:bo().decode(e.data)}}var Wo=new Uint8Array([5]);function qP(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Wo)}function an(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["compressedProofArgs",M()],["createUserArgs",gill.getArrayEncoder(Rr())]]),e=>({...e,discriminator:Wo}))}function Lo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["compressedProofArgs",E()],["createUserArgs",gill.getArrayDecoder(vr())]])}function YP(){return gill.combineCodec(an(),Lo())}async function Bo(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]}));let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function ZP(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.systemProgram),o(t.whitelistedAddressTrees),...a],data:an().encode(c),programAddress:r})}function XP(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{payer:r(),systemProgram:r(),whitelistedAddressTrees:r()},data:Lo().decode(e.data)}}var ko=new Uint8Array([18]);function sR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ko)}function No(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsMut",Ae()],["compressedProofArgs",M()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:ko}))}function Ho(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsMut",ge()],["compressedProofArgs",E()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function oR(){return gill.combineCodec(No(),Ho())}function Vo(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.payer),o(t.systemProgram),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:No().encode(c),programAddress:r})}function cR(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:Ho().decode(e.data)}}var zo=new Uint8Array([2]);function gR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(zo)}function Ko(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["disable",gill.getBooleanEncoder()]]),e=>({...e,discriminator:zo}))}function Jo(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["disable",gill.getBooleanDecoder()]])}function yR(){return gill.combineCodec(Ko(),Jo())}function jo(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},admin:{value:e.admin??null,isWritable:false}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.admin),...a],data:Ko().encode(c),programAddress:r})}function mR(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:Jo().decode(e.data)}}var Xo=new Uint8Array([1]);function IR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Xo)}function un(){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(Lr())]]),e=>({...e,discriminator:Xo}))}function $o(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["newOrigins",gill.getOptionDecoder(gill.getArrayDecoder(gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())))],["newAuthorityArgs",gill.getOptionDecoder(Br())]])}function CR(){return gill.combineCodec(un(),$o())}async function DR(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.whitelistedAddressTrees.value||(t.whitelistedAddressTrees.value=await gill.getProgramDerivedAddress({programAddress:r,seeds:[gill.getBytesEncoder().encode(new Uint8Array([119,104,105,116,101,108,105,115,116,101,100,95,97,100,100,114,101,115,115,95,116,114,101,101,115]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:un().encode(c),programAddress:r})}function Qo(e,n){let r=n?.programAddress??A,t={domainConfig:{value:e.domainConfig??null,isWritable:true},authority:{value:e.authority??null,isWritable:true},newAuthority:{value:e.newAuthority??null,isWritable:false},whitelistedAddressTrees:{value:e.whitelistedAddressTrees??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.domainConfig),o(t.authority),o(t.newAuthority),o(t.whitelistedAddressTrees),o(t.systemProgram),...a],data:un().encode(c),programAddress:r})}function MR(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:$o().decode(e.data)}}var rc=new Uint8Array([6]);function _R(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(rc)}function nc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",de()],["transactionManagerUrl",gill.addEncoderSizePrefix(gill.getUtf8Encoder(),gill.getU32Encoder())],["compressedProofArgs",M()]]),e=>({...e,discriminator:rc}))}function sc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",ue()],["transactionManagerUrl",gill.addDecoderSizePrefix(gill.getUtf8Decoder(),gill.getU32Decoder())],["compressedProofArgs",E()]])}function UR(){return gill.combineCodec(nc(),sc())}function oc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.authority),...a],data:nc().encode(c),programAddress:r})}function WR(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:sc().decode(e.data)}}var ic=new Uint8Array([7]);function HR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ic)}function dc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["userMutArgs",de()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["delegateTo",gill.getOptionEncoder(lt())],["oldSettingsMutArgs",gill.getOptionEncoder(Ae())],["newSettingsMutArgs",gill.getOptionEncoder(Ae())],["compressedProofArgs",M()]]),e=>({...e,discriminator:ic}))}function uc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["userMutArgs",ue()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["delegateTo",gill.getOptionDecoder(St())],["oldSettingsMutArgs",gill.getOptionDecoder(ge())],["newSettingsMutArgs",gill.getOptionDecoder(ge())],["compressedProofArgs",E()]])}function VR(){return gill.combineCodec(dc(),uc())}function Ac(e,n){let r=n?.programAddress??A,t={feePayer:{value:e.feePayer??null,isWritable:true},signer:{value:e.signer??null,isWritable:false},oldSettings:{value:e.oldSettings??null,isWritable:true},newSettings:{value:e.newSettings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.feePayer),o(t.signer),o(t.oldSettings),o(t.newSettings),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.domainConfig),...a],data:dc().encode(c),programAddress:r})}function GR(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{feePayer:r(),signer:s(),oldSettings:s(),newSettings:s(),slotHashSysvar:s(),instructionsSysvar:s(),domainConfig:s()},data:uc().decode(e.data)}}var mc=new Uint8Array([33]);function YR(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(mc)}function pc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",ot()],["compressedProofArgs",M()],["settingsCreationArgs",Tt()]]),e=>({...e,discriminator:mc}))}function Tc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",ct()],["compressedProofArgs",E()],["settingsCreationArgs",ft()]])}function ZR(){return gill.combineCodec(pc(),Tc())}function fc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.authority),...a],data:pc().encode(c),programAddress:r})}function XR(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 sv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(xc)}function Ic(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",Mt()],["compressedProofArgs",M()],["userCreationArgs",Te()]]),e=>({...e,discriminator:xc}))}function Cc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",te()],["compressedProofArgs",E()],["userCreationArgs",fe()]])}function ov(){return gill.combineCodec(Ic(),Cc())}function Dc(e,n){let r=n?.programAddress??A,t={authority:{value:e.authority??null,isWritable:true}},c={...e},i={args:c};t.authority.value||(t.authority.value="AMn21jT5RMZrv5hSvtkrWCMJFp3cUyeAx4AxKvF59xJZ");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.authority),...a],data:Ic().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:Cc().decode(e.data)}}var Ec=new Uint8Array([30]);function yv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ec)}function An(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Ec}))}function hc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function mv(){return gill.combineCodec(An(),hc())}async function pv(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(K(t.settings.value)),gill.getBytesEncoder().encode(new Uint8Array([118,97,117,108,116]))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(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:An().encode(c),programAddress:r})}function Pc(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=m(i),o=p(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:An().encode(c),programAddress:r})}function Tv(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:hc().decode(e.data)}}var bc=new Uint8Array([28]);function Dv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(bc)}function _c(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:bc}))}function Uc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function Mv(){return gill.combineCodec(_c(),Uc())}function Wc(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},source:{value:e.source??null,isWritable:true},destination:{value:e.destination??null,isWritable:true},systemProgram:{value:e.systemProgram??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),o(t.source),o(t.destination),o(t.systemProgram),...a],data:_c().encode(c),programAddress:r})}function Ev(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:Uc().decode(e.data)}}var Bc=new Uint8Array([31]);function Uv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Bc)}function yn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:Bc}))}function Oc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function Wv(){return gill.combineCodec(yn(),Oc())}async function Lv(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(K(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(K(t.source.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.destination.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=m(i),o=p(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:yn().encode(c),programAddress:r})}function wc(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=m(i),o=p(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:yn().encode(c),programAddress:r})}function Bv(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 Vc=new Uint8Array([29]);function Gv(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Vc)}function mn(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["amount",gill.getU64Encoder()],["createAtaIfNeeded",gill.getBooleanEncoder()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Vc}))}function Gc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["amount",gill.getU64Decoder()],["createAtaIfNeeded",gill.getBooleanDecoder()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function Fv(){return gill.combineCodec(mn(),Gc())}async function zv(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(K(t.source.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.destinationTokenAccount.value||(t.destinationTokenAccount.value=await gill.getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[gill.getAddressEncoder().encode(K(t.destination.value)),gill.getAddressEncoder().encode(K(t.tokenProgram.value)),gill.getAddressEncoder().encode(K(t.mint.value))]})),t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.associatedTokenProgram.value||(t.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");let a=m(i),o=p(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:mn().encode(c),programAddress:r})}function Fc(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=m(i),o=p(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:mn().encode(c),programAddress:r})}function Kv(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:Gc().decode(e.data)}}var Jc=new Uint8Array([13]);function $v(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Jc)}function jc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Jc}))}function qc(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Qv(){return gill.combineCodec(jc(),qc())}function Yc(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=m(i),o=p(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:jc().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:{settings:r(),payer:r(),domainConfig:s(),transactionBuffer:r(),closer:s(),slotHashSysvar:s(),instructionsSysvar:s()},data:qc().decode(e.data)}}var $c=new Uint8Array([24]);function ab(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($c)}function Qc(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:$c}))}function ea(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function ib(){return gill.combineCodec(Qc(),ea())}function ta(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},rentCollector:{value:e.rentCollector??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},closer:{value:e.closer??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(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:Qc().encode(c),programAddress:r})}function db(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:ea().decode(e.data)}}var sa=new Uint8Array([10]);function Tb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(sa)}function oa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",xt()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:sa}))}function ca(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",It()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function fb(){return gill.combineCodec(oa(),ca())}function aa(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=m(i),o=p(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:oa().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===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:ca().decode(e.data)}}var ua=new Uint8Array([21]);function Eb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ua)}function Aa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["args",xt()],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:ua}))}function ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["args",It()],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function hb(){return gill.combineCodec(Aa(),ga())}function ya(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},creator:{value:e.creator??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111");let a=m(i),o=p(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:Aa().encode(c),programAddress:r})}function Pb(e){if(e.accounts.length<7)throw new Error("Not enough accounts");let n=0,r=()=>{let t=e.accounts[n];return n+=1,t},s=()=>{let t=r();return t.address===A?void 0:t};return {programAddress:e.programAddress,accounts:{payer:r(),domainConfig:s(),transactionBuffer:r(),creator:s(),systemProgram:r(),instructionsSysvar:r(),slotHashSysvar:s()},data:ga().decode(e.data)}}var Ta=new Uint8Array([14]);function Lb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ta)}function fa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Ta}))}function la(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function Bb(){return gill.combineCodec(fa(),la())}function Sa(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=m(i),o=p(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:fa().encode(c),programAddress:r})}function Ob(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:la().decode(e.data)}}var Ca=new Uint8Array([25]);function Fb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ca)}function Da(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ca}))}function Ma(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function zb(){return gill.combineCodec(Da(),Ma())}function Ea(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},executor:{value:e.executor??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(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:Da().encode(c),programAddress:r})}function Kb(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:Ma().decode(e.data)}}var Ra=new Uint8Array([12]);function Xb(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ra)}function va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())]]),e=>({...e,discriminator:Ra}))}function ba(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["buffer",gill.addDecoderSizePrefix(gill.getBytesDecoder(),gill.getU32Decoder())]])}function $b(){return gill.combineCodec(va(),ba())}function _a(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.transactionBuffer),...a],data:va().encode(c),programAddress:r})}function Qb(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 La=new Uint8Array([23]);function o_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(La)}function Ba(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["buffer",gill.addEncoderSizePrefix(gill.getBytesEncoder(),gill.getU32Encoder())],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:La}))}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(Ba(),Oa())}function wa(e,n){let r=n?.programAddress??A,t={transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.transactionBuffer),...a],data:Ba().encode(c),programAddress:r})}function a_(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 Ha=new Uint8Array([11]);function m_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ha)}function Va(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())]]),e=>({...e,discriminator:Ha}))}function Ga(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())]])}function p_(){return gill.combineCodec(Va(),Ga())}function Fa(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:false},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(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:Va().encode(c),programAddress:r})}function T_(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:Ga().decode(e.data)}}var Ja=new Uint8Array([22]);function D_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ja)}function ja(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["secp256r1VerifyArgs",gill.getOptionEncoder(O())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ja}))}function qa(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["secp256r1VerifyArgs",gill.getOptionDecoder(w())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function M_(){return gill.combineCodec(ja(),qa())}function Ya(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},domainConfig:{value:e.domainConfig??null,isWritable:false},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true},voter:{value:e.voter??null,isWritable:false},systemProgram:{value:e.systemProgram??null,isWritable:false},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.systemProgram.value||(t.systemProgram.value="11111111111111111111111111111111"),t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(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:ja().encode(c),programAddress:r})}function E_(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:qa().decode(e.data)}}var $a=new Uint8Array([15]);function __(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode($a)}function Qa(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)]]),e=>({...e,discriminator:$a}))}function ei(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)]])}function U_(){return gill.combineCodec(Qa(),ei())}function ti(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},i=m({}),a=p(r);return Object.freeze({accounts:[a(t.settings),a(t.payer),a(t.transactionBuffer),...i],data:Qa().encode({}),programAddress:r})}function W_(e){if(e.accounts.length<3)throw new Error("Not enough accounts");let n=0,r=()=>{let s=e.accounts[n];return n+=1,s};return {programAddress:e.programAddress,accounts:{settings:r(),payer:r(),transactionBuffer:r()},data:ei().decode(e.data)}}var si=new Uint8Array([26]);function N_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(si)}function oi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["settingsKey",gill.getAddressEncoder()]]),e=>({...e,discriminator:si}))}function ci(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["settingsKey",gill.getAddressDecoder()]])}function H_(){return gill.combineCodec(oi(),ci())}function ai(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},transactionBuffer:{value:e.transactionBuffer??null,isWritable:true}},c={...e},a=m({args:c}),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.transactionBuffer),...a],data:oi().encode(c),programAddress:r})}function V_(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:ci().decode(e.data)}}var ui=new Uint8Array([16]);function q_(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(ui)}function Ai(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Ct()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())]]),e=>({...e,discriminator:ui}))}function gi(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())]])}function Y_(){return gill.combineCodec(Ai(),gi())}function yi(e,n){let r=n?.programAddress??A,t={settings:{value:e.settings??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.settings),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:Ai().encode(c),programAddress:r})}function Z_(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:gi().decode(e.data)}}var Ti=new Uint8Array([27]);function nU(){return gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(Ti)}function fi(){return gill.transformEncoder(gill.getStructEncoder([["discriminator",gill.fixEncoderSize(gill.getBytesEncoder(),1)],["transactionMessage",Ct()],["secp256r1VerifyArgs",gill.getArrayEncoder(Q())],["settingsReadonlyArgs",ne()],["compressedProofArgs",M()]]),e=>({...e,discriminator:Ti}))}function li(){return gill.getStructDecoder([["discriminator",gill.fixDecoderSize(gill.getBytesDecoder(),1)],["transactionMessage",Dt()],["secp256r1VerifyArgs",gill.getArrayDecoder(ee())],["settingsReadonlyArgs",se()],["compressedProofArgs",E()]])}function sU(){return gill.combineCodec(fi(),li())}function Si(e,n){let r=n?.programAddress??A,t={payer:{value:e.payer??null,isWritable:true},slotHashSysvar:{value:e.slotHashSysvar??null,isWritable:false},instructionsSysvar:{value:e.instructionsSysvar??null,isWritable:false}},c={...e},i={args:c};t.slotHashSysvar.value||(t.slotHashSysvar.value="SysvarS1otHashes111111111111111111111111111"),t.instructionsSysvar.value||(t.instructionsSysvar.value="Sysvar1nstructions1111111111111111111111111");let a=m(i),o=p(r);return Object.freeze({accounts:[o(t.payer),o(t.slotHashSysvar),o(t.instructionsSysvar),...a],data:fi().encode(c),programAddress:r})}function oU(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:li().decode(e.data)}}var A="reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT",wS=(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))(wS||{});function zU(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 kS=(f=>(f[f.AddWhitelistedAddressTrees=0]="AddWhitelistedAddressTrees",f[f.ChangeConfig=1]="ChangeConfig",f[f.ChangeConfigCompressed=2]="ChangeConfigCompressed",f[f.CompressSettingsAccount=3]="CompressSettingsAccount",f[f.CreateDomainConfig=4]="CreateDomainConfig",f[f.CreateDomainUserAccount=5]="CreateDomainUserAccount",f[f.CreateGlobalCounter=6]="CreateGlobalCounter",f[f.CreateMultiWalletCompressed=7]="CreateMultiWalletCompressed",f[f.CreateUserAccounts=8]="CreateUserAccounts",f[f.DecompressSettingsAccount=9]="DecompressSettingsAccount",f[f.DisableDomainConfig=10]="DisableDomainConfig",f[f.EditDomainConfig=11]="EditDomainConfig",f[f.EditTransactionManagerUrl=12]="EditTransactionManagerUrl",f[f.EditUserDelegate=13]="EditUserDelegate",f[f.MigrateCompressedSettings=14]="MigrateCompressedSettings",f[f.MigrateCompressedUsers=15]="MigrateCompressedUsers",f[f.NativeTransferIntent=16]="NativeTransferIntent",f[f.NativeTransferIntentCompressed=17]="NativeTransferIntentCompressed",f[f.TokenTransferIntent=18]="TokenTransferIntent",f[f.TokenTransferIntentCompressed=19]="TokenTransferIntentCompressed",f[f.TransactionBufferClose=20]="TransactionBufferClose",f[f.TransactionBufferCloseCompressed=21]="TransactionBufferCloseCompressed",f[f.TransactionBufferCreate=22]="TransactionBufferCreate",f[f.TransactionBufferCreateCompressed=23]="TransactionBufferCreateCompressed",f[f.TransactionBufferExecute=24]="TransactionBufferExecute",f[f.TransactionBufferExecuteCompressed=25]="TransactionBufferExecuteCompressed",f[f.TransactionBufferExtend=26]="TransactionBufferExtend",f[f.TransactionBufferExtendCompressed=27]="TransactionBufferExtendCompressed",f[f.TransactionBufferVote=28]="TransactionBufferVote",f[f.TransactionBufferVoteCompressed=29]="TransactionBufferVoteCompressed",f[f.TransactionExecute=30]="TransactionExecute",f[f.TransactionExecuteCompressed=31]="TransactionExecuteCompressed",f[f.TransactionExecuteSync=32]="TransactionExecuteSync",f[f.TransactionExecuteSyncCompressed=33]="TransactionExecuteSyncCompressed",f))(kS||{});function KU(e){let n="data"in e?e.data:e;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([8])),0))return 0;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([9])),0))return 1;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([20])),0))return 2;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([17])),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([19])),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([18])),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([7])),0))return 13;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([33])),0))return 14;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([32])),0))return 15;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([30])),0))return 16;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([28])),0))return 17;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([31])),0))return 18;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([29])),0))return 19;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([13])),0))return 20;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([24])),0))return 21;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([10])),0))return 22;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([21])),0))return 23;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([14])),0))return 24;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([25])),0))return 25;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([12])),0))return 26;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([23])),0))return 27;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([11])),0))return 28;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([22])),0))return 29;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([15])),0))return 30;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([26])),0))return 31;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([16])),0))return 32;if(gill.containsBytes(n,gill.fixEncoderSize(gill.getBytesEncoder(),1).encode(new Uint8Array([27])),0))return 33;throw new Error("The provided instruction could not be identified as a multiWallet instruction.")}var HS=6e3,VS=6001,GS=6002,FS=6003,zS=6004,KS=6005,JS=6006,jS=6007,qS=6008,YS=6009,ZS=6010,XS=6011,$S=6012,QS=6013,ex=6014,tx=6015,rx=6016,nx=6017,sx=6018,ox=6019,cx=6020,ax=6021,ix=6022,dx=6023,ux=6024,Ax=6025,gx=6026,yx=6027,mx=6028,px=6029,Tx=6030,fx=6031,lx=6032,Sx=6033,xx=6034,Ix=6035,Cx=6036,Dx=6037,Mx=6038,Ex=6039,hx=6040,Px=6041,Rx=6042,vx=6043,bx=6044,_x=6045,Ux=6046,Wx=6047,Lx=6048,Bx=6049,Ox=6050,wx=6051,kx=6052,Nx=6053,xi;process.env.NODE_ENV!=="production"&&(xi={[Tx]:"This member is already delegated to another wallet.",[jS]:"The clientDataJSON hash extracted from the signature does not match the generated hash.",[Bx]:"The domain configuration account is disabled. Please contact support or try again later.",[Ox]:"Missing domain configuration account.",[ZS]:"Duplicate public keys detected among members. Each member must have a unique key.",[YS]:"Durable nonce detected: this program does not support transactions using a durable nonce.",[cx]:"No members provided. A multisig wallet must contain at least one member.",[sx]:"Expected a User with Administrator role for this instruction.",[qS]:"The message hash associated with the signer does not match the pre-declared expected message hash.",[rx]:"Expected a User with Transaction Manager role for this instruction.",[Ex]:"Final buffer hash mismatch: the serialized data may be corrupted or altered.",[hx]:"The serialized transaction buffer exceeds the maximum size of 10,128 bytes.",[Px]:"Declared buffer size does not match the actual serialized size.",[Sx]:"Not enough members with vote permission to meet the approval threshold.",[fx]:"At least one signer with execute permission is required to proceed.",[lx]:"At least one signer with initiate permission is required to perform this action.",[Ax]:"One or more provided accounts failed validation. Verify that all required accounts are included and correct.",[Nx]:"Address Tree supplied is not part of the whitelisted address trees",[ox]:"User with Administrator role requires a valid domain config, be a ed25519 Signer and have no delegated wallet.",[yx]:"Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.",[Mx]:"Buffer validation failed: contents do not match the expected hash (possible tampering detected).",[xx]:"Only delegated members are allowed for this transaction.",[ux]:"Unexpected number of accounts provided for this instruction.",[QS]:"User with Permanent Member role requires a must have a delegated wallet.",[VS]:"The instruction preceding this program invocation is not a secp256r1 verification instruction.",[zS]:"The extracted public key has an invalid length or encoding.",[HS]:"Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.",[FS]:"Failed to deserialize secp256r1 signature offsets from the instruction data.",[Wx]:"Failed to parse the Slot History sysvar: data format is invalid or corrupted.",[ix]:"Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.",[nx]:"User with Transaction Manager role requires a valid transaction manager url, be a ed25519 Signer and have no delegated wallet.",[tx]:"Invalid Transaction Manager permissions. Only initiate is allowed.",[dx]:"Malformed transaction message: structure or formatting does not match the expected layout.",[gx]:"One or more provided user accounts failed validation. Verify that only users with appropriate roles are allowed to perform this action.",[KS]:"The extracted WebAuthn signed message payload is malformed.",[_x]:"An input string exceeds the maximum allowed character length.",[wx]:"This member is not registered under the provided domain configuration.",[mx]:"A required account is missing from the instruction context.",[Ux]:"Missing required sysvar: Slot History must be included as an account in this instruction.",[px]:"User mutation arguments are required when performing add or remove delegate operations.",[Cx]:"No valid signer found in this transaction.",[$S]:"Only one permanent member is allowed per wallet.",[ex]:"Only one transaction manager is allowed per wallet.",[kx]:"The given origin index is not in the whitelisted origins.",[XS]:"Permanent members cannot be removed from a wallet.",[bx]:"Writable CPI calls to protected accounts are not permitted.",[JS]:"The rpIdHash extracted from the signed message does not match the expected value.",[GS]:"The signature index provided is out of bounds for the secp256r1 instruction.",[Lx]:"The specified slot number was not found in the provided slot history.",[ax]:"Too many members: a maximum of 4 members are supported.",[Rx]:"This transaction has expired. It must be executed within 3 minutes of approval.",[vx]:"This transaction has not yet reached the required approval threshold.",[Dx]:"Only the transaction creator or rent payer may close this transaction buffer.",[Ix]:"Member is not part of the expected signers for this transaction."});function XU(e){return process.env.NODE_ENV!=="production"?xi[e]:"Error message not available in production bundles."}function $U(e,n,r){return gill.isProgramError(e,n,A,r)}var vt={Ed25519:1,Secp256r1:2};var Ie={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(Ie).reduce((n,r)=>n|r,0))}static has(n,r){return (n.mask&r)===r}};var fn=33,ye=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!==fn)throw new Error(`Invalid public key length, expected ${fn} 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===fn)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()}},C=class extends ye{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 Gx(){return gill.getStructCodec([["programAddressIndex",gill.getU8Codec()],["accountIndices",gill.getArrayCodec(gill.getU8Codec())],["data",gill.getArrayCodec(gill.getU8Codec())]])}function Fx(){return gill.getStructCodec([["lookupTableAddress",gill.getAddressCodec()],["writableIndexes",gill.getArrayCodec(gill.getU8Codec())],["readonlyIndexes",gill.getArrayCodec(gill.getU8Codec())]])}var Ci=gill.getStructCodec([["numSigners",gill.getU8Codec()],["numWritableSigners",gill.getU8Codec()],["numWritableNonSigners",gill.getU8Codec()],["accountKeys",gill.getArrayCodec(gill.getAddressCodec())],["instructions",gill.getArrayCodec(Gx())],["addressTableLookups",gill.getArrayCodec(Fx())]]);function Di(e){return Ci.encode({numSigners:e.header.numSignerAccounts,numWritableSigners:e.header.numSignerAccounts-e.header.numReadonlySignerAccounts,numWritableNonSigners:e.staticAccounts.length-e.header.numSignerAccounts-e.header.numReadonlyNonSignerAccounts,accountKeys:e.staticAccounts,instructions:e.instructions.map(r=>({programAddressIndex:r.programAddressIndex,accountIndices:r.accountIndices??[],data:Array.from(r.data??[])})),addressTableLookups:e.version!=="legacy"?e.addressTableLookups?.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes,writableIndexes:r.writableIndexes}))??[]:[]})}function Mi(e){let n=Ci.decode(e);return {header:{numSignerAccounts:n.numSigners,numReadonlySignerAccounts:n.numSigners-n.numWritableSigners,numReadonlyNonSignerAccounts:n.accountKeys.length-n.numSigners-n.numWritableNonSigners},addressTableLookups:n.addressTableLookups.map(r=>({lookupTableAddress:r.lookupTableAddress,readonlyIndexes:r.readonlyIndexes.map(Number),writableIndexes:r.writableIndexes.map(Number),readableIndices:r.readonlyIndexes.map(Number),writableIndices:r.writableIndexes.map(Number)})),instructions:n.instructions.map(r=>({accountIndices:r.accountIndices.map(Number),data:new Uint8Array(r.data),programAddressIndex:r.programAddressIndex})),lifetimeToken:A,staticAccounts:n.accountKeys,version:0}}stateless_js.featureFlags.version=stateless_js.VERSION.V2;var Ei="revibase.com",hi="https://auth.revibase.com",Pi="https://api.revibase.com";var Ge=null,vi=2e3,bi=3e3,Jx=300*1e3;async function $t({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"));},Jx);function u(){clearInterval(o),clearTimeout(d),a&&clearTimeout(a),Ge&&window.removeEventListener("message",Ge),r&&r.close();}if(r?r.location.replace(e):r=Li(e),!r){c(new Error("Disable your popup blocker to continue."));return}let y=g=>{let l=g.origin===i,T=g.source===r;if(!(!l||!T||!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"));},vi+bi);break;case "popup-complete":try{let D=JSON.parse(g.data.payload);u(),t(D);}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"));},vi+bi));break;case "popup-closed":u(),c(new Error("User closed the authentication window"));break}};Ge&&window.removeEventListener("message",Ge),Ge=y,window.addEventListener("message",Ge);})}function Qt(e){let n="";for(let s of e)n+=String.fromCharCode(s);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Be(e){let n=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-n.length%4)%4,s=n.padEnd(n.length+r,"="),t=atob(s),c=new ArrayBuffer(t.length),i=new Uint8Array(c);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return c}function er(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")}function jx(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 _i(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 Ui(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 Wi(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 v=n&127;r+=v;}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"+er(u)),D=(l>g?nist_js.p256.Point.CURVE().n-l:l).toString(16).padStart(64,"0"),I=jx(D);return new Uint8Array([...y,...I])}function Li(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 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 FW(e){let n=tinyCbor.decodeCBOR(e),r=nist_js.p256.Point.fromAffine({x:BigInt("0x"+er(n.get(-2))),y:BigInt("0x"+er(n.get(-3)))});return gill.getBase58Decoder().decode(r.toBytes(true))}function Oi(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 zW(e){let{authenticatorData:n,clientDataJSON:r,signature:s}=e.authResponse.response,t=new Uint8Array(Be(n)),c=JSON.parse(new TextDecoder().decode(Be(r))),i=_i(c),a=Wi(new Uint8Array(Be(s))),o=await ze({rpIdHash:t.subarray(0,32)});return new C(e.signer.toString(),{verifyArgs:{clientDataJson:new Uint8Array(Be(r)),truncatedClientDataJson:i,slotNumber:BigInt(e.slotNumber),slotHash:new Uint8Array(gill.getBase58Encoder().encode(e.slotHash))},clientAndDeviceHash:xn(e.clientId,e.deviceSignature.publicKey,e.nonce),domainConfig:o,authData:t,signature:a,originIndex:e.originIndex,crossOrigin:e.crossOrigin,authResponse:e.authResponse})}async function KW(e,n){let{data:r}=await Nn(oe(),e),t=Ui(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 xn(e,n,r){return sha2_js.sha256(new Uint8Array([...gill.getBase58Encoder().encode(e),...gill.getBase58Encoder().encode(n),...new TextEncoder().encode(r)]))}function Fe(e){return sha2_js.sha256(In(e))}function In(e){return new Uint8Array([...new Uint8Array(Be(e.response.authenticatorData)),...sha2_js.sha256(new Uint8Array(Be(e.response.clientDataJSON)))])}async function Dn(e,n=false){let r=n?{blockhash:gill.getBlockhashDecoder().decode(crypto.getRandomValues(new Uint8Array(32))),lastValidBlockHeight:BigInt(Number.MAX_SAFE_INTEGER)}:(await oe().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 Ni(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 Hi(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 G(e,n=0){let r=e instanceof C?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?In(r.authResponse):void 0,a=r?.toBuffer();return {domainConfig:t,verifyArgs:s,signature:c,message:i,publicKey:a}}function Ke(e){if(e instanceof ye)return {keyType:vt.Secp256r1,key:e.toBytes()};{let n;try{n="address"in e?e.address:e;}catch{n=e;}return {keyType:vt.Ed25519,key:new Uint8Array([0,...gill.getAddressEncoder().encode(n)])}}}function ki(e){return e instanceof C?e.toString():e.address.toString()}function me(e){let n=new Set,r=[];for(let s of e)n.has(ki(s))||(r.push(s),n.add(ki(s)));if(r.filter(s=>s instanceof C).length>1)throw new Error("More than 1 Secp256r1 signers in an instruction is not supported.");return r}function Vi({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 Gi(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 _={};function Je(){if(!_.solanaRpcEndpoint)throw new Error("Rpc is not initialized yet.");return _.solanaRpcEndpoint}function Oe(){if(!_.lightProtocolRpc)throw new Error("Rpc is not initialized yet");return _.lightProtocolRpc}function oe(){if(!_.solanaRpc)throw new Error("Rpc is not initialized yet");return _.solanaRpc}function Fi(){if(!_.sendAndConfirm)throw new Error("Rpc is not initialized yet.");return _.sendAndConfirm}function zi(){if(!_.computeEstimate)throw new Error("Rpc is not initialized yet");return _.computeEstimate}async function aL(){return _.feePayer||(_.feePayer=await Gi(_.apiEndpoint??Pi)),_.feePayer}function Mn(){if(!_.jitoTipsConfig)throw new Error("Jito Bundle Config is not set.");return _.jitoTipsConfig}function he(){return _.authEndpoint??hi}function Ki(){return _.rpId??Ei}function je(){if(!_.clientSettings)throw new Error("No client settings found.");return _.clientSettings}function iL(){Object.keys(_).forEach(e=>{_[e]=void 0;});}function dL({rpcEndpoint:e,proverEndpoint:n,compressionApiEndpoint:r,jitoTipsConfig:s,apiEndpoint:t,authEndpoint:c,rpId:i,clientSettings:a}){_.solanaRpcEndpoint=e,_.lightProtocolRpc=stateless_js.createRpc(e,r,n);let{rpc:o,sendAndConfirmTransaction:d}=gill.createSolanaClient({urlOrMoniker:e});_.solanaRpc=o,_.sendAndConfirm=d,_.computeEstimate=programs.estimateComputeUnitLimitFactory({rpc:o}),_.apiEndpoint=t??null,_.jitoTipsConfig=s??null,_.authEndpoint=c??null,_.rpId=i??null,_.clientSettings=a??null;}var U=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=Je().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Oe().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 rr(e,n){let r=n?.get(e.toString());if(r)return r;{let s=await qi(e);return s&&n?.set(e.toString(),s),s}}async function ce(e,n){let s=(await Promise.all(e.map(async t=>rr(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 ae(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 q(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 Se(e,n,r,s,t){let c=null,i=null,a=new U;if(e){await a.addSystemAccounts();let{address:o}=await J(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 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:z().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 Oe().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 xe(){return (await nr()).length-1}var En;async function nr(){if(!En){let{data:e}=await ws(oe(),await Yi());En=e.whitelistedAddressTrees;}return En}async function sr(e,n,r){let s=await LI(e,n,r);if(!s)throw new Error("User cannot be found.");return s}async function LI(e,n,r){let{address:s}=await N(e,n),t=await rr(s,r);return t?.data?.data?te().decode(t.data.data):null}async function _t(e,n,r){let s=await BI(e,n,r);if(!s)throw new Error("Settings cannot be found.");return s}async function BI(e,n,r){try{let{address:s}=await J(e,n),t=await rr(s,r);if(!t?.data?.data)return null;let c=z().decode(t.data.data);return c.data.__option==="None"?null:{...c.data.value,isCompressed:!0}}catch{let s=await Fr(oe(),await Y(e));return s.exists?{...s.data,members:s.data.members.slice(0,s.data.membersLen),isCompressed:false}:null}}async function hn(e){let n=await nr();if(e<0||e>=n.length)throw new Error(`Invalid address tree index: ${e}`);return n[e]}async function BL(e){let r=(await nr()).findIndex(s=>s===e);if(r===-1)throw new Error(`Address tree not found: ${e}`);return r}async function qi(e){let n=await stateless_js.rpcRequest(Oe().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=Je().includes("devnet")?stateless_js.localTestActiveStateTreeInfos():await Oe().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 J(e,n=0){let r=await hn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("multi_wallet")),new Uint8Array(gill.getU128Encoder().encode(e))]);return {address:stateless_js.createBN254(stateless_js.deriveAddressV2(s,new web3_js.PublicKey(r),new web3_js.PublicKey(A)).toString(),"base58"),addressTree:new web3_js.PublicKey(r)}}async function N(e,n=0){let r=await hn(n),s=stateless_js.deriveAddressSeedV2([new Uint8Array(gill.getUtf8Encoder().encode("user")),e instanceof ye?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 ze({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 sd(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("global_counter")]});return e}async function Yi(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("whitelisted_address_trees")]});return e}async function od(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 ye?n.toTruncatedBuffer():gill.getAddressEncoder().encode(n),gill.getU8Encoder().encode(r)]});return s}async function Ce(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 Y(e){let[n]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("multi_wallet"),gill.getU128Encoder().encode(e)]});return n}async function cd(e){let n=await Y(e);return await Ce(n)}async function zL(){let[e]=await gill.getProgramDerivedAddress({programAddress:A,seeds:[gill.getUtf8Encoder().encode("cpi_authority")]});return e}async function nB(e){let n=await Dn(e,true),r=await Hi(n.map(gill.getBase64EncodedWireTransaction),Je()),s=await Dn(e.map((c,i)=>({...c,unitsConsumed:r[i]})));return await XI(s.map(gill.getBase64EncodedWireTransaction))}async function sB({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=await oe().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([zi()(c),Ni(oe(),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 Fi()(t,{commitment:"confirmed",skipPreflight:true}),gill.getSignatureFromTransaction(t)}async function XI(e,n=10,r=1e3,s=Mn()){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 oB(e,n=30,r=3e3,s=Mn()){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 cB(e,n,r,s){let t=await _t(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=>dd(u.pubkey)===e.toString())??{};if(!c)throw new Error("No permissions found for the current member.");let i=Me.has(c,Ie.InitiateTransaction),a=Me.has(c,Ie.VoteTransaction),o=Me.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(dd(d.pubkey)),userAddressTreeIndex:d.userAddressTreeIndex}}async function aB({authResponses:e,transactionManagerAddress:n,userAddressTreeIndex:r,transactionMessageBytes:s,cachedAccounts:t}){if(!n)return null;let c=await sr(n,r,t);if(c.transactionManagerUrl.__option==="None")throw new Error("Transaction manager endpoint is missing for this account.");return $I(n,c.transactionManagerUrl.value,e,s)}function $I(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}=je();c.authResponses=await Promise.all(r.map(async u=>({...u,clientSignature:{clientId:o,signature:(await d("complete",gill.getBase64Decoder().decode(Fe(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 dd(e){return e.keyType===vt.Ed25519?gill.getBase58Decoder().decode(e.key.subarray(1,33)):gill.getBase58Decoder().decode(e.key)}async function hB({index:e,settingsAddressTreeIndex:n,configActionsArgs:r,payer:s,compressed:t=false,cachedAccounts:c}){let{addDelegates:i,removeDelegates:a}=await nC(r),o=new U,d=null,u=null,y=[];if(i.length||a.length||t){let S=await sC({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 oC({configActionsArgs:r,packedAccounts:o,userMutArgs:y}),{remainingAccounts:T,systemOffset:D}=o.toAccountMetas(),I=b(d,D);return {instructions:t?[to({configActions:g,payer:s,authority:gill.createNoopSigner(await cd(e)),compressedProofArgs:I,settingsMut:u,remainingAccounts:T})]:[await Ys({settingsIndex:e,configActions:g,payer:s,compressedProofArgs:I,remainingAccounts:T})],secp256r1VerifyInput:l}}async function nC(e){let n=[],r=[];for(let s of e)switch(s.type){case "AddMembers":{let t=await Promise.all(s.members.map(c=>N(c.member,c.userAddressTreeIndex)));for(let c of t)n.push({address:c.address,type:"User"});break}case "RemoveMembers":{let t=await Promise.all(s.members.map(c=>N(c.member,c.userAddressTreeIndex)));for(let c of t)r.push({address:c.address,type:"User"});break}}return {addDelegates:n,removeDelegates:r}}async function sC({packedAccounts:e,addDelegates:n,removeDelegates:r,compressed:s,index:t,settingsAddressTreeIndex:c,cachedAccounts:i}){await e.addSystemAccounts();let a=[];if(s){let T=(await J(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,[]),u=[],y=[];for(let T of o)T.type==="Settings"?u.push(T):T.type==="User"&&y.push(T);let g,l=[];if(s&&d&&(g=q(e,d.treeInfos.slice(0,1),d.leafIndices.slice(0,1),d.rootIndices.slice(0,1),d.proveByIndices.slice(0,1),u,z())[0]),y.length&&d){let T=s?1:0;l=q(e,d.treeInfos.slice(T),d.leafIndices.slice(T),d.rootIndices.slice(T),d.proveByIndices.slice(T),y,te());}return {proof:d,settingsMutArgs:g,userMutArgs:l}}async function oC({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 C){let o=s.length,{message:d,signature:u,publicKey:y,domainConfig:g}=G(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 N(a.member,a.userAddressTreeIndex).then(T=>r.find(D=>new Rn__default.default(new Uint8Array(D.accountMeta.address)).eq(T.address)));if(!l)throw new Error("Unable to find user account");i.push(ud({permissionArgs:a.permissions,index:o,userMutArgs:l,pubkey:a.member}));}else {let o=await N(a.member,a.userAddressTreeIndex).then(d=>r.find(u=>new Rn__default.default(new Uint8Array(u.accountMeta.address)).eq(d.address)));if(!o)throw new Error("Unable to find user account");i.push(ud({permissionArgs:a.permissions,index:-1,userMutArgs:o,pubkey:a.member}));}t.push({__kind:c.type,fields:[i]});break}case "RemoveMembers":{let i=await Promise.all(c.members.map(a=>N(a.member,a.userAddressTreeIndex).then(o=>{let d=r.find(u=>new Rn__default.default(new Uint8Array(u.accountMeta.address)).eq(o.address));if(!d)throw new Error("Unable to find user account");return aC({pubkey:a.member,userMutArgs:d})})));t.push({__kind:c.type,fields:[i]});break}case "EditPermissions":{let i=c.members.map(a=>cC({permissionArgs:a.permissions,pubkey:a.member}));t.push({__kind:c.type,fields:[i]});break}default:t.push({__kind:c.type,fields:[c.threshold]});}return {configActions:t,secp256r1VerifyInput:s}}function cC({pubkey:e,permissionArgs:n}){return {memberKey:Ke(e),permissions:Ad(n)}}function aC({pubkey:e,userMutArgs:n}){if(n.data.role===1)throw new Error("Permanent Member cannot be removed from the wallet.");return {memberKey:Ke(e),userMutArgs:n}}function ud({pubkey:e,permissionArgs:n,index:r,userMutArgs:s}){if(s.data.role===1){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&&(n.execute||n.vote))throw new Error("Transaction Manager can only have initiate permission");return {memberKey:Ke(e),permissions:Ad(n),verifyArgs:e instanceof C&&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(),userMutArgs:s}}function Ad(e){let n=[];return e.initiate&&n.push(Ie.InitiateTransaction),e.vote&&n.push(Ie.VoteTransaction),e.execute&&n.push(Ie.ExecuteTransaction),Me.fromPermissions(n)}var Ye=33,Ze=64,Un=14,mC=2,pC=gill.address("Secp256r1SigVerify1111111111111111111111111");function TC(){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 fC(){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=fC();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(),Ye).decode(e,n);n+=Ye;let d=gill.fixDecoderSize(gill.getBytesDecoder(),Ze).decode(e,n);n+=Ze;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 Td(){return gill.createEncoder({getSizeFromValue:e=>{let n=Un*e.offsets.length,r=e.payload.reduce((s,t)=>s+Ye+Ze+t.message.length,0);return 2+n+r},write:(e,n,r=0)=>{r=gill.getU8Encoder().write(e.numSignatures,n,r),r=gill.getU8Encoder().write(e.padding,n,r);let s=TC();for(let t of e.offsets)r=s.write(t,n,r);for(let t of e.payload)r=gill.fixEncoderSize(gill.getBytesEncoder(),Ye).write(t.publicKey,n,r),r=gill.fixEncoderSize(gill.getBytesEncoder(),Ze).write(t.signature,n,r),r=gill.getBytesEncoder().write(t.message,n,r);return r}})}function vB(){return gill.combineCodec(Td(),pd())}function F(e,n){let r=e.length,s=mC+r*Un,t=[];for(let o=0;o<r;o++){let{message:d}=e[o],u=s,y=u+Ye,g=y+Ze;t.push({publicKeyOffset:u,publicKeyInstructionIndex:65535,signatureOffset:y,signatureInstructionIndex:65535,messageDataOffset:g,messageDataSize:d.length,messageInstructionIndex:65535}),s+=Ye+Ze+d.length;}let c=n?.programAddress??pC,i={numSignatures:r,padding:0,offsets:t,payload:e};return {accounts:[],programAddress:c,data:Td().encode(i)}}function bB(e){return {programAddress:e.programAddress,accounts:{},data:pd().decode(e.data)}}async function HB({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=await Y(e),{address:a}=await J(e,n),o=await ce([{address:a,type:"Settings"}],t),d=await k(o,[]),u=q(c,d.treeInfos,d.leafIndices,d.rootIndices,d.proveByIndices,o.filter(x=>x.type==="Settings"),z())[0],y=me(s),g=y.filter(x=>x instanceof C),l=[],T=[];for(let x of g){let L=l.length,{domainConfig:W,verifyArgs:j,signature:H,publicKey:V,message:B}=G(x,L);B&&H&&V&&l.push({message:B,signature:H,publicKey:V}),W&&(c.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),j?.__option==="Some"&&T.push({domainConfigKey:W,verifyArgs:j.value}));}c.addPreAccounts(y.filter(x=>"address"in x).map(x=>({address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x})));let{remainingAccounts:D,systemOffset:I}=c.toAccountMetas(),v=b(d,I),S=[];return l.length>0&&S.push(F(l)),S.push(ao({settings:i,settingsMutArgs:u,compressedProofArgs:v,payer:r,secp256r1VerifyArgs:T,remainingAccounts:D})),S}async function FB({admin:e,addressTree:n}){return Fs({payer:e,addressTree:n,remainingAccounts:[]})}async function ZB({payer:e,rpId:n,origins:r,authority:s}){let t=await ze({rpId:n}),c=new U;await c.addSystemAccounts();let i=await xe(),{address:a,addressTree:o}=await N(s.address,i),d=[{address:a,tree:o,queue:o,type:"User"}],u=await k([],d),y=(await ae(c,u.treeInfos,u.roots,u.rootIndices,d))[0],{remainingAccounts:g,systemOffset:l}=c.toAccountMetas(),T=b(u,l);return await lo({origins:r,authorityCreationArgs:y,authority:s,compressedProofArgs:T,payer:e,domainConfig:t,rpId:n,remainingAccounts:g})}async function cO({authority:e,payer:n,createUserArgs:r,domainConfig:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=[];r.index&&(i.push({address:(await J(r.index,r.settingsAddressTreeIndex)).address,type:"Settings"}),r.transactionManager&&i.push({address:(await N(r.transactionManager.member,r.transactionManager.userAddressTreeIndex)).address,type:"User"}));let a=i.length?await ce(i,t):[],o=await xe(),{address:d,addressTree:u}=await N(r.member,o),y=[{address:d,type:"User",tree:u,queue:u}],g=await k(a,y),l=null,T=null,D=a.filter(W=>W.type==="Settings"),I=a.filter(W=>W.type==="User");D.length&&(l=q(c,g.treeInfos.slice(0,1),g.leafIndices.slice(0,1),g.rootIndices.slice(0,1),g.proveByIndices.slice(0,1),D,z())[0]),I.length&&(T=q(c,g.treeInfos.slice(1,2),g.leafIndices.slice(1,2),g.rootIndices.slice(1,2),g.proveByIndices.slice(1,2),I,te())[0]);let v=await ae(c,g.treeInfos.slice(a.length),g.roots.slice(a.length),g.rootIndices.slice(a.length),y),{remainingAccounts:S,systemOffset:x}=c.toAccountMetas(),L=b(g,x);return await Co({payer:n,authority:e,compressedProofArgs:L,member:pt().decode(r.member.toBuffer()),role:r.role,linkWalletArgs:l?gill.some({settingsMutArgs:l,transactionManager:T?gill.some(T):gill.none()}):gill.none(),userAccountCreationArgs:v[0],domainConfig:s,remainingAccounts:S})}async function uO({payer:e}){let n=await sd();return ho({payer:e,globalCounter:n})}async function fO({createUserArgs:e,payer:n}){let r=new U;await r.addSystemAccounts(),r.addPreAccounts(e.map(u=>({address:u.member.address,role:gill.AccountRole.READONLY_SIGNER,signer:u.member})));let s=await xe(),t=await Promise.all(e.map(async u=>{let{address:y,addressTree:g}=await N(u.member.address,s);return {address:y,tree:g,queue:g,type:"User"}})),c=await k([],t),i=await ae(r,c.treeInfos,c.roots,c.rootIndices,t),{remainingAccounts:a,systemOffset:o}=r.toAccountMetas(),d=b(c,o);return await Bo({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 IO({admin:e,rpId:n,disable:r}){let s=await ze({rpId:n});return jo({domainConfig:s,admin:e,disable:r,remainingAccounts:[]})}async function RO({authority:e,domainConfig:n,newAuthority:r,newOrigins:s}){let t=null,c=[];if(r){let i=new U;await i.addSystemAccounts();let a=await xe(),{address:o,addressTree:d}=await N(r.address,a),u=[{address:o,tree:d,queue:d,type:"User"}],y=await k([],u),g=(await ae(i,y.treeInfos,y.roots,y.rootIndices,u))[0],l=i.toAccountMetas();c=l.remainingAccounts,t={compressedProofArgs:b(y,l.systemOffset),authorityCreationArgs:g};}return Qo({domainConfig:n,authority:e,newOrigins:s?gill.some(s):gill.none(),newAuthorityArgs:t,newAuthority:r,remainingAccounts:c})}async function LO({authority:e,userAddressTreeIndex:n,transactionManagerUrl:r}){let s=new U;await s.addSystemAccounts();let t=await ce([{address:(await N(e.address,n)).address,type:"User"}]),c=await k(t,[]),i=q(s,c.treeInfos,c.leafIndices,c.rootIndices,c.proveByIndices,t,te())[0],{remainingAccounts:a,systemOffset:o}=s.toAccountMetas(),d=b(c,o);return oc({authority:e,transactionManagerUrl:r,compressedProofArgs:d,userMutArgs:i,remainingAccounts:a})}async function zO({payer:e,user:n,userAddressTreeIndex:r,newDelegate:s,cachedAccounts:t=new Map}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=G(n),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let y=await sr(n instanceof C?n:n.address,r,t),g=[];g.push({address:(await N(n instanceof C?n:n.address,r)).address,type:"User"});let l,T=null,D,I=null;y.delegatedTo.__option==="Some"&&((await _t(y.delegatedTo.value.index,y.delegatedTo.value.settingsAddressTreeIndex,t)).isCompressed?(g.push({address:(await J(y.delegatedTo.value.index,y.delegatedTo.value.settingsAddressTreeIndex)).address,type:"Settings"}),T={start:g.length-1,end:g.length}):l=await Y(y.delegatedTo.value.index)),s&&((await _t(s.index,s.settingsAddressTreeIndex,t)).isCompressed?(g.push({address:(await J(s.index,s.settingsAddressTreeIndex)).address,type:"Settings"}),I={start:g.length-1,end:g.length}):D=await Y(s.index));let v=new U;await v.addSystemAccounts();let S=await ce(g,t),x=await k(S,[]),L=q(v,x.treeInfos.slice(0,1),x.leafIndices.slice(0,1),x.rootIndices.slice(0,1),x.proveByIndices.slice(0,1),S.slice(0,1),te())[0],W=T?gill.some(q(v,x.treeInfos.slice(T.start,T.end),x.leafIndices.slice(T.start,T.end),x.rootIndices.slice(T.start,T.end),x.proveByIndices.slice(T.start,T.end),S.slice(T.start,T.end),z())[0]):gill.none(),j=I?gill.some(q(v,x.treeInfos.slice(I.start,I.end),x.leafIndices.slice(I.start,I.end),x.rootIndices.slice(I.start,I.end),x.proveByIndices.slice(I.start,I.end),S.slice(I.start,I.end),z())[0]):gill.none(),{remainingAccounts:H,systemOffset:V}=v.toAccountMetas(),B=b(x,V),re=[];return u.length>0&&re.push(F(u)),re.push(Ac({secp256r1VerifyArgs:i,domainConfig:c,delegateTo:s?gill.some(s):gill.none(),feePayer:e,signer:n instanceof C?void 0:n,oldSettings:l,oldSettingsMutArgs:W,newSettings:D,newSettingsMutArgs:j,compressedProofArgs:B,userMutArgs:L,remainingAccounts:H})),re}async function XO({args:e,authority:n,index:r,settingsAddressTreeIndex:s}){let t=new U;await t.addSystemAccounts();let{address:c,addressTree:i}=await J(r,s),a=[{address:c,tree:i,queue:i,type:"Settings"}],o=await k([],a),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:y}=t.toAccountMetas(),g=b(o,y);return fc({compressedProofArgs:g,args:e,authority:n,settingsCreationArgs:d,remainingAccounts:u})}async function sw({args:e,authority:n,member:r,userAddressTreeIndex:s}){let t=new U;await t.addSystemAccounts();let{address:c,addressTree:i}=await N(r,s),a=[{address:c,tree:i,queue:i,type:"User"}],o=await k([],a),d=(await ae(t,o.treeInfos,o.roots,o.rootIndices,a))[0],{remainingAccounts:u,systemOffset:y}=t.toAccountMetas(),g=b(o,y);return Dc({compressedProofArgs:g,args:e,authority:n,userCreationArgs:d,remainingAccounts:u})}async function hw({index:e,payer:n,initialMember:r,userAddressTreeIndex:s,cachedAccounts:t}){let{domainConfig:c,verifyArgs:i,message:a,signature:o,publicKey:d}=G(r),u=[];a&&o&&d&&u.push({message:a,signature:o,publicKey:d});let y=new U;await y.addSystemAccounts();let g=[],l=[];l.push(...await ce([{address:(await N("address"in r?r.address:r,s)).address,type:"User"}],t));let T=await xe(),{address:D,addressTree:I}=await J(e,T);g.push({address:D,queue:I,tree:I,type:"Settings"});let v=l.length,S=await k(l,g),x=q(y,S.treeInfos.slice(0,v),S.leafIndices.slice(0,v),S.rootIndices.slice(0,v),S.proveByIndices.slice(0,v),l.filter(re=>re.type==="User"),te())[0],W=(await ae(y,S.treeInfos.slice(v),S.roots.slice(v),S.rootIndices.slice(v),g)).find(re=>re.type==="Settings")??null;c?y.addPreAccounts([{address:c,role:gill.AccountRole.READONLY}]):"address"in r&&y.addPreAccounts([{address:r.address,role:gill.AccountRole.READONLY_SIGNER,signer:r}]);let{remainingAccounts:j,systemOffset:H}=y.toAccountMetas(),V=b(S,H),B=[];if(!W)throw new Error("Settings creation args is missing.");return u.length>0&&B.push(F(u)),B.push(await _o({settingsIndex:e,payer:n,initialMember:r instanceof C?void 0:r,secp256r1VerifyArgs:i,domainConfig:c,userMutArgs:x,compressedProofArgs:V,settingsCreation:W,remainingAccounts:j})),B}async function Ow({index:e,settingsAddressTreeIndex:n,payer:r,signers:s,cachedAccounts:t}){let c=new U;await c.addSystemAccounts();let i=await ce([{address:(await J(e,n)).address,type:"Settings"}],t),a=await k(i,[]),o=q(c,a.treeInfos,a.leafIndices,a.rootIndices,a.proveByIndices,i.filter(S=>S.type==="Settings"),z())[0],d=me(s),u=d.filter(S=>S instanceof C),y=[],g=[];for(let S of u){let x=y.length,{domainConfig:L,verifyArgs:W,signature:j,publicKey:H,message:V}=G(S,x);V&&j&&H&&y.push({message:V,signature:j,publicKey:H}),L&&(c.addPreAccounts([{address:L,role:gill.AccountRole.READONLY}]),W?.__option==="Some"&&g.push({domainConfigKey:L,verifyArgs:W.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:T}=c.toAccountMetas(),D=b(a,T),I=[];y.length>0&&I.push(F(y));let v=await Y(e);return I.push(Vo({settings:v,payer:r,settingsMut:o,compressedProofArgs:D,secp256r1VerifyArgs:g,remainingAccounts:l})),I}function CC(e,n,r,s){let t=DC(e,n),c=MC(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 DC(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 MC(e,n){return n<e.header.numSignerAccounts}async function cr({walletAddress:e,transactionMessageBytes:n,addressesByLookupTableAddress:r,additionalSigners:s}){let t=Mi(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),oe()):{}),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:CC(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 Cd({settings:e,transactionBufferAddress:n,transactionMessageBytes:r,payer:s,addressesByLookupTableAddress:t,secp256r1VerifyInput:c=[],additionalSigners:i=[],jitoBundlesTipAmount:a,compressed:o=false}){let d=await Ce(e),{accountMetas:u,addressLookupTableAccounts:y}=await cr({transactionMessageBytes:r,walletAddress:d,additionalSigners:i,addressesByLookupTableAddress:t}),g=[];return c.length>0&&g.push(F(c)),g.push(o?ai({transactionBuffer:n,payer:s.address,remainingAccounts:u,settingsKey:e}):ti({transactionBuffer:n,payer:s.address,settings:e})),a&&g.push(Vi({payer:s,tipAmount:a})),{instructions:g,addressLookupTableAccounts:y}}async function Dd({index:e,settingsAddressTreeIndex:n,transactionMessageBytes:r,signers:s,payer:t,addressesByLookupTableAddress:c,secp256r1VerifyInput:i=[],compressed:a=false,simulateProof:o=false,cachedAccounts:d}){let u=me(s),y=await Y(e),g=await Ce(y),[{accountMetas:l,addressLookupTableAccounts:T,transactionMessage:D},{settingsReadonlyArgs:I,proof:v,packedAccounts:S}]=await Promise.all([cr({transactionMessageBytes:r,walletAddress:g,additionalSigners:u.filter(B=>!(B instanceof C)),addressesByLookupTableAddress:c}),Se(a,e,n,o,d)]);S.addPreAccounts(l);let x=u.filter(B=>B instanceof C),L=[];for(let B of x){let re=i.length,{domainConfig:le,verifyArgs:Pe,signature:De,publicKey:Re,message:Ut}=G(B,re);Ut&&De&&Re&&i.push({message:Ut,signature:De,publicKey:Re}),le&&(S.addPreAccounts([{address:le,role:gill.AccountRole.READONLY}]),Pe?.__option==="Some"&&L.push({domainConfigKey:le,verifyArgs:Pe.value}));}let{remainingAccounts:W,systemOffset:j}=S.toAccountMetas(),H=[];i.length>0&&H.push(F(i));let V=hC(D,l);if(a){if(!t||!I)throw new Error("Payer not found or proof args is missing.");let B=b(v,j);H.push(Si({secp256r1VerifyArgs:L,transactionMessage:V,settingsReadonlyArgs:I,compressedProofArgs:B,payer:t,remainingAccounts:W}));}else H.push(yi({secp256r1VerifyArgs:L,settings:y,transactionMessage:V,remainingAccounts:W}));return {instructions:H,addressLookupTableAccounts:T}}function hC(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 uk({index:e,settingsAddressTreeIndex:n,destination:r,signers:s,cachedAccounts:t,amount:c,payer:i,compressed:a=false}){let o=me(s),d=await Y(e),u=await Ce(d),{settingsReadonlyArgs:y,proof:g,packedAccounts:l}=await Se(a,e,n,false,t),T=[],D=[];for(let x of o)if(x instanceof C){let L=T.length,{domainConfig:W,verifyArgs:j,signature:H,publicKey:V,message:B}=G(x,L);B&&H&&V&&T.push({message:B,signature:H,publicKey:V}),W&&(l.addPreAccounts([{address:W,role:gill.AccountRole.READONLY}]),j?.__option==="Some"&&D.push({domainConfigKey:W,verifyArgs:j.value}));}else l.addPreAccounts([{address:x.address,role:gill.AccountRole.READONLY_SIGNER,signer:x}]);let{remainingAccounts:I,systemOffset:v}=l.toAccountMetas(),S=[];if(T.length>0&&S.push(F(T)),a){if(!i||!y)throw new Error("Payer not found or proof args is missing.");let x=b(g,v);S.push(Wc({amount:c,settingsReadonlyArgs:y,compressedProofArgs:x,payer:i,secp256r1VerifyArgs:D,source:u,destination:r,remainingAccounts:I}));}else S.push(Pc({amount:c,secp256r1VerifyArgs:D,source:u,destination:r,settings:d,remainingAccounts:I}));return S}async function xk({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=me(t),g=await Y(e),l=await Ce(g),[T,D]=await Promise.all([programs.getAssociatedTokenAccountAddress(s,l,o),programs.getAssociatedTokenAccountAddress(s,r,o)]),{settingsReadonlyArgs:I,proof:v,packedAccounts:S}=await Se(u,e,n,false,c),x=[],L=[];for(let V of y)if(V instanceof C){let B=x.length,{domainConfig:re,verifyArgs:le,signature:Pe,publicKey:De,message:Re}=G(V,B);Re&&Pe&&De&&x.push({message:Re,signature:Pe,publicKey:De}),re&&(S.addPreAccounts([{address:re,role:gill.AccountRole.READONLY}]),le?.__option==="Some"&&L.push({domainConfigKey:re,verifyArgs:le.value}));}else S.addPreAccounts([{address:V.address,role:gill.AccountRole.READONLY_SIGNER,signer:V}]);let{remainingAccounts:W,systemOffset:j}=S.toAccountMetas(),H=[];if(x.length>0&&H.push(F(x)),u){if(!a||!I)throw new Error("Payer not found or proof args is missing.");let V=b(v,j);H.push(Fc({amount:i,createAtaIfNeeded:d,settingsReadonlyArgs:I,compressedProofArgs:V,payer:a,secp256r1VerifyArgs:L,source:l,sourceTokenAccount:T,destination:r,destinationTokenAccount:D,mint:s,tokenProgram:o,remainingAccounts:W}));}else H.push(wc({amount:i,createAtaIfNeeded:d,secp256r1VerifyArgs:L,source:l,sourceTokenAccount:T,destination:r,destinationTokenAccount:D,settings:g,mint:s,tokenProgram:o,remainingAccounts:W}));return H}async function _k({index:e,settingsAddressTreeIndex:n,closer:r,transactionBufferAddress:s,payer:t,compressed:c=false,cachedAccounts:i}){let a=await _s(oe(),s),o=a.data.multiWalletSettings,{settingsReadonlyArgs:d,proof:u,packedAccounts:y}=await Se(c,e,n,false,i),{remainingAccounts:g,systemOffset:l}=y.toAccountMetas(),{domainConfig:T,verifyArgs:D,message:I,signature:v,publicKey:S}=G(r),x=[];if(I&&v&&S&&x.push(F([{message:I,signature:v,publicKey:S}])),c){if(!t||!d)throw new Error("Payer not found or proof args is missing.");let L=b(u,l);x.push(ta({transactionBuffer:s,domainConfig:T,closer:r instanceof C?void 0:r,rentCollector:a.data.payer,secp256r1VerifyArgs:D,settingsReadonlyArgs:d,payer:t,compressedProofArgs:L,remainingAccounts:g}));}else x.push(Yc({transactionBuffer:s,domainConfig:T,closer:r instanceof C?void 0:r,settings:o,payer:a.data.payer,secp256r1VerifyArgs:D,remainingAccounts:[]}));return x}function Pd({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:T,publicKey:D}=G(n),I=[];if(l&&T&&D&&I.push(F([{message:l,signature:T,publicKey:D}])),d){let{settingsReadonlyArgs:v,compressedProofArgs:S,remainingAccounts:x}=d;I.push(ya({transactionBuffer:t,payer:e,secp256r1VerifyArgs:g,creator:n instanceof C?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},settingsReadonlyArgs:v,compressedProofArgs:S,remainingAccounts:x}));}else I.push(aa({settings:s,transactionBuffer:t,payer:e,secp256r1VerifyArgs:g,creator:n instanceof C?void 0:n,domainConfig:y,args:{bufferIndex:r,finalBufferHash:c,finalBufferSize:i,bufferExtendHashes:o,preauthorizeExecution:a,expectedSecp256r1Signers:u},remainingAccounts:[]}));return I}function Rd({executor:e,transactionBufferAddress:n,settings:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,message:a,publicKey:o}=G(e),d=[];return a&&i&&o&&d.push(F([{message:a,signature:i,publicKey:o}])),s?d.push(Ea({transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof C?void 0:e,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Sa({settings:r,transactionBuffer:n,secp256r1VerifyArgs:c,domainConfig:t,executor:e instanceof C?void 0:e,remainingAccounts:[]})),d}function vd({transactionMessageBytes:e,transactionBufferAddress:n,settings:r,compressed:s=false}){return s?wa({transactionBuffer:n,buffer:e,settingsKey:r,remainingAccounts:[]}):_a({transactionBuffer:n,buffer:e,settings:r,remainingAccounts:[]})}function bd({settings:e,voter:n,transactionBufferAddress:r,compressedArgs:s}){let{domainConfig:t,verifyArgs:c,signature:i,publicKey:a,message:o}=G(n),d=[];return o&&i&&a&&d.push(F([{message:o,signature:i,publicKey:a}])),s?d.push(Ya({transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof C?void 0:n,settingsReadonlyArgs:s.settingsReadonlyArgs,payer:s.payer,compressedProofArgs:s.compressedProofArgs,remainingAccounts:s.remainingAccounts})):d.push(Fa({settings:e,transactionBuffer:r,secp256r1VerifyArgs:c,domainConfig:t,voter:n instanceof C?void 0:n,remainingAccounts:[]})),d}async function fN({message:e,signer:n,popUp:r}){let{clientId:s,signClientMessage:t}=je(),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=`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(s)}&signature=${encodeURIComponent(a)}&expiry=${encodeURIComponent(o)}`,u=await $t({authUrl:d,data:c,signer:n,popUp:r});return {...u,signer:new ye(u.signer)}}async function DN({transactionActionType:e,transactionAddress:n,transactionMessageBytes:r,signer:s,popUp:t}){let{clientId:c,signClientMessage:i}=je(),a={type:"transaction",payload:JSON.stringify({transactionActionType:e,transactionAddress:n,transactionMessageBytes:Qt(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=`${he()}/?redirectUrl=${encodeURIComponent(window.origin)}&clientId=${encodeURIComponent(c)}&signature=${encodeURIComponent(d)}&expiry=${encodeURIComponent(u)}`,g=await $t({authUrl:y,data:a,signer:s,popUp:t});return {...g,signer:new ye(g.signer)}}async function bN({message:e,response:n,expectedRPID:r=Ki(),expectedOrigin:s=he()}){let t=new Uint8Array([...new TextEncoder().encode(e),...xn(n.clientId,n.deviceSignature.publicKey,n.nonce)]),{verified:c}=await server.verifyAuthenticationResponse({response:n.authResponse,expectedChallenge:Qt(t),expectedOrigin:s,expectedRPID:r,requireUserVerification:false,credential:{id:n.authResponse.id,publicKey:Oi(n.signer.toString()),counter:0}}),i=ed25519_js.ed25519.verify(new Uint8Array(gill.getBase58Encoder().encode(n.deviceSignature.signature)),Fe(n.authResponse),new Uint8Array(gill.getBase58Encoder().encode(n.deviceSignature.publicKey)));return c&&i}async function GN({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 T=await Y(n),D=Math.floor(Math.random()*255),I=await od(T,t instanceof C?t:t.address,D),v=[],S=[];for(let Z=0;Z<s.length;Z+=g){let Bn=s.subarray(Z,Z+g);v.push(Bn),S.push(sha2_js.sha256(Bn));}let x=sha2_js.sha256(new Uint8Array(s)),{settingsReadonlyArgs:L,proof:W,packedAccounts:j}=await Se(d,n,r,false,l),{remainingAccounts:H,systemOffset:V}=j.toAccountMetas(),B=L?{settingsReadonlyArgs:L,compressedProofArgs:b(W,V),remainingAccounts:H,payer:e}:null,re=me([t,...c?[c]:[],...u]).filter(Z=>Z instanceof C).map(Z=>({memberKey:Ke(Z),messageHash:Fe(Z.authResponse)})),le=Pd({finalBufferHash:x,finalBufferSize:s.length,bufferIndex:D,payer:e,transactionBufferAddress:I,settings:T,creator:t,preauthorizeExecution:!c,bufferExtendHashes:S,compressedArgs:B,expectedSecp256r1Signers:re}),Pe=v.map(Z=>vd({transactionMessageBytes:Z,transactionBufferAddress:I,settings:T,compressed:d})),De=u.map(Z=>bd({voter:Z,transactionBufferAddress:I,settings:T,compressedArgs:B})),Re=Rd({compressedArgs:B,settings:T,executor:c,transactionBufferAddress:I}),{instructions:Ut,addressLookupTableAccounts:Ld}=await Cd({compressed:d,settings:T,transactionMessageBytes:s,transactionBufferAddress:I,payer:e,additionalSigners:y,secp256r1VerifyInput:i,jitoBundlesTipAmount:a,addressesByLookupTableAddress:o}),Xe=Z=>({payer:e,instructions:Z,addressesByLookupTableAddress:Ld});return [Xe(le),...Pe.map(Z=>Xe([Z])),...De.length?[Xe(De.flat())]:[],Xe(Re),Xe(Ut)]}var ir=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 dr=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=ir.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:T,drainedKeys:D}=l;c.push({readonlyIndexes:T.readonlyIndexes,readableIndices:T.readonlyIndexes,writableIndexes:T.writableIndexes,writableIndices:T.writableIndexes,lookupTableAddress:gill.address(T.lookupTableAddress)}),i.writable.push(...D.writable),i.readonly.push(...D.readonly);}}let[o,d]=t.getMessageComponents(),y=new dr(d,i).compileInstructions(r);return {version:0,header:o,instructions:y,lifetimeToken:n,staticAccounts:d,addressTableLookups:c}}function t2({instructions:e,payer:n,addressesByLookupTableAddress:r}){let s=Wd({instructions:e,payer:n,recentBlockhash:A,addressesByLookupTableAddress:r});return Di(s)}async function c2({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 Dd({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=Vs;exports.CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR=$s;exports.CHANGE_CONFIG_DISCRIMINATOR=js;exports.COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=so;exports.CREATE_DOMAIN_CONFIG_DISCRIMINATOR=To;exports.CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR=xo;exports.CREATE_GLOBAL_COUNTER_DISCRIMINATOR=Mo;exports.CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR=vo;exports.CREATE_USER_ACCOUNTS_DISCRIMINATOR=Wo;exports.DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR=ko;exports.DISABLE_DOMAIN_CONFIG_DISCRIMINATOR=zo;exports.DOMAIN_CONFIG_DISCRIMINATOR=On;exports.EDIT_DOMAIN_CONFIG_DISCRIMINATOR=Xo;exports.EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR=rc;exports.EDIT_USER_DELEGATE_DISCRIMINATOR=ic;exports.GLOBAL_COUNTER_DISCRIMINATOR=Gn;exports.KeyType=vt;exports.MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR=mc;exports.MIGRATE_COMPRESSED_USERS_DISCRIMINATOR=xc;exports.MULTI_WALLET_ERROR__ALREADY_DELEGATED=Tx;exports.MULTI_WALLET_ERROR__CLIENT_DATA_HASH_MISMATCH=jS;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED=Bx;exports.MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING=Ox;exports.MULTI_WALLET_ERROR__DUPLICATE_MEMBER=ZS;exports.MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED=YS;exports.MULTI_WALLET_ERROR__EMPTY_MEMBERS=cx;exports.MULTI_WALLET_ERROR__EXPECTED_ADMINISTRATOR_ROLE_MISMATCH=sx;exports.MULTI_WALLET_ERROR__EXPECTED_MESSAGE_HASH_MISMATCH=qS;exports.MULTI_WALLET_ERROR__EXPECTED_TRANSACTION_MANAGER_ROLE_MISMATCH=rx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH=Ex;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED=hx;exports.MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH=Px;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION=Sx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION=fx;exports.MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION=lx;exports.MULTI_WALLET_ERROR__INVALID_ACCOUNT=Ax;exports.MULTI_WALLET_ERROR__INVALID_ADDRESS_TREE=Nx;exports.MULTI_WALLET_ERROR__INVALID_ADMINISTRATOR_CONFIG=ox;exports.MULTI_WALLET_ERROR__INVALID_ARGUMENTS=yx;exports.MULTI_WALLET_ERROR__INVALID_BUFFER=Mx;exports.MULTI_WALLET_ERROR__INVALID_NON_DELEGATED_SIGNERS=xx;exports.MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS=ux;exports.MULTI_WALLET_ERROR__INVALID_PERMANENT_MEMBER_CONFIG=QS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_INSTRUCTION=VS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_PUBLIC_KEY=zS;exports.MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG=HS;exports.MULTI_WALLET_ERROR__INVALID_SIGNATURE_OFFSETS=FS;exports.MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT=Wx;exports.MULTI_WALLET_ERROR__INVALID_THRESHOLD=ix;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_CONFIG=nx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MANAGER_PERMISSION=tx;exports.MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE=dx;exports.MULTI_WALLET_ERROR__INVALID_USER_ROLE=gx;exports.MULTI_WALLET_ERROR__MALFORMED_SIGNED_MESSAGE=KS;exports.MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED=_x;exports.MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG=wx;exports.MULTI_WALLET_ERROR__MISSING_ACCOUNT=mx;exports.MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY=Ux;exports.MULTI_WALLET_ERROR__MISSING_USER_ARGS=px;exports.MULTI_WALLET_ERROR__NO_SIGNER_FOUND=Cx;exports.MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED=$S;exports.MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED=ex;exports.MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS=kx;exports.MULTI_WALLET_ERROR__PERMANENT_MEMBER=XS;exports.MULTI_WALLET_ERROR__PROTECTED_ACCOUNT=bx;exports.MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH=JS;exports.MULTI_WALLET_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS=GS;exports.MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND=Lx;exports.MULTI_WALLET_ERROR__TOO_MANY_MEMBERS=ax;exports.MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED=Rx;exports.MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED=vx;exports.MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER=Dx;exports.MULTI_WALLET_ERROR__UNEXPECTED_SIGNER=Ix;exports.MULTI_WALLET_PROGRAM_ADDRESS=A;exports.MultiWalletAccount=wS;exports.MultiWalletInstruction=kS;exports.NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=bc;exports.NATIVE_TRANSFER_INTENT_DISCRIMINATOR=Ec;exports.Permission=Ie;exports.Permissions=Me;exports.SETTINGS_DISCRIMINATOR=Is;exports.Secp256r1Key=ye;exports.SignedSecp256r1Key=C;exports.TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR=Vc;exports.TOKEN_TRANSFER_INTENT_DISCRIMINATOR=Bc;exports.TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR=$c;exports.TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR=Jc;exports.TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR=ua;exports.TRANSACTION_BUFFER_CREATE_DISCRIMINATOR=sa;exports.TRANSACTION_BUFFER_DISCRIMINATOR=Rs;exports.TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR=Ca;exports.TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR=Ta;exports.TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR=La;exports.TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR=Ra;exports.TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR=Ja;exports.TRANSACTION_BUFFER_VOTE_DISCRIMINATOR=Ha;exports.TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR=si;exports.TRANSACTION_EXECUTE_DISCRIMINATOR=$a;exports.TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR=Ti;exports.TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR=ui;exports.UserRole=He;exports.WHITELISTED_ADDRESS_TREE_DISCRIMINATOR=Ls;exports.addWhitelistedAddressTrees=FB;exports.changeConfig=hB;exports.closeTransactionBuffer=_k;exports.compressSettingsAccount=HB;exports.configAction=xD;exports.convertMemberKeyToString=dd;exports.convertPubkeyCompressedToCose=Oi;exports.convertPubkeyCoseToCompressed=FW;exports.createDomainConfig=ZB;exports.createDomainUserAccounts=cO;exports.createGlobalCounter=uO;exports.createPopUp=Li;exports.createTransactionBuffer=Pd;exports.createTransactionManagerSigner=$I;exports.createUserAccounts=fO;exports.createWallet=hw;exports.decodeDomainConfig=kn;exports.decodeGlobalCounter=zn;exports.decodeSettings=Ds;exports.decodeTransactionBuffer=bs;exports.decodeWhitelistedAddressTree=Os;exports.decompressSettingsAccount=Ow;exports.disableDomainConfig=IO;exports.editDomainConfig=RO;exports.editTransactionManagerUrl=LO;exports.editUserDelegate=zO;exports.executeTransaction=Cd;exports.executeTransactionBuffer=Rd;exports.executeTransactionSync=Dd;exports.extendTransactionBuffer=vd;exports.fetchAllDomainConfig=BC;exports.fetchAllGlobalCounter=GC;exports.fetchAllMaybeDomainConfig=qd;exports.fetchAllMaybeGlobalCounter=uu;exports.fetchAllMaybeSettings=yy;exports.fetchAllMaybeTransactionBuffer=By;exports.fetchAllMaybeWhitelistedAddressTree=tm;exports.fetchAllSettings=ZE;exports.fetchAllTransactionBuffer=nh;exports.fetchAllWhitelistedAddressTree=ih;exports.fetchCompressedAccount=qi;exports.fetchDomainConfig=Nn;exports.fetchGlobalCounter=VC;exports.fetchMaybeDomainConfig=jd;exports.fetchMaybeGlobalCounter=du;exports.fetchMaybeSettings=Fr;exports.fetchMaybeSettingsAccountData=BI;exports.fetchMaybeTransactionBuffer=Ly;exports.fetchMaybeUserAccountData=LI;exports.fetchMaybeWhitelistedAddressTree=em;exports.fetchSettings=YE;exports.fetchSettingsAccountData=_t;exports.fetchTransactionBuffer=_s;exports.fetchUserAccountData=sr;exports.fetchWhitelistedAddressTree=ws;exports.getAddMemberArgsCodec=jC;exports.getAddMemberArgsDecoder=Ar;exports.getAddMemberArgsEncoder=ur;exports.getAddWhitelistedAddressTreesDiscriminatorBytes=Eh;exports.getAddWhitelistedAddressTreesInstruction=Ph;exports.getAddWhitelistedAddressTreesInstructionAsync=Fs;exports.getAddWhitelistedAddressTreesInstructionDataCodec=hh;exports.getAddWhitelistedAddressTreesInstructionDataDecoder=Gs;exports.getAddWhitelistedAddressTreesInstructionDataEncoder=Xr;exports.getAuthEndpoint=he;exports.getChangeConfigCompressedDiscriminatorBytes=Kh;exports.getChangeConfigCompressedInstruction=to;exports.getChangeConfigCompressedInstructionDataCodec=Jh;exports.getChangeConfigCompressedInstructionDataDecoder=eo;exports.getChangeConfigCompressedInstructionDataEncoder=Qs;exports.getChangeConfigDiscriminatorBytes=Bh;exports.getChangeConfigInstruction=wh;exports.getChangeConfigInstructionAsync=Ys;exports.getChangeConfigInstructionDataCodec=Oh;exports.getChangeConfigInstructionDataDecoder=qs;exports.getChangeConfigInstructionDataEncoder=$r;exports.getClientAndDeviceHash=xn;exports.getClientSettings=je;exports.getCompiledInstructionCodec=ZC;exports.getCompiledInstructionDecoder=yr;exports.getCompiledInstructionEncoder=gr;exports.getCompressSettingsAccountDiscriminatorBytes=eP;exports.getCompressSettingsAccountInstruction=ao;exports.getCompressSettingsAccountInstructionDataCodec=tP;exports.getCompressSettingsAccountInstructionDataDecoder=co;exports.getCompressSettingsAccountInstructionDataEncoder=oo;exports.getCompressedAccountMetaCodec=eD;exports.getCompressedAccountMetaDecoder=tt;exports.getCompressedAccountMetaEncoder=et;exports.getCompressedAccountMetaReadOnlyCodec=sD;exports.getCompressedAccountMetaReadOnlyDecoder=pr;exports.getCompressedAccountMetaReadOnlyEncoder=mr;exports.getCompressedProofCodec=aD;exports.getCompressedProofDecoder=Ir;exports.getCompressedProofEncoder=xr;exports.getCompressedSettingsAddressFromIndex=J;exports.getCompressedSettingsCodec=AD;exports.getCompressedSettingsDataCodec=pD;exports.getCompressedSettingsDataDecoder=ct;exports.getCompressedSettingsDataEncoder=ot;exports.getCompressedSettingsDecoder=z;exports.getCompressedSettingsEncoder=st;exports.getComputeBudgetEstimate=zi;exports.getConfigActionCodec=SD;exports.getConfigActionDecoder=ut;exports.getConfigActionEncoder=dt;exports.getCreateDomainConfigDiscriminatorBytes=dP;exports.getCreateDomainConfigInstruction=AP;exports.getCreateDomainConfigInstructionAsync=lo;exports.getCreateDomainConfigInstructionDataCodec=uP;exports.getCreateDomainConfigInstructionDataDecoder=fo;exports.getCreateDomainConfigInstructionDataEncoder=en;exports.getCreateDomainUserAccountDiscriminatorBytes=SP;exports.getCreateDomainUserAccountInstruction=IP;exports.getCreateDomainUserAccountInstructionAsync=Co;exports.getCreateDomainUserAccountInstructionDataCodec=xP;exports.getCreateDomainUserAccountInstructionDataDecoder=Io;exports.getCreateDomainUserAccountInstructionDataEncoder=rn;exports.getCreateGlobalCounterDiscriminatorBytes=RP;exports.getCreateGlobalCounterInstruction=bP;exports.getCreateGlobalCounterInstructionAsync=ho;exports.getCreateGlobalCounterInstructionDataCodec=vP;exports.getCreateGlobalCounterInstructionDataDecoder=Eo;exports.getCreateGlobalCounterInstructionDataEncoder=sn;exports.getCreateMultiWalletCompressedDiscriminatorBytes=kP;exports.getCreateMultiWalletCompressedInstruction=HP;exports.getCreateMultiWalletCompressedInstructionAsync=_o;exports.getCreateMultiWalletCompressedInstructionDataCodec=NP;exports.getCreateMultiWalletCompressedInstructionDataDecoder=bo;exports.getCreateMultiWalletCompressedInstructionDataEncoder=on;exports.getCreateUserAccountArgsCodec=ED;exports.getCreateUserAccountArgsDecoder=vr;exports.getCreateUserAccountArgsEncoder=Rr;exports.getCreateUserAccountsDiscriminatorBytes=qP;exports.getCreateUserAccountsInstruction=ZP;exports.getCreateUserAccountsInstructionAsync=Bo;exports.getCreateUserAccountsInstructionDataCodec=YP;exports.getCreateUserAccountsInstructionDataDecoder=Lo;exports.getCreateUserAccountsInstructionDataEncoder=an;exports.getDecompressSettingsAccountDiscriminatorBytes=sR;exports.getDecompressSettingsAccountInstruction=Vo;exports.getDecompressSettingsAccountInstructionDataCodec=oR;exports.getDecompressSettingsAccountInstructionDataDecoder=Ho;exports.getDecompressSettingsAccountInstructionDataEncoder=No;exports.getDisableDomainConfigDiscriminatorBytes=gR;exports.getDisableDomainConfigInstruction=jo;exports.getDisableDomainConfigInstructionDataCodec=yR;exports.getDisableDomainConfigInstructionDataDecoder=Jo;exports.getDisableDomainConfigInstructionDataEncoder=Ko;exports.getDomainConfigAddress=ze;exports.getDomainConfigCodec=LC;exports.getDomainConfigDecoder=wn;exports.getDomainConfigDiscriminatorBytes=WC;exports.getDomainConfigEncoder=Jd;exports.getDomainConfigSize=OC;exports.getEditDomainConfigDiscriminatorBytes=IR;exports.getEditDomainConfigInstruction=Qo;exports.getEditDomainConfigInstructionAsync=DR;exports.getEditDomainConfigInstructionDataCodec=CR;exports.getEditDomainConfigInstructionDataDecoder=$o;exports.getEditDomainConfigInstructionDataEncoder=un;exports.getEditMemberArgsCodec=vD;exports.getEditMemberArgsDecoder=Er;exports.getEditMemberArgsEncoder=Mr;exports.getEditTransactionManagerUrlDiscriminatorBytes=_R;exports.getEditTransactionManagerUrlInstruction=oc;exports.getEditTransactionManagerUrlInstructionDataCodec=UR;exports.getEditTransactionManagerUrlInstructionDataDecoder=sc;exports.getEditTransactionManagerUrlInstructionDataEncoder=nc;exports.getEditUserDelegateDiscriminatorBytes=HR;exports.getEditUserDelegateInstruction=Ac;exports.getEditUserDelegateInstructionDataCodec=VR;exports.getEditUserDelegateInstructionDataDecoder=uc;exports.getEditUserDelegateInstructionDataEncoder=dc;exports.getExpectedSecp256r1SignersCodec=WD;exports.getExpectedSecp256r1SignersDecoder=gt;exports.getExpectedSecp256r1SignersEncoder=At;exports.getFeePayer=aL;exports.getGlobalCounterAddress=sd;exports.getGlobalCounterCodec=HC;exports.getGlobalCounterDecoder=Fn;exports.getGlobalCounterDiscriminatorBytes=NC;exports.getGlobalCounterEncoder=iu;exports.getGlobalCounterSize=FC;exports.getJitoTipsConfig=Mn;exports.getLightCpiSigner=zL;exports.getLightProtocolRpc=Oe;exports.getLinkWalletArgsCodec=wD;exports.getLinkWalletArgsDecoder=_r;exports.getLinkWalletArgsEncoder=br;exports.getMemberCodec=VD;exports.getMemberDecoder=it;exports.getMemberEncoder=at;exports.getMemberKeyCodec=zD;exports.getMemberKeyDecoder=$;exports.getMemberKeyEncoder=X;exports.getMigrateCompressedSettingsDiscriminatorBytes=YR;exports.getMigrateCompressedSettingsInstruction=fc;exports.getMigrateCompressedSettingsInstructionDataCodec=ZR;exports.getMigrateCompressedSettingsInstructionDataDecoder=Tc;exports.getMigrateCompressedSettingsInstructionDataEncoder=pc;exports.getMigrateCompressedUsersDiscriminatorBytes=sv;exports.getMigrateCompressedUsersInstruction=Dc;exports.getMigrateCompressedUsersInstructionDataCodec=ov;exports.getMigrateCompressedUsersInstructionDataDecoder=Cc;exports.getMigrateCompressedUsersInstructionDataEncoder=Ic;exports.getMultiWalletErrorMessage=XU;exports.getNativeTransferIntentCompressedDiscriminatorBytes=Dv;exports.getNativeTransferIntentCompressedInstruction=Wc;exports.getNativeTransferIntentCompressedInstructionDataCodec=Mv;exports.getNativeTransferIntentCompressedInstructionDataDecoder=Uc;exports.getNativeTransferIntentCompressedInstructionDataEncoder=_c;exports.getNativeTransferIntentDiscriminatorBytes=yv;exports.getNativeTransferIntentInstruction=Pc;exports.getNativeTransferIntentInstructionAsync=pv;exports.getNativeTransferIntentInstructionDataCodec=mv;exports.getNativeTransferIntentInstructionDataDecoder=hc;exports.getNativeTransferIntentInstructionDataEncoder=An;exports.getNewAuthorityArgsCodec=qD;exports.getNewAuthorityArgsDecoder=Br;exports.getNewAuthorityArgsEncoder=Lr;exports.getOriginIndex=KW;exports.getPackedAddressTreeInfoCodec=XD;exports.getPackedAddressTreeInfoDecoder=mt;exports.getPackedAddressTreeInfoEncoder=yt;exports.getPackedStateTreeInfoCodec=eM;exports.getPackedStateTreeInfoDecoder=nt;exports.getPackedStateTreeInfoEncoder=rt;exports.getPermissionsCodec=nM;exports.getPermissionsDecoder=be;exports.getPermissionsEncoder=ve;exports.getProofArgsCodec=aM;exports.getProofArgsDecoder=E;exports.getProofArgsEncoder=M;exports.getRemoveMemberArgsCodec=AM;exports.getRemoveMemberArgsDecoder=Pr;exports.getRemoveMemberArgsEncoder=hr;exports.getRpId=Ki;exports.getSecp256r1Message=In;exports.getSecp256r1MessageHash=Fe;exports.getSecp256r1PubkeyCodec=mM;exports.getSecp256r1PubkeyDecoder=pt;exports.getSecp256r1PubkeyEncoder=Or;exports.getSecp256r1SignatureOffsetsDataDecoder=fC;exports.getSecp256r1SignatureOffsetsDataEncoder=TC;exports.getSecp256r1VerifyArgsCodec=fM;exports.getSecp256r1VerifyArgsDecoder=w;exports.getSecp256r1VerifyArgsEncoder=O;exports.getSecp256r1VerifyArgsWithDomainAddressCodec=IM;exports.getSecp256r1VerifyArgsWithDomainAddressDecoder=ee;exports.getSecp256r1VerifyArgsWithDomainAddressEncoder=Q;exports.getSecp256r1VerifyInstruction=F;exports.getSecp256r1VerifyInstructionDataCodec=vB;exports.getSecp256r1VerifyInstructionDataDecoder=pd;exports.getSecp256r1VerifyInstructionDataEncoder=Td;exports.getSendAndConfirmTransaction=Fi;exports.getSettingsCodec=qE;exports.getSettingsCreationArgsCodec=EM;exports.getSettingsCreationArgsDecoder=ft;exports.getSettingsCreationArgsEncoder=Tt;exports.getSettingsDecoder=Cs;exports.getSettingsDiscriminatorBytes=jE;exports.getSettingsEncoder=gy;exports.getSettingsFromIndex=Y;exports.getSettingsIndexWithAddressCodec=RM;exports.getSettingsIndexWithAddressDecoder=St;exports.getSettingsIndexWithAddressEncoder=lt;exports.getSettingsMutArgsCodec=UM;exports.getSettingsMutArgsDecoder=ge;exports.getSettingsMutArgsEncoder=Ae;exports.getSettingsReadonlyArgsCodec=OM;exports.getSettingsReadonlyArgsDecoder=se;exports.getSettingsReadonlyArgsEncoder=ne;exports.getSettingsSize=XE;exports.getSignedSecp256r1Key=zW;exports.getSignedTransactionManager=aB;exports.getSolanaRpc=oe;exports.getSolanaRpcEndpoint=Je;exports.getTokenTransferIntentCompressedDiscriminatorBytes=Gv;exports.getTokenTransferIntentCompressedInstruction=Fc;exports.getTokenTransferIntentCompressedInstructionAsync=zv;exports.getTokenTransferIntentCompressedInstructionDataCodec=Fv;exports.getTokenTransferIntentCompressedInstructionDataDecoder=Gc;exports.getTokenTransferIntentCompressedInstructionDataEncoder=mn;exports.getTokenTransferIntentDiscriminatorBytes=Uv;exports.getTokenTransferIntentInstruction=wc;exports.getTokenTransferIntentInstructionAsync=Lv;exports.getTokenTransferIntentInstructionDataCodec=Wv;exports.getTokenTransferIntentInstructionDataDecoder=Oc;exports.getTokenTransferIntentInstructionDataEncoder=yn;exports.getTransactionBufferAddress=od;exports.getTransactionBufferCloseCompressedDiscriminatorBytes=ab;exports.getTransactionBufferCloseCompressedInstruction=ta;exports.getTransactionBufferCloseCompressedInstructionDataCodec=ib;exports.getTransactionBufferCloseCompressedInstructionDataDecoder=ea;exports.getTransactionBufferCloseCompressedInstructionDataEncoder=Qc;exports.getTransactionBufferCloseDiscriminatorBytes=$v;exports.getTransactionBufferCloseInstruction=Yc;exports.getTransactionBufferCloseInstructionDataCodec=Qv;exports.getTransactionBufferCloseInstructionDataDecoder=qc;exports.getTransactionBufferCloseInstructionDataEncoder=jc;exports.getTransactionBufferCodec=rh;exports.getTransactionBufferCreateArgsCodec=HM;exports.getTransactionBufferCreateArgsDecoder=It;exports.getTransactionBufferCreateArgsEncoder=xt;exports.getTransactionBufferCreateCompressedDiscriminatorBytes=Eb;exports.getTransactionBufferCreateCompressedInstruction=ya;exports.getTransactionBufferCreateCompressedInstructionDataCodec=hb;exports.getTransactionBufferCreateCompressedInstructionDataDecoder=ga;exports.getTransactionBufferCreateCompressedInstructionDataEncoder=Aa;exports.getTransactionBufferCreateDiscriminatorBytes=Tb;exports.getTransactionBufferCreateInstruction=aa;exports.getTransactionBufferCreateInstructionDataCodec=fb;exports.getTransactionBufferCreateInstructionDataDecoder=ca;exports.getTransactionBufferCreateInstructionDataEncoder=oa;exports.getTransactionBufferDecoder=vs;exports.getTransactionBufferDiscriminatorBytes=th;exports.getTransactionBufferEncoder=Wy;exports.getTransactionBufferExecuteCompressedDiscriminatorBytes=Fb;exports.getTransactionBufferExecuteCompressedInstruction=Ea;exports.getTransactionBufferExecuteCompressedInstructionDataCodec=zb;exports.getTransactionBufferExecuteCompressedInstructionDataDecoder=Ma;exports.getTransactionBufferExecuteCompressedInstructionDataEncoder=Da;exports.getTransactionBufferExecuteDiscriminatorBytes=Lb;exports.getTransactionBufferExecuteInstruction=Sa;exports.getTransactionBufferExecuteInstructionDataCodec=Bb;exports.getTransactionBufferExecuteInstructionDataDecoder=la;exports.getTransactionBufferExecuteInstructionDataEncoder=fa;exports.getTransactionBufferExtendCompressedDiscriminatorBytes=o_;exports.getTransactionBufferExtendCompressedInstruction=wa;exports.getTransactionBufferExtendCompressedInstructionDataCodec=c_;exports.getTransactionBufferExtendCompressedInstructionDataDecoder=Oa;exports.getTransactionBufferExtendCompressedInstructionDataEncoder=Ba;exports.getTransactionBufferExtendDiscriminatorBytes=Xb;exports.getTransactionBufferExtendInstruction=_a;exports.getTransactionBufferExtendInstructionDataCodec=$b;exports.getTransactionBufferExtendInstructionDataDecoder=ba;exports.getTransactionBufferExtendInstructionDataEncoder=va;exports.getTransactionBufferVoteCompressedDiscriminatorBytes=D_;exports.getTransactionBufferVoteCompressedInstruction=Ya;exports.getTransactionBufferVoteCompressedInstructionDataCodec=M_;exports.getTransactionBufferVoteCompressedInstructionDataDecoder=qa;exports.getTransactionBufferVoteCompressedInstructionDataEncoder=ja;exports.getTransactionBufferVoteDiscriminatorBytes=m_;exports.getTransactionBufferVoteInstruction=Fa;exports.getTransactionBufferVoteInstructionDataCodec=p_;exports.getTransactionBufferVoteInstructionDataDecoder=Ga;exports.getTransactionBufferVoteInstructionDataEncoder=Va;exports.getTransactionExecuteCompressedDiscriminatorBytes=N_;exports.getTransactionExecuteCompressedInstruction=ai;exports.getTransactionExecuteCompressedInstructionDataCodec=H_;exports.getTransactionExecuteCompressedInstructionDataDecoder=ci;exports.getTransactionExecuteCompressedInstructionDataEncoder=oi;exports.getTransactionExecuteDiscriminatorBytes=__;exports.getTransactionExecuteInstruction=ti;exports.getTransactionExecuteInstructionDataCodec=U_;exports.getTransactionExecuteInstructionDataDecoder=ei;exports.getTransactionExecuteInstructionDataEncoder=Qa;exports.getTransactionExecuteSyncCompressedDiscriminatorBytes=nU;exports.getTransactionExecuteSyncCompressedInstruction=Si;exports.getTransactionExecuteSyncCompressedInstructionDataCodec=sU;exports.getTransactionExecuteSyncCompressedInstructionDataDecoder=li;exports.getTransactionExecuteSyncCompressedInstructionDataEncoder=fi;exports.getTransactionExecuteSyncDiscriminatorBytes=q_;exports.getTransactionExecuteSyncInstruction=yi;exports.getTransactionExecuteSyncInstructionDataCodec=Y_;exports.getTransactionExecuteSyncInstructionDataDecoder=gi;exports.getTransactionExecuteSyncInstructionDataEncoder=Ai;exports.getTransactionMessageAddressTableLookupCodec=jM;exports.getTransactionMessageAddressTableLookupDecoder=kr;exports.getTransactionMessageAddressTableLookupEncoder=wr;exports.getTransactionMessageCodec=zM;exports.getTransactionMessageDecoder=Dt;exports.getTransactionMessageEncoder=Ct;exports.getUserAccountAddress=N;exports.getUserCodec=XM;exports.getUserCreationArgsCodec=tE;exports.getUserCreationArgsDecoder=fe;exports.getUserCreationArgsEncoder=Te;exports.getUserDecoder=te;exports.getUserEncoder=Mt;exports.getUserMutArgsCodec=oE;exports.getUserMutArgsDecoder=ue;exports.getUserMutArgsEncoder=de;exports.getUserRoleCodec=iE;exports.getUserRoleDecoder=Ue;exports.getUserRoleEncoder=_e;exports.getWalletAddressFromIndex=cd;exports.getWalletAddressFromSettings=Ce;exports.getWhitelistedAddressTreeCodec=ah;exports.getWhitelistedAddressTreeDecoder=Bs;exports.getWhitelistedAddressTreeDiscriminatorBytes=ch;exports.getWhitelistedAddressTreeEncoder=Qy;exports.getWhitelistedAddressTreeFromIndex=hn;exports.getWhitelistedAddressTreeIndexFromAddress=BL;exports.getWhitelistedAddressTreesAddress=Yi;exports.identifyMultiWalletAccount=zU;exports.identifyMultiWalletInstruction=KU;exports.initialize=dL;exports.isConfigAction=ID;exports.isMultiWalletError=$U;exports.migrateSettings=XO;exports.migrateUsers=sw;exports.nativeTransferIntent=uk;exports.parseAddWhitelistedAddressTreesInstruction=Rh;exports.parseChangeConfigCompressedInstruction=jh;exports.parseChangeConfigInstruction=kh;exports.parseCompressSettingsAccountInstruction=rP;exports.parseCreateDomainConfigInstruction=gP;exports.parseCreateDomainUserAccountInstruction=CP;exports.parseCreateGlobalCounterInstruction=_P;exports.parseCreateMultiWalletCompressedInstruction=VP;exports.parseCreateUserAccountsInstruction=XP;exports.parseDecompressSettingsAccountInstruction=cR;exports.parseDisableDomainConfigInstruction=mR;exports.parseEditDomainConfigInstruction=MR;exports.parseEditTransactionManagerUrlInstruction=WR;exports.parseEditUserDelegateInstruction=GR;exports.parseMigrateCompressedSettingsInstruction=XR;exports.parseMigrateCompressedUsersInstruction=cv;exports.parseNativeTransferIntentCompressedInstruction=Ev;exports.parseNativeTransferIntentInstruction=Tv;exports.parseSecp256r1VerifyInstruction=bB;exports.parseTokenTransferIntentCompressedInstruction=Kv;exports.parseTokenTransferIntentInstruction=Bv;exports.parseTransactionBufferCloseCompressedInstruction=db;exports.parseTransactionBufferCloseInstruction=eb;exports.parseTransactionBufferCreateCompressedInstruction=Pb;exports.parseTransactionBufferCreateInstruction=lb;exports.parseTransactionBufferExecuteCompressedInstruction=Kb;exports.parseTransactionBufferExecuteInstruction=Ob;exports.parseTransactionBufferExtendCompressedInstruction=a_;exports.parseTransactionBufferExtendInstruction=Qb;exports.parseTransactionBufferVoteCompressedInstruction=E_;exports.parseTransactionBufferVoteInstruction=T_;exports.parseTransactionExecuteCompressedInstruction=V_;exports.parseTransactionExecuteInstruction=W_;exports.parseTransactionExecuteSyncCompressedInstruction=oU;exports.parseTransactionExecuteSyncInstruction=Z_;exports.pollJitoBundleConfirmation=oB;exports.prepareTransactionBundle=GN;exports.prepareTransactionMessage=t2;exports.prepareTransactionSync=c2;exports.retrieveTransactionManager=cB;exports.sendJitoBundle=XI;exports.signAndSendBundledTransactions=nB;exports.signAndSendTransaction=sB;exports.signMessageWithPasskey=fN;exports.signTransactionWithPasskey=DN;exports.tokenTransferIntent=xk;exports.uninitialize=iL;exports.vaultTransactionMessageDeserialize=Mi;exports.vaultTransactionMessageSerialize=Di;exports.verifyMessage=bN;exports.voteTransactionBuffer=bd;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|