@across-protocol/contracts 6.0.0-beta.2 → 6.0.0-beta.4

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.
Files changed (138) hide show
  1. package/README.md +195 -34
  2. package/contracts/chain-adapters/Solana_Adapter.sol +4 -7
  3. package/contracts/handlers/HyperliquidDepositHandler.sol +2 -2
  4. package/contracts/interfaces/SpokePoolPeripheryInterface.sol +16 -4
  5. package/contracts/libraries/HyperCoreLib.sol +113 -20
  6. package/contracts/libraries/PeripherySigningLib.sol +56 -0
  7. package/contracts/periphery/SpokePoolPeriphery.sol +58 -10
  8. package/dist/broadcast/deployed-addresses.json +19 -0
  9. package/dist/evm/artifacts/Constants.sol/Constants.json +1 -1
  10. package/dist/evm/artifacts/DeploymentUtils.sol/DeploymentUtils.json +1 -1
  11. package/dist/evm/artifacts/DstOFTHandler.sol/DstOFTHandler.json +1 -1
  12. package/dist/evm/artifacts/HubPoolTestBase.sol/MockAddressWhitelist.json +1 -1
  13. package/dist/evm/artifacts/HubPoolTestBase.sol/MockFinder.json +1 -1
  14. package/dist/evm/artifacts/HubPoolTestBase.sol/MockIdentifierWhitelist.json +1 -1
  15. package/dist/evm/artifacts/HubPoolTestBase.sol/MockLpTokenFactory.json +1 -1
  16. package/dist/evm/artifacts/HubPoolTestBase.sol/MockOptimisticOracle.json +1 -1
  17. package/dist/evm/artifacts/HubPoolTestBase.sol/MockStore.json +1 -1
  18. package/dist/evm/artifacts/HyperCoreFlowExecutor.sol/HyperCoreFlowExecutor.json +1 -1
  19. package/dist/evm/artifacts/HyperCoreLib.sol/HyperCoreLib.json +1 -1
  20. package/dist/evm/artifacts/HyperliquidDepositHandler.sol/HyperliquidDepositHandler.json +1 -1
  21. package/dist/evm/artifacts/PeripherySigningLib.sol/PeripherySigningLib.json +1 -1
  22. package/dist/evm/artifacts/Solana_Adapter.sol/Solana_Adapter.json +1 -1
  23. package/dist/evm/artifacts/SpokePoolPeriphery.sol/SpokePoolPeriphery.json +1 -1
  24. package/dist/evm/artifacts/SpokePoolPeriphery.sol/SwapProxy.json +1 -1
  25. package/dist/evm/artifacts/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
  26. package/dist/evm/artifacts/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
  27. package/dist/evm/artifacts/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
  28. package/dist/evm/artifacts/SwapHandler.sol/SwapHandler.json +1 -1
  29. package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SpokePoolPeriphery.json +1 -1
  30. package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SwapProxy.json +1 -1
  31. package/dist/src/consts.js +1 -0
  32. package/dist/src/svm/assets/idl/index.d.ts +5 -7
  33. package/dist/src/svm/assets/idl/index.js +6 -14
  34. package/dist/src/svm/assets/idl/sponsored_cctp_src_periphery.json +41 -24
  35. package/dist/src/svm/assets/idl/svm_spoke.json +1001 -2171
  36. package/dist/src/svm/assets/index.d.ts +2 -3
  37. package/dist/src/svm/assets/index.js +0 -1
  38. package/dist/src/svm/assets/sponsored_cctp_src_periphery.d.ts +41 -24
  39. package/dist/src/svm/assets/svm_spoke.d.ts +996 -2166
  40. package/dist/src/svm/assets/token_messenger_minter_v2.d.ts +18 -18
  41. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.d.ts +0 -1
  42. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.js +0 -1
  43. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.d.ts +24 -12
  44. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.js +30 -12
  45. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.d.ts +4 -5
  46. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.js +4 -8
  47. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.d.ts +1 -0
  48. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.js +1 -0
  49. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.d.ts +21 -0
  50. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.js +30 -0
  51. package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.d.ts +2 -2
  52. package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.js +2 -2
  53. package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +0 -3
  54. package/dist/src/svm/clients/SvmSpoke/accounts/index.js +0 -3
  55. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +94 -22
  56. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +133 -24
  57. package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.d.ts +75 -0
  58. package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.js +144 -0
  59. package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.d.ts +16 -8
  60. package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.js +3 -3
  61. package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +2 -7
  62. package/dist/src/svm/clients/SvmSpoke/instructions/index.js +2 -7
  63. package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.d.ts +58 -0
  64. package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.js +134 -0
  65. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +29 -47
  66. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -61
  67. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.d.ts +25 -0
  68. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.js +33 -0
  69. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.d.ts +18 -0
  70. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.js +30 -0
  71. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.d.ts +43 -0
  72. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.js +48 -0
  73. package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +9 -1
  74. package/dist/src/svm/clients/SvmSpoke/types/index.js +9 -1
  75. package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.d.ts +39 -0
  76. package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.js +59 -0
  77. package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.d.ts +17 -0
  78. package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.js +30 -0
  79. package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.d.ts +19 -0
  80. package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.js +28 -0
  81. package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.d.ts +25 -0
  82. package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.js +30 -0
  83. package/dist/src/svm/clients/SvmSpoke/types/v5FillJit.d.ts +22 -0
  84. package/dist/src/svm/clients/SvmSpoke/types/{slowFill.js → v5FillJit.js} +11 -11
  85. package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.d.ts +29 -0
  86. package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.js +38 -0
  87. package/dist/src/svm/web3-v1/cctpV2Helpers.d.ts +51 -65
  88. package/dist/src/svm/web3-v1/cctpV2Helpers.js +1 -1
  89. package/dist/src/svm/web3-v1/coders.d.ts +1 -1
  90. package/dist/src/svm/web3-v1/coders.js +4 -4
  91. package/dist/src/svm/web3-v1/conversionUtils.d.ts +1 -1
  92. package/dist/src/svm/web3-v1/conversionUtils.js +3 -3
  93. package/dist/src/svm/web3-v1/helpers.d.ts +1 -114
  94. package/dist/src/svm/web3-v1/helpers.js +1 -179
  95. package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +11 -26
  96. package/dist/src/svm/web3-v1/instructionParamsUtils.js +5 -90
  97. package/dist/src/svm/web3-v1/programConnectors.d.ts +1 -1
  98. package/dist/src/svm/web3-v1/programConnectors.js +2 -2
  99. package/dist/src/svm/web3-v1/relayHashUtils.d.ts +2 -6
  100. package/dist/src/svm/web3-v1/relayHashUtils.js +5 -66
  101. package/dist/src/svm/web3-v1/solanaProgramUtils.d.ts +1 -1
  102. package/dist/src/svm/web3-v1/solanaProgramUtils.js +7 -7
  103. package/dist/src/svm/web3-v1/transactionUtils.js +3 -3
  104. package/dist/src/svm/web3-v2/solanaProgramUtils.d.ts +1 -1
  105. package/dist/src/svm/web3-v2/solanaProgramUtils.js +4 -4
  106. package/dist/src/types/svm.d.ts +1 -46
  107. package/package.json +28 -13
  108. package/svm/idl/multicall_handler.json +31 -0
  109. package/svm/idl/sponsored_cctp_src_periphery.json +1982 -0
  110. package/svm/idl/svm_spoke.json +3930 -0
  111. package/dist/src/svm/assets/idl/test.json +0 -243
  112. package/dist/src/svm/assets/test.d.ts +0 -249
  113. package/dist/src/svm/assets/test.js +0 -2
  114. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.d.ts +0 -30
  115. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.js +0 -66
  116. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +0 -31
  117. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +0 -70
  118. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +0 -31
  119. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +0 -67
  120. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +0 -27
  121. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +0 -66
  122. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +0 -131
  123. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +0 -241
  124. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +0 -127
  125. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +0 -239
  126. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +0 -104
  127. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.js +0 -259
  128. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +0 -108
  129. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +0 -265
  130. package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.d.ts +0 -39
  131. package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.js +0 -63
  132. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +0 -76
  133. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.js +0 -187
  134. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +0 -135
  135. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +0 -243
  136. package/dist/src/svm/clients/SvmSpoke/types/slowFill.d.ts +0 -22
  137. package/dist/target/types/svm_spoke.d.ts +0 -5106
  138. package/dist/target/types/svm_spoke.js +0 -2
@@ -1,39 +0,0 @@
1
- /**
2
- * This code was AUTOGENERATED using the codama library.
3
- * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
5
- *
6
- * @see https://github.com/codama-idl/codama
7
- */
8
- import { type AccountMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyUint8Array } from '@solana/kit';
9
- import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
- export declare const GET_UNSAFE_DEPOSIT_ID_DISCRIMINATOR: Uint8Array;
11
- export declare function getGetUnsafeDepositIdDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
12
- export type GetUnsafeDepositIdInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<TRemainingAccounts>;
13
- export type GetUnsafeDepositIdInstructionData = {
14
- discriminator: ReadonlyUint8Array;
15
- signer: Address;
16
- depositor: Address;
17
- depositNonce: bigint;
18
- };
19
- export type GetUnsafeDepositIdInstructionDataArgs = {
20
- signer: Address;
21
- depositor: Address;
22
- depositNonce: number | bigint;
23
- };
24
- export declare function getGetUnsafeDepositIdInstructionDataEncoder(): Encoder<GetUnsafeDepositIdInstructionDataArgs>;
25
- export declare function getGetUnsafeDepositIdInstructionDataDecoder(): Decoder<GetUnsafeDepositIdInstructionData>;
26
- export declare function getGetUnsafeDepositIdInstructionDataCodec(): Codec<GetUnsafeDepositIdInstructionDataArgs, GetUnsafeDepositIdInstructionData>;
27
- export type GetUnsafeDepositIdInput = {
28
- signer: GetUnsafeDepositIdInstructionDataArgs['signer'];
29
- depositor: GetUnsafeDepositIdInstructionDataArgs['depositor'];
30
- depositNonce: GetUnsafeDepositIdInstructionDataArgs['depositNonce'];
31
- };
32
- export declare function getGetUnsafeDepositIdInstruction<TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: GetUnsafeDepositIdInput, config?: {
33
- programAddress?: TProgramAddress;
34
- }): GetUnsafeDepositIdInstruction<TProgramAddress>;
35
- export type ParsedGetUnsafeDepositIdInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS> = {
36
- programAddress: Address<TProgram>;
37
- data: GetUnsafeDepositIdInstructionData;
38
- };
39
- export declare function parseGetUnsafeDepositIdInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedGetUnsafeDepositIdInstruction<TProgram>;
@@ -1,63 +0,0 @@
1
- "use strict";
2
- /**
3
- * This code was AUTOGENERATED using the codama library.
4
- * Please DO NOT EDIT THIS FILE, instead use visitors
5
- * to add features, then rerun codama to update it.
6
- *
7
- * @see https://github.com/codama-idl/codama
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.GET_UNSAFE_DEPOSIT_ID_DISCRIMINATOR = void 0;
11
- exports.getGetUnsafeDepositIdDiscriminatorBytes = getGetUnsafeDepositIdDiscriminatorBytes;
12
- exports.getGetUnsafeDepositIdInstructionDataEncoder = getGetUnsafeDepositIdInstructionDataEncoder;
13
- exports.getGetUnsafeDepositIdInstructionDataDecoder = getGetUnsafeDepositIdInstructionDataDecoder;
14
- exports.getGetUnsafeDepositIdInstructionDataCodec = getGetUnsafeDepositIdInstructionDataCodec;
15
- exports.getGetUnsafeDepositIdInstruction = getGetUnsafeDepositIdInstruction;
16
- exports.parseGetUnsafeDepositIdInstruction = parseGetUnsafeDepositIdInstruction;
17
- const kit_1 = require("@solana/kit");
18
- const programs_1 = require("../programs");
19
- exports.GET_UNSAFE_DEPOSIT_ID_DISCRIMINATOR = new Uint8Array([
20
- 118, 10, 135, 0, 168, 243, 223, 117,
21
- ]);
22
- function getGetUnsafeDepositIdDiscriminatorBytes() {
23
- return (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(exports.GET_UNSAFE_DEPOSIT_ID_DISCRIMINATOR);
24
- }
25
- function getGetUnsafeDepositIdInstructionDataEncoder() {
26
- return (0, kit_1.transformEncoder)((0, kit_1.getStructEncoder)([
27
- ['discriminator', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8)],
28
- ['signer', (0, kit_1.getAddressEncoder)()],
29
- ['depositor', (0, kit_1.getAddressEncoder)()],
30
- ['depositNonce', (0, kit_1.getU64Encoder)()],
31
- ]), (value) => ({
32
- ...value,
33
- discriminator: exports.GET_UNSAFE_DEPOSIT_ID_DISCRIMINATOR,
34
- }));
35
- }
36
- function getGetUnsafeDepositIdInstructionDataDecoder() {
37
- return (0, kit_1.getStructDecoder)([
38
- ['discriminator', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 8)],
39
- ['signer', (0, kit_1.getAddressDecoder)()],
40
- ['depositor', (0, kit_1.getAddressDecoder)()],
41
- ['depositNonce', (0, kit_1.getU64Decoder)()],
42
- ]);
43
- }
44
- function getGetUnsafeDepositIdInstructionDataCodec() {
45
- return (0, kit_1.combineCodec)(getGetUnsafeDepositIdInstructionDataEncoder(), getGetUnsafeDepositIdInstructionDataDecoder());
46
- }
47
- function getGetUnsafeDepositIdInstruction(input, config) {
48
- // Program address.
49
- const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
50
- // Original args.
51
- const args = { ...input };
52
- const instruction = {
53
- programAddress,
54
- data: getGetUnsafeDepositIdInstructionDataEncoder().encode(args),
55
- };
56
- return instruction;
57
- }
58
- function parseGetUnsafeDepositIdInstruction(instruction) {
59
- return {
60
- programAddress: instruction.programAddress,
61
- data: getGetUnsafeDepositIdInstructionDataDecoder().decode(instruction.data),
62
- };
63
- }
@@ -1,76 +0,0 @@
1
- /**
2
- * This code was AUTOGENERATED using the codama library.
3
- * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
5
- *
6
- * @see https://github.com/codama-idl/codama
7
- */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
- import { type RelayData, type RelayDataArgs } from '../types';
11
- export declare const REQUEST_SLOW_FILL_DISCRIMINATOR: Uint8Array;
12
- export declare function getRequestSlowFillDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
13
- export type RequestSlowFillInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | AccountMeta<string> = string, TAccountInstructionParams extends string | AccountMeta<string> = string, TAccountState extends string | AccountMeta<string> = string, TAccountFillStatus extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
- TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & AccountSignerMeta<TAccountSigner> : TAccountSigner,
15
- TAccountInstructionParams extends string ? WritableAccount<TAccountInstructionParams> : TAccountInstructionParams,
16
- TAccountState extends string ? ReadonlyAccount<TAccountState> : TAccountState,
17
- TAccountFillStatus extends string ? WritableAccount<TAccountFillStatus> : TAccountFillStatus,
18
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
19
- TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
20
- TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
21
- ...TRemainingAccounts
22
- ]>;
23
- export type RequestSlowFillInstructionData = {
24
- discriminator: ReadonlyUint8Array;
25
- relayHash: ReadonlyUint8Array;
26
- relayData: Option<RelayData>;
27
- };
28
- export type RequestSlowFillInstructionDataArgs = {
29
- relayHash: ReadonlyUint8Array;
30
- relayData: OptionOrNullable<RelayDataArgs>;
31
- };
32
- export declare function getRequestSlowFillInstructionDataEncoder(): Encoder<RequestSlowFillInstructionDataArgs>;
33
- export declare function getRequestSlowFillInstructionDataDecoder(): Decoder<RequestSlowFillInstructionData>;
34
- export declare function getRequestSlowFillInstructionDataCodec(): Codec<RequestSlowFillInstructionDataArgs, RequestSlowFillInstructionData>;
35
- export type RequestSlowFillAsyncInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountFillStatus extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
36
- signer: TransactionSigner<TAccountSigner>;
37
- instructionParams?: Address<TAccountInstructionParams>;
38
- state: Address<TAccountState>;
39
- fillStatus?: Address<TAccountFillStatus>;
40
- systemProgram?: Address<TAccountSystemProgram>;
41
- eventAuthority?: Address<TAccountEventAuthority>;
42
- program: Address<TAccountProgram>;
43
- relayHash: RequestSlowFillInstructionDataArgs['relayHash'];
44
- relayData: RequestSlowFillInstructionDataArgs['relayData'];
45
- };
46
- export declare function getRequestSlowFillInstructionAsync<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountFillStatus extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: RequestSlowFillAsyncInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountFillStatus, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
47
- programAddress?: TProgramAddress;
48
- }): Promise<RequestSlowFillInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountFillStatus, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
49
- export type RequestSlowFillInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountFillStatus extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
50
- signer: TransactionSigner<TAccountSigner>;
51
- instructionParams?: Address<TAccountInstructionParams>;
52
- state: Address<TAccountState>;
53
- fillStatus: Address<TAccountFillStatus>;
54
- systemProgram?: Address<TAccountSystemProgram>;
55
- eventAuthority: Address<TAccountEventAuthority>;
56
- program: Address<TAccountProgram>;
57
- relayHash: RequestSlowFillInstructionDataArgs['relayHash'];
58
- relayData: RequestSlowFillInstructionDataArgs['relayData'];
59
- };
60
- export declare function getRequestSlowFillInstruction<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountFillStatus extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: RequestSlowFillInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountFillStatus, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
61
- programAddress?: TProgramAddress;
62
- }): RequestSlowFillInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountFillStatus, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>;
63
- export type ParsedRequestSlowFillInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
64
- programAddress: Address<TProgram>;
65
- accounts: {
66
- signer: TAccountMetas[0];
67
- instructionParams?: TAccountMetas[1] | undefined;
68
- state: TAccountMetas[2];
69
- fillStatus: TAccountMetas[3];
70
- systemProgram: TAccountMetas[4];
71
- eventAuthority: TAccountMetas[5];
72
- program: TAccountMetas[6];
73
- };
74
- data: RequestSlowFillInstructionData;
75
- };
76
- export declare function parseRequestSlowFillInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRequestSlowFillInstruction<TProgram, TAccountMetas>;
@@ -1,187 +0,0 @@
1
- "use strict";
2
- /**
3
- * This code was AUTOGENERATED using the codama library.
4
- * Please DO NOT EDIT THIS FILE, instead use visitors
5
- * to add features, then rerun codama to update it.
6
- *
7
- * @see https://github.com/codama-idl/codama
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.REQUEST_SLOW_FILL_DISCRIMINATOR = void 0;
11
- exports.getRequestSlowFillDiscriminatorBytes = getRequestSlowFillDiscriminatorBytes;
12
- exports.getRequestSlowFillInstructionDataEncoder = getRequestSlowFillInstructionDataEncoder;
13
- exports.getRequestSlowFillInstructionDataDecoder = getRequestSlowFillInstructionDataDecoder;
14
- exports.getRequestSlowFillInstructionDataCodec = getRequestSlowFillInstructionDataCodec;
15
- exports.getRequestSlowFillInstructionAsync = getRequestSlowFillInstructionAsync;
16
- exports.getRequestSlowFillInstruction = getRequestSlowFillInstruction;
17
- exports.parseRequestSlowFillInstruction = parseRequestSlowFillInstruction;
18
- const kit_1 = require("@solana/kit");
19
- const programs_1 = require("../programs");
20
- const shared_1 = require("../shared");
21
- const types_1 = require("../types");
22
- exports.REQUEST_SLOW_FILL_DISCRIMINATOR = new Uint8Array([
23
- 39, 157, 165, 187, 88, 217, 207, 98,
24
- ]);
25
- function getRequestSlowFillDiscriminatorBytes() {
26
- return (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(exports.REQUEST_SLOW_FILL_DISCRIMINATOR);
27
- }
28
- function getRequestSlowFillInstructionDataEncoder() {
29
- return (0, kit_1.transformEncoder)((0, kit_1.getStructEncoder)([
30
- ['discriminator', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8)],
31
- ['relayHash', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
32
- ['relayData', (0, kit_1.getOptionEncoder)((0, types_1.getRelayDataEncoder)())],
33
- ]), (value) => ({ ...value, discriminator: exports.REQUEST_SLOW_FILL_DISCRIMINATOR }));
34
- }
35
- function getRequestSlowFillInstructionDataDecoder() {
36
- return (0, kit_1.getStructDecoder)([
37
- ['discriminator', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 8)],
38
- ['relayHash', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
39
- ['relayData', (0, kit_1.getOptionDecoder)((0, types_1.getRelayDataDecoder)())],
40
- ]);
41
- }
42
- function getRequestSlowFillInstructionDataCodec() {
43
- return (0, kit_1.combineCodec)(getRequestSlowFillInstructionDataEncoder(), getRequestSlowFillInstructionDataDecoder());
44
- }
45
- async function getRequestSlowFillInstructionAsync(input, config) {
46
- // Program address.
47
- const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
48
- // Original accounts.
49
- const originalAccounts = {
50
- signer: { value: input.signer ?? null, isWritable: true },
51
- instructionParams: {
52
- value: input.instructionParams ?? null,
53
- isWritable: true,
54
- },
55
- state: { value: input.state ?? null, isWritable: false },
56
- fillStatus: { value: input.fillStatus ?? null, isWritable: true },
57
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
58
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
59
- program: { value: input.program ?? null, isWritable: false },
60
- };
61
- const accounts = originalAccounts;
62
- // Original args.
63
- const args = { ...input };
64
- // Resolve default values.
65
- if (!accounts.instructionParams.value) {
66
- accounts.instructionParams.value = await (0, kit_1.getProgramDerivedAddress)({
67
- programAddress,
68
- seeds: [
69
- (0, kit_1.getBytesEncoder)().encode(new Uint8Array([
70
- 105, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 95, 112, 97,
71
- 114, 97, 109, 115,
72
- ])),
73
- (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.signer.value)),
74
- ],
75
- });
76
- }
77
- if (!accounts.fillStatus.value) {
78
- accounts.fillStatus.value = await (0, kit_1.getProgramDerivedAddress)({
79
- programAddress,
80
- seeds: [
81
- (0, kit_1.getBytesEncoder)().encode(new Uint8Array([102, 105, 108, 108, 115])),
82
- (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32).encode((0, shared_1.expectSome)(args.relayHash)),
83
- ],
84
- });
85
- }
86
- if (!accounts.systemProgram.value) {
87
- accounts.systemProgram.value =
88
- '11111111111111111111111111111111';
89
- }
90
- if (!accounts.eventAuthority.value) {
91
- accounts.eventAuthority.value = await (0, kit_1.getProgramDerivedAddress)({
92
- programAddress,
93
- seeds: [
94
- (0, kit_1.getBytesEncoder)().encode(new Uint8Array([
95
- 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114,
96
- 105, 116, 121,
97
- ])),
98
- ],
99
- });
100
- }
101
- const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
102
- const instruction = {
103
- accounts: [
104
- getAccountMeta(accounts.signer),
105
- getAccountMeta(accounts.instructionParams),
106
- getAccountMeta(accounts.state),
107
- getAccountMeta(accounts.fillStatus),
108
- getAccountMeta(accounts.systemProgram),
109
- getAccountMeta(accounts.eventAuthority),
110
- getAccountMeta(accounts.program),
111
- ],
112
- programAddress,
113
- data: getRequestSlowFillInstructionDataEncoder().encode(args),
114
- };
115
- return instruction;
116
- }
117
- function getRequestSlowFillInstruction(input, config) {
118
- // Program address.
119
- const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
120
- // Original accounts.
121
- const originalAccounts = {
122
- signer: { value: input.signer ?? null, isWritable: true },
123
- instructionParams: {
124
- value: input.instructionParams ?? null,
125
- isWritable: true,
126
- },
127
- state: { value: input.state ?? null, isWritable: false },
128
- fillStatus: { value: input.fillStatus ?? null, isWritable: true },
129
- systemProgram: { value: input.systemProgram ?? null, isWritable: false },
130
- eventAuthority: { value: input.eventAuthority ?? null, isWritable: false },
131
- program: { value: input.program ?? null, isWritable: false },
132
- };
133
- const accounts = originalAccounts;
134
- // Original args.
135
- const args = { ...input };
136
- // Resolve default values.
137
- if (!accounts.systemProgram.value) {
138
- accounts.systemProgram.value =
139
- '11111111111111111111111111111111';
140
- }
141
- const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
142
- const instruction = {
143
- accounts: [
144
- getAccountMeta(accounts.signer),
145
- getAccountMeta(accounts.instructionParams),
146
- getAccountMeta(accounts.state),
147
- getAccountMeta(accounts.fillStatus),
148
- getAccountMeta(accounts.systemProgram),
149
- getAccountMeta(accounts.eventAuthority),
150
- getAccountMeta(accounts.program),
151
- ],
152
- programAddress,
153
- data: getRequestSlowFillInstructionDataEncoder().encode(args),
154
- };
155
- return instruction;
156
- }
157
- function parseRequestSlowFillInstruction(instruction) {
158
- if (instruction.accounts.length < 7) {
159
- // TODO: Coded error.
160
- throw new Error('Not enough accounts');
161
- }
162
- let accountIndex = 0;
163
- const getNextAccount = () => {
164
- const accountMeta = instruction.accounts[accountIndex];
165
- accountIndex += 1;
166
- return accountMeta;
167
- };
168
- const getNextOptionalAccount = () => {
169
- const accountMeta = getNextAccount();
170
- return accountMeta.address === programs_1.SVM_SPOKE_PROGRAM_ADDRESS
171
- ? undefined
172
- : accountMeta;
173
- };
174
- return {
175
- programAddress: instruction.programAddress,
176
- accounts: {
177
- signer: getNextAccount(),
178
- instructionParams: getNextOptionalAccount(),
179
- state: getNextAccount(),
180
- fillStatus: getNextAccount(),
181
- systemProgram: getNextAccount(),
182
- eventAuthority: getNextAccount(),
183
- program: getNextAccount(),
184
- },
185
- data: getRequestSlowFillInstructionDataDecoder().decode(instruction.data),
186
- };
187
- }
@@ -1,135 +0,0 @@
1
- /**
2
- * This code was AUTOGENERATED using the codama library.
3
- * Please DO NOT EDIT THIS FILE, instead use visitors
4
- * to add features, then rerun codama to update it.
5
- *
6
- * @see https://github.com/codama-idl/codama
7
- */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
- export declare const UNSAFE_DEPOSIT_DISCRIMINATOR: Uint8Array;
11
- export declare function getUnsafeDepositDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
12
- export type UnsafeDepositInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | AccountMeta<string> = string, TAccountState extends string | AccountMeta<string> = string, TAccountDelegate extends string | AccountMeta<string> = string, TAccountDepositorTokenAccount extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountAssociatedTokenProgram extends string | AccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
- TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & AccountSignerMeta<TAccountSigner> : TAccountSigner,
14
- TAccountState extends string ? WritableAccount<TAccountState> : TAccountState,
15
- TAccountDelegate extends string ? ReadonlyAccount<TAccountDelegate> : TAccountDelegate,
16
- TAccountDepositorTokenAccount extends string ? WritableAccount<TAccountDepositorTokenAccount> : TAccountDepositorTokenAccount,
17
- TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
18
- TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
19
- TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
20
- TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram,
21
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
22
- TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
23
- TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
24
- ...TRemainingAccounts
25
- ]>;
26
- export type UnsafeDepositInstructionData = {
27
- discriminator: ReadonlyUint8Array;
28
- depositor: Address;
29
- recipient: Address;
30
- inputToken: Address;
31
- outputToken: Address;
32
- inputAmount: bigint;
33
- outputAmount: ReadonlyUint8Array;
34
- destinationChainId: bigint;
35
- exclusiveRelayer: Address;
36
- depositNonce: bigint;
37
- quoteTimestamp: number;
38
- fillDeadline: number;
39
- exclusivityParameter: number;
40
- message: ReadonlyUint8Array;
41
- };
42
- export type UnsafeDepositInstructionDataArgs = {
43
- depositor: Address;
44
- recipient: Address;
45
- inputToken: Address;
46
- outputToken: Address;
47
- inputAmount: number | bigint;
48
- outputAmount: ReadonlyUint8Array;
49
- destinationChainId: number | bigint;
50
- exclusiveRelayer: Address;
51
- depositNonce: number | bigint;
52
- quoteTimestamp: number;
53
- fillDeadline: number;
54
- exclusivityParameter: number;
55
- message: ReadonlyUint8Array;
56
- };
57
- export declare function getUnsafeDepositInstructionDataEncoder(): Encoder<UnsafeDepositInstructionDataArgs>;
58
- export declare function getUnsafeDepositInstructionDataDecoder(): Decoder<UnsafeDepositInstructionData>;
59
- export declare function getUnsafeDepositInstructionDataCodec(): Codec<UnsafeDepositInstructionDataArgs, UnsafeDepositInstructionData>;
60
- export type UnsafeDepositAsyncInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountDelegate extends string = string, TAccountDepositorTokenAccount extends string = string, TAccountVault extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
61
- signer: TransactionSigner<TAccountSigner>;
62
- state: Address<TAccountState>;
63
- delegate: Address<TAccountDelegate>;
64
- depositorTokenAccount?: Address<TAccountDepositorTokenAccount>;
65
- vault?: Address<TAccountVault>;
66
- mint: Address<TAccountMint>;
67
- tokenProgram?: Address<TAccountTokenProgram>;
68
- associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
69
- systemProgram?: Address<TAccountSystemProgram>;
70
- eventAuthority?: Address<TAccountEventAuthority>;
71
- program: Address<TAccountProgram>;
72
- depositor: UnsafeDepositInstructionDataArgs['depositor'];
73
- recipient: UnsafeDepositInstructionDataArgs['recipient'];
74
- inputToken: UnsafeDepositInstructionDataArgs['inputToken'];
75
- outputToken: UnsafeDepositInstructionDataArgs['outputToken'];
76
- inputAmount: UnsafeDepositInstructionDataArgs['inputAmount'];
77
- outputAmount: UnsafeDepositInstructionDataArgs['outputAmount'];
78
- destinationChainId: UnsafeDepositInstructionDataArgs['destinationChainId'];
79
- exclusiveRelayer: UnsafeDepositInstructionDataArgs['exclusiveRelayer'];
80
- depositNonce: UnsafeDepositInstructionDataArgs['depositNonce'];
81
- quoteTimestamp: UnsafeDepositInstructionDataArgs['quoteTimestamp'];
82
- fillDeadline: UnsafeDepositInstructionDataArgs['fillDeadline'];
83
- exclusivityParameter: UnsafeDepositInstructionDataArgs['exclusivityParameter'];
84
- message: UnsafeDepositInstructionDataArgs['message'];
85
- };
86
- export declare function getUnsafeDepositInstructionAsync<TAccountSigner extends string, TAccountState extends string, TAccountDelegate extends string, TAccountDepositorTokenAccount extends string, TAccountVault extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: UnsafeDepositAsyncInput<TAccountSigner, TAccountState, TAccountDelegate, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
87
- programAddress?: TProgramAddress;
88
- }): Promise<UnsafeDepositInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountDelegate, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
89
- export type UnsafeDepositInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountDelegate extends string = string, TAccountDepositorTokenAccount extends string = string, TAccountVault extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
90
- signer: TransactionSigner<TAccountSigner>;
91
- state: Address<TAccountState>;
92
- delegate: Address<TAccountDelegate>;
93
- depositorTokenAccount: Address<TAccountDepositorTokenAccount>;
94
- vault: Address<TAccountVault>;
95
- mint: Address<TAccountMint>;
96
- tokenProgram?: Address<TAccountTokenProgram>;
97
- associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
98
- systemProgram?: Address<TAccountSystemProgram>;
99
- eventAuthority: Address<TAccountEventAuthority>;
100
- program: Address<TAccountProgram>;
101
- depositor: UnsafeDepositInstructionDataArgs['depositor'];
102
- recipient: UnsafeDepositInstructionDataArgs['recipient'];
103
- inputToken: UnsafeDepositInstructionDataArgs['inputToken'];
104
- outputToken: UnsafeDepositInstructionDataArgs['outputToken'];
105
- inputAmount: UnsafeDepositInstructionDataArgs['inputAmount'];
106
- outputAmount: UnsafeDepositInstructionDataArgs['outputAmount'];
107
- destinationChainId: UnsafeDepositInstructionDataArgs['destinationChainId'];
108
- exclusiveRelayer: UnsafeDepositInstructionDataArgs['exclusiveRelayer'];
109
- depositNonce: UnsafeDepositInstructionDataArgs['depositNonce'];
110
- quoteTimestamp: UnsafeDepositInstructionDataArgs['quoteTimestamp'];
111
- fillDeadline: UnsafeDepositInstructionDataArgs['fillDeadline'];
112
- exclusivityParameter: UnsafeDepositInstructionDataArgs['exclusivityParameter'];
113
- message: UnsafeDepositInstructionDataArgs['message'];
114
- };
115
- export declare function getUnsafeDepositInstruction<TAccountSigner extends string, TAccountState extends string, TAccountDelegate extends string, TAccountDepositorTokenAccount extends string, TAccountVault extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: UnsafeDepositInput<TAccountSigner, TAccountState, TAccountDelegate, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
116
- programAddress?: TProgramAddress;
117
- }): UnsafeDepositInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountDelegate, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>;
118
- export type ParsedUnsafeDepositInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
119
- programAddress: Address<TProgram>;
120
- accounts: {
121
- signer: TAccountMetas[0];
122
- state: TAccountMetas[1];
123
- delegate: TAccountMetas[2];
124
- depositorTokenAccount: TAccountMetas[3];
125
- vault: TAccountMetas[4];
126
- mint: TAccountMetas[5];
127
- tokenProgram: TAccountMetas[6];
128
- associatedTokenProgram: TAccountMetas[7];
129
- systemProgram: TAccountMetas[8];
130
- eventAuthority: TAccountMetas[9];
131
- program: TAccountMetas[10];
132
- };
133
- data: UnsafeDepositInstructionData;
134
- };
135
- export declare function parseUnsafeDepositInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUnsafeDepositInstruction<TProgram, TAccountMetas>;