@across-protocol/contracts 4.0.2 → 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 (75) hide show
  1. package/dist/deploy/consts.d.ts +1 -1
  2. package/dist/deploy/consts.js +1 -15
  3. package/dist/deployments/deployments.json +18 -0
  4. package/dist/scripts/svm/fakeFillWithRandomDistribution.js +2 -2
  5. package/dist/scripts/svm/queryEvents.js +1 -1
  6. package/dist/scripts/svm/simpleDeposit.js +3 -3
  7. package/dist/scripts/svm/simpleFakeRelayerRepayment.js +1 -1
  8. package/dist/scripts/svm/simpleFill.js +19 -6
  9. package/dist/src/svm/assets/idl/svm_spoke.json +435 -385
  10. package/dist/src/svm/assets/svm_spoke.d.ts +435 -385
  11. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +31 -0
  12. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +70 -0
  13. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +31 -0
  14. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +67 -0
  15. package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +3 -3
  16. package/dist/src/svm/clients/SvmSpoke/accounts/index.js +3 -3
  17. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +27 -0
  18. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +66 -0
  19. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +35 -15
  20. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +52 -22
  21. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +123 -0
  22. package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3.js → deposit.js} +23 -23
  23. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +119 -0
  24. package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3Now.js → depositNow.js} +23 -23
  25. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +104 -0
  26. package/dist/src/svm/clients/SvmSpoke/instructions/{executeV3SlowRelayLeaf.js → executeSlowRelayLeaf.js} +26 -26
  27. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +104 -0
  28. package/dist/src/svm/clients/SvmSpoke/instructions/{fillV3Relay.js → fillRelay.js} +26 -26
  29. package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +6 -6
  30. package/dist/src/svm/clients/SvmSpoke/instructions/index.js +6 -6
  31. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +76 -0
  32. package/dist/src/svm/clients/SvmSpoke/instructions/{requestV3SlowFill.js → requestSlowFill.js} +25 -25
  33. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +127 -0
  34. package/dist/src/svm/clients/SvmSpoke/instructions/{unsafeDepositV3.js → unsafeDeposit.js} +23 -23
  35. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +23 -23
  36. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -29
  37. package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.d.ts → filledRelay.d.ts} +8 -8
  38. package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.js → filledRelay.js} +9 -9
  39. package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.d.ts → fundsDeposited.d.ts} +5 -5
  40. package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.js → fundsDeposited.js} +7 -7
  41. package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +6 -6
  42. package/dist/src/svm/clients/SvmSpoke/types/index.js +6 -6
  43. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.d.ts → relayData.d.ts} +5 -5
  44. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.js → relayData.js} +7 -7
  45. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.d.ts → relayExecutionEventInfo.d.ts} +5 -5
  46. package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.js → relayExecutionEventInfo.js} +7 -7
  47. package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.d.ts → requestedSlowFill.d.ts} +5 -5
  48. package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.js → requestedSlowFill.js} +7 -7
  49. package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.d.ts → slowFill.d.ts} +8 -8
  50. package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.js → slowFill.js} +9 -9
  51. package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +8 -8
  52. package/dist/src/svm/web3-v1/instructionParamsUtils.js +16 -16
  53. package/dist/src/types/svm.d.ts +6 -6
  54. package/dist/target/types/svm_spoke.d.ts +435 -385
  55. package/dist/tasks/enableL1TokenAcrossEcosystem.js +14 -10
  56. package/dist/test/svm/SvmSpoke.Deposit.js +48 -47
  57. package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +2 -2
  58. package/dist/test/svm/SvmSpoke.Fill.js +28 -56
  59. package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +13 -13
  60. package/dist/test/svm/SvmSpoke.SlowFill.js +40 -40
  61. package/dist/utils/constants.d.ts +1 -1
  62. package/dist/utils/constants.js +3 -1
  63. package/package.json +2 -2
  64. package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.d.ts +0 -31
  65. package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.js +0 -70
  66. package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.d.ts +0 -31
  67. package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.js +0 -67
  68. package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.d.ts +0 -27
  69. package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.js +0 -66
  70. package/dist/src/svm/clients/SvmSpoke/instructions/depositV3.d.ts +0 -123
  71. package/dist/src/svm/clients/SvmSpoke/instructions/depositV3Now.d.ts +0 -119
  72. package/dist/src/svm/clients/SvmSpoke/instructions/executeV3SlowRelayLeaf.d.ts +0 -104
  73. package/dist/src/svm/clients/SvmSpoke/instructions/fillV3Relay.d.ts +0 -104
  74. package/dist/src/svm/clients/SvmSpoke/instructions/requestV3SlowFill.d.ts +0 -76
  75. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDepositV3.d.ts +0 -127
@@ -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_DISCRIMINATOR = void 0;
11
- exports.getDepositV3DiscriminatorBytes = getDepositV3DiscriminatorBytes;
12
- exports.getDepositV3InstructionDataEncoder = getDepositV3InstructionDataEncoder;
13
- exports.getDepositV3InstructionDataDecoder = getDepositV3InstructionDataDecoder;
14
- exports.getDepositV3InstructionDataCodec = getDepositV3InstructionDataCodec;
15
- exports.getDepositV3InstructionAsync = getDepositV3InstructionAsync;
16
- exports.getDepositV3Instruction = getDepositV3Instruction;
17
- exports.parseDepositV3Instruction = parseDepositV3Instruction;
10
+ exports.DEPOSIT_DISCRIMINATOR = void 0;
11
+ exports.getDepositDiscriminatorBytes = getDepositDiscriminatorBytes;
12
+ exports.getDepositInstructionDataEncoder = getDepositInstructionDataEncoder;
13
+ exports.getDepositInstructionDataDecoder = getDepositInstructionDataDecoder;
14
+ exports.getDepositInstructionDataCodec = getDepositInstructionDataCodec;
15
+ exports.getDepositInstructionAsync = getDepositInstructionAsync;
16
+ exports.getDepositInstruction = getDepositInstruction;
17
+ exports.parseDepositInstruction = parseDepositInstruction;
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_DISCRIMINATOR = new Uint8Array([
22
- 143, 121, 102, 14, 14, 12, 216, 226,
21
+ exports.DEPOSIT_DISCRIMINATOR = new Uint8Array([
22
+ 242, 35, 198, 137, 82, 225, 242, 182,
23
23
  ]);
24
- function getDepositV3DiscriminatorBytes() {
25
- return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.DEPOSIT_V3_DISCRIMINATOR);
24
+ function getDepositDiscriminatorBytes() {
25
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.DEPOSIT_DISCRIMINATOR);
26
26
  }
27
- function getDepositV3InstructionDataEncoder() {
27
+ function getDepositInstructionDataEncoder() {
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)()],
@@ -39,9 +39,9 @@ function getDepositV3InstructionDataEncoder() {
39
39
  ['fillDeadline', (0, web3_v2_js_1.getU32Encoder)()],
40
40
  ['exclusivityParameter', (0, web3_v2_js_1.getU32Encoder)()],
41
41
  ['message', (0, web3_v2_js_1.addEncoderSizePrefix)((0, web3_v2_js_1.getBytesEncoder)(), (0, web3_v2_js_1.getU32Encoder)())],
42
- ]), (value) => ({ ...value, discriminator: exports.DEPOSIT_V3_DISCRIMINATOR }));
42
+ ]), (value) => ({ ...value, discriminator: exports.DEPOSIT_DISCRIMINATOR }));
43
43
  }
44
- function getDepositV3InstructionDataDecoder() {
44
+ function getDepositInstructionDataDecoder() {
45
45
  return (0, web3_v2_js_1.getStructDecoder)([
46
46
  ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
47
47
  ['depositor', (0, web3_v2_js_1.getAddressDecoder)()],
@@ -58,10 +58,10 @@ function getDepositV3InstructionDataDecoder() {
58
58
  ['message', (0, web3_v2_js_1.addDecoderSizePrefix)((0, web3_v2_js_1.getBytesDecoder)(), (0, web3_v2_js_1.getU32Decoder)())],
59
59
  ]);
60
60
  }
61
- function getDepositV3InstructionDataCodec() {
62
- return (0, web3_v2_js_1.combineCodec)(getDepositV3InstructionDataEncoder(), getDepositV3InstructionDataDecoder());
61
+ function getDepositInstructionDataCodec() {
62
+ return (0, web3_v2_js_1.combineCodec)(getDepositInstructionDataEncoder(), getDepositInstructionDataDecoder());
63
63
  }
64
- async function getDepositV3InstructionAsync(input, config) {
64
+ async function getDepositInstructionAsync(input, config) {
65
65
  // Program address.
66
66
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
67
67
  // Original accounts.
@@ -132,11 +132,11 @@ async function getDepositV3InstructionAsync(input, config) {
132
132
  getAccountMeta(accounts.program),
133
133
  ],
134
134
  programAddress,
135
- data: getDepositV3InstructionDataEncoder().encode(args),
135
+ data: getDepositInstructionDataEncoder().encode(args),
136
136
  };
137
137
  return instruction;
138
138
  }
139
- function getDepositV3Instruction(input, config) {
139
+ function getDepositInstruction(input, config) {
140
140
  // Program address.
141
141
  const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
142
142
  // Original accounts.
@@ -176,11 +176,11 @@ function getDepositV3Instruction(input, config) {
176
176
  getAccountMeta(accounts.program),
177
177
  ],
178
178
  programAddress,
179
- data: getDepositV3InstructionDataEncoder().encode(args),
179
+ data: getDepositInstructionDataEncoder().encode(args),
180
180
  };
181
181
  return instruction;
182
182
  }
183
- function parseDepositV3Instruction(instruction) {
183
+ function parseDepositInstruction(instruction) {
184
184
  if (instruction.accounts.length < 9) {
185
185
  // TODO: Coded error.
186
186
  throw new Error('Not enough accounts');
@@ -204,6 +204,6 @@ function parseDepositV3Instruction(instruction) {
204
204
  eventAuthority: getNextAccount(),
205
205
  program: getNextAccount(),
206
206
  },
207
- data: getDepositV3InstructionDataDecoder().decode(instruction.data),
207
+ data: getDepositInstructionDataDecoder().decode(instruction.data),
208
208
  };
209
209
  }
@@ -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
  }