@debridge-finance/intents-client 1.7.0 → 1.8.0

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { IdlAccounts } from '@coral-xyz/anchor';
1
+ import { IdlAccounts, BN } from '@coral-xyz/anchor';
2
2
  import { PublicKey, Blockhash, AddressLookupTableAccount, TransactionInstruction, Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
3
3
 
4
4
  /**
@@ -8,10 +8,10 @@ import { PublicKey, Blockhash, AddressLookupTableAccount, TransactionInstruction
8
8
  * IDL can be found at `target/idl/intents_program.json`.
9
9
  */
10
10
  type IntentsProgram = {
11
- address: "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE";
11
+ address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
12
12
  metadata: {
13
13
  name: "intentsProgram";
14
- version: "0.0.1";
14
+ version: "0.1.0";
15
15
  spec: "0.1.0";
16
16
  description: "deBridge Intents Program";
17
17
  };
@@ -22,6 +22,44 @@ type IntentsProgram = {
22
22
  accounts: [];
23
23
  args: [];
24
24
  },
25
+ {
26
+ name: "addTrustedSender";
27
+ discriminator: [98, 59, 65, 43, 42, 143, 142, 200];
28
+ accounts: [
29
+ {
30
+ name: "protocolAuthority";
31
+ writable: true;
32
+ signer: true;
33
+ relations: ["state"];
34
+ },
35
+ {
36
+ name: "state";
37
+ writable: true;
38
+ pda: {
39
+ seeds: [
40
+ {
41
+ kind: "const";
42
+ value: [115, 116, 97, 116, 101];
43
+ }
44
+ ];
45
+ };
46
+ },
47
+ {
48
+ name: "trustedSender";
49
+ },
50
+ {
51
+ name: "payer";
52
+ writable: true;
53
+ signer: true;
54
+ optional: true;
55
+ },
56
+ {
57
+ name: "systemProgram";
58
+ address: "11111111111111111111111111111111";
59
+ }
60
+ ];
61
+ args: [];
62
+ },
25
63
  {
26
64
  name: "approveProtocolTransfers";
27
65
  discriminator: [17, 3, 184, 144, 112, 130, 116, 98];
@@ -68,26 +106,38 @@ type IntentsProgram = {
68
106
  },
69
107
  {
70
108
  name: "state";
71
- }
72
- ];
73
- args: [];
74
- },
75
- {
76
- name: "closeAccount";
77
- discriminator: [125, 255, 149, 14, 110, 34, 72, 24];
78
- accounts: [
79
- {
80
- name: "programAuthority";
81
- signer: true;
82
- address: "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE";
83
109
  },
84
110
  {
85
- name: "target";
86
- writable: true;
111
+ name: "eventAuthority";
112
+ pda: {
113
+ seeds: [
114
+ {
115
+ kind: "const";
116
+ value: [
117
+ 95,
118
+ 95,
119
+ 101,
120
+ 118,
121
+ 101,
122
+ 110,
123
+ 116,
124
+ 95,
125
+ 97,
126
+ 117,
127
+ 116,
128
+ 104,
129
+ 111,
130
+ 114,
131
+ 105,
132
+ 116,
133
+ 121
134
+ ];
135
+ }
136
+ ];
137
+ };
87
138
  },
88
139
  {
89
- name: "rentReceiver";
90
- writable: true;
140
+ name: "program";
91
141
  }
92
142
  ];
93
143
  args: [];
@@ -328,7 +378,7 @@ type IntentsProgram = {
328
378
  },
329
379
  {
330
380
  name: "dlnSrc";
331
- address: "srch38nzfcgwJnfKE6xWD8vfNJtudazwisdcociAuQt";
381
+ address: "src5qyZHqTqecJV4aY6Cb6zDZLMDzrDKKezs22MPHr4";
332
382
  },
333
383
  {
334
384
  name: "dlnSrcState";
@@ -1032,7 +1082,7 @@ type IntentsProgram = {
1032
1082
  {
1033
1083
  name: "programAuthority";
1034
1084
  signer: true;
1035
- address: "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE";
1085
+ address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
1036
1086
  },
1037
1087
  {
1038
1088
  name: "rentPayer";
@@ -1101,6 +1151,70 @@ type IntentsProgram = {
1101
1151
  }
1102
1152
  ];
1103
1153
  },
1154
+ {
1155
+ name: "removeTrustedSender";
1156
+ discriminator: [95, 255, 228, 80, 113, 240, 173, 55];
1157
+ accounts: [
1158
+ {
1159
+ name: "inner";
1160
+ accounts: [
1161
+ {
1162
+ name: "protocolAuthority";
1163
+ signer: true;
1164
+ relations: ["state"];
1165
+ },
1166
+ {
1167
+ name: "state";
1168
+ writable: true;
1169
+ pda: {
1170
+ seeds: [
1171
+ {
1172
+ kind: "const";
1173
+ value: [115, 116, 97, 116, 101];
1174
+ }
1175
+ ];
1176
+ };
1177
+ }
1178
+ ];
1179
+ },
1180
+ {
1181
+ name: "trustedSender";
1182
+ }
1183
+ ];
1184
+ args: [];
1185
+ },
1186
+ {
1187
+ name: "setCancelAuthority";
1188
+ discriminator: [21, 43, 104, 169, 110, 210, 47, 107];
1189
+ accounts: [
1190
+ {
1191
+ name: "inner";
1192
+ accounts: [
1193
+ {
1194
+ name: "protocolAuthority";
1195
+ signer: true;
1196
+ relations: ["state"];
1197
+ },
1198
+ {
1199
+ name: "state";
1200
+ writable: true;
1201
+ pda: {
1202
+ seeds: [
1203
+ {
1204
+ kind: "const";
1205
+ value: [115, 116, 97, 116, 101];
1206
+ }
1207
+ ];
1208
+ };
1209
+ }
1210
+ ];
1211
+ },
1212
+ {
1213
+ name: "cancelAuthority";
1214
+ }
1215
+ ];
1216
+ args: [];
1217
+ },
1104
1218
  {
1105
1219
  name: "setCancelUntilTimestamp";
1106
1220
  discriminator: [206, 248, 194, 176, 4, 206, 30, 228];
@@ -1135,6 +1249,72 @@ type IntentsProgram = {
1135
1249
  }
1136
1250
  ];
1137
1251
  },
1252
+ {
1253
+ name: "setCustomFee";
1254
+ discriminator: [58, 163, 242, 150, 43, 177, 147, 43];
1255
+ accounts: [
1256
+ {
1257
+ name: "rentPayer";
1258
+ writable: true;
1259
+ signer: true;
1260
+ },
1261
+ {
1262
+ name: "state";
1263
+ pda: {
1264
+ seeds: [
1265
+ {
1266
+ kind: "const";
1267
+ value: [115, 116, 97, 116, 101];
1268
+ }
1269
+ ];
1270
+ };
1271
+ },
1272
+ {
1273
+ name: "protocolAuthority";
1274
+ signer: true;
1275
+ relations: ["state"];
1276
+ },
1277
+ {
1278
+ name: "feeConfig";
1279
+ writable: true;
1280
+ pda: {
1281
+ seeds: [
1282
+ {
1283
+ kind: "const";
1284
+ value: [102, 101, 101, 95, 99, 111, 110, 102, 105, 103];
1285
+ },
1286
+ {
1287
+ kind: "arg";
1288
+ path: "chainId";
1289
+ }
1290
+ ];
1291
+ };
1292
+ },
1293
+ {
1294
+ name: "inputMint";
1295
+ },
1296
+ {
1297
+ name: "systemProgram";
1298
+ address: "11111111111111111111111111111111";
1299
+ }
1300
+ ];
1301
+ args: [
1302
+ {
1303
+ name: "chainId";
1304
+ type: "u32";
1305
+ },
1306
+ {
1307
+ name: "customFees";
1308
+ type: {
1309
+ vec: {
1310
+ defined: {
1311
+ name: "customFee";
1312
+ };
1313
+ };
1314
+ };
1315
+ }
1316
+ ];
1317
+ },
1138
1318
  {
1139
1319
  name: "setDefaultFee";
1140
1320
  discriminator: [150, 137, 197, 111, 176, 227, 201, 110];
@@ -1452,7 +1632,6 @@ type IntentsProgram = {
1452
1632
  },
1453
1633
  {
1454
1634
  name: "newProtocolAuthority";
1455
- signer: true;
1456
1635
  }
1457
1636
  ];
1458
1637
  args: [];
@@ -2197,6 +2376,10 @@ type IntentsProgram = {
2197
2376
  }
2198
2377
  ];
2199
2378
  events: [
2379
+ {
2380
+ name: "canceledIntent";
2381
+ discriminator: [129, 42, 89, 207, 195, 173, 63, 214];
2382
+ },
2200
2383
  {
2201
2384
  name: "closedIntent";
2202
2385
  discriminator: [197, 62, 20, 42, 191, 176, 242, 94];
@@ -2231,6 +2414,10 @@ type IntentsProgram = {
2231
2414
  code: 6160;
2232
2415
  name: "invalidArgument";
2233
2416
  },
2417
+ {
2418
+ code: 6161;
2419
+ name: "invalidTokenAccount";
2420
+ },
2234
2421
  {
2235
2422
  code: 6170;
2236
2423
  name: "invalidAmount";
@@ -2291,6 +2478,14 @@ type IntentsProgram = {
2291
2478
  code: 6098;
2292
2479
  name: "intentInconsitentDstAuthorities";
2293
2480
  },
2481
+ {
2482
+ code: 6112;
2483
+ name: "swapRecordStorageFull";
2484
+ },
2485
+ {
2486
+ code: 6113;
2487
+ name: "swapRecordCorrupted";
2488
+ },
2294
2489
  {
2295
2490
  code: 6275;
2296
2491
  name: "intentStorageAlreadyInitialized";
@@ -2387,6 +2582,10 @@ type IntentsProgram = {
2387
2582
  code: 9794;
2388
2583
  name: "invalidDlnDstReceiver";
2389
2584
  },
2585
+ {
2586
+ code: 9795;
2587
+ name: "invalidDlnOrderTakeTokenAddress";
2588
+ },
2390
2589
  {
2391
2590
  code: 9802;
2392
2591
  name: "invalidDlnDstOrderAuthority";
@@ -2463,6 +2662,18 @@ type IntentsProgram = {
2463
2662
  code: 9551;
2464
2663
  name: "delegateRevoked";
2465
2664
  },
2665
+ {
2666
+ code: 67696;
2667
+ name: "invalidFeeConfig";
2668
+ },
2669
+ {
2670
+ code: 67700;
2671
+ name: "inputTokenNotFound";
2672
+ },
2673
+ {
2674
+ code: 67701;
2675
+ name: "outputTokenNotFound";
2676
+ },
2466
2677
  {
2467
2678
  code: 16767137;
2468
2679
  name: "crossProgramInvokeRestricted";
@@ -2502,6 +2713,22 @@ type IntentsProgram = {
2502
2713
  ];
2503
2714
  };
2504
2715
  },
2716
+ {
2717
+ name: "canceledIntent";
2718
+ type: {
2719
+ kind: "struct";
2720
+ fields: [
2721
+ {
2722
+ name: "intentId";
2723
+ type: {
2724
+ defined: {
2725
+ name: "intentId";
2726
+ };
2727
+ };
2728
+ }
2729
+ ];
2730
+ };
2731
+ },
2505
2732
  {
2506
2733
  name: "closedIntent";
2507
2734
  type: {
@@ -2653,6 +2880,24 @@ type IntentsProgram = {
2653
2880
  ];
2654
2881
  };
2655
2882
  },
2883
+ {
2884
+ name: "customFee";
2885
+ type: {
2886
+ kind: "struct";
2887
+ fields: [
2888
+ {
2889
+ name: "takeTokenAddress";
2890
+ type: "bytes";
2891
+ },
2892
+ {
2893
+ name: "feeBps";
2894
+ type: {
2895
+ option: "u16";
2896
+ };
2897
+ }
2898
+ ];
2899
+ };
2900
+ },
2656
2901
  {
2657
2902
  name: "dataOrigin";
2658
2903
  type: {
@@ -2919,7 +3164,13 @@ type IntentsProgram = {
2919
3164
  {
2920
3165
  name: "arbitraryData";
2921
3166
  type: {
2922
- array: ["u8", 100];
3167
+ array: ["u8", 10];
3168
+ };
3169
+ },
3170
+ {
3171
+ name: "swapData";
3172
+ type: {
3173
+ array: ["u8", 90];
2923
3174
  };
2924
3175
  },
2925
3176
  {
@@ -3032,6 +3283,10 @@ type IntentsProgram = {
3032
3283
  };
3033
3284
  };
3034
3285
  },
3286
+ {
3287
+ name: "intentOwner";
3288
+ type: "pubkey";
3289
+ },
3035
3290
  {
3036
3291
  name: "encodedIntent";
3037
3292
  type: "bytes";
@@ -3110,6 +3365,22 @@ type IntentsProgram = {
3110
3365
  {
3111
3366
  name: "bump";
3112
3367
  type: "u8";
3368
+ },
3369
+ {
3370
+ name: "cancelAuthority";
3371
+ type: "pubkey";
3372
+ },
3373
+ {
3374
+ name: "reserved";
3375
+ type: {
3376
+ array: ["u8", 160];
3377
+ };
3378
+ },
3379
+ {
3380
+ name: "trustedSenders";
3381
+ type: {
3382
+ vec: "pubkey";
3383
+ };
3113
3384
  }
3114
3385
  ];
3115
3386
  };
@@ -3247,10 +3518,15 @@ type IntentsProgram = {
3247
3518
  type: "u32";
3248
3519
  value: "8";
3249
3520
  },
3521
+ {
3522
+ name: "feeConfigSeed";
3523
+ type: "bytes";
3524
+ value: "[102, 101, 101, 95, 99, 111, 110, 102, 105, 103]";
3525
+ },
3250
3526
  {
3251
3527
  name: "intentsProgramSigPrefix";
3252
3528
  type: "bytes";
3253
- value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109, 95, 104, 97, 110, 111, 105]";
3529
+ value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109]";
3254
3530
  },
3255
3531
  {
3256
3532
  name: "intentIdHashPrefix";
@@ -3285,6 +3561,11 @@ type IntentsProgram = {
3285
3561
  type: "bytes";
3286
3562
  value: "[115, 116, 97, 116, 101]";
3287
3563
  },
3564
+ {
3565
+ name: "trustedSenderPlaceholder";
3566
+ type: "pubkey";
3567
+ value: "UseDeBridgeTrustedSender1111111111111111111";
3568
+ },
3288
3569
  {
3289
3570
  name: "unwrapNativePseudoMint";
3290
3571
  type: "pubkey";
@@ -3358,8 +3639,11 @@ interface IntentType {
3358
3639
  externalCallHash?: Buffer | Any;
3359
3640
  dlnMetadata?: Buffer | Any;
3360
3641
  }
3361
- type State = Omit<IdlAccounts<IntentsProgram>["state"], "lastValidTimestamp"> & {
3642
+ type State = Omit<IdlAccounts<IntentsProgram>["state"], "cancelUntilTimestamp" | "cancelAuthority" | "reserved"> & {
3643
+ cancelUntilTimestamp: number;
3362
3644
  lastValidTimestamp: number;
3645
+ cancelAuthority?: IdlAccounts<IntentsProgram>["state"]["cancelAuthority"];
3646
+ reserved?: IdlAccounts<IntentsProgram>["state"]["reserved"];
3363
3647
  };
3364
3648
  type IntentStorage = IdlAccounts<IntentsProgram>["intentStorage"] & {
3365
3649
  intentId: Buffer;
@@ -3367,10 +3651,24 @@ type IntentStorage = IdlAccounts<IntentsProgram>["intentStorage"] & {
3367
3651
  interface Serializable {
3368
3652
  serialize(): Buffer;
3369
3653
  }
3654
+ type TokenApproval = {
3655
+ amounts: BN[];
3656
+ accounts: {
3657
+ pubkey: PublicKey;
3658
+ isSigner: boolean;
3659
+ isWritable: boolean;
3660
+ }[];
3661
+ };
3370
3662
  type ComputeBudget = {
3371
3663
  limit?: number;
3372
3664
  price?: number;
3373
3665
  };
3666
+ type GetTransactionParams = {
3667
+ instructions: TransactionInstruction[];
3668
+ payer: PublicKey;
3669
+ blockhash: Blockhash;
3670
+ ALTs?: Array<AddressLookupTableAccount>;
3671
+ };
3374
3672
  interface ApproveProtocolTransfersParams {
3375
3673
  maker: PublicKey;
3376
3674
  tokens: {
@@ -3568,6 +3866,7 @@ interface ExecuteIntentSameChainParams {
3568
3866
  amount: bigint;
3569
3867
  tokenProgram?: PublicKey;
3570
3868
  unwrapTakeToken?: boolean;
3869
+ chainId?: number;
3571
3870
  }
3572
3871
  interface SwapParams extends SwapBeginParams, SwapEndParams {
3573
3872
  payer?: PublicKey;
@@ -3587,6 +3886,28 @@ interface WithdrawIntentTokenAccountParams extends WithdrawClosedIntentTokenAcco
3587
3886
  receiver?: PublicKey;
3588
3887
  encodedIntentHash: Buffer;
3589
3888
  }
3889
+ interface SetCustomFeeParams {
3890
+ protocolAuthority: PublicKey;
3891
+ rentPayer: PublicKey;
3892
+ inputMint: PublicKey;
3893
+ chainId: number;
3894
+ customFees: {
3895
+ takeTokenAddress: Buffer;
3896
+ feeBps: number | null;
3897
+ }[];
3898
+ }
3899
+ type FeeConfigEntry = {
3900
+ inputTokenIndex: number;
3901
+ takeTokenIndex: number;
3902
+ feeBps: number;
3903
+ };
3904
+ type FeeConfigData = {
3905
+ chainId: number;
3906
+ version: number;
3907
+ inputTokens: PublicKey[];
3908
+ takeTokens: Buffer[];
3909
+ feeValues: FeeConfigEntry[];
3910
+ };
3590
3911
 
3591
3912
  declare function getTokenProgramId(conn: Connection, mint: PublicKey): Promise<PublicKey>;
3592
3913
  declare enum IntentProgramSigPrefix {
@@ -3595,6 +3916,18 @@ declare enum IntentProgramSigPrefix {
3595
3916
  hanoi = "intents_program_hanoi",
3596
3917
  devnet = "intents_program_devnet"
3597
3918
  }
3919
+ declare enum IntentProgramId {
3920
+ prod = "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz",
3921
+ dubai = "intueneJjzHttKp83gWH3GX1h1Uwuixuusj4T8vGDzk",
3922
+ hanoi = "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE",
3923
+ devnet = "int1BXvjNz92Fu9dsRitghGc9Gu7ktQYSJTCcpbiVN1"
3924
+ }
3925
+ declare const INTENT_PROGRAM_ID_TO_SIG_PREFIX: {
3926
+ DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz: IntentProgramSigPrefix.prod;
3927
+ intueneJjzHttKp83gWH3GX1h1Uwuixuusj4T8vGDzk: IntentProgramSigPrefix.dubai;
3928
+ intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE: IntentProgramSigPrefix.hanoi;
3929
+ int1BXvjNz92Fu9dsRitghGc9Gu7ktQYSJTCcpbiVN1: IntentProgramSigPrefix.devnet;
3930
+ };
3598
3931
  declare const DEFAULT_RECORD_OFFSET = 33;
3599
3932
  declare class IntentsClient {
3600
3933
  readonly programId: PublicKey;
@@ -3617,11 +3950,12 @@ declare class IntentsClient {
3617
3950
  private cancelIntentIxs;
3618
3951
  private closeIntentIxs;
3619
3952
  executeIntentIxs({ tradeId, intentId, taker, maker, tokenMint, dlnOrder, dlnMetadata, dlnSrc, tokenProgram, }: ExecuteIntentParams): Promise<TransactionInstruction[]>;
3620
- executeSameChainIntentIxs({ tradeId, intentId, taker, maker, tokenMint, receiver, amount, tokenProgram, unwrapTakeToken, }: ExecuteIntentSameChainParams): Promise<TransactionInstruction[]>;
3953
+ executeSameChainIntentIxs({ tradeId, intentId, taker, maker, tokenMint, receiver, amount, tokenProgram, chainId, unwrapTakeToken, }: ExecuteIntentSameChainParams): Promise<TransactionInstruction[]>;
3621
3954
  initIntentIxs(maker: PublicKey, payer: PublicKey, delegate: (PublicKey | null) | undefined, id: Buffer, encodedIntentHash: Buffer, encodedIntentLength: number, inputTokensAmount: number): Promise<TransactionInstruction[]>;
3622
3955
  initIntentUsingSigIxs(maker: PublicKey, payer: PublicKey, delegate: (PublicKey | null) | undefined, id: Buffer, encodedIntentHash: Buffer, encodedIntentLength: number, inputTokensAmount: number, signature: Buffer): Promise<TransactionInstruction[]>;
3623
3956
  setDelegateApprovedBudgetsIxs({ maker, payer, delegate, nonce, tokens, signature, }: DelegateApprovedBudgetsParams): Promise<TransactionInstruction[]>;
3624
3957
  setMakerCancelUntilTimestampIxs({ maker, payer, timestamp, }: SetMakerCancelUntilTimestampParams): Promise<TransactionInstruction[]>;
3958
+ setCustomFeeIxs({ protocolAuthority, rentPayer, inputMint, chainId, customFees, }: SetCustomFeeParams): Promise<TransactionInstruction[]>;
3625
3959
  swapBeginIxs({ taker, maker, intentId, tradeId, beginAmount, // 0 for tests // transfer from random wallet to taker output amount, input / output = intent price
3626
3960
  target, inputMint, outputMint, inputTokenProgram, outputTokenProgram, }: SwapBeginParams): Promise<TransactionInstruction[]>;
3627
3961
  swapEndIxs({ taker, intentId, endAmount, bps, inputMint, outputMint, outputTokenProgram, }: SwapEndParams): Promise<TransactionInstruction[]>;
@@ -3654,6 +3988,7 @@ declare class IntentsClient {
3654
3988
  static getBufferForIntentSignature(intentId: Buffer, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
3655
3989
  static getDelegateApprovedBudgetsArgs(tokens: DelegateApprovedBudgetsArgs): any;
3656
3990
  static getBufferForBudgetSignature(delegate: PublicKey, nonce: bigint, tokens: DelegateApprovedBudgetsArgs, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
3991
+ private static decodeLegacyState;
3657
3992
  }
3658
3993
 
3659
3994
  declare class Intent implements Serializable {
@@ -3682,4 +4017,16 @@ declare class Intent implements Serializable {
3682
4017
  static deserialize(buffer: Buffer, owner: PublicKey): Intent | null;
3683
4018
  }
3684
4019
 
3685
- export { DEFAULT_RECORD_OFFSET, IDL, Intent, IntentProgramSigPrefix, IntentsClient, getTokenProgramId };
4020
+ declare class FeeConfig {
4021
+ readonly data: FeeConfigData;
4022
+ readonly pda: PublicKey;
4023
+ constructor(data: FeeConfigData, pda: PublicKey);
4024
+ static getPda(programId: PublicKey, chainId: number): PublicKey;
4025
+ static getTakeTokenSize(chainId: number): number;
4026
+ static parse(data: Buffer): FeeConfigData;
4027
+ static fetch(connection: Connection, programId: PublicKey, chainId: number): Promise<FeeConfig>;
4028
+ getFeeBps(inputToken: Buffer, takeToken: Buffer): number | null;
4029
+ static applyFee(amount: bigint, feeBps: number): bigint;
4030
+ }
4031
+
4032
+ export { type AddressType, type Any, type AnyOr, type ApproveProtocolTransfersParams, type CancelIntentParams, type CloseIntentParams, type CloseRecordParams, type ComputeBudget, type CreateAndUpdateIntentParams, DEFAULT_RECORD_OFFSET, type DelegateApprovedBudgetsArgs, type DelegateApprovedBudgetsParams, type ExecuteIntentParams, type ExecuteIntentSameChainParams, type ExternalCallParams, FeeConfig, type FeeConfigData, type FeeConfigEntry, type GetTransactionParams, type GiveToken, IDL, INTENT_PROGRAM_ID_TO_SIG_PREFIX, type InitIntentParams, type InputToken, Intent, IntentProgramId, IntentProgramSigPrefix, type IntentStorage, type IntentType, IntentsClient, type ReceiverInfo, type Serializable, type SetCustomFeeParams, type SetMakerCancelUntilTimestampParams, SignatureType, type State, type SwapBeginParams, type SwapEndParams, type SwapParams, type TakeToken, type TokenApproval, type UpdateIntentParams, type UpdateRecordParams, type UpdateRecordTxsParams, type WithdrawClosedIntentTokenAccountParams, type WithdrawIntentTokenAccountParams, type WriteIntentParams, type WriteRecordParams, getTokenProgramId };