@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,31 @@
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/web3-v2.js';
9
+ import { type SlowFill, type SlowFillArgs } from '../types';
10
+ export declare const EXECUTE_SLOW_RELAY_LEAF_PARAMS_DISCRIMINATOR: Uint8Array;
11
+ export declare function getExecuteSlowRelayLeafParamsDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type ExecuteSlowRelayLeafParams = {
13
+ discriminator: ReadonlyUint8Array;
14
+ slowFillLeaf: SlowFill;
15
+ rootBundleId: number;
16
+ proof: Array<ReadonlyUint8Array>;
17
+ };
18
+ export type ExecuteSlowRelayLeafParamsArgs = {
19
+ slowFillLeaf: SlowFillArgs;
20
+ rootBundleId: number;
21
+ proof: Array<ReadonlyUint8Array>;
22
+ };
23
+ export declare function getExecuteSlowRelayLeafParamsEncoder(): Encoder<ExecuteSlowRelayLeafParamsArgs>;
24
+ export declare function getExecuteSlowRelayLeafParamsDecoder(): Decoder<ExecuteSlowRelayLeafParams>;
25
+ export declare function getExecuteSlowRelayLeafParamsCodec(): Codec<ExecuteSlowRelayLeafParamsArgs, ExecuteSlowRelayLeafParams>;
26
+ export declare function decodeExecuteSlowRelayLeafParams<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ExecuteSlowRelayLeafParams, TAddress>;
27
+ export declare function decodeExecuteSlowRelayLeafParams<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ExecuteSlowRelayLeafParams, TAddress>;
28
+ export declare function fetchExecuteSlowRelayLeafParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ExecuteSlowRelayLeafParams, TAddress>>;
29
+ export declare function fetchMaybeExecuteSlowRelayLeafParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ExecuteSlowRelayLeafParams, TAddress>>;
30
+ export declare function fetchAllExecuteSlowRelayLeafParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ExecuteSlowRelayLeafParams>[]>;
31
+ export declare function fetchAllMaybeExecuteSlowRelayLeafParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ExecuteSlowRelayLeafParams>[]>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.EXECUTE_SLOW_RELAY_LEAF_PARAMS_DISCRIMINATOR = void 0;
11
+ exports.getExecuteSlowRelayLeafParamsDiscriminatorBytes = getExecuteSlowRelayLeafParamsDiscriminatorBytes;
12
+ exports.getExecuteSlowRelayLeafParamsEncoder = getExecuteSlowRelayLeafParamsEncoder;
13
+ exports.getExecuteSlowRelayLeafParamsDecoder = getExecuteSlowRelayLeafParamsDecoder;
14
+ exports.getExecuteSlowRelayLeafParamsCodec = getExecuteSlowRelayLeafParamsCodec;
15
+ exports.decodeExecuteSlowRelayLeafParams = decodeExecuteSlowRelayLeafParams;
16
+ exports.fetchExecuteSlowRelayLeafParams = fetchExecuteSlowRelayLeafParams;
17
+ exports.fetchMaybeExecuteSlowRelayLeafParams = fetchMaybeExecuteSlowRelayLeafParams;
18
+ exports.fetchAllExecuteSlowRelayLeafParams = fetchAllExecuteSlowRelayLeafParams;
19
+ exports.fetchAllMaybeExecuteSlowRelayLeafParams = fetchAllMaybeExecuteSlowRelayLeafParams;
20
+ const web3_v2_js_1 = require("@solana/web3-v2.js");
21
+ const types_1 = require("../types");
22
+ exports.EXECUTE_SLOW_RELAY_LEAF_PARAMS_DISCRIMINATOR = new Uint8Array([
23
+ 135, 208, 119, 251, 14, 222, 66, 155,
24
+ ]);
25
+ function getExecuteSlowRelayLeafParamsDiscriminatorBytes() {
26
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.EXECUTE_SLOW_RELAY_LEAF_PARAMS_DISCRIMINATOR);
27
+ }
28
+ function getExecuteSlowRelayLeafParamsEncoder() {
29
+ return (0, web3_v2_js_1.transformEncoder)((0, web3_v2_js_1.getStructEncoder)([
30
+ ['discriminator', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8)],
31
+ ['slowFillLeaf', (0, types_1.getSlowFillEncoder)()],
32
+ ['rootBundleId', (0, web3_v2_js_1.getU32Encoder)()],
33
+ ['proof', (0, web3_v2_js_1.getArrayEncoder)((0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 32))],
34
+ ]), (value) => ({
35
+ ...value,
36
+ discriminator: exports.EXECUTE_SLOW_RELAY_LEAF_PARAMS_DISCRIMINATOR,
37
+ }));
38
+ }
39
+ function getExecuteSlowRelayLeafParamsDecoder() {
40
+ return (0, web3_v2_js_1.getStructDecoder)([
41
+ ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
42
+ ['slowFillLeaf', (0, types_1.getSlowFillDecoder)()],
43
+ ['rootBundleId', (0, web3_v2_js_1.getU32Decoder)()],
44
+ ['proof', (0, web3_v2_js_1.getArrayDecoder)((0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 32))],
45
+ ]);
46
+ }
47
+ function getExecuteSlowRelayLeafParamsCodec() {
48
+ return (0, web3_v2_js_1.combineCodec)(getExecuteSlowRelayLeafParamsEncoder(), getExecuteSlowRelayLeafParamsDecoder());
49
+ }
50
+ function decodeExecuteSlowRelayLeafParams(encodedAccount) {
51
+ return (0, web3_v2_js_1.decodeAccount)(encodedAccount, getExecuteSlowRelayLeafParamsDecoder());
52
+ }
53
+ async function fetchExecuteSlowRelayLeafParams(rpc, address, config) {
54
+ const maybeAccount = await fetchMaybeExecuteSlowRelayLeafParams(rpc, address, config);
55
+ (0, web3_v2_js_1.assertAccountExists)(maybeAccount);
56
+ return maybeAccount;
57
+ }
58
+ async function fetchMaybeExecuteSlowRelayLeafParams(rpc, address, config) {
59
+ const maybeAccount = await (0, web3_v2_js_1.fetchEncodedAccount)(rpc, address, config);
60
+ return decodeExecuteSlowRelayLeafParams(maybeAccount);
61
+ }
62
+ async function fetchAllExecuteSlowRelayLeafParams(rpc, addresses, config) {
63
+ const maybeAccounts = await fetchAllMaybeExecuteSlowRelayLeafParams(rpc, addresses, config);
64
+ (0, web3_v2_js_1.assertAccountsExist)(maybeAccounts);
65
+ return maybeAccounts;
66
+ }
67
+ async function fetchAllMaybeExecuteSlowRelayLeafParams(rpc, addresses, config) {
68
+ const maybeAccounts = await (0, web3_v2_js_1.fetchEncodedAccounts)(rpc, addresses, config);
69
+ return maybeAccounts.map((maybeAccount) => decodeExecuteSlowRelayLeafParams(maybeAccount));
70
+ }
@@ -0,0 +1,31 @@
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/web3-v2.js';
9
+ import { type RelayData, type RelayDataArgs } from '../types';
10
+ export declare const FILL_RELAY_PARAMS_DISCRIMINATOR: Uint8Array;
11
+ export declare function getFillRelayParamsDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type FillRelayParams = {
13
+ discriminator: ReadonlyUint8Array;
14
+ relayData: RelayData;
15
+ repaymentChainId: bigint;
16
+ repaymentAddress: Address;
17
+ };
18
+ export type FillRelayParamsArgs = {
19
+ relayData: RelayDataArgs;
20
+ repaymentChainId: number | bigint;
21
+ repaymentAddress: Address;
22
+ };
23
+ export declare function getFillRelayParamsEncoder(): Encoder<FillRelayParamsArgs>;
24
+ export declare function getFillRelayParamsDecoder(): Decoder<FillRelayParams>;
25
+ export declare function getFillRelayParamsCodec(): Codec<FillRelayParamsArgs, FillRelayParams>;
26
+ export declare function decodeFillRelayParams<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<FillRelayParams, TAddress>;
27
+ export declare function decodeFillRelayParams<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<FillRelayParams, TAddress>;
28
+ export declare function fetchFillRelayParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<FillRelayParams, TAddress>>;
29
+ export declare function fetchMaybeFillRelayParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<FillRelayParams, TAddress>>;
30
+ export declare function fetchAllFillRelayParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<FillRelayParams>[]>;
31
+ export declare function fetchAllMaybeFillRelayParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<FillRelayParams>[]>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.FILL_RELAY_PARAMS_DISCRIMINATOR = void 0;
11
+ exports.getFillRelayParamsDiscriminatorBytes = getFillRelayParamsDiscriminatorBytes;
12
+ exports.getFillRelayParamsEncoder = getFillRelayParamsEncoder;
13
+ exports.getFillRelayParamsDecoder = getFillRelayParamsDecoder;
14
+ exports.getFillRelayParamsCodec = getFillRelayParamsCodec;
15
+ exports.decodeFillRelayParams = decodeFillRelayParams;
16
+ exports.fetchFillRelayParams = fetchFillRelayParams;
17
+ exports.fetchMaybeFillRelayParams = fetchMaybeFillRelayParams;
18
+ exports.fetchAllFillRelayParams = fetchAllFillRelayParams;
19
+ exports.fetchAllMaybeFillRelayParams = fetchAllMaybeFillRelayParams;
20
+ const web3_v2_js_1 = require("@solana/web3-v2.js");
21
+ const types_1 = require("../types");
22
+ exports.FILL_RELAY_PARAMS_DISCRIMINATOR = new Uint8Array([
23
+ 50, 243, 51, 185, 89, 60, 43, 202,
24
+ ]);
25
+ function getFillRelayParamsDiscriminatorBytes() {
26
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.FILL_RELAY_PARAMS_DISCRIMINATOR);
27
+ }
28
+ function getFillRelayParamsEncoder() {
29
+ return (0, web3_v2_js_1.transformEncoder)((0, web3_v2_js_1.getStructEncoder)([
30
+ ['discriminator', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8)],
31
+ ['relayData', (0, types_1.getRelayDataEncoder)()],
32
+ ['repaymentChainId', (0, web3_v2_js_1.getU64Encoder)()],
33
+ ['repaymentAddress', (0, web3_v2_js_1.getAddressEncoder)()],
34
+ ]), (value) => ({ ...value, discriminator: exports.FILL_RELAY_PARAMS_DISCRIMINATOR }));
35
+ }
36
+ function getFillRelayParamsDecoder() {
37
+ return (0, web3_v2_js_1.getStructDecoder)([
38
+ ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
39
+ ['relayData', (0, types_1.getRelayDataDecoder)()],
40
+ ['repaymentChainId', (0, web3_v2_js_1.getU64Decoder)()],
41
+ ['repaymentAddress', (0, web3_v2_js_1.getAddressDecoder)()],
42
+ ]);
43
+ }
44
+ function getFillRelayParamsCodec() {
45
+ return (0, web3_v2_js_1.combineCodec)(getFillRelayParamsEncoder(), getFillRelayParamsDecoder());
46
+ }
47
+ function decodeFillRelayParams(encodedAccount) {
48
+ return (0, web3_v2_js_1.decodeAccount)(encodedAccount, getFillRelayParamsDecoder());
49
+ }
50
+ async function fetchFillRelayParams(rpc, address, config) {
51
+ const maybeAccount = await fetchMaybeFillRelayParams(rpc, address, config);
52
+ (0, web3_v2_js_1.assertAccountExists)(maybeAccount);
53
+ return maybeAccount;
54
+ }
55
+ async function fetchMaybeFillRelayParams(rpc, address, config) {
56
+ const maybeAccount = await (0, web3_v2_js_1.fetchEncodedAccount)(rpc, address, config);
57
+ return decodeFillRelayParams(maybeAccount);
58
+ }
59
+ async function fetchAllFillRelayParams(rpc, addresses, config) {
60
+ const maybeAccounts = await fetchAllMaybeFillRelayParams(rpc, addresses, config);
61
+ (0, web3_v2_js_1.assertAccountsExist)(maybeAccounts);
62
+ return maybeAccounts;
63
+ }
64
+ async function fetchAllMaybeFillRelayParams(rpc, addresses, config) {
65
+ const maybeAccounts = await (0, web3_v2_js_1.fetchEncodedAccounts)(rpc, addresses, config);
66
+ return maybeAccounts.map((maybeAccount) => decodeFillRelayParams(maybeAccount));
67
+ }
@@ -7,10 +7,10 @@
7
7
  */
8
8
  export * from './claimAccount';
9
9
  export * from './executeRelayerRefundLeafParams';
10
- export * from './executeV3SlowRelayLeafParams';
10
+ export * from './executeSlowRelayLeafParams';
11
+ export * from './fillRelayParams';
11
12
  export * from './fillStatusAccount';
12
- export * from './fillV3RelayParams';
13
- export * from './requestV3SlowFillParams';
13
+ export * from './requestSlowFillParams';
14
14
  export * from './rootBundle';
15
15
  export * from './route';
16
16
  export * from './state';
@@ -23,10 +23,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
24
  __exportStar(require("./claimAccount"), exports);
25
25
  __exportStar(require("./executeRelayerRefundLeafParams"), exports);
26
- __exportStar(require("./executeV3SlowRelayLeafParams"), exports);
26
+ __exportStar(require("./executeSlowRelayLeafParams"), exports);
27
+ __exportStar(require("./fillRelayParams"), exports);
27
28
  __exportStar(require("./fillStatusAccount"), exports);
28
- __exportStar(require("./fillV3RelayParams"), exports);
29
- __exportStar(require("./requestV3SlowFillParams"), exports);
29
+ __exportStar(require("./requestSlowFillParams"), exports);
30
30
  __exportStar(require("./rootBundle"), exports);
31
31
  __exportStar(require("./route"), exports);
32
32
  __exportStar(require("./state"), exports);
@@ -0,0 +1,27 @@
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/web3-v2.js';
9
+ import { type RelayData, type RelayDataArgs } from '../types';
10
+ export declare const REQUEST_SLOW_FILL_PARAMS_DISCRIMINATOR: Uint8Array;
11
+ export declare function getRequestSlowFillParamsDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type RequestSlowFillParams = {
13
+ discriminator: ReadonlyUint8Array;
14
+ relayData: RelayData;
15
+ };
16
+ export type RequestSlowFillParamsArgs = {
17
+ relayData: RelayDataArgs;
18
+ };
19
+ export declare function getRequestSlowFillParamsEncoder(): Encoder<RequestSlowFillParamsArgs>;
20
+ export declare function getRequestSlowFillParamsDecoder(): Decoder<RequestSlowFillParams>;
21
+ export declare function getRequestSlowFillParamsCodec(): Codec<RequestSlowFillParamsArgs, RequestSlowFillParams>;
22
+ export declare function decodeRequestSlowFillParams<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RequestSlowFillParams, TAddress>;
23
+ export declare function decodeRequestSlowFillParams<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RequestSlowFillParams, TAddress>;
24
+ export declare function fetchRequestSlowFillParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RequestSlowFillParams, TAddress>>;
25
+ export declare function fetchMaybeRequestSlowFillParams<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RequestSlowFillParams, TAddress>>;
26
+ export declare function fetchAllRequestSlowFillParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RequestSlowFillParams>[]>;
27
+ export declare function fetchAllMaybeRequestSlowFillParams(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RequestSlowFillParams>[]>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.REQUEST_SLOW_FILL_PARAMS_DISCRIMINATOR = void 0;
11
+ exports.getRequestSlowFillParamsDiscriminatorBytes = getRequestSlowFillParamsDiscriminatorBytes;
12
+ exports.getRequestSlowFillParamsEncoder = getRequestSlowFillParamsEncoder;
13
+ exports.getRequestSlowFillParamsDecoder = getRequestSlowFillParamsDecoder;
14
+ exports.getRequestSlowFillParamsCodec = getRequestSlowFillParamsCodec;
15
+ exports.decodeRequestSlowFillParams = decodeRequestSlowFillParams;
16
+ exports.fetchRequestSlowFillParams = fetchRequestSlowFillParams;
17
+ exports.fetchMaybeRequestSlowFillParams = fetchMaybeRequestSlowFillParams;
18
+ exports.fetchAllRequestSlowFillParams = fetchAllRequestSlowFillParams;
19
+ exports.fetchAllMaybeRequestSlowFillParams = fetchAllMaybeRequestSlowFillParams;
20
+ const web3_v2_js_1 = require("@solana/web3-v2.js");
21
+ const types_1 = require("../types");
22
+ exports.REQUEST_SLOW_FILL_PARAMS_DISCRIMINATOR = new Uint8Array([
23
+ 5, 54, 214, 89, 197, 37, 118, 28,
24
+ ]);
25
+ function getRequestSlowFillParamsDiscriminatorBytes() {
26
+ return (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(exports.REQUEST_SLOW_FILL_PARAMS_DISCRIMINATOR);
27
+ }
28
+ function getRequestSlowFillParamsEncoder() {
29
+ return (0, web3_v2_js_1.transformEncoder)((0, web3_v2_js_1.getStructEncoder)([
30
+ ['discriminator', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8)],
31
+ ['relayData', (0, types_1.getRelayDataEncoder)()],
32
+ ]), (value) => ({
33
+ ...value,
34
+ discriminator: exports.REQUEST_SLOW_FILL_PARAMS_DISCRIMINATOR,
35
+ }));
36
+ }
37
+ function getRequestSlowFillParamsDecoder() {
38
+ return (0, web3_v2_js_1.getStructDecoder)([
39
+ ['discriminator', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 8)],
40
+ ['relayData', (0, types_1.getRelayDataDecoder)()],
41
+ ]);
42
+ }
43
+ function getRequestSlowFillParamsCodec() {
44
+ return (0, web3_v2_js_1.combineCodec)(getRequestSlowFillParamsEncoder(), getRequestSlowFillParamsDecoder());
45
+ }
46
+ function decodeRequestSlowFillParams(encodedAccount) {
47
+ return (0, web3_v2_js_1.decodeAccount)(encodedAccount, getRequestSlowFillParamsDecoder());
48
+ }
49
+ async function fetchRequestSlowFillParams(rpc, address, config) {
50
+ const maybeAccount = await fetchMaybeRequestSlowFillParams(rpc, address, config);
51
+ (0, web3_v2_js_1.assertAccountExists)(maybeAccount);
52
+ return maybeAccount;
53
+ }
54
+ async function fetchMaybeRequestSlowFillParams(rpc, address, config) {
55
+ const maybeAccount = await (0, web3_v2_js_1.fetchEncodedAccount)(rpc, address, config);
56
+ return decodeRequestSlowFillParams(maybeAccount);
57
+ }
58
+ async function fetchAllRequestSlowFillParams(rpc, addresses, config) {
59
+ const maybeAccounts = await fetchAllMaybeRequestSlowFillParams(rpc, addresses, config);
60
+ (0, web3_v2_js_1.assertAccountsExist)(maybeAccounts);
61
+ return maybeAccounts;
62
+ }
63
+ async function fetchAllMaybeRequestSlowFillParams(rpc, addresses, config) {
64
+ const maybeAccounts = await (0, web3_v2_js_1.fetchEncodedAccounts)(rpc, addresses, config);
65
+ return maybeAccounts.map((maybeAccount) => decodeRequestSlowFillParams(maybeAccount));
66
+ }
@@ -0,0 +1,123 @@
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_DISCRIMINATOR: Uint8Array;
11
+ export declare function getDepositDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type DepositInstruction<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 DepositInstructionData = {
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
+ quoteTimestamp: number;
35
+ fillDeadline: number;
36
+ exclusivityParameter: number;
37
+ message: ReadonlyUint8Array;
38
+ };
39
+ export type DepositInstructionDataArgs = {
40
+ depositor: Address;
41
+ recipient: Address;
42
+ inputToken: Address;
43
+ outputToken: Address;
44
+ inputAmount: number | bigint;
45
+ outputAmount: number | bigint;
46
+ destinationChainId: number | bigint;
47
+ exclusiveRelayer: Address;
48
+ quoteTimestamp: number;
49
+ fillDeadline: number;
50
+ exclusivityParameter: number;
51
+ message: ReadonlyUint8Array;
52
+ };
53
+ export declare function getDepositInstructionDataEncoder(): Encoder<DepositInstructionDataArgs>;
54
+ export declare function getDepositInstructionDataDecoder(): Decoder<DepositInstructionData>;
55
+ export declare function getDepositInstructionDataCodec(): Codec<DepositInstructionDataArgs, DepositInstructionData>;
56
+ export type DepositAsyncInput<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> = {
57
+ signer: TransactionSigner<TAccountSigner>;
58
+ state: Address<TAccountState>;
59
+ route: Address<TAccountRoute>;
60
+ depositorTokenAccount?: Address<TAccountDepositorTokenAccount>;
61
+ vault?: Address<TAccountVault>;
62
+ mint: Address<TAccountMint>;
63
+ tokenProgram?: Address<TAccountTokenProgram>;
64
+ eventAuthority?: Address<TAccountEventAuthority>;
65
+ program: Address<TAccountProgram>;
66
+ depositor: DepositInstructionDataArgs['depositor'];
67
+ recipient: DepositInstructionDataArgs['recipient'];
68
+ inputToken: DepositInstructionDataArgs['inputToken'];
69
+ outputToken: DepositInstructionDataArgs['outputToken'];
70
+ inputAmount: DepositInstructionDataArgs['inputAmount'];
71
+ outputAmount: DepositInstructionDataArgs['outputAmount'];
72
+ destinationChainId: DepositInstructionDataArgs['destinationChainId'];
73
+ exclusiveRelayer: DepositInstructionDataArgs['exclusiveRelayer'];
74
+ quoteTimestamp: DepositInstructionDataArgs['quoteTimestamp'];
75
+ fillDeadline: DepositInstructionDataArgs['fillDeadline'];
76
+ exclusivityParameter: DepositInstructionDataArgs['exclusivityParameter'];
77
+ message: DepositInstructionDataArgs['message'];
78
+ };
79
+ export declare function getDepositInstructionAsync<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: DepositAsyncInput<TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>, config?: {
80
+ programAddress?: TProgramAddress;
81
+ }): Promise<DepositInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>>;
82
+ export type DepositInput<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> = {
83
+ signer: TransactionSigner<TAccountSigner>;
84
+ state: Address<TAccountState>;
85
+ route: Address<TAccountRoute>;
86
+ depositorTokenAccount: Address<TAccountDepositorTokenAccount>;
87
+ vault: Address<TAccountVault>;
88
+ mint: Address<TAccountMint>;
89
+ tokenProgram?: Address<TAccountTokenProgram>;
90
+ eventAuthority: Address<TAccountEventAuthority>;
91
+ program: Address<TAccountProgram>;
92
+ depositor: DepositInstructionDataArgs['depositor'];
93
+ recipient: DepositInstructionDataArgs['recipient'];
94
+ inputToken: DepositInstructionDataArgs['inputToken'];
95
+ outputToken: DepositInstructionDataArgs['outputToken'];
96
+ inputAmount: DepositInstructionDataArgs['inputAmount'];
97
+ outputAmount: DepositInstructionDataArgs['outputAmount'];
98
+ destinationChainId: DepositInstructionDataArgs['destinationChainId'];
99
+ exclusiveRelayer: DepositInstructionDataArgs['exclusiveRelayer'];
100
+ quoteTimestamp: DepositInstructionDataArgs['quoteTimestamp'];
101
+ fillDeadline: DepositInstructionDataArgs['fillDeadline'];
102
+ exclusivityParameter: DepositInstructionDataArgs['exclusivityParameter'];
103
+ message: DepositInstructionDataArgs['message'];
104
+ };
105
+ export declare function getDepositInstruction<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: DepositInput<TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>, config?: {
106
+ programAddress?: TProgramAddress;
107
+ }): DepositInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountRoute, TAccountDepositorTokenAccount, TAccountVault, TAccountMint, TAccountTokenProgram, TAccountEventAuthority, TAccountProgram>;
108
+ export type ParsedDepositInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
109
+ programAddress: Address<TProgram>;
110
+ accounts: {
111
+ signer: TAccountMetas[0];
112
+ state: TAccountMetas[1];
113
+ route: TAccountMetas[2];
114
+ depositorTokenAccount: TAccountMetas[3];
115
+ vault: TAccountMetas[4];
116
+ mint: TAccountMetas[5];
117
+ tokenProgram: TAccountMetas[6];
118
+ eventAuthority: TAccountMetas[7];
119
+ program: TAccountMetas[8];
120
+ };
121
+ data: DepositInstructionData;
122
+ };
123
+ export declare function parseDepositInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedDepositInstruction<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_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
  }