@gibs/bridge-sdk 1.12.0 → 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 (117) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +234 -432
  3. package/dist/abis.d.ts +1 -0
  4. package/dist/bridge-limits.d.ts +103 -0
  5. package/dist/bridge-limits.js +84 -0
  6. package/dist/chain-info.d.ts +169 -0
  7. package/dist/chain-info.js +410 -0
  8. package/dist/chain-names.d.ts +160 -0
  9. package/dist/chain-names.js +200 -0
  10. package/dist/chains.d.ts +65 -0
  11. package/dist/chains.js +284 -0
  12. package/dist/config.d.ts +216 -0
  13. package/dist/config.js +493 -0
  14. package/dist/consolidated-quote.d.ts +554 -0
  15. package/dist/consolidated-quote.js +773 -0
  16. package/dist/destination-calldata.d.ts +118 -0
  17. package/dist/destination-calldata.js +152 -0
  18. package/dist/ecosystems.d.ts +217 -0
  19. package/dist/ecosystems.js +288 -0
  20. package/dist/fee-type.d.ts +10 -0
  21. package/dist/fee-type.js +9 -0
  22. package/dist/hyperliquid-execution.d.ts +152 -0
  23. package/dist/hyperliquid-execution.js +168 -0
  24. package/dist/image-links.d.ts +117 -0
  25. package/dist/image-links.js +142 -0
  26. package/dist/index.d.ts +20 -0
  27. package/dist/index.js +20 -0
  28. package/dist/lifi-execution-guard.d.ts +199 -0
  29. package/dist/lifi-execution-guard.js +400 -0
  30. package/dist/near-intents-conformance.d.ts +85 -0
  31. package/dist/near-intents-conformance.js +329 -0
  32. package/dist/near-intents-route.d.ts +47 -0
  33. package/dist/near-intents-route.js +265 -0
  34. package/dist/near-intents.d.ts +524 -0
  35. package/dist/near-intents.js +1055 -0
  36. package/dist/origin-deposit.d.ts +326 -0
  37. package/dist/origin-deposit.js +68 -0
  38. package/dist/pre-quote.d.ts +198 -0
  39. package/dist/pre-quote.js +175 -0
  40. package/dist/prices.d.ts +107 -0
  41. package/dist/prices.js +162 -0
  42. package/dist/providers.d.ts +221 -0
  43. package/dist/providers.js +157 -0
  44. package/dist/quote-fees.d.ts +102 -0
  45. package/dist/quote-fees.js +195 -0
  46. package/dist/referral.d.ts +77 -0
  47. package/dist/referral.js +72 -0
  48. package/dist/relay-currencies.d.ts +47 -0
  49. package/dist/relay-currencies.js +89 -0
  50. package/dist/relay-quote.d.ts +301 -0
  51. package/dist/relay-quote.js +983 -0
  52. package/dist/route-steps.d.ts +138 -0
  53. package/dist/route-steps.js +305 -0
  54. package/dist/routing/amounts.d.ts +80 -0
  55. package/dist/routing/amounts.js +120 -0
  56. package/dist/routing/candidate-route.d.ts +43 -0
  57. package/dist/routing/candidate-route.js +45 -0
  58. package/dist/routing/candidate.d.ts +237 -0
  59. package/dist/routing/candidate.js +96 -0
  60. package/dist/routing/carriers/ask-answer.d.ts +58 -0
  61. package/dist/routing/carriers/ask-answer.js +1 -0
  62. package/dist/routing/carriers/omnibridge.d.ts +137 -0
  63. package/dist/routing/carriers/omnibridge.js +419 -0
  64. package/dist/routing/carriers/pulsex.d.ts +111 -0
  65. package/dist/routing/carriers/pulsex.js +404 -0
  66. package/dist/routing/carriers/wrap.d.ts +25 -0
  67. package/dist/routing/carriers/wrap.js +115 -0
  68. package/dist/routing/composed-route-quality.d.ts +103 -0
  69. package/dist/routing/composed-route-quality.js +108 -0
  70. package/dist/routing/entry-chain-anchor.d.ts +88 -0
  71. package/dist/routing/entry-chain-anchor.js +55 -0
  72. package/dist/routing/format.d.ts +31 -0
  73. package/dist/routing/format.js +58 -0
  74. package/dist/routing/index.d.ts +34 -0
  75. package/dist/routing/index.js +42 -0
  76. package/dist/routing/producers.d.ts +770 -0
  77. package/dist/routing/producers.js +1564 -0
  78. package/dist/routing/providers.d.ts +26 -0
  79. package/dist/routing/providers.js +38 -0
  80. package/dist/routing/route-data.d.ts +355 -0
  81. package/dist/routing/route-data.js +1 -0
  82. package/dist/routing/search/compose.d.ts +168 -0
  83. package/dist/routing/search/compose.js +98 -0
  84. package/dist/routing/search/graph.d.ts +639 -0
  85. package/dist/routing/search/graph.js +445 -0
  86. package/dist/routing/search/plan-route-data.d.ts +244 -0
  87. package/dist/routing/search/plan-route-data.js +767 -0
  88. package/dist/routing/search/score.d.ts +324 -0
  89. package/dist/routing/search/score.js +400 -0
  90. package/dist/routing/usd-value.d.ts +17 -0
  91. package/dist/routing/usd-value.js +25 -0
  92. package/dist/settings.d.ts +692 -0
  93. package/dist/settings.js +909 -0
  94. package/dist/ton-execution.d.ts +117 -0
  95. package/dist/ton-execution.js +247 -0
  96. package/dist/tron-execution.d.ts +146 -0
  97. package/dist/tron-execution.js +239 -0
  98. package/dist/types.d.ts +51 -0
  99. package/dist/types.js +1 -0
  100. package/package.json +203 -23
  101. package/src/chain-info.test.ts +0 -968
  102. package/src/chain-info.ts +0 -498
  103. package/src/chains.test.ts +0 -123
  104. package/src/chains.ts +0 -88
  105. package/src/config.test.ts +0 -679
  106. package/src/config.ts +0 -500
  107. package/src/fee-type.test.ts +0 -45
  108. package/src/fee-type.ts +0 -14
  109. package/src/image-links.test.ts +0 -160
  110. package/src/image-links.ts +0 -65
  111. package/src/index.ts +0 -8
  112. package/src/settings.test.ts +0 -2754
  113. package/src/settings.ts +0 -875
  114. package/src/types.ts +0 -48
  115. package/tsconfig.json +0 -17
  116. package/vitest.config.ts +0 -13
  117. /package/{src/abis.ts → dist/abis.js} +0 -0
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Executing a deposit on Tron, as pure data.
3
+ *
4
+ * Relay does not return a broadcastable Tron transaction. It returns the
5
+ * *parameters* of a `TriggerSmartContract` call — owner, contract, call value
6
+ * and calldata — and nothing else. A Tron transaction additionally needs a
7
+ * reference block, an expiration and a fee limit, none of which Relay supplies.
8
+ * Those are produced by asking a full node to build the transaction, which is
9
+ * what {@link buildTriggerSmartContractRequest} constructs the body for. The
10
+ * node answers with an UNSIGNED transaction; the wallet signs it and a second
11
+ * call broadcasts it.
12
+ *
13
+ * Three details of that exchange lose money or mislead if handled naively:
14
+ *
15
+ * **The `visible` flag defaults to true.** A node reads addresses as base58
16
+ * unless told otherwise, but Relay returns them as hex with Tron's `41` prefix.
17
+ * Omitting the flag therefore hands base58-parsing a hex string. The request
18
+ * built here always states `visible: false` rather than relying on a default
19
+ * that is the opposite of what the payload contains.
20
+ *
21
+ * **`fee_limit` is required and Relay omits it.** It caps the energy the caller
22
+ * will pay for. Set too low, the call runs out of energy, reverts, and the
23
+ * energy already burned is NOT refunded — the deposit fails and costs the user
24
+ * anyway.
25
+ *
26
+ * **A rejected call still answers HTTP 200**, with the reason hex-encoded in
27
+ * `result.message`. Reading the status code alone reports a failed deposit as a
28
+ * success, and printing the message unmodified shows the user a wall of hex.
29
+ * {@link tronErrorMessage} decodes it.
30
+ *
31
+ * Kept free of transport and of clock reads so it is fully testable: nothing
32
+ * here signs, fetches, or calls `Date.now`. The caller performs the requests.
33
+ */
34
+ /** Path of the full-node endpoint that builds an unsigned contract call. */
35
+ export const tronTriggerSmartContractPath = '/wallet/triggersmartcontract';
36
+ /**
37
+ * The fee limit used when a caller states none, in sun (1 TRX = 1,000,000 sun).
38
+ *
39
+ * Thirty TRX, matching Relay's own wallet adapter, which is the only reference
40
+ * implementation of this deposit path. It is an upper bound rather than a
41
+ * charge: unused energy is not taken, so the cost of setting it generously is
42
+ * only that the wallet shows a larger worst case.
43
+ */
44
+ export const defaultTronFeeLimitSun = 30_000_000;
45
+ /**
46
+ * The largest fee limit a node accepts, in sun — 15,000 TRX. Documented as a
47
+ * hard protocol cap, so a request above it is rejected outright rather than
48
+ * clamped.
49
+ */
50
+ export const maximumTronFeeLimitSun = 15_000_000_000;
51
+ /**
52
+ * Tron's `41` address prefix, the hex form's equivalent of the base58 `T`.
53
+ */
54
+ const tronHexAddressPrefix = '41';
55
+ /** A hex address is the prefix byte plus a twenty-byte account identifier. */
56
+ const tronHexAddressLength = 42;
57
+ /**
58
+ * Normalizes a Tron hex address for comparison.
59
+ *
60
+ * Wallets and quotes disagree on casing, and Relay's payload is not guaranteed
61
+ * to match what a wallet reports even when both name the same account.
62
+ *
63
+ * @param value - an address in Tron's `41`-prefixed hex form, in any casing,
64
+ * optionally written with a `0x` prefix
65
+ * @returns the lowercase `41` form, or null when the value is not that form
66
+ */
67
+ export const normalizeTronHexAddress = (value) => {
68
+ const withoutPrefix = value.trim().replace(/^0x/i, '').toLowerCase();
69
+ if (withoutPrefix.length !== tronHexAddressLength) {
70
+ return null;
71
+ }
72
+ if (!withoutPrefix.startsWith(tronHexAddressPrefix)) {
73
+ return null;
74
+ }
75
+ return /^[0-9a-f]+$/.test(withoutPrefix) ? withoutPrefix : null;
76
+ };
77
+ /**
78
+ * Whether two Tron hex addresses name the same account.
79
+ *
80
+ * Used to check a deposit's owner against the connected wallet before signing.
81
+ * A mismatch means the quote was built for a different account, and signing it
82
+ * would spend from an account the user did not choose — or simply fail after
83
+ * the user has already approved.
84
+ *
85
+ * @param left - an address in Tron's `41`-prefixed hex form
86
+ * @param right - an address in the same form
87
+ * @returns true only when both parse and name the same account
88
+ */
89
+ export const isSameTronAccount = (left, right) => {
90
+ const normalizedLeft = normalizeTronHexAddress(left);
91
+ const normalizedRight = normalizeTronHexAddress(right);
92
+ return normalizedLeft !== null && normalizedLeft === normalizedRight;
93
+ };
94
+ /**
95
+ * Strips the `0x` prefix Tron calldata never carries.
96
+ *
97
+ * Relay documents this field as bare hex, but its own adapter strips the prefix
98
+ * defensively, and a prefixed value is parsed by a node as calldata beginning
99
+ * with the bytes `0x` rather than being rejected — a silently wrong call.
100
+ */
101
+ const bareHex = (value) => value.replace(/^0x/i, '').toLowerCase();
102
+ /**
103
+ * Whether a numeric amount survives the trip through JSON as an exact integer.
104
+ *
105
+ * Sun amounts are 64-bit on the wire but JSON carries them as doubles, so a
106
+ * large enough value would be silently rounded — into a different amount of
107
+ * money than the one that was quoted.
108
+ */
109
+ const isExactInteger = (value) => value >= 0n && value <= BigInt(Number.MAX_SAFE_INTEGER);
110
+ /**
111
+ * Builds the body that asks a full node to construct the unsigned deposit.
112
+ *
113
+ * @param deposit - the parsed origin deposit
114
+ * @param options.feeLimitSun - the energy spending cap in sun; defaults to
115
+ * {@link defaultTronFeeLimitSun}
116
+ * @returns the request body, or null when the deposit names an address that is
117
+ * not Tron hex, carries a call value that cannot be represented exactly, or
118
+ * the fee limit is outside what a node accepts — never a body that would be
119
+ * built against a default `visible` the payload contradicts
120
+ */
121
+ export const buildTriggerSmartContractRequest = (deposit, { feeLimitSun = defaultTronFeeLimitSun } = {}) => {
122
+ const ownerAddress = normalizeTronHexAddress(deposit.ownerAddress);
123
+ const contractAddress = normalizeTronHexAddress(deposit.contractAddress);
124
+ if (ownerAddress === null || contractAddress === null) {
125
+ return null;
126
+ }
127
+ if (!isExactInteger(deposit.callValue)) {
128
+ return null;
129
+ }
130
+ if (!Number.isInteger(feeLimitSun) || feeLimitSun <= 0 || feeLimitSun > maximumTronFeeLimitSun) {
131
+ return null;
132
+ }
133
+ return {
134
+ owner_address: ownerAddress,
135
+ contract_address: contractAddress,
136
+ data: bareHex(deposit.data),
137
+ call_value: Number(deposit.callValue),
138
+ fee_limit: feeLimitSun,
139
+ visible: false,
140
+ };
141
+ };
142
+ /**
143
+ * Decodes a node's hex-encoded failure message.
144
+ *
145
+ * A node reports why it refused a call in `result.message`, hex-encoded — the
146
+ * bytes `4e6f20636f6e7472616374…` rather than "No contract or not a valid smart
147
+ * contract". Broadcast failures report plain text in the same field, so both
148
+ * are handled and a value that is not hex is passed through unchanged.
149
+ */
150
+ const decodeTronMessage = (value) => {
151
+ const trimmed = value.trim();
152
+ if (trimmed.length === 0 || trimmed.length % 2 !== 0 || !/^[0-9a-fA-F]+$/.test(trimmed)) {
153
+ return trimmed;
154
+ }
155
+ let decoded = '';
156
+ for (let index = 0; index < trimmed.length; index += 2) {
157
+ decoded += String.fromCharCode(Number.parseInt(trimmed.slice(index, index + 2), 16));
158
+ }
159
+ // A hex string that decodes to control characters was a number, not a
160
+ // message — return the original rather than a string of unprintable bytes.
161
+ return /^[\x20-\x7e]*$/.test(decoded) ? decoded : trimmed;
162
+ };
163
+ const asRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value)
164
+ ? value
165
+ : null;
166
+ /**
167
+ * Extracts a node's failure reason from either endpoint's response.
168
+ *
169
+ * @param payload - the parsed response body
170
+ * @returns the decoded message, or null when the response reports no failure
171
+ */
172
+ export const tronErrorMessage = (payload) => {
173
+ const body = asRecord(payload);
174
+ if (body === null) {
175
+ return null;
176
+ }
177
+ // The build endpoint nests its outcome under `result`; the broadcast endpoint
178
+ // reports at the top level.
179
+ const nested = asRecord(body.result);
180
+ const message = nested?.message ?? body.message;
181
+ if (typeof message !== 'string') {
182
+ return null;
183
+ }
184
+ const decoded = decodeTronMessage(message);
185
+ return decoded.length === 0 ? null : decoded;
186
+ };
187
+ /**
188
+ * Reads the unsigned transaction out of a build response.
189
+ *
190
+ * The response carries the transaction at the top level alongside a `result`
191
+ * object stating whether the build succeeded, so the presence of a `txID` is
192
+ * not on its own evidence of success.
193
+ *
194
+ * @param payload - the parsed `/wallet/triggersmartcontract` response
195
+ * @returns the unsigned transaction to hand a wallet, or null when the node
196
+ * refused the call
197
+ */
198
+ export const readTriggerSmartContractResponse = (payload) => {
199
+ const body = asRecord(payload);
200
+ if (body === null) {
201
+ return null;
202
+ }
203
+ const outcome = asRecord(body.result);
204
+ if (outcome === null || outcome.result !== true) {
205
+ return null;
206
+ }
207
+ const transaction = asRecord(body.transaction);
208
+ if (transaction === null || typeof transaction.txID !== 'string') {
209
+ return null;
210
+ }
211
+ return transaction;
212
+ };
213
+ /**
214
+ * Reads the transaction identifier out of a broadcast response.
215
+ *
216
+ * GOTCHA: a rejected broadcast answers HTTP 200, and `result` is OMITTED rather
217
+ * than set to false. Testing `result === false` therefore never fires, and
218
+ * trusting the status code records a deposit that never entered a block. Only
219
+ * an explicit `result: true` is accepted here.
220
+ *
221
+ * The identifier is read from `txid` where a node reports it, falling back to
222
+ * the echoed transaction's `txID`. The two spellings differ by casing and by
223
+ * position: a node answers `txid`, while a wallet library that echoes the
224
+ * transaction it broadcast carries `txID` inside it. Accepting only the first
225
+ * would report an accepted broadcast as a failure whenever the caller is one of
226
+ * those libraries.
227
+ *
228
+ * @param payload - the parsed `/wallet/broadcasttransaction` response
229
+ * @returns the transaction identifier, or null when the broadcast was refused
230
+ */
231
+ export const readBroadcastResponse = (payload) => {
232
+ const body = asRecord(payload);
233
+ if (body === null || body.result !== true) {
234
+ return null;
235
+ }
236
+ const echoed = asRecord(body.transaction);
237
+ const identifier = body.txid ?? echoed?.txID;
238
+ return typeof identifier === 'string' && identifier.length > 0 ? identifier : null;
239
+ };
@@ -0,0 +1,51 @@
1
+ import type { Chain, Hex } from 'viem';
2
+ import type { Chains, Provider } from './config.js';
3
+ export type { RouteStep, RouteStepKind } from './route-steps.js';
4
+ /** The per network bridge link */
5
+ export type PerNetworkBridgeLink = {
6
+ tokenAddress: Hex;
7
+ };
8
+ /** The extensions for a token */
9
+ export type Extensions = {
10
+ wrapped?: {
11
+ address: Hex;
12
+ };
13
+ bridgeInfo?: Record<number, PerNetworkBridgeLink>;
14
+ };
15
+ /** The metadata for a token */
16
+ export type TokenMetadata = {
17
+ name: string;
18
+ symbol: string;
19
+ decimals: number;
20
+ };
21
+ /** The token for a given asset */
22
+ export type Token = TokenMetadata & {
23
+ address: string;
24
+ chainId: number;
25
+ logoURI: string | null;
26
+ extensions?: Extensions;
27
+ /**
28
+ * Spot USD price as a decimal string, when a price source provides one inline
29
+ * (e.g. the LI.FI `/tokens` response). Absent/null for tokens from sources
30
+ * that carry no price (e.g. the dapp image lists).
31
+ */
32
+ priceUSD?: string | null;
33
+ };
34
+ /** The token out for a given asset */
35
+ export type TokenOut = Omit<Token, 'address'> & {
36
+ address: string | null;
37
+ };
38
+ /** The token list for a given asset */
39
+ export type TokenList = {
40
+ tokens: Token[];
41
+ };
42
+ /** The bridge key for a given provider, from chain, and to chain */
43
+ export type BridgeKey = [Provider, Chains, Chains];
44
+ /** The visual chain for a given chain */
45
+ export type VisualChain = Chain & {
46
+ chainId: Chains;
47
+ logoURI: string;
48
+ alt: string;
49
+ };
50
+ /** The metadata for a chain */
51
+ export type ChainsMetadata = Record<Chains, VisualChain>;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,41 +1,221 @@
1
1
  {
2
2
  "name": "@gibs/bridge-sdk",
3
- "version": "1.12.0",
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": {
191
+ "prepublishOnly": "npx tsc",
19
192
  "build": "npx tsc",
20
193
  "test": "vitest run",
21
194
  "test:watch": "vitest",
22
- "test:coverage": "vitest run --coverage"
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"
23
208
  },
24
- "keywords": [],
25
- "author": "",
26
- "license": "ISC",
27
- "description": "",
28
209
  "devDependencies": {
29
- "@types/lodash": "^4.17.16",
210
+ "@types/lodash-es": "^4.17.12",
30
211
  "@types/node": "^24",
31
212
  "@vitest/coverage-v8": "^3.1.1",
213
+ "fast-check": "^4.10.2",
32
214
  "typescript": "~5.7.2",
215
+ "viem": "^2.46.3",
33
216
  "vitest": "^3.1.1"
34
217
  },
35
- "dependencies": {
36
- "@gibs/abis": "^1.0.0",
37
- "@gibs/common": "^1.0.0",
38
- "lodash": "^4.17.21",
39
- "viem": "^2.46.3"
218
+ "publishConfig": {
219
+ "access": "public"
40
220
  }
41
221
  }