@across-protocol/contracts 4.0.1 → 4.0.3

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 (74) hide show
  1. package/dist/deploy/consts.d.ts +1 -1
  2. package/dist/deploy/consts.js +9 -13
  3. package/dist/deployments/deployments.json +24 -1
  4. package/dist/hardhat.config.js +17 -1
  5. package/dist/scripts/svm/fakeFillWithRandomDistribution.js +2 -2
  6. package/dist/scripts/svm/queryEvents.js +1 -1
  7. package/dist/scripts/svm/simpleDeposit.js +3 -3
  8. package/dist/scripts/svm/simpleFakeRelayerRepayment.js +1 -1
  9. package/dist/scripts/svm/simpleFill.js +19 -6
  10. package/dist/src/svm/assets/idl/svm_spoke.json +388 -388
  11. package/dist/src/svm/assets/svm_spoke.d.ts +388 -388
  12. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +31 -0
  13. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +70 -0
  14. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +31 -0
  15. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +67 -0
  16. package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +3 -3
  17. package/dist/src/svm/clients/SvmSpoke/accounts/index.js +3 -3
  18. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +27 -0
  19. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +66 -0
  20. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +123 -0
  21. package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3.js → deposit.js} +23 -23
  22. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +119 -0
  23. package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3Now.js → depositNow.js} +23 -23
  24. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +104 -0
  25. package/dist/src/svm/clients/SvmSpoke/instructions/{executeV3SlowRelayLeaf.js → executeSlowRelayLeaf.js} +26 -26
  26. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +104 -0
  27. package/dist/src/svm/clients/SvmSpoke/instructions/{fillV3Relay.js → fillRelay.js} +26 -26
  28. package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +6 -6
  29. package/dist/src/svm/clients/SvmSpoke/instructions/index.js +6 -6
  30. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +76 -0
  31. package/dist/src/svm/clients/SvmSpoke/instructions/{requestV3SlowFill.js → requestSlowFill.js} +25 -25
  32. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +127 -0
  33. package/dist/src/svm/clients/SvmSpoke/instructions/{unsafeDepositV3.js → unsafeDeposit.js} +23 -23
  34. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +23 -23
  35. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -29
  36. package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.d.ts → filledRelay.d.ts} +8 -8
  37. package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.js → filledRelay.js} +9 -9
  38. package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.d.ts → fundsDeposited.d.ts} +5 -5
  39. package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.js → fundsDeposited.js} +7 -7
  40. package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +6 -6
  41. package/dist/src/svm/clients/SvmSpoke/types/index.js +6 -6
  42. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.d.ts → relayData.d.ts} +5 -5
  43. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.js → relayData.js} +7 -7
  44. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.d.ts → relayExecutionEventInfo.d.ts} +5 -5
  45. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.js → relayExecutionEventInfo.js} +7 -7
  46. package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.d.ts → requestedSlowFill.d.ts} +5 -5
  47. package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.js → requestedSlowFill.js} +7 -7
  48. package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.d.ts → slowFill.d.ts} +8 -8
  49. package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.js → slowFill.js} +9 -9
  50. package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +8 -8
  51. package/dist/src/svm/web3-v1/instructionParamsUtils.js +16 -16
  52. package/dist/src/types/svm.d.ts +6 -6
  53. package/dist/target/types/svm_spoke.d.ts +388 -388
  54. package/dist/tasks/enableL1TokenAcrossEcosystem.js +14 -10
  55. package/dist/test/svm/SvmSpoke.Deposit.js +48 -47
  56. package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +2 -2
  57. package/dist/test/svm/SvmSpoke.Fill.js +28 -56
  58. package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +13 -13
  59. package/dist/test/svm/SvmSpoke.SlowFill.js +40 -40
  60. package/dist/utils/constants.d.ts +1 -1
  61. package/dist/utils/constants.js +3 -1
  62. package/package.json +2 -2
  63. package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.d.ts +0 -31
  64. package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.js +0 -70
  65. package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.d.ts +0 -31
  66. package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.js +0 -67
  67. package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.d.ts +0 -27
  68. package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.js +0 -66
  69. package/dist/src/svm/clients/SvmSpoke/instructions/depositV3.d.ts +0 -123
  70. package/dist/src/svm/clients/SvmSpoke/instructions/depositV3Now.d.ts +0 -119
  71. package/dist/src/svm/clients/SvmSpoke/instructions/executeV3SlowRelayLeaf.d.ts +0 -104
  72. package/dist/src/svm/clients/SvmSpoke/instructions/fillV3Relay.d.ts +0 -104
  73. package/dist/src/svm/clients/SvmSpoke/instructions/requestV3SlowFill.d.ts +0 -76
  74. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDepositV3.d.ts +0 -127
@@ -0,0 +1,119 @@
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 Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/web3-v2.js';
9
+ import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
+ export declare const DEPOSIT_NOW_DISCRIMINATOR: Uint8Array;
11
+ export declare function getDepositNowDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type DepositNowInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | IAccountMeta<string> = string, TAccountState extends string | IAccountMeta<string> = string, TAccountRoute extends string | IAccountMeta<string> = string, TAccountDepositorTokenAccount extends string | IAccountMeta<string> = string, TAccountVault extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountTokenProgram extends string | IAccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountEventAuthority extends string | IAccountMeta<string> = string, TAccountProgram extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
13
+ TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & IAccountSignerMeta<TAccountSigner> : TAccountSigner,
14
+ TAccountState extends string ? WritableAccount<TAccountState> : TAccountState,
15
+ TAccountRoute extends string ? ReadonlyAccount<TAccountRoute> : TAccountRoute,
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
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
21
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
22
+ ...TRemainingAccounts
23
+ ]>;
24
+ export type DepositNowInstructionData = {
25
+ discriminator: ReadonlyUint8Array;
26
+ depositor: Address;
27
+ recipient: Address;
28
+ inputToken: Address;
29
+ outputToken: Address;
30
+ inputAmount: bigint;
31
+ outputAmount: bigint;
32
+ destinationChainId: bigint;
33
+ exclusiveRelayer: Address;
34
+ fillDeadlineOffset: number;
35
+ exclusivityParameter: number;
36
+ message: ReadonlyUint8Array;
37
+ };
38
+ export type DepositNowInstructionDataArgs = {
39
+ depositor: Address;
40
+ recipient: Address;
41
+ inputToken: Address;
42
+ outputToken: Address;
43
+ inputAmount: number | bigint;
44
+ outputAmount: number | bigint;
45
+ destinationChainId: number | bigint;
46
+ exclusiveRelayer: Address;
47
+ fillDeadlineOffset: number;
48
+ exclusivityParameter: number;
49
+ message: ReadonlyUint8Array;
50
+ };
51
+ export declare function getDepositNowInstructionDataEncoder(): Encoder<DepositNowInstructionDataArgs>;
52
+ export declare function getDepositNowInstructionDataDecoder(): Decoder<DepositNowInstructionData>;
53
+ export declare function getDepositNowInstructionDataCodec(): Codec<DepositNowInstructionDataArgs, DepositNowInstructionData>;
54
+ export type DepositNowAsyncInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountRoute extends string = string, TAccountDepositorTokenAccount extends string = string, TAccountVault extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
55
+ signer: TransactionSigner<TAccountSigner>;
56
+ state: Address<TAccountState>;
57
+ route: Address<TAccountRoute>;
58
+ depositorTokenAccount?: Address<TAccountDepositorTokenAccount>;
59
+ vault?: Address<TAccountVault>;
60
+ mint: Address<TAccountMint>;
61
+ tokenProgram?: Address<TAccountTokenProgram>;
62
+ eventAuthority?: Address<TAccountEventAuthority>;
63
+ program: Address<TAccountProgram>;
64
+ depositor: DepositNowInstructionDataArgs['depositor'];
65
+ recipient: DepositNowInstructionDataArgs['recipient'];
66
+ inputToken: DepositNowInstructionDataArgs['inputToken'];
67
+ outputToken: DepositNowInstructionDataArgs['outputToken'];
68
+ inputAmount: DepositNowInstructionDataArgs['inputAmount'];
69
+ outputAmount: DepositNowInstructionDataArgs['outputAmount'];
70
+ destinationChainId: DepositNowInstructionDataArgs['destinationChainId'];
71
+ exclusiveRelayer: DepositNowInstructionDataArgs['exclusiveRelayer'];
72
+ fillDeadlineOffset: DepositNowInstructionDataArgs['fillDeadlineOffset'];
73
+ exclusivityParameter: DepositNowInstructionDataArgs['exclusivityParameter'];
74
+ message: DepositNowInstructionDataArgs['message'];
75
+ };
76
+ export declare function getDepositNowInstructionAsync<TAccountSigner extends string, TAccountState extends string, TAccountRoute extends string, TAccountDepositorTokenAccount extends string, TAccountVault extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: DepositNowAsyncInput<TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>, config?: {
77
+ programAddress?: TProgramAddress;
78
+ }): Promise<DepositNowInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>>;
79
+ export type DepositNowInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountRoute extends string = string, TAccountDepositorTokenAccount extends string = string, TAccountVault extends string = string, TAccountMint extends string = string, TAccountTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
80
+ signer: TransactionSigner<TAccountSigner>;
81
+ state: Address<TAccountState>;
82
+ route: Address<TAccountRoute>;
83
+ depositorTokenAccount: Address<TAccountDepositorTokenAccount>;
84
+ vault: Address<TAccountVault>;
85
+ mint: Address<TAccountMint>;
86
+ tokenProgram?: Address<TAccountTokenProgram>;
87
+ eventAuthority: Address<TAccountEventAuthority>;
88
+ program: Address<TAccountProgram>;
89
+ depositor: DepositNowInstructionDataArgs['depositor'];
90
+ recipient: DepositNowInstructionDataArgs['recipient'];
91
+ inputToken: DepositNowInstructionDataArgs['inputToken'];
92
+ outputToken: DepositNowInstructionDataArgs['outputToken'];
93
+ inputAmount: DepositNowInstructionDataArgs['inputAmount'];
94
+ outputAmount: DepositNowInstructionDataArgs['outputAmount'];
95
+ destinationChainId: DepositNowInstructionDataArgs['destinationChainId'];
96
+ exclusiveRelayer: DepositNowInstructionDataArgs['exclusiveRelayer'];
97
+ fillDeadlineOffset: DepositNowInstructionDataArgs['fillDeadlineOffset'];
98
+ exclusivityParameter: DepositNowInstructionDataArgs['exclusivityParameter'];
99
+ message: DepositNowInstructionDataArgs['message'];
100
+ };
101
+ export declare function getDepositNowInstruction<TAccountSigner extends string, TAccountState extends string, TAccountRoute extends string, TAccountDepositorTokenAccount extends string, TAccountVault extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: DepositNowInput<TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>, config?: {
102
+ programAddress?: TProgramAddress;
103
+ }): DepositNowInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>;
104
+ export type ParsedDepositNowInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
105
+ programAddress: Address<TProgram>;
106
+ accounts: {
107
+ signer: TAccountMetas[0];
108
+ state: TAccountMetas[1];
109
+ route: TAccountMetas[2];
110
+ depositorTokenAccount: TAccountMetas[3];
111
+ vault: TAccountMetas[4];
112
+ mint: TAccountMetas[5];
113
+ tokenProgram: TAccountMetas[6];
114
+ eventAuthority: TAccountMetas[7];
115
+ program: TAccountMetas[8];
116
+ };
117
+ data: DepositNowInstructionData;
118
+ };
119
+ export declare function parseDepositNowInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedDepositNowInstruction<TProgram, TAccountMetas>;
@@ -7,24 +7,24 @@
7
7
  * @see https://github.com/codama-idl/codama
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DEPOSIT_V3_NOW_DISCRIMINATOR = void 0;
11
- exports.getDepositV3NowDiscriminatorBytes = getDepositV3NowDiscriminatorBytes;
12
- exports.getDepositV3NowInstructionDataEncoder = getDepositV3NowInstructionDataEncoder;
13
- exports.getDepositV3NowInstructionDataDecoder = getDepositV3NowInstructionDataDecoder;
14
- exports.getDepositV3NowInstructionDataCodec = getDepositV3NowInstructionDataCodec;
15
- exports.getDepositV3NowInstructionAsync = getDepositV3NowInstructionAsync;
16
- exports.getDepositV3NowInstruction = getDepositV3NowInstruction;
17
- exports.parseDepositV3NowInstruction = parseDepositV3NowInstruction;
10
+ exports.DEPOSIT_NOW_DISCRIMINATOR = void 0;
11
+ exports.getDepositNowDiscriminatorBytes = getDepositNowDiscriminatorBytes;
12
+ exports.getDepositNowInstructionDataEncoder = getDepositNowInstructionDataEncoder;
13
+ exports.getDepositNowInstructionDataDecoder = getDepositNowInstructionDataDecoder;
14
+ exports.getDepositNowInstructionDataCodec = getDepositNowInstructionDataCodec;
15
+ exports.getDepositNowInstructionAsync = getDepositNowInstructionAsync;
16
+ exports.getDepositNowInstruction = getDepositNowInstruction;
17
+ exports.parseDepositNowInstruction = parseDepositNowInstruction;
18
18
  const web3_v2_js_1 = require("@solana/web3-v2.js");
19
19
  const programs_1 = require("../programs");
20
20
  const shared_1 = require("../shared");
21
- exports.DEPOSIT_V3_NOW_DISCRIMINATOR = new Uint8Array([
22
- 139, 2, 230, 236, 252, 188, 136, 68,
21
+ exports.DEPOSIT_NOW_DISCRIMINATOR = new Uint8Array([
22
+ 75, 228, 135, 221, 200, 25, 148, 26,
23
23
  ]);
24
- function getDepositV3NowDiscriminatorBytes() {
25
- return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.DEPOSIT_V3_NOW_DISCRIMINATOR);
24
+ function getDepositNowDiscriminatorBytes() {
25
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.DEPOSIT_NOW_DISCRIMINATOR);
26
26
  }
27
- function getDepositV3NowInstructionDataEncoder() {
27
+ function getDepositNowInstructionDataEncoder() {
28
28
  return (0, web3_v2_js_1.transformEncoder)((0, web3_v2_js_1.getStructEncoder)([
29
29
  ['discriminator', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8)],
30
30
  ['depositor', (0, web3_v2_js_1.getAddressEncoder)()],
@@ -38,9 +38,9 @@ function getDepositV3NowInstructionDataEncoder() {
38
38
  ['fillDeadlineOffset', (0, web3_v2_js_1.getU32Encoder)()],
39
39
  ['exclusivityParameter', (0, web3_v2_js_1.getU32Encoder)()],
40
40
  ['message', (0, web3_v2_js_1.addEncoderSizePrefix)((0, web3_v2_js_1.getBytesEncoder)(), (0, web3_v2_js_1.getU32Encoder)())],
41
- ]), (value) => ({ ...value, discriminator: exports.DEPOSIT_V3_NOW_DISCRIMINATOR }));
41
+ ]), (value) => ({ ...value, discriminator: exports.DEPOSIT_NOW_DISCRIMINATOR }));
42
42
  }
43
- function getDepositV3NowInstructionDataDecoder() {
43
+ function getDepositNowInstructionDataDecoder() {
44
44
  return (0, web3_v2_js_1.getStructDecoder)([
45
45
  ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
46
46
  ['depositor', (0, web3_v2_js_1.getAddressDecoder)()],
@@ -56,10 +56,10 @@ function getDepositV3NowInstructionDataDecoder() {
56
56
  ['message', (0, web3_v2_js_1.addDecoderSizePrefix)((0, web3_v2_js_1.getBytesDecoder)(), (0, web3_v2_js_1.getU32Decoder)())],
57
57
  ]);
58
58
  }
59
- function getDepositV3NowInstructionDataCodec() {
60
- return (0, web3_v2_js_1.combineCodec)(getDepositV3NowInstructionDataEncoder(), getDepositV3NowInstructionDataDecoder());
59
+ function getDepositNowInstructionDataCodec() {
60
+ return (0, web3_v2_js_1.combineCodec)(getDepositNowInstructionDataEncoder(), getDepositNowInstructionDataDecoder());
61
61
  }
62
- async function getDepositV3NowInstructionAsync(input, config) {
62
+ async function getDepositNowInstructionAsync(input, config) {
63
63
  // Program address.
64
64
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
65
65
  // Original accounts.
@@ -130,11 +130,11 @@ async function getDepositV3NowInstructionAsync(input, config) {
130
130
  getAccountMeta(accounts.program),
131
131
  ],
132
132
  programAddress,
133
- data: getDepositV3NowInstructionDataEncoder().encode(args),
133
+ data: getDepositNowInstructionDataEncoder().encode(args),
134
134
  };
135
135
  return instruction;
136
136
  }
137
- function getDepositV3NowInstruction(input, config) {
137
+ function getDepositNowInstruction(input, config) {
138
138
  // Program address.
139
139
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
140
140
  // Original accounts.
@@ -174,11 +174,11 @@ function getDepositV3NowInstruction(input, config) {
174
174
  getAccountMeta(accounts.program),
175
175
  ],
176
176
  programAddress,
177
- data: getDepositV3NowInstructionDataEncoder().encode(args),
177
+ data: getDepositNowInstructionDataEncoder().encode(args),
178
178
  };
179
179
  return instruction;
180
180
  }
181
- function parseDepositV3NowInstruction(instruction) {
181
+ function parseDepositNowInstruction(instruction) {
182
182
  if (instruction.accounts.length < 9) {
183
183
  // TODO: Coded error.
184
184
  throw new Error('Not enough accounts');
@@ -202,6 +202,6 @@ function parseDepositV3NowInstruction(instruction) {
202
202
  eventAuthority: getNextAccount(),
203
203
  program: getNextAccount(),
204
204
  },
205
- data: getDepositV3NowInstructionDataDecoder().decode(instruction.data),
205
+ data: getDepositNowInstructionDataDecoder().decode(instruction.data),
206
206
  };
207
207
  }
@@ -0,0 +1,104 @@
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 Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/web3-v2.js';
9
+ import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
+ import { type SlowFill, type SlowFillArgs } from '../types';
11
+ export declare const EXECUTE_SLOW_RELAY_LEAF_DISCRIMINATOR: Uint8Array;
12
+ export declare function getExecuteSlowRelayLeafDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type ExecuteSlowRelayLeafInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | IAccountMeta<string> = string, TAccountInstructionParams extends string | IAccountMeta<string> = string, TAccountState extends string | IAccountMeta<string> = string, TAccountRootBundle extends string | IAccountMeta<string> = string, TAccountFillStatus extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountRecipientTokenAccount extends string | IAccountMeta<string> = string, TAccountVault extends string | IAccountMeta<string> = string, TAccountTokenProgram extends string | IAccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountSystemProgram extends string | IAccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | IAccountMeta<string> = string, TAccountProgram extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
14
+ TAccountSigner extends string ? ReadonlySignerAccount<TAccountSigner> & IAccountSignerMeta<TAccountSigner> : TAccountSigner,
15
+ TAccountInstructionParams extends string ? WritableAccount<TAccountInstructionParams> : TAccountInstructionParams,
16
+ TAccountState extends string ? ReadonlyAccount<TAccountState> : TAccountState,
17
+ TAccountRootBundle extends string ? ReadonlyAccount<TAccountRootBundle> : TAccountRootBundle,
18
+ TAccountFillStatus extends string ? WritableAccount<TAccountFillStatus> : TAccountFillStatus,
19
+ TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
20
+ TAccountRecipientTokenAccount extends string ? WritableAccount<TAccountRecipientTokenAccount> : TAccountRecipientTokenAccount,
21
+ TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
22
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
23
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
24
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
25
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
26
+ ...TRemainingAccounts
27
+ ]>;
28
+ export type ExecuteSlowRelayLeafInstructionData = {
29
+ discriminator: ReadonlyUint8Array;
30
+ relayHash: ReadonlyUint8Array;
31
+ slowFillLeaf: Option<SlowFill>;
32
+ rootBundleId: Option<number>;
33
+ proof: Option<Array<ReadonlyUint8Array>>;
34
+ };
35
+ export type ExecuteSlowRelayLeafInstructionDataArgs = {
36
+ relayHash: ReadonlyUint8Array;
37
+ slowFillLeaf: OptionOrNullable<SlowFillArgs>;
38
+ rootBundleId: OptionOrNullable<number>;
39
+ proof: OptionOrNullable<Array<ReadonlyUint8Array>>;
40
+ };
41
+ export declare function getExecuteSlowRelayLeafInstructionDataEncoder(): Encoder<ExecuteSlowRelayLeafInstructionDataArgs>;
42
+ export declare function getExecuteSlowRelayLeafInstructionDataDecoder(): Decoder<ExecuteSlowRelayLeafInstructionData>;
43
+ export declare function getExecuteSlowRelayLeafInstructionDataCodec(): Codec<ExecuteSlowRelayLeafInstructionDataArgs, ExecuteSlowRelayLeafInstructionData>;
44
+ export type ExecuteSlowRelayLeafAsyncInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountRootBundle extends string = string, TAccountFillStatus extends string = string, TAccountMint extends string = string, TAccountRecipientTokenAccount extends string = string, TAccountVault extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
45
+ signer: TransactionSigner<TAccountSigner>;
46
+ instructionParams?: Address<TAccountInstructionParams>;
47
+ state: Address<TAccountState>;
48
+ rootBundle: Address<TAccountRootBundle>;
49
+ fillStatus?: Address<TAccountFillStatus>;
50
+ mint: Address<TAccountMint>;
51
+ recipientTokenAccount?: Address<TAccountRecipientTokenAccount>;
52
+ vault?: Address<TAccountVault>;
53
+ tokenProgram?: Address<TAccountTokenProgram>;
54
+ systemProgram?: Address<TAccountSystemProgram>;
55
+ eventAuthority?: Address<TAccountEventAuthority>;
56
+ program: Address<TAccountProgram>;
57
+ relayHash: ExecuteSlowRelayLeafInstructionDataArgs['relayHash'];
58
+ slowFillLeaf: ExecuteSlowRelayLeafInstructionDataArgs['slowFillLeaf'];
59
+ rootBundleId: ExecuteSlowRelayLeafInstructionDataArgs['rootBundleId'];
60
+ proof: ExecuteSlowRelayLeafInstructionDataArgs['proof'];
61
+ };
62
+ export declare function getExecuteSlowRelayLeafInstructionAsync<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountRootBundle extends string, TAccountFillStatus extends string, TAccountMint extends string, TAccountRecipientTokenAccount extends string, TAccountVault extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: ExecuteSlowRelayLeafAsyncInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountRootBundle, TAccountFillStatus, TAccountMint, TAccountRecipientTokenAccount, TAccountVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
63
+ programAddress?: TProgramAddress;
64
+ }): Promise<ExecuteSlowRelayLeafInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountRootBundle, TAccountFillStatus, TAccountMint, TAccountRecipientTokenAccount, TAccountVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
65
+ export type ExecuteSlowRelayLeafInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountRootBundle extends string = string, TAccountFillStatus extends string = string, TAccountMint extends string = string, TAccountRecipientTokenAccount extends string = string, TAccountVault extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
66
+ signer: TransactionSigner<TAccountSigner>;
67
+ instructionParams?: Address<TAccountInstructionParams>;
68
+ state: Address<TAccountState>;
69
+ rootBundle: Address<TAccountRootBundle>;
70
+ fillStatus: Address<TAccountFillStatus>;
71
+ mint: Address<TAccountMint>;
72
+ recipientTokenAccount: Address<TAccountRecipientTokenAccount>;
73
+ vault: Address<TAccountVault>;
74
+ tokenProgram?: Address<TAccountTokenProgram>;
75
+ systemProgram?: Address<TAccountSystemProgram>;
76
+ eventAuthority: Address<TAccountEventAuthority>;
77
+ program: Address<TAccountProgram>;
78
+ relayHash: ExecuteSlowRelayLeafInstructionDataArgs['relayHash'];
79
+ slowFillLeaf: ExecuteSlowRelayLeafInstructionDataArgs['slowFillLeaf'];
80
+ rootBundleId: ExecuteSlowRelayLeafInstructionDataArgs['rootBundleId'];
81
+ proof: ExecuteSlowRelayLeafInstructionDataArgs['proof'];
82
+ };
83
+ export declare function getExecuteSlowRelayLeafInstruction<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountRootBundle extends string, TAccountFillStatus extends string, TAccountMint extends string, TAccountRecipientTokenAccount extends string, TAccountVault extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: ExecuteSlowRelayLeafInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountRootBundle, TAccountFillStatus, TAccountMint, TAccountRecipientTokenAccount, TAccountVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
84
+ programAddress?: TProgramAddress;
85
+ }): ExecuteSlowRelayLeafInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountRootBundle, TAccountFillStatus, TAccountMint, TAccountRecipientTokenAccount, TAccountVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>;
86
+ export type ParsedExecuteSlowRelayLeafInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
87
+ programAddress: Address<TProgram>;
88
+ accounts: {
89
+ signer: TAccountMetas[0];
90
+ instructionParams?: TAccountMetas[1] | undefined;
91
+ state: TAccountMetas[2];
92
+ rootBundle: TAccountMetas[3];
93
+ fillStatus: TAccountMetas[4];
94
+ mint: TAccountMetas[5];
95
+ recipientTokenAccount: TAccountMetas[6];
96
+ vault: TAccountMetas[7];
97
+ tokenProgram: TAccountMetas[8];
98
+ systemProgram: TAccountMetas[9];
99
+ eventAuthority: TAccountMetas[10];
100
+ program: TAccountMetas[11];
101
+ };
102
+ data: ExecuteSlowRelayLeafInstructionData;
103
+ };
104
+ export declare function parseExecuteSlowRelayLeafInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedExecuteSlowRelayLeafInstruction<TProgram, TAccountMetas>;
@@ -7,29 +7,29 @@
7
7
  * @see https://github.com/codama-idl/codama
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.EXECUTE_V3_SLOW_RELAY_LEAF_DISCRIMINATOR = void 0;
11
- exports.getExecuteV3SlowRelayLeafDiscriminatorBytes = getExecuteV3SlowRelayLeafDiscriminatorBytes;
12
- exports.getExecuteV3SlowRelayLeafInstructionDataEncoder = getExecuteV3SlowRelayLeafInstructionDataEncoder;
13
- exports.getExecuteV3SlowRelayLeafInstructionDataDecoder = getExecuteV3SlowRelayLeafInstructionDataDecoder;
14
- exports.getExecuteV3SlowRelayLeafInstructionDataCodec = getExecuteV3SlowRelayLeafInstructionDataCodec;
15
- exports.getExecuteV3SlowRelayLeafInstructionAsync = getExecuteV3SlowRelayLeafInstructionAsync;
16
- exports.getExecuteV3SlowRelayLeafInstruction = getExecuteV3SlowRelayLeafInstruction;
17
- exports.parseExecuteV3SlowRelayLeafInstruction = parseExecuteV3SlowRelayLeafInstruction;
10
+ exports.EXECUTE_SLOW_RELAY_LEAF_DISCRIMINATOR = void 0;
11
+ exports.getExecuteSlowRelayLeafDiscriminatorBytes = getExecuteSlowRelayLeafDiscriminatorBytes;
12
+ exports.getExecuteSlowRelayLeafInstructionDataEncoder = getExecuteSlowRelayLeafInstructionDataEncoder;
13
+ exports.getExecuteSlowRelayLeafInstructionDataDecoder = getExecuteSlowRelayLeafInstructionDataDecoder;
14
+ exports.getExecuteSlowRelayLeafInstructionDataCodec = getExecuteSlowRelayLeafInstructionDataCodec;
15
+ exports.getExecuteSlowRelayLeafInstructionAsync = getExecuteSlowRelayLeafInstructionAsync;
16
+ exports.getExecuteSlowRelayLeafInstruction = getExecuteSlowRelayLeafInstruction;
17
+ exports.parseExecuteSlowRelayLeafInstruction = parseExecuteSlowRelayLeafInstruction;
18
18
  const web3_v2_js_1 = require("@solana/web3-v2.js");
19
19
  const programs_1 = require("../programs");
20
20
  const shared_1 = require("../shared");
21
21
  const types_1 = require("../types");
22
- exports.EXECUTE_V3_SLOW_RELAY_LEAF_DISCRIMINATOR = new Uint8Array([
23
- 198, 223, 194, 60, 138, 154, 62, 53,
22
+ exports.EXECUTE_SLOW_RELAY_LEAF_DISCRIMINATOR = new Uint8Array([
23
+ 26, 207, 3, 168, 193, 252, 59, 127,
24
24
  ]);
25
- function getExecuteV3SlowRelayLeafDiscriminatorBytes() {
26
- return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.EXECUTE_V3_SLOW_RELAY_LEAF_DISCRIMINATOR);
25
+ function getExecuteSlowRelayLeafDiscriminatorBytes() {
26
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.EXECUTE_SLOW_RELAY_LEAF_DISCRIMINATOR);
27
27
  }
28
- function getExecuteV3SlowRelayLeafInstructionDataEncoder() {
28
+ function getExecuteSlowRelayLeafInstructionDataEncoder() {
29
29
  return (0, web3_v2_js_1.transformEncoder)((0, web3_v2_js_1.getStructEncoder)([
30
30
  ['discriminator', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8)],
31
31
  ['relayHash', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 32)],
32
- ['slowFillLeaf', (0, web3_v2_js_1.getOptionEncoder)((0, types_1.getV3SlowFillEncoder)())],
32
+ ['slowFillLeaf', (0, web3_v2_js_1.getOptionEncoder)((0, types_1.getSlowFillEncoder)())],
33
33
  ['rootBundleId', (0, web3_v2_js_1.getOptionEncoder)((0, web3_v2_js_1.getU32Encoder)())],
34
34
  [
35
35
  'proof',
@@ -37,14 +37,14 @@ function getExecuteV3SlowRelayLeafInstructionDataEncoder() {
37
37
  ],
38
38
  ]), (value) => ({
39
39
  ...value,
40
- discriminator: exports.EXECUTE_V3_SLOW_RELAY_LEAF_DISCRIMINATOR,
40
+ discriminator: exports.EXECUTE_SLOW_RELAY_LEAF_DISCRIMINATOR,
41
41
  }));
42
42
  }
43
- function getExecuteV3SlowRelayLeafInstructionDataDecoder() {
43
+ function getExecuteSlowRelayLeafInstructionDataDecoder() {
44
44
  return (0, web3_v2_js_1.getStructDecoder)([
45
45
  ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
46
46
  ['relayHash', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 32)],
47
- ['slowFillLeaf', (0, web3_v2_js_1.getOptionDecoder)((0, types_1.getV3SlowFillDecoder)())],
47
+ ['slowFillLeaf', (0, web3_v2_js_1.getOptionDecoder)((0, types_1.getSlowFillDecoder)())],
48
48
  ['rootBundleId', (0, web3_v2_js_1.getOptionDecoder)((0, web3_v2_js_1.getU32Decoder)())],
49
49
  [
50
50
  'proof',
@@ -52,10 +52,10 @@ function getExecuteV3SlowRelayLeafInstructionDataDecoder() {
52
52
  ],
53
53
  ]);
54
54
  }
55
- function getExecuteV3SlowRelayLeafInstructionDataCodec() {
56
- return (0, web3_v2_js_1.combineCodec)(getExecuteV3SlowRelayLeafInstructionDataEncoder(), getExecuteV3SlowRelayLeafInstructionDataDecoder());
55
+ function getExecuteSlowRelayLeafInstructionDataCodec() {
56
+ return (0, web3_v2_js_1.combineCodec)(getExecuteSlowRelayLeafInstructionDataEncoder(), getExecuteSlowRelayLeafInstructionDataDecoder());
57
57
  }
58
- async function getExecuteV3SlowRelayLeafInstructionAsync(input, config) {
58
+ async function getExecuteSlowRelayLeafInstructionAsync(input, config) {
59
59
  // Program address.
60
60
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
61
61
  // Original accounts.
@@ -112,7 +112,7 @@ async function getExecuteV3SlowRelayLeafInstructionAsync(input, config) {
112
112
  accounts.recipientTokenAccount.value = await (0, web3_v2_js_1.getProgramDerivedAddress)({
113
113
  programAddress,
114
114
  seeds: [
115
- (0, web3_v2_js_1.getOptionEncoder)((0, types_1.getV3SlowFillEncoder)()).encode((0, shared_1.expectSome)(args.slowFillLeaf)),
115
+ (0, web3_v2_js_1.getOptionEncoder)((0, types_1.getSlowFillEncoder)()).encode((0, shared_1.expectSome)(args.slowFillLeaf)),
116
116
  (0, web3_v2_js_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
117
117
  (0, web3_v2_js_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.mint.value)),
118
118
  ],
@@ -160,11 +160,11 @@ async function getExecuteV3SlowRelayLeafInstructionAsync(input, config) {
160
160
  getAccountMeta(accounts.program),
161
161
  ],
162
162
  programAddress,
163
- data: getExecuteV3SlowRelayLeafInstructionDataEncoder().encode(args),
163
+ data: getExecuteSlowRelayLeafInstructionDataEncoder().encode(args),
164
164
  };
165
165
  return instruction;
166
166
  }
167
- function getExecuteV3SlowRelayLeafInstruction(input, config) {
167
+ function getExecuteSlowRelayLeafInstruction(input, config) {
168
168
  // Program address.
169
169
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
170
170
  // Original accounts.
@@ -217,11 +217,11 @@ function getExecuteV3SlowRelayLeafInstruction(input, config) {
217
217
  getAccountMeta(accounts.program),
218
218
  ],
219
219
  programAddress,
220
- data: getExecuteV3SlowRelayLeafInstructionDataEncoder().encode(args),
220
+ data: getExecuteSlowRelayLeafInstructionDataEncoder().encode(args),
221
221
  };
222
222
  return instruction;
223
223
  }
224
- function parseExecuteV3SlowRelayLeafInstruction(instruction) {
224
+ function parseExecuteSlowRelayLeafInstruction(instruction) {
225
225
  if (instruction.accounts.length < 12) {
226
226
  // TODO: Coded error.
227
227
  throw new Error('Not enough accounts');
@@ -254,6 +254,6 @@ function parseExecuteV3SlowRelayLeafInstruction(instruction) {
254
254
  eventAuthority: getNextAccount(),
255
255
  program: getNextAccount(),
256
256
  },
257
- data: getExecuteV3SlowRelayLeafInstructionDataDecoder().decode(instruction.data),
257
+ data: getExecuteSlowRelayLeafInstructionDataDecoder().decode(instruction.data),
258
258
  };
259
259
  }
@@ -0,0 +1,104 @@
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 Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/web3-v2.js';
9
+ import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
+ import { type RelayData, type RelayDataArgs } from '../types';
11
+ export declare const FILL_RELAY_DISCRIMINATOR: Uint8Array;
12
+ export declare function getFillRelayDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type FillRelayInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | IAccountMeta<string> = string, TAccountInstructionParams extends string | IAccountMeta<string> = string, TAccountState extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountRelayerTokenAccount extends string | IAccountMeta<string> = string, TAccountRecipientTokenAccount extends string | IAccountMeta<string> = string, TAccountFillStatus extends string | IAccountMeta<string> = string, TAccountTokenProgram extends string | IAccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountAssociatedTokenProgram extends string | IAccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountSystemProgram extends string | IAccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | IAccountMeta<string> = string, TAccountProgram extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
14
+ TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & IAccountSignerMeta<TAccountSigner> : TAccountSigner,
15
+ TAccountInstructionParams extends string ? WritableAccount<TAccountInstructionParams> : TAccountInstructionParams,
16
+ TAccountState extends string ? ReadonlyAccount<TAccountState> : TAccountState,
17
+ TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
18
+ TAccountRelayerTokenAccount extends string ? WritableAccount<TAccountRelayerTokenAccount> : TAccountRelayerTokenAccount,
19
+ TAccountRecipientTokenAccount extends string ? WritableAccount<TAccountRecipientTokenAccount> : TAccountRecipientTokenAccount,
20
+ TAccountFillStatus extends string ? WritableAccount<TAccountFillStatus> : TAccountFillStatus,
21
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
22
+ TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram,
23
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
24
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
25
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
26
+ ...TRemainingAccounts
27
+ ]>;
28
+ export type FillRelayInstructionData = {
29
+ discriminator: ReadonlyUint8Array;
30
+ relayHash: ReadonlyUint8Array;
31
+ relayData: Option<RelayData>;
32
+ repaymentChainId: Option<bigint>;
33
+ repaymentAddress: Option<Address>;
34
+ };
35
+ export type FillRelayInstructionDataArgs = {
36
+ relayHash: ReadonlyUint8Array;
37
+ relayData: OptionOrNullable<RelayDataArgs>;
38
+ repaymentChainId: OptionOrNullable<number | bigint>;
39
+ repaymentAddress: OptionOrNullable<Address>;
40
+ };
41
+ export declare function getFillRelayInstructionDataEncoder(): Encoder<FillRelayInstructionDataArgs>;
42
+ export declare function getFillRelayInstructionDataDecoder(): Decoder<FillRelayInstructionData>;
43
+ export declare function getFillRelayInstructionDataCodec(): Codec<FillRelayInstructionDataArgs, FillRelayInstructionData>;
44
+ export type FillRelayAsyncInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountMint extends string = string, TAccountRelayerTokenAccount extends string = string, TAccountRecipientTokenAccount extends string = string, TAccountFillStatus extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
45
+ signer: TransactionSigner<TAccountSigner>;
46
+ instructionParams?: Address<TAccountInstructionParams>;
47
+ state: Address<TAccountState>;
48
+ mint: Address<TAccountMint>;
49
+ relayerTokenAccount: Address<TAccountRelayerTokenAccount>;
50
+ recipientTokenAccount?: Address<TAccountRecipientTokenAccount>;
51
+ fillStatus?: Address<TAccountFillStatus>;
52
+ tokenProgram?: Address<TAccountTokenProgram>;
53
+ associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
54
+ systemProgram?: Address<TAccountSystemProgram>;
55
+ eventAuthority?: Address<TAccountEventAuthority>;
56
+ program: Address<TAccountProgram>;
57
+ relayHash: FillRelayInstructionDataArgs['relayHash'];
58
+ relayData: FillRelayInstructionDataArgs['relayData'];
59
+ repaymentChainId: FillRelayInstructionDataArgs['repaymentChainId'];
60
+ repaymentAddress: FillRelayInstructionDataArgs['repaymentAddress'];
61
+ };
62
+ export declare function getFillRelayInstructionAsync<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountMint extends string, TAccountRelayerTokenAccount extends string, TAccountRecipientTokenAccount extends string, TAccountFillStatus 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: FillRelayAsyncInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountMint, TAccountRelayerTokenAccount, TAccountRecipientTokenAccount, TAccountFillStatus, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
63
+ programAddress?: TProgramAddress;
64
+ }): Promise<FillRelayInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountMint, TAccountRelayerTokenAccount, TAccountRecipientTokenAccount, TAccountFillStatus, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
65
+ export type FillRelayInput<TAccountSigner extends string = string, TAccountInstructionParams extends string = string, TAccountState extends string = string, TAccountMint extends string = string, TAccountRelayerTokenAccount extends string = string, TAccountRecipientTokenAccount extends string = string, TAccountFillStatus extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
66
+ signer: TransactionSigner<TAccountSigner>;
67
+ instructionParams?: Address<TAccountInstructionParams>;
68
+ state: Address<TAccountState>;
69
+ mint: Address<TAccountMint>;
70
+ relayerTokenAccount: Address<TAccountRelayerTokenAccount>;
71
+ recipientTokenAccount: Address<TAccountRecipientTokenAccount>;
72
+ fillStatus: Address<TAccountFillStatus>;
73
+ tokenProgram?: Address<TAccountTokenProgram>;
74
+ associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
75
+ systemProgram?: Address<TAccountSystemProgram>;
76
+ eventAuthority: Address<TAccountEventAuthority>;
77
+ program: Address<TAccountProgram>;
78
+ relayHash: FillRelayInstructionDataArgs['relayHash'];
79
+ relayData: FillRelayInstructionDataArgs['relayData'];
80
+ repaymentChainId: FillRelayInstructionDataArgs['repaymentChainId'];
81
+ repaymentAddress: FillRelayInstructionDataArgs['repaymentAddress'];
82
+ };
83
+ export declare function getFillRelayInstruction<TAccountSigner extends string, TAccountInstructionParams extends string, TAccountState extends string, TAccountMint extends string, TAccountRelayerTokenAccount extends string, TAccountRecipientTokenAccount extends string, TAccountFillStatus 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: FillRelayInput<TAccountSigner, TAccountInstructionParams, TAccountState, TAccountMint, TAccountRelayerTokenAccount, TAccountRecipientTokenAccount, TAccountFillStatus, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
84
+ programAddress?: TProgramAddress;
85
+ }): FillRelayInstruction<TProgramAddress, TAccountSigner, TAccountInstructionParams, TAccountState, TAccountMint, TAccountRelayerTokenAccount, TAccountRecipientTokenAccount, TAccountFillStatus, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>;
86
+ export type ParsedFillRelayInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
87
+ programAddress: Address<TProgram>;
88
+ accounts: {
89
+ signer: TAccountMetas[0];
90
+ instructionParams?: TAccountMetas[1] | undefined;
91
+ state: TAccountMetas[2];
92
+ mint: TAccountMetas[3];
93
+ relayerTokenAccount: TAccountMetas[4];
94
+ recipientTokenAccount: TAccountMetas[5];
95
+ fillStatus: TAccountMetas[6];
96
+ tokenProgram: TAccountMetas[7];
97
+ associatedTokenProgram: TAccountMetas[8];
98
+ systemProgram: TAccountMetas[9];
99
+ eventAuthority: TAccountMetas[10];
100
+ program: TAccountMetas[11];
101
+ };
102
+ data: FillRelayInstructionData;
103
+ };
104
+ export declare function parseFillRelayInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedFillRelayInstruction<TProgram, TAccountMetas>;