@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/README.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<pre>
|
|
4
|
+
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
5
|
+
┃ ▓▒░ T R U S T W A R E ░▒▓ ◢ SDK ◣ ┃
|
|
6
|
+
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
7
|
+
◆ ── Ξ ── ◇ ── ⬢ ── ₿ ── ⬡ ── ✦
|
|
8
|
+
cross · chain · liquidity
|
|
9
|
+
</pre>
|
|
10
|
+
|
|
1
11
|
# Trustware SDK
|
|
2
12
|
|
|
13
|
+
**Any chain. Any token. Any wallet. One drop-in widget for everyone.**
|
|
14
|
+
|
|
15
|
+
[](https://www.npmjs.com/package/@trustware/sdk)
|
|
16
|
+
[](https://www.npmjs.com/package/@trustware/sdk)
|
|
17
|
+
[](./LICENSE)
|
|
18
|
+
[](https://github.com/trustware-io/trustware-sdk/actions/workflows/ci.yml)
|
|
19
|
+
[](https://react.dev)
|
|
20
|
+
[](https://www.typescriptlang.org/)
|
|
21
|
+
|
|
22
|
+
[📚 Docs](https://docs.trustware.io) · [🌐 Website](https://trustware.io) · [📦 npm](https://www.npmjs.com/package/@trustware/sdk) · [💬 Issues](https://github.com/trustware-io/trustware-sdk/issues)
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
> 📚 **Full documentation is now at [docs.trustware.io](https://docs.trustware.io).** This README covers installation and a quick start — see the docs site for the complete API reference, integration guides, and examples.
|
|
29
|
+
|
|
3
30
|
Trustware SDK gives you three integration styles on top of the same routing and wallet infrastructure:
|
|
4
31
|
|
|
5
32
|
- a prebuilt React widget for the full deposit flow
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
type ChainMeta = {
|
|
2
|
+
id: string;
|
|
3
|
+
networkIdentifier: string;
|
|
4
|
+
nativeCurrency: {
|
|
5
|
+
symbol: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type TokenMeta = {
|
|
11
|
+
chainId: string;
|
|
12
|
+
address: `0x${string}`;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
active?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type BalanceRow = {
|
|
19
|
+
chain_key: string;
|
|
20
|
+
category: "native" | "erc20" | "spl" | "btc";
|
|
21
|
+
contract?: string;
|
|
22
|
+
address?: string;
|
|
23
|
+
symbol?: string;
|
|
24
|
+
decimals: number;
|
|
25
|
+
balance: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
logoURI?: string;
|
|
28
|
+
usdPrice?: number;
|
|
29
|
+
};
|
|
30
|
+
type WalletAddressBalanceWrapper = {
|
|
31
|
+
chain_id: string;
|
|
32
|
+
balances: BalanceRow[];
|
|
33
|
+
count: number;
|
|
34
|
+
error: string | null;
|
|
35
|
+
source: string;
|
|
36
|
+
};
|
|
37
|
+
type TokenPageOptions = {
|
|
38
|
+
cursor?: string;
|
|
39
|
+
limit?: number;
|
|
40
|
+
q?: string;
|
|
41
|
+
};
|
|
42
|
+
type TokenPageInfo = {
|
|
43
|
+
hasNextPage: boolean;
|
|
44
|
+
nextCursor?: string;
|
|
45
|
+
};
|
|
46
|
+
type TokenPageResult = {
|
|
47
|
+
data: TokenDef[];
|
|
48
|
+
pageInfo: TokenPageInfo;
|
|
49
|
+
};
|
|
50
|
+
type BalanceStreamOptions = {
|
|
51
|
+
stream?: boolean;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
strict?: boolean;
|
|
54
|
+
};
|
|
55
|
+
type ChainType = "evm" | "cosmos" | "solana" | "btc" | string;
|
|
56
|
+
interface NativeCurrency {
|
|
57
|
+
symbol: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
decimals?: number;
|
|
60
|
+
icon?: string;
|
|
61
|
+
}
|
|
62
|
+
interface ChainDef {
|
|
63
|
+
/** API commonly sends both. We canonicalize on chainId as string. */
|
|
64
|
+
chainId: string | number;
|
|
65
|
+
id?: string | number;
|
|
66
|
+
/** Keys we use to resolve chains from presets / user input */
|
|
67
|
+
networkIdentifier?: string;
|
|
68
|
+
axelarChainName?: string;
|
|
69
|
+
networkName?: string;
|
|
70
|
+
/** UI/availability flags */
|
|
71
|
+
enabled?: boolean;
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
isTestnet?: boolean;
|
|
74
|
+
/** Display */
|
|
75
|
+
chainIconURI?: string;
|
|
76
|
+
nativeCurrency?: NativeCurrency;
|
|
77
|
+
/** Kinds (some payloads use both) */
|
|
78
|
+
type?: ChainType;
|
|
79
|
+
chainType?: ChainType;
|
|
80
|
+
/** Nice-to-have extras we won't rely on but keep for completeness */
|
|
81
|
+
blockExplorerUrls?: string[];
|
|
82
|
+
rpc?: string;
|
|
83
|
+
rpcList?: string[];
|
|
84
|
+
}
|
|
85
|
+
type TokenType = "evm" | "solana" | "btc" | string;
|
|
86
|
+
interface TokenDef {
|
|
87
|
+
/** Core identity */
|
|
88
|
+
address: string;
|
|
89
|
+
chainId: string | number;
|
|
90
|
+
/** Display */
|
|
91
|
+
logoURI?: string;
|
|
92
|
+
name: string;
|
|
93
|
+
symbol: string;
|
|
94
|
+
/** Behavior / filtering */
|
|
95
|
+
decimals: number;
|
|
96
|
+
active?: boolean;
|
|
97
|
+
visible?: boolean;
|
|
98
|
+
type: TokenType;
|
|
99
|
+
/** Optional metadata */
|
|
100
|
+
usdPrice?: number;
|
|
101
|
+
coingeckoId?: string;
|
|
102
|
+
createdBy?: string;
|
|
103
|
+
subGraphIds?: string[];
|
|
104
|
+
subGraphOnly?: boolean;
|
|
105
|
+
}
|
|
106
|
+
type TokenWithBalance = TokenDef & {
|
|
107
|
+
balance?: bigint;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type { BalanceRow as B, ChainDef as C, NativeCurrency as N, TokenDef as T, WalletAddressBalanceWrapper as W, BalanceStreamOptions as a, ChainMeta as b, ChainType as c, TokenMeta as d, TokenPageInfo as e, TokenPageOptions as f, TokenPageResult as g, TokenType as h, TokenWithBalance as i };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
type ChainMeta = {
|
|
2
|
+
id: string;
|
|
3
|
+
networkIdentifier: string;
|
|
4
|
+
nativeCurrency: {
|
|
5
|
+
symbol: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type TokenMeta = {
|
|
11
|
+
chainId: string;
|
|
12
|
+
address: `0x${string}`;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
active?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type BalanceRow = {
|
|
19
|
+
chain_key: string;
|
|
20
|
+
category: "native" | "erc20" | "spl" | "btc";
|
|
21
|
+
contract?: string;
|
|
22
|
+
address?: string;
|
|
23
|
+
symbol?: string;
|
|
24
|
+
decimals: number;
|
|
25
|
+
balance: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
logoURI?: string;
|
|
28
|
+
usdPrice?: number;
|
|
29
|
+
};
|
|
30
|
+
type WalletAddressBalanceWrapper = {
|
|
31
|
+
chain_id: string;
|
|
32
|
+
balances: BalanceRow[];
|
|
33
|
+
count: number;
|
|
34
|
+
error: string | null;
|
|
35
|
+
source: string;
|
|
36
|
+
};
|
|
37
|
+
type TokenPageOptions = {
|
|
38
|
+
cursor?: string;
|
|
39
|
+
limit?: number;
|
|
40
|
+
q?: string;
|
|
41
|
+
};
|
|
42
|
+
type TokenPageInfo = {
|
|
43
|
+
hasNextPage: boolean;
|
|
44
|
+
nextCursor?: string;
|
|
45
|
+
};
|
|
46
|
+
type TokenPageResult = {
|
|
47
|
+
data: TokenDef[];
|
|
48
|
+
pageInfo: TokenPageInfo;
|
|
49
|
+
};
|
|
50
|
+
type BalanceStreamOptions = {
|
|
51
|
+
stream?: boolean;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
strict?: boolean;
|
|
54
|
+
};
|
|
55
|
+
type ChainType = "evm" | "cosmos" | "solana" | "btc" | string;
|
|
56
|
+
interface NativeCurrency {
|
|
57
|
+
symbol: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
decimals?: number;
|
|
60
|
+
icon?: string;
|
|
61
|
+
}
|
|
62
|
+
interface ChainDef {
|
|
63
|
+
/** API commonly sends both. We canonicalize on chainId as string. */
|
|
64
|
+
chainId: string | number;
|
|
65
|
+
id?: string | number;
|
|
66
|
+
/** Keys we use to resolve chains from presets / user input */
|
|
67
|
+
networkIdentifier?: string;
|
|
68
|
+
axelarChainName?: string;
|
|
69
|
+
networkName?: string;
|
|
70
|
+
/** UI/availability flags */
|
|
71
|
+
enabled?: boolean;
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
isTestnet?: boolean;
|
|
74
|
+
/** Display */
|
|
75
|
+
chainIconURI?: string;
|
|
76
|
+
nativeCurrency?: NativeCurrency;
|
|
77
|
+
/** Kinds (some payloads use both) */
|
|
78
|
+
type?: ChainType;
|
|
79
|
+
chainType?: ChainType;
|
|
80
|
+
/** Nice-to-have extras we won't rely on but keep for completeness */
|
|
81
|
+
blockExplorerUrls?: string[];
|
|
82
|
+
rpc?: string;
|
|
83
|
+
rpcList?: string[];
|
|
84
|
+
}
|
|
85
|
+
type TokenType = "evm" | "solana" | "btc" | string;
|
|
86
|
+
interface TokenDef {
|
|
87
|
+
/** Core identity */
|
|
88
|
+
address: string;
|
|
89
|
+
chainId: string | number;
|
|
90
|
+
/** Display */
|
|
91
|
+
logoURI?: string;
|
|
92
|
+
name: string;
|
|
93
|
+
symbol: string;
|
|
94
|
+
/** Behavior / filtering */
|
|
95
|
+
decimals: number;
|
|
96
|
+
active?: boolean;
|
|
97
|
+
visible?: boolean;
|
|
98
|
+
type: TokenType;
|
|
99
|
+
/** Optional metadata */
|
|
100
|
+
usdPrice?: number;
|
|
101
|
+
coingeckoId?: string;
|
|
102
|
+
createdBy?: string;
|
|
103
|
+
subGraphIds?: string[];
|
|
104
|
+
subGraphOnly?: boolean;
|
|
105
|
+
}
|
|
106
|
+
type TokenWithBalance = TokenDef & {
|
|
107
|
+
balance?: bigint;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type { BalanceRow as B, ChainDef as C, NativeCurrency as N, TokenDef as T, WalletAddressBalanceWrapper as W, BalanceStreamOptions as a, ChainMeta as b, ChainType as c, TokenMeta as d, TokenPageInfo as e, TokenPageOptions as f, TokenPageResult as g, TokenType as h, TokenWithBalance as i };
|
package/dist/constants.cjs
CHANGED
|
@@ -30,7 +30,7 @@ __export(constants_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(constants_exports);
|
|
32
32
|
var SDK_NAME = "@trustware/sdk";
|
|
33
|
-
var SDK_VERSION = "1.1.8-staging.
|
|
33
|
+
var SDK_VERSION = "1.1.8-staging.4";
|
|
34
34
|
var API_ROOT = "https://bv-staging-api.trustware.io";
|
|
35
35
|
var GTM_ID = "GTM-TZDGNCXB";
|
|
36
36
|
var API_PREFIX = "/api";
|
package/dist/constants.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-C85ARoxD.cjs';
|
|
2
|
+
import { C as ChainDef, c as ChainType, B as BalanceRow, a as BalanceStreamOptions, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.cjs';
|
|
3
|
+
import { T as Token } from './types-B3nKHW6H.cjs';
|
|
3
4
|
|
|
4
5
|
type AddressValidationResult = {
|
|
5
6
|
isValid: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-PBjHXKjh.js';
|
|
2
|
+
import { C as ChainDef, c as ChainType, B as BalanceRow, a as BalanceStreamOptions, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.js';
|
|
3
|
+
import { T as Token } from './types-MtdjJgwT.js';
|
|
3
4
|
|
|
4
5
|
type AddressValidationResult = {
|
|
5
6
|
isValid: boolean;
|