@trustware/sdk-staging 1.1.10-staging.0 → 1.1.11-staging.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/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{core-BPLiD1UG.d.ts → core-BgYLe9Q7.d.ts} +15 -2
- package/dist/{core-B7Ez-5-r.d.cts → core-fLSt4qD2.d.cts} +15 -2
- package/dist/core.cjs +281 -237
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.mjs +281 -237
- package/dist/core.mjs.map +1 -1
- package/dist/index.cjs +269 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +269 -115
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-B6NNV-E_.d.ts → manager-BY3NHAks.d.ts} +50 -2
- package/dist/{manager-BwjyFjjz.d.cts → manager-DT8enQbE.d.cts} +50 -2
- package/dist/{metadata-BiTMMvlY.d.ts → metadata-BPvFYMlc.d.ts} +1 -1
- package/dist/{metadata-HCflXcsF.d.cts → metadata-DyxUcKHk.d.cts} +1 -1
- package/dist/smart-account.cjs +1 -1
- package/dist/smart-account.cjs.map +1 -1
- package/dist/smart-account.d.cts +12 -12
- package/dist/smart-account.d.ts +12 -12
- package/dist/smart-account.mjs +1 -1
- package/dist/smart-account.mjs.map +1 -1
- package/dist/wallet.cjs +15 -1
- package/dist/wallet.cjs.map +1 -1
- package/dist/wallet.d.cts +3 -3
- package/dist/wallet.d.ts +3 -3
- package/dist/wallet.mjs +15 -1
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +269 -116
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +269 -115
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -236,7 +236,36 @@ declare function submitReceipt(intentId: string, txHash: string, sponsorshipRequ
|
|
|
236
236
|
* executes from a smart account, so the backend records the tx against the
|
|
237
237
|
* address the user actually connects with. */
|
|
238
238
|
eoaAddress?: string): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Reports the submitted tx hash for one execution step of a multi-step
|
|
241
|
+
* route — approve steps only; the main tx keeps going through
|
|
242
|
+
* `submitReceipt`. `stepIndex` is the step's position in
|
|
243
|
+
* `route.execution.approvals` (the backend seeds its step plan in the same
|
|
244
|
+
* order). Best-effort telemetry: callers fire-and-forget so a failed report
|
|
245
|
+
* never blocks the payment flow, but a successful one lets the backend tell
|
|
246
|
+
* "approve landed, main never followed" apart from an intent the user
|
|
247
|
+
* abandoned before signing anything.
|
|
248
|
+
*/
|
|
249
|
+
declare function submitStepReceipt(intentId: string, stepIndex: number, txHash: string): Promise<any>;
|
|
250
|
+
/**
|
|
251
|
+
* Fetches the current status for a route intent.
|
|
252
|
+
*
|
|
253
|
+
* Response contract:
|
|
254
|
+
* - 404 (throws) → intent doesn't exist. Stop polling.
|
|
255
|
+
* - 200 status: "pending" → intent exists, no receipt yet. Keep polling.
|
|
256
|
+
* - 200 status: "submitted" → receipt in, tx in flight. Keep polling.
|
|
257
|
+
* - 200 status: "bridging" → cross-chain leg in progress. Keep polling.
|
|
258
|
+
* - 200 status: "success"/"failed" → terminal. Stop polling.
|
|
259
|
+
*
|
|
260
|
+
* A "pending" payload is a stub ({intent_id, status, intent_status,
|
|
261
|
+
* create_date}) — the full Transaction fields appear once a receipt lands.
|
|
262
|
+
*/
|
|
239
263
|
declare function getStatus(intentId: string): Promise<Transaction>;
|
|
264
|
+
/**
|
|
265
|
+
* Polls intent status until terminal ("success"/"failed") or timeout.
|
|
266
|
+
* Non-terminal statuses ("pending", "submitted", "bridging") keep the loop
|
|
267
|
+
* going; a 404 (unknown intent) throws out of the loop — don't retry it.
|
|
268
|
+
*/
|
|
240
269
|
declare function pollStatus(intentId: string, { intervalMs, timeoutMs }?: {
|
|
241
270
|
intervalMs?: number | undefined;
|
|
242
271
|
timeoutMs?: number | undefined;
|
|
@@ -283,11 +312,30 @@ type Transaction = {
|
|
|
283
312
|
destTxHash: string;
|
|
284
313
|
requestId: string;
|
|
285
314
|
transactionRequest: unknown;
|
|
286
|
-
|
|
315
|
+
/**
|
|
316
|
+
* "pending" means the intent exists but no receipt has been submitted yet —
|
|
317
|
+
* the backend returns it (HTTP 200) instead of the old 404 so pollers can
|
|
318
|
+
* tell "not ready yet, keep polling" apart from "unknown intent" (a real
|
|
319
|
+
* 404, which means stop polling). A pending response carries only
|
|
320
|
+
* `intent_id`, `status`, `intent_status`, and `create_date`; the other
|
|
321
|
+
* Transaction fields are absent until a receipt lands.
|
|
322
|
+
*/
|
|
323
|
+
status: "pending" | "submitted" | "bridging" | "success" | "failed";
|
|
287
324
|
statusRaw?: unknown;
|
|
288
325
|
routePath?: unknown;
|
|
289
326
|
routeStatus?: unknown;
|
|
327
|
+
/**
|
|
328
|
+
* Exact once landed_amount_verified is true; otherwise a pre-trade quote
|
|
329
|
+
* estimate copied in when the transaction was submitted — neither Squid's
|
|
330
|
+
* nor LiFi's status API carries a real landed-amount field, so the
|
|
331
|
+
* backend confirms it by reading the destination chain directly instead
|
|
332
|
+
* (see BVT-246). Check `landed_amount_verified` before auto-continuing
|
|
333
|
+
* on this value.
|
|
334
|
+
*/
|
|
290
335
|
toAmountWei?: string | number;
|
|
336
|
+
/** True once toAmountWei has been confirmed on-chain rather than being the
|
|
337
|
+
* pre-trade quote estimate. Wire field: `landed_amount_verified`. */
|
|
338
|
+
landed_amount_verified?: boolean;
|
|
291
339
|
fromChainBlock: number;
|
|
292
340
|
toChainBlock: number;
|
|
293
341
|
fromChainTxUrl?: string;
|
|
@@ -793,4 +841,4 @@ declare function useWalletInfo(wagmi?: WagmiBridge): {
|
|
|
793
841
|
};
|
|
794
842
|
declare function useWalletExternalDisconnect(cb: () => void): void;
|
|
795
843
|
|
|
796
|
-
export { type WalletConnectConfig as $, type ResolvedWalletConnectConfig as A, type BuildRouteBody as B, type RetryConfig as C, type DetectedWallet as D, type EIP1193 as E, type FeatureFlags as F, type RouteApproval as G, type RouteEstimate as H, IdentityStore as I, type RouteIntent as J, type RouteParams as K, type RoutePlan as L, type RouteSponsorship as M, type RoutesConfig as N, type SimpleWalletInterface as O, type PostHookRequest as P, type SponsorshipApproval as Q, type RateLimitInfo as R, type SolanaProviderLike as S, type TrustwareConfigOptions as T, type SwapTokenRef as U, type TrustwareTheme as V, type WalletMeta as W, type TrustwareWidgetMessages as X, type WalletAddressResolution as Y, type WalletAddressSource as Z, type WalletCategory as _, type WalletId as a, type WalletEcosystem as a0, type WalletIdentity as a1, type WalletIdentityAddress as a2, type WalletIdentityChainLike as a3, buildWalletIdentityAddress as a4, createWalletIdentity as a5, resolveWalletAddressForChain as a6, upsertWalletIdentityAddress as a7, buildRoute as a8, buildDepositAddress as a9, submitReceipt as aa,
|
|
844
|
+
export { type WalletConnectConfig as $, type ResolvedWalletConnectConfig as A, type BuildRouteBody as B, type RetryConfig as C, type DetectedWallet as D, type EIP1193 as E, type FeatureFlags as F, type RouteApproval as G, type RouteEstimate as H, IdentityStore as I, type RouteIntent as J, type RouteParams as K, type RoutePlan as L, type RouteSponsorship as M, type RoutesConfig as N, type SimpleWalletInterface as O, type PostHookRequest as P, type SponsorshipApproval as Q, type RateLimitInfo as R, type SolanaProviderLike as S, type TrustwareConfigOptions as T, type SwapTokenRef as U, type TrustwareTheme as V, type WalletMeta as W, type TrustwareWidgetMessages as X, type WalletAddressResolution as Y, type WalletAddressSource as Z, type WalletCategory as _, type WalletId as a, type WalletEcosystem as a0, type WalletIdentity as a1, type WalletIdentityAddress as a2, type WalletIdentityChainLike as a3, buildWalletIdentityAddress as a4, createWalletIdentity as a5, resolveWalletAddressForChain as a6, upsertWalletIdentityAddress as a7, buildRoute as a8, buildDepositAddress as a9, submitReceipt as aa, submitStepReceipt as ab, getStatus as ac, pollStatus as ad, type SolanaWalletInterface as b, type WagmiBridge as c, type WagmiConnector as d, type WalletSnapshot as e, useWalletExternalDisconnect as f, useWalletInfo as g, useWireDetectionIntoManager as h, type WalletInterFaceAPI as i, TrustwareError as j, type Transaction as k, type TrustwareEvent as l, type BuildRouteResponse as m, type BuildRouteResult as n, DEFAULT_AUTO_DETECT_PROVIDER as o, DEFAULT_FEATURE_FLAGS as p, DEFAULT_MESSAGES as q, DEFAULT_RETRY_CONFIG as r, DEFAULT_SLIPPAGE as s, type EIP6963ProviderDetail as t, useWalletConnectConnect as u, type EvmWalletInterface as v, walletManager as w, type ResolvedFeatureFlags as x, type ResolvedRetryConfig as y, type ResolvedTrustwareConfig as z };
|
|
@@ -236,7 +236,36 @@ declare function submitReceipt(intentId: string, txHash: string, sponsorshipRequ
|
|
|
236
236
|
* executes from a smart account, so the backend records the tx against the
|
|
237
237
|
* address the user actually connects with. */
|
|
238
238
|
eoaAddress?: string): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Reports the submitted tx hash for one execution step of a multi-step
|
|
241
|
+
* route — approve steps only; the main tx keeps going through
|
|
242
|
+
* `submitReceipt`. `stepIndex` is the step's position in
|
|
243
|
+
* `route.execution.approvals` (the backend seeds its step plan in the same
|
|
244
|
+
* order). Best-effort telemetry: callers fire-and-forget so a failed report
|
|
245
|
+
* never blocks the payment flow, but a successful one lets the backend tell
|
|
246
|
+
* "approve landed, main never followed" apart from an intent the user
|
|
247
|
+
* abandoned before signing anything.
|
|
248
|
+
*/
|
|
249
|
+
declare function submitStepReceipt(intentId: string, stepIndex: number, txHash: string): Promise<any>;
|
|
250
|
+
/**
|
|
251
|
+
* Fetches the current status for a route intent.
|
|
252
|
+
*
|
|
253
|
+
* Response contract:
|
|
254
|
+
* - 404 (throws) → intent doesn't exist. Stop polling.
|
|
255
|
+
* - 200 status: "pending" → intent exists, no receipt yet. Keep polling.
|
|
256
|
+
* - 200 status: "submitted" → receipt in, tx in flight. Keep polling.
|
|
257
|
+
* - 200 status: "bridging" → cross-chain leg in progress. Keep polling.
|
|
258
|
+
* - 200 status: "success"/"failed" → terminal. Stop polling.
|
|
259
|
+
*
|
|
260
|
+
* A "pending" payload is a stub ({intent_id, status, intent_status,
|
|
261
|
+
* create_date}) — the full Transaction fields appear once a receipt lands.
|
|
262
|
+
*/
|
|
239
263
|
declare function getStatus(intentId: string): Promise<Transaction>;
|
|
264
|
+
/**
|
|
265
|
+
* Polls intent status until terminal ("success"/"failed") or timeout.
|
|
266
|
+
* Non-terminal statuses ("pending", "submitted", "bridging") keep the loop
|
|
267
|
+
* going; a 404 (unknown intent) throws out of the loop — don't retry it.
|
|
268
|
+
*/
|
|
240
269
|
declare function pollStatus(intentId: string, { intervalMs, timeoutMs }?: {
|
|
241
270
|
intervalMs?: number | undefined;
|
|
242
271
|
timeoutMs?: number | undefined;
|
|
@@ -283,11 +312,30 @@ type Transaction = {
|
|
|
283
312
|
destTxHash: string;
|
|
284
313
|
requestId: string;
|
|
285
314
|
transactionRequest: unknown;
|
|
286
|
-
|
|
315
|
+
/**
|
|
316
|
+
* "pending" means the intent exists but no receipt has been submitted yet —
|
|
317
|
+
* the backend returns it (HTTP 200) instead of the old 404 so pollers can
|
|
318
|
+
* tell "not ready yet, keep polling" apart from "unknown intent" (a real
|
|
319
|
+
* 404, which means stop polling). A pending response carries only
|
|
320
|
+
* `intent_id`, `status`, `intent_status`, and `create_date`; the other
|
|
321
|
+
* Transaction fields are absent until a receipt lands.
|
|
322
|
+
*/
|
|
323
|
+
status: "pending" | "submitted" | "bridging" | "success" | "failed";
|
|
287
324
|
statusRaw?: unknown;
|
|
288
325
|
routePath?: unknown;
|
|
289
326
|
routeStatus?: unknown;
|
|
327
|
+
/**
|
|
328
|
+
* Exact once landed_amount_verified is true; otherwise a pre-trade quote
|
|
329
|
+
* estimate copied in when the transaction was submitted — neither Squid's
|
|
330
|
+
* nor LiFi's status API carries a real landed-amount field, so the
|
|
331
|
+
* backend confirms it by reading the destination chain directly instead
|
|
332
|
+
* (see BVT-246). Check `landed_amount_verified` before auto-continuing
|
|
333
|
+
* on this value.
|
|
334
|
+
*/
|
|
290
335
|
toAmountWei?: string | number;
|
|
336
|
+
/** True once toAmountWei has been confirmed on-chain rather than being the
|
|
337
|
+
* pre-trade quote estimate. Wire field: `landed_amount_verified`. */
|
|
338
|
+
landed_amount_verified?: boolean;
|
|
291
339
|
fromChainBlock: number;
|
|
292
340
|
toChainBlock: number;
|
|
293
341
|
fromChainTxUrl?: string;
|
|
@@ -793,4 +841,4 @@ declare function useWalletInfo(wagmi?: WagmiBridge): {
|
|
|
793
841
|
};
|
|
794
842
|
declare function useWalletExternalDisconnect(cb: () => void): void;
|
|
795
843
|
|
|
796
|
-
export { type WalletConnectConfig as $, type ResolvedWalletConnectConfig as A, type BuildRouteBody as B, type RetryConfig as C, type DetectedWallet as D, type EIP1193 as E, type FeatureFlags as F, type RouteApproval as G, type RouteEstimate as H, IdentityStore as I, type RouteIntent as J, type RouteParams as K, type RoutePlan as L, type RouteSponsorship as M, type RoutesConfig as N, type SimpleWalletInterface as O, type PostHookRequest as P, type SponsorshipApproval as Q, type RateLimitInfo as R, type SolanaProviderLike as S, type TrustwareConfigOptions as T, type SwapTokenRef as U, type TrustwareTheme as V, type WalletMeta as W, type TrustwareWidgetMessages as X, type WalletAddressResolution as Y, type WalletAddressSource as Z, type WalletCategory as _, type WalletId as a, type WalletEcosystem as a0, type WalletIdentity as a1, type WalletIdentityAddress as a2, type WalletIdentityChainLike as a3, buildWalletIdentityAddress as a4, createWalletIdentity as a5, resolveWalletAddressForChain as a6, upsertWalletIdentityAddress as a7, buildRoute as a8, buildDepositAddress as a9, submitReceipt as aa,
|
|
844
|
+
export { type WalletConnectConfig as $, type ResolvedWalletConnectConfig as A, type BuildRouteBody as B, type RetryConfig as C, type DetectedWallet as D, type EIP1193 as E, type FeatureFlags as F, type RouteApproval as G, type RouteEstimate as H, IdentityStore as I, type RouteIntent as J, type RouteParams as K, type RoutePlan as L, type RouteSponsorship as M, type RoutesConfig as N, type SimpleWalletInterface as O, type PostHookRequest as P, type SponsorshipApproval as Q, type RateLimitInfo as R, type SolanaProviderLike as S, type TrustwareConfigOptions as T, type SwapTokenRef as U, type TrustwareTheme as V, type WalletMeta as W, type TrustwareWidgetMessages as X, type WalletAddressResolution as Y, type WalletAddressSource as Z, type WalletCategory as _, type WalletId as a, type WalletEcosystem as a0, type WalletIdentity as a1, type WalletIdentityAddress as a2, type WalletIdentityChainLike as a3, buildWalletIdentityAddress as a4, createWalletIdentity as a5, resolveWalletAddressForChain as a6, upsertWalletIdentityAddress as a7, buildRoute as a8, buildDepositAddress as a9, submitReceipt as aa, submitStepReceipt as ab, getStatus as ac, pollStatus as ad, type SolanaWalletInterface as b, type WagmiBridge as c, type WagmiConnector as d, type WalletSnapshot as e, useWalletExternalDisconnect as f, useWalletInfo as g, useWireDetectionIntoManager as h, type WalletInterFaceAPI as i, TrustwareError as j, type Transaction as k, type TrustwareEvent as l, type BuildRouteResponse as m, type BuildRouteResult as n, DEFAULT_AUTO_DETECT_PROVIDER as o, DEFAULT_FEATURE_FLAGS as p, DEFAULT_MESSAGES as q, DEFAULT_RETRY_CONFIG as r, DEFAULT_SLIPPAGE as s, type EIP6963ProviderDetail as t, useWalletConnectConnect as u, type EvmWalletInterface as v, walletManager as w, type ResolvedFeatureFlags as x, type ResolvedRetryConfig as y, type ResolvedTrustwareConfig as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DetectedWallet, c as WagmiBridge, i as WalletInterFaceAPI, E as EIP1193, a as WalletId, t as EIP6963ProviderDetail, W as WalletMeta } from './manager-
|
|
1
|
+
import { D as DetectedWallet, c as WagmiBridge, i as WalletInterFaceAPI, E as EIP1193, a as WalletId, t as EIP6963ProviderDetail, W as WalletMeta } from './manager-BY3NHAks.js';
|
|
2
2
|
|
|
3
3
|
/** Try wagmi bridge first (if provided), otherwise return EIP-1193 adapter. */
|
|
4
4
|
declare function connectDetectedWallet(dw: DetectedWallet, opts?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DetectedWallet, c as WagmiBridge, i as WalletInterFaceAPI, E as EIP1193, a as WalletId, t as EIP6963ProviderDetail, W as WalletMeta } from './manager-
|
|
1
|
+
import { D as DetectedWallet, c as WagmiBridge, i as WalletInterFaceAPI, E as EIP1193, a as WalletId, t as EIP6963ProviderDetail, W as WalletMeta } from './manager-DT8enQbE.cjs';
|
|
2
2
|
|
|
3
3
|
/** Try wagmi bridge first (if provided), otherwise return EIP-1193 adapter. */
|
|
4
4
|
declare function connectDetectedWallet(dw: DetectedWallet, opts?: {
|
package/dist/smart-account.cjs
CHANGED
|
@@ -12265,7 +12265,7 @@ var init_constants = __esm({
|
|
|
12265
12265
|
"src/constants.ts"() {
|
|
12266
12266
|
"use strict";
|
|
12267
12267
|
SDK_NAME = "@trustware/sdk";
|
|
12268
|
-
SDK_VERSION = "1.1.
|
|
12268
|
+
SDK_VERSION = "1.1.11-staging.1";
|
|
12269
12269
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
12270
12270
|
API_PREFIX = "/api";
|
|
12271
12271
|
}
|