@trustware/sdk-staging 1.1.8-staging.6 → 1.1.8-staging.7
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-CJMf4PvV.d.cts → core-BUe031hU.d.cts} +1 -1
- package/dist/{core-BPYlJrNb.d.ts → core-DnrIv4h8.d.ts} +1 -1
- package/dist/core.cjs +1063 -22
- 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 +1063 -22
- package/dist/core.mjs.map +1 -1
- package/dist/{detect-CWNTV5Wq.d.cts → detect-DlbgTrkm.d.cts} +1 -1
- package/dist/{detect-CaQQECVe.d.ts → detect-MWKHLhn9.d.ts} +1 -1
- package/dist/index.cjs +2286 -1046
- 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 +2281 -1040
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-DHCXknCG.d.cts → manager-DKVW7zeh.d.cts} +5 -12
- package/dist/{manager-Dtmjibzl.d.ts → manager-aOd3vkF9.d.ts} +5 -12
- package/dist/smart-account.cjs +4 -15
- package/dist/smart-account.cjs.map +1 -1
- package/dist/smart-account.d.cts +24 -24
- package/dist/smart-account.d.ts +24 -24
- package/dist/smart-account.mjs +4 -15
- package/dist/smart-account.mjs.map +1 -1
- package/dist/wallet.cjs +4 -15
- 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 +4 -15
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +2208 -952
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +2207 -951
- package/dist/widget.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -28,19 +28,12 @@ declare class TrustwareError extends Error {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
secondaryColor: string;
|
|
34
|
-
backgroundColor: string;
|
|
35
|
-
textColor: string;
|
|
36
|
-
borderColor: string;
|
|
37
|
-
radius: number;
|
|
38
|
-
};
|
|
31
|
+
/** Light or dark color mode for the widget. "system" follows the OS preference. */
|
|
32
|
+
type TrustwareTheme = "light" | "dark" | "system";
|
|
39
33
|
type TrustwareWidgetMessages = {
|
|
40
34
|
title: string;
|
|
41
35
|
description: string;
|
|
42
36
|
};
|
|
43
|
-
declare const DEFAULT_THEME: TrustwareWidgetTheme;
|
|
44
37
|
declare const DEFAULT_MESSAGES: TrustwareWidgetMessages;
|
|
45
38
|
|
|
46
39
|
type WalletId = "metamask" | "coinbase" | "walletconnect" | "rainbow" | "phantom-evm" | "phantom-solana" | "metamask-solana" | "solflare" | "backpack" | "rabby" | "brave" | "okx" | "zerion" | "taho" | "safe" | "imtoken" | "trust" | "bitget" | "kucoin";
|
|
@@ -438,7 +431,7 @@ type TrustwareConfigOptions = {
|
|
|
438
431
|
};
|
|
439
432
|
};
|
|
440
433
|
autoDetectProvider?: boolean;
|
|
441
|
-
theme?:
|
|
434
|
+
theme?: TrustwareTheme;
|
|
442
435
|
messages?: Partial<TrustwareWidgetMessages>;
|
|
443
436
|
retry?: RetryConfig;
|
|
444
437
|
walletConnect?: WalletConnectConfig;
|
|
@@ -465,7 +458,7 @@ type ResolvedTrustwareConfig = {
|
|
|
465
458
|
};
|
|
466
459
|
};
|
|
467
460
|
autoDetectProvider: boolean;
|
|
468
|
-
theme:
|
|
461
|
+
theme: TrustwareTheme;
|
|
469
462
|
messages: TrustwareWidgetMessages;
|
|
470
463
|
retry: ResolvedRetryConfig;
|
|
471
464
|
walletConnect?: ResolvedWalletConnectConfig | WalletConnectConfig | undefined;
|
|
@@ -686,4 +679,4 @@ declare function useWalletInfo(wagmi?: WagmiBridge): {
|
|
|
686
679
|
};
|
|
687
680
|
declare function useWalletExternalDisconnect(cb: () => void): void;
|
|
688
681
|
|
|
689
|
-
export {
|
|
682
|
+
export { pollStatus as $, type WagmiConnector as A, type BuildRouteResult as B, type WalletAddressResolution as C, DEFAULT_AUTO_DETECT_PROVIDER as D, type EIP1193 as E, type FeatureFlags as F, type WalletAddressSource as G, type WalletCategory as H, IdentityStore as I, type WalletConnectConfig as J, type WalletEcosystem as K, type WalletId as L, type WalletIdentity as M, type WalletIdentityAddress as N, type WalletIdentityChainLike as O, type WalletInterFaceAPI as P, type WalletMeta as Q, type RateLimitInfo as R, type SimpleWalletInterface as S, type Transaction as T, type WalletSnapshot as U, buildDepositAddress as V, type WagmiBridge as W, buildRoute as X, buildWalletIdentityAddress as Y, createWalletIdentity as Z, getStatus as _, DEFAULT_FEATURE_FLAGS as a, resolveWalletAddressForChain as a0, submitReceipt as a1, upsertWalletIdentityAddress as a2, useWalletConnectConnect as a3, useWalletExternalDisconnect as a4, useWalletInfo as a5, useWireDetectionIntoManager as a6, walletManager as a7, DEFAULT_MESSAGES as b, DEFAULT_RETRY_CONFIG as c, DEFAULT_SLIPPAGE as d, type DetectedWallet as e, type EIP6963ProviderDetail as f, type EvmWalletInterface as g, type ResolvedFeatureFlags as h, type ResolvedRetryConfig as i, type ResolvedTrustwareConfig as j, type ResolvedWalletConnectConfig as k, type RetryConfig as l, type RouteEstimate as m, type RouteIntent as n, type RouteParams as o, type RoutePlan as p, type RouteSponsorship as q, type SolanaProviderLike as r, type SolanaWalletInterface as s, type SponsorshipApproval as t, type SwapTokenRef as u, type TrustwareConfigOptions as v, TrustwareError as w, type TrustwareEvent as x, type TrustwareTheme as y, type TrustwareWidgetMessages as z };
|
|
@@ -28,19 +28,12 @@ declare class TrustwareError extends Error {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
secondaryColor: string;
|
|
34
|
-
backgroundColor: string;
|
|
35
|
-
textColor: string;
|
|
36
|
-
borderColor: string;
|
|
37
|
-
radius: number;
|
|
38
|
-
};
|
|
31
|
+
/** Light or dark color mode for the widget. "system" follows the OS preference. */
|
|
32
|
+
type TrustwareTheme = "light" | "dark" | "system";
|
|
39
33
|
type TrustwareWidgetMessages = {
|
|
40
34
|
title: string;
|
|
41
35
|
description: string;
|
|
42
36
|
};
|
|
43
|
-
declare const DEFAULT_THEME: TrustwareWidgetTheme;
|
|
44
37
|
declare const DEFAULT_MESSAGES: TrustwareWidgetMessages;
|
|
45
38
|
|
|
46
39
|
type WalletId = "metamask" | "coinbase" | "walletconnect" | "rainbow" | "phantom-evm" | "phantom-solana" | "metamask-solana" | "solflare" | "backpack" | "rabby" | "brave" | "okx" | "zerion" | "taho" | "safe" | "imtoken" | "trust" | "bitget" | "kucoin";
|
|
@@ -438,7 +431,7 @@ type TrustwareConfigOptions = {
|
|
|
438
431
|
};
|
|
439
432
|
};
|
|
440
433
|
autoDetectProvider?: boolean;
|
|
441
|
-
theme?:
|
|
434
|
+
theme?: TrustwareTheme;
|
|
442
435
|
messages?: Partial<TrustwareWidgetMessages>;
|
|
443
436
|
retry?: RetryConfig;
|
|
444
437
|
walletConnect?: WalletConnectConfig;
|
|
@@ -465,7 +458,7 @@ type ResolvedTrustwareConfig = {
|
|
|
465
458
|
};
|
|
466
459
|
};
|
|
467
460
|
autoDetectProvider: boolean;
|
|
468
|
-
theme:
|
|
461
|
+
theme: TrustwareTheme;
|
|
469
462
|
messages: TrustwareWidgetMessages;
|
|
470
463
|
retry: ResolvedRetryConfig;
|
|
471
464
|
walletConnect?: ResolvedWalletConnectConfig | WalletConnectConfig | undefined;
|
|
@@ -686,4 +679,4 @@ declare function useWalletInfo(wagmi?: WagmiBridge): {
|
|
|
686
679
|
};
|
|
687
680
|
declare function useWalletExternalDisconnect(cb: () => void): void;
|
|
688
681
|
|
|
689
|
-
export {
|
|
682
|
+
export { pollStatus as $, type WagmiConnector as A, type BuildRouteResult as B, type WalletAddressResolution as C, DEFAULT_AUTO_DETECT_PROVIDER as D, type EIP1193 as E, type FeatureFlags as F, type WalletAddressSource as G, type WalletCategory as H, IdentityStore as I, type WalletConnectConfig as J, type WalletEcosystem as K, type WalletId as L, type WalletIdentity as M, type WalletIdentityAddress as N, type WalletIdentityChainLike as O, type WalletInterFaceAPI as P, type WalletMeta as Q, type RateLimitInfo as R, type SimpleWalletInterface as S, type Transaction as T, type WalletSnapshot as U, buildDepositAddress as V, type WagmiBridge as W, buildRoute as X, buildWalletIdentityAddress as Y, createWalletIdentity as Z, getStatus as _, DEFAULT_FEATURE_FLAGS as a, resolveWalletAddressForChain as a0, submitReceipt as a1, upsertWalletIdentityAddress as a2, useWalletConnectConnect as a3, useWalletExternalDisconnect as a4, useWalletInfo as a5, useWireDetectionIntoManager as a6, walletManager as a7, DEFAULT_MESSAGES as b, DEFAULT_RETRY_CONFIG as c, DEFAULT_SLIPPAGE as d, type DetectedWallet as e, type EIP6963ProviderDetail as f, type EvmWalletInterface as g, type ResolvedFeatureFlags as h, type ResolvedRetryConfig as i, type ResolvedTrustwareConfig as j, type ResolvedWalletConnectConfig as k, type RetryConfig as l, type RouteEstimate as m, type RouteIntent as n, type RouteParams as o, type RoutePlan as p, type RouteSponsorship as q, type SolanaProviderLike as r, type SolanaWalletInterface as s, type SponsorshipApproval as t, type SwapTokenRef as u, type TrustwareConfigOptions as v, TrustwareError as w, type TrustwareEvent as x, type TrustwareTheme as y, type TrustwareWidgetMessages as z };
|
package/dist/smart-account.cjs
CHANGED
|
@@ -12265,27 +12265,19 @@ var init_constants = __esm({
|
|
|
12265
12265
|
"src/constants.ts"() {
|
|
12266
12266
|
"use strict";
|
|
12267
12267
|
SDK_NAME = "@trustware/sdk";
|
|
12268
|
-
SDK_VERSION = "1.1.8-staging.
|
|
12268
|
+
SDK_VERSION = "1.1.8-staging.7";
|
|
12269
12269
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
12270
12270
|
API_PREFIX = "/api";
|
|
12271
12271
|
}
|
|
12272
12272
|
});
|
|
12273
12273
|
|
|
12274
12274
|
// src/config/defaults.ts
|
|
12275
|
-
var DEFAULT_SLIPPAGE, DEFAULT_AUTO_DETECT_PROVIDER,
|
|
12275
|
+
var DEFAULT_SLIPPAGE, DEFAULT_AUTO_DETECT_PROVIDER, DEFAULT_MESSAGES;
|
|
12276
12276
|
var init_defaults3 = __esm({
|
|
12277
12277
|
"src/config/defaults.ts"() {
|
|
12278
12278
|
"use strict";
|
|
12279
12279
|
DEFAULT_SLIPPAGE = 1;
|
|
12280
12280
|
DEFAULT_AUTO_DETECT_PROVIDER = false;
|
|
12281
|
-
DEFAULT_THEME = {
|
|
12282
|
-
primaryColor: "#4F46E5",
|
|
12283
|
-
secondaryColor: "#6366F1",
|
|
12284
|
-
backgroundColor: "#FFFFFF",
|
|
12285
|
-
textColor: "#111827",
|
|
12286
|
-
borderColor: "#E5E7EB",
|
|
12287
|
-
radius: 8
|
|
12288
|
-
};
|
|
12289
12281
|
DEFAULT_MESSAGES = {
|
|
12290
12282
|
title: "Trustware SDK",
|
|
12291
12283
|
description: "Seamlessly bridge assets across chains with Trustware."
|
|
@@ -12345,10 +12337,7 @@ var init_store = __esm({
|
|
|
12345
12337
|
...this._cfg,
|
|
12346
12338
|
...patch,
|
|
12347
12339
|
routes: { ...this._cfg.routes, ...patch.routes ?? {} },
|
|
12348
|
-
theme:
|
|
12349
|
-
...this._cfg.theme,
|
|
12350
|
-
...patch.theme ?? {}
|
|
12351
|
-
},
|
|
12340
|
+
theme: patch.theme ?? this._cfg.theme,
|
|
12352
12341
|
messages: {
|
|
12353
12342
|
...this._cfg.messages,
|
|
12354
12343
|
...patch.messages ?? {}
|
|
@@ -13508,7 +13497,7 @@ function resolveConfig(input) {
|
|
|
13508
13497
|
...input.routes.options
|
|
13509
13498
|
}
|
|
13510
13499
|
};
|
|
13511
|
-
const theme =
|
|
13500
|
+
const theme = input.theme ?? "system";
|
|
13512
13501
|
const messages = deepMerge(DEFAULT_MESSAGES, input.messages);
|
|
13513
13502
|
const retry = {
|
|
13514
13503
|
autoRetry: input.retry?.autoRetry ?? DEFAULT_RETRY_CONFIG.autoRetry,
|