@across-protocol/contracts 6.0.0-beta.3 → 6.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ The latest contract deployments can be found in `/broadcast/deployed-addresses.j
23
23
 
24
24
  ## Requirements
25
25
 
26
- This repository assumes you have [Node](https://nodejs.org/en/download/package-manager) installed, with a minimum version of 22.18.0. Depending on what you want to do with the repo you might also need [foundry](https://book.getfoundry.sh/getting-started/installation) and [anchor](https://www.anchor-lang.com/docs/installation) to also be installed. If you have build issues please ensure these are both installed first.
26
+ This repository assumes you have [Node](https://nodejs.org/en/download/package-manager) installed, using the CI version 22.23.4 or a later patched Node 22 release. Depending on what you want to do with the repo you might also need [foundry](https://book.getfoundry.sh/getting-started/installation) and [anchor](https://www.anchor-lang.com/docs/installation) to also be installed. If you have build issues please ensure these are both installed first.
27
27
 
28
28
  Use Node 22 for SVM development. `Anchor.toml` pins Anchor 1.1.2 and Agave 4.1.2;
29
29
  install these versions instead of selecting a moving `latest` toolchain.
@@ -34,6 +34,63 @@ program and canonical IDL upgrade. Legacy `Program.at`/`fetchIdl` readers do not
34
34
  Artifact generation restores the canonical event-authority PDA seeds omitted by Anchor 1.1's IDL output,
35
35
  preserving typed account resolution and Codama async builders. This metadata does not change program bytes.
36
36
 
37
+ ## SVM JSON interfaces
38
+
39
+ The npm package exposes these stable JSON paths for downstream Anchor clients and Codama generation:
40
+
41
+ ```text
42
+ @across-protocol/contracts/svm/idl/svm_spoke.json
43
+ @across-protocol/contracts/svm/idl/multicall_handler.json
44
+ @across-protocol/contracts/svm/idl/sponsored_cctp_src_periphery.json
45
+ ```
46
+
47
+ `svm_spoke` is the V5 interface. `multicall_handler` and `sponsored_cctp_src_periphery` are legacy
48
+ compatibility interfaces for existing quote construction and event indexing; they are not used by V5 flows.
49
+
50
+ For example, load an IDL without loading the package's runtime clients:
51
+
52
+ ```js
53
+ const spokeIdl = require("@across-protocol/contracts/svm/idl/svm_spoke.json")
54
+ ```
55
+
56
+ Pin an exact contracts package version and commit your lockfile, together with compatible versions of your
57
+ client generator and runtime. IDLs are versioned with the npm package; `metadata.version` identifies the program's
58
+ declared version and is not the npm release version. Consumers can generate clients from the installed JSON without
59
+ a contracts checkout or Rust, Anchor CLI, or Foundry. Select the deployed program address for your environment;
60
+ installing a package does not deploy or upgrade programs.
61
+
62
+ The Spoke IDL includes the Rust-derived `V5AdapterInput`, `AcrossDepositJitParams`, and `V5FillJit` schemas
63
+ carried inside opaque instruction bytes. Event-authority PDA seeds are preserved for account resolution.
64
+ Circle owns the MessageTransmitterV2 and TokenMessengerMinterV2 schemas. They have no stable `/svm/idl/`
65
+ exports here; downstream generators should use reviewed, commit-pinned IDLs from
66
+ [Circle's repository](https://github.com/circlefin/solana-cctp-contracts/tree/master/examples/target/idl),
67
+ with the source revision recorded and compatibility checked against the intended deployment.
68
+ The reviewed Circle V2 snapshots in `idls/` remain available through the existing legacy IDL/client exports
69
+ during migration. SDK owns the downstream Circle client generation; this does not remove CCTP support.
70
+ Existing production generated clients, runtime helpers, legacy IDL deep imports, and EVM/shared exports remain available
71
+ during downstream migration. `MulticallHandlerCoder` is a handwritten compilation helper, not generated from
72
+ the program IDL; migrating it requires moving its logic downstream separately from IDL-based client generation.
73
+
74
+ Compatibility change from `6.0.0-beta.3`: the test program's root `TestIdl` and `TestAnchor` exports and
75
+ `dist/src/svm/assets/idl/test.json`, `dist/src/svm/assets/test.js` and `dist/src/svm/assets/test.d.ts` are removed.
76
+ Tests that need these interfaces must generate them from the matching source tag; they are not production APIs.
77
+
78
+ For maintainers, `yarn generate-svm-artifacts` always generates production interfaces, even with `IS_TEST=true`.
79
+ `yarn generate-svm-test-idls` writes test-feature and mock interfaces only under `target/`.
80
+ The explicit `/svm/idl/` entries in `package.json` allowlist the public Across IDLs. `yarn build-ts` exports those JSON
81
+ files to both the stable paths and the legacy `dist` paths, and retains Circle V2 JSON only in the legacy paths.
82
+ `npm pack` and `npm publish` run the same `prepack`
83
+ build, including EVM artifact export. Generate production artifacts first (and build EVM artifacts with
84
+ `yarn build-evm-foundry`). Run `yarn test-svm-idl-package` to inspect a real tarball and generate/compile clients
85
+ in an external fixture using only its IDLs. This check requires no validator or network access.
86
+
87
+ SVM binaries are a separate [GitHub Releases](https://github.com/across-protocol/contracts/releases) channel:
88
+ `svm-verified-test-binaries.tar.gz` contains test-feature binaries for downstream integration tests;
89
+ `svm-verified-production-binaries.tar.gz` contains production binaries. Both archives contain `target/deploy`.
90
+ Pin the release tag corresponding to the npm package version when pairing interfaces and binaries.
91
+ Test-only IDLs and mock interfaces are not npm exports; tests needing those interfaces must generate them
92
+ from the matching source tag. Test binaries must never be used for production deployment.
93
+
37
94
  ## Build
38
95
 
39
96
  ```shell
@@ -190,7 +247,7 @@ export MAX_LEN=$(( 2 * $(stat -c %s target/deploy/$PROGRAM.so) )) # Reserve twic
190
247
 
191
248
  #### Initial deployment
192
249
 
193
- Deploy the program and set the upgrade authority to the multisig:
250
+ Deploy the selected program and initialize its canonical IDL while `$KEYPAIR` holds upgrade authority:
194
251
 
195
252
  ```shell
196
253
  solana program deploy \
@@ -207,22 +264,18 @@ anchor idl init \
207
264
  --provider.wallet $KEYPAIR \
208
265
  --filepath target/idl/$PROGRAM.json \
209
266
  $PROGRAM_ID
210
- solana program set-upgrade-authority \
211
- --url $RPC_URL \
212
- --keypair $KEYPAIR \
213
- --skip-new-upgrade-authority-signer-check \
214
- $PROGRAM_ID \
215
- --new-upgrade-authority $MULTISIG
216
267
  ```
217
268
 
218
269
  Update and commit `deployments/legacy-addresses.json` with the deployed program ID and deployment slot.
219
270
 
220
271
  Anchor 1.1.2 stores canonical IDLs in the separate Program Metadata program. Its authority follows the
221
- program upgrade authority; there is no separate `anchor idl set-authority` step. The sequence above initializes
222
- the canonical IDL before transferring program authority. If Squads already holds authority,
272
+ program upgrade authority; there is no separate `anchor idl set-authority` step. Initialize the canonical IDL
273
+ and complete the applicable program setup below before transferring program authority. If Squads already holds authority,
223
274
  perform the canonical metadata write through Squads as described below.
224
275
 
225
- `svm_spoke` also requires initialization and transfer of ownership on the first deployment:
276
+ For `svm_spoke`, initialize the state while `$KEYPAIR` is still the program's upgrade authority.
277
+ The script makes `$KEYPAIR` the initial local owner, then transfers local ownership to `$MULTISIG` via `--svmAdmin`.
278
+ Program upgrade authority is transferred separately after setup. See the [initialization requirements](scripts/svm/README.md#initialize-a-fresh-spoke-deployment).
226
279
 
227
280
  ```shell
228
281
  anchor run initialize \
@@ -246,7 +299,7 @@ anchor run createVault \
246
299
  --originToken $MINT
247
300
  ```
248
301
 
249
- `sponsored_cctp_src_periphery` requires initialization and setting minimum deposit amount for supported burn token:
302
+ For `sponsored_cctp_src_periphery`, initialize and set the minimum deposit amount for the supported burn token:
250
303
 
251
304
  ```shell
252
305
  # Replace --quoteSigner with actual quote signer address
@@ -262,6 +315,23 @@ anchor run setMinimumDepositSponsoredCctpSrc \
262
315
  --amount 0
263
316
  ```
264
317
 
318
+ These sponsored CCTP scripts submit directly when `$KEYPAIR` holds upgrade authority. If authority has already
319
+ been transferred to Squads, they simulate and export transactions for multisig execution instead. Execute and
320
+ confirm the initialization transaction through Squads before running the minimum-deposit script, then execute
321
+ its exported transaction through Squads as well; simulation alone does not update on-chain state.
322
+
323
+ After completing the setup for the selected program, transfer its upgrade authority to the multisig if `$KEYPAIR`
324
+ still holds it:
325
+
326
+ ```shell
327
+ solana program set-upgrade-authority \
328
+ --url $RPC_URL \
329
+ --keypair $KEYPAIR \
330
+ --skip-new-upgrade-authority-signer-check \
331
+ $PROGRAM_ID \
332
+ --new-upgrade-authority $MULTISIG
333
+ ```
334
+
265
335
  #### Upgrades
266
336
 
267
337
  Initiate the program upgrade:
@@ -1,7 +1,5 @@
1
- declare const MessageTransmitterV2Idl: any;
2
- declare const MulticallHandlerIdl: any;
3
- declare const SponsoredCctpSrcPeripheryIdl: any;
4
- declare const SvmSpokeIdl: any;
5
- declare const TestIdl: any;
6
- declare const TokenMessengerMinterV2Idl: any;
7
- export { MessageTransmitterV2Idl, MulticallHandlerIdl, SponsoredCctpSrcPeripheryIdl, SvmSpokeIdl, TestIdl, TokenMessengerMinterV2Idl };
1
+ export declare const SvmSpokeIdl: any;
2
+ export declare const MulticallHandlerIdl: any;
3
+ export declare const SponsoredCctpSrcPeripheryIdl: any;
4
+ export declare const MessageTransmitterV2Idl: any;
5
+ export declare const TokenMessengerMinterV2Idl: any;
@@ -1,17 +1,9 @@
1
1
  "use strict";
2
2
  // This file has been autogenerated. Do not edit manually.
3
- // Generated by a script.
4
3
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.TokenMessengerMinterV2Idl = exports.TestIdl = exports.SvmSpokeIdl = exports.SponsoredCctpSrcPeripheryIdl = exports.MulticallHandlerIdl = exports.MessageTransmitterV2Idl = void 0;
6
- const MessageTransmitterV2Idl = require("./message_transmitter_v2.json");
7
- exports.MessageTransmitterV2Idl = MessageTransmitterV2Idl;
8
- const MulticallHandlerIdl = require("./multicall_handler.json");
9
- exports.MulticallHandlerIdl = MulticallHandlerIdl;
10
- const SponsoredCctpSrcPeripheryIdl = require("./sponsored_cctp_src_periphery.json");
11
- exports.SponsoredCctpSrcPeripheryIdl = SponsoredCctpSrcPeripheryIdl;
12
- const SvmSpokeIdl = require("./svm_spoke.json");
13
- exports.SvmSpokeIdl = SvmSpokeIdl;
14
- const TestIdl = require("./test.json");
15
- exports.TestIdl = TestIdl;
16
- const TokenMessengerMinterV2Idl = require("./token_messenger_minter_v2.json");
17
- exports.TokenMessengerMinterV2Idl = TokenMessengerMinterV2Idl;
4
+ exports.TokenMessengerMinterV2Idl = exports.MessageTransmitterV2Idl = exports.SponsoredCctpSrcPeripheryIdl = exports.MulticallHandlerIdl = exports.SvmSpokeIdl = void 0;
5
+ exports.SvmSpokeIdl = require("./svm_spoke.json");
6
+ exports.MulticallHandlerIdl = require("./multicall_handler.json");
7
+ exports.SponsoredCctpSrcPeripheryIdl = require("./sponsored_cctp_src_periphery.json");
8
+ exports.MessageTransmitterV2Idl = require("./message_transmitter_v2.json");
9
+ exports.TokenMessengerMinterV2Idl = require("./token_messenger_minter_v2.json");
@@ -1390,12 +1390,14 @@
1390
1390
  "Initializes the state for the SVM Spoke Pool. Only callable once.",
1391
1391
  "",
1392
1392
  "### Required Accounts:",
1393
- "- signer (Writable, Signer): The account that pays for the transaction and will own the state.",
1394
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
1393
+ "- signer (Writable, Signer): The program's current upgrade authority, which pays for and will own the state.",
1394
+ "- state (Writable): Spoke state PDA. Seeds: [\"state\", seed], where seed is 0 in production.",
1395
+ "- this_program: This SVM Spoke program's executable account.",
1396
+ "- program_data: This program's ProgramData account, which must name signer as upgrade authority.",
1395
1397
  "- system_program: The system program required for account creation.",
1396
1398
  "",
1397
1399
  "### Parameters:",
1398
- "- seed: A unique seed used to derive the state account's address. Must be 0 on Mainnet.",
1400
+ "- seed: A unique seed used to derive the state account's address. Must be 0 in production.",
1399
1401
  "- initial_number_of_deposits: The initial number of deposits. Used to offset in upgrades.",
1400
1402
  "- chain_id: The chain ID for Solana, used to identify the Solana spoke in the rest of the Across protocol.",
1401
1403
  "- remote_domain: The CCTP domain for Mainnet Ethereum.",
@@ -1441,6 +1443,13 @@
1441
1443
  ]
1442
1444
  }
1443
1445
  },
1446
+ {
1447
+ "name": "this_program",
1448
+ "address": "DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru"
1449
+ },
1450
+ {
1451
+ "name": "program_data"
1452
+ },
1444
1453
  {
1445
1454
  "name": "system_program",
1446
1455
  "address": "11111111111111111111111111111111"
@@ -2745,6 +2754,16 @@
2745
2754
  "name": "InvalidDelegatePda",
2746
2755
  "msg": "Invalid delegate PDA!"
2747
2756
  },
2757
+ {
2758
+ "code": 7017,
2759
+ "name": "InvalidProgramData",
2760
+ "msg": "Invalid program data account!"
2761
+ },
2762
+ {
2763
+ "code": 7018,
2764
+ "name": "NotUpgradeAuthority",
2765
+ "msg": "Only the program upgrade authority can initialize!"
2766
+ },
2748
2767
  {
2749
2768
  "code": 8000,
2750
2769
  "name": "InvalidWireFormat",
@@ -2787,36 +2806,31 @@
2787
2806
  },
2788
2807
  {
2789
2808
  "code": 8008,
2790
- "name": "UnsupportedMode",
2791
- "msg": "Across V5 adapter mode is not enabled!"
2792
- },
2793
- {
2794
- "code": 8009,
2795
2809
  "name": "InvalidTokenAccount",
2796
2810
  "msg": "Invalid Across V5 token account!"
2797
2811
  },
2798
2812
  {
2799
- "code": 8010,
2813
+ "code": 8009,
2800
2814
  "name": "UnsupportedTokenExtension",
2801
2815
  "msg": "Unsupported Across V5 token extension!"
2802
2816
  },
2803
2817
  {
2804
- "code": 8011,
2818
+ "code": 8010,
2805
2819
  "name": "InvalidFillPayer",
2806
2820
  "msg": "Invalid Across V5 fill payer!"
2807
2821
  },
2808
2822
  {
2809
- "code": 8012,
2823
+ "code": 8011,
2810
2824
  "name": "InvalidFillStatusAccount",
2811
2825
  "msg": "Invalid Across V5 fill status account!"
2812
2826
  },
2813
2827
  {
2814
- "code": 8013,
2828
+ "code": 8012,
2815
2829
  "name": "FillCommitmentMismatch",
2816
2830
  "msg": "Across V5 fill data does not match the committed input!"
2817
2831
  },
2818
2832
  {
2819
- "code": 8014,
2833
+ "code": 8013,
2820
2834
  "name": "FillOutputAmountTooLow",
2821
2835
  "msg": "Across V5 fill output amount is below the committed floor!"
2822
2836
  },
@@ -3878,6 +3892,9 @@
3878
3892
  },
3879
3893
  {
3880
3894
  "name": "V5FillJit",
3895
+ "docs": [
3896
+ "The funder must validate the relay against the source deposit and both repayment fields before signing the fill tx."
3897
+ ],
3881
3898
  "type": {
3882
3899
  "kind": "struct",
3883
3900
  "fields": [
@@ -1,7 +1,6 @@
1
1
  export * from "./idl";
2
- export { MessageTransmitterV2 as MessageTransmitterV2Anchor } from "./message_transmitter_v2";
2
+ export { SvmSpoke as SvmSpokeAnchor } from "./svm_spoke";
3
3
  export { MulticallHandler as MulticallHandlerAnchor } from "./multicall_handler";
4
4
  export { SponsoredCctpSrcPeriphery as SponsoredCctpSrcPeripheryAnchor } from "./sponsored_cctp_src_periphery";
5
- export { SvmSpoke as SvmSpokeAnchor } from "./svm_spoke";
6
- export { Test as TestAnchor } from "./test";
5
+ export { MessageTransmitterV2 as MessageTransmitterV2Anchor } from "./message_transmitter_v2";
7
6
  export { TokenMessengerMinterV2 as TokenMessengerMinterV2Anchor } from "./token_messenger_minter_v2";
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  // This file has been autogenerated. Do not edit manually.
3
- // Generated by a script.
4
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
4
  if (k2 === undefined) k2 = k;
6
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1396,12 +1396,14 @@ export type SvmSpoke = {
1396
1396
  "Initializes the state for the SVM Spoke Pool. Only callable once.",
1397
1397
  "",
1398
1398
  "### Required Accounts:",
1399
- "- signer (Writable, Signer): The account that pays for the transaction and will own the state.",
1400
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
1399
+ "- signer (Writable, Signer): The program's current upgrade authority, which pays for and will own the state.",
1400
+ "- state (Writable): Spoke state PDA. Seeds: [\"state\", seed], where seed is 0 in production.",
1401
+ "- this_program: This SVM Spoke program's executable account.",
1402
+ "- program_data: This program's ProgramData account, which must name signer as upgrade authority.",
1401
1403
  "- system_program: The system program required for account creation.",
1402
1404
  "",
1403
1405
  "### Parameters:",
1404
- "- seed: A unique seed used to derive the state account's address. Must be 0 on Mainnet.",
1406
+ "- seed: A unique seed used to derive the state account's address. Must be 0 in production.",
1405
1407
  "- initial_number_of_deposits: The initial number of deposits. Used to offset in upgrades.",
1406
1408
  "- chain_id: The chain ID for Solana, used to identify the Solana spoke in the rest of the Across protocol.",
1407
1409
  "- remote_domain: The CCTP domain for Mainnet Ethereum.",
@@ -1447,6 +1449,13 @@ export type SvmSpoke = {
1447
1449
  ];
1448
1450
  };
1449
1451
  },
1452
+ {
1453
+ "name": "thisProgram";
1454
+ "address": "DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru";
1455
+ },
1456
+ {
1457
+ "name": "programData";
1458
+ },
1450
1459
  {
1451
1460
  "name": "systemProgram";
1452
1461
  "address": "11111111111111111111111111111111";
@@ -2751,6 +2760,16 @@ export type SvmSpoke = {
2751
2760
  "name": "invalidDelegatePda";
2752
2761
  "msg": "Invalid delegate PDA!";
2753
2762
  },
2763
+ {
2764
+ "code": 7017;
2765
+ "name": "invalidProgramData";
2766
+ "msg": "Invalid program data account!";
2767
+ },
2768
+ {
2769
+ "code": 7018;
2770
+ "name": "notUpgradeAuthority";
2771
+ "msg": "Only the program upgrade authority can initialize!";
2772
+ },
2754
2773
  {
2755
2774
  "code": 8000;
2756
2775
  "name": "invalidWireFormat";
@@ -2793,36 +2812,31 @@ export type SvmSpoke = {
2793
2812
  },
2794
2813
  {
2795
2814
  "code": 8008;
2796
- "name": "unsupportedMode";
2797
- "msg": "Across V5 adapter mode is not enabled!";
2798
- },
2799
- {
2800
- "code": 8009;
2801
2815
  "name": "invalidTokenAccount";
2802
2816
  "msg": "Invalid Across V5 token account!";
2803
2817
  },
2804
2818
  {
2805
- "code": 8010;
2819
+ "code": 8009;
2806
2820
  "name": "unsupportedTokenExtension";
2807
2821
  "msg": "Unsupported Across V5 token extension!";
2808
2822
  },
2809
2823
  {
2810
- "code": 8011;
2824
+ "code": 8010;
2811
2825
  "name": "invalidFillPayer";
2812
2826
  "msg": "Invalid Across V5 fill payer!";
2813
2827
  },
2814
2828
  {
2815
- "code": 8012;
2829
+ "code": 8011;
2816
2830
  "name": "invalidFillStatusAccount";
2817
2831
  "msg": "Invalid Across V5 fill status account!";
2818
2832
  },
2819
2833
  {
2820
- "code": 8013;
2834
+ "code": 8012;
2821
2835
  "name": "fillCommitmentMismatch";
2822
2836
  "msg": "Across V5 fill data does not match the committed input!";
2823
2837
  },
2824
2838
  {
2825
- "code": 8014;
2839
+ "code": 8013;
2826
2840
  "name": "fillOutputAmountTooLow";
2827
2841
  "msg": "Across V5 fill output amount is below the committed floor!";
2828
2842
  },
@@ -3884,6 +3898,9 @@ export type SvmSpoke = {
3884
3898
  },
3885
3899
  {
3886
3900
  "name": "v5FillJit";
3901
+ "docs": [
3902
+ "The funder must validate the relay against the source deposit and both repayment fields before signing the fill tx."
3903
+ ];
3887
3904
  "type": {
3888
3905
  "kind": "struct";
3889
3906
  "fields": [
@@ -72,6 +72,10 @@ export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 7014;
72
72
  export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 7015;
73
73
  /** InvalidDelegatePda: Invalid delegate PDA! */
74
74
  export declare const SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 7016;
75
+ /** InvalidProgramData: Invalid program data account! */
76
+ export declare const SVM_SPOKE_ERROR__INVALID_PROGRAM_DATA = 7017;
77
+ /** NotUpgradeAuthority: Only the program upgrade authority can initialize! */
78
+ export declare const SVM_SPOKE_ERROR__NOT_UPGRADE_AUTHORITY = 7018;
75
79
  /** InvalidWireFormat: Malformed Across V5 wire data! */
76
80
  export declare const SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT = 8000;
77
81
  /** InvalidParamModificationSignature: Invalid Across V5 parameter modification signature! */
@@ -88,20 +92,18 @@ export declare const SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED = 80
88
92
  export declare const SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT = 8006;
89
93
  /** InvalidAmountBips: Across V5 input amount bips exceed the denominator! */
90
94
  export declare const SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS = 8007;
91
- /** UnsupportedMode: Across V5 adapter mode is not enabled! */
92
- export declare const SVM_SPOKE_ERROR__UNSUPPORTED_MODE = 8008;
93
95
  /** InvalidTokenAccount: Invalid Across V5 token account! */
94
- export declare const SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = 8009;
96
+ export declare const SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = 8008;
95
97
  /** UnsupportedTokenExtension: Unsupported Across V5 token extension! */
96
- export declare const SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 8010;
98
+ export declare const SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 8009;
97
99
  /** InvalidFillPayer: Invalid Across V5 fill payer! */
98
- export declare const SVM_SPOKE_ERROR__INVALID_FILL_PAYER = 8011;
100
+ export declare const SVM_SPOKE_ERROR__INVALID_FILL_PAYER = 8010;
99
101
  /** InvalidFillStatusAccount: Invalid Across V5 fill status account! */
100
- export declare const SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = 8012;
102
+ export declare const SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = 8011;
101
103
  /** FillCommitmentMismatch: Across V5 fill data does not match the committed input! */
102
- export declare const SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = 8013;
104
+ export declare const SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = 8012;
103
105
  /** FillOutputAmountTooLow: Across V5 fill output amount is below the committed floor! */
104
- export declare const SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = 8014;
106
+ export declare const SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = 8013;
105
107
  /** InvalidSelector: Invalid solidity selector */
106
108
  export declare const SVM_SPOKE_ERROR__INVALID_SELECTOR = 9000;
107
109
  /** InvalidArgument: Invalid solidity argument */
@@ -116,7 +118,7 @@ export declare const SVM_SPOKE_ERROR__INVALID_UINT32 = 9004;
116
118
  export declare const SVM_SPOKE_ERROR__INVALID_UINT64 = 9005;
117
119
  /** UnsupportedSelector: Unsupported solidity selector */
118
120
  export declare const SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = 9006;
119
- export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH | typeof SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW | typeof SVM_SPOKE_ERROR__FILLS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_ACCOUNT_MUTABILITY | typeof SVM_SPOKE_ERROR__INVALID_ADDRESS | typeof SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS | typeof SVM_SPOKE_ERROR__INVALID_ARGUMENT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_BOOL | typeof SVM_SPOKE_ERROR__INVALID_CHAIN_ID | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_DISPATCH_AUTHORITY | typeof SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__INVALID_FILL_PAYER | typeof SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_OUTPUT_TOKEN | typeof SVM_SPOKE_ERROR__INVALID_PARAM_MODIFICATION_SIGNATURE | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__INVALID_SELECTOR | typeof SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_UINT32 | typeof SVM_SPOKE_ERROR__INVALID_UINT64 | typeof SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT | typeof SVM_SPOKE_ERROR__MISSING_ACCOUNT | typeof SVM_SPOKE_ERROR__NON_ZERO_AMOUNT_TO_RETURN | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__RELAY_FILLED | typeof SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED | typeof SVM_SPOKE_ERROR__RETIRED_INVALID_SLOW_FILL_REQUEST | typeof SVM_SPOKE_ERROR__RETIRED_NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW | typeof SVM_SPOKE_ERROR__UNSUPPORTED_MODE | typeof SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR | typeof SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
121
+ export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH | typeof SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW | typeof SVM_SPOKE_ERROR__FILLS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_ACCOUNT_MUTABILITY | typeof SVM_SPOKE_ERROR__INVALID_ADDRESS | typeof SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS | typeof SVM_SPOKE_ERROR__INVALID_ARGUMENT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_BOOL | typeof SVM_SPOKE_ERROR__INVALID_CHAIN_ID | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_DISPATCH_AUTHORITY | typeof SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__INVALID_FILL_PAYER | typeof SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_OUTPUT_TOKEN | typeof SVM_SPOKE_ERROR__INVALID_PARAM_MODIFICATION_SIGNATURE | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_PROGRAM_DATA | typeof SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__INVALID_SELECTOR | typeof SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_UINT32 | typeof SVM_SPOKE_ERROR__INVALID_UINT64 | typeof SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT | typeof SVM_SPOKE_ERROR__MISSING_ACCOUNT | typeof SVM_SPOKE_ERROR__NON_ZERO_AMOUNT_TO_RETURN | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__NOT_UPGRADE_AUTHORITY | typeof SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__RELAY_FILLED | typeof SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED | typeof SVM_SPOKE_ERROR__RETIRED_INVALID_SLOW_FILL_REQUEST | typeof SVM_SPOKE_ERROR__RETIRED_NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW | typeof SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR | typeof SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
120
122
  export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
121
123
  export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
122
124
  instructions: Record<number, {
@@ -7,8 +7,8 @@
7
7
  * @see https://github.com/codama-idl/codama
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.SVM_SPOKE_ERROR__INVALID_ARGUMENT = exports.SVM_SPOKE_ERROR__INVALID_SELECTOR = exports.SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = exports.SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = exports.SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_FILL_PAYER = exports.SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = exports.SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__UNSUPPORTED_MODE = exports.SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS = exports.SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT = exports.SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED = exports.SVM_SPOKE_ERROR__INVALID_ACCOUNT_MUTABILITY = exports.SVM_SPOKE_ERROR__INVALID_DISPATCH_AUTHORITY = exports.SVM_SPOKE_ERROR__MISSING_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_PARAM_MODIFICATION_SIGNATURE = exports.SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT = exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__NON_ZERO_AMOUNT_TO_RETURN = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__NOT_OWNER = exports.SVM_SPOKE_ERROR__INVALID_OUTPUT_TOKEN = exports.SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF = exports.SVM_SPOKE_ERROR__FILLS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_CHAIN_ID = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF = exports.SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__RETIRED_INVALID_SLOW_FILL_REQUEST = exports.SVM_SPOKE_ERROR__RELAY_FILLED = exports.SVM_SPOKE_ERROR__RETIRED_NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW = exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP = void 0;
11
- exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = exports.SVM_SPOKE_ERROR__INVALID_UINT64 = exports.SVM_SPOKE_ERROR__INVALID_UINT32 = exports.SVM_SPOKE_ERROR__INVALID_ADDRESS = exports.SVM_SPOKE_ERROR__INVALID_BOOL = void 0;
10
+ exports.SVM_SPOKE_ERROR__INVALID_SELECTOR = exports.SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = exports.SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = exports.SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_FILL_PAYER = exports.SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = exports.SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS = exports.SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT = exports.SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED = exports.SVM_SPOKE_ERROR__INVALID_ACCOUNT_MUTABILITY = exports.SVM_SPOKE_ERROR__INVALID_DISPATCH_AUTHORITY = exports.SVM_SPOKE_ERROR__MISSING_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_PARAM_MODIFICATION_SIGNATURE = exports.SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT = exports.SVM_SPOKE_ERROR__NOT_UPGRADE_AUTHORITY = exports.SVM_SPOKE_ERROR__INVALID_PROGRAM_DATA = exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__NON_ZERO_AMOUNT_TO_RETURN = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__NOT_OWNER = exports.SVM_SPOKE_ERROR__INVALID_OUTPUT_TOKEN = exports.SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF = exports.SVM_SPOKE_ERROR__FILLS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_CHAIN_ID = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF = exports.SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__RETIRED_INVALID_SLOW_FILL_REQUEST = exports.SVM_SPOKE_ERROR__RELAY_FILLED = exports.SVM_SPOKE_ERROR__RETIRED_NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW = exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP = void 0;
11
+ exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = exports.SVM_SPOKE_ERROR__INVALID_UINT64 = exports.SVM_SPOKE_ERROR__INVALID_UINT32 = exports.SVM_SPOKE_ERROR__INVALID_ADDRESS = exports.SVM_SPOKE_ERROR__INVALID_BOOL = exports.SVM_SPOKE_ERROR__INVALID_ARGUMENT = void 0;
12
12
  exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
13
13
  exports.isSvmSpokeError = isSvmSpokeError;
14
14
  const kit_1 = require("@solana/kit");
@@ -79,6 +79,10 @@ exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x1b66; // 7014
79
79
  exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1b67; // 7015
80
80
  /** InvalidDelegatePda: Invalid delegate PDA! */
81
81
  exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 0x1b68; // 7016
82
+ /** InvalidProgramData: Invalid program data account! */
83
+ exports.SVM_SPOKE_ERROR__INVALID_PROGRAM_DATA = 0x1b69; // 7017
84
+ /** NotUpgradeAuthority: Only the program upgrade authority can initialize! */
85
+ exports.SVM_SPOKE_ERROR__NOT_UPGRADE_AUTHORITY = 0x1b6a; // 7018
82
86
  /** InvalidWireFormat: Malformed Across V5 wire data! */
83
87
  exports.SVM_SPOKE_ERROR__INVALID_WIRE_FORMAT = 0x1f40; // 8000
84
88
  /** InvalidParamModificationSignature: Invalid Across V5 parameter modification signature! */
@@ -95,20 +99,18 @@ exports.SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED = 0x1f45; // 8005
95
99
  exports.SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT = 0x1f46; // 8006
96
100
  /** InvalidAmountBips: Across V5 input amount bips exceed the denominator! */
97
101
  exports.SVM_SPOKE_ERROR__INVALID_AMOUNT_BIPS = 0x1f47; // 8007
98
- /** UnsupportedMode: Across V5 adapter mode is not enabled! */
99
- exports.SVM_SPOKE_ERROR__UNSUPPORTED_MODE = 0x1f48; // 8008
100
102
  /** InvalidTokenAccount: Invalid Across V5 token account! */
101
- exports.SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = 0x1f49; // 8009
103
+ exports.SVM_SPOKE_ERROR__INVALID_TOKEN_ACCOUNT = 0x1f48; // 8008
102
104
  /** UnsupportedTokenExtension: Unsupported Across V5 token extension! */
103
- exports.SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 0x1f4a; // 8010
105
+ exports.SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 0x1f49; // 8009
104
106
  /** InvalidFillPayer: Invalid Across V5 fill payer! */
105
- exports.SVM_SPOKE_ERROR__INVALID_FILL_PAYER = 0x1f4b; // 8011
107
+ exports.SVM_SPOKE_ERROR__INVALID_FILL_PAYER = 0x1f4a; // 8010
106
108
  /** InvalidFillStatusAccount: Invalid Across V5 fill status account! */
107
- exports.SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = 0x1f4c; // 8012
109
+ exports.SVM_SPOKE_ERROR__INVALID_FILL_STATUS_ACCOUNT = 0x1f4b; // 8011
108
110
  /** FillCommitmentMismatch: Across V5 fill data does not match the committed input! */
109
- exports.SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = 0x1f4d; // 8013
111
+ exports.SVM_SPOKE_ERROR__FILL_COMMITMENT_MISMATCH = 0x1f4c; // 8012
110
112
  /** FillOutputAmountTooLow: Across V5 fill output amount is below the committed floor! */
111
- exports.SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = 0x1f4e; // 8014
113
+ exports.SVM_SPOKE_ERROR__FILL_OUTPUT_AMOUNT_TOO_LOW = 0x1f4d; // 8013
112
114
  /** InvalidSelector: Invalid solidity selector */
113
115
  exports.SVM_SPOKE_ERROR__INVALID_SELECTOR = 0x2328; // 9000
114
116
  /** InvalidArgument: Invalid solidity argument */
@@ -155,6 +157,7 @@ if (process.env.NODE_ENV !== 'production') {
155
157
  [exports.SVM_SPOKE_ERROR__INVALID_OUTPUT_TOKEN]: `Invalid output token!`,
156
158
  [exports.SVM_SPOKE_ERROR__INVALID_PARAM_MODIFICATION_SIGNATURE]: `Invalid Across V5 parameter modification signature!`,
157
159
  [exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED]: `Seed must be 0 in production!`,
160
+ [exports.SVM_SPOKE_ERROR__INVALID_PROGRAM_DATA]: `Invalid program data account!`,
158
161
  [exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP]: `Invalid quote timestamp!`,
159
162
  [exports.SVM_SPOKE_ERROR__INVALID_REFUND]: `Invalid refund address!`,
160
163
  [exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT]: `Invalid refund token account!`,
@@ -171,13 +174,13 @@ if (process.env.NODE_ENV !== 'production') {
171
174
  [exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER]: `Caller is not the exclusive relayer and exclusivity deadline has not passed!`,
172
175
  [exports.SVM_SPOKE_ERROR__NOT_OWNER]: `Only the owner can call this function!`,
173
176
  [exports.SVM_SPOKE_ERROR__NOT_RELAYER]: `The caller is not the relayer!`,
177
+ [exports.SVM_SPOKE_ERROR__NOT_UPGRADE_AUTHORITY]: `Only the program upgrade authority can initialize!`,
174
178
  [exports.SVM_SPOKE_ERROR__PARAM_MODIFICATION_NOT_AN_IMPROVEMENT]: `Across V5 parameter modification is not an improvement!`,
175
179
  [exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW]: `Overflow writing to parameters account!`,
176
180
  [exports.SVM_SPOKE_ERROR__RELAY_FILLED]: `The relay has already been filled!`,
177
181
  [exports.SVM_SPOKE_ERROR__RESOLVED_INPUT_AMOUNT_BELOW_COMMITTED]: `Resolved Across V5 input amount is below the committed floor!`,
178
182
  [exports.SVM_SPOKE_ERROR__RETIRED_INVALID_SLOW_FILL_REQUEST]: `Slow fill requires status of Unfilled!`,
179
183
  [exports.SVM_SPOKE_ERROR__RETIRED_NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW]: `The Deposit is still within the exclusivity window!`,
180
- [exports.SVM_SPOKE_ERROR__UNSUPPORTED_MODE]: `Across V5 adapter mode is not enabled!`,
181
184
  [exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR]: `Unsupported solidity selector`,
182
185
  [exports.SVM_SPOKE_ERROR__UNSUPPORTED_TOKEN_EXTENSION]: `Unsupported Across V5 token extension!`,
183
186
  [exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM]: `Zero relayer refund claim!`,
@@ -9,9 +9,11 @@ import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, typ
9
9
  import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
10
10
  export declare const INITIALIZE_DISCRIMINATOR: Uint8Array;
11
11
  export declare function getInitializeDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
12
- export type InitializeInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | AccountMeta<string> = string, TAccountState extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
12
+ export type InitializeInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountSigner extends string | AccountMeta<string> = string, TAccountState extends string | AccountMeta<string> = string, TAccountThisProgram extends string | AccountMeta<string> = 'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru', TAccountProgramData extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
13
  TAccountSigner extends string ? WritableSignerAccount<TAccountSigner> & AccountSignerMeta<TAccountSigner> : TAccountSigner,
14
14
  TAccountState extends string ? WritableAccount<TAccountState> : TAccountState,
15
+ TAccountThisProgram extends string ? ReadonlyAccount<TAccountThisProgram> : TAccountThisProgram,
16
+ TAccountProgramData extends string ? ReadonlyAccount<TAccountProgramData> : TAccountProgramData,
15
17
  TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
16
18
  ...TRemainingAccounts
17
19
  ]>;
@@ -37,9 +39,11 @@ export type InitializeInstructionDataArgs = {
37
39
  export declare function getInitializeInstructionDataEncoder(): Encoder<InitializeInstructionDataArgs>;
38
40
  export declare function getInitializeInstructionDataDecoder(): Decoder<InitializeInstructionData>;
39
41
  export declare function getInitializeInstructionDataCodec(): Codec<InitializeInstructionDataArgs, InitializeInstructionData>;
40
- export type InitializeAsyncInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountSystemProgram extends string = string> = {
42
+ export type InitializeAsyncInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountThisProgram extends string = string, TAccountProgramData extends string = string, TAccountSystemProgram extends string = string> = {
41
43
  signer: TransactionSigner<TAccountSigner>;
42
44
  state?: Address<TAccountState>;
45
+ thisProgram?: Address<TAccountThisProgram>;
46
+ programData: Address<TAccountProgramData>;
43
47
  systemProgram?: Address<TAccountSystemProgram>;
44
48
  seed: InitializeInstructionDataArgs['seed'];
45
49
  initialNumberOfDeposits: InitializeInstructionDataArgs['initialNumberOfDeposits'];
@@ -49,12 +53,14 @@ export type InitializeAsyncInput<TAccountSigner extends string = string, TAccoun
49
53
  depositQuoteTimeBuffer: InitializeInstructionDataArgs['depositQuoteTimeBuffer'];
50
54
  fillDeadlineBuffer: InitializeInstructionDataArgs['fillDeadlineBuffer'];
51
55
  };
52
- export declare function getInitializeInstructionAsync<TAccountSigner extends string, TAccountState extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: InitializeAsyncInput<TAccountSigner, TAccountState, TAccountSystemProgram>, config?: {
56
+ export declare function getInitializeInstructionAsync<TAccountSigner extends string, TAccountState extends string, TAccountThisProgram extends string, TAccountProgramData extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: InitializeAsyncInput<TAccountSigner, TAccountState, TAccountThisProgram, TAccountProgramData, TAccountSystemProgram>, config?: {
53
57
  programAddress?: TProgramAddress;
54
- }): Promise<InitializeInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountSystemProgram>>;
55
- export type InitializeInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountSystemProgram extends string = string> = {
58
+ }): Promise<InitializeInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountThisProgram, TAccountProgramData, TAccountSystemProgram>>;
59
+ export type InitializeInput<TAccountSigner extends string = string, TAccountState extends string = string, TAccountThisProgram extends string = string, TAccountProgramData extends string = string, TAccountSystemProgram extends string = string> = {
56
60
  signer: TransactionSigner<TAccountSigner>;
57
61
  state: Address<TAccountState>;
62
+ thisProgram?: Address<TAccountThisProgram>;
63
+ programData: Address<TAccountProgramData>;
58
64
  systemProgram?: Address<TAccountSystemProgram>;
59
65
  seed: InitializeInstructionDataArgs['seed'];
60
66
  initialNumberOfDeposits: InitializeInstructionDataArgs['initialNumberOfDeposits'];
@@ -64,15 +70,17 @@ export type InitializeInput<TAccountSigner extends string = string, TAccountStat
64
70
  depositQuoteTimeBuffer: InitializeInstructionDataArgs['depositQuoteTimeBuffer'];
65
71
  fillDeadlineBuffer: InitializeInstructionDataArgs['fillDeadlineBuffer'];
66
72
  };
67
- export declare function getInitializeInstruction<TAccountSigner extends string, TAccountState extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: InitializeInput<TAccountSigner, TAccountState, TAccountSystemProgram>, config?: {
73
+ export declare function getInitializeInstruction<TAccountSigner extends string, TAccountState extends string, TAccountThisProgram extends string, TAccountProgramData extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof SVM_SPOKE_PROGRAM_ADDRESS>(input: InitializeInput<TAccountSigner, TAccountState, TAccountThisProgram, TAccountProgramData, TAccountSystemProgram>, config?: {
68
74
  programAddress?: TProgramAddress;
69
- }): InitializeInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountSystemProgram>;
75
+ }): InitializeInstruction<TProgramAddress, TAccountSigner, TAccountState, TAccountThisProgram, TAccountProgramData, TAccountSystemProgram>;
70
76
  export type ParsedInitializeInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
71
77
  programAddress: Address<TProgram>;
72
78
  accounts: {
73
79
  signer: TAccountMetas[0];
74
80
  state: TAccountMetas[1];
75
- systemProgram: TAccountMetas[2];
81
+ thisProgram: TAccountMetas[2];
82
+ programData: TAccountMetas[3];
83
+ systemProgram: TAccountMetas[4];
76
84
  };
77
85
  data: InitializeInstructionData;
78
86
  };