@allbridge/bridge-core-sdk 3.29.2-alpha.2 → 3.30.0-alpha.2

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 (46) hide show
  1. package/dist/browser/index.js +2 -2
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/index.js.map +4 -4
  5. package/dist/esm/index.js +2 -2
  6. package/dist/esm/index.js.map +4 -4
  7. package/dist/src/client/core-api/core-api-mapper.js +2 -0
  8. package/dist/src/client/core-api/core-api-mapper.js.map +1 -1
  9. package/dist/src/client/core-api/core-api.model.d.ts +13 -2
  10. package/dist/src/client/core-api/core-api.model.js +2 -0
  11. package/dist/src/client/core-api/core-api.model.js.map +1 -1
  12. package/dist/src/index.js +4 -0
  13. package/dist/src/index.js.map +1 -1
  14. package/dist/src/services/bridge/evm/index.d.ts +2 -0
  15. package/dist/src/services/bridge/evm/index.js +32 -0
  16. package/dist/src/services/bridge/evm/index.js.map +1 -1
  17. package/dist/src/services/bridge/index.js +7 -0
  18. package/dist/src/services/bridge/index.js.map +1 -1
  19. package/dist/src/services/bridge/sol/bridge-tx-service.js +2 -0
  20. package/dist/src/services/bridge/sol/bridge-tx-service.js.map +1 -1
  21. package/dist/src/services/bridge/sol/payer-with-token-service.js +2 -0
  22. package/dist/src/services/bridge/sol/payer-with-token-service.js.map +1 -1
  23. package/dist/src/services/bridge/stx/index.js +24 -16
  24. package/dist/src/services/bridge/stx/index.js.map +1 -1
  25. package/dist/src/services/bridge/sui/index.js +2 -0
  26. package/dist/src/services/bridge/sui/index.js.map +1 -1
  27. package/dist/src/services/bridge/trx/index.js +2 -0
  28. package/dist/src/services/bridge/trx/index.js.map +1 -1
  29. package/dist/src/services/bridge/utils.d.ts +1 -0
  30. package/dist/src/services/bridge/utils.js +35 -8
  31. package/dist/src/services/bridge/utils.js.map +1 -1
  32. package/dist/src/services/index.d.ts +3 -0
  33. package/dist/src/services/index.js +42 -0
  34. package/dist/src/services/index.js.map +1 -1
  35. package/dist/src/services/models/abi/XReserveBridge.d.ts +246 -0
  36. package/dist/src/services/models/abi/XReserveBridge.js +318 -0
  37. package/dist/src/services/models/abi/XReserveBridge.js.map +1 -0
  38. package/dist/src/services/models/stx/clarigen-types.d.ts +72 -0
  39. package/dist/src/services/models/stx/clarigen-types.js +226 -0
  40. package/dist/src/services/models/stx/clarigen-types.js.map +1 -1
  41. package/dist/src/tokens-info/tokens-info.model.d.ts +11 -0
  42. package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
  43. package/dist/src/version.d.ts +1 -1
  44. package/dist/src/version.js +1 -1
  45. package/dist/src/version.js.map +1 -1
  46. package/package.json +1 -1
@@ -0,0 +1,318 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const artifact = {
4
+ abi: [
5
+ {
6
+ inputs: [
7
+ {
8
+ internalType: "uint256",
9
+ name: "chainId_",
10
+ type: "uint256",
11
+ },
12
+ {
13
+ internalType: "address",
14
+ name: "tokenAddress",
15
+ type: "address",
16
+ },
17
+ {
18
+ internalType: "address",
19
+ name: "xReserve_",
20
+ type: "address",
21
+ },
22
+ ],
23
+ stateMutability: "nonpayable",
24
+ type: "constructor",
25
+ },
26
+ {
27
+ anonymous: false,
28
+ inputs: [
29
+ {
30
+ indexed: true,
31
+ internalType: "address",
32
+ name: "previousOwner",
33
+ type: "address",
34
+ },
35
+ {
36
+ indexed: true,
37
+ internalType: "address",
38
+ name: "newOwner",
39
+ type: "address",
40
+ },
41
+ ],
42
+ name: "OwnershipTransferred",
43
+ type: "event",
44
+ },
45
+ {
46
+ anonymous: false,
47
+ inputs: [
48
+ {
49
+ indexed: false,
50
+ internalType: "address",
51
+ name: "sender",
52
+ type: "address",
53
+ },
54
+ {
55
+ indexed: false,
56
+ internalType: "bytes32",
57
+ name: "recipient",
58
+ type: "bytes32",
59
+ },
60
+ {
61
+ indexed: false,
62
+ internalType: "uint256",
63
+ name: "amount",
64
+ type: "uint256",
65
+ },
66
+ {
67
+ indexed: false,
68
+ internalType: "uint256",
69
+ name: "destinationChainId",
70
+ type: "uint256",
71
+ },
72
+ {
73
+ indexed: false,
74
+ internalType: "uint256",
75
+ name: "adminFeeTokenAmount",
76
+ type: "uint256",
77
+ },
78
+ {
79
+ indexed: false,
80
+ internalType: "uint256",
81
+ name: "maxFee",
82
+ type: "uint256",
83
+ },
84
+ ],
85
+ name: "TokensSent",
86
+ type: "event",
87
+ },
88
+ {
89
+ anonymous: false,
90
+ inputs: [
91
+ {
92
+ indexed: false,
93
+ internalType: "bytes32",
94
+ name: "recipientWalletAddress",
95
+ type: "bytes32",
96
+ },
97
+ ],
98
+ name: "TokensSentExtras",
99
+ type: "event",
100
+ },
101
+ {
102
+ stateMutability: "payable",
103
+ type: "fallback",
104
+ },
105
+ {
106
+ inputs: [],
107
+ name: "adminFeeShareBP",
108
+ outputs: [
109
+ {
110
+ internalType: "uint256",
111
+ name: "",
112
+ type: "uint256",
113
+ },
114
+ ],
115
+ stateMutability: "view",
116
+ type: "function",
117
+ },
118
+ {
119
+ inputs: [
120
+ {
121
+ internalType: "uint256",
122
+ name: "amount",
123
+ type: "uint256",
124
+ },
125
+ {
126
+ internalType: "bytes32",
127
+ name: "recipient",
128
+ type: "bytes32",
129
+ },
130
+ {
131
+ internalType: "uint256",
132
+ name: "destinationChainId",
133
+ type: "uint256",
134
+ },
135
+ ],
136
+ name: "bridge",
137
+ outputs: [],
138
+ stateMutability: "nonpayable",
139
+ type: "function",
140
+ },
141
+ {
142
+ inputs: [
143
+ {
144
+ internalType: "uint256",
145
+ name: "amount",
146
+ type: "uint256",
147
+ },
148
+ {
149
+ internalType: "bytes32",
150
+ name: "recipient",
151
+ type: "bytes32",
152
+ },
153
+ {
154
+ internalType: "bytes32",
155
+ name: "recipientWalletAddress",
156
+ type: "bytes32",
157
+ },
158
+ {
159
+ internalType: "uint256",
160
+ name: "destinationChainId",
161
+ type: "uint256",
162
+ },
163
+ ],
164
+ name: "bridgeWithWalletAddress",
165
+ outputs: [],
166
+ stateMutability: "nonpayable",
167
+ type: "function",
168
+ },
169
+ {
170
+ inputs: [],
171
+ name: "chainId",
172
+ outputs: [
173
+ {
174
+ internalType: "uint256",
175
+ name: "",
176
+ type: "uint256",
177
+ },
178
+ ],
179
+ stateMutability: "view",
180
+ type: "function",
181
+ },
182
+ {
183
+ inputs: [
184
+ {
185
+ internalType: "uint256",
186
+ name: "chainId_",
187
+ type: "uint256",
188
+ },
189
+ ],
190
+ name: "getDomainByChainId",
191
+ outputs: [
192
+ {
193
+ internalType: "uint32",
194
+ name: "",
195
+ type: "uint32",
196
+ },
197
+ ],
198
+ stateMutability: "view",
199
+ type: "function",
200
+ },
201
+ {
202
+ inputs: [],
203
+ name: "maxFeeShare",
204
+ outputs: [
205
+ {
206
+ internalType: "uint256",
207
+ name: "",
208
+ type: "uint256",
209
+ },
210
+ ],
211
+ stateMutability: "view",
212
+ type: "function",
213
+ },
214
+ {
215
+ inputs: [],
216
+ name: "owner",
217
+ outputs: [
218
+ {
219
+ internalType: "address",
220
+ name: "",
221
+ type: "address",
222
+ },
223
+ ],
224
+ stateMutability: "view",
225
+ type: "function",
226
+ },
227
+ {
228
+ inputs: [
229
+ {
230
+ internalType: "uint256",
231
+ name: "chainId_",
232
+ type: "uint256",
233
+ },
234
+ {
235
+ internalType: "uint32",
236
+ name: "domain",
237
+ type: "uint32",
238
+ },
239
+ ],
240
+ name: "registerBridgeDestination",
241
+ outputs: [],
242
+ stateMutability: "nonpayable",
243
+ type: "function",
244
+ },
245
+ {
246
+ inputs: [],
247
+ name: "renounceOwnership",
248
+ outputs: [],
249
+ stateMutability: "nonpayable",
250
+ type: "function",
251
+ },
252
+ {
253
+ inputs: [
254
+ {
255
+ internalType: "uint256",
256
+ name: "adminFeeShareBP_",
257
+ type: "uint256",
258
+ },
259
+ ],
260
+ name: "setAdminFeeShare",
261
+ outputs: [],
262
+ stateMutability: "nonpayable",
263
+ type: "function",
264
+ },
265
+ {
266
+ inputs: [
267
+ {
268
+ internalType: "uint256",
269
+ name: "maxFeeShare_",
270
+ type: "uint256",
271
+ },
272
+ ],
273
+ name: "setMaxFeeShare",
274
+ outputs: [],
275
+ stateMutability: "nonpayable",
276
+ type: "function",
277
+ },
278
+ {
279
+ inputs: [
280
+ {
281
+ internalType: "address",
282
+ name: "newOwner",
283
+ type: "address",
284
+ },
285
+ ],
286
+ name: "transferOwnership",
287
+ outputs: [],
288
+ stateMutability: "nonpayable",
289
+ type: "function",
290
+ },
291
+ {
292
+ inputs: [
293
+ {
294
+ internalType: "uint256",
295
+ name: "chainId_",
296
+ type: "uint256",
297
+ },
298
+ ],
299
+ name: "unregisterBridgeDestination",
300
+ outputs: [],
301
+ stateMutability: "nonpayable",
302
+ type: "function",
303
+ },
304
+ {
305
+ inputs: [],
306
+ name: "withdrawFeeInTokens",
307
+ outputs: [],
308
+ stateMutability: "nonpayable",
309
+ type: "function",
310
+ },
311
+ {
312
+ stateMutability: "payable",
313
+ type: "receive",
314
+ },
315
+ ],
316
+ };
317
+ exports.default = artifact;
318
+ //# sourceMappingURL=XReserveBridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XReserveBridge.js","sourceRoot":"","sources":["../../../../../src/services/models/abi/XReserveBridge.ts"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG;IACf,GAAG,EAAE;QACH;YACE,MAAM,EAAE;gBACN;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,cAAc;oBACpB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,YAAY,EAAE,SAAS;oBACvB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,eAAe,EAAE,YAAY;YAC7B,IAAI,EAAE,aAAa;SACpB;QACD;YACE,SAAS,EAAE,KAAK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BAAe,QAAQ,CAAC","sourcesContent":["const artifact = {\n abi: [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"tokenAddress\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"xReserve_\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"OwnershipTransferred\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"recipient\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"destinationChainId\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"adminFeeTokenAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"maxFee\",\n type: \"uint256\",\n },\n ],\n name: \"TokensSent\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"recipientWalletAddress\",\n type: \"bytes32\",\n },\n ],\n name: \"TokensSentExtras\",\n type: \"event\",\n },\n {\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n inputs: [],\n name: \"adminFeeShareBP\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"recipient\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"destinationChainId\",\n type: \"uint256\",\n },\n ],\n name: \"bridge\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"recipient\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"recipientWalletAddress\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"destinationChainId\",\n type: \"uint256\",\n },\n ],\n name: \"bridgeWithWalletAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"chainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n ],\n name: \"getDomainByChainId\",\n outputs: [\n {\n internalType: \"uint32\",\n name: \"\",\n type: \"uint32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"maxFeeShare\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint32\",\n name: \"domain\",\n type: \"uint32\",\n },\n ],\n name: \"registerBridgeDestination\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"adminFeeShareBP_\",\n type: \"uint256\",\n },\n ],\n name: \"setAdminFeeShare\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"maxFeeShare_\",\n type: \"uint256\",\n },\n ],\n name: \"setMaxFeeShare\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n ],\n name: \"unregisterBridgeDestination\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"withdrawFeeInTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n ],\n} as const;\nexport default artifact;\n"]}
@@ -654,4 +654,76 @@ export declare const stacksContracts: {
654
654
  readonly clarity_version: "Clarity3";
655
655
  readonly contractName: "utils";
656
656
  };
657
+ readonly xReserveBridge: {
658
+ readonly functions: {
659
+ readonly assertBurn: TypedAbiFunction<[burnRef: TypedAbiArg<string, "burnRef">], Response<boolean, bigint>>;
660
+ readonly assertToken: TypedAbiFunction<[tokenRef: TypedAbiArg<string, "tokenRef">], Response<boolean, bigint>>;
661
+ readonly onlyOwner: TypedAbiFunction<[], Response<boolean, bigint>>;
662
+ readonly bridge: TypedAbiFunction<[tokenRef: TypedAbiArg<string, "tokenRef">, burnRef: TypedAbiArg<string, "burnRef">, amount: TypedAbiArg<number | bigint, "amount">, recipient: TypedAbiArg<Uint8Array, "recipient">, destinationChainId: TypedAbiArg<number | bigint, "destinationChainId">], Response<boolean, bigint>>;
663
+ readonly removeChainDomain: TypedAbiFunction<[chainIdIn: TypedAbiArg<number | bigint, "chainIdIn">], Response<boolean, bigint>>;
664
+ readonly setAdminFee: TypedAbiFunction<[newFeeBp: TypedAbiArg<number | bigint, "newFeeBp">], Response<boolean, bigint>>;
665
+ readonly setBurnPrincipal: TypedAbiFunction<[newBurnPrincipal: TypedAbiArg<string, "newBurnPrincipal">], Response<boolean, bigint>>;
666
+ readonly setChainDomain: TypedAbiFunction<[newChainId: TypedAbiArg<number | bigint, "newChainId">, domain: TypedAbiArg<number | bigint, "domain">], Response<boolean, bigint>>;
667
+ readonly setOwner: TypedAbiFunction<[newOwner: TypedAbiArg<string, "newOwner">], Response<boolean, bigint>>;
668
+ readonly setTokenPrincipal: TypedAbiFunction<[newTokenPrincipal: TypedAbiArg<string, "newTokenPrincipal">], Response<boolean, bigint>>;
669
+ readonly withdrawFees: TypedAbiFunction<[tokenRef: TypedAbiArg<string, "tokenRef">, recipient: TypedAbiArg<string, "recipient">], Response<bigint, bigint>>;
670
+ };
671
+ readonly maps: {
672
+ readonly chainIdToDomain: TypedAbiMap<number | bigint, bigint>;
673
+ };
674
+ readonly variables: {
675
+ readonly BP: TypedAbiVariable<bigint>;
676
+ readonly errInsufficientAmount: TypedAbiVariable<Response<null, bigint>>;
677
+ readonly errInvalidAmount: TypedAbiVariable<Response<null, bigint>>;
678
+ readonly errNotFound: TypedAbiVariable<Response<null, bigint>>;
679
+ readonly errNotInitialized: TypedAbiVariable<Response<null, bigint>>;
680
+ readonly errUnauthorized: TypedAbiVariable<Response<null, bigint>>;
681
+ readonly errWrongBurn: TypedAbiVariable<Response<null, bigint>>;
682
+ readonly errWrongToken: TypedAbiVariable<Response<null, bigint>>;
683
+ readonly adminFeeBp: TypedAbiVariable<bigint>;
684
+ readonly burnPrincipal: TypedAbiVariable<string | null>;
685
+ readonly owner: TypedAbiVariable<string>;
686
+ readonly tokenPrincipal: TypedAbiVariable<string | null>;
687
+ };
688
+ readonly constants: {
689
+ readonly BP: 10000n;
690
+ readonly adminFeeBp: 0n;
691
+ readonly burnPrincipal: null;
692
+ readonly errInsufficientAmount: {
693
+ readonly isOk: false;
694
+ readonly value: 1001n;
695
+ };
696
+ readonly errInvalidAmount: {
697
+ readonly isOk: false;
698
+ readonly value: 1002n;
699
+ };
700
+ readonly errNotFound: {
701
+ readonly isOk: false;
702
+ readonly value: 1003n;
703
+ };
704
+ readonly errNotInitialized: {
705
+ readonly isOk: false;
706
+ readonly value: 1004n;
707
+ };
708
+ readonly errUnauthorized: {
709
+ readonly isOk: false;
710
+ readonly value: 1000n;
711
+ };
712
+ readonly errWrongBurn: {
713
+ readonly isOk: false;
714
+ readonly value: 1006n;
715
+ };
716
+ readonly errWrongToken: {
717
+ readonly isOk: false;
718
+ readonly value: 1005n;
719
+ };
720
+ readonly owner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM";
721
+ readonly tokenPrincipal: null;
722
+ };
723
+ readonly non_fungible_tokens: readonly [];
724
+ readonly fungible_tokens: readonly [];
725
+ readonly epoch: "Epoch31";
726
+ readonly clarity_version: "Clarity3";
727
+ readonly contractName: "x-reserve-bridge";
728
+ };
657
729
  };
@@ -2292,5 +2292,231 @@ exports.stacksContracts = {
2292
2292
  clarity_version: "Clarity3",
2293
2293
  contractName: "utils",
2294
2294
  },
2295
+ xReserveBridge: {
2296
+ functions: {
2297
+ assertBurn: {
2298
+ name: "assert-burn",
2299
+ access: "private",
2300
+ args: [{ name: "burn-ref", type: "trait_reference" }],
2301
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2302
+ },
2303
+ assertToken: {
2304
+ name: "assert-token",
2305
+ access: "private",
2306
+ args: [{ name: "token-ref", type: "trait_reference" }],
2307
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2308
+ },
2309
+ onlyOwner: {
2310
+ name: "only-owner",
2311
+ access: "private",
2312
+ args: [],
2313
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2314
+ },
2315
+ bridge: {
2316
+ name: "bridge",
2317
+ access: "public",
2318
+ args: [
2319
+ { name: "token-ref", type: "trait_reference" },
2320
+ { name: "burn-ref", type: "trait_reference" },
2321
+ { name: "amount", type: "uint128" },
2322
+ { name: "recipient", type: { buffer: { length: 32 } } },
2323
+ { name: "destination-chain-id", type: "uint128" },
2324
+ ],
2325
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2326
+ },
2327
+ removeChainDomain: {
2328
+ name: "remove-chain-domain",
2329
+ access: "public",
2330
+ args: [{ name: "chain-id-in", type: "uint128" }],
2331
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2332
+ },
2333
+ setAdminFee: {
2334
+ name: "set-admin-fee",
2335
+ access: "public",
2336
+ args: [{ name: "new-fee-bp", type: "uint128" }],
2337
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2338
+ },
2339
+ setBurnPrincipal: {
2340
+ name: "set-burn-principal",
2341
+ access: "public",
2342
+ args: [{ name: "new-burn-principal", type: "principal" }],
2343
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2344
+ },
2345
+ setChainDomain: {
2346
+ name: "set-chain-domain",
2347
+ access: "public",
2348
+ args: [
2349
+ { name: "new-chain-id", type: "uint128" },
2350
+ { name: "domain", type: "uint128" },
2351
+ ],
2352
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2353
+ },
2354
+ setOwner: {
2355
+ name: "set-owner",
2356
+ access: "public",
2357
+ args: [{ name: "new-owner", type: "principal" }],
2358
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2359
+ },
2360
+ setTokenPrincipal: {
2361
+ name: "set-token-principal",
2362
+ access: "public",
2363
+ args: [{ name: "new-token-principal", type: "principal" }],
2364
+ outputs: { type: { response: { ok: "bool", error: "uint128" } } },
2365
+ },
2366
+ withdrawFees: {
2367
+ name: "withdraw-fees",
2368
+ access: "public",
2369
+ args: [
2370
+ { name: "token-ref", type: "trait_reference" },
2371
+ { name: "recipient", type: "principal" },
2372
+ ],
2373
+ outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
2374
+ },
2375
+ },
2376
+ maps: {
2377
+ chainIdToDomain: { name: "chain-id-to-domain", key: "uint128", value: "uint128" },
2378
+ },
2379
+ variables: {
2380
+ BP: {
2381
+ name: "BP",
2382
+ type: "uint128",
2383
+ access: "constant",
2384
+ },
2385
+ errInsufficientAmount: {
2386
+ name: "err-insufficient-amount",
2387
+ type: {
2388
+ response: {
2389
+ ok: "none",
2390
+ error: "uint128",
2391
+ },
2392
+ },
2393
+ access: "constant",
2394
+ },
2395
+ errInvalidAmount: {
2396
+ name: "err-invalid-amount",
2397
+ type: {
2398
+ response: {
2399
+ ok: "none",
2400
+ error: "uint128",
2401
+ },
2402
+ },
2403
+ access: "constant",
2404
+ },
2405
+ errNotFound: {
2406
+ name: "err-not-found",
2407
+ type: {
2408
+ response: {
2409
+ ok: "none",
2410
+ error: "uint128",
2411
+ },
2412
+ },
2413
+ access: "constant",
2414
+ },
2415
+ errNotInitialized: {
2416
+ name: "err-not-initialized",
2417
+ type: {
2418
+ response: {
2419
+ ok: "none",
2420
+ error: "uint128",
2421
+ },
2422
+ },
2423
+ access: "constant",
2424
+ },
2425
+ errUnauthorized: {
2426
+ name: "err-unauthorized",
2427
+ type: {
2428
+ response: {
2429
+ ok: "none",
2430
+ error: "uint128",
2431
+ },
2432
+ },
2433
+ access: "constant",
2434
+ },
2435
+ errWrongBurn: {
2436
+ name: "err-wrong-burn",
2437
+ type: {
2438
+ response: {
2439
+ ok: "none",
2440
+ error: "uint128",
2441
+ },
2442
+ },
2443
+ access: "constant",
2444
+ },
2445
+ errWrongToken: {
2446
+ name: "err-wrong-token",
2447
+ type: {
2448
+ response: {
2449
+ ok: "none",
2450
+ error: "uint128",
2451
+ },
2452
+ },
2453
+ access: "constant",
2454
+ },
2455
+ adminFeeBp: {
2456
+ name: "admin-fee-bp",
2457
+ type: "uint128",
2458
+ access: "variable",
2459
+ },
2460
+ burnPrincipal: {
2461
+ name: "burn-principal",
2462
+ type: {
2463
+ optional: "principal",
2464
+ },
2465
+ access: "variable",
2466
+ },
2467
+ owner: {
2468
+ name: "owner",
2469
+ type: "principal",
2470
+ access: "variable",
2471
+ },
2472
+ tokenPrincipal: {
2473
+ name: "token-principal",
2474
+ type: {
2475
+ optional: "principal",
2476
+ },
2477
+ access: "variable",
2478
+ },
2479
+ },
2480
+ constants: {
2481
+ BP: 10000n,
2482
+ adminFeeBp: 0n,
2483
+ burnPrincipal: null,
2484
+ errInsufficientAmount: {
2485
+ isOk: false,
2486
+ value: 1001n,
2487
+ },
2488
+ errInvalidAmount: {
2489
+ isOk: false,
2490
+ value: 1002n,
2491
+ },
2492
+ errNotFound: {
2493
+ isOk: false,
2494
+ value: 1003n,
2495
+ },
2496
+ errNotInitialized: {
2497
+ isOk: false,
2498
+ value: 1004n,
2499
+ },
2500
+ errUnauthorized: {
2501
+ isOk: false,
2502
+ value: 1000n,
2503
+ },
2504
+ errWrongBurn: {
2505
+ isOk: false,
2506
+ value: 1006n,
2507
+ },
2508
+ errWrongToken: {
2509
+ isOk: false,
2510
+ value: 1005n,
2511
+ },
2512
+ owner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
2513
+ tokenPrincipal: null,
2514
+ },
2515
+ non_fungible_tokens: [],
2516
+ fungible_tokens: [],
2517
+ epoch: "Epoch31",
2518
+ clarity_version: "Clarity3",
2519
+ contractName: "x-reserve-bridge",
2520
+ },
2295
2521
  };
2296
2522
  //# sourceMappingURL=clarigen-types.js.map