tapimo 0.7.0 → 0.7.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.
- package/dist/ApiKeys.d.ts +24 -7
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +17 -5
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +12104 -7861
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +191 -128
- package/dist/App.js.map +1 -1
- package/dist/Assets.d.ts +10 -0
- package/dist/Assets.d.ts.map +1 -1
- package/dist/Assets.js +17 -4
- package/dist/Assets.js.map +1 -1
- package/dist/Scope.d.ts +19 -8
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +25 -9
- package/dist/Scope.js.map +1 -1
- package/dist/Webhooks.d.ts +1 -1
- package/dist/admin/App.d.ts +601 -20
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/App.js +12 -2
- package/dist/admin/App.js.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +94 -11
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.js +141 -32
- package/dist/admin/apps/api-keys.js.map +1 -1
- package/dist/admin/apps/earn-vaults.d.ts +1069 -0
- package/dist/admin/apps/earn-vaults.d.ts.map +1 -0
- package/dist/admin/apps/earn-vaults.js +409 -0
- package/dist/admin/apps/earn-vaults.js.map +1 -0
- package/dist/admin/apps/verified-tokens.d.ts +166 -166
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.d.ts.map +1 -1
- package/dist/admin/ui.generated.js +151 -95
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +2 -0
- package/dist/analytics/Analytics.d.ts.map +1 -1
- package/dist/analytics/Analytics.js +18 -2
- package/dist/analytics/Analytics.js.map +1 -1
- package/dist/analytics/tables/requestEvents.d.ts +22 -1
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -1
- package/dist/analytics/tables/requestEvents.js +59 -39
- package/dist/analytics/tables/requestEvents.js.map +1 -1
- package/dist/apps/Zones.d.ts +8335 -0
- package/dist/apps/Zones.d.ts.map +1 -0
- package/dist/apps/Zones.js +38 -0
- package/dist/apps/Zones.js.map +1 -0
- package/dist/apps/data/App.d.ts +14377 -10165
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +91 -19
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/FxOracle.d.ts +1 -1
- package/dist/apps/data/FxOracle.d.ts.map +1 -1
- package/dist/apps/data/index.d.ts +0 -1
- package/dist/apps/data/index.d.ts.map +1 -1
- package/dist/apps/data/index.js +0 -1
- package/dist/apps/data/index.js.map +1 -1
- package/dist/apps/data/routes/activities.d.ts +32 -32
- package/dist/apps/data/routes/activities.d.ts.map +1 -1
- package/dist/apps/data/routes/activities.js +130 -65
- package/dist/apps/data/routes/activities.js.map +1 -1
- package/dist/apps/data/routes/addresses.d.ts +312 -312
- package/dist/apps/data/routes/balances.d.ts +18 -18
- package/dist/apps/data/routes/balances.js +5 -5
- package/dist/apps/data/routes/balances.js.map +1 -1
- package/dist/apps/data/routes/coingecko.d.ts +176 -176
- package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
- package/dist/apps/data/routes/coingecko.js +62 -35
- package/dist/apps/data/routes/coingecko.js.map +1 -1
- package/dist/apps/data/routes/earn.d.ts +2144 -0
- package/dist/apps/data/routes/earn.d.ts.map +1 -0
- package/dist/apps/data/routes/earn.js +947 -0
- package/dist/apps/data/routes/earn.js.map +1 -0
- package/dist/apps/data/routes/exchanges.d.ts +1231 -324
- package/dist/apps/data/routes/exchanges.d.ts.map +1 -1
- package/dist/apps/data/routes/exchanges.js +656 -193
- package/dist/apps/data/routes/exchanges.js.map +1 -1
- package/dist/apps/data/routes/fee-amm.d.ts.map +1 -1
- package/dist/apps/data/routes/fee-amm.js +59 -8
- package/dist/apps/data/routes/fee-amm.js.map +1 -1
- package/dist/apps/data/routes/funding.d.ts +4092 -387
- package/dist/apps/data/routes/funding.d.ts.map +1 -1
- package/dist/apps/data/routes/funding.js +1403 -256
- 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/indexer.d.ts.map +1 -1
- package/dist/apps/data/routes/indexer.js +19 -2
- package/dist/apps/data/routes/indexer.js.map +1 -1
- package/dist/apps/data/routes/receipts.d.ts +265 -265
- package/dist/apps/data/routes/receipts.d.ts.map +1 -1
- package/dist/apps/data/routes/receipts.js +11 -11
- package/dist/apps/data/routes/receipts.js.map +1 -1
- package/dist/apps/data/routes/rpc.d.ts +5 -5
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +211 -22
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +36 -36
- package/dist/apps/data/routes/tokenlist.d.ts.map +1 -1
- package/dist/apps/data/routes/tokenlist.js +49 -9
- package/dist/apps/data/routes/tokenlist.js.map +1 -1
- package/dist/apps/data/routes/tokens.d.ts +116 -88
- package/dist/apps/data/routes/tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/tokens.js +198 -91
- package/dist/apps/data/routes/tokens.js.map +1 -1
- package/dist/apps/data/routes/transactions.d.ts +55 -55
- package/dist/apps/data/routes/transactions.d.ts.map +1 -1
- package/dist/apps/data/routes/transactions.js +78 -39
- package/dist/apps/data/routes/transactions.js.map +1 -1
- package/dist/apps/data/routes/transfers.d.ts +78 -29
- package/dist/apps/data/routes/transfers.d.ts.map +1 -1
- package/dist/apps/data/routes/transfers.js +165 -67
- package/dist/apps/data/routes/transfers.js.map +1 -1
- package/dist/apps/data/routes/valuation.d.ts +10 -10
- package/dist/apps/data/routes/valuation.js +2 -2
- package/dist/apps/data/routes/valuation.js.map +1 -1
- package/dist/apps/data/routes/verified-tokens.d.ts.map +1 -1
- package/dist/apps/data/routes/verified-tokens.js +34 -9
- package/dist/apps/data/routes/verified-tokens.js.map +1 -1
- package/dist/apps/data/routes/webhooks.d.ts +5 -3
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +175 -65
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/data/routes/zones.d.ts +281 -0
- package/dist/apps/data/routes/zones.d.ts.map +1 -0
- package/dist/apps/data/routes/zones.js +252 -0
- package/dist/apps/data/routes/zones.js.map +1 -0
- package/dist/apps/docs/reference.js +6 -5
- package/dist/apps/docs/reference.js.map +1 -1
- package/dist/apps/index.d.ts +2 -1
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +2 -1
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/management/App.d.ts +670 -670
- package/dist/apps/management/Billing.d.ts +8 -0
- package/dist/apps/management/Billing.d.ts.map +1 -1
- package/dist/apps/management/Billing.js +12 -0
- package/dist/apps/management/Billing.js.map +1 -1
- package/dist/apps/management/Error.d.ts +12 -0
- package/dist/apps/management/Error.d.ts.map +1 -0
- package/dist/apps/management/Error.js +10 -0
- package/dist/apps/management/Error.js.map +1 -0
- package/dist/apps/management/routes/api-keys.d.ts +5 -5
- package/dist/apps/management/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/management/routes/api-keys.js +2 -8
- package/dist/apps/management/routes/api-keys.js.map +1 -1
- package/dist/apps/management/routes/billing.d.ts +119 -119
- package/dist/apps/management/routes/faucet.d.ts +35 -35
- package/dist/apps/management/routes/invitations.d.ts +62 -62
- package/dist/apps/management/routes/invitations.d.ts.map +1 -1
- package/dist/apps/management/routes/invitations.js +4 -10
- package/dist/apps/management/routes/invitations.js.map +1 -1
- package/dist/apps/management/routes/invite-links.d.ts +30 -30
- package/dist/apps/management/routes/me.d.ts +6 -6
- package/dist/apps/management/routes/members.d.ts +78 -78
- package/dist/apps/management/routes/orgs.d.ts +48 -48
- package/dist/apps/management/routes/orgs.d.ts.map +1 -1
- package/dist/apps/management/routes/orgs.js +2 -8
- package/dist/apps/management/routes/orgs.js.map +1 -1
- package/dist/apps/management/routes/projects.d.ts +9 -9
- package/dist/apps/management/routes/scopes.js +2 -2
- package/dist/apps/management/routes/scopes.js.map +1 -1
- package/dist/apps/management/routes/usage.d.ts +80 -80
- package/dist/apps/management/routes/verified-token-requests.d.ts +36 -36
- package/dist/apps/management/routes/webhooks.d.ts +50 -50
- package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/management/routes/webhooks.js +15 -3
- package/dist/apps/management/routes/webhooks.js.map +1 -1
- package/dist/apps/mpp/App.d.ts +55 -56
- package/dist/apps/mpp/App.d.ts.map +1 -1
- package/dist/apps/mpp/App.js +192 -27
- package/dist/apps/mpp/App.js.map +1 -1
- package/dist/apps/mpp/Mpp.d.ts +0 -20
- package/dist/apps/mpp/Mpp.d.ts.map +1 -1
- package/dist/apps/mpp/Mpp.js +0 -24
- package/dist/apps/mpp/Mpp.js.map +1 -1
- package/dist/apps/mpp/internal/Adapter.d.ts +40 -0
- package/dist/apps/mpp/internal/Adapter.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Adapter.js +66 -0
- package/dist/apps/mpp/internal/Adapter.js.map +1 -0
- package/dist/apps/mpp/internal/Error.d.ts +4 -0
- package/dist/apps/mpp/internal/Error.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Error.js +41 -0
- package/dist/apps/mpp/internal/Error.js.map +1 -0
- package/dist/apps/mpp/internal/Idempotency.d.ts +33 -0
- package/dist/apps/mpp/internal/Idempotency.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Idempotency.js +28 -0
- package/dist/apps/mpp/internal/Idempotency.js.map +1 -0
- package/dist/apps/mpp/internal/Policy.d.ts +46 -0
- package/dist/apps/mpp/internal/Policy.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Policy.js +57 -0
- package/dist/apps/mpp/internal/Policy.js.map +1 -0
- package/dist/apps/mpp/internal/ScreenManager.d.ts +27 -0
- package/dist/apps/mpp/internal/ScreenManager.d.ts.map +1 -0
- package/dist/apps/mpp/internal/ScreenManager.js +18 -0
- package/dist/apps/mpp/internal/ScreenManager.js.map +1 -0
- package/dist/apps/mpp/internal/Screening.d.ts +35 -0
- package/dist/apps/mpp/internal/Screening.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Screening.js +20 -0
- package/dist/apps/mpp/internal/Screening.js.map +1 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts +36 -0
- package/dist/apps/mpp/internal/Sponsorship.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Sponsorship.js +103 -0
- package/dist/apps/mpp/internal/Sponsorship.js.map +1 -0
- package/dist/apps/mpp/internal/Utils.d.ts +7 -0
- package/dist/apps/mpp/internal/Utils.d.ts.map +1 -0
- package/dist/apps/mpp/internal/Utils.js +24 -0
- package/dist/apps/mpp/internal/Utils.js.map +1 -0
- package/dist/apps/relay/App.js +184 -24
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts +4 -0
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +16 -7
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/db/Db.d.ts +20 -0
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +342 -0
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +921 -1
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +269 -1
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/earnVaults.d.ts +68 -0
- package/dist/db/tables/earnVaults.d.ts.map +1 -0
- package/dist/db/tables/earnVaults.js +72 -0
- package/dist/db/tables/earnVaults.js.map +1 -0
- package/dist/db/tables/fundingCatalog.d.ts +56 -0
- package/dist/db/tables/fundingCatalog.d.ts.map +1 -0
- package/dist/db/tables/fundingCatalog.js +85 -0
- package/dist/db/tables/fundingCatalog.js.map +1 -0
- package/dist/db/tables/fundingDepositAddresses.d.ts +159 -0
- package/dist/db/tables/fundingDepositAddresses.d.ts.map +1 -0
- package/dist/db/tables/fundingDepositAddresses.js +206 -0
- package/dist/db/tables/fundingDepositAddresses.js.map +1 -0
- package/dist/db/tables/fundingDeposits.d.ts +115 -0
- package/dist/db/tables/fundingDeposits.d.ts.map +1 -0
- package/dist/db/tables/fundingDeposits.js +100 -0
- package/dist/db/tables/fundingDeposits.js.map +1 -0
- package/dist/db/tables/fundingIdempotency.d.ts +91 -0
- package/dist/db/tables/fundingIdempotency.d.ts.map +1 -0
- package/dist/db/tables/fundingIdempotency.js +103 -0
- package/dist/db/tables/fundingIdempotency.js.map +1 -0
- package/dist/db/tables/fundingTransferEvents.d.ts +12 -0
- package/dist/db/tables/fundingTransferEvents.d.ts.map +1 -0
- package/dist/db/tables/fundingTransferEvents.js +18 -0
- package/dist/db/tables/fundingTransferEvents.js.map +1 -0
- package/dist/db/tables/fundingTransferTransactions.d.ts +15 -0
- package/dist/db/tables/fundingTransferTransactions.d.ts.map +1 -0
- package/dist/db/tables/fundingTransferTransactions.js +27 -0
- package/dist/db/tables/fundingTransferTransactions.js.map +1 -0
- package/dist/db/tables/fundingTransfers.d.ts +82 -0
- package/dist/db/tables/fundingTransfers.d.ts.map +1 -0
- package/dist/db/tables/fundingTransfers.js +89 -0
- package/dist/db/tables/fundingTransfers.js.map +1 -0
- package/dist/db/tables/organizations.d.ts +8 -0
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +35 -0
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.d.ts +8 -0
- package/dist/db/tables/projects.d.ts.map +1 -1
- package/dist/db/tables/projects.js +16 -0
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts +13 -0
- package/dist/db/tables/requestUsage.d.ts.map +1 -1
- package/dist/db/tables/requestUsage.js +16 -0
- package/dist/db/tables/requestUsage.js.map +1 -1
- package/dist/db/tables/sponsoredTransactions.d.ts +4 -2
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +14 -4
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/users.d.ts +8 -0
- package/dist/db/tables/users.d.ts.map +1 -1
- package/dist/db/tables/users.js +16 -0
- package/dist/db/tables/users.js.map +1 -1
- package/dist/db/tables/verifiedTokens.d.ts +14 -7
- package/dist/db/tables/verifiedTokens.d.ts.map +1 -1
- package/dist/db/tables/verifiedTokens.js +9 -7
- package/dist/db/tables/verifiedTokens.js.map +1 -1
- package/dist/db/tables/webhookSubscriptions.d.ts +31 -1
- package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
- package/dist/db/tables/webhookSubscriptions.js +24 -3
- package/dist/db/tables/webhookSubscriptions.js.map +1 -1
- package/dist/handlers/relay.js +108 -108
- package/dist/handlers/relay.js.map +1 -1
- package/dist/internal/Auth.d.ts +26 -0
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +35 -2
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +16 -10
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/Cursor.js +1 -1
- package/dist/internal/Cursor.js.map +1 -1
- package/dist/internal/EarnRates.d.ts +89 -0
- package/dist/internal/EarnRates.d.ts.map +1 -0
- package/dist/internal/EarnRates.js +266 -0
- package/dist/internal/EarnRates.js.map +1 -0
- package/dist/internal/EarnVaults.d.ts +171 -0
- package/dist/internal/EarnVaults.d.ts.map +1 -0
- package/dist/internal/EarnVaults.js +547 -0
- package/dist/internal/EarnVaults.js.map +1 -0
- package/dist/internal/EdgeCache.d.ts +9 -2
- package/dist/internal/EdgeCache.d.ts.map +1 -1
- package/dist/internal/EdgeCache.js +36 -9
- package/dist/internal/EdgeCache.js.map +1 -1
- package/dist/internal/Id.d.ts +11 -0
- package/dist/internal/Id.d.ts.map +1 -1
- package/dist/internal/Id.js +13 -0
- package/dist/internal/Id.js.map +1 -1
- package/dist/internal/Idempotency.d.ts +83 -0
- package/dist/internal/Idempotency.d.ts.map +1 -0
- package/dist/internal/Idempotency.js +113 -0
- package/dist/internal/Idempotency.js.map +1 -0
- package/dist/internal/Log.d.ts +64 -9
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +29 -7
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/MetricSink.d.ts.map +1 -1
- package/dist/internal/MetricSink.js +47 -1
- package/dist/internal/MetricSink.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +1 -1
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +3 -0
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/Provider.d.ts +14 -0
- package/dist/internal/Provider.d.ts.map +1 -0
- package/dist/internal/Provider.js +5 -0
- package/dist/internal/Provider.js.map +1 -0
- package/dist/internal/Schema.d.ts +8 -3
- package/dist/internal/Schema.d.ts.map +1 -1
- package/dist/internal/Schema.js +24 -13
- package/dist/internal/Schema.js.map +1 -1
- package/dist/internal/Store.d.ts +6 -0
- package/dist/internal/Store.d.ts.map +1 -1
- package/dist/internal/Store.js +35 -0
- package/dist/internal/Store.js.map +1 -1
- package/dist/internal/Tidx.d.ts +43 -24
- package/dist/internal/Tidx.d.ts.map +1 -1
- package/dist/internal/Tidx.js +79 -11
- package/dist/internal/Tidx.js.map +1 -1
- package/dist/internal/Viem.d.ts +82 -65
- package/dist/internal/Viem.d.ts.map +1 -1
- package/dist/internal/Viem.js +83 -12
- package/dist/internal/Viem.js.map +1 -1
- package/dist/internal/WebhookDestination.d.ts.map +1 -1
- package/dist/internal/WebhookDestination.js +34 -28
- package/dist/internal/WebhookDestination.js.map +1 -1
- package/dist/internal/Webhooks.d.ts +9 -0
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +15 -10
- package/dist/internal/Webhooks.js.map +1 -1
- package/dist/internal/exchange/Provider.d.ts +219 -0
- package/dist/internal/exchange/Provider.d.ts.map +1 -0
- package/dist/internal/exchange/Provider.js +117 -0
- package/dist/internal/exchange/Provider.js.map +1 -0
- package/dist/internal/exchange/index.d.ts +2 -0
- package/dist/internal/exchange/index.d.ts.map +1 -0
- package/dist/internal/exchange/index.js +2 -0
- package/dist/internal/exchange/index.js.map +1 -0
- package/dist/internal/exchange/providers/uniswap.d.ts +57 -0
- package/dist/internal/exchange/providers/uniswap.d.ts.map +1 -0
- package/dist/internal/exchange/providers/uniswap.js +553 -0
- package/dist/internal/exchange/providers/uniswap.js.map +1 -0
- package/dist/internal/funding/Action.d.ts +55 -0
- package/dist/internal/funding/Action.d.ts.map +1 -0
- package/dist/internal/funding/Action.js +74 -0
- package/dist/internal/funding/Action.js.map +1 -0
- package/dist/internal/funding/Catalog.d.ts +107 -0
- package/dist/internal/funding/Catalog.d.ts.map +1 -0
- package/dist/internal/funding/Catalog.js +270 -0
- package/dist/internal/funding/Catalog.js.map +1 -0
- package/dist/internal/funding/Chain.d.ts +76 -0
- package/dist/internal/funding/Chain.d.ts.map +1 -0
- package/dist/internal/funding/Chain.js +38 -0
- package/dist/internal/funding/Chain.js.map +1 -0
- package/dist/internal/funding/Deposit.d.ts +366 -0
- package/dist/internal/funding/Deposit.d.ts.map +1 -0
- package/dist/internal/funding/Deposit.js +286 -0
- package/dist/internal/funding/Deposit.js.map +1 -0
- package/dist/internal/funding/DepositAddress.d.ts +345 -0
- package/dist/internal/funding/DepositAddress.d.ts.map +1 -0
- package/dist/internal/funding/DepositAddress.js +189 -0
- package/dist/internal/funding/DepositAddress.js.map +1 -0
- package/dist/internal/funding/Evidence.d.ts +52 -0
- package/dist/internal/funding/Evidence.d.ts.map +1 -0
- package/dist/internal/funding/Evidence.js +314 -0
- package/dist/internal/funding/Evidence.js.map +1 -0
- package/dist/internal/funding/Provider.d.ts +1186 -0
- package/dist/internal/funding/Provider.d.ts.map +1 -0
- package/dist/internal/funding/Provider.js +1081 -0
- package/dist/internal/funding/Provider.js.map +1 -0
- package/dist/internal/funding/Reconciliation.d.ts +113 -0
- package/dist/internal/funding/Reconciliation.d.ts.map +1 -0
- package/dist/internal/funding/Reconciliation.js +676 -0
- package/dist/internal/funding/Reconciliation.js.map +1 -0
- package/dist/internal/funding/Route.d.ts +21 -0
- package/dist/internal/funding/Route.d.ts.map +1 -0
- package/dist/internal/funding/Route.js +5 -0
- package/dist/internal/funding/Route.js.map +1 -0
- package/dist/internal/funding/Subsidy.d.ts +113 -0
- package/dist/internal/funding/Subsidy.d.ts.map +1 -0
- package/dist/internal/funding/Subsidy.js +138 -0
- package/dist/internal/funding/Subsidy.js.map +1 -0
- package/dist/internal/funding/Token.d.ts +41 -0
- package/dist/internal/funding/Token.d.ts.map +1 -0
- package/dist/internal/funding/Token.js +22 -0
- package/dist/internal/funding/Token.js.map +1 -0
- package/dist/internal/funding/Transfer.d.ts +643 -0
- package/dist/internal/funding/Transfer.d.ts.map +1 -0
- package/dist/internal/funding/Transfer.js +332 -0
- package/dist/internal/funding/Transfer.js.map +1 -0
- package/dist/internal/funding/index.d.ts +13 -0
- package/dist/internal/funding/index.d.ts.map +1 -0
- package/dist/internal/funding/index.js +13 -0
- package/dist/internal/funding/index.js.map +1 -0
- package/dist/internal/funding/providers/across.d.ts +21 -0
- package/dist/internal/funding/providers/across.d.ts.map +1 -0
- package/dist/internal/funding/providers/across.js +117 -0
- package/dist/internal/funding/providers/across.js.map +1 -0
- package/dist/internal/funding/providers/relay.d.ts +46 -0
- package/dist/internal/funding/providers/relay.d.ts.map +1 -0
- package/dist/internal/funding/providers/relay.js +464 -0
- package/dist/internal/funding/providers/relay.js.map +1 -0
- package/dist/internal/funding/providers/rhino.d.ts +15 -0
- package/dist/internal/funding/providers/rhino.d.ts.map +1 -0
- package/dist/internal/funding/providers/rhino.js +116 -0
- package/dist/internal/funding/providers/rhino.js.map +1 -0
- package/dist/internal/funding/providers/squid.d.ts +19 -0
- package/dist/internal/funding/providers/squid.d.ts.map +1 -0
- package/dist/internal/funding/providers/squid.js +120 -0
- package/dist/internal/funding/providers/squid.js.map +1 -0
- package/dist/internal/funding/providers/symbiosis.d.ts +20 -0
- package/dist/internal/funding/providers/symbiosis.d.ts.map +1 -0
- package/dist/internal/funding/providers/symbiosis.js +176 -0
- package/dist/internal/funding/providers/symbiosis.js.map +1 -0
- package/dist/internal/index.d.ts +5 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +5 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/webhookDestinations/url.js +61 -57
- package/dist/internal/webhookDestinations/url.js.map +1 -1
- package/dist/providers/index.d.ts +43 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +19 -0
- package/dist/providers/index.js.map +1 -0
- package/package.json +9 -4
- package/src/ApiKeys.test.ts +11 -7
- package/src/ApiKeys.ts +37 -9
- package/src/App.test.ts +85 -10
- package/src/App.ts +224 -137
- package/src/Assets.ts +29 -4
- package/src/Client.test-d.ts +650 -30
- package/src/Scope.test.ts +19 -0
- package/src/Scope.ts +28 -11
- package/src/Webhooks.test.ts +25 -0
- package/src/Webhooks.ts +1 -1
- package/src/admin/App.test.ts +9 -2
- package/src/admin/App.ts +32 -9
- package/src/admin/apps/api-keys.test.ts +167 -23
- package/src/admin/apps/api-keys.ts +166 -28
- package/src/admin/apps/earn-vaults.test.ts +338 -0
- package/src/admin/apps/earn-vaults.ts +572 -0
- package/src/admin/apps/scopes.test.ts +16 -1
- package/src/admin/ui/plugin.ts +2 -2
- package/src/admin/ui/src/components/EarnVaultForm.tsx +137 -0
- package/src/admin/ui/src/components/MobileProfile.tsx +2 -2
- package/src/admin/ui/src/components/Page.tsx +1 -1
- package/src/admin/ui/src/components/ThemeToggle.tsx +1 -1
- package/src/admin/ui/src/lib/api-keys.ts +37 -7
- package/src/admin/ui/src/lib/client.ts +1 -1
- package/src/admin/ui/src/lib/config.ts +1 -1
- package/src/admin/ui/src/lib/early-access.ts +8 -9
- package/src/admin/ui/src/lib/earn-vaults.ts +207 -0
- package/src/admin/ui/src/lib/format.ts +13 -0
- package/src/admin/ui/src/lib/organizations.test.ts +14 -4
- package/src/admin/ui/src/lib/organizations.ts +7 -1
- package/src/admin/ui/src/lib/response.ts +22 -0
- package/src/admin/ui/src/lib/scopes.test.ts +19 -11
- package/src/admin/ui/src/lib/scopes.ts +28 -7
- package/src/admin/ui/src/lib/verified-tokens.ts +10 -9
- package/src/admin/ui/src/routeTree.gen.ts +70 -7
- package/src/admin/ui/src/router.tsx +2 -2
- package/src/admin/ui/src/routes/__root.tsx +9 -8
- package/src/admin/ui/src/routes/api-keys.tsx +475 -64
- package/src/admin/ui/src/routes/early-access.tsx +5 -12
- package/src/admin/ui/src/routes/earn.vaults.tsx +348 -0
- package/src/admin/ui/src/routes/earn.vaults_.$vaultId.edit.tsx +154 -0
- package/src/admin/ui/src/routes/earn.vaults_.new.tsx +190 -0
- package/src/admin/ui/src/routes/organizations.tsx +4 -7
- package/src/admin/ui/src/routes/organizations_.$orgId.tsx +56 -54
- package/src/admin/ui/src/routes/verified-tokens.tsx +4 -4
- package/src/admin/ui/vite.config.ts +4 -1
- package/src/admin/ui.generated.ts +189 -95
- package/src/analytics/Analytics.test.ts +69 -10
- package/src/analytics/Analytics.ts +20 -1
- package/src/analytics/tables/requestEvents.ts +79 -37
- package/src/apps/Zones.test.ts +33 -0
- package/src/apps/Zones.ts +40 -0
- package/src/apps/composition.test.ts +84 -1
- package/src/apps/data/App.test.ts +38 -9
- package/src/apps/data/App.ts +96 -33
- package/src/apps/data/FxOracle.ts +1 -1
- package/src/apps/data/index.ts +0 -1
- package/src/apps/data/routes/activities.test.ts +82 -6
- package/src/apps/data/routes/activities.ts +131 -71
- package/src/apps/data/routes/balances.test.ts +50 -37
- package/src/apps/data/routes/balances.ts +5 -5
- package/src/apps/data/routes/blocks.test.ts +2 -0
- package/src/apps/data/routes/coingecko.test.ts +22 -0
- package/src/apps/data/routes/coingecko.ts +84 -48
- package/src/apps/data/routes/earn.test.ts +1108 -0
- package/src/apps/data/routes/earn.ts +1391 -0
- package/src/apps/data/routes/exchanges.test.ts +82 -33
- package/src/apps/data/routes/exchanges.ts +842 -227
- package/src/apps/data/routes/fee-amm.test.ts +4 -6
- package/src/apps/data/routes/fee-amm.ts +69 -12
- package/src/apps/data/routes/funding.test.ts +2712 -221
- package/src/apps/data/routes/funding.ts +1604 -387
- package/src/apps/data/routes/indexer.test.ts +43 -34
- package/src/apps/data/routes/indexer.ts +19 -2
- package/src/apps/data/routes/receipts.test.ts +5 -3
- package/src/apps/data/routes/receipts.ts +13 -11
- package/src/apps/data/routes/rpc.test.ts +446 -28
- package/src/apps/data/routes/rpc.ts +243 -25
- package/src/apps/data/routes/tokenlist.test.ts +15 -0
- package/src/apps/data/routes/tokenlist.ts +88 -22
- package/src/apps/data/routes/tokens.ts +262 -86
- package/src/apps/data/routes/transactions.test.ts +2 -0
- package/src/apps/data/routes/transactions.ts +77 -42
- package/src/apps/data/routes/transfers.test.ts +166 -4
- package/src/apps/data/routes/transfers.ts +216 -78
- package/src/apps/data/routes/valuation.test.ts +62 -9
- package/src/apps/data/routes/valuation.ts +2 -2
- package/src/apps/data/routes/verified-tokens.test.ts +51 -0
- package/src/apps/data/routes/verified-tokens.ts +52 -15
- package/src/apps/data/routes/webhooks.test.ts +432 -33
- package/src/apps/data/routes/webhooks.ts +189 -79
- package/src/apps/data/routes/zones.test.ts +473 -0
- package/src/apps/data/routes/zones.ts +338 -0
- package/src/apps/docs/reference.ts +8 -6
- package/src/apps/index.ts +2 -1
- package/src/apps/management/Billing.test.ts +29 -0
- package/src/apps/management/Billing.ts +23 -0
- package/src/apps/management/Error.ts +12 -0
- package/src/apps/management/routes/api-keys.test.ts +5 -3
- package/src/apps/management/routes/api-keys.ts +2 -9
- package/src/apps/management/routes/invitations.ts +4 -11
- package/src/apps/management/routes/orgs.ts +2 -9
- package/src/apps/management/routes/scopes.test.ts +7 -2
- package/src/apps/management/routes/scopes.ts +2 -2
- package/src/apps/management/routes/webhooks.test.ts +6 -1
- package/src/apps/management/routes/webhooks.ts +15 -3
- package/src/apps/mpp/App.ts +276 -29
- package/src/apps/mpp/Mpp.test.ts +631 -26
- package/src/apps/mpp/Mpp.ts +0 -42
- package/src/apps/mpp/internal/Adapter.ts +108 -3
- package/src/apps/mpp/internal/Error.test.ts +33 -0
- package/src/apps/mpp/internal/Error.ts +44 -6
- package/src/apps/mpp/internal/Idempotency.test.ts +213 -0
- package/src/apps/mpp/internal/Idempotency.ts +59 -5
- package/src/apps/mpp/internal/Policy.test.ts +122 -0
- package/src/apps/mpp/internal/Policy.ts +98 -0
- package/src/apps/mpp/internal/ScreenManager.test.ts +68 -0
- package/src/apps/mpp/internal/ScreenManager.ts +41 -0
- package/src/apps/mpp/internal/Screening.ts +40 -3
- package/src/apps/mpp/internal/Sponsorship.ts +144 -0
- package/src/apps/mpp/internal/Utils.ts +30 -0
- package/src/apps/relay/App.test.ts +495 -64
- package/src/apps/relay/App.ts +234 -24
- package/src/apps/relay/Sponsorships.test.ts +51 -0
- package/src/apps/relay/Sponsorships.ts +19 -7
- package/src/db/Db.ts +439 -0
- package/src/db/Schema.ts +325 -2
- package/src/db/tables/earnVaults.test.ts +185 -0
- package/src/db/tables/earnVaults.ts +151 -0
- package/src/db/tables/fundingCatalog.test.ts +108 -0
- package/src/db/tables/fundingCatalog.ts +157 -0
- package/src/db/tables/fundingDepositAddresses.test.ts +580 -0
- package/src/db/tables/fundingDepositAddresses.ts +376 -0
- package/src/db/tables/fundingDeposits.test.ts +261 -0
- package/src/db/tables/fundingDeposits.ts +229 -0
- package/src/db/tables/fundingIdempotency.test.ts +182 -0
- package/src/db/tables/fundingIdempotency.ts +180 -0
- package/src/db/tables/fundingTransferEvents.ts +28 -0
- package/src/db/tables/fundingTransferTransactions.test.ts +69 -0
- package/src/db/tables/fundingTransferTransactions.ts +37 -0
- package/src/db/tables/fundingTransfers.test.ts +89 -0
- package/src/db/tables/fundingTransfers.ts +153 -0
- package/src/db/tables/organizations.test.ts +88 -0
- package/src/db/tables/organizations.ts +42 -1
- package/src/db/tables/projects.ts +16 -0
- package/src/db/tables/requestUsage.ts +23 -0
- package/src/db/tables/sponsoredTransactions.test.ts +52 -2
- package/src/db/tables/sponsoredTransactions.ts +18 -6
- package/src/db/tables/users.ts +16 -0
- package/src/db/tables/verifiedTokens.ts +19 -14
- package/src/db/tables/webhookSubscriptions.ts +58 -3
- package/src/handlers/relay.test.ts +2 -0
- package/src/handlers/relay.ts +95 -99
- package/src/internal/Auth.test.ts +48 -0
- package/src/internal/Auth.ts +61 -2
- package/src/internal/Cache.ts +13 -9
- package/src/internal/Cursor.test.ts +2 -2
- package/src/internal/Cursor.ts +1 -1
- package/src/internal/EarnRates.test.ts +125 -0
- package/src/internal/EarnRates.ts +409 -0
- package/src/internal/EarnVaults.test.ts +195 -0
- package/src/internal/EarnVaults.ts +876 -0
- package/src/internal/EdgeCache.test.ts +37 -5
- package/src/internal/EdgeCache.ts +39 -7
- package/src/internal/Id.ts +14 -0
- package/src/internal/Idempotency.test.ts +109 -0
- package/src/internal/Idempotency.ts +237 -0
- package/src/internal/Log.test-d.ts +41 -8
- package/src/internal/Log.test.ts +189 -8
- package/src/internal/Log.ts +124 -17
- package/src/internal/MetricSink.test.ts +244 -4
- package/src/internal/MetricSink.ts +51 -1
- package/src/internal/OpenApi.ts +3 -0
- package/src/internal/Provider.test.ts +17 -0
- package/src/internal/Provider.ts +17 -0
- package/src/internal/Schema.test.ts +13 -0
- package/src/internal/Schema.ts +41 -24
- package/src/internal/Store.test.ts +25 -0
- package/src/internal/Store.ts +46 -0
- package/src/internal/Tidx.local.test.ts +78 -3
- package/src/internal/Tidx.test.ts +212 -18
- package/src/internal/Tidx.ts +112 -32
- package/src/internal/VerifiedTokens.test.ts +15 -0
- package/src/internal/Viem.test.ts +170 -17
- package/src/internal/Viem.ts +111 -28
- package/src/internal/WebhookDestination.ts +25 -23
- package/src/internal/Webhooks.test.ts +59 -0
- package/src/internal/Webhooks.ts +34 -10
- package/src/internal/exchange/Provider.test.ts +216 -0
- package/src/internal/exchange/Provider.ts +326 -0
- package/src/internal/exchange/index.test.ts +6 -0
- package/src/internal/exchange/index.ts +1 -0
- package/src/internal/exchange/providers/uniswap.test.ts +122 -0
- package/src/internal/exchange/providers/uniswap.ts +682 -0
- package/src/internal/funding/Action.test.ts +138 -0
- package/src/internal/funding/Action.ts +117 -0
- package/src/internal/funding/Catalog.test.ts +311 -0
- package/src/internal/funding/Catalog.ts +347 -0
- package/src/internal/funding/Chain.test.ts +79 -0
- package/src/internal/funding/Chain.ts +120 -0
- package/src/internal/funding/Deposit.test.ts +26 -0
- package/src/internal/funding/Deposit.ts +453 -0
- package/src/internal/funding/DepositAddress.test.ts +18 -0
- package/src/internal/funding/DepositAddress.ts +312 -0
- package/src/internal/funding/Evidence.test.ts +297 -0
- package/src/internal/funding/Evidence.ts +430 -0
- package/src/internal/funding/Provider.test.ts +1328 -0
- package/src/internal/funding/Provider.ts +1796 -0
- package/src/internal/funding/Reconciliation.local.test.ts +504 -0
- package/src/internal/funding/Reconciliation.test.ts +2020 -0
- package/src/internal/funding/Reconciliation.ts +930 -0
- package/src/internal/funding/Route.test.ts +66 -0
- package/src/internal/funding/Route.ts +29 -0
- package/src/internal/funding/Subsidy.local.test.ts +152 -0
- package/src/internal/funding/Subsidy.test.ts +75 -0
- package/src/internal/funding/Subsidy.ts +260 -0
- package/src/internal/funding/Token.test.ts +47 -0
- package/src/internal/funding/Token.ts +59 -0
- package/src/internal/funding/Transfer.test.ts +369 -0
- package/src/internal/funding/Transfer.ts +522 -0
- package/src/internal/funding/index.test.ts +20 -0
- package/src/internal/funding/index.ts +12 -0
- package/src/internal/funding/providers/across.ts +149 -0
- package/src/{apps/data/FundingQuoteProviders.test.ts → internal/funding/providers/index.test.ts} +178 -157
- package/src/internal/funding/providers/relay.test.ts +474 -0
- package/src/internal/funding/providers/relay.ts +559 -0
- package/src/internal/funding/providers/rhino.ts +139 -0
- package/src/internal/funding/providers/squid.ts +151 -0
- package/src/internal/funding/providers/symbiosis.ts +221 -0
- package/src/internal/index.test.ts +5 -1
- package/src/internal/index.ts +5 -1
- package/src/internal/webhookDestinations/url.ts +49 -45
- package/src/providers/index.test.ts +14 -0
- package/src/providers/index.ts +54 -0
- package/dist/apps/data/FundingQuoteProviders.d.ts +0 -174
- package/dist/apps/data/FundingQuoteProviders.d.ts.map +0 -1
- package/dist/apps/data/FundingQuoteProviders.js +0 -775
- package/dist/apps/data/FundingQuoteProviders.js.map +0 -1
- package/dist/internal/FundingQuotes.d.ts +0 -864
- package/dist/internal/FundingQuotes.d.ts.map +0 -1
- package/dist/internal/FundingQuotes.js +0 -672
- package/dist/internal/FundingQuotes.js.map +0 -1
- package/src/apps/data/FundingQuoteProviders.ts +0 -1043
- package/src/internal/FundingQuotes.test.ts +0 -456
- package/src/internal/FundingQuotes.ts +0 -944
|
@@ -0,0 +1,1186 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import * as core_Provider from '../Provider.js';
|
|
3
|
+
import type * as core_Catalog from './Catalog.js';
|
|
4
|
+
import type * as core_Chain from './Chain.js';
|
|
5
|
+
import type * as core_Route from './Route.js';
|
|
6
|
+
import type * as core_Token from './Token.js';
|
|
7
|
+
import type * as Transfer from './Transfer.js';
|
|
8
|
+
/** Funding provider schemas. */
|
|
9
|
+
export declare namespace schema {
|
|
10
|
+
/** Bounded upstream error code safe for structured logs. */
|
|
11
|
+
const ErrorCode: z.ZodMiniString<string>;
|
|
12
|
+
/** Nested upstream error fields used to extract a stable code. */
|
|
13
|
+
const Error: z.ZodMiniObject<{
|
|
14
|
+
code: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
/** Common upstream error body fields used to extract a stable code. */
|
|
18
|
+
const ErrorBody: z.ZodMiniObject<{
|
|
19
|
+
_tag: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
20
|
+
code: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
21
|
+
error: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
22
|
+
code: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
errorCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
errorType: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
/** Positive decimal amount accepted by funding quote requests. */
|
|
30
|
+
const PositiveDecimal: z.ZodMiniString<string>;
|
|
31
|
+
/** Positive base-unit amount accepted by funding quote requests. */
|
|
32
|
+
const PositiveInteger: z.ZodMiniString<string>;
|
|
33
|
+
/** Normalized chain reference passed to funding providers. */
|
|
34
|
+
const ChainRef: z.ZodMiniObject<{
|
|
35
|
+
addressFormat: z.ZodMiniEnum<{
|
|
36
|
+
base58: "base58";
|
|
37
|
+
base58check: "base58check";
|
|
38
|
+
hex: "hex";
|
|
39
|
+
}>;
|
|
40
|
+
id: z.ZodMiniString<string>;
|
|
41
|
+
kind: z.ZodMiniEnum<{
|
|
42
|
+
evm: "evm";
|
|
43
|
+
solana: "solana";
|
|
44
|
+
tron: "tron";
|
|
45
|
+
}>;
|
|
46
|
+
name: z.ZodMiniString<string>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
/** Normalized token reference passed to funding providers. */
|
|
49
|
+
const TokenRef: z.ZodMiniObject<{
|
|
50
|
+
address: z.ZodMiniString<string>;
|
|
51
|
+
currency: z.ZodMiniString<string>;
|
|
52
|
+
decimals: z.ZodMiniNumber<number>;
|
|
53
|
+
name: z.ZodMiniString<string>;
|
|
54
|
+
standard: z.ZodMiniString<string>;
|
|
55
|
+
symbol: z.ZodMiniString<string>;
|
|
56
|
+
tokenKey: z.ZodMiniString<string>;
|
|
57
|
+
verified: z.ZodMiniBoolean<boolean>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/** Provider identity embedded in funding resources. */
|
|
60
|
+
const ProviderRef: z.ZodMiniObject<{
|
|
61
|
+
id: z.ZodMiniString<string>;
|
|
62
|
+
name: z.ZodMiniString<string>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
/** Source amount unit accepted by a funding quote request. */
|
|
65
|
+
const SourceAmountUnits: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
66
|
+
baseUnits: "baseUnits";
|
|
67
|
+
decimal: "decimal";
|
|
68
|
+
}>>;
|
|
69
|
+
/** Normalized caller request passed to funding providers. */
|
|
70
|
+
const QuoteRequest: z.ZodMiniObject<{
|
|
71
|
+
destinationToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
72
|
+
provider: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
73
|
+
sourceAmount: z.ZodMiniString<string>;
|
|
74
|
+
sourceAmountUnits: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
75
|
+
baseUnits: "baseUnits";
|
|
76
|
+
decimal: "decimal";
|
|
77
|
+
}>>;
|
|
78
|
+
sourceChain: z.ZodMiniString<string>;
|
|
79
|
+
sourceToken: z.ZodMiniString<string>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
/** Provider-specific quote status for the requested amount. */
|
|
82
|
+
const QuoteStatus: z.ZodMiniEnum<{
|
|
83
|
+
available: "available";
|
|
84
|
+
thin: "thin";
|
|
85
|
+
unavailable: "unavailable";
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
}>;
|
|
88
|
+
/** Machine-readable provider quote quality tier. */
|
|
89
|
+
const QualityTier: z.ZodMiniEnum<{
|
|
90
|
+
liquid: "liquid";
|
|
91
|
+
thin: "thin";
|
|
92
|
+
unavailable: "unavailable";
|
|
93
|
+
unknown: "unknown";
|
|
94
|
+
}>;
|
|
95
|
+
/** Quote data returned by a funding provider. */
|
|
96
|
+
const GetQuoteResult: z.ZodMiniObject<{
|
|
97
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
98
|
+
destinationAmountMin: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
99
|
+
destinationAmount: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
100
|
+
quality: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
101
|
+
estimatedSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
102
|
+
liquiditySource: z.ZodMiniString<string>;
|
|
103
|
+
sourceDetail: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
104
|
+
tier: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
105
|
+
liquid: "liquid";
|
|
106
|
+
thin: "thin";
|
|
107
|
+
unavailable: "unavailable";
|
|
108
|
+
unknown: "unknown";
|
|
109
|
+
}>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
sampledAt: z.ZodMiniISODateTime;
|
|
112
|
+
status: z.ZodMiniEnum<{
|
|
113
|
+
available: "available";
|
|
114
|
+
thin: "thin";
|
|
115
|
+
unavailable: "unavailable";
|
|
116
|
+
unknown: "unknown";
|
|
117
|
+
}>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
/** Executable preparation returned by a funding provider. */
|
|
120
|
+
const PrepareResult: z.ZodMiniObject<{
|
|
121
|
+
action: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
122
|
+
calls: z.ZodMiniArray<z.ZodMiniObject<{
|
|
123
|
+
data: z.ZodMiniString<string>;
|
|
124
|
+
to: z.ZodMiniString<string>;
|
|
125
|
+
value: z.ZodMiniString<string>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
type: z.ZodMiniLiteral<"evm:calls">;
|
|
128
|
+
}, z.core.$strip>], "type">;
|
|
129
|
+
correlation: z.ZodMiniObject<{
|
|
130
|
+
checkEndpoint: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
+
requestId: z.ZodMiniString<string>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
destinationAmount: z.ZodMiniString<string>;
|
|
134
|
+
destinationAmountMin: z.ZodMiniString<string>;
|
|
135
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
136
|
+
fees: z.ZodMiniArray<z.ZodMiniObject<{
|
|
137
|
+
amount: z.ZodMiniString<string>;
|
|
138
|
+
side: z.ZodMiniEnum<{
|
|
139
|
+
destination: "destination";
|
|
140
|
+
source: "source";
|
|
141
|
+
}>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
quality: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
144
|
+
estimatedSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
145
|
+
liquiditySource: z.ZodMiniString<string>;
|
|
146
|
+
sourceDetail: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
147
|
+
tier: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
148
|
+
liquid: "liquid";
|
|
149
|
+
thin: "thin";
|
|
150
|
+
unavailable: "unavailable";
|
|
151
|
+
unknown: "unknown";
|
|
152
|
+
}>>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
sampledAt: z.ZodMiniISODateTime;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
/** Reusable deposit address provisioned by a funding provider. */
|
|
157
|
+
const DepositAddressResult: z.ZodMiniObject<{
|
|
158
|
+
address: z.ZodMiniString<string>;
|
|
159
|
+
correlation: z.ZodMiniObject<{
|
|
160
|
+
checkEndpoint: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
161
|
+
requestId: z.ZodMiniString<string>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
destinationAmount: z.ZodMiniString<string>;
|
|
164
|
+
destinationAmountMin: z.ZodMiniString<string>;
|
|
165
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
166
|
+
fees: z.ZodMiniArray<z.ZodMiniObject<{
|
|
167
|
+
amount: z.ZodMiniString<string>;
|
|
168
|
+
side: z.ZodMiniEnum<{
|
|
169
|
+
destination: "destination";
|
|
170
|
+
source: "source";
|
|
171
|
+
}>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
sampledAt: z.ZodMiniISODateTime;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
/** One provider request discovered for a reusable deposit address. */
|
|
176
|
+
const DepositAddressRequest: z.ZodMiniObject<{
|
|
177
|
+
createdAt: z.ZodMiniISODateTime;
|
|
178
|
+
destinationTransactionHashes: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
179
|
+
id: z.ZodMiniString<string>;
|
|
180
|
+
sourceTransactionHashes: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
181
|
+
status: z.ZodMiniString<string>;
|
|
182
|
+
updatedAt: z.ZodMiniISODateTime;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
/** One page of provider requests discovered for a reusable address. */
|
|
185
|
+
const DepositAddressRequestsResult: z.ZodMiniObject<{
|
|
186
|
+
continuation: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
187
|
+
requests: z.ZodMiniArray<z.ZodMiniObject<{
|
|
188
|
+
createdAt: z.ZodMiniISODateTime;
|
|
189
|
+
destinationTransactionHashes: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
190
|
+
id: z.ZodMiniString<string>;
|
|
191
|
+
sourceTransactionHashes: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
192
|
+
status: z.ZodMiniString<string>;
|
|
193
|
+
updatedAt: z.ZodMiniISODateTime;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
/** Quote quality signals exposed to funding API callers. */
|
|
197
|
+
const FundingQuoteQuality: z.ZodMiniObject<{
|
|
198
|
+
estimatedSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
199
|
+
liquiditySource: z.ZodMiniString<string>;
|
|
200
|
+
sourceDetail: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
201
|
+
tier: z.ZodMiniEnum<{
|
|
202
|
+
liquid: "liquid";
|
|
203
|
+
thin: "thin";
|
|
204
|
+
}>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
/** Provider quote freshness data exposed to funding API callers. */
|
|
207
|
+
const QuoteDetails: z.ZodMiniObject<{
|
|
208
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
209
|
+
sampledAt: z.ZodMiniISODateTime;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
/** Successful normalized funding quote returned to callers. */
|
|
212
|
+
const FundingQuote: z.ZodMiniObject<{
|
|
213
|
+
destinationAmount: z.ZodMiniObject<{
|
|
214
|
+
baseUnits: z.ZodMiniString<string>;
|
|
215
|
+
currency: z.ZodMiniString<string>;
|
|
216
|
+
decimals: z.ZodMiniNumber<number>;
|
|
217
|
+
formatted: z.ZodMiniString<string>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
destinationAmountMin: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
220
|
+
baseUnits: z.ZodMiniString<string>;
|
|
221
|
+
currency: z.ZodMiniString<string>;
|
|
222
|
+
decimals: z.ZodMiniNumber<number>;
|
|
223
|
+
formatted: z.ZodMiniString<string>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
destinationChain: z.ZodMiniObject<{
|
|
226
|
+
addressFormat: z.ZodMiniEnum<{
|
|
227
|
+
base58: "base58";
|
|
228
|
+
base58check: "base58check";
|
|
229
|
+
hex: "hex";
|
|
230
|
+
}>;
|
|
231
|
+
id: z.ZodMiniString<string>;
|
|
232
|
+
kind: z.ZodMiniEnum<{
|
|
233
|
+
evm: "evm";
|
|
234
|
+
solana: "solana";
|
|
235
|
+
tron: "tron";
|
|
236
|
+
}>;
|
|
237
|
+
name: z.ZodMiniString<string>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
destinationToken: z.ZodMiniObject<{
|
|
240
|
+
address: z.ZodMiniString<string>;
|
|
241
|
+
currency: z.ZodMiniString<string>;
|
|
242
|
+
decimals: z.ZodMiniNumber<number>;
|
|
243
|
+
name: z.ZodMiniString<string>;
|
|
244
|
+
standard: z.ZodMiniString<string>;
|
|
245
|
+
symbol: z.ZodMiniString<string>;
|
|
246
|
+
tokenKey: z.ZodMiniString<string>;
|
|
247
|
+
verified: z.ZodMiniBoolean<boolean>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
id: z.ZodMiniString<string>;
|
|
250
|
+
provider: z.ZodMiniObject<{
|
|
251
|
+
id: z.ZodMiniString<string>;
|
|
252
|
+
name: z.ZodMiniString<string>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
quality: z.ZodMiniObject<{
|
|
255
|
+
estimatedSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
256
|
+
liquiditySource: z.ZodMiniString<string>;
|
|
257
|
+
sourceDetail: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
258
|
+
tier: z.ZodMiniEnum<{
|
|
259
|
+
liquid: "liquid";
|
|
260
|
+
thin: "thin";
|
|
261
|
+
}>;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
quote: z.ZodMiniObject<{
|
|
264
|
+
expiresAt: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
265
|
+
sampledAt: z.ZodMiniISODateTime;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
sourceAmount: z.ZodMiniObject<{
|
|
268
|
+
baseUnits: z.ZodMiniString<string>;
|
|
269
|
+
currency: z.ZodMiniString<string>;
|
|
270
|
+
decimals: z.ZodMiniNumber<number>;
|
|
271
|
+
formatted: z.ZodMiniString<string>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
sourceChain: z.ZodMiniObject<{
|
|
274
|
+
addressFormat: z.ZodMiniEnum<{
|
|
275
|
+
base58: "base58";
|
|
276
|
+
base58check: "base58check";
|
|
277
|
+
hex: "hex";
|
|
278
|
+
}>;
|
|
279
|
+
id: z.ZodMiniString<string>;
|
|
280
|
+
kind: z.ZodMiniEnum<{
|
|
281
|
+
evm: "evm";
|
|
282
|
+
solana: "solana";
|
|
283
|
+
tron: "tron";
|
|
284
|
+
}>;
|
|
285
|
+
name: z.ZodMiniString<string>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
sourceToken: z.ZodMiniObject<{
|
|
288
|
+
address: z.ZodMiniString<string>;
|
|
289
|
+
currency: z.ZodMiniString<string>;
|
|
290
|
+
decimals: z.ZodMiniNumber<number>;
|
|
291
|
+
name: z.ZodMiniString<string>;
|
|
292
|
+
standard: z.ZodMiniString<string>;
|
|
293
|
+
symbol: z.ZodMiniString<string>;
|
|
294
|
+
tokenKey: z.ZodMiniString<string>;
|
|
295
|
+
verified: z.ZodMiniBoolean<boolean>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
}
|
|
299
|
+
/** Chain metadata declared by a funding route. */
|
|
300
|
+
export type Chain = core_Chain.Chain;
|
|
301
|
+
/** Token metadata declared by a funding route. */
|
|
302
|
+
export type Token = core_Token.Resolved;
|
|
303
|
+
/** Provider ids accepted by funding quote requests. */
|
|
304
|
+
export type ProviderId = string;
|
|
305
|
+
/** Provider-specific quote status for the requested amount. */
|
|
306
|
+
export type QuoteStatus = z.output<typeof schema.QuoteStatus>;
|
|
307
|
+
/** Machine-readable quote quality tier. */
|
|
308
|
+
export type QualityTier = z.output<typeof schema.QualityTier>;
|
|
309
|
+
/** Normalized chain reference passed to funding providers. */
|
|
310
|
+
export type ChainRef = z.output<typeof schema.ChainRef>;
|
|
311
|
+
/** Normalized token amount passed to funding providers. */
|
|
312
|
+
export type TokenAmount = ReturnType<typeof resolveSourceAmount>;
|
|
313
|
+
/** Normalized token reference passed to funding providers. */
|
|
314
|
+
export type TokenRef = z.output<typeof schema.TokenRef>;
|
|
315
|
+
/** A normalized internal candidate passed to funding quote providers. */
|
|
316
|
+
export type QuoteCandidate = ReturnType<typeof createQuoteCandidate>;
|
|
317
|
+
/** A normalized route candidate passed to deposit-address providers. */
|
|
318
|
+
export type DepositAddressCandidate = ReturnType<typeof createDepositAddressCandidate>;
|
|
319
|
+
/** A successful normalized funding quote returned to callers. */
|
|
320
|
+
export type FundingQuote = z.output<typeof schema.FundingQuote>;
|
|
321
|
+
/** Cache policy for a single funding quote request. */
|
|
322
|
+
export type CachePolicy = {
|
|
323
|
+
/** Whether providers should bypass their own quote or inventory caches. */
|
|
324
|
+
bypass: boolean;
|
|
325
|
+
};
|
|
326
|
+
/** Normalized caller request passed to funding providers. */
|
|
327
|
+
export type QuoteRequest = z.output<typeof schema.QuoteRequest>;
|
|
328
|
+
/** Contract of the provider `getQuote` method. */
|
|
329
|
+
export declare namespace getQuote {
|
|
330
|
+
/** Input passed to a funding provider for one curated quote candidate. */
|
|
331
|
+
type Parameters = {
|
|
332
|
+
/** Curated candidate selected for live provider quoting. */
|
|
333
|
+
candidate: QuoteCandidate;
|
|
334
|
+
/** Cache policy for provider-side discovery and quote lookups. */
|
|
335
|
+
cache: CachePolicy;
|
|
336
|
+
/** Destination chain, always Tempo mainnet in V1. */
|
|
337
|
+
destinationChain: ChainRef;
|
|
338
|
+
/** Tempo token expected from this quote. */
|
|
339
|
+
destinationToken: TokenRef;
|
|
340
|
+
/** Normalized caller request that produced this quote candidate. */
|
|
341
|
+
request: QuoteRequest;
|
|
342
|
+
/** Canonical funding route selected for this quote candidate. */
|
|
343
|
+
route: core_Route.Route;
|
|
344
|
+
/** Source amount in base units and display form. */
|
|
345
|
+
sourceAmount: TokenAmount;
|
|
346
|
+
/** Chain where the caller currently holds funds. */
|
|
347
|
+
sourceChain: ChainRef;
|
|
348
|
+
/** Token the caller currently holds. */
|
|
349
|
+
sourceToken: TokenRef;
|
|
350
|
+
};
|
|
351
|
+
/** Quote data returned by a funding provider. */
|
|
352
|
+
type ReturnType = z.output<typeof schema.GetQuoteResult>;
|
|
353
|
+
}
|
|
354
|
+
/** Contract of the provider `prepareTransfer` method. */
|
|
355
|
+
export declare namespace prepareTransfer {
|
|
356
|
+
/** Private provider correlation retained for tracking, never exposed publicly. */
|
|
357
|
+
type Correlation = {
|
|
358
|
+
/** Provider status endpoint bound to this preparation, when returned. */
|
|
359
|
+
checkEndpoint?: string | undefined;
|
|
360
|
+
/** Provider-issued request identifier. */
|
|
361
|
+
requestId: string;
|
|
362
|
+
};
|
|
363
|
+
/** Input passed to a funding provider preparing one executable transfer. */
|
|
364
|
+
type Parameters = {
|
|
365
|
+
/** Curated candidate selected for preparation. */
|
|
366
|
+
candidate: QuoteCandidate;
|
|
367
|
+
/** Funding method the caller selected. */
|
|
368
|
+
method: Transfer.Method;
|
|
369
|
+
/** Amount mode the caller selected. */
|
|
370
|
+
mode: Transfer.Mode;
|
|
371
|
+
/** Final beneficiary on the destination chain. */
|
|
372
|
+
recipient: string;
|
|
373
|
+
/** Source-chain account that signs the funding action. */
|
|
374
|
+
sender: string;
|
|
375
|
+
/** Caller slippage bound in basis points. */
|
|
376
|
+
slippageBps?: number | undefined;
|
|
377
|
+
};
|
|
378
|
+
/** Executable preparation returned by a funding provider. */
|
|
379
|
+
type ReturnType = z.output<typeof schema.PrepareResult>;
|
|
380
|
+
}
|
|
381
|
+
/** Contract of the provider `createDepositAddress` method. */
|
|
382
|
+
export declare namespace createDepositAddress {
|
|
383
|
+
/** Input passed to a provider provisioning one reusable deposit address. */
|
|
384
|
+
type Parameters = {
|
|
385
|
+
/** Source token amount in base units used for initial route provisioning. */
|
|
386
|
+
amount: string;
|
|
387
|
+
/** Curated reusable-address route selected for provisioning. */
|
|
388
|
+
candidate: DepositAddressCandidate;
|
|
389
|
+
/** Final beneficiary on Tempo. */
|
|
390
|
+
recipient: string;
|
|
391
|
+
/** Source-chain account that receives refunds. */
|
|
392
|
+
refundAddress: string;
|
|
393
|
+
/** Whether Tempo guarantees normalized 1:1 delivery. */
|
|
394
|
+
subsidize: boolean;
|
|
395
|
+
};
|
|
396
|
+
/** Reusable address and private provider correlation. */
|
|
397
|
+
type ReturnType = z.output<typeof schema.DepositAddressResult>;
|
|
398
|
+
}
|
|
399
|
+
/** Contract of the provider `listDepositAddressRequests` method. */
|
|
400
|
+
export declare namespace listDepositAddressRequests {
|
|
401
|
+
/** Input passed to a provider when reconciling one reusable address. */
|
|
402
|
+
type Parameters = {
|
|
403
|
+
/** Reusable provider deposit address. */
|
|
404
|
+
address: string;
|
|
405
|
+
/** Opaque provider cursor returned by the previous page. */
|
|
406
|
+
continuation?: string | undefined;
|
|
407
|
+
/** Existing provider request to refresh directly. */
|
|
408
|
+
requestId?: string | undefined;
|
|
409
|
+
};
|
|
410
|
+
/** One page of normalized provider requests. */
|
|
411
|
+
type ReturnType = z.output<typeof schema.DepositAddressRequestsResult>;
|
|
412
|
+
}
|
|
413
|
+
/** Optional webhook capability implemented by a complete funding integration. */
|
|
414
|
+
export type Webhook = {
|
|
415
|
+
/** Authenticates, resolves, and enqueues one provider status event. */
|
|
416
|
+
receive(input: Webhook.receive.Parameters): Promise<Webhook.receive.ReturnType>;
|
|
417
|
+
/** Authenticates a provider status event and returns its bounded hint. */
|
|
418
|
+
verify(input: Webhook.verify.Parameters): Webhook.verify.ReturnType;
|
|
419
|
+
};
|
|
420
|
+
/** Contracts for a funding provider webhook capability. */
|
|
421
|
+
export declare namespace Webhook {
|
|
422
|
+
/** Contracts for receiving one authenticated provider webhook. */
|
|
423
|
+
namespace receive {
|
|
424
|
+
/** Raw provider webhook request passed to a funding integration. */
|
|
425
|
+
type Parameters = {
|
|
426
|
+
/** Exact request body bytes decoded as UTF-8. */
|
|
427
|
+
body: string;
|
|
428
|
+
/** Original provider webhook headers. */
|
|
429
|
+
headers: Headers;
|
|
430
|
+
};
|
|
431
|
+
/** Durable queue message emitted for one authenticated funding status hint. */
|
|
432
|
+
type Dispatchable = {
|
|
433
|
+
/** Stored funding deposit address id. */
|
|
434
|
+
addressId: string;
|
|
435
|
+
/** Reconciliation lease fencing token, when a scheduled poll already claimed the address. */
|
|
436
|
+
pollLeaseVersion?: number | undefined;
|
|
437
|
+
/** Optional provider request id that triggered reconciliation. */
|
|
438
|
+
requestId?: string | undefined;
|
|
439
|
+
/** Reconciliation queue message discriminator. */
|
|
440
|
+
type: 'funding:deposit-address:reconcile';
|
|
441
|
+
};
|
|
442
|
+
/** Safe disposition of one authenticated funding provider webhook. */
|
|
443
|
+
type ReturnType = {
|
|
444
|
+
addressId: string;
|
|
445
|
+
type: 'queued';
|
|
446
|
+
} | {
|
|
447
|
+
type: 'ignored';
|
|
448
|
+
} | {
|
|
449
|
+
type: 'unknown_address';
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
/** Contracts for verifying one provider webhook. */
|
|
453
|
+
namespace verify {
|
|
454
|
+
/** Raw provider webhook request passed to a funding integration. */
|
|
455
|
+
type Parameters = receive.Parameters;
|
|
456
|
+
/** Authenticated provider hint extracted from a funding webhook. */
|
|
457
|
+
type ReturnType = {
|
|
458
|
+
/** Reusable provider address, when the provider attributed one. */
|
|
459
|
+
address?: string | undefined;
|
|
460
|
+
/** Provider request id, when included in the event. */
|
|
461
|
+
requestId?: string | undefined;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
/** A funding provider descriptor and live quote implementation. */
|
|
466
|
+
export type Provider<id extends string = string> = core_Provider.Provider<id, 'funding'> & {
|
|
467
|
+
/** Provisions a reusable funding deposit address, when supported. */
|
|
468
|
+
createDepositAddress?(input: createDepositAddress.Parameters, signal: AbortSignal): Promise<createDepositAddress.ReturnType>;
|
|
469
|
+
/** Requests a live funding quote. */
|
|
470
|
+
getQuote(input: getQuote.Parameters, signal: AbortSignal): Promise<getQuote.ReturnType>;
|
|
471
|
+
/** Lists requests discovered for a reusable deposit address, when supported. */
|
|
472
|
+
listDepositAddressRequests?(input: listDepositAddressRequests.Parameters, signal: AbortSignal): Promise<listDepositAddressRequests.ReturnType>;
|
|
473
|
+
/** Prepares an executable funding transfer, when the provider supports it. */
|
|
474
|
+
prepareTransfer?(input: prepareTransfer.Parameters, signal: AbortSignal): Promise<prepareTransfer.ReturnType>;
|
|
475
|
+
/** Receives authenticated provider status events, when configured. */
|
|
476
|
+
webhook?: Webhook | undefined;
|
|
477
|
+
};
|
|
478
|
+
/** Defines a funding provider from its identity and quote implementation. */
|
|
479
|
+
export declare function from<const id extends string>(options: from.Options<id>): Provider<id>;
|
|
480
|
+
export declare namespace from {
|
|
481
|
+
/** Funding provider definition. */
|
|
482
|
+
type Options<id extends string> = Omit<Provider<id>, 'type'>;
|
|
483
|
+
}
|
|
484
|
+
/** Narrows a registered provider to a funding provider. */
|
|
485
|
+
export declare function is(provider: core_Provider.Provider): provider is Provider;
|
|
486
|
+
/** Narrows a funding provider to one that prepares executable transfers. */
|
|
487
|
+
export declare function canPrepareTransfer(provider: Provider): provider is Provider & {
|
|
488
|
+
prepareTransfer: NonNullable<Provider['prepareTransfer']>;
|
|
489
|
+
};
|
|
490
|
+
/** Narrows a funding provider to one that provisions reusable deposit addresses. */
|
|
491
|
+
export declare function canCreateDepositAddress(provider: Provider): provider is Provider & {
|
|
492
|
+
createDepositAddress: NonNullable<Provider['createDepositAddress']>;
|
|
493
|
+
};
|
|
494
|
+
/** Narrows a funding provider to one that tracks reusable deposit addresses. */
|
|
495
|
+
export declare function canListDepositAddressRequests(provider: Provider): provider is Provider & {
|
|
496
|
+
listDepositAddressRequests: NonNullable<Provider['listDepositAddressRequests']>;
|
|
497
|
+
};
|
|
498
|
+
/** Narrows a funding provider to one with authenticated webhook receipt. */
|
|
499
|
+
export declare function canReceiveWebhook(provider: Provider): provider is Provider & {
|
|
500
|
+
webhook: Webhook;
|
|
501
|
+
};
|
|
502
|
+
/** Funding provider method recorded by request diagnostics. */
|
|
503
|
+
export type ProviderOperation = 'createDepositAddress' | 'getQuote' | 'listDepositAddressRequests' | 'prepareTransfer';
|
|
504
|
+
/** One provider attempt made while resolving a funding quote request. */
|
|
505
|
+
export type ProviderAttempt = {
|
|
506
|
+
/** Wall-clock duration of the provider attempt in milliseconds. */
|
|
507
|
+
durationMs: number;
|
|
508
|
+
/** Provider method invoked by the attempt. */
|
|
509
|
+
operation: ProviderOperation;
|
|
510
|
+
/** Successful or expected-unavailable provider outcome. */
|
|
511
|
+
outcome: 'available' | 'thin' | 'unavailable';
|
|
512
|
+
/** Provider that handled the quote candidate. */
|
|
513
|
+
provider: Provider;
|
|
514
|
+
} | {
|
|
515
|
+
/** Error thrown by the provider boundary. */
|
|
516
|
+
cause: unknown;
|
|
517
|
+
/** Wall-clock duration of the provider attempt in milliseconds. */
|
|
518
|
+
durationMs: number;
|
|
519
|
+
/** Provider method invoked by the attempt. */
|
|
520
|
+
operation: ProviderOperation;
|
|
521
|
+
/** Failed provider outcome. */
|
|
522
|
+
outcome: 'failed';
|
|
523
|
+
/** Provider that handled the quote candidate. */
|
|
524
|
+
provider: Provider;
|
|
525
|
+
};
|
|
526
|
+
/** Bounded result for one provider attempt. */
|
|
527
|
+
export type ProviderAttemptResult = {
|
|
528
|
+
/** Wall-clock duration of the provider attempt in milliseconds. */
|
|
529
|
+
durationMs: number;
|
|
530
|
+
/** Failure class, present only when the provider attempt failed. */
|
|
531
|
+
failure?: failure.Result['failure'] | undefined;
|
|
532
|
+
/** Provider identifier. */
|
|
533
|
+
id: string;
|
|
534
|
+
/** Provider method invoked by the attempt. */
|
|
535
|
+
operation: ProviderOperation;
|
|
536
|
+
/** Provider attempt outcome. */
|
|
537
|
+
outcome: ProviderAttempt['outcome'];
|
|
538
|
+
};
|
|
539
|
+
/** A provider failure retained for bounded request diagnostics. */
|
|
540
|
+
export type ProviderFailure = {
|
|
541
|
+
/** Error thrown by the provider boundary. */
|
|
542
|
+
cause: unknown;
|
|
543
|
+
/** Provider method that failed. */
|
|
544
|
+
operation: ProviderOperation;
|
|
545
|
+
/** Provider that failed. */
|
|
546
|
+
provider: Provider;
|
|
547
|
+
};
|
|
548
|
+
/** Returns normalized chains and source tokens supported by quote providers. */
|
|
549
|
+
export declare function getChains(options: getChains.Options): {
|
|
550
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
551
|
+
id: string;
|
|
552
|
+
kind: "evm" | "solana" | "tron";
|
|
553
|
+
name: string;
|
|
554
|
+
tokens: {
|
|
555
|
+
address: string;
|
|
556
|
+
currency: string;
|
|
557
|
+
decimals: number;
|
|
558
|
+
name: string;
|
|
559
|
+
standard: string;
|
|
560
|
+
symbol: string;
|
|
561
|
+
tokenKey: string;
|
|
562
|
+
verified: boolean;
|
|
563
|
+
}[];
|
|
564
|
+
}[];
|
|
565
|
+
export declare namespace getChains {
|
|
566
|
+
/** Options for getting provider-supported source chains. */
|
|
567
|
+
type Options = {
|
|
568
|
+
/** Compiled funding catalog containing provider routes. */
|
|
569
|
+
catalog: core_Catalog.Snapshot;
|
|
570
|
+
/** Providers whose routes contribute source chains and tokens. */
|
|
571
|
+
providers: readonly Provider[];
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
/** Returns the supplied funding quote providers. */
|
|
575
|
+
export declare function getProviders(options: getProviders.Options): {
|
|
576
|
+
id: string;
|
|
577
|
+
name: string;
|
|
578
|
+
}[];
|
|
579
|
+
export declare namespace getProviders {
|
|
580
|
+
/** Options for getting providers. */
|
|
581
|
+
type Options = {
|
|
582
|
+
/** Compiled funding catalog containing provider routes. */
|
|
583
|
+
catalog: core_Catalog.Snapshot;
|
|
584
|
+
/** Funding providers included in this deployment. */
|
|
585
|
+
providers: readonly Provider[];
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
/** Returns successful live funding quotes from the supplied providers. */
|
|
589
|
+
export declare function getQuotes(options: getQuotes.Options): Promise<{
|
|
590
|
+
destinationAmount: {
|
|
591
|
+
baseUnits: string;
|
|
592
|
+
currency: string;
|
|
593
|
+
decimals: number;
|
|
594
|
+
formatted: string;
|
|
595
|
+
};
|
|
596
|
+
destinationAmountMin?: {
|
|
597
|
+
baseUnits: string;
|
|
598
|
+
currency: string;
|
|
599
|
+
decimals: number;
|
|
600
|
+
formatted: string;
|
|
601
|
+
} | undefined;
|
|
602
|
+
destinationChain: {
|
|
603
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
604
|
+
id: string;
|
|
605
|
+
kind: "evm" | "solana" | "tron";
|
|
606
|
+
name: string;
|
|
607
|
+
};
|
|
608
|
+
destinationToken: {
|
|
609
|
+
address: string;
|
|
610
|
+
currency: string;
|
|
611
|
+
decimals: number;
|
|
612
|
+
name: string;
|
|
613
|
+
standard: string;
|
|
614
|
+
symbol: string;
|
|
615
|
+
tokenKey: string;
|
|
616
|
+
verified: boolean;
|
|
617
|
+
};
|
|
618
|
+
id: string;
|
|
619
|
+
provider: {
|
|
620
|
+
id: string;
|
|
621
|
+
name: string;
|
|
622
|
+
};
|
|
623
|
+
quality: {
|
|
624
|
+
estimatedSeconds?: number | undefined;
|
|
625
|
+
liquiditySource: string;
|
|
626
|
+
sourceDetail?: string | undefined;
|
|
627
|
+
tier: "liquid" | "thin";
|
|
628
|
+
};
|
|
629
|
+
quote: {
|
|
630
|
+
expiresAt?: string | undefined;
|
|
631
|
+
sampledAt: string;
|
|
632
|
+
};
|
|
633
|
+
sourceAmount: {
|
|
634
|
+
baseUnits: string;
|
|
635
|
+
currency: string;
|
|
636
|
+
decimals: number;
|
|
637
|
+
formatted: string;
|
|
638
|
+
};
|
|
639
|
+
sourceChain: {
|
|
640
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
641
|
+
id: string;
|
|
642
|
+
kind: "evm" | "solana" | "tron";
|
|
643
|
+
name: string;
|
|
644
|
+
};
|
|
645
|
+
sourceToken: {
|
|
646
|
+
address: string;
|
|
647
|
+
currency: string;
|
|
648
|
+
decimals: number;
|
|
649
|
+
name: string;
|
|
650
|
+
standard: string;
|
|
651
|
+
symbol: string;
|
|
652
|
+
tokenKey: string;
|
|
653
|
+
verified: boolean;
|
|
654
|
+
};
|
|
655
|
+
}[]>;
|
|
656
|
+
/** Returns internal quote candidates for a normalized caller request. */
|
|
657
|
+
export declare function getQuoteCandidates(options: getQuoteCandidates.Options): {
|
|
658
|
+
readonly destinationChain: {
|
|
659
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
660
|
+
id: string;
|
|
661
|
+
kind: "evm" | "solana" | "tron";
|
|
662
|
+
name: string;
|
|
663
|
+
};
|
|
664
|
+
readonly destinationToken: {
|
|
665
|
+
address: string;
|
|
666
|
+
currency: string;
|
|
667
|
+
decimals: number;
|
|
668
|
+
name: string;
|
|
669
|
+
standard: string;
|
|
670
|
+
symbol: string;
|
|
671
|
+
tokenKey: string;
|
|
672
|
+
verified: boolean;
|
|
673
|
+
};
|
|
674
|
+
readonly id: string;
|
|
675
|
+
readonly provider: {
|
|
676
|
+
id: string;
|
|
677
|
+
name: string;
|
|
678
|
+
};
|
|
679
|
+
readonly route: core_Route.Route;
|
|
680
|
+
readonly sourceAmount: {
|
|
681
|
+
amount: string;
|
|
682
|
+
formatted: string;
|
|
683
|
+
};
|
|
684
|
+
readonly sourceChain: {
|
|
685
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
686
|
+
id: string;
|
|
687
|
+
kind: "evm" | "solana" | "tron";
|
|
688
|
+
name: string;
|
|
689
|
+
};
|
|
690
|
+
readonly sourceToken: {
|
|
691
|
+
address: string;
|
|
692
|
+
currency: string;
|
|
693
|
+
decimals: number;
|
|
694
|
+
name: string;
|
|
695
|
+
standard: string;
|
|
696
|
+
symbol: string;
|
|
697
|
+
tokenKey: string;
|
|
698
|
+
verified: boolean;
|
|
699
|
+
};
|
|
700
|
+
}[];
|
|
701
|
+
export declare namespace getQuoteCandidates {
|
|
702
|
+
/** Options for selecting funding quote candidates. */
|
|
703
|
+
type Options = QuoteRequest & {
|
|
704
|
+
/** Compiled funding catalog containing provider routes. */
|
|
705
|
+
catalog: core_Catalog.Snapshot;
|
|
706
|
+
/** Funding providers considered by the request. */
|
|
707
|
+
providers: readonly Provider[];
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
export declare namespace getQuotes {
|
|
711
|
+
/** Options for requesting live funding quotes. */
|
|
712
|
+
type Options = getQuoteCandidates.Options & {
|
|
713
|
+
/** Cache policy for provider-side discovery and quote lookups. */
|
|
714
|
+
cache?: CachePolicy | undefined;
|
|
715
|
+
/** Receives one bounded observation for every provider attempt. */
|
|
716
|
+
onAttempt?: ((attempt: ProviderAttempt) => void) | undefined;
|
|
717
|
+
/** Per-provider quote timeout in milliseconds. */
|
|
718
|
+
providerTimeoutMs?: number | undefined;
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Provisions one reusable deposit address through the first deterministic
|
|
723
|
+
* capability-enabled provider. Returns `undefined` when no route is enabled.
|
|
724
|
+
*/
|
|
725
|
+
export declare function createDepositAddress(options: createDepositAddress.Options): Promise<createDepositAddress.Selection | undefined>;
|
|
726
|
+
export declare namespace createDepositAddress {
|
|
727
|
+
/** Options for provisioning one reusable deposit address. */
|
|
728
|
+
type Options = getDepositAddressCandidates.Options & {
|
|
729
|
+
/** Source token amount in base units used for initial route provisioning. */
|
|
730
|
+
amount: string;
|
|
731
|
+
/** Receives one bounded observation for the provider attempt. */
|
|
732
|
+
onAttempt?: ((attempt: ProviderAttempt) => void) | undefined;
|
|
733
|
+
/** Per-provider provisioning timeout in milliseconds. */
|
|
734
|
+
providerTimeoutMs?: number | undefined;
|
|
735
|
+
/** Final beneficiary on Tempo. */
|
|
736
|
+
recipient: string;
|
|
737
|
+
/** Source-chain account that receives refunds. */
|
|
738
|
+
refundAddress: string;
|
|
739
|
+
/** Whether Tempo guarantees normalized 1:1 delivery. */
|
|
740
|
+
subsidize: boolean;
|
|
741
|
+
};
|
|
742
|
+
/** Selected provider route and its reusable address. */
|
|
743
|
+
type Selection = {
|
|
744
|
+
/** Curated route used to provision the address. */
|
|
745
|
+
candidate: DepositAddressCandidate;
|
|
746
|
+
/** Provider that provisioned the address. */
|
|
747
|
+
provider: Provider;
|
|
748
|
+
/** Normalized final beneficiary on Tempo. */
|
|
749
|
+
recipient: string;
|
|
750
|
+
/** Normalized source-chain refund account. */
|
|
751
|
+
refundAddress: string;
|
|
752
|
+
/** Reusable address and private provider correlation. */
|
|
753
|
+
result: createDepositAddress.ReturnType;
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Prepares one executable transfer across capability-enabled candidates,
|
|
758
|
+
* selecting the best successful preparation. Returns `undefined` when no
|
|
759
|
+
* enabled corridor matches; throws {@link ProviderQuoteError} when every
|
|
760
|
+
* matching provider failed unexpectedly.
|
|
761
|
+
*/
|
|
762
|
+
export declare function prepareTransfer(options: prepareTransfer.Options): Promise<prepareTransfer.Selection | undefined>;
|
|
763
|
+
export declare namespace prepareTransfer {
|
|
764
|
+
/** Options for preparing one executable transfer. */
|
|
765
|
+
type Options = getPrepareCandidates.Options & {
|
|
766
|
+
/** Receives one bounded observation for every provider attempt. */
|
|
767
|
+
onAttempt?: ((attempt: ProviderAttempt) => void) | undefined;
|
|
768
|
+
/** Per-provider preparation timeout in milliseconds. */
|
|
769
|
+
providerTimeoutMs?: number | undefined;
|
|
770
|
+
/** Final beneficiary on the destination chain. */
|
|
771
|
+
recipient: string;
|
|
772
|
+
/** Source-chain account that signs the funding action. */
|
|
773
|
+
sender: string;
|
|
774
|
+
/** Caller slippage bound in basis points. */
|
|
775
|
+
slippageBps?: number | undefined;
|
|
776
|
+
};
|
|
777
|
+
/** The selected preparation with a guaranteed expiry. */
|
|
778
|
+
type Selection = {
|
|
779
|
+
/** Curated candidate the preparation was produced for. */
|
|
780
|
+
candidate: QuoteCandidate;
|
|
781
|
+
/** Provider that produced the selected preparation. */
|
|
782
|
+
provider: Provider;
|
|
783
|
+
/** The preparation, with a default expiry applied when the provider gave none. */
|
|
784
|
+
result: prepareTransfer.ReturnType & {
|
|
785
|
+
expiresAt: string;
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Returns capability-enabled reusable-address candidates for a route. Tokens
|
|
791
|
+
* resolve within their chains and only provider delivery qualifies.
|
|
792
|
+
*/
|
|
793
|
+
export declare function getDepositAddressCandidates(options: getDepositAddressCandidates.Options): {
|
|
794
|
+
candidate: {
|
|
795
|
+
readonly destinationChain: {
|
|
796
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
797
|
+
id: string;
|
|
798
|
+
kind: "evm" | "solana" | "tron";
|
|
799
|
+
name: string;
|
|
800
|
+
};
|
|
801
|
+
readonly destinationToken: {
|
|
802
|
+
address: string;
|
|
803
|
+
currency: string;
|
|
804
|
+
decimals: number;
|
|
805
|
+
name: string;
|
|
806
|
+
standard: string;
|
|
807
|
+
symbol: string;
|
|
808
|
+
tokenKey: string;
|
|
809
|
+
verified: boolean;
|
|
810
|
+
};
|
|
811
|
+
readonly provider: {
|
|
812
|
+
id: string;
|
|
813
|
+
name: string;
|
|
814
|
+
};
|
|
815
|
+
readonly route: core_Route.Route;
|
|
816
|
+
readonly sourceChain: {
|
|
817
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
818
|
+
id: string;
|
|
819
|
+
kind: "evm" | "solana" | "tron";
|
|
820
|
+
name: string;
|
|
821
|
+
};
|
|
822
|
+
readonly sourceToken: {
|
|
823
|
+
address: string;
|
|
824
|
+
currency: string;
|
|
825
|
+
decimals: number;
|
|
826
|
+
name: string;
|
|
827
|
+
standard: string;
|
|
828
|
+
symbol: string;
|
|
829
|
+
tokenKey: string;
|
|
830
|
+
verified: boolean;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
provider: core_Provider.Provider<string, "funding"> & {
|
|
834
|
+
/** Provisions a reusable funding deposit address, when supported. */
|
|
835
|
+
createDepositAddress?(input: createDepositAddress.Parameters, signal: AbortSignal): Promise<createDepositAddress.ReturnType>;
|
|
836
|
+
/** Requests a live funding quote. */
|
|
837
|
+
getQuote(input: getQuote.Parameters, signal: AbortSignal): Promise<getQuote.ReturnType>;
|
|
838
|
+
/** Lists requests discovered for a reusable deposit address, when supported. */
|
|
839
|
+
listDepositAddressRequests?(input: listDepositAddressRequests.Parameters, signal: AbortSignal): Promise<listDepositAddressRequests.ReturnType>;
|
|
840
|
+
/** Prepares an executable funding transfer, when the provider supports it. */
|
|
841
|
+
prepareTransfer?(input: prepareTransfer.Parameters, signal: AbortSignal): Promise<prepareTransfer.ReturnType>;
|
|
842
|
+
/** Receives authenticated provider status events, when configured. */
|
|
843
|
+
webhook?: Webhook | undefined;
|
|
844
|
+
} & {
|
|
845
|
+
createDepositAddress: NonNullable<Provider['createDepositAddress']>;
|
|
846
|
+
};
|
|
847
|
+
}[];
|
|
848
|
+
export declare namespace getDepositAddressCandidates {
|
|
849
|
+
/** Options for selecting reusable deposit-address routes. */
|
|
850
|
+
type Options = {
|
|
851
|
+
/** Compiled funding catalog containing provider routes and capabilities. */
|
|
852
|
+
catalog: core_Catalog.Snapshot;
|
|
853
|
+
/** Tempo destination chain selected by app composition. */
|
|
854
|
+
destinationChainId: number;
|
|
855
|
+
/** Tempo destination token symbol, contract address, or token key. */
|
|
856
|
+
destinationToken: string;
|
|
857
|
+
/** Funding providers considered by the request. */
|
|
858
|
+
providers: readonly Provider[];
|
|
859
|
+
/** Source chain CAIP-2 id, slug, or alias. */
|
|
860
|
+
sourceChain: string;
|
|
861
|
+
/** Source token symbol, contract address, or token key. */
|
|
862
|
+
sourceToken: string;
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Returns capability-enabled preparation candidates for a creation request.
|
|
867
|
+
* Tokens resolve within their chains. A route must enable the requested mode,
|
|
868
|
+
* and its provider must implement `prepareTransfer`.
|
|
869
|
+
*/
|
|
870
|
+
export declare function getPrepareCandidates(options: getPrepareCandidates.Options): {
|
|
871
|
+
candidate: {
|
|
872
|
+
readonly destinationChain: {
|
|
873
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
874
|
+
id: string;
|
|
875
|
+
kind: "evm" | "solana" | "tron";
|
|
876
|
+
name: string;
|
|
877
|
+
};
|
|
878
|
+
readonly destinationToken: {
|
|
879
|
+
address: string;
|
|
880
|
+
currency: string;
|
|
881
|
+
decimals: number;
|
|
882
|
+
name: string;
|
|
883
|
+
standard: string;
|
|
884
|
+
symbol: string;
|
|
885
|
+
tokenKey: string;
|
|
886
|
+
verified: boolean;
|
|
887
|
+
};
|
|
888
|
+
readonly id: string;
|
|
889
|
+
readonly provider: {
|
|
890
|
+
id: string;
|
|
891
|
+
name: string;
|
|
892
|
+
};
|
|
893
|
+
readonly route: core_Route.Route;
|
|
894
|
+
readonly sourceAmount: {
|
|
895
|
+
amount: string;
|
|
896
|
+
formatted: string;
|
|
897
|
+
};
|
|
898
|
+
readonly sourceChain: {
|
|
899
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
900
|
+
id: string;
|
|
901
|
+
kind: "evm" | "solana" | "tron";
|
|
902
|
+
name: string;
|
|
903
|
+
};
|
|
904
|
+
readonly sourceToken: {
|
|
905
|
+
address: string;
|
|
906
|
+
currency: string;
|
|
907
|
+
decimals: number;
|
|
908
|
+
name: string;
|
|
909
|
+
standard: string;
|
|
910
|
+
symbol: string;
|
|
911
|
+
tokenKey: string;
|
|
912
|
+
verified: boolean;
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
provider: core_Provider.Provider<string, "funding"> & {
|
|
916
|
+
/** Provisions a reusable funding deposit address, when supported. */
|
|
917
|
+
createDepositAddress?(input: createDepositAddress.Parameters, signal: AbortSignal): Promise<createDepositAddress.ReturnType>;
|
|
918
|
+
/** Requests a live funding quote. */
|
|
919
|
+
getQuote(input: getQuote.Parameters, signal: AbortSignal): Promise<getQuote.ReturnType>;
|
|
920
|
+
/** Lists requests discovered for a reusable deposit address, when supported. */
|
|
921
|
+
listDepositAddressRequests?(input: listDepositAddressRequests.Parameters, signal: AbortSignal): Promise<listDepositAddressRequests.ReturnType>;
|
|
922
|
+
/** Prepares an executable funding transfer, when the provider supports it. */
|
|
923
|
+
prepareTransfer?(input: prepareTransfer.Parameters, signal: AbortSignal): Promise<prepareTransfer.ReturnType>;
|
|
924
|
+
/** Receives authenticated provider status events, when configured. */
|
|
925
|
+
webhook?: Webhook | undefined;
|
|
926
|
+
} & {
|
|
927
|
+
prepareTransfer: NonNullable<Provider['prepareTransfer']>;
|
|
928
|
+
};
|
|
929
|
+
}[];
|
|
930
|
+
export declare namespace getPrepareCandidates {
|
|
931
|
+
/** Options for selecting preparation candidates. */
|
|
932
|
+
type Options = {
|
|
933
|
+
/** Compiled funding catalog containing provider routes and capabilities. */
|
|
934
|
+
catalog: core_Catalog.Snapshot;
|
|
935
|
+
/** Tempo destination chain selected by app composition. */
|
|
936
|
+
destinationChainId: number;
|
|
937
|
+
/** Tempo destination token symbol, contract address, or token key. */
|
|
938
|
+
destinationToken: string;
|
|
939
|
+
/** Funding method passed to provider preparation. */
|
|
940
|
+
method: Transfer.Method;
|
|
941
|
+
/** Amount mode the caller selected. */
|
|
942
|
+
mode: Transfer.Mode;
|
|
943
|
+
/** Funding providers considered by the request. */
|
|
944
|
+
providers: readonly Provider[];
|
|
945
|
+
/** Source amount in base units. */
|
|
946
|
+
sourceAmount: string;
|
|
947
|
+
/** Source chain CAIP-2 id, slug, or alias. */
|
|
948
|
+
sourceChain: string;
|
|
949
|
+
/** Source token symbol, contract address, or token key. */
|
|
950
|
+
sourceToken: string;
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
/** Source amount unit accepted by the funding quote request. */
|
|
954
|
+
export type SourceAmountUnits = z.output<typeof schema.SourceAmountUnits>;
|
|
955
|
+
/** Fetch implementation accepted by funding provider factories. */
|
|
956
|
+
export type Fetch = typeof globalThis.fetch;
|
|
957
|
+
/** Returns bounded provider failure details suitable for structured request logs. */
|
|
958
|
+
export declare function failure(options: ProviderFailure): failure.Result;
|
|
959
|
+
export declare namespace failure {
|
|
960
|
+
/** Bounded provider failure fields. */
|
|
961
|
+
type Result = {
|
|
962
|
+
/** Stable provider error code, when one is safe to retain. */
|
|
963
|
+
code?: string | undefined;
|
|
964
|
+
/** Failure boundary that rejected the provider request. */
|
|
965
|
+
failure: 'http' | 'network' | 'payload' | 'rate_limit' | 'timeout' | 'unknown';
|
|
966
|
+
/** Provider identifier. */
|
|
967
|
+
id: string;
|
|
968
|
+
/** Provider operation identifier. */
|
|
969
|
+
operation: ProviderOperation;
|
|
970
|
+
/** Upstream HTTP status, when a response was received. */
|
|
971
|
+
status?: number | undefined;
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
/** Returns a supported expected-unavailable code from a provider response. */
|
|
975
|
+
export declare function unavailable(cause: unknown, codes: readonly string[]): string | undefined;
|
|
976
|
+
/** Requests and parses a JSON provider response. */
|
|
977
|
+
export declare function requestJson(url: URL, options: requestJson.Options): Promise<unknown>;
|
|
978
|
+
export declare namespace requestJson {
|
|
979
|
+
/** Provider request options. */
|
|
980
|
+
type Options = {
|
|
981
|
+
/** Optional JSON request body. */
|
|
982
|
+
body?: unknown;
|
|
983
|
+
/** Fetch implementation. */
|
|
984
|
+
fetch: Fetch;
|
|
985
|
+
/** Optional request headers. */
|
|
986
|
+
headers?: Record<string, string> | undefined;
|
|
987
|
+
/** Optional HTTP method. */
|
|
988
|
+
method?: string | undefined;
|
|
989
|
+
/** Request abort signal. */
|
|
990
|
+
signal: AbortSignal;
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
/** Creates a normalized expected-unavailable quote result. */
|
|
994
|
+
export declare function unavailableResult(options: unavailableResult.Options): getQuote.ReturnType;
|
|
995
|
+
export declare namespace unavailableResult {
|
|
996
|
+
/** Expected-unavailable quote details. */
|
|
997
|
+
type Options = {
|
|
998
|
+
/** Provider operation detail. */
|
|
999
|
+
detail: string;
|
|
1000
|
+
/** Stable provider reason. */
|
|
1001
|
+
message: string;
|
|
1002
|
+
/** Quote sample time. */
|
|
1003
|
+
now: Date;
|
|
1004
|
+
/** Liquidity signal source. */
|
|
1005
|
+
source: string;
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
declare function createDepositAddressCandidate(options: {
|
|
1009
|
+
provider: Provider;
|
|
1010
|
+
route: core_Route.Route;
|
|
1011
|
+
}): {
|
|
1012
|
+
readonly destinationChain: {
|
|
1013
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
1014
|
+
id: string;
|
|
1015
|
+
kind: "evm" | "solana" | "tron";
|
|
1016
|
+
name: string;
|
|
1017
|
+
};
|
|
1018
|
+
readonly destinationToken: {
|
|
1019
|
+
address: string;
|
|
1020
|
+
currency: string;
|
|
1021
|
+
decimals: number;
|
|
1022
|
+
name: string;
|
|
1023
|
+
standard: string;
|
|
1024
|
+
symbol: string;
|
|
1025
|
+
tokenKey: string;
|
|
1026
|
+
verified: boolean;
|
|
1027
|
+
};
|
|
1028
|
+
readonly provider: {
|
|
1029
|
+
id: string;
|
|
1030
|
+
name: string;
|
|
1031
|
+
};
|
|
1032
|
+
readonly route: core_Route.Route;
|
|
1033
|
+
readonly sourceChain: {
|
|
1034
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
1035
|
+
id: string;
|
|
1036
|
+
kind: "evm" | "solana" | "tron";
|
|
1037
|
+
name: string;
|
|
1038
|
+
};
|
|
1039
|
+
readonly sourceToken: {
|
|
1040
|
+
address: string;
|
|
1041
|
+
currency: string;
|
|
1042
|
+
decimals: number;
|
|
1043
|
+
name: string;
|
|
1044
|
+
standard: string;
|
|
1045
|
+
symbol: string;
|
|
1046
|
+
tokenKey: string;
|
|
1047
|
+
verified: boolean;
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
declare function createQuoteCandidate(options: {
|
|
1051
|
+
destinationToken: Token;
|
|
1052
|
+
provider: Provider;
|
|
1053
|
+
route: core_Route.Route;
|
|
1054
|
+
sourceAmount: ReturnType<typeof resolveSourceAmount>;
|
|
1055
|
+
sourceToken: Token;
|
|
1056
|
+
}): {
|
|
1057
|
+
readonly destinationChain: {
|
|
1058
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
1059
|
+
id: string;
|
|
1060
|
+
kind: "evm" | "solana" | "tron";
|
|
1061
|
+
name: string;
|
|
1062
|
+
};
|
|
1063
|
+
readonly destinationToken: {
|
|
1064
|
+
address: string;
|
|
1065
|
+
currency: string;
|
|
1066
|
+
decimals: number;
|
|
1067
|
+
name: string;
|
|
1068
|
+
standard: string;
|
|
1069
|
+
symbol: string;
|
|
1070
|
+
tokenKey: string;
|
|
1071
|
+
verified: boolean;
|
|
1072
|
+
};
|
|
1073
|
+
readonly id: string;
|
|
1074
|
+
readonly provider: {
|
|
1075
|
+
id: string;
|
|
1076
|
+
name: string;
|
|
1077
|
+
};
|
|
1078
|
+
readonly route: core_Route.Route;
|
|
1079
|
+
readonly sourceAmount: {
|
|
1080
|
+
amount: string;
|
|
1081
|
+
formatted: string;
|
|
1082
|
+
};
|
|
1083
|
+
readonly sourceChain: {
|
|
1084
|
+
addressFormat: "base58" | "base58check" | "hex";
|
|
1085
|
+
id: string;
|
|
1086
|
+
kind: "evm" | "solana" | "tron";
|
|
1087
|
+
name: string;
|
|
1088
|
+
};
|
|
1089
|
+
readonly sourceToken: {
|
|
1090
|
+
address: string;
|
|
1091
|
+
currency: string;
|
|
1092
|
+
decimals: number;
|
|
1093
|
+
name: string;
|
|
1094
|
+
standard: string;
|
|
1095
|
+
symbol: string;
|
|
1096
|
+
tokenKey: string;
|
|
1097
|
+
verified: boolean;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
declare function resolveSourceAmount(options: resolveSourceAmount.Options): {
|
|
1101
|
+
amount: string;
|
|
1102
|
+
formatted: string;
|
|
1103
|
+
};
|
|
1104
|
+
declare namespace resolveSourceAmount {
|
|
1105
|
+
type Options = {
|
|
1106
|
+
amount: string;
|
|
1107
|
+
token: Token;
|
|
1108
|
+
units: SourceAmountUnits;
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
/** Error thrown when the caller supplies an unsupported destination token. */
|
|
1112
|
+
export declare class UnsupportedDestinationTokenError extends Error {
|
|
1113
|
+
name: string;
|
|
1114
|
+
}
|
|
1115
|
+
/** Error thrown when a provider webhook cannot be authenticated. */
|
|
1116
|
+
export declare class WebhookAuthenticationError extends Error {
|
|
1117
|
+
name: string;
|
|
1118
|
+
}
|
|
1119
|
+
/** Error thrown when an authenticated provider webhook has an invalid body. */
|
|
1120
|
+
export declare class WebhookPayloadError extends Error {
|
|
1121
|
+
name: string;
|
|
1122
|
+
}
|
|
1123
|
+
/** Error thrown when the caller supplies an invalid source amount. */
|
|
1124
|
+
export declare class InvalidAmountError extends Error {
|
|
1125
|
+
name: string;
|
|
1126
|
+
}
|
|
1127
|
+
/** Error thrown when the caller supplies an invalid source-chain refund address. */
|
|
1128
|
+
export declare class InvalidRefundAddressError extends Error {
|
|
1129
|
+
name: string;
|
|
1130
|
+
}
|
|
1131
|
+
/** Error thrown when provider deployment configuration is invalid. */
|
|
1132
|
+
export declare class ProviderConfigurationError extends Error {
|
|
1133
|
+
name: string;
|
|
1134
|
+
}
|
|
1135
|
+
/** Error thrown when a provider response does not match the requested quote. */
|
|
1136
|
+
export declare class ProviderPayloadError extends Error {
|
|
1137
|
+
name: string;
|
|
1138
|
+
}
|
|
1139
|
+
/** Error thrown when a provider confirms that no executable route is available. */
|
|
1140
|
+
export declare class ProviderUnavailableError extends Error {
|
|
1141
|
+
name: string;
|
|
1142
|
+
}
|
|
1143
|
+
/** Error thrown internally when a provider exceeds its quote timeout. */
|
|
1144
|
+
export declare class ProviderTimeoutError extends Error {
|
|
1145
|
+
name: string;
|
|
1146
|
+
}
|
|
1147
|
+
/** Error thrown when an internal provider quota rejects a quote request. */
|
|
1148
|
+
export declare class ProviderRateLimitError extends Error {
|
|
1149
|
+
name: string;
|
|
1150
|
+
}
|
|
1151
|
+
/** Error thrown when a provider returns an unsuccessful HTTP response. */
|
|
1152
|
+
export declare class ProviderResponseError extends Error {
|
|
1153
|
+
/** Provider response status. */
|
|
1154
|
+
readonly status: number;
|
|
1155
|
+
/** Parsed provider response body. */
|
|
1156
|
+
readonly body: unknown;
|
|
1157
|
+
name: string;
|
|
1158
|
+
constructor(
|
|
1159
|
+
/** Provider response status. */
|
|
1160
|
+
status: number,
|
|
1161
|
+
/** Parsed provider response body. */
|
|
1162
|
+
body: unknown);
|
|
1163
|
+
}
|
|
1164
|
+
/** Error thrown when every matching provider fails to produce a quote. */
|
|
1165
|
+
export declare class ProviderQuoteError extends Error {
|
|
1166
|
+
name: string;
|
|
1167
|
+
/** Provider failures that prevented a successful quote. */
|
|
1168
|
+
failures: readonly ProviderFailure[];
|
|
1169
|
+
/** Bounded provider attempts retained for request logs. */
|
|
1170
|
+
fundingProviderAttempts: readonly ProviderAttemptResult[];
|
|
1171
|
+
/** First bounded provider failure retained for request logs. */
|
|
1172
|
+
providerFailure?: failure.Result | undefined;
|
|
1173
|
+
/** Bounded provider failures retained when multiple providers failed. */
|
|
1174
|
+
providerFailures?: readonly failure.Result[] | undefined;
|
|
1175
|
+
constructor(failures: readonly ProviderFailure[], attempts?: readonly ProviderAttempt[]);
|
|
1176
|
+
}
|
|
1177
|
+
/** Error thrown when the caller filters to an unknown provider. */
|
|
1178
|
+
export declare class UnsupportedProviderError extends Error {
|
|
1179
|
+
name: string;
|
|
1180
|
+
}
|
|
1181
|
+
/** Error thrown when the caller supplies an unsupported source chain. */
|
|
1182
|
+
export declare class UnsupportedSourceChainError extends Error {
|
|
1183
|
+
name: string;
|
|
1184
|
+
}
|
|
1185
|
+
export {};
|
|
1186
|
+
//# sourceMappingURL=Provider.d.ts.map
|