@trustware/sdk-staging 1.1.8-staging.3 → 1.1.8-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/blockchain-BONedEsU.d.cts +110 -0
- package/dist/blockchain-BONedEsU.d.ts +110 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{core-u95iahDO.d.cts → core-B9PJ0mUX.d.cts} +3 -2
- package/dist/{core-CVbN3gJy.d.ts → core-DrWK6PT3.d.ts} +3 -2
- package/dist/core.cjs +2290 -2247
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +4 -3
- package/dist/core.d.ts +4 -3
- package/dist/core.mjs +2277 -2244
- package/dist/core.mjs.map +1 -1
- package/dist/{detect-6MRR4B7g.d.ts → detect-BLE9aPwJ.d.ts} +2 -2
- package/dist/{detect-DVIWcXpl.d.cts → detect-Dn7A-Svt.d.cts} +2 -2
- package/dist/index.cjs +22356 -3553
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -10
- package/dist/index.d.ts +28 -10
- package/dist/index.mjs +28302 -9499
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-CXSw1h5e.d.cts → manager-C85ARoxD.d.cts} +65 -121
- package/dist/{manager-CXSw1h5e.d.ts → manager-PBjHXKjh.d.ts} +65 -121
- package/dist/smart-account.cjs +14707 -0
- package/dist/smart-account.cjs.map +1 -0
- package/dist/smart-account.d.cts +3962 -0
- package/dist/smart-account.d.ts +3962 -0
- package/dist/smart-account.mjs +14686 -0
- package/dist/smart-account.mjs.map +1 -0
- package/dist/types-B3nKHW6H.d.cts +32 -0
- package/dist/types-MtdjJgwT.d.ts +32 -0
- package/dist/wallet.cjs +29 -9
- package/dist/wallet.cjs.map +1 -1
- package/dist/wallet.d.cts +4 -3
- package/dist/wallet.d.ts +4 -3
- package/dist/wallet.mjs +16 -6
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +33042 -14248
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.d.cts +5 -4
- package/dist/widget.d.ts +5 -4
- package/dist/widget.mjs +32978 -14180
- package/dist/widget.mjs.map +1 -1
- package/package.json +17 -4
- package/dist/types-BrVfNxND.d.cts +0 -14
- package/dist/types-BrVfNxND.d.ts +0 -14
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { T as Trustware } from './core-
|
|
2
|
-
export { a as TrustwareCore, v as validateAddressForChain, b as validateBtcAddress, c as validateEvmAddress, d as validateRouteAddresses, e as validateSeiAddress, f as validateSolanaAddress } from './core-
|
|
3
|
-
import { R as RateLimitInfo,
|
|
4
|
-
export { B as
|
|
5
|
-
|
|
1
|
+
import { T as Trustware } from './core-B9PJ0mUX.cjs';
|
|
2
|
+
export { a as TrustwareCore, v as validateAddressForChain, b as validateBtcAddress, c as validateEvmAddress, d as validateRouteAddresses, e as validateSeiAddress, f as validateSolanaAddress } from './core-B9PJ0mUX.cjs';
|
|
3
|
+
import { R as RateLimitInfo, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, x as TrustwareError, T as Transaction, y as TrustwareEvent } from './manager-C85ARoxD.cjs';
|
|
4
|
+
export { B as BuildRouteResult, D as DEFAULT_AUTO_DETECT_PROVIDER, a as DEFAULT_FEATURE_FLAGS, b as DEFAULT_MESSAGES, c as DEFAULT_RETRY_CONFIG, d as DEFAULT_SLIPPAGE, e as DEFAULT_THEME, f as DetectedWallet, E as EIP1193, g as EIP6963ProviderDetail, h as EvmWalletInterface, F as FeatureFlags, I as IdentityStore, i as ResolvedFeatureFlags, j as ResolvedRetryConfig, k as ResolvedTrustwareConfig, l as ResolvedWalletConnectConfig, m as RetryConfig, n as RouteEstimate, o as RouteIntent, p as RouteParams, q as RoutePlan, r as RouteSponsorship, S as SimpleWalletInterface, s as SolanaProviderLike, t as SolanaWalletInterface, u as SponsorshipApproval, v as SwapTokenRef, z as TrustwareWidgetMessages, A as TrustwareWidgetTheme, W as WagmiBridge, C as WagmiConnector, G as WalletAddressResolution, H as WalletAddressSource, J as WalletCategory, K as WalletConnectConfig, L as WalletEcosystem, M as WalletId, N as WalletIdentity, O as WalletIdentityAddress, P as WalletIdentityChainLike, U as WalletMeta, Z as buildWalletIdentityAddress, _ as createWalletIdentity, a1 as resolveWalletAddressForChain, a3 as upsertWalletIdentityAddress, a5 as useWalletExternalDisconnect, a6 as useWalletInfo, a7 as useWireDetectionIntoManager, a8 as walletManager } from './manager-C85ARoxD.cjs';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import React__default from 'react';
|
|
7
|
+
import { C as ChainDef } from './blockchain-BONedEsU.cjs';
|
|
8
|
+
export { B as BalanceRow, a as BalanceStreamOptions, b as ChainMeta, c as ChainType, N as NativeCurrency, T as TokenDef, d as TokenMeta, e as TokenPageInfo, f as TokenPageOptions, g as TokenPageResult, h as TokenType, i as TokenWithBalance, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.cjs';
|
|
9
|
+
import { T as Token, Y as YourTokenData } from './types-B3nKHW6H.cjs';
|
|
10
|
+
export { c as connectDetectedWallet, t as toWalletInterfaceFromDetected, u as useEIP1193, f as useWagmi, g as useWalletDetection } from './detect-Dn7A-Svt.cjs';
|
|
6
11
|
export { TrustwareWidget } from './widget.cjs';
|
|
7
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import React from 'react';
|
|
9
13
|
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID } from './constants.cjs';
|
|
10
|
-
import './types-BrVfNxND.cjs';
|
|
11
14
|
|
|
12
15
|
declare class RateLimitError extends Error {
|
|
13
16
|
readonly rateLimitInfo: RateLimitInfo;
|
|
@@ -15,6 +18,21 @@ declare class RateLimitError extends Error {
|
|
|
15
18
|
constructor(info: RateLimitInfo, retriesExhausted: boolean);
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
type WalletTokenStateArgs = {
|
|
22
|
+
walletAddress: string | null;
|
|
23
|
+
selectedChain: ChainDef | null;
|
|
24
|
+
setSelectedChain: (chain: ChainDef | null) => void;
|
|
25
|
+
selectedToken: Token | null | YourTokenData;
|
|
26
|
+
setSelectedToken: (token: Token | null | YourTokenData) => void;
|
|
27
|
+
};
|
|
28
|
+
declare function useWalletTokenState({ walletAddress, selectedChain, setSelectedChain, selectedToken, setSelectedToken, }: WalletTokenStateArgs): {
|
|
29
|
+
yourWalletTokens: YourTokenData[];
|
|
30
|
+
setYourWalletTokens: React.Dispatch<React.SetStateAction<YourTokenData[]>>;
|
|
31
|
+
reloadWalletTokens: () => void;
|
|
32
|
+
yourWalletTokensLoading: boolean;
|
|
33
|
+
setYourWalletTokensLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
34
|
+
};
|
|
35
|
+
|
|
18
36
|
type Status = "idle" | "initializing" | "ready" | "error";
|
|
19
37
|
type Ctx = {
|
|
20
38
|
status: Status;
|
|
@@ -25,13 +43,13 @@ type Ctx = {
|
|
|
25
43
|
emitEvent?: (event: TrustwareEvent) => void;
|
|
26
44
|
revalidate?: () => Promise<void>;
|
|
27
45
|
};
|
|
28
|
-
declare const Ctx:
|
|
46
|
+
declare const Ctx: React__default.Context<Ctx>;
|
|
29
47
|
declare function TrustwareProvider({ config, wallet, autoDetect, children, }: {
|
|
30
48
|
config: TrustwareConfigOptions;
|
|
31
49
|
wallet?: WalletInterFaceAPI;
|
|
32
50
|
autoDetect?: boolean;
|
|
33
|
-
children:
|
|
51
|
+
children: React__default.ReactNode;
|
|
34
52
|
}): react_jsx_runtime.JSX.Element;
|
|
35
53
|
declare function useTrustware(): Ctx;
|
|
36
54
|
|
|
37
|
-
export { RateLimitError, RateLimitInfo, Transaction, Trustware, TrustwareConfigOptions, TrustwareError, TrustwareProvider, WalletInterFaceAPI, useTrustware };
|
|
55
|
+
export { ChainDef, RateLimitError, RateLimitInfo, Transaction, Trustware, TrustwareConfigOptions, TrustwareError, TrustwareProvider, WalletInterFaceAPI, YourTokenData, useTrustware, useWalletTokenState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { T as Trustware } from './core-
|
|
2
|
-
export { a as TrustwareCore, v as validateAddressForChain, b as validateBtcAddress, c as validateEvmAddress, d as validateRouteAddresses, e as validateSeiAddress, f as validateSolanaAddress } from './core-
|
|
3
|
-
import { R as RateLimitInfo,
|
|
4
|
-
export { B as
|
|
5
|
-
|
|
1
|
+
import { T as Trustware } from './core-DrWK6PT3.js';
|
|
2
|
+
export { a as TrustwareCore, v as validateAddressForChain, b as validateBtcAddress, c as validateEvmAddress, d as validateRouteAddresses, e as validateSeiAddress, f as validateSolanaAddress } from './core-DrWK6PT3.js';
|
|
3
|
+
import { R as RateLimitInfo, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, x as TrustwareError, T as Transaction, y as TrustwareEvent } from './manager-PBjHXKjh.js';
|
|
4
|
+
export { B as BuildRouteResult, D as DEFAULT_AUTO_DETECT_PROVIDER, a as DEFAULT_FEATURE_FLAGS, b as DEFAULT_MESSAGES, c as DEFAULT_RETRY_CONFIG, d as DEFAULT_SLIPPAGE, e as DEFAULT_THEME, f as DetectedWallet, E as EIP1193, g as EIP6963ProviderDetail, h as EvmWalletInterface, F as FeatureFlags, I as IdentityStore, i as ResolvedFeatureFlags, j as ResolvedRetryConfig, k as ResolvedTrustwareConfig, l as ResolvedWalletConnectConfig, m as RetryConfig, n as RouteEstimate, o as RouteIntent, p as RouteParams, q as RoutePlan, r as RouteSponsorship, S as SimpleWalletInterface, s as SolanaProviderLike, t as SolanaWalletInterface, u as SponsorshipApproval, v as SwapTokenRef, z as TrustwareWidgetMessages, A as TrustwareWidgetTheme, W as WagmiBridge, C as WagmiConnector, G as WalletAddressResolution, H as WalletAddressSource, J as WalletCategory, K as WalletConnectConfig, L as WalletEcosystem, M as WalletId, N as WalletIdentity, O as WalletIdentityAddress, P as WalletIdentityChainLike, U as WalletMeta, Z as buildWalletIdentityAddress, _ as createWalletIdentity, a1 as resolveWalletAddressForChain, a3 as upsertWalletIdentityAddress, a5 as useWalletExternalDisconnect, a6 as useWalletInfo, a7 as useWireDetectionIntoManager, a8 as walletManager } from './manager-PBjHXKjh.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import React__default from 'react';
|
|
7
|
+
import { C as ChainDef } from './blockchain-BONedEsU.js';
|
|
8
|
+
export { B as BalanceRow, a as BalanceStreamOptions, b as ChainMeta, c as ChainType, N as NativeCurrency, T as TokenDef, d as TokenMeta, e as TokenPageInfo, f as TokenPageOptions, g as TokenPageResult, h as TokenType, i as TokenWithBalance, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.js';
|
|
9
|
+
import { T as Token, Y as YourTokenData } from './types-MtdjJgwT.js';
|
|
10
|
+
export { c as connectDetectedWallet, t as toWalletInterfaceFromDetected, u as useEIP1193, f as useWagmi, g as useWalletDetection } from './detect-BLE9aPwJ.js';
|
|
6
11
|
export { TrustwareWidget } from './widget.js';
|
|
7
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import React from 'react';
|
|
9
13
|
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID } from './constants.js';
|
|
10
|
-
import './types-BrVfNxND.js';
|
|
11
14
|
|
|
12
15
|
declare class RateLimitError extends Error {
|
|
13
16
|
readonly rateLimitInfo: RateLimitInfo;
|
|
@@ -15,6 +18,21 @@ declare class RateLimitError extends Error {
|
|
|
15
18
|
constructor(info: RateLimitInfo, retriesExhausted: boolean);
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
type WalletTokenStateArgs = {
|
|
22
|
+
walletAddress: string | null;
|
|
23
|
+
selectedChain: ChainDef | null;
|
|
24
|
+
setSelectedChain: (chain: ChainDef | null) => void;
|
|
25
|
+
selectedToken: Token | null | YourTokenData;
|
|
26
|
+
setSelectedToken: (token: Token | null | YourTokenData) => void;
|
|
27
|
+
};
|
|
28
|
+
declare function useWalletTokenState({ walletAddress, selectedChain, setSelectedChain, selectedToken, setSelectedToken, }: WalletTokenStateArgs): {
|
|
29
|
+
yourWalletTokens: YourTokenData[];
|
|
30
|
+
setYourWalletTokens: React.Dispatch<React.SetStateAction<YourTokenData[]>>;
|
|
31
|
+
reloadWalletTokens: () => void;
|
|
32
|
+
yourWalletTokensLoading: boolean;
|
|
33
|
+
setYourWalletTokensLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
34
|
+
};
|
|
35
|
+
|
|
18
36
|
type Status = "idle" | "initializing" | "ready" | "error";
|
|
19
37
|
type Ctx = {
|
|
20
38
|
status: Status;
|
|
@@ -25,13 +43,13 @@ type Ctx = {
|
|
|
25
43
|
emitEvent?: (event: TrustwareEvent) => void;
|
|
26
44
|
revalidate?: () => Promise<void>;
|
|
27
45
|
};
|
|
28
|
-
declare const Ctx:
|
|
46
|
+
declare const Ctx: React__default.Context<Ctx>;
|
|
29
47
|
declare function TrustwareProvider({ config, wallet, autoDetect, children, }: {
|
|
30
48
|
config: TrustwareConfigOptions;
|
|
31
49
|
wallet?: WalletInterFaceAPI;
|
|
32
50
|
autoDetect?: boolean;
|
|
33
|
-
children:
|
|
51
|
+
children: React__default.ReactNode;
|
|
34
52
|
}): react_jsx_runtime.JSX.Element;
|
|
35
53
|
declare function useTrustware(): Ctx;
|
|
36
54
|
|
|
37
|
-
export { RateLimitError, RateLimitInfo, Transaction, Trustware, TrustwareConfigOptions, TrustwareError, TrustwareProvider, WalletInterFaceAPI, useTrustware };
|
|
55
|
+
export { ChainDef, RateLimitError, RateLimitInfo, Transaction, Trustware, TrustwareConfigOptions, TrustwareError, TrustwareProvider, WalletInterFaceAPI, YourTokenData, useTrustware, useWalletTokenState };
|