tapimo 0.3.0 → 0.4.1
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/README.md +5 -5
- package/dist/App.d.ts +31 -9
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +3 -3
- package/dist/App.js.map +1 -1
- package/dist/admin/App.d.ts +116 -116
- package/dist/apps/data/App.d.ts +30 -5
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +21 -4
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/FundingRouteProviders.d.ts +54 -0
- package/dist/apps/data/FundingRouteProviders.d.ts.map +1 -0
- package/dist/apps/data/FundingRouteProviders.js +355 -0
- package/dist/apps/data/FundingRouteProviders.js.map +1 -0
- package/dist/apps/data/index.d.ts +1 -0
- package/dist/apps/data/index.d.ts.map +1 -1
- package/dist/apps/data/index.js +1 -0
- package/dist/apps/data/index.js.map +1 -1
- package/dist/apps/data/routes/balances.d.ts +45 -45
- package/dist/apps/data/routes/coingecko.d.ts +176 -176
- package/dist/apps/data/routes/funding.d.ts +79 -1
- package/dist/apps/data/routes/funding.d.ts.map +1 -1
- package/dist/apps/data/routes/funding.js +68 -8
- package/dist/apps/data/routes/funding.js.map +1 -1
- package/dist/apps/data/routes/indexer.d.ts +5 -5
- package/dist/apps/data/routes/rpc.d.ts +31 -31
- package/dist/apps/data/routes/transactions.d.ts +281 -281
- package/dist/apps/data/routes/transfers.d.ts +58 -58
- package/dist/apps/docs/App.d.ts +1 -1
- package/dist/apps/docs/App.js +1 -1
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +2 -2
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/{platform → management}/App.d.ts +11 -11
- package/dist/apps/{platform → management}/App.d.ts.map +1 -1
- package/dist/apps/{platform → management}/App.js +7 -7
- package/dist/apps/management/App.js.map +1 -0
- package/dist/apps/management/Billing.d.ts.map +1 -0
- package/dist/apps/management/Billing.js.map +1 -0
- package/dist/apps/management/index.d.ts +3 -0
- package/dist/apps/management/index.d.ts.map +1 -0
- package/dist/apps/management/index.js +3 -0
- package/dist/apps/management/index.js.map +1 -0
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -0
- package/dist/apps/{platform → management}/routes/api-keys.js +1 -1
- package/dist/apps/management/routes/api-keys.js.map +1 -0
- package/dist/apps/{platform → management}/routes/billing.d.ts.map +1 -1
- package/dist/apps/management/routes/billing.js.map +1 -0
- package/dist/apps/{platform → management}/routes/invitations.d.ts +1 -1
- package/dist/apps/management/routes/invitations.d.ts.map +1 -0
- package/dist/apps/{platform → management}/routes/invitations.js +1 -1
- package/dist/apps/management/routes/invitations.js.map +1 -0
- package/dist/apps/{platform → management}/routes/me.d.ts +17 -17
- package/dist/apps/management/routes/me.d.ts.map +1 -0
- package/dist/apps/management/routes/me.js.map +1 -0
- package/dist/apps/management/routes/members.d.ts.map +1 -0
- package/dist/apps/management/routes/members.js.map +1 -0
- package/dist/apps/management/routes/orgs.d.ts.map +1 -0
- package/dist/apps/management/routes/orgs.js.map +1 -0
- package/dist/apps/{platform → management}/routes/projects.d.ts.map +1 -1
- package/dist/apps/management/routes/projects.js.map +1 -0
- package/dist/apps/{platform → management}/routes/scopes.d.ts +11 -11
- package/dist/apps/management/routes/scopes.d.ts.map +1 -0
- package/dist/apps/management/routes/scopes.js.map +1 -0
- package/dist/apps/management/routes/usage.d.ts.map +1 -0
- package/dist/apps/management/routes/usage.js.map +1 -0
- package/dist/apps/mcp.js +1 -1
- package/dist/apps/relay/App.js +1 -1
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/handlers/relay.d.ts +13 -10
- package/dist/handlers/relay.d.ts.map +1 -1
- package/dist/handlers/relay.js +46 -16
- package/dist/handlers/relay.js.map +1 -1
- package/dist/internal/Auth.js +1 -1
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/EdgeCache.js +1 -1
- package/dist/internal/EdgeCache.js.map +1 -1
- package/dist/internal/FundingRoutes.d.ts +748 -16
- package/dist/internal/FundingRoutes.d.ts.map +1 -1
- package/dist/internal/FundingRoutes.js +166 -31
- package/dist/internal/FundingRoutes.js.map +1 -1
- package/package.json +5 -5
- package/src/App.ts +10 -10
- package/src/Client.test-d.ts +4 -4
- package/src/apps/composition.test.ts +26 -13
- package/src/apps/data/App.ts +27 -4
- package/src/apps/data/FundingRouteProviders.test.ts +281 -0
- package/src/apps/data/FundingRouteProviders.ts +459 -0
- package/src/apps/data/index.ts +1 -0
- package/src/apps/data/routes/funding.test.ts +102 -2
- package/src/apps/data/routes/funding.ts +122 -8
- package/src/apps/data/routes/rpc.test.ts +33 -0
- package/src/apps/docs/App.ts +1 -1
- package/src/apps/index.ts +2 -2
- package/src/apps/{platform → management}/App.ts +14 -14
- package/src/apps/{platform → management}/index.ts +1 -1
- package/src/apps/{platform → management}/routes/api-keys.ts +1 -1
- package/src/apps/{platform → management}/routes/invitations.ts +1 -1
- package/src/apps/mcp.test.ts +1 -1
- package/src/apps/mcp.ts +1 -1
- package/src/apps/relay/App.test.ts +1 -1
- package/src/apps/relay/App.ts +1 -1
- package/src/handlers/relay.test-d.ts +8 -0
- package/src/handlers/relay.test.ts +2 -2
- package/src/handlers/relay.ts +62 -22
- package/src/internal/Auth.ts +1 -1
- package/src/internal/EdgeCache.ts +1 -1
- package/src/internal/FundingRoutes.test.ts +213 -0
- package/src/internal/FundingRoutes.ts +347 -32
- package/dist/apps/platform/App.js.map +0 -1
- package/dist/apps/platform/Billing.d.ts.map +0 -1
- package/dist/apps/platform/Billing.js.map +0 -1
- package/dist/apps/platform/index.d.ts +0 -3
- package/dist/apps/platform/index.d.ts.map +0 -1
- package/dist/apps/platform/index.js +0 -3
- package/dist/apps/platform/index.js.map +0 -1
- package/dist/apps/platform/routes/api-keys.d.ts.map +0 -1
- package/dist/apps/platform/routes/api-keys.js.map +0 -1
- package/dist/apps/platform/routes/billing.js.map +0 -1
- package/dist/apps/platform/routes/invitations.d.ts.map +0 -1
- package/dist/apps/platform/routes/invitations.js.map +0 -1
- package/dist/apps/platform/routes/me.d.ts.map +0 -1
- package/dist/apps/platform/routes/me.js.map +0 -1
- package/dist/apps/platform/routes/members.d.ts.map +0 -1
- package/dist/apps/platform/routes/members.js.map +0 -1
- package/dist/apps/platform/routes/orgs.d.ts.map +0 -1
- package/dist/apps/platform/routes/orgs.js.map +0 -1
- package/dist/apps/platform/routes/projects.js.map +0 -1
- package/dist/apps/platform/routes/scopes.d.ts.map +0 -1
- package/dist/apps/platform/routes/scopes.js.map +0 -1
- package/dist/apps/platform/routes/usage.d.ts.map +0 -1
- package/dist/apps/platform/routes/usage.js.map +0 -1
- /package/dist/apps/{platform → management}/Billing.d.ts +0 -0
- /package/dist/apps/{platform → management}/Billing.js +0 -0
- /package/dist/apps/{platform → management}/routes/api-keys.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/billing.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/billing.js +0 -0
- /package/dist/apps/{platform → management}/routes/me.js +0 -0
- /package/dist/apps/{platform → management}/routes/members.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/members.js +0 -0
- /package/dist/apps/{platform → management}/routes/orgs.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/orgs.js +0 -0
- /package/dist/apps/{platform → management}/routes/projects.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/projects.js +0 -0
- /package/dist/apps/{platform → management}/routes/scopes.js +0 -0
- /package/dist/apps/{platform → management}/routes/usage.d.ts +0 -0
- /package/dist/apps/{platform → management}/routes/usage.js +0 -0
- /package/src/apps/{platform → management}/Billing.test.ts +0 -0
- /package/src/apps/{platform → management}/Billing.ts +0 -0
- /package/src/apps/{platform → management}/routes/api-keys.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/billing.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/billing.ts +0 -0
- /package/src/apps/{platform → management}/routes/invitations.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/me.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/me.ts +0 -0
- /package/src/apps/{platform → management}/routes/members.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/members.ts +0 -0
- /package/src/apps/{platform → management}/routes/orgs.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/orgs.ts +0 -0
- /package/src/apps/{platform → management}/routes/projects.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/projects.ts +0 -0
- /package/src/apps/{platform → management}/routes/scopes.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/scopes.ts +0 -0
- /package/src/apps/{platform → management}/routes/usage.test.ts +0 -0
- /package/src/apps/{platform → management}/routes/usage.ts +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
const defaultAcrossBaseUrl = 'https://app.across.to/api';
|
|
2
|
+
const defaultRelayBaseUrl = 'https://api.relay.link';
|
|
3
|
+
/** Creates the live funding route adapters configured for this deployment. */
|
|
4
|
+
export function createAdapters(options = {}) {
|
|
5
|
+
return {
|
|
6
|
+
...(options.across ? { across: across(options.across) } : {}),
|
|
7
|
+
...(options.relay ? { relay: relay(options.relay) } : {}),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/** Creates an Across quote adapter backed by `/suggested-fees`. */
|
|
11
|
+
export function across(options) {
|
|
12
|
+
const baseUrl = normalizeBaseUrl(options.baseUrl ?? defaultAcrossBaseUrl);
|
|
13
|
+
const fetcher = options.fetch ?? globalThis.fetch;
|
|
14
|
+
const now = options.now ?? (() => new Date());
|
|
15
|
+
return {
|
|
16
|
+
async probeQuote({ route }, signal) {
|
|
17
|
+
const sourceChainId = providerChainId(route.sourceChain, 'across');
|
|
18
|
+
const destinationChainId = eip155ChainId(route.destinationChain);
|
|
19
|
+
const url = new URL(`${baseUrl}/suggested-fees`);
|
|
20
|
+
url.search = new URLSearchParams({
|
|
21
|
+
allowUnmatchedDecimals: 'true',
|
|
22
|
+
amount: route.sourceAmount.amount,
|
|
23
|
+
destinationChainId,
|
|
24
|
+
inputToken: route.sourceToken.address,
|
|
25
|
+
integratorId: options.integratorId,
|
|
26
|
+
originChainId: sourceChainId,
|
|
27
|
+
outputToken: route.destinationToken.address,
|
|
28
|
+
}).toString();
|
|
29
|
+
try {
|
|
30
|
+
const body = await requestJson(url, {
|
|
31
|
+
fetcher,
|
|
32
|
+
headers: { Authorization: `Bearer ${options.apiKey}` },
|
|
33
|
+
signal,
|
|
34
|
+
});
|
|
35
|
+
return formatAcrossResult(route, body, now());
|
|
36
|
+
}
|
|
37
|
+
catch (cause) {
|
|
38
|
+
const unavailable = providerUnavailable(cause, ['AMOUNT_TOO_HIGH', 'AMOUNT_TOO_LOW']);
|
|
39
|
+
if (!unavailable)
|
|
40
|
+
throw cause;
|
|
41
|
+
return unavailableResult({
|
|
42
|
+
detail: 'across:suggested-fees',
|
|
43
|
+
message: unavailable,
|
|
44
|
+
now: now(),
|
|
45
|
+
source: 'providerLimit',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Creates a Relay quote adapter backed by `/chains/liquidity` and `/quote/v2`. */
|
|
52
|
+
export function relay(options) {
|
|
53
|
+
const baseUrl = normalizeBaseUrl(options.baseUrl ?? defaultRelayBaseUrl);
|
|
54
|
+
const fetcher = options.fetch ?? globalThis.fetch;
|
|
55
|
+
const now = options.now ?? (() => new Date());
|
|
56
|
+
return {
|
|
57
|
+
async probeQuote({ route }, signal) {
|
|
58
|
+
const originChainId = providerChainId(route.sourceChain, 'relay');
|
|
59
|
+
const destinationChainId = eip155ChainId(route.destinationChain);
|
|
60
|
+
const headers = relayHeaders(options.apiKey);
|
|
61
|
+
try {
|
|
62
|
+
const quote = await requestJson(new URL(`${baseUrl}/quote/v2`), {
|
|
63
|
+
body: {
|
|
64
|
+
amount: route.sourceAmount.amount,
|
|
65
|
+
destinationChainId: Number(destinationChainId),
|
|
66
|
+
destinationCurrency: route.destinationToken.address,
|
|
67
|
+
originChainId: Number(originChainId),
|
|
68
|
+
originCurrency: route.sourceToken.address,
|
|
69
|
+
recipient: options.recipientAddress ?? options.userAddress,
|
|
70
|
+
tradeType: 'EXACT_INPUT',
|
|
71
|
+
user: options.userAddress,
|
|
72
|
+
},
|
|
73
|
+
fetcher,
|
|
74
|
+
headers,
|
|
75
|
+
method: 'POST',
|
|
76
|
+
signal,
|
|
77
|
+
});
|
|
78
|
+
const liquidityUrl = new URL(`${baseUrl}/chains/liquidity`);
|
|
79
|
+
liquidityUrl.searchParams.set('chainId', destinationChainId);
|
|
80
|
+
const liquidity = await requestJson(liquidityUrl, { fetcher, headers, signal }).catch(() => undefined);
|
|
81
|
+
return formatRelayResult(route, quote, liquidity, now());
|
|
82
|
+
}
|
|
83
|
+
catch (cause) {
|
|
84
|
+
const unavailable = providerUnavailable(cause, [
|
|
85
|
+
'NO_QUOTES',
|
|
86
|
+
'NO_ROUTE',
|
|
87
|
+
'UNSUPPORTED_ROUTE',
|
|
88
|
+
]);
|
|
89
|
+
if (!unavailable)
|
|
90
|
+
throw cause;
|
|
91
|
+
return unavailableResult({
|
|
92
|
+
detail: 'relay:quote-v2',
|
|
93
|
+
message: unavailable,
|
|
94
|
+
now: now(),
|
|
95
|
+
source: 'providerQuote',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function formatAcrossResult(route, body, now) {
|
|
102
|
+
const response = record(body);
|
|
103
|
+
const timestamp = integerString(response['timestamp']);
|
|
104
|
+
const sampledAt = timestamp ? isoFromUnixSeconds(timestamp) : now.toISOString();
|
|
105
|
+
const limits = acrossLimits(response['limits']);
|
|
106
|
+
const amountStatus = statusFromLimits(route.sourceAmount.amount, limits);
|
|
107
|
+
const status = response['isAmountTooLow'] === true ? 'unavailable' : amountStatus.status;
|
|
108
|
+
const tier = response['isAmountTooLow'] === true ? 'unavailable' : amountStatus.tier;
|
|
109
|
+
const outputAmount = decimalString(response['outputAmount']);
|
|
110
|
+
return {
|
|
111
|
+
expiresAt: timestamp ? isoFromUnixSeconds((BigInt(timestamp) + 600n).toString()) : null,
|
|
112
|
+
limits,
|
|
113
|
+
outputAmount,
|
|
114
|
+
outputAmountFormatted: outputAmount
|
|
115
|
+
? decimalFromBaseUnits(outputAmount, route.destinationToken.decimals)
|
|
116
|
+
: null,
|
|
117
|
+
quality: {
|
|
118
|
+
availableVolumeUsd: stablecoinUsdCapacity(route, limits?.maxSourceAmount),
|
|
119
|
+
estimatedSeconds: nonnegativeInteger(response['estimatedFillTimeSec']),
|
|
120
|
+
feeBps: scaledPctToBps(nestedString(response['totalRelayFee'], 'pct') ?? decimalString(response['relayFeePct'])),
|
|
121
|
+
historicalVolumeUsd24h: null,
|
|
122
|
+
instantVolumeUsd: stablecoinUsdCapacity(route, limits?.instantSourceAmount),
|
|
123
|
+
liquiditySource: 'providerLimit',
|
|
124
|
+
score: scoreFor(tier),
|
|
125
|
+
sourceDetail: 'across:suggested-fees',
|
|
126
|
+
tier,
|
|
127
|
+
},
|
|
128
|
+
sampledAt,
|
|
129
|
+
status,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function formatRelayResult(route, quote, liquidity, now) {
|
|
133
|
+
const details = record(record(quote)['details']);
|
|
134
|
+
const currencyOut = record(details['currencyOut']);
|
|
135
|
+
const outputAmount = decimalString(currencyOut['amount']);
|
|
136
|
+
const liquidityRow = relayLiquidity(liquidity, route);
|
|
137
|
+
const destinationLiquidity = decimalString(liquidityRow?.['balance']);
|
|
138
|
+
const availableVolumeUsd = decimalString(liquidityRow?.['amountUsd']) ?? null;
|
|
139
|
+
const liquidityStatus = relayLiquidityStatus({ destinationLiquidity, outputAmount });
|
|
140
|
+
return {
|
|
141
|
+
limits: null,
|
|
142
|
+
minimumOutputAmount: decimalString(currencyOut['minimumAmount']),
|
|
143
|
+
outputAmount,
|
|
144
|
+
outputAmountFormatted: outputAmount
|
|
145
|
+
? decimalFromBaseUnits(outputAmount, route.destinationToken.decimals)
|
|
146
|
+
: null,
|
|
147
|
+
quality: {
|
|
148
|
+
availableVolumeUsd: availableVolumeUsd,
|
|
149
|
+
estimatedSeconds: nonnegativeInteger(details['timeEstimate']),
|
|
150
|
+
feeBps: null,
|
|
151
|
+
historicalVolumeUsd24h: null,
|
|
152
|
+
instantVolumeUsd: availableVolumeUsd,
|
|
153
|
+
liquiditySource: 'providerQuote',
|
|
154
|
+
score: scoreFor(liquidityStatus.tier),
|
|
155
|
+
sourceDetail: 'relay:quote-v2',
|
|
156
|
+
tier: liquidityStatus.tier,
|
|
157
|
+
},
|
|
158
|
+
sampledAt: now.toISOString(),
|
|
159
|
+
status: liquidityStatus.status,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function relayLiquidityStatus(options) {
|
|
163
|
+
if (!options.outputAmount)
|
|
164
|
+
return { status: 'unknown', tier: 'unknown' };
|
|
165
|
+
if (!options.destinationLiquidity)
|
|
166
|
+
return { status: 'unknown', tier: 'unknown' };
|
|
167
|
+
if (compareIntegerStrings(options.destinationLiquidity, options.outputAmount) < 0)
|
|
168
|
+
return { status: 'thin', tier: 'thin' };
|
|
169
|
+
return { status: 'available', tier: 'liquid' };
|
|
170
|
+
}
|
|
171
|
+
function unavailableResult(options) {
|
|
172
|
+
return {
|
|
173
|
+
quality: {
|
|
174
|
+
availableVolumeUsd: null,
|
|
175
|
+
estimatedSeconds: null,
|
|
176
|
+
feeBps: null,
|
|
177
|
+
historicalVolumeUsd24h: null,
|
|
178
|
+
instantVolumeUsd: null,
|
|
179
|
+
liquiditySource: options.source,
|
|
180
|
+
score: 0,
|
|
181
|
+
sourceDetail: `${options.detail}:${options.message}`,
|
|
182
|
+
tier: 'unavailable',
|
|
183
|
+
},
|
|
184
|
+
sampledAt: options.now.toISOString(),
|
|
185
|
+
status: 'unavailable',
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function acrossLimits(input) {
|
|
189
|
+
const limits = record(input);
|
|
190
|
+
const minSourceAmount = decimalString(limits['minDeposit']);
|
|
191
|
+
const maxSourceAmount = decimalString(limits['maxDeposit']);
|
|
192
|
+
const instantSourceAmount = decimalString(limits['maxDepositInstant']) ?? decimalString(limits['recommendedDepositInstant']);
|
|
193
|
+
return minSourceAmount || maxSourceAmount || instantSourceAmount
|
|
194
|
+
? { instantSourceAmount, maxSourceAmount, minSourceAmount }
|
|
195
|
+
: null;
|
|
196
|
+
}
|
|
197
|
+
function statusFromLimits(amount, limits) {
|
|
198
|
+
if (!limits)
|
|
199
|
+
return { status: 'available', tier: 'liquid' };
|
|
200
|
+
if (limits.minSourceAmount && compareIntegerStrings(amount, limits.minSourceAmount) < 0)
|
|
201
|
+
return { status: 'unavailable', tier: 'unavailable' };
|
|
202
|
+
if (limits.maxSourceAmount && compareIntegerStrings(amount, limits.maxSourceAmount) > 0)
|
|
203
|
+
return { status: 'unavailable', tier: 'unavailable' };
|
|
204
|
+
if (limits.instantSourceAmount && compareIntegerStrings(amount, limits.instantSourceAmount) > 0)
|
|
205
|
+
return { status: 'thin', tier: 'thin' };
|
|
206
|
+
return { status: 'available', tier: 'liquid' };
|
|
207
|
+
}
|
|
208
|
+
function relayLiquidity(input, route) {
|
|
209
|
+
const response = record(input);
|
|
210
|
+
const rows = Array.isArray(response['liquidity']) ? response['liquidity'] : [];
|
|
211
|
+
const destinationChainId = eip155ChainId(route.destinationChain);
|
|
212
|
+
return rows.map(record).find((row) => {
|
|
213
|
+
const rowChainId = integerString(row['chainId']);
|
|
214
|
+
const rowAddress = typeof row['address'] === 'string' ? row['address'].toLowerCase() : undefined;
|
|
215
|
+
return (rowChainId === destinationChainId &&
|
|
216
|
+
rowAddress === route.destinationToken.address.toLowerCase());
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async function requestJson(url, options) {
|
|
220
|
+
const headers = { accept: 'application/json', ...options.headers };
|
|
221
|
+
const init = {
|
|
222
|
+
headers: options.body === undefined ? headers : { ...headers, 'content-type': 'application/json' },
|
|
223
|
+
method: options.method ?? 'GET',
|
|
224
|
+
signal: options.signal,
|
|
225
|
+
};
|
|
226
|
+
if (options.body !== undefined)
|
|
227
|
+
init.body = JSON.stringify(options.body);
|
|
228
|
+
const response = await options.fetcher(url, init);
|
|
229
|
+
const text = await response.text();
|
|
230
|
+
const body = parseJson(text);
|
|
231
|
+
if (!response.ok)
|
|
232
|
+
throw new ProviderResponseError(response.status, body);
|
|
233
|
+
return body;
|
|
234
|
+
}
|
|
235
|
+
function relayHeaders(apiKey) {
|
|
236
|
+
return apiKey ? { 'x-api-key': apiKey } : undefined;
|
|
237
|
+
}
|
|
238
|
+
function providerUnavailable(cause, codes) {
|
|
239
|
+
if (!(cause instanceof ProviderResponseError) || cause.status < 400 || cause.status >= 500)
|
|
240
|
+
return undefined;
|
|
241
|
+
const body = record(cause.body);
|
|
242
|
+
const code = stringValue(body['code']) ?? stringValue(body['errorCode']);
|
|
243
|
+
if (code && codes.includes(code))
|
|
244
|
+
return code;
|
|
245
|
+
return undefined;
|
|
246
|
+
}
|
|
247
|
+
class ProviderResponseError extends Error {
|
|
248
|
+
status;
|
|
249
|
+
body;
|
|
250
|
+
name = 'FundingRouteProviders.ProviderResponseError';
|
|
251
|
+
constructor(status, body) {
|
|
252
|
+
super(`Provider request failed with status ${status}`);
|
|
253
|
+
this.status = status;
|
|
254
|
+
this.body = body;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function providerChainId(routeChain, provider) {
|
|
258
|
+
const providerIds = routeChain.providerIds;
|
|
259
|
+
const id = providerIds?.[provider];
|
|
260
|
+
if (id && /^\d+$/.test(id))
|
|
261
|
+
return id;
|
|
262
|
+
return eip155ChainId(routeChain);
|
|
263
|
+
}
|
|
264
|
+
function eip155ChainId(chain) {
|
|
265
|
+
if (chain.kind !== 'evm')
|
|
266
|
+
throw new UnsupportedProviderRouteError();
|
|
267
|
+
const match = /^eip155:(\d+)$/.exec(chain.id);
|
|
268
|
+
if (!match?.[1])
|
|
269
|
+
throw new UnsupportedProviderRouteError();
|
|
270
|
+
return match[1];
|
|
271
|
+
}
|
|
272
|
+
class UnsupportedProviderRouteError extends Error {
|
|
273
|
+
name = 'FundingRouteProviders.UnsupportedProviderRouteError';
|
|
274
|
+
}
|
|
275
|
+
function normalizeBaseUrl(input) {
|
|
276
|
+
return input.replace(/\/+$/, '');
|
|
277
|
+
}
|
|
278
|
+
function parseJson(input) {
|
|
279
|
+
if (!input)
|
|
280
|
+
return null;
|
|
281
|
+
try {
|
|
282
|
+
return JSON.parse(input);
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
return input;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function record(input) {
|
|
289
|
+
return input && typeof input === 'object' && !Array.isArray(input)
|
|
290
|
+
? input
|
|
291
|
+
: {};
|
|
292
|
+
}
|
|
293
|
+
function stringValue(input) {
|
|
294
|
+
return typeof input === 'string' && input.length > 0 ? input : undefined;
|
|
295
|
+
}
|
|
296
|
+
function decimalString(input) {
|
|
297
|
+
if (typeof input === 'string' && /^\d+(\.\d+)?$/.test(input))
|
|
298
|
+
return input;
|
|
299
|
+
if (typeof input === 'number' && Number.isFinite(input) && input >= 0)
|
|
300
|
+
return String(input);
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
function integerString(input) {
|
|
304
|
+
if (typeof input === 'string' && /^\d+$/.test(input))
|
|
305
|
+
return input;
|
|
306
|
+
if (typeof input === 'number' && Number.isSafeInteger(input) && input >= 0)
|
|
307
|
+
return String(input);
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
310
|
+
function nestedString(input, key) {
|
|
311
|
+
return decimalString(record(input)[key]);
|
|
312
|
+
}
|
|
313
|
+
function nonnegativeInteger(input) {
|
|
314
|
+
if (typeof input === 'number' && Number.isSafeInteger(input) && input >= 0)
|
|
315
|
+
return input;
|
|
316
|
+
if (typeof input === 'string' && /^\d+$/.test(input))
|
|
317
|
+
return Number(input);
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
function decimalFromBaseUnits(baseUnits, decimals) {
|
|
321
|
+
const padded = baseUnits.padStart(decimals + 1, '0');
|
|
322
|
+
const whole = decimals === 0 ? padded : padded.slice(0, -decimals);
|
|
323
|
+
const fraction = decimals === 0 ? '' : padded.slice(-decimals).replace(/0+$/, '');
|
|
324
|
+
return fraction ? `${whole}.${fraction}` : whole;
|
|
325
|
+
}
|
|
326
|
+
function compareIntegerStrings(left, right) {
|
|
327
|
+
return BigInt(left) === BigInt(right) ? 0 : BigInt(left) > BigInt(right) ? 1 : -1;
|
|
328
|
+
}
|
|
329
|
+
function isoFromUnixSeconds(input) {
|
|
330
|
+
return new Date(Number(input) * 1_000).toISOString();
|
|
331
|
+
}
|
|
332
|
+
function stablecoinUsdCapacity(route, baseUnits) {
|
|
333
|
+
if (!baseUnits || !isDollarStablecoin(route.sourceToken.symbol))
|
|
334
|
+
return null;
|
|
335
|
+
return decimalFromBaseUnits(baseUnits, route.sourceToken.decimals);
|
|
336
|
+
}
|
|
337
|
+
function isDollarStablecoin(symbol) {
|
|
338
|
+
return ['DAI', 'FRXUSD', 'PYUSD', 'USDC', 'USDC.E', 'USDT', 'USDT0'].includes(symbol.toUpperCase());
|
|
339
|
+
}
|
|
340
|
+
function scaledPctToBps(input) {
|
|
341
|
+
if (!input || !/^\d+$/.test(input))
|
|
342
|
+
return null;
|
|
343
|
+
const denominator = 1000000000000000000n;
|
|
344
|
+
return Number((BigInt(input) * 10000n + denominator / 2n) / denominator);
|
|
345
|
+
}
|
|
346
|
+
function scoreFor(tier) {
|
|
347
|
+
if (tier === 'liquid')
|
|
348
|
+
return 90;
|
|
349
|
+
if (tier === 'thin')
|
|
350
|
+
return 65;
|
|
351
|
+
if (tier === 'unavailable')
|
|
352
|
+
return 0;
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=FundingRouteProviders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FundingRoute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KAAK,CAAC,GAAG,MAAO,GAAG,WAAW,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC,CAAA;AAC3E,CAAC;AAED,SAAS,QAAQ,CAAC,IAA+B;IAC/C,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAA;IAChC,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,EAAE,CAAA;IAC9B,IAAI,IAAI,KAAK,aAAa;QAAE,OAAO,CAAC,CAAA;IACpC,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/apps/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/apps/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAA"}
|
package/dist/apps/data/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apps/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apps/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAA"}
|
|
@@ -86,31 +86,9 @@ export declare namespace schema {
|
|
|
86
86
|
export declare function addresses(): import("hono/hono-base").HonoBase<App.Environment, {
|
|
87
87
|
"/v1/addresses/:address/balances": {
|
|
88
88
|
$get: {
|
|
89
|
-
output:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
formatted: string;
|
|
93
|
-
id: string;
|
|
94
|
-
feeEligible?: boolean | undefined;
|
|
95
|
-
token: {
|
|
96
|
-
address: `0x${string}`;
|
|
97
|
-
currency: string;
|
|
98
|
-
decimals: number;
|
|
99
|
-
id: string;
|
|
100
|
-
logoUri?: string | undefined;
|
|
101
|
-
name: string;
|
|
102
|
-
symbol: string;
|
|
103
|
-
verified: boolean;
|
|
104
|
-
};
|
|
105
|
-
}[];
|
|
106
|
-
meta?: {
|
|
107
|
-
totalCountCapped: boolean;
|
|
108
|
-
totalCount: number;
|
|
109
|
-
} | undefined;
|
|
110
|
-
nextCursor: string | null;
|
|
111
|
-
};
|
|
112
|
-
outputFormat: "json";
|
|
113
|
-
status: 200;
|
|
89
|
+
output: null;
|
|
90
|
+
outputFormat: "body";
|
|
91
|
+
status: 402;
|
|
114
92
|
input: {
|
|
115
93
|
param: {
|
|
116
94
|
address: `0x${string}`;
|
|
@@ -157,14 +135,14 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
157
135
|
} | {
|
|
158
136
|
output: {
|
|
159
137
|
error: {
|
|
160
|
-
code: "
|
|
138
|
+
code: "api_key_invalid" | "api_key_missing";
|
|
161
139
|
details?: readonly Response.error.Detail[] | undefined;
|
|
162
140
|
message: string;
|
|
163
141
|
};
|
|
164
142
|
requestId: string;
|
|
165
143
|
};
|
|
166
144
|
outputFormat: "json";
|
|
167
|
-
status:
|
|
145
|
+
status: 401;
|
|
168
146
|
input: {
|
|
169
147
|
param: {
|
|
170
148
|
address: `0x${string}`;
|
|
@@ -184,14 +162,14 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
184
162
|
} | {
|
|
185
163
|
output: {
|
|
186
164
|
error: {
|
|
187
|
-
code: "
|
|
165
|
+
code: "api_key_forbidden";
|
|
188
166
|
details?: readonly Response.error.Detail[] | undefined;
|
|
189
167
|
message: string;
|
|
190
168
|
};
|
|
191
169
|
requestId: string;
|
|
192
170
|
};
|
|
193
171
|
outputFormat: "json";
|
|
194
|
-
status:
|
|
172
|
+
status: 403;
|
|
195
173
|
input: {
|
|
196
174
|
param: {
|
|
197
175
|
address: `0x${string}`;
|
|
@@ -211,14 +189,14 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
211
189
|
} | {
|
|
212
190
|
output: {
|
|
213
191
|
error: {
|
|
214
|
-
code: "
|
|
192
|
+
code: "payment_required" | "rate_limit_exceeded";
|
|
215
193
|
details?: readonly Response.error.Detail[] | undefined;
|
|
216
194
|
message: string;
|
|
217
195
|
};
|
|
218
196
|
requestId: string;
|
|
219
197
|
};
|
|
220
198
|
outputFormat: "json";
|
|
221
|
-
status:
|
|
199
|
+
status: 429;
|
|
222
200
|
input: {
|
|
223
201
|
param: {
|
|
224
202
|
address: `0x${string}`;
|
|
@@ -236,9 +214,16 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
236
214
|
} | undefined;
|
|
237
215
|
};
|
|
238
216
|
} | {
|
|
239
|
-
output:
|
|
240
|
-
|
|
241
|
-
|
|
217
|
+
output: {
|
|
218
|
+
error: {
|
|
219
|
+
code: "query_invalid";
|
|
220
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
221
|
+
message: string;
|
|
222
|
+
};
|
|
223
|
+
requestId: string;
|
|
224
|
+
};
|
|
225
|
+
outputFormat: "json";
|
|
226
|
+
status: 400;
|
|
242
227
|
input: {
|
|
243
228
|
param: {
|
|
244
229
|
address: `0x${string}`;
|
|
@@ -258,14 +243,14 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
258
243
|
} | {
|
|
259
244
|
output: {
|
|
260
245
|
error: {
|
|
261
|
-
code: "
|
|
246
|
+
code: "upstream_error";
|
|
262
247
|
details?: readonly Response.error.Detail[] | undefined;
|
|
263
248
|
message: string;
|
|
264
249
|
};
|
|
265
250
|
requestId: string;
|
|
266
251
|
};
|
|
267
252
|
outputFormat: "json";
|
|
268
|
-
status:
|
|
253
|
+
status: 502;
|
|
269
254
|
input: {
|
|
270
255
|
param: {
|
|
271
256
|
address: `0x${string}`;
|
|
@@ -285,14 +270,14 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
285
270
|
} | {
|
|
286
271
|
output: {
|
|
287
272
|
error: {
|
|
288
|
-
code: "
|
|
273
|
+
code: "address_invalid";
|
|
289
274
|
details?: readonly Response.error.Detail[] | undefined;
|
|
290
275
|
message: string;
|
|
291
276
|
};
|
|
292
277
|
requestId: string;
|
|
293
278
|
};
|
|
294
279
|
outputFormat: "json";
|
|
295
|
-
status:
|
|
280
|
+
status: 400;
|
|
296
281
|
input: {
|
|
297
282
|
param: {
|
|
298
283
|
address: `0x${string}`;
|
|
@@ -311,15 +296,30 @@ export declare function addresses(): import("hono/hono-base").HonoBase<App.Envir
|
|
|
311
296
|
};
|
|
312
297
|
} | {
|
|
313
298
|
output: {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
299
|
+
data: {
|
|
300
|
+
amount: string;
|
|
301
|
+
formatted: string;
|
|
302
|
+
id: string;
|
|
303
|
+
feeEligible?: boolean | undefined;
|
|
304
|
+
token: {
|
|
305
|
+
address: `0x${string}`;
|
|
306
|
+
currency: string;
|
|
307
|
+
decimals: number;
|
|
308
|
+
id: string;
|
|
309
|
+
logoUri?: string | undefined;
|
|
310
|
+
name: string;
|
|
311
|
+
symbol: string;
|
|
312
|
+
verified: boolean;
|
|
313
|
+
};
|
|
314
|
+
}[];
|
|
315
|
+
meta?: {
|
|
316
|
+
totalCountCapped: boolean;
|
|
317
|
+
totalCount: number;
|
|
318
|
+
} | undefined;
|
|
319
|
+
nextCursor: string | null;
|
|
320
320
|
};
|
|
321
321
|
outputFormat: "json";
|
|
322
|
-
status:
|
|
322
|
+
status: 200;
|
|
323
323
|
input: {
|
|
324
324
|
param: {
|
|
325
325
|
address: `0x${string}`;
|