@solana-program/system 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.cjs +240 -410
- package/dist/src/index.cjs.map +1 -1
- package/dist/src/index.js +240 -396
- package/dist/src/index.js.map +1 -1
- package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts +5 -21
- package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/allocate.d.ts +5 -16
- package/dist/types/src/generated/instructions/allocate.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/allocateWithSeed.d.ts +5 -22
- package/dist/types/src/generated/instructions/allocateWithSeed.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/assign.d.ts +5 -16
- package/dist/types/src/generated/instructions/assign.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/assignWithSeed.d.ts +5 -21
- package/dist/types/src/generated/instructions/assignWithSeed.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts +5 -19
- package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/createAccount.d.ts +5 -21
- package/dist/types/src/generated/instructions/createAccount.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts +5 -26
- package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts +5 -22
- package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/transferSol.d.ts +5 -19
- package/dist/types/src/generated/instructions/transferSol.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts +5 -24
- package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts +5 -15
- package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
- package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts +5 -28
- package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
- package/dist/types/src/generated/shared/index.d.ts +2 -10
- package/dist/types/src/generated/shared/index.d.ts.map +1 -1
- package/package.json +9 -13
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/nonce.ts","../../src/generated/types/nonceState.ts","../../src/generated/types/nonceVersion.ts","../../src/generated/errors/system.ts","../../src/generated/instructions/advanceNonceAccount.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/allocate.ts","../../src/generated/instructions/allocateWithSeed.ts","../../src/generated/instructions/assign.ts","../../src/generated/instructions/assignWithSeed.ts","../../src/generated/instructions/authorizeNonceAccount.ts","../../src/generated/instructions/createAccount.ts","../../src/generated/instructions/createAccountWithSeed.ts","../../src/generated/instructions/initializeNonceAccount.ts","../../src/generated/instructions/transferSol.ts","../../src/generated/instructions/transferSolWithSeed.ts","../../src/generated/instructions/upgradeNonceAccount.ts","../../src/generated/instructions/withdrawNonceAccount.ts","../../src/generated/programs/system.ts"],"names":["combineCodec","NonceState","getScalarEnumDecoder","getScalarEnumEncoder","getU32Decoder","getU32Encoder","NonceVersion","SystemProgramErrorCode","getStructDecoder","getStructEncoder","AccountRole","getU64Decoder","getU64Encoder","mapEncoder","getAddressDecoder","getAddressEncoder","getStringDecoder","getStringEncoder","SystemAccount","SystemInstruction"],"mappings":";AACO,IAAM,UAA2B,uBACrC,QAAgB,KAAU,EAAE,aAAa,eAAe;;;ACM3D;AAAA,EAOE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAIE,gBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;AC3BP;AAAA,EAIE;AAAA,EACA;AAAA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A,EACT;AACA,MAAI,OAAO,MAAMA,gBAAc,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC9C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,gBAAc,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;AAC9C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,gBAAc,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG;AAC/C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,gBAAc,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG;AAC/C,WAAO;AAAA,EACT;AACA,MAAI,OAAO,MAAMA,gBAAc,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG;AAC/C,WAAO;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Account,\n EncodedAccount,\n FetchAccountConfig,\n FetchAccountsConfig,\n MaybeAccount,\n MaybeEncodedAccount,\n assertAccountExists,\n assertAccountsExist,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n} from '@solana/accounts';\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n} from '@solana/codecs';\nimport {\n NonceState,\n NonceStateArgs,\n NonceVersion,\n NonceVersionArgs,\n getNonceStateDecoder,\n getNonceStateEncoder,\n getNonceVersionDecoder,\n getNonceVersionEncoder,\n} from '../types';\n\nexport type Nonce<TAddress extends string = string> = Account<\n NonceAccountData,\n TAddress\n>;\n\nexport type MaybeNonce<TAddress extends string = string> = MaybeAccount<\n NonceAccountData,\n TAddress\n>;\n\nexport type NonceAccountData = {\n version: NonceVersion;\n state: NonceState;\n authority: Address;\n blockhash: Address;\n lamportsPerSignature: bigint;\n};\n\nexport type NonceAccountDataArgs = {\n version: NonceVersionArgs;\n state: NonceStateArgs;\n authority: Address;\n blockhash: Address;\n lamportsPerSignature: number | bigint;\n};\n\nexport function getNonceAccountDataEncoder(): Encoder<NonceAccountDataArgs> {\n return getStructEncoder([\n ['version', getNonceVersionEncoder()],\n ['state', getNonceStateEncoder()],\n ['authority', getAddressEncoder()],\n ['blockhash', getAddressEncoder()],\n ['lamportsPerSignature', getU64Encoder()],\n ]);\n}\n\nexport function getNonceAccountDataDecoder(): Decoder<NonceAccountData> {\n return getStructDecoder([\n ['version', getNonceVersionDecoder()],\n ['state', getNonceStateDecoder()],\n ['authority', getAddressDecoder()],\n ['blockhash', getAddressDecoder()],\n ['lamportsPerSignature', getU64Decoder()],\n ]);\n}\n\nexport function getNonceAccountDataCodec(): Codec<\n NonceAccountDataArgs,\n NonceAccountData\n> {\n return combineCodec(\n getNonceAccountDataEncoder(),\n getNonceAccountDataDecoder()\n );\n}\n\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Nonce<TAddress>;\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeNonce<TAddress>;\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Nonce<TAddress> | MaybeNonce<TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getNonceAccountDataDecoder()\n );\n}\n\nexport async function fetchNonce<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Nonce<TAddress>> {\n const maybeAccount = await fetchMaybeNonce(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeNonce<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeNonce<TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeNonce(maybeAccount);\n}\n\nexport async function fetchAllNonce(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Nonce[]> {\n const maybeAccounts = await fetchAllMaybeNonce(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeNonce(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeNonce[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeNonce(maybeAccount));\n}\n\nexport function getNonceSize(): number {\n return 80;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getScalarEnumDecoder,\n getScalarEnumEncoder,\n getU32Decoder,\n getU32Encoder,\n} from '@solana/codecs';\n\nexport enum NonceState {\n Uninitialized,\n Initialized,\n}\n\nexport type NonceStateArgs = NonceState;\n\nexport function getNonceStateEncoder(): Encoder<NonceStateArgs> {\n return getScalarEnumEncoder(NonceState, { size: getU32Encoder() });\n}\n\nexport function getNonceStateDecoder(): Decoder<NonceState> {\n return getScalarEnumDecoder(NonceState, { size: getU32Decoder() });\n}\n\nexport function getNonceStateCodec(): Codec<NonceStateArgs, NonceState> {\n return combineCodec(getNonceStateEncoder(), getNonceStateDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getScalarEnumDecoder,\n getScalarEnumEncoder,\n getU32Decoder,\n getU32Encoder,\n} from '@solana/codecs';\n\nexport enum NonceVersion {\n Legacy,\n Current,\n}\n\nexport type NonceVersionArgs = NonceVersion;\n\nexport function getNonceVersionEncoder(): Encoder<NonceVersionArgs> {\n return getScalarEnumEncoder(NonceVersion, { size: getU32Encoder() });\n}\n\nexport function getNonceVersionDecoder(): Decoder<NonceVersion> {\n return getScalarEnumDecoder(NonceVersion, { size: getU32Decoder() });\n}\n\nexport function getNonceVersionCodec(): Codec<NonceVersionArgs, NonceVersion> {\n return combineCodec(getNonceVersionEncoder(), getNonceVersionDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nexport const enum SystemProgramErrorCode {\n /** AccountAlreadyInUse: an account with the same address already exists */\n ACCOUNT_ALREADY_IN_USE = 0x0, // 0\n /** ResultWithNegativeLamports: account does not have enough SOL to perform the operation */\n RESULT_WITH_NEGATIVE_LAMPORTS = 0x1, // 1\n /** InvalidProgramId: cannot assign account to this program id */\n INVALID_PROGRAM_ID = 0x2, // 2\n /** InvalidAccountDataLength: cannot allocate account data of this length */\n INVALID_ACCOUNT_DATA_LENGTH = 0x3, // 3\n /** MaxSeedLengthExceeded: length of requested seed is too long */\n MAX_SEED_LENGTH_EXCEEDED = 0x4, // 4\n /** AddressWithSeedMismatch: provided address does not match addressed derived from seed */\n ADDRESS_WITH_SEED_MISMATCH = 0x5, // 5\n /** NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar */\n NONCE_NO_RECENT_BLOCKHASHES = 0x6, // 6\n /** NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes */\n NONCE_BLOCKHASH_NOT_EXPIRED = 0x7, // 7\n /** NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce */\n NONCE_UNEXPECTED_BLOCKHASH_VALUE = 0x8, // 8\n}\n\nexport class SystemProgramError extends Error {\n override readonly name = 'SystemProgramError';\n\n readonly code: SystemProgramErrorCode;\n\n readonly cause: Error | undefined;\n\n constructor(\n code: SystemProgramErrorCode,\n name: string,\n message: string,\n cause?: Error\n ) {\n super(`${name} (${code}): ${message}`);\n this.code = code;\n this.cause = cause;\n }\n}\n\nlet systemProgramErrorCodeMap:\n | Record<SystemProgramErrorCode, [string, string]>\n | undefined;\nif (__DEV__) {\n systemProgramErrorCodeMap = {\n [SystemProgramErrorCode.ACCOUNT_ALREADY_IN_USE]: [\n 'AccountAlreadyInUse',\n `an account with the same address already exists`,\n ],\n [SystemProgramErrorCode.RESULT_WITH_NEGATIVE_LAMPORTS]: [\n 'ResultWithNegativeLamports',\n `account does not have enough SOL to perform the operation`,\n ],\n [SystemProgramErrorCode.INVALID_PROGRAM_ID]: [\n 'InvalidProgramId',\n `cannot assign account to this program id`,\n ],\n [SystemProgramErrorCode.INVALID_ACCOUNT_DATA_LENGTH]: [\n 'InvalidAccountDataLength',\n `cannot allocate account data of this length`,\n ],\n [SystemProgramErrorCode.MAX_SEED_LENGTH_EXCEEDED]: [\n 'MaxSeedLengthExceeded',\n `length of requested seed is too long`,\n ],\n [SystemProgramErrorCode.ADDRESS_WITH_SEED_MISMATCH]: [\n 'AddressWithSeedMismatch',\n `provided address does not match addressed derived from seed`,\n ],\n [SystemProgramErrorCode.NONCE_NO_RECENT_BLOCKHASHES]: [\n 'NonceNoRecentBlockhashes',\n `advancing stored nonce requires a populated RecentBlockhashes sysvar`,\n ],\n [SystemProgramErrorCode.NONCE_BLOCKHASH_NOT_EXPIRED]: [\n 'NonceBlockhashNotExpired',\n `stored nonce is still in recent_blockhashes`,\n ],\n [SystemProgramErrorCode.NONCE_UNEXPECTED_BLOCKHASH_VALUE]: [\n 'NonceUnexpectedBlockhashValue',\n `specified nonce does not match stored nonce`,\n ],\n };\n}\n\nexport function getSystemProgramErrorFromCode(\n code: SystemProgramErrorCode,\n cause?: Error\n): SystemProgramError {\n if (__DEV__) {\n return new SystemProgramError(\n code,\n ...(\n systemProgramErrorCodeMap as Record<\n SystemProgramErrorCode,\n [string, string]\n >\n )[code],\n cause\n );\n }\n\n return new SystemProgramError(\n code,\n 'Unknown',\n 'Error message not available in production bundles. Compile with __DEV__ set to true to see more information.',\n cause\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AdvanceNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AdvanceNonceAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AdvanceNonceAccountInstructionData = { discriminator: number };\n\nexport type AdvanceNonceAccountInstructionDataArgs = {};\n\nexport function getAdvanceNonceAccountInstructionDataEncoder(): Encoder<AdvanceNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([['discriminator', getU32Encoder()]]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getAdvanceNonceAccountInstructionDataDecoder(): Decoder<AdvanceNonceAccountInstructionData> {\n return getStructDecoder([['discriminator', getU32Decoder()]]);\n}\n\nexport function getAdvanceNonceAccountInstructionDataCodec(): Codec<\n AdvanceNonceAccountInstructionDataArgs,\n AdvanceNonceAccountInstructionData\n> {\n return combineCodec(\n getAdvanceNonceAccountInstructionDataEncoder(),\n getAdvanceNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type AdvanceNonceAccountInput<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n nonceAuthority: Address<TAccountNonceAuthority>;\n};\n\nexport type AdvanceNonceAccountInputWithSigners<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n};\n\nexport function getAdvanceNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AdvanceNonceAccountInputWithSigners<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >\n): AdvanceNonceAccountInstructionWithSigners<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n>;\nexport function getAdvanceNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AdvanceNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >\n): AdvanceNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n>;\nexport function getAdvanceNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AdvanceNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAdvanceNonceAccountInstructionRaw<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAdvanceNonceAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAdvanceNonceAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n nonceAccount: TAccountNonceAccount extends string\n ? Address<TAccountNonceAccount>\n : TAccountNonceAccount;\n recentBlockhashesSysvar?: TAccountRecentBlockhashesSysvar extends string\n ? Address<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar;\n nonceAuthority: TAccountNonceAuthority extends string\n ? Address<TAccountNonceAuthority>\n : TAccountNonceAuthority;\n },\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(\n accounts.recentBlockhashesSysvar ??\n ('SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>),\n AccountRole.READONLY\n ),\n accountMetaWithDefault(\n accounts.nonceAuthority,\n AccountRole.READONLY_SIGNER\n ),\n ...(remainingAccounts ?? []),\n ],\n data: getAdvanceNonceAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as AdvanceNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedAdvanceNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recentBlockhashesSysvar: TAccountMetas[1];\n nonceAuthority: TAccountMetas[2];\n };\n data: AdvanceNonceAccountInstructionData;\n};\n\nexport function parseAdvanceNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAdvanceNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getAdvanceNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n isProgramDerivedAddress,\n ProgramDerivedAddress,\n} from '@solana/addresses';\nimport {\n AccountRole,\n IAccountMeta,\n upgradeRoleToSigner,\n} from '@solana/instructions';\nimport {\n IAccountSignerMeta,\n isTransactionSigner as web3JsIsTransactionSigner,\n TransactionSigner,\n} from '@solana/signers';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome<T>(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): Address<T> {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address<T>;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): ProgramDerivedAddress<T> {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): TransactionSigner<T> {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null = Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Add an account meta with a default role if only an address is provided.\n * @internal\n */\nexport function accountMetaWithDefault<\n TAccount extends string | IAccountMeta<string>,\n TRole extends AccountRole\n>(account: TAccount | undefined, role: TRole) {\n if (account === undefined) return undefined;\n return (\n typeof account === 'string' ? { address: account, role } : account\n ) as TAccount extends string\n ? { address: Address<TAccount>; role: TRole }\n : TAccount;\n}\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetasWithSigners<TKey extends string = string>(\n accounts: Record<TKey, ResolvedAccount>,\n optionalAccountStrategy: 'omitted' | 'programId',\n programAddress: Address\n): Record<TKey, IAccountMeta | IAccountSignerMeta> {\n const accountMetas: Record<string, IAccountMeta | IAccountSignerMeta> = {};\n\n Object.keys(accounts).forEach((key) => {\n const account = accounts[key as TKey] as ResolvedAccount;\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n accountMetas[key] = {\n address: programAddress,\n role: AccountRole.READONLY,\n };\n return;\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n accountMetas[key] = Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n });\n\n return accountMetas;\n}\n\nexport function isTransactionSigner<TAddress extends string = string>(\n value:\n | Address<TAddress>\n | ProgramDerivedAddress<TAddress>\n | TransactionSigner<TAddress>\n): value is TransactionSigner<TAddress> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n\nexport function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number) {\n const slice = data.slice(offset, offset + bytes.length);\n if (slice.length !== bytes.length) return false;\n return bytes.every((b, i) => b === slice[i]);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AllocateInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AllocateInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount> &\n IAccountSignerMeta<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AllocateInstructionData = { discriminator: number; space: bigint };\n\nexport type AllocateInstructionDataArgs = { space: number | bigint };\n\nexport function getAllocateInstructionDataEncoder(): Encoder<AllocateInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['space', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 8 })\n );\n}\n\nexport function getAllocateInstructionDataDecoder(): Decoder<AllocateInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['space', getU64Decoder()],\n ]);\n}\n\nexport function getAllocateInstructionDataCodec(): Codec<\n AllocateInstructionDataArgs,\n AllocateInstructionData\n> {\n return combineCodec(\n getAllocateInstructionDataEncoder(),\n getAllocateInstructionDataDecoder()\n );\n}\n\nexport type AllocateInput<TAccountNewAccount extends string> = {\n newAccount: Address<TAccountNewAccount>;\n space: AllocateInstructionDataArgs['space'];\n};\n\nexport type AllocateInputWithSigners<TAccountNewAccount extends string> = {\n newAccount: TransactionSigner<TAccountNewAccount>;\n space: AllocateInstructionDataArgs['space'];\n};\n\nexport function getAllocateInstruction<\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AllocateInputWithSigners<TAccountNewAccount>\n): AllocateInstructionWithSigners<TProgram, TAccountNewAccount>;\nexport function getAllocateInstruction<\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AllocateInput<TAccountNewAccount>\n): AllocateInstruction<TProgram, TAccountNewAccount>;\nexport function getAllocateInstruction<\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(input: AllocateInput<TAccountNewAccount>): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAllocateInstructionRaw<TProgram, TAccountNewAccount>\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAllocateInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as AllocateInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAllocateInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n newAccount: TAccountNewAccount extends string\n ? Address<TAccountNewAccount>\n : TAccountNewAccount;\n },\n args: AllocateInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getAllocateInstructionDataEncoder().encode(args),\n programAddress,\n } as AllocateInstruction<TProgram, TAccountNewAccount, TRemainingAccounts>;\n}\n\nexport type ParsedAllocateInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n newAccount: TAccountMetas[0];\n };\n data: AllocateInstructionData;\n};\n\nexport function parseAllocateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAllocateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n newAccount: getNextAccount(),\n },\n data: getAllocateInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AllocateWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AllocateWithSeedInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AllocateWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n space: bigint;\n programAddress: Address;\n};\n\nexport type AllocateWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getAllocateWithSeedInstructionDataEncoder(): Encoder<AllocateWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 9 })\n );\n}\n\nexport function getAllocateWithSeedInstructionDataDecoder(): Decoder<AllocateWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAllocateWithSeedInstructionDataCodec(): Codec<\n AllocateWithSeedInstructionDataArgs,\n AllocateWithSeedInstructionData\n> {\n return combineCodec(\n getAllocateWithSeedInstructionDataEncoder(),\n getAllocateWithSeedInstructionDataDecoder()\n );\n}\n\nexport type AllocateWithSeedInput<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string\n> = {\n newAccount: Address<TAccountNewAccount>;\n baseAccount: Address<TAccountBaseAccount>;\n base: AllocateWithSeedInstructionDataArgs['base'];\n seed: AllocateWithSeedInstructionDataArgs['seed'];\n space: AllocateWithSeedInstructionDataArgs['space'];\n programAddress: AllocateWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport type AllocateWithSeedInputWithSigners<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string\n> = {\n newAccount: Address<TAccountNewAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: AllocateWithSeedInstructionDataArgs['base'];\n seed: AllocateWithSeedInstructionDataArgs['seed'];\n space: AllocateWithSeedInstructionDataArgs['space'];\n programAddress: AllocateWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getAllocateWithSeedInstruction<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AllocateWithSeedInputWithSigners<\n TAccountNewAccount,\n TAccountBaseAccount\n >\n): AllocateWithSeedInstructionWithSigners<\n TProgram,\n TAccountNewAccount,\n TAccountBaseAccount\n>;\nexport function getAllocateWithSeedInstruction<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AllocateWithSeedInput<TAccountNewAccount, TAccountBaseAccount>\n): AllocateWithSeedInstruction<\n TProgram,\n TAccountNewAccount,\n TAccountBaseAccount\n>;\nexport function getAllocateWithSeedInstruction<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AllocateWithSeedInput<TAccountNewAccount, TAccountBaseAccount>\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAllocateWithSeedInstructionRaw<\n TProgram,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAllocateWithSeedInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as AllocateWithSeedInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAllocateWithSeedInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n newAccount: TAccountNewAccount extends string\n ? Address<TAccountNewAccount>\n : TAccountNewAccount;\n baseAccount: TAccountBaseAccount extends string\n ? Address<TAccountBaseAccount>\n : TAccountBaseAccount;\n },\n args: AllocateWithSeedInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getAllocateWithSeedInstructionDataEncoder().encode(args),\n programAddress,\n } as AllocateWithSeedInstruction<\n TProgram,\n TAccountNewAccount,\n TAccountBaseAccount,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedAllocateWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n newAccount: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n };\n data: AllocateWithSeedInstructionData;\n};\n\nexport function parseAllocateWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAllocateWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n newAccount: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getAllocateWithSeedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AssignInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableSignerAccount<TAccountAccount>\n : TAccountAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AssignInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableSignerAccount<TAccountAccount> &\n IAccountSignerMeta<TAccountAccount>\n : TAccountAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AssignInstructionData = {\n discriminator: number;\n programAddress: Address;\n};\n\nexport type AssignInstructionDataArgs = { programAddress: Address };\n\nexport function getAssignInstructionDataEncoder(): Encoder<AssignInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getAssignInstructionDataDecoder(): Decoder<AssignInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAssignInstructionDataCodec(): Codec<\n AssignInstructionDataArgs,\n AssignInstructionData\n> {\n return combineCodec(\n getAssignInstructionDataEncoder(),\n getAssignInstructionDataDecoder()\n );\n}\n\nexport type AssignInput<TAccountAccount extends string> = {\n account: Address<TAccountAccount>;\n programAddress: AssignInstructionDataArgs['programAddress'];\n};\n\nexport type AssignInputWithSigners<TAccountAccount extends string> = {\n account: TransactionSigner<TAccountAccount>;\n programAddress: AssignInstructionDataArgs['programAddress'];\n};\n\nexport function getAssignInstruction<\n TAccountAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AssignInputWithSigners<TAccountAccount>\n): AssignInstructionWithSigners<TProgram, TAccountAccount>;\nexport function getAssignInstruction<\n TAccountAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AssignInput<TAccountAccount>\n): AssignInstruction<TProgram, TAccountAccount>;\nexport function getAssignInstruction<\n TAccountAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(input: AssignInput<TAccountAccount>): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAssignInstructionRaw<TProgram, TAccountAccount>\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n account: { value: input.account ?? null, isWritable: true },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAssignInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as AssignInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAssignInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n account: TAccountAccount extends string\n ? Address<TAccountAccount>\n : TAccountAccount;\n },\n args: AssignInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.account, AccountRole.WRITABLE_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getAssignInstructionDataEncoder().encode(args),\n programAddress,\n } as AssignInstruction<TProgram, TAccountAccount, TRemainingAccounts>;\n}\n\nexport type ParsedAssignInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n account: TAccountMetas[0];\n };\n data: AssignInstructionData;\n};\n\nexport function parseAssignInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAssignInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n },\n data: getAssignInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AssignWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount<TAccountAccount>\n : TAccountAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AssignWithSeedInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount<TAccountAccount>\n : TAccountAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AssignWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n programAddress: Address;\n};\n\nexport type AssignWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n programAddress: Address;\n};\n\nexport function getAssignWithSeedInstructionDataEncoder(): Encoder<AssignWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 10 })\n );\n}\n\nexport function getAssignWithSeedInstructionDataDecoder(): Decoder<AssignWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAssignWithSeedInstructionDataCodec(): Codec<\n AssignWithSeedInstructionDataArgs,\n AssignWithSeedInstructionData\n> {\n return combineCodec(\n getAssignWithSeedInstructionDataEncoder(),\n getAssignWithSeedInstructionDataDecoder()\n );\n}\n\nexport type AssignWithSeedInput<\n TAccountAccount extends string,\n TAccountBaseAccount extends string\n> = {\n account: Address<TAccountAccount>;\n baseAccount: Address<TAccountBaseAccount>;\n base: AssignWithSeedInstructionDataArgs['base'];\n seed: AssignWithSeedInstructionDataArgs['seed'];\n programAddress: AssignWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport type AssignWithSeedInputWithSigners<\n TAccountAccount extends string,\n TAccountBaseAccount extends string\n> = {\n account: Address<TAccountAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: AssignWithSeedInstructionDataArgs['base'];\n seed: AssignWithSeedInstructionDataArgs['seed'];\n programAddress: AssignWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getAssignWithSeedInstruction<\n TAccountAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AssignWithSeedInputWithSigners<TAccountAccount, TAccountBaseAccount>\n): AssignWithSeedInstructionWithSigners<\n TProgram,\n TAccountAccount,\n TAccountBaseAccount\n>;\nexport function getAssignWithSeedInstruction<\n TAccountAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AssignWithSeedInput<TAccountAccount, TAccountBaseAccount>\n): AssignWithSeedInstruction<TProgram, TAccountAccount, TAccountBaseAccount>;\nexport function getAssignWithSeedInstruction<\n TAccountAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AssignWithSeedInput<TAccountAccount, TAccountBaseAccount>\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAssignWithSeedInstructionRaw<\n TProgram,\n TAccountAccount,\n TAccountBaseAccount\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n account: { value: input.account ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAssignWithSeedInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as AssignWithSeedInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAssignWithSeedInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n account: TAccountAccount extends string\n ? Address<TAccountAccount>\n : TAccountAccount;\n baseAccount: TAccountBaseAccount extends string\n ? Address<TAccountBaseAccount>\n : TAccountBaseAccount;\n },\n args: AssignWithSeedInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.account, AccountRole.WRITABLE),\n accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getAssignWithSeedInstructionDataEncoder().encode(args),\n programAddress,\n } as AssignWithSeedInstruction<\n TProgram,\n TAccountAccount,\n TAccountBaseAccount,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedAssignWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n account: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n };\n data: AssignWithSeedInstructionData;\n};\n\nexport function parseAssignWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAssignWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getAssignWithSeedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type AuthorizeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AuthorizeNonceAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type AuthorizeNonceAccountInstructionData = {\n discriminator: number;\n newNonceAuthority: Address;\n};\n\nexport type AuthorizeNonceAccountInstructionDataArgs = {\n newNonceAuthority: Address;\n};\n\nexport function getAuthorizeNonceAccountInstructionDataEncoder(): Encoder<AuthorizeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['newNonceAuthority', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 7 })\n );\n}\n\nexport function getAuthorizeNonceAccountInstructionDataDecoder(): Decoder<AuthorizeNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['newNonceAuthority', getAddressDecoder()],\n ]);\n}\n\nexport function getAuthorizeNonceAccountInstructionDataCodec(): Codec<\n AuthorizeNonceAccountInstructionDataArgs,\n AuthorizeNonceAccountInstructionData\n> {\n return combineCodec(\n getAuthorizeNonceAccountInstructionDataEncoder(),\n getAuthorizeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type AuthorizeNonceAccountInput<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n nonceAuthority: Address<TAccountNonceAuthority>;\n newNonceAuthority: AuthorizeNonceAccountInstructionDataArgs['newNonceAuthority'];\n};\n\nexport type AuthorizeNonceAccountInputWithSigners<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n newNonceAuthority: AuthorizeNonceAccountInstructionDataArgs['newNonceAuthority'];\n};\n\nexport function getAuthorizeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AuthorizeNonceAccountInputWithSigners<\n TAccountNonceAccount,\n TAccountNonceAuthority\n >\n): AuthorizeNonceAccountInstructionWithSigners<\n TProgram,\n TAccountNonceAccount,\n TAccountNonceAuthority\n>;\nexport function getAuthorizeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AuthorizeNonceAccountInput<\n TAccountNonceAccount,\n TAccountNonceAuthority\n >\n): AuthorizeNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountNonceAuthority\n>;\nexport function getAuthorizeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: AuthorizeNonceAccountInput<\n TAccountNonceAccount,\n TAccountNonceAuthority\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getAuthorizeNonceAccountInstructionRaw<\n TProgram,\n TAccountNonceAccount,\n TAccountNonceAuthority\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getAuthorizeNonceAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as AuthorizeNonceAccountInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getAuthorizeNonceAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n nonceAccount: TAccountNonceAccount extends string\n ? Address<TAccountNonceAccount>\n : TAccountNonceAccount;\n nonceAuthority: TAccountNonceAuthority extends string\n ? Address<TAccountNonceAuthority>\n : TAccountNonceAuthority;\n },\n args: AuthorizeNonceAccountInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(\n accounts.nonceAuthority,\n AccountRole.READONLY_SIGNER\n ),\n ...(remainingAccounts ?? []),\n ],\n data: getAuthorizeNonceAccountInstructionDataEncoder().encode(args),\n programAddress,\n } as AuthorizeNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountNonceAuthority,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedAuthorizeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n nonceAuthority: TAccountMetas[1];\n };\n data: AuthorizeNonceAccountInstructionData;\n};\n\nexport function parseAuthorizeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAuthorizeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getAuthorizeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { BASE_ACCOUNT_SIZE } from '@solana/accounts';\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n IInstructionWithByteDelta,\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type CreateAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type CreateAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n IAccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount> &\n IAccountSignerMeta<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type CreateAccountInstructionData = {\n discriminator: number;\n lamports: bigint;\n space: bigint;\n programAddress: Address;\n};\n\nexport type CreateAccountInstructionDataArgs = {\n lamports: number | bigint;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getCreateAccountInstructionDataEncoder(): Encoder<CreateAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['lamports', getU64Encoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getCreateAccountInstructionDataDecoder(): Decoder<CreateAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['lamports', getU64Decoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getCreateAccountInstructionDataCodec(): Codec<\n CreateAccountInstructionDataArgs,\n CreateAccountInstructionData\n> {\n return combineCodec(\n getCreateAccountInstructionDataEncoder(),\n getCreateAccountInstructionDataDecoder()\n );\n}\n\nexport type CreateAccountInput<\n TAccountPayer extends string,\n TAccountNewAccount extends string\n> = {\n payer: Address<TAccountPayer>;\n newAccount: Address<TAccountNewAccount>;\n lamports: CreateAccountInstructionDataArgs['lamports'];\n space: CreateAccountInstructionDataArgs['space'];\n programAddress: CreateAccountInstructionDataArgs['programAddress'];\n};\n\nexport type CreateAccountInputWithSigners<\n TAccountPayer extends string,\n TAccountNewAccount extends string\n> = {\n payer: TransactionSigner<TAccountPayer>;\n newAccount: TransactionSigner<TAccountNewAccount>;\n lamports: CreateAccountInstructionDataArgs['lamports'];\n space: CreateAccountInstructionDataArgs['space'];\n programAddress: CreateAccountInstructionDataArgs['programAddress'];\n};\n\nexport function getCreateAccountInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountInputWithSigners<TAccountPayer, TAccountNewAccount>\n): CreateAccountInstructionWithSigners<\n TProgram,\n TAccountPayer,\n TAccountNewAccount\n> &\n IInstructionWithByteDelta;\nexport function getCreateAccountInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountInput<TAccountPayer, TAccountNewAccount>\n): CreateAccountInstruction<TProgram, TAccountPayer, TAccountNewAccount> &\n IInstructionWithByteDelta;\nexport function getCreateAccountInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountInput<TAccountPayer, TAccountNewAccount>\n): IInstruction & IInstructionWithByteDelta {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getCreateAccountInstructionRaw<\n TProgram,\n TAccountPayer,\n TAccountNewAccount\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n payer: { value: input.payer ?? null, isWritable: true },\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n };\n\n // Original args.\n const args = { ...input };\n\n // Bytes created or reallocated by the instruction.\n const byteDelta: number = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce(\n (a, b) => a + b,\n 0\n );\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getCreateAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as CreateAccountInstructionDataArgs,\n programAddress\n );\n\n return Object.freeze({ ...instruction, byteDelta });\n}\n\nexport function getCreateAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n payer: TAccountPayer extends string\n ? Address<TAccountPayer>\n : TAccountPayer;\n newAccount: TAccountNewAccount extends string\n ? Address<TAccountNewAccount>\n : TAccountNewAccount;\n },\n args: CreateAccountInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),\n accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getCreateAccountInstructionDataEncoder().encode(args),\n programAddress,\n } as CreateAccountInstruction<\n TProgram,\n TAccountPayer,\n TAccountNewAccount,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedCreateAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n newAccount: TAccountMetas[1];\n };\n data: CreateAccountInstructionData;\n};\n\nexport function parseCreateAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedCreateAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n newAccount: getNextAccount(),\n },\n data: getCreateAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type CreateAccountWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type CreateAccountWithSeedInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n IAccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type CreateAccountWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n amount: bigint;\n space: bigint;\n programAddress: Address;\n};\n\nexport type CreateAccountWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n amount: number | bigint;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getCreateAccountWithSeedInstructionDataEncoder(): Encoder<CreateAccountWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['amount', getU64Encoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getCreateAccountWithSeedInstructionDataDecoder(): Decoder<CreateAccountWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['amount', getU64Decoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getCreateAccountWithSeedInstructionDataCodec(): Codec<\n CreateAccountWithSeedInstructionDataArgs,\n CreateAccountWithSeedInstructionData\n> {\n return combineCodec(\n getCreateAccountWithSeedInstructionDataEncoder(),\n getCreateAccountWithSeedInstructionDataDecoder()\n );\n}\n\nexport type CreateAccountWithSeedInput<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string\n> = {\n payer: Address<TAccountPayer>;\n newAccount: Address<TAccountNewAccount>;\n baseAccount: Address<TAccountBaseAccount>;\n base: CreateAccountWithSeedInstructionDataArgs['base'];\n seed: CreateAccountWithSeedInstructionDataArgs['seed'];\n amount: CreateAccountWithSeedInstructionDataArgs['amount'];\n space: CreateAccountWithSeedInstructionDataArgs['space'];\n programAddress: CreateAccountWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport type CreateAccountWithSeedInputWithSigners<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string\n> = {\n payer: TransactionSigner<TAccountPayer>;\n newAccount: Address<TAccountNewAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: CreateAccountWithSeedInstructionDataArgs['base'];\n seed: CreateAccountWithSeedInstructionDataArgs['seed'];\n amount: CreateAccountWithSeedInstructionDataArgs['amount'];\n space: CreateAccountWithSeedInstructionDataArgs['space'];\n programAddress: CreateAccountWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getCreateAccountWithSeedInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountWithSeedInputWithSigners<\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n): CreateAccountWithSeedInstructionWithSigners<\n TProgram,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n>;\nexport function getCreateAccountWithSeedInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountWithSeedInput<\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n): CreateAccountWithSeedInstruction<\n TProgram,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n>;\nexport function getCreateAccountWithSeedInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: CreateAccountWithSeedInput<\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getCreateAccountWithSeedInstructionRaw<\n TProgram,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n payer: { value: input.payer ?? null, isWritable: true },\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getCreateAccountWithSeedInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as CreateAccountWithSeedInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getCreateAccountWithSeedInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n payer: TAccountPayer extends string\n ? Address<TAccountPayer>\n : TAccountPayer;\n newAccount: TAccountNewAccount extends string\n ? Address<TAccountNewAccount>\n : TAccountNewAccount;\n baseAccount: TAccountBaseAccount extends string\n ? Address<TAccountBaseAccount>\n : TAccountBaseAccount;\n },\n args: CreateAccountWithSeedInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),\n accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),\n ...(remainingAccounts ?? []),\n ],\n data: getCreateAccountWithSeedInstructionDataEncoder().encode(args),\n programAddress,\n } as CreateAccountWithSeedInstruction<\n TProgram,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedCreateAccountWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n newAccount: TAccountMetas[1];\n baseAccount: TAccountMetas[2];\n };\n data: CreateAccountWithSeedInstructionData;\n};\n\nexport function parseCreateAccountWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedCreateAccountWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n newAccount: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getCreateAccountWithSeedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type InitializeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n ...TRemainingAccounts\n ]\n >;\n\nexport type InitializeNonceAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n ...TRemainingAccounts\n ]\n >;\n\nexport type InitializeNonceAccountInstructionData = {\n discriminator: number;\n nonceAuthority: Address;\n};\n\nexport type InitializeNonceAccountInstructionDataArgs = {\n nonceAuthority: Address;\n};\n\nexport function getInitializeNonceAccountInstructionDataEncoder(): Encoder<InitializeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['nonceAuthority', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 6 })\n );\n}\n\nexport function getInitializeNonceAccountInstructionDataDecoder(): Decoder<InitializeNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['nonceAuthority', getAddressDecoder()],\n ]);\n}\n\nexport function getInitializeNonceAccountInstructionDataCodec(): Codec<\n InitializeNonceAccountInstructionDataArgs,\n InitializeNonceAccountInstructionData\n> {\n return combineCodec(\n getInitializeNonceAccountInstructionDataEncoder(),\n getInitializeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type InitializeNonceAccountInput<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: InitializeNonceAccountInstructionDataArgs['nonceAuthority'];\n};\n\nexport type InitializeNonceAccountInputWithSigners<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: InitializeNonceAccountInstructionDataArgs['nonceAuthority'];\n};\n\nexport function getInitializeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: InitializeNonceAccountInputWithSigners<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >\n): InitializeNonceAccountInstructionWithSigners<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n>;\nexport function getInitializeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: InitializeNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >\n): InitializeNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n>;\nexport function getInitializeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: InitializeNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getInitializeNonceAccountInstructionRaw<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n if (!accounts.rentSysvar.value) {\n accounts.rentSysvar.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getInitializeNonceAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as InitializeNonceAccountInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getInitializeNonceAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n nonceAccount: TAccountNonceAccount extends string\n ? Address<TAccountNonceAccount>\n : TAccountNonceAccount;\n recentBlockhashesSysvar?: TAccountRecentBlockhashesSysvar extends string\n ? Address<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar;\n rentSysvar?: TAccountRentSysvar extends string\n ? Address<TAccountRentSysvar>\n : TAccountRentSysvar;\n },\n args: InitializeNonceAccountInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(\n accounts.recentBlockhashesSysvar ??\n ('SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>),\n AccountRole.READONLY\n ),\n accountMetaWithDefault(\n accounts.rentSysvar ??\n ('SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>),\n AccountRole.READONLY\n ),\n ...(remainingAccounts ?? []),\n ],\n data: getInitializeNonceAccountInstructionDataEncoder().encode(args),\n programAddress,\n } as InitializeNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedInitializeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recentBlockhashesSysvar: TAccountMetas[1];\n rentSysvar: TAccountMetas[2];\n };\n data: InitializeNonceAccountInstructionData;\n};\n\nexport function parseInitializeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedInitializeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n rentSysvar: getNextAccount(),\n },\n data: getInitializeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableAccount,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type TransferSolInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableSignerAccount<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts\n ]\n >;\n\nexport type TransferSolInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableSignerAccount<TAccountSource> &\n IAccountSignerMeta<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts\n ]\n >;\n\nexport type TransferSolInstructionData = {\n discriminator: number;\n amount: bigint;\n};\n\nexport type TransferSolInstructionDataArgs = { amount: number | bigint };\n\nexport function getTransferSolInstructionDataEncoder(): Encoder<TransferSolInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getTransferSolInstructionDataDecoder(): Decoder<TransferSolInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getTransferSolInstructionDataCodec(): Codec<\n TransferSolInstructionDataArgs,\n TransferSolInstructionData\n> {\n return combineCodec(\n getTransferSolInstructionDataEncoder(),\n getTransferSolInstructionDataDecoder()\n );\n}\n\nexport type TransferSolInput<\n TAccountSource extends string,\n TAccountDestination extends string\n> = {\n source: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n amount: TransferSolInstructionDataArgs['amount'];\n};\n\nexport type TransferSolInputWithSigners<\n TAccountSource extends string,\n TAccountDestination extends string\n> = {\n source: TransactionSigner<TAccountSource>;\n destination: Address<TAccountDestination>;\n amount: TransferSolInstructionDataArgs['amount'];\n};\n\nexport function getTransferSolInstruction<\n TAccountSource extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: TransferSolInputWithSigners<TAccountSource, TAccountDestination>\n): TransferSolInstructionWithSigners<\n TProgram,\n TAccountSource,\n TAccountDestination\n>;\nexport function getTransferSolInstruction<\n TAccountSource extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: TransferSolInput<TAccountSource, TAccountDestination>\n): TransferSolInstruction<TProgram, TAccountSource, TAccountDestination>;\nexport function getTransferSolInstruction<\n TAccountSource extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(input: TransferSolInput<TAccountSource, TAccountDestination>): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getTransferSolInstructionRaw<\n TProgram,\n TAccountSource,\n TAccountDestination\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? null, isWritable: true },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getTransferSolInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as TransferSolInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getTransferSolInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n source: TAccountSource extends string\n ? Address<TAccountSource>\n : TAccountSource;\n destination: TAccountDestination extends string\n ? Address<TAccountDestination>\n : TAccountDestination;\n },\n args: TransferSolInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.source, AccountRole.WRITABLE_SIGNER),\n accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),\n ...(remainingAccounts ?? []),\n ],\n data: getTransferSolInstructionDataEncoder().encode(args),\n programAddress,\n } as TransferSolInstruction<\n TProgram,\n TAccountSource,\n TAccountDestination,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedTransferSolInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n source: TAccountMetas[0];\n destination: TAccountMetas[1];\n };\n data: TransferSolInstructionData;\n};\n\nexport function parseTransferSolInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedTransferSolInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n destination: getNextAccount(),\n },\n data: getTransferSolInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type TransferSolWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount>\n : TAccountBaseAccount,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts\n ]\n >;\n\nexport type TransferSolWithSeedInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts\n ]\n >;\n\nexport type TransferSolWithSeedInstructionData = {\n discriminator: number;\n amount: bigint;\n fromSeed: string;\n fromOwner: Address;\n};\n\nexport type TransferSolWithSeedInstructionDataArgs = {\n amount: number | bigint;\n fromSeed: string;\n fromOwner: Address;\n};\n\nexport function getTransferSolWithSeedInstructionDataEncoder(): Encoder<TransferSolWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['amount', getU64Encoder()],\n ['fromSeed', getStringEncoder()],\n ['fromOwner', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 11 })\n );\n}\n\nexport function getTransferSolWithSeedInstructionDataDecoder(): Decoder<TransferSolWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['amount', getU64Decoder()],\n ['fromSeed', getStringDecoder()],\n ['fromOwner', getAddressDecoder()],\n ]);\n}\n\nexport function getTransferSolWithSeedInstructionDataCodec(): Codec<\n TransferSolWithSeedInstructionDataArgs,\n TransferSolWithSeedInstructionData\n> {\n return combineCodec(\n getTransferSolWithSeedInstructionDataEncoder(),\n getTransferSolWithSeedInstructionDataDecoder()\n );\n}\n\nexport type TransferSolWithSeedInput<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string\n> = {\n source: Address<TAccountSource>;\n baseAccount: Address<TAccountBaseAccount>;\n destination: Address<TAccountDestination>;\n amount: TransferSolWithSeedInstructionDataArgs['amount'];\n fromSeed: TransferSolWithSeedInstructionDataArgs['fromSeed'];\n fromOwner: TransferSolWithSeedInstructionDataArgs['fromOwner'];\n};\n\nexport type TransferSolWithSeedInputWithSigners<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string\n> = {\n source: Address<TAccountSource>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n destination: Address<TAccountDestination>;\n amount: TransferSolWithSeedInstructionDataArgs['amount'];\n fromSeed: TransferSolWithSeedInstructionDataArgs['fromSeed'];\n fromOwner: TransferSolWithSeedInstructionDataArgs['fromOwner'];\n};\n\nexport function getTransferSolWithSeedInstruction<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: TransferSolWithSeedInputWithSigners<\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >\n): TransferSolWithSeedInstructionWithSigners<\n TProgram,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n>;\nexport function getTransferSolWithSeedInstruction<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: TransferSolWithSeedInput<\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >\n): TransferSolWithSeedInstruction<\n TProgram,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n>;\nexport function getTransferSolWithSeedInstruction<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: TransferSolWithSeedInput<\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getTransferSolWithSeedInstructionRaw<\n TProgram,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n source: { value: input.source ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n destination: { value: input.destination ?? null, isWritable: true },\n };\n\n // Original args.\n const args = { ...input };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getTransferSolWithSeedInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as TransferSolWithSeedInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getTransferSolWithSeedInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n source: TAccountSource extends string\n ? Address<TAccountSource>\n : TAccountSource;\n baseAccount: TAccountBaseAccount extends string\n ? Address<TAccountBaseAccount>\n : TAccountBaseAccount;\n destination: TAccountDestination extends string\n ? Address<TAccountDestination>\n : TAccountDestination;\n },\n args: TransferSolWithSeedInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.source, AccountRole.WRITABLE),\n accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),\n accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),\n ...(remainingAccounts ?? []),\n ],\n data: getTransferSolWithSeedInstructionDataEncoder().encode(args),\n programAddress,\n } as TransferSolWithSeedInstruction<\n TProgram,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedTransferSolWithSeedInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n source: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n destination: TAccountMetas[2];\n };\n data: TransferSolWithSeedInstructionData;\n};\n\nexport function parseTransferSolWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedTransferSolWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n baseAccount: getNextAccount(),\n destination: getNextAccount(),\n },\n data: getTransferSolWithSeedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableAccount,\n} from '@solana/instructions';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type UpgradeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type UpgradeNonceAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n ...TRemainingAccounts\n ]\n >;\n\nexport type UpgradeNonceAccountInstructionData = { discriminator: number };\n\nexport type UpgradeNonceAccountInstructionDataArgs = {};\n\nexport function getUpgradeNonceAccountInstructionDataEncoder(): Encoder<UpgradeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([['discriminator', getU32Encoder()]]),\n (value) => ({ ...value, discriminator: 12 })\n );\n}\n\nexport function getUpgradeNonceAccountInstructionDataDecoder(): Decoder<UpgradeNonceAccountInstructionData> {\n return getStructDecoder([['discriminator', getU32Decoder()]]);\n}\n\nexport function getUpgradeNonceAccountInstructionDataCodec(): Codec<\n UpgradeNonceAccountInstructionDataArgs,\n UpgradeNonceAccountInstructionData\n> {\n return combineCodec(\n getUpgradeNonceAccountInstructionDataEncoder(),\n getUpgradeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type UpgradeNonceAccountInput<TAccountNonceAccount extends string> = {\n nonceAccount: Address<TAccountNonceAccount>;\n};\n\nexport type UpgradeNonceAccountInputWithSigners<\n TAccountNonceAccount extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n};\n\nexport function getUpgradeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: UpgradeNonceAccountInputWithSigners<TAccountNonceAccount>\n): UpgradeNonceAccountInstructionWithSigners<TProgram, TAccountNonceAccount>;\nexport function getUpgradeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: UpgradeNonceAccountInput<TAccountNonceAccount>\n): UpgradeNonceAccountInstruction<TProgram, TAccountNonceAccount>;\nexport function getUpgradeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(input: UpgradeNonceAccountInput<TAccountNonceAccount>): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getUpgradeNonceAccountInstructionRaw<TProgram, TAccountNonceAccount>\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n };\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getUpgradeNonceAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getUpgradeNonceAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n nonceAccount: TAccountNonceAccount extends string\n ? Address<TAccountNonceAccount>\n : TAccountNonceAccount;\n },\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),\n ...(remainingAccounts ?? []),\n ],\n data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as UpgradeNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedUpgradeNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n };\n data: UpgradeNonceAccountInstructionData;\n};\n\nexport function parseUpgradeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedUpgradeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n },\n data: getUpgradeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n AccountRole,\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport {\n ResolvedAccount,\n accountMetaWithDefault,\n getAccountMetasWithSigners,\n} from '../shared';\n\nexport type WithdrawNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecipientAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecipientAccount extends string\n ? WritableAccount<TAccountRecipientAccount>\n : TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type WithdrawNonceAccountInstructionWithSigners<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecipientAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecipientAccount extends string\n ? WritableAccount<TAccountRecipientAccount>\n : TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts\n ]\n >;\n\nexport type WithdrawNonceAccountInstructionData = {\n discriminator: number;\n withdrawAmount: bigint;\n};\n\nexport type WithdrawNonceAccountInstructionDataArgs = {\n withdrawAmount: number | bigint;\n};\n\nexport function getWithdrawNonceAccountInstructionDataEncoder(): Encoder<WithdrawNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['withdrawAmount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 5 })\n );\n}\n\nexport function getWithdrawNonceAccountInstructionDataDecoder(): Decoder<WithdrawNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['withdrawAmount', getU64Decoder()],\n ]);\n}\n\nexport function getWithdrawNonceAccountInstructionDataCodec(): Codec<\n WithdrawNonceAccountInstructionDataArgs,\n WithdrawNonceAccountInstructionData\n> {\n return combineCodec(\n getWithdrawNonceAccountInstructionDataEncoder(),\n getWithdrawNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type WithdrawNonceAccountInput<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recipientAccount: Address<TAccountRecipientAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: Address<TAccountNonceAuthority>;\n withdrawAmount: WithdrawNonceAccountInstructionDataArgs['withdrawAmount'];\n};\n\nexport type WithdrawNonceAccountInputWithSigners<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recipientAccount: Address<TAccountRecipientAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n withdrawAmount: WithdrawNonceAccountInstructionDataArgs['withdrawAmount'];\n};\n\nexport function getWithdrawNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: WithdrawNonceAccountInputWithSigners<\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >\n): WithdrawNonceAccountInstructionWithSigners<\n TProgram,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n>;\nexport function getWithdrawNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: WithdrawNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >\n): WithdrawNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n>;\nexport function getWithdrawNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string,\n TProgram extends string = '11111111111111111111111111111111'\n>(\n input: WithdrawNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >\n): IInstruction {\n // Program address.\n const programAddress =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\n // Original accounts.\n type AccountMetas = Parameters<\n typeof getWithdrawNonceAccountInstructionRaw<\n TProgram,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >\n >[0];\n const accounts: Record<keyof AccountMetas, ResolvedAccount> = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recipientAccount: {\n value: input.recipientAccount ?? null,\n isWritable: true,\n },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n if (!accounts.rentSysvar.value) {\n accounts.rentSysvar.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n // Get account metas and signers.\n const accountMetas = getAccountMetasWithSigners(\n accounts,\n 'programId',\n programAddress\n );\n\n const instruction = getWithdrawNonceAccountInstructionRaw(\n accountMetas as Record<keyof AccountMetas, IAccountMeta>,\n args as WithdrawNonceAccountInstructionDataArgs,\n programAddress\n );\n\n return instruction;\n}\n\nexport function getWithdrawNonceAccountInstructionRaw<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecipientAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends Array<IAccountMeta<string>> = []\n>(\n accounts: {\n nonceAccount: TAccountNonceAccount extends string\n ? Address<TAccountNonceAccount>\n : TAccountNonceAccount;\n recipientAccount: TAccountRecipientAccount extends string\n ? Address<TAccountRecipientAccount>\n : TAccountRecipientAccount;\n recentBlockhashesSysvar?: TAccountRecentBlockhashesSysvar extends string\n ? Address<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar;\n rentSysvar?: TAccountRentSysvar extends string\n ? Address<TAccountRentSysvar>\n : TAccountRentSysvar;\n nonceAuthority: TAccountNonceAuthority extends string\n ? Address<TAccountNonceAuthority>\n : TAccountNonceAuthority;\n },\n args: WithdrawNonceAccountInstructionDataArgs,\n programAddress: Address<TProgram> = '11111111111111111111111111111111' as Address<TProgram>,\n remainingAccounts?: TRemainingAccounts\n) {\n return {\n accounts: [\n accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(accounts.recipientAccount, AccountRole.WRITABLE),\n accountMetaWithDefault(\n accounts.recentBlockhashesSysvar ??\n ('SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>),\n AccountRole.READONLY\n ),\n accountMetaWithDefault(\n accounts.rentSysvar ??\n ('SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>),\n AccountRole.READONLY\n ),\n accountMetaWithDefault(\n accounts.nonceAuthority,\n AccountRole.READONLY_SIGNER\n ),\n ...(remainingAccounts ?? []),\n ],\n data: getWithdrawNonceAccountInstructionDataEncoder().encode(args),\n programAddress,\n } as WithdrawNonceAccountInstruction<\n TProgram,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority,\n TRemainingAccounts\n >;\n}\n\nexport type ParsedWithdrawNonceAccountInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recipientAccount: TAccountMetas[1];\n recentBlockhashesSysvar: TAccountMetas[2];\n rentSysvar: TAccountMetas[3];\n nonceAuthority: TAccountMetas[4];\n };\n data: WithdrawNonceAccountInstructionData;\n};\n\nexport function parseWithdrawNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[]\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedWithdrawNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recipientAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n rentSysvar: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getWithdrawNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport { getU32Encoder } from '@solana/codecs';\nimport { Program, ProgramWithErrors } from '@solana/programs';\nimport {\n SystemProgramError,\n SystemProgramErrorCode,\n getSystemProgramErrorFromCode,\n} from '../errors';\nimport {\n ParsedAdvanceNonceAccountInstruction,\n ParsedAllocateInstruction,\n ParsedAllocateWithSeedInstruction,\n ParsedAssignInstruction,\n ParsedAssignWithSeedInstruction,\n ParsedAuthorizeNonceAccountInstruction,\n ParsedCreateAccountInstruction,\n ParsedCreateAccountWithSeedInstruction,\n ParsedInitializeNonceAccountInstruction,\n ParsedTransferSolInstruction,\n ParsedTransferSolWithSeedInstruction,\n ParsedUpgradeNonceAccountInstruction,\n ParsedWithdrawNonceAccountInstruction,\n} from '../instructions';\nimport { memcmp } from '../shared';\n\nexport const SYSTEM_PROGRAM_ADDRESS =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\nexport type SystemProgram = Program<'11111111111111111111111111111111'> &\n ProgramWithErrors<SystemProgramErrorCode, SystemProgramError>;\n\nexport function getSystemProgram(): SystemProgram {\n return {\n name: 'system',\n address: SYSTEM_PROGRAM_ADDRESS,\n getErrorFromCode(code: SystemProgramErrorCode, cause?: Error) {\n return getSystemProgramErrorFromCode(code, cause);\n },\n };\n}\n\nexport enum SystemAccount {\n Nonce,\n}\n\nexport enum SystemInstruction {\n CreateAccount,\n Assign,\n TransferSol,\n CreateAccountWithSeed,\n AdvanceNonceAccount,\n WithdrawNonceAccount,\n InitializeNonceAccount,\n AuthorizeNonceAccount,\n Allocate,\n AllocateWithSeed,\n AssignWithSeed,\n TransferSolWithSeed,\n UpgradeNonceAccount,\n}\n\nexport function identifySystemInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): SystemInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (memcmp(data, getU32Encoder().encode(0), 0)) {\n return SystemInstruction.CreateAccount;\n }\n if (memcmp(data, getU32Encoder().encode(1), 0)) {\n return SystemInstruction.Assign;\n }\n if (memcmp(data, getU32Encoder().encode(2), 0)) {\n return SystemInstruction.TransferSol;\n }\n if (memcmp(data, getU32Encoder().encode(3), 0)) {\n return SystemInstruction.CreateAccountWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(4), 0)) {\n return SystemInstruction.AdvanceNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(5), 0)) {\n return SystemInstruction.WithdrawNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(6), 0)) {\n return SystemInstruction.InitializeNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(7), 0)) {\n return SystemInstruction.AuthorizeNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(8), 0)) {\n return SystemInstruction.Allocate;\n }\n if (memcmp(data, getU32Encoder().encode(9), 0)) {\n return SystemInstruction.AllocateWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(10), 0)) {\n return SystemInstruction.AssignWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(11), 0)) {\n return SystemInstruction.TransferSolWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(12), 0)) {\n return SystemInstruction.UpgradeNonceAccount;\n }\n throw new Error(\n 'The provided instruction could not be identified as a system instruction.'\n );\n}\n\nexport type ParsedSystemInstruction<\n TProgram extends string = '11111111111111111111111111111111'\n> =\n | ({\n instructionType: SystemInstruction.CreateAccount;\n } & ParsedCreateAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.Assign;\n } & ParsedAssignInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.TransferSol;\n } & ParsedTransferSolInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.CreateAccountWithSeed;\n } & ParsedCreateAccountWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AdvanceNonceAccount;\n } & ParsedAdvanceNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.WithdrawNonceAccount;\n } & ParsedWithdrawNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.InitializeNonceAccount;\n } & ParsedInitializeNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AuthorizeNonceAccount;\n } & ParsedAuthorizeNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.Allocate;\n } & ParsedAllocateInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AllocateWithSeed;\n } & ParsedAllocateWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AssignWithSeed;\n } & ParsedAssignWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.TransferSolWithSeed;\n } & ParsedTransferSolWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.UpgradeNonceAccount;\n } & ParsedUpgradeNonceAccountInstruction<TProgram>);\n"]}
|
|
1
|
+
{"version":3,"sources":["../../env-shim.ts","../../src/generated/accounts/nonce.ts","../../src/generated/types/nonceState.ts","../../src/generated/types/nonceVersion.ts","../../src/generated/errors/system.ts","../../src/generated/instructions/advanceNonceAccount.ts","../../src/generated/programs/system.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/allocate.ts","../../src/generated/instructions/allocateWithSeed.ts","../../src/generated/instructions/assign.ts","../../src/generated/instructions/assignWithSeed.ts","../../src/generated/instructions/authorizeNonceAccount.ts","../../src/generated/instructions/createAccount.ts","../../src/generated/instructions/createAccountWithSeed.ts","../../src/generated/instructions/initializeNonceAccount.ts","../../src/generated/instructions/transferSol.ts","../../src/generated/instructions/transferSolWithSeed.ts","../../src/generated/instructions/upgradeNonceAccount.ts","../../src/generated/instructions/withdrawNonceAccount.ts"],"names":["combineCodec","NonceState","getScalarEnumDecoder","getScalarEnumEncoder","getU32Decoder","getU32Encoder","NonceVersion","SystemProgramErrorCode","getStructDecoder","getStructEncoder","SystemAccount","SystemInstruction","getU64Decoder","getU64Encoder","mapEncoder","getAddressDecoder","getAddressEncoder","getStringDecoder","getStringEncoder"],"mappings":";AACO,IAAM,UAA2B,uBACrC,QAAgB,KAAU,EAAE,aAAa,eAAe;;;ACM3D;AAAA,EAOE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAIE,gBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;AC3BP;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,wBAAA;AACA,EAAAA,wBAAA;AAFU,SAAAA;AAAA,GAAA;AAOL,SAAS,uBAAgD;AAC9D,SAAO,qBAAqB,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;AACnE;AAEO,SAAS,uBAA4C;AAC1D,SAAO,qBAAqB,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;AACnE;AAEO,SAAS,qBAAwD;AACtE,SAAO,aAAa,qBAAqB,GAAG,qBAAqB,CAAC;AACpE;;;AC5BA;AAAA,EAIE,gBAAAD;AAAA,EACA,wBAAAE;AAAA,EACA,wBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,OACK;AAEA,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,4BAAA;AACA,EAAAA,4BAAA;AAFU,SAAAA;AAAA,GAAA;AAOL,SAAS,yBAAoD;AAClE,SAAOH,sBA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GgE;AAChE,MAAI,YAAY,SAAS,SAAS,GAAG;AAEnC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AACA,MAAI,eAAe;AACnB,QAAM,iBAAiB,MAAM;AAC3B,UAAM,cAAc,YAAY,SAAU,YAAY;AACtD,oBAAgB;AAChB,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,gBAAgB,YAAY;AAAA,IAC5B,UAAU;AAAA,MACR,cAAc,eAAe;AAAA,MAC7B,kBAAkB,eAAe;AAAA,MACjC,yBAAyB,eAAe;AAAA,MACxC,YAAY,eAAe;AAAA,MAC3B,gBAAgB,eAAe;AAAA,IACjC;AAAA,IACA,MAAM,8CAA8C,EAAE;AAAA,MACpD,YAAY;AAAA,IACd;AAAA,EACF;AACF","sourcesContent":["// Clever obfuscation to prevent the build system from inlining the value of `NODE_ENV`\nexport const __DEV__ = /* @__PURE__ */ (() =>\n (process as any)['en' + 'v'].NODE_ENV === 'development')();\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Account,\n EncodedAccount,\n FetchAccountConfig,\n FetchAccountsConfig,\n MaybeAccount,\n MaybeEncodedAccount,\n assertAccountExists,\n assertAccountsExist,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n} from '@solana/accounts';\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n} from '@solana/codecs';\nimport {\n NonceState,\n NonceStateArgs,\n NonceVersion,\n NonceVersionArgs,\n getNonceStateDecoder,\n getNonceStateEncoder,\n getNonceVersionDecoder,\n getNonceVersionEncoder,\n} from '../types';\n\nexport type Nonce<TAddress extends string = string> = Account<\n NonceAccountData,\n TAddress\n>;\n\nexport type MaybeNonce<TAddress extends string = string> = MaybeAccount<\n NonceAccountData,\n TAddress\n>;\n\nexport type NonceAccountData = {\n version: NonceVersion;\n state: NonceState;\n authority: Address;\n blockhash: Address;\n lamportsPerSignature: bigint;\n};\n\nexport type NonceAccountDataArgs = {\n version: NonceVersionArgs;\n state: NonceStateArgs;\n authority: Address;\n blockhash: Address;\n lamportsPerSignature: number | bigint;\n};\n\nexport function getNonceAccountDataEncoder(): Encoder<NonceAccountDataArgs> {\n return getStructEncoder([\n ['version', getNonceVersionEncoder()],\n ['state', getNonceStateEncoder()],\n ['authority', getAddressEncoder()],\n ['blockhash', getAddressEncoder()],\n ['lamportsPerSignature', getU64Encoder()],\n ]);\n}\n\nexport function getNonceAccountDataDecoder(): Decoder<NonceAccountData> {\n return getStructDecoder([\n ['version', getNonceVersionDecoder()],\n ['state', getNonceStateDecoder()],\n ['authority', getAddressDecoder()],\n ['blockhash', getAddressDecoder()],\n ['lamportsPerSignature', getU64Decoder()],\n ]);\n}\n\nexport function getNonceAccountDataCodec(): Codec<\n NonceAccountDataArgs,\n NonceAccountData\n> {\n return combineCodec(\n getNonceAccountDataEncoder(),\n getNonceAccountDataDecoder()\n );\n}\n\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Nonce<TAddress>;\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeNonce<TAddress>;\nexport function decodeNonce<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Nonce<TAddress> | MaybeNonce<TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getNonceAccountDataDecoder()\n );\n}\n\nexport async function fetchNonce<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Nonce<TAddress>> {\n const maybeAccount = await fetchMaybeNonce(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeNonce<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeNonce<TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeNonce(maybeAccount);\n}\n\nexport async function fetchAllNonce(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Nonce[]> {\n const maybeAccounts = await fetchAllMaybeNonce(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeNonce(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeNonce[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeNonce(maybeAccount));\n}\n\nexport function getNonceSize(): number {\n return 80;\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getScalarEnumDecoder,\n getScalarEnumEncoder,\n getU32Decoder,\n getU32Encoder,\n} from '@solana/codecs';\n\nexport enum NonceState {\n Uninitialized,\n Initialized,\n}\n\nexport type NonceStateArgs = NonceState;\n\nexport function getNonceStateEncoder(): Encoder<NonceStateArgs> {\n return getScalarEnumEncoder(NonceState, { size: getU32Encoder() });\n}\n\nexport function getNonceStateDecoder(): Decoder<NonceState> {\n return getScalarEnumDecoder(NonceState, { size: getU32Decoder() });\n}\n\nexport function getNonceStateCodec(): Codec<NonceStateArgs, NonceState> {\n return combineCodec(getNonceStateEncoder(), getNonceStateDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getScalarEnumDecoder,\n getScalarEnumEncoder,\n getU32Decoder,\n getU32Encoder,\n} from '@solana/codecs';\n\nexport enum NonceVersion {\n Legacy,\n Current,\n}\n\nexport type NonceVersionArgs = NonceVersion;\n\nexport function getNonceVersionEncoder(): Encoder<NonceVersionArgs> {\n return getScalarEnumEncoder(NonceVersion, { size: getU32Encoder() });\n}\n\nexport function getNonceVersionDecoder(): Decoder<NonceVersion> {\n return getScalarEnumDecoder(NonceVersion, { size: getU32Decoder() });\n}\n\nexport function getNonceVersionCodec(): Codec<NonceVersionArgs, NonceVersion> {\n return combineCodec(getNonceVersionEncoder(), getNonceVersionDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nexport const enum SystemProgramErrorCode {\n /** AccountAlreadyInUse: an account with the same address already exists */\n ACCOUNT_ALREADY_IN_USE = 0x0, // 0\n /** ResultWithNegativeLamports: account does not have enough SOL to perform the operation */\n RESULT_WITH_NEGATIVE_LAMPORTS = 0x1, // 1\n /** InvalidProgramId: cannot assign account to this program id */\n INVALID_PROGRAM_ID = 0x2, // 2\n /** InvalidAccountDataLength: cannot allocate account data of this length */\n INVALID_ACCOUNT_DATA_LENGTH = 0x3, // 3\n /** MaxSeedLengthExceeded: length of requested seed is too long */\n MAX_SEED_LENGTH_EXCEEDED = 0x4, // 4\n /** AddressWithSeedMismatch: provided address does not match addressed derived from seed */\n ADDRESS_WITH_SEED_MISMATCH = 0x5, // 5\n /** NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar */\n NONCE_NO_RECENT_BLOCKHASHES = 0x6, // 6\n /** NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes */\n NONCE_BLOCKHASH_NOT_EXPIRED = 0x7, // 7\n /** NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce */\n NONCE_UNEXPECTED_BLOCKHASH_VALUE = 0x8, // 8\n}\n\nexport class SystemProgramError extends Error {\n override readonly name = 'SystemProgramError';\n\n readonly code: SystemProgramErrorCode;\n\n readonly cause: Error | undefined;\n\n constructor(\n code: SystemProgramErrorCode,\n name: string,\n message: string,\n cause?: Error\n ) {\n super(`${name} (${code}): ${message}`);\n this.code = code;\n this.cause = cause;\n }\n}\n\nlet systemProgramErrorCodeMap:\n | Record<SystemProgramErrorCode, [string, string]>\n | undefined;\nif (__DEV__) {\n systemProgramErrorCodeMap = {\n [SystemProgramErrorCode.ACCOUNT_ALREADY_IN_USE]: [\n 'AccountAlreadyInUse',\n `an account with the same address already exists`,\n ],\n [SystemProgramErrorCode.RESULT_WITH_NEGATIVE_LAMPORTS]: [\n 'ResultWithNegativeLamports',\n `account does not have enough SOL to perform the operation`,\n ],\n [SystemProgramErrorCode.INVALID_PROGRAM_ID]: [\n 'InvalidProgramId',\n `cannot assign account to this program id`,\n ],\n [SystemProgramErrorCode.INVALID_ACCOUNT_DATA_LENGTH]: [\n 'InvalidAccountDataLength',\n `cannot allocate account data of this length`,\n ],\n [SystemProgramErrorCode.MAX_SEED_LENGTH_EXCEEDED]: [\n 'MaxSeedLengthExceeded',\n `length of requested seed is too long`,\n ],\n [SystemProgramErrorCode.ADDRESS_WITH_SEED_MISMATCH]: [\n 'AddressWithSeedMismatch',\n `provided address does not match addressed derived from seed`,\n ],\n [SystemProgramErrorCode.NONCE_NO_RECENT_BLOCKHASHES]: [\n 'NonceNoRecentBlockhashes',\n `advancing stored nonce requires a populated RecentBlockhashes sysvar`,\n ],\n [SystemProgramErrorCode.NONCE_BLOCKHASH_NOT_EXPIRED]: [\n 'NonceBlockhashNotExpired',\n `stored nonce is still in recent_blockhashes`,\n ],\n [SystemProgramErrorCode.NONCE_UNEXPECTED_BLOCKHASH_VALUE]: [\n 'NonceUnexpectedBlockhashValue',\n `specified nonce does not match stored nonce`,\n ],\n };\n}\n\nexport function getSystemProgramErrorFromCode(\n code: SystemProgramErrorCode,\n cause?: Error\n): SystemProgramError {\n if (__DEV__) {\n return new SystemProgramError(\n code,\n ...(\n systemProgramErrorCodeMap as Record<\n SystemProgramErrorCode,\n [string, string]\n >\n )[code],\n cause\n );\n }\n\n return new SystemProgramError(\n code,\n 'Unknown',\n 'Error message not available in production bundles. Compile with __DEV__ set to true to see more information.',\n cause\n );\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AdvanceNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AdvanceNonceAccountInstructionData = { discriminator: number };\n\nexport type AdvanceNonceAccountInstructionDataArgs = {};\n\nexport function getAdvanceNonceAccountInstructionDataEncoder(): Encoder<AdvanceNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([['discriminator', getU32Encoder()]]),\n (value) => ({ ...value, discriminator: 4 })\n );\n}\n\nexport function getAdvanceNonceAccountInstructionDataDecoder(): Decoder<AdvanceNonceAccountInstructionData> {\n return getStructDecoder([['discriminator', getU32Decoder()]]);\n}\n\nexport function getAdvanceNonceAccountInstructionDataCodec(): Codec<\n AdvanceNonceAccountInstructionDataArgs,\n AdvanceNonceAccountInstructionData\n> {\n return combineCodec(\n getAdvanceNonceAccountInstructionDataEncoder(),\n getAdvanceNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type AdvanceNonceAccountInput<\n TAccountNonceAccount extends string = string,\n TAccountRecentBlockhashesSysvar extends string = string,\n TAccountNonceAuthority extends string = string,\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n};\n\nexport function getAdvanceNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountNonceAuthority extends string,\n>(\n input: AdvanceNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >\n): AdvanceNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.nonceAccount),\n getAccountMeta(accounts.recentBlockhashesSysvar),\n getAccountMeta(accounts.nonceAuthority),\n ],\n programAddress,\n data: getAdvanceNonceAccountInstructionDataEncoder().encode({}),\n } as AdvanceNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountNonceAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedAdvanceNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recentBlockhashesSysvar: TAccountMetas[1];\n nonceAuthority: TAccountMetas[2];\n };\n data: AdvanceNonceAccountInstructionData;\n};\n\nexport function parseAdvanceNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAdvanceNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getAdvanceNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport { getU32Encoder } from '@solana/codecs';\nimport { Program, ProgramWithErrors } from '@solana/programs';\nimport {\n SystemProgramError,\n SystemProgramErrorCode,\n getSystemProgramErrorFromCode,\n} from '../errors';\nimport {\n ParsedAdvanceNonceAccountInstruction,\n ParsedAllocateInstruction,\n ParsedAllocateWithSeedInstruction,\n ParsedAssignInstruction,\n ParsedAssignWithSeedInstruction,\n ParsedAuthorizeNonceAccountInstruction,\n ParsedCreateAccountInstruction,\n ParsedCreateAccountWithSeedInstruction,\n ParsedInitializeNonceAccountInstruction,\n ParsedTransferSolInstruction,\n ParsedTransferSolWithSeedInstruction,\n ParsedUpgradeNonceAccountInstruction,\n ParsedWithdrawNonceAccountInstruction,\n} from '../instructions';\nimport { memcmp } from '../shared';\n\nexport const SYSTEM_PROGRAM_ADDRESS =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\nexport type SystemProgram = Program<'11111111111111111111111111111111'> &\n ProgramWithErrors<SystemProgramErrorCode, SystemProgramError>;\n\nexport function getSystemProgram(): SystemProgram {\n return {\n name: 'system',\n address: SYSTEM_PROGRAM_ADDRESS,\n getErrorFromCode(code: SystemProgramErrorCode, cause?: Error) {\n return getSystemProgramErrorFromCode(code, cause);\n },\n };\n}\n\nexport enum SystemAccount {\n Nonce,\n}\n\nexport enum SystemInstruction {\n CreateAccount,\n Assign,\n TransferSol,\n CreateAccountWithSeed,\n AdvanceNonceAccount,\n WithdrawNonceAccount,\n InitializeNonceAccount,\n AuthorizeNonceAccount,\n Allocate,\n AllocateWithSeed,\n AssignWithSeed,\n TransferSolWithSeed,\n UpgradeNonceAccount,\n}\n\nexport function identifySystemInstruction(\n instruction: { data: Uint8Array } | Uint8Array\n): SystemInstruction {\n const data =\n instruction instanceof Uint8Array ? instruction : instruction.data;\n if (memcmp(data, getU32Encoder().encode(0), 0)) {\n return SystemInstruction.CreateAccount;\n }\n if (memcmp(data, getU32Encoder().encode(1), 0)) {\n return SystemInstruction.Assign;\n }\n if (memcmp(data, getU32Encoder().encode(2), 0)) {\n return SystemInstruction.TransferSol;\n }\n if (memcmp(data, getU32Encoder().encode(3), 0)) {\n return SystemInstruction.CreateAccountWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(4), 0)) {\n return SystemInstruction.AdvanceNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(5), 0)) {\n return SystemInstruction.WithdrawNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(6), 0)) {\n return SystemInstruction.InitializeNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(7), 0)) {\n return SystemInstruction.AuthorizeNonceAccount;\n }\n if (memcmp(data, getU32Encoder().encode(8), 0)) {\n return SystemInstruction.Allocate;\n }\n if (memcmp(data, getU32Encoder().encode(9), 0)) {\n return SystemInstruction.AllocateWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(10), 0)) {\n return SystemInstruction.AssignWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(11), 0)) {\n return SystemInstruction.TransferSolWithSeed;\n }\n if (memcmp(data, getU32Encoder().encode(12), 0)) {\n return SystemInstruction.UpgradeNonceAccount;\n }\n throw new Error(\n 'The provided instruction could not be identified as a system instruction.'\n );\n}\n\nexport type ParsedSystemInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n> =\n | ({\n instructionType: SystemInstruction.CreateAccount;\n } & ParsedCreateAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.Assign;\n } & ParsedAssignInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.TransferSol;\n } & ParsedTransferSolInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.CreateAccountWithSeed;\n } & ParsedCreateAccountWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AdvanceNonceAccount;\n } & ParsedAdvanceNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.WithdrawNonceAccount;\n } & ParsedWithdrawNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.InitializeNonceAccount;\n } & ParsedInitializeNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AuthorizeNonceAccount;\n } & ParsedAuthorizeNonceAccountInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.Allocate;\n } & ParsedAllocateInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AllocateWithSeed;\n } & ParsedAllocateWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.AssignWithSeed;\n } & ParsedAssignWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.TransferSolWithSeed;\n } & ParsedTransferSolWithSeedInstruction<TProgram>)\n | ({\n instructionType: SystemInstruction.UpgradeNonceAccount;\n } & ParsedUpgradeNonceAccountInstruction<TProgram>);\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n isProgramDerivedAddress,\n ProgramDerivedAddress,\n} from '@solana/addresses';\nimport {\n AccountRole,\n IAccountMeta,\n upgradeRoleToSigner,\n} from '@solana/instructions';\nimport {\n IAccountSignerMeta,\n isTransactionSigner as web3JsIsTransactionSigner,\n TransactionSigner,\n} from '@solana/signers';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome<T>(value: T | null | undefined): T {\n if (value == null) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): Address<T> {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0];\n }\n return value as Address<T>;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): ProgramDerivedAddress<T> {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): TransactionSigner<T> {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null =\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type IInstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): IAccountMeta | IAccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner<TAddress extends string = string>(\n value:\n | Address<TAddress>\n | ProgramDerivedAddress<TAddress>\n | TransactionSigner<TAddress>\n): value is TransactionSigner<TAddress> {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n web3JsIsTransactionSigner(value)\n );\n}\n\nexport function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number) {\n const slice = data.slice(offset, offset + bytes.length);\n if (slice.length !== bytes.length) return false;\n return bytes.every((b, i) => b === slice[i]);\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AllocateInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount> &\n IAccountSignerMeta<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AllocateInstructionData = { discriminator: number; space: bigint };\n\nexport type AllocateInstructionDataArgs = { space: number | bigint };\n\nexport function getAllocateInstructionDataEncoder(): Encoder<AllocateInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['space', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 8 })\n );\n}\n\nexport function getAllocateInstructionDataDecoder(): Decoder<AllocateInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['space', getU64Decoder()],\n ]);\n}\n\nexport function getAllocateInstructionDataCodec(): Codec<\n AllocateInstructionDataArgs,\n AllocateInstructionData\n> {\n return combineCodec(\n getAllocateInstructionDataEncoder(),\n getAllocateInstructionDataDecoder()\n );\n}\n\nexport type AllocateInput<TAccountNewAccount extends string = string> = {\n newAccount: TransactionSigner<TAccountNewAccount>;\n space: AllocateInstructionDataArgs['space'];\n};\n\nexport function getAllocateInstruction<TAccountNewAccount extends string>(\n input: AllocateInput<TAccountNewAccount>\n): AllocateInstruction<typeof SYSTEM_PROGRAM_ADDRESS, TAccountNewAccount> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.newAccount)],\n programAddress,\n data: getAllocateInstructionDataEncoder().encode(\n args as AllocateInstructionDataArgs\n ),\n } as AllocateInstruction<typeof SYSTEM_PROGRAM_ADDRESS, TAccountNewAccount>;\n\n return instruction;\n}\n\nexport type ParsedAllocateInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n newAccount: TAccountMetas[0];\n };\n data: AllocateInstructionData;\n};\n\nexport function parseAllocateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAllocateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n newAccount: getNextAccount(),\n },\n data: getAllocateInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AllocateWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AllocateWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n space: bigint;\n programAddress: Address;\n};\n\nexport type AllocateWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getAllocateWithSeedInstructionDataEncoder(): Encoder<AllocateWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 9 })\n );\n}\n\nexport function getAllocateWithSeedInstructionDataDecoder(): Decoder<AllocateWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAllocateWithSeedInstructionDataCodec(): Codec<\n AllocateWithSeedInstructionDataArgs,\n AllocateWithSeedInstructionData\n> {\n return combineCodec(\n getAllocateWithSeedInstructionDataEncoder(),\n getAllocateWithSeedInstructionDataDecoder()\n );\n}\n\nexport type AllocateWithSeedInput<\n TAccountNewAccount extends string = string,\n TAccountBaseAccount extends string = string,\n> = {\n newAccount: Address<TAccountNewAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: AllocateWithSeedInstructionDataArgs['base'];\n seed: AllocateWithSeedInstructionDataArgs['seed'];\n space: AllocateWithSeedInstructionDataArgs['space'];\n programAddress: AllocateWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getAllocateWithSeedInstruction<\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n>(\n input: AllocateWithSeedInput<TAccountNewAccount, TAccountBaseAccount>\n): AllocateWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNewAccount,\n TAccountBaseAccount\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.newAccount),\n getAccountMeta(accounts.baseAccount),\n ],\n programAddress,\n data: getAllocateWithSeedInstructionDataEncoder().encode(\n args as AllocateWithSeedInstructionDataArgs\n ),\n } as AllocateWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNewAccount,\n TAccountBaseAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedAllocateWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n newAccount: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n };\n data: AllocateWithSeedInstructionData;\n};\n\nexport function parseAllocateWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAllocateWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n newAccount: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getAllocateWithSeedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AssignInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableSignerAccount<TAccountAccount> &\n IAccountSignerMeta<TAccountAccount>\n : TAccountAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AssignInstructionData = {\n discriminator: number;\n programAddress: Address;\n};\n\nexport type AssignInstructionDataArgs = { programAddress: Address };\n\nexport function getAssignInstructionDataEncoder(): Encoder<AssignInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 1 })\n );\n}\n\nexport function getAssignInstructionDataDecoder(): Decoder<AssignInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAssignInstructionDataCodec(): Codec<\n AssignInstructionDataArgs,\n AssignInstructionData\n> {\n return combineCodec(\n getAssignInstructionDataEncoder(),\n getAssignInstructionDataDecoder()\n );\n}\n\nexport type AssignInput<TAccountAccount extends string = string> = {\n account: TransactionSigner<TAccountAccount>;\n programAddress: AssignInstructionDataArgs['programAddress'];\n};\n\nexport function getAssignInstruction<TAccountAccount extends string>(\n input: AssignInput<TAccountAccount>\n): AssignInstruction<typeof SYSTEM_PROGRAM_ADDRESS, TAccountAccount> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.account)],\n programAddress,\n data: getAssignInstructionDataEncoder().encode(\n args as AssignInstructionDataArgs\n ),\n } as AssignInstruction<typeof SYSTEM_PROGRAM_ADDRESS, TAccountAccount>;\n\n return instruction;\n}\n\nexport type ParsedAssignInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n account: TAccountMetas[0];\n };\n data: AssignInstructionData;\n};\n\nexport function parseAssignInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAssignInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n },\n data: getAssignInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AssignWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount<TAccountAccount>\n : TAccountAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AssignWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n programAddress: Address;\n};\n\nexport type AssignWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n programAddress: Address;\n};\n\nexport function getAssignWithSeedInstructionDataEncoder(): Encoder<AssignWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 10 })\n );\n}\n\nexport function getAssignWithSeedInstructionDataDecoder(): Decoder<AssignWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getAssignWithSeedInstructionDataCodec(): Codec<\n AssignWithSeedInstructionDataArgs,\n AssignWithSeedInstructionData\n> {\n return combineCodec(\n getAssignWithSeedInstructionDataEncoder(),\n getAssignWithSeedInstructionDataDecoder()\n );\n}\n\nexport type AssignWithSeedInput<\n TAccountAccount extends string = string,\n TAccountBaseAccount extends string = string,\n> = {\n account: Address<TAccountAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: AssignWithSeedInstructionDataArgs['base'];\n seed: AssignWithSeedInstructionDataArgs['seed'];\n programAddress: AssignWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getAssignWithSeedInstruction<\n TAccountAccount extends string,\n TAccountBaseAccount extends string,\n>(\n input: AssignWithSeedInput<TAccountAccount, TAccountBaseAccount>\n): AssignWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountAccount,\n TAccountBaseAccount\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.baseAccount),\n ],\n programAddress,\n data: getAssignWithSeedInstructionDataEncoder().encode(\n args as AssignWithSeedInstructionDataArgs\n ),\n } as AssignWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountAccount,\n TAccountBaseAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedAssignWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n account: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n };\n data: AssignWithSeedInstructionData;\n};\n\nexport function parseAssignWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAssignWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getAssignWithSeedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type AuthorizeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AuthorizeNonceAccountInstructionData = {\n discriminator: number;\n newNonceAuthority: Address;\n};\n\nexport type AuthorizeNonceAccountInstructionDataArgs = {\n newNonceAuthority: Address;\n};\n\nexport function getAuthorizeNonceAccountInstructionDataEncoder(): Encoder<AuthorizeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['newNonceAuthority', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 7 })\n );\n}\n\nexport function getAuthorizeNonceAccountInstructionDataDecoder(): Decoder<AuthorizeNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['newNonceAuthority', getAddressDecoder()],\n ]);\n}\n\nexport function getAuthorizeNonceAccountInstructionDataCodec(): Codec<\n AuthorizeNonceAccountInstructionDataArgs,\n AuthorizeNonceAccountInstructionData\n> {\n return combineCodec(\n getAuthorizeNonceAccountInstructionDataEncoder(),\n getAuthorizeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type AuthorizeNonceAccountInput<\n TAccountNonceAccount extends string = string,\n TAccountNonceAuthority extends string = string,\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n newNonceAuthority: AuthorizeNonceAccountInstructionDataArgs['newNonceAuthority'];\n};\n\nexport function getAuthorizeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountNonceAuthority extends string,\n>(\n input: AuthorizeNonceAccountInput<\n TAccountNonceAccount,\n TAccountNonceAuthority\n >\n): AuthorizeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountNonceAuthority\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.nonceAccount),\n getAccountMeta(accounts.nonceAuthority),\n ],\n programAddress,\n data: getAuthorizeNonceAccountInstructionDataEncoder().encode(\n args as AuthorizeNonceAccountInstructionDataArgs\n ),\n } as AuthorizeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountNonceAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedAuthorizeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n nonceAuthority: TAccountMetas[1];\n };\n data: AuthorizeNonceAccountInstructionData;\n};\n\nexport function parseAuthorizeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedAuthorizeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getAuthorizeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { BASE_ACCOUNT_SIZE } from '@solana/accounts';\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport {\n IInstructionWithByteDelta,\n ResolvedAccount,\n getAccountMetaFactory,\n} from '../shared';\n\nexport type CreateAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n IAccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableSignerAccount<TAccountNewAccount> &\n IAccountSignerMeta<TAccountNewAccount>\n : TAccountNewAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAccountInstructionData = {\n discriminator: number;\n lamports: bigint;\n space: bigint;\n programAddress: Address;\n};\n\nexport type CreateAccountInstructionDataArgs = {\n lamports: number | bigint;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getCreateAccountInstructionDataEncoder(): Encoder<CreateAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['lamports', getU64Encoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 0 })\n );\n}\n\nexport function getCreateAccountInstructionDataDecoder(): Decoder<CreateAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['lamports', getU64Decoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getCreateAccountInstructionDataCodec(): Codec<\n CreateAccountInstructionDataArgs,\n CreateAccountInstructionData\n> {\n return combineCodec(\n getCreateAccountInstructionDataEncoder(),\n getCreateAccountInstructionDataDecoder()\n );\n}\n\nexport type CreateAccountInput<\n TAccountPayer extends string = string,\n TAccountNewAccount extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n newAccount: TransactionSigner<TAccountNewAccount>;\n lamports: CreateAccountInstructionDataArgs['lamports'];\n space: CreateAccountInstructionDataArgs['space'];\n programAddress: CreateAccountInstructionDataArgs['programAddress'];\n};\n\nexport function getCreateAccountInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n>(\n input: CreateAccountInput<TAccountPayer, TAccountNewAccount>\n): CreateAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer,\n TAccountNewAccount\n> &\n IInstructionWithByteDelta {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Bytes created or reallocated by the instruction.\n const byteDelta: number = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce(\n (a, b) => a + b,\n 0\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.newAccount),\n ],\n programAddress,\n data: getCreateAccountInstructionDataEncoder().encode(\n args as CreateAccountInstructionDataArgs\n ),\n } as CreateAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer,\n TAccountNewAccount\n >;\n\n return Object.freeze({ ...instruction, byteDelta });\n}\n\nexport type ParsedCreateAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n newAccount: TAccountMetas[1];\n };\n data: CreateAccountInstructionData;\n};\n\nexport function parseCreateAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedCreateAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n newAccount: getNextAccount(),\n },\n data: getCreateAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type CreateAccountWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer extends string | IAccountMeta<string> = string,\n TAccountNewAccount extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n IAccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableAccount<TAccountNewAccount>\n : TAccountNewAccount,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAccountWithSeedInstructionData = {\n discriminator: number;\n base: Address;\n seed: string;\n amount: bigint;\n space: bigint;\n programAddress: Address;\n};\n\nexport type CreateAccountWithSeedInstructionDataArgs = {\n base: Address;\n seed: string;\n amount: number | bigint;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getCreateAccountWithSeedInstructionDataEncoder(): Encoder<CreateAccountWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['base', getAddressEncoder()],\n ['seed', getStringEncoder()],\n ['amount', getU64Encoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 3 })\n );\n}\n\nexport function getCreateAccountWithSeedInstructionDataDecoder(): Decoder<CreateAccountWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['base', getAddressDecoder()],\n ['seed', getStringDecoder()],\n ['amount', getU64Decoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getCreateAccountWithSeedInstructionDataCodec(): Codec<\n CreateAccountWithSeedInstructionDataArgs,\n CreateAccountWithSeedInstructionData\n> {\n return combineCodec(\n getCreateAccountWithSeedInstructionDataEncoder(),\n getCreateAccountWithSeedInstructionDataDecoder()\n );\n}\n\nexport type CreateAccountWithSeedInput<\n TAccountPayer extends string = string,\n TAccountNewAccount extends string = string,\n TAccountBaseAccount extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n newAccount: Address<TAccountNewAccount>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n base: CreateAccountWithSeedInstructionDataArgs['base'];\n seed: CreateAccountWithSeedInstructionDataArgs['seed'];\n amount: CreateAccountWithSeedInstructionDataArgs['amount'];\n space: CreateAccountWithSeedInstructionDataArgs['space'];\n programAddress: CreateAccountWithSeedInstructionDataArgs['programAddress'];\n};\n\nexport function getCreateAccountWithSeedInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TAccountBaseAccount extends string,\n>(\n input: CreateAccountWithSeedInput<\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >\n): CreateAccountWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.newAccount),\n getAccountMeta(accounts.baseAccount),\n ],\n programAddress,\n data: getCreateAccountWithSeedInstructionDataEncoder().encode(\n args as CreateAccountWithSeedInstructionDataArgs\n ),\n } as CreateAccountWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer,\n TAccountNewAccount,\n TAccountBaseAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateAccountWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n newAccount: TAccountMetas[1];\n baseAccount: TAccountMetas[2];\n };\n data: CreateAccountWithSeedInstructionData;\n};\n\nexport function parseCreateAccountWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedCreateAccountWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n newAccount: getNextAccount(),\n baseAccount: getNextAccount(),\n },\n data: getCreateAccountWithSeedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type InitializeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeNonceAccountInstructionData = {\n discriminator: number;\n nonceAuthority: Address;\n};\n\nexport type InitializeNonceAccountInstructionDataArgs = {\n nonceAuthority: Address;\n};\n\nexport function getInitializeNonceAccountInstructionDataEncoder(): Encoder<InitializeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['nonceAuthority', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 6 })\n );\n}\n\nexport function getInitializeNonceAccountInstructionDataDecoder(): Decoder<InitializeNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['nonceAuthority', getAddressDecoder()],\n ]);\n}\n\nexport function getInitializeNonceAccountInstructionDataCodec(): Codec<\n InitializeNonceAccountInstructionDataArgs,\n InitializeNonceAccountInstructionData\n> {\n return combineCodec(\n getInitializeNonceAccountInstructionDataEncoder(),\n getInitializeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type InitializeNonceAccountInput<\n TAccountNonceAccount extends string = string,\n TAccountRecentBlockhashesSysvar extends string = string,\n TAccountRentSysvar extends string = string,\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: InitializeNonceAccountInstructionDataArgs['nonceAuthority'];\n};\n\nexport function getInitializeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n>(\n input: InitializeNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >\n): InitializeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n if (!accounts.rentSysvar.value) {\n accounts.rentSysvar.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.nonceAccount),\n getAccountMeta(accounts.recentBlockhashesSysvar),\n getAccountMeta(accounts.rentSysvar),\n ],\n programAddress,\n data: getInitializeNonceAccountInstructionDataEncoder().encode(\n args as InitializeNonceAccountInstructionDataArgs\n ),\n } as InitializeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recentBlockhashesSysvar: TAccountMetas[1];\n rentSysvar: TAccountMetas[2];\n };\n data: InitializeNonceAccountInstructionData;\n};\n\nexport function parseInitializeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedInitializeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n rentSysvar: getNextAccount(),\n },\n data: getInitializeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableAccount,\n WritableSignerAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type TransferSolInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableSignerAccount<TAccountSource> &\n IAccountSignerMeta<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransferSolInstructionData = {\n discriminator: number;\n amount: bigint;\n};\n\nexport type TransferSolInstructionDataArgs = { amount: number | bigint };\n\nexport function getTransferSolInstructionDataEncoder(): Encoder<TransferSolInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 2 })\n );\n}\n\nexport function getTransferSolInstructionDataDecoder(): Decoder<TransferSolInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getTransferSolInstructionDataCodec(): Codec<\n TransferSolInstructionDataArgs,\n TransferSolInstructionData\n> {\n return combineCodec(\n getTransferSolInstructionDataEncoder(),\n getTransferSolInstructionDataDecoder()\n );\n}\n\nexport type TransferSolInput<\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n> = {\n source: TransactionSigner<TAccountSource>;\n destination: Address<TAccountDestination>;\n amount: TransferSolInstructionDataArgs['amount'];\n};\n\nexport function getTransferSolInstruction<\n TAccountSource extends string,\n TAccountDestination extends string,\n>(\n input: TransferSolInput<TAccountSource, TAccountDestination>\n): TransferSolInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource,\n TAccountDestination\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n ],\n programAddress,\n data: getTransferSolInstructionDataEncoder().encode(\n args as TransferSolInstructionDataArgs\n ),\n } as TransferSolInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource,\n TAccountDestination\n >;\n\n return instruction;\n}\n\nexport type ParsedTransferSolInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n source: TAccountMetas[0];\n destination: TAccountMetas[1];\n };\n data: TransferSolInstructionData;\n};\n\nexport function parseTransferSolInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedTransferSolInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n destination: getNextAccount(),\n },\n data: getTransferSolInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport {\n Address,\n getAddressDecoder,\n getAddressEncoder,\n} from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStringDecoder,\n getStringEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type TransferSolWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource extends string | IAccountMeta<string> = string,\n TAccountBaseAccount extends string | IAccountMeta<string> = string,\n TAccountDestination extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountBaseAccount extends string\n ? ReadonlySignerAccount<TAccountBaseAccount> &\n IAccountSignerMeta<TAccountBaseAccount>\n : TAccountBaseAccount,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransferSolWithSeedInstructionData = {\n discriminator: number;\n amount: bigint;\n fromSeed: string;\n fromOwner: Address;\n};\n\nexport type TransferSolWithSeedInstructionDataArgs = {\n amount: number | bigint;\n fromSeed: string;\n fromOwner: Address;\n};\n\nexport function getTransferSolWithSeedInstructionDataEncoder(): Encoder<TransferSolWithSeedInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['amount', getU64Encoder()],\n ['fromSeed', getStringEncoder()],\n ['fromOwner', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: 11 })\n );\n}\n\nexport function getTransferSolWithSeedInstructionDataDecoder(): Decoder<TransferSolWithSeedInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['amount', getU64Decoder()],\n ['fromSeed', getStringDecoder()],\n ['fromOwner', getAddressDecoder()],\n ]);\n}\n\nexport function getTransferSolWithSeedInstructionDataCodec(): Codec<\n TransferSolWithSeedInstructionDataArgs,\n TransferSolWithSeedInstructionData\n> {\n return combineCodec(\n getTransferSolWithSeedInstructionDataEncoder(),\n getTransferSolWithSeedInstructionDataDecoder()\n );\n}\n\nexport type TransferSolWithSeedInput<\n TAccountSource extends string = string,\n TAccountBaseAccount extends string = string,\n TAccountDestination extends string = string,\n> = {\n source: Address<TAccountSource>;\n baseAccount: TransactionSigner<TAccountBaseAccount>;\n destination: Address<TAccountDestination>;\n amount: TransferSolWithSeedInstructionDataArgs['amount'];\n fromSeed: TransferSolWithSeedInstructionDataArgs['fromSeed'];\n fromOwner: TransferSolWithSeedInstructionDataArgs['fromOwner'];\n};\n\nexport function getTransferSolWithSeedInstruction<\n TAccountSource extends string,\n TAccountBaseAccount extends string,\n TAccountDestination extends string,\n>(\n input: TransferSolWithSeedInput<\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >\n): TransferSolWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n baseAccount: { value: input.baseAccount ?? null, isWritable: false },\n destination: { value: input.destination ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.baseAccount),\n getAccountMeta(accounts.destination),\n ],\n programAddress,\n data: getTransferSolWithSeedInstructionDataEncoder().encode(\n args as TransferSolWithSeedInstructionDataArgs\n ),\n } as TransferSolWithSeedInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountSource,\n TAccountBaseAccount,\n TAccountDestination\n >;\n\n return instruction;\n}\n\nexport type ParsedTransferSolWithSeedInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n source: TAccountMetas[0];\n baseAccount: TAccountMetas[1];\n destination: TAccountMetas[2];\n };\n data: TransferSolWithSeedInstructionData;\n};\n\nexport function parseTransferSolWithSeedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedTransferSolWithSeedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n baseAccount: getNextAccount(),\n destination: getNextAccount(),\n },\n data: getTransferSolWithSeedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n WritableAccount,\n} from '@solana/instructions';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type UpgradeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpgradeNonceAccountInstructionData = { discriminator: number };\n\nexport type UpgradeNonceAccountInstructionDataArgs = {};\n\nexport function getUpgradeNonceAccountInstructionDataEncoder(): Encoder<UpgradeNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([['discriminator', getU32Encoder()]]),\n (value) => ({ ...value, discriminator: 12 })\n );\n}\n\nexport function getUpgradeNonceAccountInstructionDataDecoder(): Decoder<UpgradeNonceAccountInstructionData> {\n return getStructDecoder([['discriminator', getU32Decoder()]]);\n}\n\nexport function getUpgradeNonceAccountInstructionDataCodec(): Codec<\n UpgradeNonceAccountInstructionDataArgs,\n UpgradeNonceAccountInstructionData\n> {\n return combineCodec(\n getUpgradeNonceAccountInstructionDataEncoder(),\n getUpgradeNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type UpgradeNonceAccountInput<\n TAccountNonceAccount extends string = string,\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n};\n\nexport function getUpgradeNonceAccountInstruction<\n TAccountNonceAccount extends string,\n>(\n input: UpgradeNonceAccountInput<TAccountNonceAccount>\n): UpgradeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.nonceAccount)],\n programAddress,\n data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),\n } as UpgradeNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedUpgradeNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n };\n data: UpgradeNonceAccountInstructionData;\n};\n\nexport function parseUpgradeNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedUpgradeNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n },\n data: getUpgradeNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the kinobi library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun kinobi to update it.\n *\n * @see https://github.com/metaplex-foundation/kinobi\n */\n\nimport { Address } from '@solana/addresses';\nimport {\n Codec,\n Decoder,\n Encoder,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n mapEncoder,\n} from '@solana/codecs';\nimport {\n IAccountMeta,\n IInstruction,\n IInstructionWithAccounts,\n IInstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n WritableAccount,\n} from '@solana/instructions';\nimport { IAccountSignerMeta, TransactionSigner } from '@solana/signers';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport { ResolvedAccount, getAccountMetaFactory } from '../shared';\n\nexport type WithdrawNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount extends string | IAccountMeta<string> = string,\n TAccountRecipientAccount extends string | IAccountMeta<string> = string,\n TAccountRecentBlockhashesSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRecentB1ockHashes11111111111111111111',\n TAccountRentSysvar extends\n | string\n | IAccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TAccountNonceAuthority extends string | IAccountMeta<string> = string,\n TRemainingAccounts extends readonly IAccountMeta<string>[] = [],\n> = IInstruction<TProgram> &\n IInstructionWithData<Uint8Array> &\n IInstructionWithAccounts<\n [\n TAccountNonceAccount extends string\n ? WritableAccount<TAccountNonceAccount>\n : TAccountNonceAccount,\n TAccountRecipientAccount extends string\n ? WritableAccount<TAccountRecipientAccount>\n : TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar extends string\n ? ReadonlyAccount<TAccountRecentBlockhashesSysvar>\n : TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar extends string\n ? ReadonlyAccount<TAccountRentSysvar>\n : TAccountRentSysvar,\n TAccountNonceAuthority extends string\n ? ReadonlySignerAccount<TAccountNonceAuthority> &\n IAccountSignerMeta<TAccountNonceAuthority>\n : TAccountNonceAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type WithdrawNonceAccountInstructionData = {\n discriminator: number;\n withdrawAmount: bigint;\n};\n\nexport type WithdrawNonceAccountInstructionDataArgs = {\n withdrawAmount: number | bigint;\n};\n\nexport function getWithdrawNonceAccountInstructionDataEncoder(): Encoder<WithdrawNonceAccountInstructionDataArgs> {\n return mapEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['withdrawAmount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: 5 })\n );\n}\n\nexport function getWithdrawNonceAccountInstructionDataDecoder(): Decoder<WithdrawNonceAccountInstructionData> {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['withdrawAmount', getU64Decoder()],\n ]);\n}\n\nexport function getWithdrawNonceAccountInstructionDataCodec(): Codec<\n WithdrawNonceAccountInstructionDataArgs,\n WithdrawNonceAccountInstructionData\n> {\n return combineCodec(\n getWithdrawNonceAccountInstructionDataEncoder(),\n getWithdrawNonceAccountInstructionDataDecoder()\n );\n}\n\nexport type WithdrawNonceAccountInput<\n TAccountNonceAccount extends string = string,\n TAccountRecipientAccount extends string = string,\n TAccountRecentBlockhashesSysvar extends string = string,\n TAccountRentSysvar extends string = string,\n TAccountNonceAuthority extends string = string,\n> = {\n nonceAccount: Address<TAccountNonceAccount>;\n recipientAccount: Address<TAccountRecipientAccount>;\n recentBlockhashesSysvar?: Address<TAccountRecentBlockhashesSysvar>;\n rentSysvar?: Address<TAccountRentSysvar>;\n nonceAuthority: TransactionSigner<TAccountNonceAuthority>;\n withdrawAmount: WithdrawNonceAccountInstructionDataArgs['withdrawAmount'];\n};\n\nexport function getWithdrawNonceAccountInstruction<\n TAccountNonceAccount extends string,\n TAccountRecipientAccount extends string,\n TAccountRecentBlockhashesSysvar extends string,\n TAccountRentSysvar extends string,\n TAccountNonceAuthority extends string,\n>(\n input: WithdrawNonceAccountInput<\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >\n): WithdrawNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n> {\n // Program address.\n const programAddress = SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },\n recipientAccount: {\n value: input.recipientAccount ?? null,\n isWritable: true,\n },\n recentBlockhashesSysvar: {\n value: input.recentBlockhashesSysvar ?? null,\n isWritable: false,\n },\n rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },\n nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.recentBlockhashesSysvar.value) {\n accounts.recentBlockhashesSysvar.value =\n 'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;\n }\n if (!accounts.rentSysvar.value) {\n accounts.rentSysvar.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.nonceAccount),\n getAccountMeta(accounts.recipientAccount),\n getAccountMeta(accounts.recentBlockhashesSysvar),\n getAccountMeta(accounts.rentSysvar),\n getAccountMeta(accounts.nonceAuthority),\n ],\n programAddress,\n data: getWithdrawNonceAccountInstructionDataEncoder().encode(\n args as WithdrawNonceAccountInstructionDataArgs\n ),\n } as WithdrawNonceAccountInstruction<\n typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountNonceAccount,\n TAccountRecipientAccount,\n TAccountRecentBlockhashesSysvar,\n TAccountRentSysvar,\n TAccountNonceAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedWithdrawNonceAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n nonceAccount: TAccountMetas[0];\n recipientAccount: TAccountMetas[1];\n recentBlockhashesSysvar: TAccountMetas[2];\n rentSysvar: TAccountMetas[3];\n nonceAuthority: TAccountMetas[4];\n };\n data: WithdrawNonceAccountInstructionData;\n};\n\nexport function parseWithdrawNonceAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly IAccountMeta[],\n>(\n instruction: IInstruction<TProgram> &\n IInstructionWithAccounts<TAccountMetas> &\n IInstructionWithData<Uint8Array>\n): ParsedWithdrawNonceAccountInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nonceAccount: getNextAccount(),\n recipientAccount: getNextAccount(),\n recentBlockhashesSysvar: getNextAccount(),\n rentSysvar: getNextAccount(),\n nonceAuthority: getNextAccount(),\n },\n data: getWithdrawNonceAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n"]}
|