@gibs/bridge-sdk 1.10.1 → 1.13.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.
Files changed (122) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +234 -432
  3. package/dist/abis.d.ts +1 -0
  4. package/dist/abis.js +3 -0
  5. package/dist/bridge-limits.d.ts +103 -0
  6. package/dist/bridge-limits.js +84 -0
  7. package/dist/{src/chain-info.d.ts → chain-info.d.ts} +66 -27
  8. package/dist/{src/chain-info.js → chain-info.js} +106 -46
  9. package/dist/chain-names.d.ts +160 -0
  10. package/dist/chain-names.js +200 -0
  11. package/dist/chains.d.ts +65 -0
  12. package/dist/chains.js +284 -0
  13. package/dist/config.d.ts +216 -0
  14. package/dist/{src/config.js → config.js} +151 -44
  15. package/dist/consolidated-quote.d.ts +554 -0
  16. package/dist/consolidated-quote.js +773 -0
  17. package/dist/destination-calldata.d.ts +118 -0
  18. package/dist/destination-calldata.js +152 -0
  19. package/dist/ecosystems.d.ts +217 -0
  20. package/dist/ecosystems.js +288 -0
  21. package/dist/hyperliquid-execution.d.ts +152 -0
  22. package/dist/hyperliquid-execution.js +168 -0
  23. package/dist/image-links.d.ts +117 -0
  24. package/dist/image-links.js +142 -0
  25. package/dist/index.d.ts +20 -0
  26. package/dist/index.js +20 -0
  27. package/dist/lifi-execution-guard.d.ts +199 -0
  28. package/dist/lifi-execution-guard.js +400 -0
  29. package/dist/near-intents-conformance.d.ts +85 -0
  30. package/dist/near-intents-conformance.js +329 -0
  31. package/dist/near-intents-route.d.ts +47 -0
  32. package/dist/near-intents-route.js +265 -0
  33. package/dist/near-intents.d.ts +524 -0
  34. package/dist/near-intents.js +1055 -0
  35. package/dist/origin-deposit.d.ts +326 -0
  36. package/dist/origin-deposit.js +68 -0
  37. package/dist/pre-quote.d.ts +198 -0
  38. package/dist/pre-quote.js +175 -0
  39. package/dist/prices.d.ts +107 -0
  40. package/dist/prices.js +162 -0
  41. package/dist/providers.d.ts +221 -0
  42. package/dist/providers.js +157 -0
  43. package/dist/quote-fees.d.ts +102 -0
  44. package/dist/quote-fees.js +195 -0
  45. package/dist/referral.d.ts +77 -0
  46. package/dist/referral.js +72 -0
  47. package/dist/relay-currencies.d.ts +47 -0
  48. package/dist/relay-currencies.js +89 -0
  49. package/dist/relay-quote.d.ts +301 -0
  50. package/dist/relay-quote.js +983 -0
  51. package/dist/route-steps.d.ts +138 -0
  52. package/dist/route-steps.js +305 -0
  53. package/dist/routing/amounts.d.ts +80 -0
  54. package/dist/routing/amounts.js +120 -0
  55. package/dist/routing/candidate-route.d.ts +43 -0
  56. package/dist/routing/candidate-route.js +45 -0
  57. package/dist/routing/candidate.d.ts +237 -0
  58. package/dist/routing/candidate.js +96 -0
  59. package/dist/routing/carriers/ask-answer.d.ts +58 -0
  60. package/dist/routing/carriers/omnibridge.d.ts +137 -0
  61. package/dist/routing/carriers/omnibridge.js +419 -0
  62. package/dist/routing/carriers/pulsex.d.ts +111 -0
  63. package/dist/routing/carriers/pulsex.js +404 -0
  64. package/dist/routing/carriers/wrap.d.ts +25 -0
  65. package/dist/routing/carriers/wrap.js +115 -0
  66. package/dist/routing/composed-route-quality.d.ts +103 -0
  67. package/dist/routing/composed-route-quality.js +108 -0
  68. package/dist/routing/entry-chain-anchor.d.ts +88 -0
  69. package/dist/routing/entry-chain-anchor.js +55 -0
  70. package/dist/routing/format.d.ts +31 -0
  71. package/dist/routing/format.js +58 -0
  72. package/dist/routing/index.d.ts +34 -0
  73. package/dist/routing/index.js +42 -0
  74. package/dist/routing/producers.d.ts +770 -0
  75. package/dist/routing/producers.js +1564 -0
  76. package/dist/routing/providers.d.ts +26 -0
  77. package/dist/routing/providers.js +38 -0
  78. package/dist/routing/route-data.d.ts +355 -0
  79. package/dist/routing/route-data.js +1 -0
  80. package/dist/routing/search/compose.d.ts +168 -0
  81. package/dist/routing/search/compose.js +98 -0
  82. package/dist/routing/search/graph.d.ts +639 -0
  83. package/dist/routing/search/graph.js +445 -0
  84. package/dist/routing/search/plan-route-data.d.ts +244 -0
  85. package/dist/routing/search/plan-route-data.js +767 -0
  86. package/dist/routing/search/score.d.ts +324 -0
  87. package/dist/routing/search/score.js +400 -0
  88. package/dist/routing/usd-value.d.ts +17 -0
  89. package/dist/routing/usd-value.js +25 -0
  90. package/dist/settings.d.ts +692 -0
  91. package/dist/{src/settings.js → settings.js} +338 -71
  92. package/dist/ton-execution.d.ts +117 -0
  93. package/dist/ton-execution.js +247 -0
  94. package/dist/tron-execution.d.ts +146 -0
  95. package/dist/tron-execution.js +239 -0
  96. package/dist/{src/types.d.ts → types.d.ts} +8 -1
  97. package/dist/types.js +1 -0
  98. package/package.json +210 -23
  99. package/dist/src/abis.d.ts +0 -384
  100. package/dist/src/abis.js +0 -68
  101. package/dist/src/chains.d.ts +0 -6
  102. package/dist/src/chains.js +0 -86
  103. package/dist/src/config.d.ts +0 -136
  104. package/dist/src/image-links.d.ts +0 -41
  105. package/dist/src/image-links.js +0 -45
  106. package/dist/src/index.d.ts +0 -8
  107. package/dist/src/index.js +0 -8
  108. package/dist/src/settings.d.ts +0 -357
  109. package/dist/tsconfig.tsbuildinfo +0 -1
  110. package/src/abis.ts +0 -70
  111. package/src/chain-info.ts +0 -464
  112. package/src/chains.ts +0 -88
  113. package/src/config.ts +0 -480
  114. package/src/fee-type.ts +0 -14
  115. package/src/image-links.ts +0 -61
  116. package/src/index.ts +0 -8
  117. package/src/settings.ts +0 -898
  118. package/src/types.ts +0 -48
  119. package/tsconfig.json +0 -16
  120. /package/dist/{src/fee-type.d.ts → fee-type.d.ts} +0 -0
  121. /package/dist/{src/fee-type.js → fee-type.js} +0 -0
  122. /package/dist/{src/types.js → routing/carriers/ask-answer.js} +0 -0
package/package.json CHANGED
@@ -1,34 +1,221 @@
1
1
  {
2
2
  "name": "@gibs/bridge-sdk",
3
- "version": "1.10.1",
4
- "main": "index.js",
5
- "access": "public",
3
+ "version": "1.13.0",
4
+ "description": "Build and price cross-chain transfers between PulseChain, Ethereum, and Binance Smart Chain.",
5
+ "keywords": [
6
+ "ethereum",
7
+ "pulsechain",
8
+ "bridge",
9
+ "omnibridge",
10
+ "viem",
11
+ "cross-chain"
12
+ ],
13
+ "license": "ISC",
14
+ "author": "Gibs Finance",
15
+ "homepage": "https://gibs.finance",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/gibsfinance/bridge.git",
19
+ "directory": "packages/bridge-sdk"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/gibsfinance/bridge/issues"
23
+ },
24
+ "engines": {
25
+ "node": ">=20"
26
+ },
6
27
  "type": "module",
28
+ "sideEffects": false,
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
7
31
  "exports": {
8
- ".": "./src/index.ts",
9
- "./types": "./src/types.ts",
10
- "./config": "./src/config.ts",
11
- "./abis": "./src/abis.ts",
12
- "./image-links": "./src/image-links.ts",
13
- "./chains": "./src/chains.ts",
14
- "./chain-info": "./src/chain-info.ts",
15
- "./fee-type": "./src/fee-type.ts",
16
- "./settings": "./src/settings.ts"
32
+ ".": {
33
+ "gibs-source": "./src/index.ts",
34
+ "types": "./dist/index.d.ts",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./types": {
38
+ "gibs-source": "./src/types.ts",
39
+ "types": "./dist/types.d.ts",
40
+ "default": "./dist/types.js"
41
+ },
42
+ "./config": {
43
+ "gibs-source": "./src/config.ts",
44
+ "types": "./dist/config.d.ts",
45
+ "default": "./dist/config.js"
46
+ },
47
+ "./referral": {
48
+ "gibs-source": "./src/referral.ts",
49
+ "types": "./dist/referral.d.ts",
50
+ "default": "./dist/referral.js"
51
+ },
52
+ "./consolidated-quote": {
53
+ "gibs-source": "./src/consolidated-quote.ts",
54
+ "types": "./dist/consolidated-quote.d.ts",
55
+ "default": "./dist/consolidated-quote.js"
56
+ },
57
+ "./origin-deposit": {
58
+ "gibs-source": "./src/origin-deposit.ts",
59
+ "types": "./dist/origin-deposit.d.ts",
60
+ "default": "./dist/origin-deposit.js"
61
+ },
62
+ "./hyperliquid-execution": {
63
+ "gibs-source": "./src/hyperliquid-execution.ts",
64
+ "types": "./dist/hyperliquid-execution.d.ts",
65
+ "default": "./dist/hyperliquid-execution.js"
66
+ },
67
+ "./ton-execution": {
68
+ "gibs-source": "./src/ton-execution.ts",
69
+ "types": "./dist/ton-execution.d.ts",
70
+ "default": "./dist/ton-execution.js"
71
+ },
72
+ "./tron-execution": {
73
+ "gibs-source": "./src/tron-execution.ts",
74
+ "types": "./dist/tron-execution.d.ts",
75
+ "default": "./dist/tron-execution.js"
76
+ },
77
+ "./relay-quote": {
78
+ "gibs-source": "./src/relay-quote.ts",
79
+ "types": "./dist/relay-quote.d.ts",
80
+ "default": "./dist/relay-quote.js"
81
+ },
82
+ "./near-intents": {
83
+ "gibs-source": "./src/near-intents.ts",
84
+ "types": "./dist/near-intents.d.ts",
85
+ "default": "./dist/near-intents.js"
86
+ },
87
+ "./near-intents-route": {
88
+ "gibs-source": "./src/near-intents-route.ts",
89
+ "types": "./dist/near-intents-route.d.ts",
90
+ "default": "./dist/near-intents-route.js"
91
+ },
92
+ "./quote-fees": {
93
+ "gibs-source": "./src/quote-fees.ts",
94
+ "types": "./dist/quote-fees.d.ts",
95
+ "default": "./dist/quote-fees.js"
96
+ },
97
+ "./relay-currencies": {
98
+ "gibs-source": "./src/relay-currencies.ts",
99
+ "types": "./dist/relay-currencies.d.ts",
100
+ "default": "./dist/relay-currencies.js"
101
+ },
102
+ "./pre-quote": {
103
+ "gibs-source": "./src/pre-quote.ts",
104
+ "types": "./dist/pre-quote.d.ts",
105
+ "default": "./dist/pre-quote.js"
106
+ },
107
+ "./ecosystems": {
108
+ "gibs-source": "./src/ecosystems.ts",
109
+ "types": "./dist/ecosystems.d.ts",
110
+ "default": "./dist/ecosystems.js"
111
+ },
112
+ "./providers": {
113
+ "gibs-source": "./src/providers.ts",
114
+ "types": "./dist/providers.d.ts",
115
+ "default": "./dist/providers.js"
116
+ },
117
+ "./destination-calldata": {
118
+ "gibs-source": "./src/destination-calldata.ts",
119
+ "types": "./dist/destination-calldata.d.ts",
120
+ "default": "./dist/destination-calldata.js"
121
+ },
122
+ "./bridge-limits": {
123
+ "gibs-source": "./src/bridge-limits.ts",
124
+ "types": "./dist/bridge-limits.d.ts",
125
+ "default": "./dist/bridge-limits.js"
126
+ },
127
+ "./abis": {
128
+ "gibs-source": "./src/abis.ts",
129
+ "types": "./dist/abis.d.ts",
130
+ "default": "./dist/abis.js"
131
+ },
132
+ "./image-links": {
133
+ "gibs-source": "./src/image-links.ts",
134
+ "types": "./dist/image-links.d.ts",
135
+ "default": "./dist/image-links.js"
136
+ },
137
+ "./lifi-execution-guard": {
138
+ "gibs-source": "./src/lifi-execution-guard.ts",
139
+ "types": "./dist/lifi-execution-guard.d.ts",
140
+ "default": "./dist/lifi-execution-guard.js"
141
+ },
142
+ "./prices": {
143
+ "gibs-source": "./src/prices.ts",
144
+ "types": "./dist/prices.d.ts",
145
+ "default": "./dist/prices.js"
146
+ },
147
+ "./chains": {
148
+ "gibs-source": "./src/chains.ts",
149
+ "types": "./dist/chains.d.ts",
150
+ "default": "./dist/chains.js"
151
+ },
152
+ "./chain-info": {
153
+ "gibs-source": "./src/chain-info.ts",
154
+ "types": "./dist/chain-info.d.ts",
155
+ "default": "./dist/chain-info.js"
156
+ },
157
+ "./chain-names": {
158
+ "gibs-source": "./src/chain-names.ts",
159
+ "types": "./dist/chain-names.d.ts",
160
+ "default": "./dist/chain-names.js"
161
+ },
162
+ "./fee-type": {
163
+ "gibs-source": "./src/fee-type.ts",
164
+ "types": "./dist/fee-type.d.ts",
165
+ "default": "./dist/fee-type.js"
166
+ },
167
+ "./settings": {
168
+ "gibs-source": "./src/settings.ts",
169
+ "types": "./dist/settings.d.ts",
170
+ "default": "./dist/settings.js"
171
+ },
172
+ "./route-steps": {
173
+ "gibs-source": "./src/route-steps.ts",
174
+ "types": "./dist/route-steps.d.ts",
175
+ "default": "./dist/route-steps.js"
176
+ },
177
+ "./routing": {
178
+ "gibs-source": "./src/routing/index.ts",
179
+ "types": "./dist/routing/index.d.ts",
180
+ "default": "./dist/routing/index.js"
181
+ }
17
182
  },
183
+ "files": [
184
+ "dist",
185
+ "!dist/tsconfig.tsbuildinfo",
186
+ "!dist/**/*.test-d.*",
187
+ "!dist/test-utils",
188
+ "LICENSE"
189
+ ],
18
190
  "scripts": {
19
- "build": "npx tsc"
191
+ "prepublishOnly": "npx tsc",
192
+ "build": "npx tsc",
193
+ "test": "vitest run",
194
+ "test:watch": "vitest",
195
+ "test:coverage": "vitest run --coverage",
196
+ "test:fork": "../../scripts/fork-test.sh",
197
+ "test:live:near-intents": "../../scripts/near-intents-live.sh"
198
+ },
199
+ "dependencies": {
200
+ "@gibs/abis": "^1.13.0",
201
+ "@gibs/common": "^1.13.0",
202
+ "@ton/core": "^0.63.1",
203
+ "@ton/crypto": "^3.3.0",
204
+ "lodash-es": "^4.17.21"
205
+ },
206
+ "peerDependencies": {
207
+ "viem": ">=2.37.0 <3"
20
208
  },
21
- "keywords": [],
22
- "author": "",
23
- "license": "ISC",
24
- "description": "",
25
209
  "devDependencies": {
26
- "@types/node": "^22.12.0",
27
- "typescript": "~5.7.2"
210
+ "@types/lodash-es": "^4.17.12",
211
+ "@types/node": "^24",
212
+ "@vitest/coverage-v8": "^3.1.1",
213
+ "fast-check": "^4.10.2",
214
+ "typescript": "~5.7.2",
215
+ "viem": "^2.46.3",
216
+ "vitest": "^3.1.1"
28
217
  },
29
- "dependencies": {
30
- "@gibs/common": "^1.0.0",
31
- "lodash": "^4.17.21",
32
- "viem": "^2.37.8"
218
+ "publishConfig": {
219
+ "access": "public"
33
220
  }
34
221
  }
@@ -1,384 +0,0 @@
1
- /** the abi for the input bridge */
2
- export declare const inputBridge: readonly [{
3
- readonly name: "minPerTx";
4
- readonly type: "function";
5
- readonly stateMutability: "view";
6
- readonly inputs: readonly [{
7
- readonly type: "address";
8
- readonly name: "token";
9
- }];
10
- readonly outputs: readonly [{
11
- readonly type: "uint256";
12
- }];
13
- }, {
14
- readonly name: "foreignTokenAddress";
15
- readonly type: "function";
16
- readonly stateMutability: "view";
17
- readonly inputs: readonly [{
18
- readonly type: "address";
19
- readonly name: "token";
20
- }];
21
- readonly outputs: readonly [{
22
- readonly type: "address";
23
- }];
24
- }, {
25
- readonly name: "homeTokenAddress";
26
- readonly type: "function";
27
- readonly stateMutability: "view";
28
- readonly inputs: readonly [{
29
- readonly type: "address";
30
- readonly name: "token";
31
- }];
32
- readonly outputs: readonly [{
33
- readonly type: "address";
34
- }];
35
- }, {
36
- readonly name: "bridgedTokenAddress";
37
- readonly type: "function";
38
- readonly stateMutability: "view";
39
- readonly inputs: readonly [{
40
- readonly type: "address";
41
- readonly name: "token";
42
- }];
43
- readonly outputs: readonly [{
44
- readonly type: "address";
45
- }];
46
- }, {
47
- readonly name: "nativeTokenAddress";
48
- readonly type: "function";
49
- readonly stateMutability: "view";
50
- readonly inputs: readonly [{
51
- readonly type: "address";
52
- readonly name: "token";
53
- }];
54
- readonly outputs: readonly [{
55
- readonly type: "address";
56
- }];
57
- }, {
58
- readonly name: "feeManager";
59
- readonly type: "function";
60
- readonly stateMutability: "view";
61
- readonly inputs: readonly [];
62
- readonly outputs: readonly [{
63
- readonly type: "address";
64
- }];
65
- }, {
66
- readonly name: "relayTokensAndCall";
67
- readonly type: "function";
68
- readonly stateMutability: "nonpayable";
69
- readonly inputs: readonly [{
70
- readonly type: "address";
71
- readonly name: "token";
72
- }, {
73
- readonly type: "address";
74
- readonly name: "_receiver";
75
- }, {
76
- readonly type: "uint256";
77
- readonly name: "_value";
78
- }, {
79
- readonly type: "bytes";
80
- readonly name: "_data";
81
- }];
82
- readonly outputs: readonly [];
83
- }, {
84
- readonly name: "relayTokens";
85
- readonly type: "function";
86
- readonly stateMutability: "nonpayable";
87
- readonly inputs: readonly [{
88
- readonly type: "address";
89
- readonly name: "token";
90
- }, {
91
- readonly type: "address";
92
- readonly name: "_receiver";
93
- }, {
94
- readonly type: "uint256";
95
- readonly name: "_value";
96
- }];
97
- readonly outputs: readonly [];
98
- }];
99
- /** the abi for the input bridge with extra input for the sender origin (tokensex) */
100
- export declare const inputBridgeExtraInput: readonly [{
101
- readonly name: "relayTokensAndCall";
102
- readonly type: "function";
103
- readonly stateMutability: "nonpayable";
104
- readonly inputs: readonly [{
105
- readonly type: "address";
106
- readonly name: "token";
107
- }, {
108
- readonly type: "address";
109
- readonly name: "_receiver";
110
- }, {
111
- readonly type: "uint256";
112
- readonly name: "_value";
113
- }, {
114
- readonly type: "bytes";
115
- readonly name: "_data";
116
- }, {
117
- readonly type: "address";
118
- readonly name: "_senderOrigin";
119
- }];
120
- readonly outputs: readonly [];
121
- }, {
122
- readonly name: "relayTokens";
123
- readonly type: "function";
124
- readonly stateMutability: "nonpayable";
125
- readonly inputs: readonly [{
126
- readonly type: "address";
127
- readonly name: "token";
128
- }, {
129
- readonly type: "address";
130
- readonly name: "_receiver";
131
- }, {
132
- readonly type: "uint256";
133
- readonly name: "_value";
134
- }, {
135
- readonly type: "address";
136
- readonly name: "_senderOrigin";
137
- }];
138
- readonly outputs: readonly [];
139
- }];
140
- /** the abi for erc677 tokens */
141
- export declare const erc677: readonly [{
142
- readonly name: "transferAndCall";
143
- readonly type: "function";
144
- readonly stateMutability: "nonpayable";
145
- readonly inputs: readonly [{
146
- readonly type: "address";
147
- }, {
148
- readonly type: "uint256";
149
- }, {
150
- readonly type: "bytes";
151
- }];
152
- readonly outputs: readonly [];
153
- }];
154
- /** the abi for erc677 tokens bridge with extra input for the sender origin (tokensex) */
155
- export declare const erc677ExtraInput: readonly [{
156
- readonly name: "transferAndCall";
157
- readonly type: "function";
158
- readonly stateMutability: "nonpayable";
159
- readonly inputs: readonly [{
160
- readonly type: "address";
161
- }, {
162
- readonly type: "uint256";
163
- }, {
164
- readonly type: "bytes";
165
- }, {
166
- readonly type: "address";
167
- readonly name: "sender";
168
- }];
169
- readonly outputs: readonly [];
170
- }];
171
- /** the abi to read data from the output router */
172
- export declare const outputRouter: readonly [{
173
- readonly name: "onTokenBridged";
174
- readonly type: "function";
175
- readonly stateMutability: "payable";
176
- readonly inputs: readonly [{
177
- readonly type: "address";
178
- readonly name: "_token";
179
- }, {
180
- readonly type: "uint256";
181
- readonly name: "_value";
182
- }, {
183
- readonly type: "bytes";
184
- readonly name: "_data";
185
- }];
186
- readonly outputs: readonly [];
187
- }, {
188
- readonly name: "WETH";
189
- readonly type: "function";
190
- readonly stateMutability: "view";
191
- readonly inputs: readonly [];
192
- readonly outputs: readonly [{
193
- readonly type: "address";
194
- }];
195
- }, {
196
- readonly name: "bridge";
197
- readonly type: "function";
198
- readonly stateMutability: "view";
199
- readonly inputs: readonly [];
200
- readonly outputs: readonly [{
201
- readonly type: "address";
202
- }];
203
- }, {
204
- readonly name: "safeExecuteSignaturesWithAutoGasLimit";
205
- readonly type: "function";
206
- readonly stateMutability: "payable";
207
- readonly inputs: readonly [{
208
- readonly type: "address";
209
- readonly name: "runner";
210
- }, {
211
- readonly type: "bytes";
212
- readonly name: "_data";
213
- }, {
214
- readonly type: "bytes";
215
- readonly name: "_signatures";
216
- }];
217
- readonly outputs: readonly [];
218
- }];
219
- /** the abi for the output bridge */
220
- export declare const outputBridge: readonly [{
221
- readonly name: "bridgeContract";
222
- readonly type: "function";
223
- readonly stateMutability: "view";
224
- readonly inputs: readonly [];
225
- readonly outputs: readonly [{
226
- readonly type: "address";
227
- }];
228
- }];
229
- /** the abi for the fee manager */
230
- export declare const feeManager: readonly [{
231
- readonly name: "HOME_TO_FOREIGN_FEE";
232
- readonly type: "function";
233
- readonly stateMutability: "view";
234
- readonly inputs: readonly [];
235
- readonly outputs: readonly [{
236
- readonly type: "bytes32";
237
- }];
238
- }, {
239
- readonly name: "FOREIGN_TO_HOME_FEE";
240
- readonly type: "function";
241
- readonly stateMutability: "view";
242
- readonly inputs: readonly [];
243
- readonly outputs: readonly [{
244
- readonly type: "bytes32";
245
- }];
246
- }, {
247
- readonly name: "getFee";
248
- readonly type: "function";
249
- readonly stateMutability: "view";
250
- readonly inputs: readonly [{
251
- readonly type: "bytes32";
252
- }, {
253
- readonly type: "address";
254
- }];
255
- readonly outputs: readonly [{
256
- readonly type: "uint256";
257
- }];
258
- }];
259
- /** the abi for the native router */
260
- export declare const nativeRouter: readonly [{
261
- readonly name: "wrapAndRelayTokens";
262
- readonly type: "function";
263
- readonly stateMutability: "payable";
264
- readonly inputs: readonly [{
265
- readonly type: "address";
266
- readonly name: "receiver";
267
- }];
268
- readonly outputs: readonly [];
269
- }, {
270
- readonly name: "relayTokensAndCall";
271
- readonly type: "function";
272
- readonly stateMutability: "payable";
273
- readonly inputs: readonly [{
274
- readonly type: "address";
275
- readonly name: "receiver";
276
- }, {
277
- readonly type: "bytes";
278
- readonly name: "data";
279
- }];
280
- readonly outputs: readonly [];
281
- }];
282
- /** the abi for the native router with extra input for the sender origin (tokensex) */
283
- export declare const nativeRouterExtraInput: readonly [{
284
- readonly name: "wrapAndRelayTokens";
285
- readonly type: "function";
286
- readonly stateMutability: "payable";
287
- readonly inputs: readonly [{
288
- readonly type: "address";
289
- readonly name: "receiver";
290
- }, {
291
- readonly type: "address";
292
- readonly name: "sender";
293
- }];
294
- readonly outputs: readonly [];
295
- }, {
296
- readonly name: "relayTokensAndCall";
297
- readonly type: "function";
298
- readonly stateMutability: "payable";
299
- readonly inputs: readonly [{
300
- readonly type: "address";
301
- readonly name: "receiver";
302
- }, {
303
- readonly type: "bytes";
304
- readonly name: "data";
305
- }, {
306
- readonly type: "address";
307
- readonly name: "sender";
308
- }];
309
- readonly outputs: readonly [];
310
- }];
311
- /** the abi for the univ2 router */
312
- export declare const univ2Router: readonly [{
313
- readonly name: "getAmountsOut";
314
- readonly type: "function";
315
- readonly stateMutability: "view";
316
- readonly inputs: readonly [{
317
- readonly type: "uint256";
318
- readonly name: "amountIn";
319
- }, {
320
- readonly type: "address[]";
321
- readonly name: "path";
322
- }];
323
- readonly outputs: readonly [{
324
- readonly type: "uint256[]";
325
- }];
326
- }];
327
- /** the abi for the fee delivery struct */
328
- export declare const feeDeliveryStruct: readonly [{
329
- readonly type: "tuple";
330
- readonly components: readonly [{
331
- readonly type: "address";
332
- }, {
333
- readonly type: "uint256";
334
- }, {
335
- readonly type: "uint256";
336
- }, {
337
- readonly type: "uint256";
338
- }];
339
- }];
340
- /** the abi for the relay tokens direct */
341
- export declare const relayTokensDirect: readonly [{
342
- readonly name: "safeExecuteSignaturesWithAutoGasLimit";
343
- readonly type: "function";
344
- readonly stateMutability: "nonpayable";
345
- readonly inputs: readonly [{
346
- readonly type: "bytes";
347
- readonly name: "data";
348
- }, {
349
- readonly type: "bytes";
350
- readonly name: "signatures";
351
- }];
352
- readonly outputs: readonly [];
353
- }];
354
- /** the abi for the home amb */
355
- export declare const homeAmb: readonly [{
356
- readonly name: "submitSignature";
357
- readonly type: "function";
358
- readonly stateMutability: "nonpayable";
359
- readonly inputs: readonly [{
360
- readonly type: "bytes";
361
- readonly name: "message";
362
- }, {
363
- readonly type: "bytes";
364
- readonly name: "signature";
365
- }];
366
- readonly outputs: readonly [];
367
- }];
368
- /** the abi for the univ2 pair */
369
- export declare const pair: readonly [{
370
- readonly name: "getReserves";
371
- readonly type: "function";
372
- readonly stateMutability: "view";
373
- readonly inputs: readonly [];
374
- readonly outputs: readonly [{
375
- readonly type: "uint112";
376
- readonly name: "reserve0";
377
- }, {
378
- readonly type: "uint112";
379
- readonly name: "reserve1";
380
- }, {
381
- readonly type: "uint32";
382
- readonly name: "blockTimestampLast";
383
- }];
384
- }];
package/dist/src/abis.js DELETED
@@ -1,68 +0,0 @@
1
- import { parseAbi, parseAbiParameters } from 'viem';
2
- /** the abi for the input bridge */
3
- export const inputBridge = parseAbi([
4
- 'function minPerTx(address token) external view returns(uint256)',
5
- 'function foreignTokenAddress(address token) external view returns(address)',
6
- 'function homeTokenAddress(address token) external view returns(address)',
7
- 'function bridgedTokenAddress(address token) external view returns(address)',
8
- 'function nativeTokenAddress(address token) external view returns(address)',
9
- 'function feeManager() external view returns(address)',
10
- 'function relayTokensAndCall(address token, address _receiver, uint256 _value, bytes memory _data) external',
11
- 'function relayTokens(address token, address _receiver, uint256 _value) external',
12
- ]);
13
- /** the abi for the input bridge with extra input for the sender origin (tokensex) */
14
- export const inputBridgeExtraInput = parseAbi([
15
- 'function relayTokensAndCall(address token, address _receiver, uint256 _value, bytes memory _data, address _senderOrigin) external',
16
- 'function relayTokens(address token, address _receiver, uint256 _value, address _senderOrigin) external',
17
- ]);
18
- /** the abi for erc677 tokens */
19
- export const erc677 = parseAbi([
20
- 'function transferAndCall(address, uint256, bytes calldata) external',
21
- ]);
22
- /** the abi for erc677 tokens bridge with extra input for the sender origin (tokensex) */
23
- export const erc677ExtraInput = parseAbi([
24
- 'function transferAndCall(address, uint256, bytes calldata, address sender) external',
25
- ]);
26
- /** the abi to read data from the output router */
27
- export const outputRouter = parseAbi([
28
- 'function onTokenBridged(address _token, uint256 _value, bytes memory _data) external payable',
29
- 'function WETH() external view returns(address)',
30
- 'function bridge() external view returns(address)',
31
- 'function safeExecuteSignaturesWithAutoGasLimit(address runner,bytes calldata _data,bytes calldata _signatures) external payable',
32
- ]);
33
- /** the abi for the output bridge */
34
- export const outputBridge = parseAbi(['function bridgeContract() external view returns(address)']);
35
- /** the abi for the fee manager */
36
- export const feeManager = parseAbi([
37
- 'function HOME_TO_FOREIGN_FEE() public view returns(bytes32)',
38
- 'function FOREIGN_TO_HOME_FEE() public view returns(bytes32)',
39
- 'function getFee(bytes32, address) public view returns(uint256)',
40
- ]);
41
- /** the abi for the native router */
42
- export const nativeRouter = parseAbi([
43
- 'function wrapAndRelayTokens(address receiver) external payable',
44
- 'function relayTokensAndCall(address receiver, bytes calldata data) external payable',
45
- ]);
46
- /** the abi for the native router with extra input for the sender origin (tokensex) */
47
- export const nativeRouterExtraInput = parseAbi([
48
- 'function wrapAndRelayTokens(address receiver, address sender) external payable',
49
- 'function relayTokensAndCall(address receiver, bytes calldata data, address sender) external payable',
50
- ]);
51
- /** the abi for the univ2 router */
52
- export const univ2Router = parseAbi([
53
- 'function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns(uint256[] memory)',
54
- ]);
55
- /** the abi for the fee delivery struct */
56
- export const feeDeliveryStruct = parseAbiParameters('(address, uint256, uint256, uint256)');
57
- /** the abi for the relay tokens direct */
58
- export const relayTokensDirect = parseAbi([
59
- 'function safeExecuteSignaturesWithAutoGasLimit(bytes calldata data, bytes calldata signatures) external',
60
- ]);
61
- /** the abi for the home amb */
62
- export const homeAmb = parseAbi([
63
- 'function submitSignature(bytes message, bytes signature) external',
64
- ]);
65
- /** the abi for the univ2 pair */
66
- export const pair = parseAbi([
67
- 'function getReserves() view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast)',
68
- ]);