@across-protocol/contracts 4.0.11 → 4.0.12

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 (53) hide show
  1. package/dist/scripts/svm/{enableRoute.js → createVault.js} +13 -35
  2. package/dist/scripts/svm/fakeFillWithRandomDistribution.js +9 -8
  3. package/dist/scripts/svm/nativeDeposit.js +138 -0
  4. package/dist/scripts/svm/queryEventsV2.js +3 -3
  5. package/dist/scripts/svm/{queryRoute.js → queryVault.js} +10 -25
  6. package/dist/scripts/svm/remoteHubPoolPauseDeposits.js +2 -2
  7. package/dist/scripts/svm/simpleDeposit.js +3 -12
  8. package/dist/scripts/svm/simpleFakeRelayerRepayment.js +2 -9
  9. package/dist/scripts/svm/simpleFill.js +3 -2
  10. package/dist/src/svm/assets/idl/svm_spoke.json +43 -369
  11. package/dist/src/svm/assets/svm_spoke.d.ts +40 -366
  12. package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +0 -1
  13. package/dist/src/svm/clients/SvmSpoke/accounts/index.js +0 -1
  14. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +3 -1
  15. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +4 -1
  16. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +21 -13
  17. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +38 -6
  18. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +21 -13
  19. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +38 -6
  20. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +20 -16
  21. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +6 -1
  22. package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +0 -1
  23. package/dist/src/svm/clients/SvmSpoke/instructions/index.js +0 -1
  24. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +21 -13
  25. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +38 -6
  26. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +6 -10
  27. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +5 -13
  28. package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +0 -1
  29. package/dist/src/svm/clients/SvmSpoke/types/index.js +0 -1
  30. package/dist/src/svm/web3-v1/helpers.d.ts +114 -1
  31. package/dist/src/svm/web3-v1/helpers.js +179 -1
  32. package/dist/target/types/svm_spoke.d.ts +40 -366
  33. package/dist/test/svm/SvmSpoke.Deposit.js +143 -176
  34. package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +20 -17
  35. package/dist/test/svm/SvmSpoke.Fill.js +52 -38
  36. package/dist/test/svm/SvmSpoke.HandleReceiveMessage.js +2 -114
  37. package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +2 -2
  38. package/dist/test/svm/SvmSpoke.SlowFill.js +37 -34
  39. package/dist/test/svm/SvmSpoke.common.d.ts +2 -3
  40. package/dist/test/svm/SvmSpoke.common.js +3 -12
  41. package/package.json +1 -1
  42. package/dist/scripts/svm/remoteHubPoolSetDepositRoute.d.ts +0 -1
  43. package/dist/scripts/svm/remoteHubPoolSetDepositRoute.js +0 -252
  44. package/dist/src/svm/clients/SvmSpoke/accounts/route.d.ts +0 -27
  45. package/dist/src/svm/clients/SvmSpoke/accounts/route.js +0 -66
  46. package/dist/src/svm/clients/SvmSpoke/instructions/setEnableRoute.d.ts +0 -95
  47. package/dist/src/svm/clients/SvmSpoke/instructions/setEnableRoute.js +0 -213
  48. package/dist/src/svm/clients/SvmSpoke/types/enabledDepositRoute.d.ts +0 -21
  49. package/dist/src/svm/clients/SvmSpoke/types/enabledDepositRoute.js +0 -30
  50. package/dist/test/svm/SvmSpoke.Routes.js +0 -167
  51. /package/dist/scripts/svm/{enableRoute.d.ts → createVault.d.ts} +0 -0
  52. /package/dist/scripts/svm/{queryRoute.d.ts → nativeDeposit.d.ts} +0 -0
  53. /package/dist/{test/svm/SvmSpoke.Routes.d.ts → scripts/svm/queryVault.d.ts} +0 -0
@@ -734,13 +734,12 @@ export type SvmSpoke = {
734
734
  "### Required Accounts:",
735
735
  "- signer (Signer): The account that authorizes the deposit.",
736
736
  "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
737
- "- route (Account): The route PDA for the particular bridged route in question. Validates a route is enabled.",
738
- "Seed: [\"route\",input_token,state.seed,destination_chain_id].",
739
737
  "- depositor_token_account (Writable): The depositor's ATA for the input token.",
740
738
  "- vault (Writable): Programs ATA for the associated input token. This is where the depositor's assets are sent.",
741
739
  "Authority must be the state.",
742
740
  "- mint (Account): The mint account for the input token.",
743
741
  "- token_program (Interface): The token program.",
742
+ "- delegate (Account): The account used to delegate the input amount of the input token.",
744
743
  "",
745
744
  "### Parameters",
746
745
  "- depositor: The account credited with the deposit. Can be different from the signer.",
@@ -752,8 +751,7 @@ export type SvmSpoke = {
752
751
  "amount will be sent to the relayer on their repayment chain of choice as a refund following an optimistic",
753
752
  "challenge window in the HubPool, less a system fee.",
754
753
  "- output_amount: The amount of output tokens that the relayer will send to the recipient on the destination.",
755
- "- destination_chain_id: The destination chain identifier. Must be enabled along with the input token as a valid",
756
- "deposit route from this spoke pool or this transaction will revert.",
754
+ "- destination_chain_id: The destination chain identifier where the fill should be made.",
757
755
  "- exclusive_relayer: The relayer that will be exclusively allowed to fill this deposit before the exclusivity",
758
756
  "deadline timestamp. This must be a valid, non-zero address if the exclusivity deadline is greater than the",
759
757
  "current block timestamp.",
@@ -808,34 +806,7 @@ export type SvmSpoke = {
808
806
  };
809
807
  },
810
808
  {
811
- "name": "route";
812
- "pda": {
813
- "seeds": [
814
- {
815
- "kind": "const";
816
- "value": [
817
- 114,
818
- 111,
819
- 117,
820
- 116,
821
- 101
822
- ];
823
- },
824
- {
825
- "kind": "arg";
826
- "path": "inputToken";
827
- },
828
- {
829
- "kind": "account";
830
- "path": "state.seed";
831
- "account": "state";
832
- },
833
- {
834
- "kind": "arg";
835
- "path": "destinationChainId";
836
- }
837
- ];
838
- };
809
+ "name": "delegate";
839
810
  },
840
811
  {
841
812
  "name": "depositorTokenAccount";
@@ -957,6 +928,14 @@ export type SvmSpoke = {
957
928
  {
958
929
  "name": "tokenProgram";
959
930
  },
931
+ {
932
+ "name": "associatedTokenProgram";
933
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
934
+ },
935
+ {
936
+ "name": "systemProgram";
937
+ "address": "11111111111111111111111111111111";
938
+ },
960
939
  {
961
940
  "name": "eventAuthority";
962
941
  "pda": {
@@ -1087,34 +1066,7 @@ export type SvmSpoke = {
1087
1066
  };
1088
1067
  },
1089
1068
  {
1090
- "name": "route";
1091
- "pda": {
1092
- "seeds": [
1093
- {
1094
- "kind": "const";
1095
- "value": [
1096
- 114,
1097
- 111,
1098
- 117,
1099
- 116,
1100
- 101
1101
- ];
1102
- },
1103
- {
1104
- "kind": "arg";
1105
- "path": "inputToken";
1106
- },
1107
- {
1108
- "kind": "account";
1109
- "path": "state.seed";
1110
- "account": "state";
1111
- },
1112
- {
1113
- "kind": "arg";
1114
- "path": "destinationChainId";
1115
- }
1116
- ];
1117
- };
1069
+ "name": "delegate";
1118
1070
  },
1119
1071
  {
1120
1072
  "name": "depositorTokenAccount";
@@ -1236,6 +1188,14 @@ export type SvmSpoke = {
1236
1188
  {
1237
1189
  "name": "tokenProgram";
1238
1190
  },
1191
+ {
1192
+ "name": "associatedTokenProgram";
1193
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
1194
+ },
1195
+ {
1196
+ "name": "systemProgram";
1197
+ "address": "11111111111111111111111111111111";
1198
+ },
1239
1199
  {
1240
1200
  "name": "eventAuthority";
1241
1201
  "pda": {
@@ -2120,7 +2080,7 @@ export type SvmSpoke = {
2120
2080
  },
2121
2081
  {
2122
2082
  "kind": "arg";
2123
- "path": "root_bundle_id.unwrap_or_else(| |\ninstruction_params";
2083
+ "path": "_root_bundle_id.unwrap_or_else(| |\ninstruction_params";
2124
2084
  }
2125
2085
  ];
2126
2086
  };
@@ -2363,9 +2323,6 @@ export type SvmSpoke = {
2363
2323
  "instruction data due to message size constraints. Pass this program ID to represent None. When Some, this must",
2364
2324
  "be derived from the signer's public key with seed [\"instruction_params\",signer].",
2365
2325
  "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
2366
- "- route (Account): The route PDA for the particular bridged route in question. Validates a route is enabled.",
2367
- "Seed: [\"route\",input_token,state.seed,destination_chain_id].",
2368
- "- vault (Writable): The ATA for refunded mint. Authority must be the state.",
2369
2326
  "- mint (Account): The mint of the output token, sent from the relayer to the recipient.",
2370
2327
  "- relayer_token_account (Writable): The relayer's ATA for the input token.",
2371
2328
  "- recipient_token_account (Writable): The recipient's ATA for the output token.",
@@ -2374,9 +2331,10 @@ export type SvmSpoke = {
2374
2331
  "- token_program (Interface): The token program.",
2375
2332
  "- associated_token_program (Interface): The associated token program.",
2376
2333
  "- system_program (Interface): The system program.",
2334
+ "- delegate (Account): The account used to delegate the output amount of the output token.",
2377
2335
  "",
2378
2336
  "### Parameters:",
2379
- "- _relay_hash: The hash identifying the deposit to be filled. Caller must pass this in. Computed as hash of",
2337
+ "- relay_hash: The hash identifying the deposit to be filled. Caller must pass this in. Computed as hash of",
2380
2338
  "the flattened relay_data & destination_chain_id.",
2381
2339
  "- relay_data: Struct containing all the data needed to identify the deposit to be filled. Should match",
2382
2340
  "all the same-named parameters emitted in the origin chain FundsDeposited event.",
@@ -2476,6 +2434,9 @@ export type SvmSpoke = {
2476
2434
  ];
2477
2435
  };
2478
2436
  },
2437
+ {
2438
+ "name": "delegate";
2439
+ },
2479
2440
  {
2480
2441
  "name": "mint";
2481
2442
  },
@@ -3815,221 +3776,6 @@ export type SvmSpoke = {
3815
3776
  }
3816
3777
  ];
3817
3778
  },
3818
- {
3819
- "name": "setEnableRoute";
3820
- "docs": [
3821
- "Enables or disables a route for deposits from origin token to destination chain ID. Callable only by the owner.",
3822
- "",
3823
- "### Required Accounts:",
3824
- "- signer (Signer): The account that must be the owner to authorize the route change.",
3825
- "- payer (Signer): The account responsible for paying the transaction fees.",
3826
- "- state (Writable): The Spoke state PDA. Seed: [\"state\",state.seed] where `seed` is 0 on mainnet.",
3827
- "- route (Writable): PDA to store route information. Created on the first call, updated subsequently.",
3828
- "Seed: [\"route\",origin_token,state.seed,destination_chain_id].",
3829
- "- vault (Writable): ATA to hold the origin token for the associated route. Created on the first call.",
3830
- "Authority must be set as the state, and mint must be the origin_token_mint.",
3831
- "- origin_token_mint: The mint account for the origin token.",
3832
- "- token_program: The token program.",
3833
- "- associated_token_program: The associated token program.",
3834
- "- system_program: The system program required for account creation.",
3835
- "",
3836
- "### Parameters:",
3837
- "- origin_token: The public key of the origin token.",
3838
- "- destination_chain_id: The chain ID of the destination.",
3839
- "- enabled: Boolean indicating whether the route is enabled or disabled."
3840
- ];
3841
- "discriminator": [
3842
- 166,
3843
- 66,
3844
- 33,
3845
- 156,
3846
- 122,
3847
- 251,
3848
- 223,
3849
- 34
3850
- ];
3851
- "accounts": [
3852
- {
3853
- "name": "signer";
3854
- "signer": true;
3855
- },
3856
- {
3857
- "name": "payer";
3858
- "writable": true;
3859
- "signer": true;
3860
- },
3861
- {
3862
- "name": "state";
3863
- "pda": {
3864
- "seeds": [
3865
- {
3866
- "kind": "const";
3867
- "value": [
3868
- 115,
3869
- 116,
3870
- 97,
3871
- 116,
3872
- 101
3873
- ];
3874
- },
3875
- {
3876
- "kind": "account";
3877
- "path": "state.seed";
3878
- "account": "state";
3879
- }
3880
- ];
3881
- };
3882
- },
3883
- {
3884
- "name": "route";
3885
- "writable": true;
3886
- "pda": {
3887
- "seeds": [
3888
- {
3889
- "kind": "const";
3890
- "value": [
3891
- 114,
3892
- 111,
3893
- 117,
3894
- 116,
3895
- 101
3896
- ];
3897
- },
3898
- {
3899
- "kind": "arg";
3900
- "path": "originToken";
3901
- },
3902
- {
3903
- "kind": "account";
3904
- "path": "state.seed";
3905
- "account": "state";
3906
- },
3907
- {
3908
- "kind": "arg";
3909
- "path": "destinationChainId";
3910
- }
3911
- ];
3912
- };
3913
- },
3914
- {
3915
- "name": "vault";
3916
- "writable": true;
3917
- "pda": {
3918
- "seeds": [
3919
- {
3920
- "kind": "account";
3921
- "path": "state";
3922
- },
3923
- {
3924
- "kind": "account";
3925
- "path": "tokenProgram";
3926
- },
3927
- {
3928
- "kind": "account";
3929
- "path": "originTokenMint";
3930
- }
3931
- ];
3932
- "program": {
3933
- "kind": "const";
3934
- "value": [
3935
- 140,
3936
- 151,
3937
- 37,
3938
- 143,
3939
- 78,
3940
- 36,
3941
- 137,
3942
- 241,
3943
- 187,
3944
- 61,
3945
- 16,
3946
- 41,
3947
- 20,
3948
- 142,
3949
- 13,
3950
- 131,
3951
- 11,
3952
- 90,
3953
- 19,
3954
- 153,
3955
- 218,
3956
- 255,
3957
- 16,
3958
- 132,
3959
- 4,
3960
- 142,
3961
- 123,
3962
- 216,
3963
- 219,
3964
- 233,
3965
- 248,
3966
- 89
3967
- ];
3968
- };
3969
- };
3970
- },
3971
- {
3972
- "name": "originTokenMint";
3973
- },
3974
- {
3975
- "name": "tokenProgram";
3976
- },
3977
- {
3978
- "name": "associatedTokenProgram";
3979
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
3980
- },
3981
- {
3982
- "name": "systemProgram";
3983
- "address": "11111111111111111111111111111111";
3984
- },
3985
- {
3986
- "name": "eventAuthority";
3987
- "pda": {
3988
- "seeds": [
3989
- {
3990
- "kind": "const";
3991
- "value": [
3992
- 95,
3993
- 95,
3994
- 101,
3995
- 118,
3996
- 101,
3997
- 110,
3998
- 116,
3999
- 95,
4000
- 97,
4001
- 117,
4002
- 116,
4003
- 104,
4004
- 111,
4005
- 114,
4006
- 105,
4007
- 116,
4008
- 121
4009
- ];
4010
- }
4011
- ];
4012
- };
4013
- },
4014
- {
4015
- "name": "program";
4016
- }
4017
- ];
4018
- "args": [
4019
- {
4020
- "name": "originToken";
4021
- "type": "pubkey";
4022
- },
4023
- {
4024
- "name": "destinationChainId";
4025
- "type": "u64";
4026
- },
4027
- {
4028
- "name": "enabled";
4029
- "type": "bool";
4030
- }
4031
- ];
4032
- },
4033
3779
  {
4034
3780
  "name": "transferOwnership";
4035
3781
  "docs": [
@@ -4170,34 +3916,7 @@ export type SvmSpoke = {
4170
3916
  };
4171
3917
  },
4172
3918
  {
4173
- "name": "route";
4174
- "pda": {
4175
- "seeds": [
4176
- {
4177
- "kind": "const";
4178
- "value": [
4179
- 114,
4180
- 111,
4181
- 117,
4182
- 116,
4183
- 101
4184
- ];
4185
- },
4186
- {
4187
- "kind": "arg";
4188
- "path": "inputToken";
4189
- },
4190
- {
4191
- "kind": "account";
4192
- "path": "state.seed";
4193
- "account": "state";
4194
- },
4195
- {
4196
- "kind": "arg";
4197
- "path": "destinationChainId";
4198
- }
4199
- ];
4200
- };
3919
+ "name": "delegate";
4201
3920
  },
4202
3921
  {
4203
3922
  "name": "depositorTokenAccount";
@@ -4319,6 +4038,14 @@ export type SvmSpoke = {
4319
4038
  {
4320
4039
  "name": "tokenProgram";
4321
4040
  },
4041
+ {
4042
+ "name": "associatedTokenProgram";
4043
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
4044
+ },
4045
+ {
4046
+ "name": "systemProgram";
4047
+ "address": "11111111111111111111111111111111";
4048
+ },
4322
4049
  {
4323
4050
  "name": "eventAuthority";
4324
4051
  "pda": {
@@ -4583,19 +4310,6 @@ export type SvmSpoke = {
4583
4310
  219
4584
4311
  ];
4585
4312
  },
4586
- {
4587
- "name": "route";
4588
- "discriminator": [
4589
- 80,
4590
- 179,
4591
- 58,
4592
- 115,
4593
- 52,
4594
- 19,
4595
- 146,
4596
- 134
4597
- ];
4598
- },
4599
4313
  {
4600
4314
  "name": "state";
4601
4315
  "discriminator": [
@@ -4663,19 +4377,6 @@ export type SvmSpoke = {
4663
4377
  114
4664
4378
  ];
4665
4379
  },
4666
- {
4667
- "name": "enabledDepositRoute";
4668
- "discriminator": [
4669
- 37,
4670
- 128,
4671
- 171,
4672
- 126,
4673
- 10,
4674
- 179,
4675
- 154,
4676
- 241
4677
- ];
4678
- },
4679
4380
  {
4680
4381
  "name": "executedRelayerRefundRoot";
4681
4382
  "discriminator": [
@@ -4892,6 +4593,11 @@ export type SvmSpoke = {
4892
4593
  "code": 6016;
4893
4594
  "name": "invalidAtaCreationAccounts";
4894
4595
  "msg": "Invalid remaining accounts for ATA creation!";
4596
+ },
4597
+ {
4598
+ "code": 6017;
4599
+ "name": "invalidDelegatePda";
4600
+ "msg": "Invalid delegate PDA!";
4895
4601
  }
4896
4602
  ];
4897
4603
  "types": [
@@ -4959,26 +4665,6 @@ export type SvmSpoke = {
4959
4665
  ];
4960
4666
  };
4961
4667
  },
4962
- {
4963
- "name": "enabledDepositRoute";
4964
- "type": {
4965
- "kind": "struct";
4966
- "fields": [
4967
- {
4968
- "name": "originToken";
4969
- "type": "pubkey";
4970
- },
4971
- {
4972
- "name": "destinationChainId";
4973
- "type": "u64";
4974
- },
4975
- {
4976
- "name": "enabled";
4977
- "type": "bool";
4978
- }
4979
- ];
4980
- };
4981
- },
4982
4668
  {
4983
4669
  "name": "executeRelayerRefundLeafParams";
4984
4670
  "type": {
@@ -5638,18 +5324,6 @@ export type SvmSpoke = {
5638
5324
  ];
5639
5325
  };
5640
5326
  },
5641
- {
5642
- "name": "route";
5643
- "type": {
5644
- "kind": "struct";
5645
- "fields": [
5646
- {
5647
- "name": "enabled";
5648
- "type": "bool";
5649
- }
5650
- ];
5651
- };
5652
- },
5653
5327
  {
5654
5328
  "name": "setXDomainAdmin";
5655
5329
  "type": {
@@ -12,6 +12,5 @@ export * from './fillRelayParams';
12
12
  export * from './fillStatusAccount';
13
13
  export * from './requestSlowFillParams';
14
14
  export * from './rootBundle';
15
- export * from './route';
16
15
  export * from './state';
17
16
  export * from './transferLiability';
@@ -28,6 +28,5 @@ __exportStar(require("./fillRelayParams"), exports);
28
28
  __exportStar(require("./fillStatusAccount"), exports);
29
29
  __exportStar(require("./requestSlowFillParams"), exports);
30
30
  __exportStar(require("./rootBundle"), exports);
31
- __exportStar(require("./route"), exports);
32
31
  __exportStar(require("./state"), exports);
33
32
  __exportStar(require("./transferLiability"), exports);
@@ -40,7 +40,9 @@ export declare const SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 6014;
40
40
  export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 6015;
41
41
  /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
42
42
  export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 6016;
43
- 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__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
43
+ /** InvalidDelegatePda: Invalid delegate PDA! */
44
+ export declare const SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 6017;
45
+ 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__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
44
46
  export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
45
47
  export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
46
48
  instructions: Record<number, {
@@ -7,7 +7,7 @@
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_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__EXCEEDED_PENDING_BRIDGE_AMOUNT = 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__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
10
+ 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__EXCEEDED_PENDING_BRIDGE_AMOUNT = 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__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
11
11
  exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
12
12
  exports.isSvmSpokeError = isSvmSpokeError;
13
13
  const kit_1 = require("@solana/kit");
@@ -46,6 +46,8 @@ exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 0x177e; // 6014
46
46
  exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x177f; // 6015
47
47
  /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
48
48
  exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1780; // 6016
49
+ /** InvalidDelegatePda: Invalid delegate PDA! */
50
+ exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 0x1781; // 6017
49
51
  let svmSpokeErrorMessages;
50
52
  if (process.env.NODE_ENV !== 'production') {
51
53
  svmSpokeErrorMessages = {
@@ -54,6 +56,7 @@ if (process.env.NODE_ENV !== 'production') {
54
56
  [exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT]: `Exceeded pending bridge amount to HubPool!`,
55
57
  [exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS]: `Invalid remaining accounts for ATA creation!`,
56
58
  [exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER]: `Invalid claim initializer!`,
59
+ [exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA]: `Invalid delegate PDA!`,
57
60
  [exports.SVM_SPOKE_ERROR__INVALID_MINT]: `Invalid mint!`,
58
61
  [exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED]: `Seed must be 0 in production!`,
59
62
  [exports.SVM_SPOKE_ERROR__INVALID_REFUND]: `Invalid refund address!`,