@trustware/sdk-staging 1.1.3-staging.20 → 1.1.3-staging.31
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 +4 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.mjs +3 -1
- package/dist/constants.mjs.map +1 -1
- package/dist/{core-B0-MyOv6.d.cts → core-DIWJpcYO.d.cts} +4 -0
- package/dist/{core-qSEzIBWs.d.ts → core-DtweriN4.d.ts} +4 -0
- package/dist/core.cjs +25 -3
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.mjs +25 -3
- package/dist/core.mjs.map +1 -1
- package/dist/index.cjs +1024 -636
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +979 -592
- package/dist/index.mjs.map +1 -1
- package/dist/wallet.cjs +5 -3
- package/dist/wallet.cjs.map +1 -1
- package/dist/wallet.mjs +5 -3
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +1022 -636
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +978 -592
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
package/dist/constants.cjs
CHANGED
|
@@ -23,14 +23,16 @@ __export(constants_exports, {
|
|
|
23
23
|
API_PREFIX: () => API_PREFIX,
|
|
24
24
|
API_ROOT: () => API_ROOT,
|
|
25
25
|
ASSETS_BASE_URL: () => ASSETS_BASE_URL,
|
|
26
|
+
GTM_ID: () => GTM_ID,
|
|
26
27
|
SDK_NAME: () => SDK_NAME,
|
|
27
28
|
SDK_VERSION: () => SDK_VERSION,
|
|
28
29
|
WALLETCONNECT_PROJECT_ID: () => WALLETCONNECT_PROJECT_ID
|
|
29
30
|
});
|
|
30
31
|
module.exports = __toCommonJS(constants_exports);
|
|
31
32
|
var SDK_NAME = "@trustware/sdk";
|
|
32
|
-
var SDK_VERSION = "1.1.3-staging.
|
|
33
|
+
var SDK_VERSION = "1.1.3-staging.31";
|
|
33
34
|
var API_ROOT = "https://bv-staging-api.trustware.io";
|
|
35
|
+
var GTM_ID = "";
|
|
34
36
|
var API_PREFIX = "/api";
|
|
35
37
|
var ASSETS_BASE_URL = "https://app.trustware.io";
|
|
36
38
|
var WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
@@ -39,6 +41,7 @@ var WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
|
39
41
|
API_PREFIX,
|
|
40
42
|
API_ROOT,
|
|
41
43
|
ASSETS_BASE_URL,
|
|
44
|
+
GTM_ID,
|
|
42
45
|
SDK_NAME,
|
|
43
46
|
SDK_VERSION,
|
|
44
47
|
WALLETCONNECT_PROJECT_ID
|
package/dist/constants.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["// constants.ts\ndeclare const __SDK_VERSION__: string;\ndeclare const __API_ROOT__: string;\n\nexport const SDK_NAME = \"@trustware/sdk\";\nexport const SDK_VERSION: string = __SDK_VERSION__;\nexport const API_ROOT: string = __API_ROOT__;\nexport const API_PREFIX = \"/api\";\n\n// Assets base URL for wallet logos and other static assets\nexport const ASSETS_BASE_URL = \"https://app.trustware.io\";\n\n// WalletConnect Cloud project ID - built into the SDK for seamless wallet connections\n// This is a public identifier (not a secret) registered with WalletConnect Cloud\nexport const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["// constants.ts\ndeclare const __SDK_VERSION__: string;\ndeclare const __API_ROOT__: string;\ndeclare const __GTM_ID__: string;\n\nexport const SDK_NAME = \"@trustware/sdk\";\nexport const SDK_VERSION: string = __SDK_VERSION__;\nexport const API_ROOT: string = __API_ROOT__;\nexport const GTM_ID: string = __GTM_ID__;\nexport const API_PREFIX = \"/api\";\n\n// Assets base URL for wallet logos and other static assets\nexport const ASSETS_BASE_URL = \"https://app.trustware.io\";\n\n// WalletConnect Cloud project ID - built into the SDK for seamless wallet connections\n// This is a public identifier (not a secret) registered with WalletConnect Cloud\nexport const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,WAAW;AACjB,IAAM,cAAsB;AAC5B,IAAM,WAAmB;AACzB,IAAM,SAAiB;AACvB,IAAM,aAAa;AAGnB,IAAM,kBAAkB;AAIxB,IAAM,2BAA2B;","names":[]}
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const SDK_NAME = "@trustware/sdk";
|
|
2
2
|
declare const SDK_VERSION: string;
|
|
3
3
|
declare const API_ROOT: string;
|
|
4
|
+
declare const GTM_ID: string;
|
|
4
5
|
declare const API_PREFIX = "/api";
|
|
5
6
|
declare const ASSETS_BASE_URL = "https://app.trustware.io";
|
|
6
7
|
declare const WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
7
8
|
|
|
8
|
-
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
|
|
9
|
+
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const SDK_NAME = "@trustware/sdk";
|
|
2
2
|
declare const SDK_VERSION: string;
|
|
3
3
|
declare const API_ROOT: string;
|
|
4
|
+
declare const GTM_ID: string;
|
|
4
5
|
declare const API_PREFIX = "/api";
|
|
5
6
|
declare const ASSETS_BASE_URL = "https://app.trustware.io";
|
|
6
7
|
declare const WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
7
8
|
|
|
8
|
-
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
|
|
9
|
+
export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
|
package/dist/constants.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// src/constants.ts
|
|
2
2
|
var SDK_NAME = "@trustware/sdk";
|
|
3
|
-
var SDK_VERSION = "1.1.3-staging.
|
|
3
|
+
var SDK_VERSION = "1.1.3-staging.31";
|
|
4
4
|
var API_ROOT = "https://bv-staging-api.trustware.io";
|
|
5
|
+
var GTM_ID = "";
|
|
5
6
|
var API_PREFIX = "/api";
|
|
6
7
|
var ASSETS_BASE_URL = "https://app.trustware.io";
|
|
7
8
|
var WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
@@ -9,6 +10,7 @@ export {
|
|
|
9
10
|
API_PREFIX,
|
|
10
11
|
API_ROOT,
|
|
11
12
|
ASSETS_BASE_URL,
|
|
13
|
+
GTM_ID,
|
|
12
14
|
SDK_NAME,
|
|
13
15
|
SDK_VERSION,
|
|
14
16
|
WALLETCONNECT_PROJECT_ID
|
package/dist/constants.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["// constants.ts\ndeclare const __SDK_VERSION__: string;\ndeclare const __API_ROOT__: string;\n\nexport const SDK_NAME = \"@trustware/sdk\";\nexport const SDK_VERSION: string = __SDK_VERSION__;\nexport const API_ROOT: string = __API_ROOT__;\nexport const API_PREFIX = \"/api\";\n\n// Assets base URL for wallet logos and other static assets\nexport const ASSETS_BASE_URL = \"https://app.trustware.io\";\n\n// WalletConnect Cloud project ID - built into the SDK for seamless wallet connections\n// This is a public identifier (not a secret) registered with WalletConnect Cloud\nexport const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["// constants.ts\ndeclare const __SDK_VERSION__: string;\ndeclare const __API_ROOT__: string;\ndeclare const __GTM_ID__: string;\n\nexport const SDK_NAME = \"@trustware/sdk\";\nexport const SDK_VERSION: string = __SDK_VERSION__;\nexport const API_ROOT: string = __API_ROOT__;\nexport const GTM_ID: string = __GTM_ID__;\nexport const API_PREFIX = \"/api\";\n\n// Assets base URL for wallet logos and other static assets\nexport const ASSETS_BASE_URL = \"https://app.trustware.io\";\n\n// WalletConnect Cloud project ID - built into the SDK for seamless wallet connections\n// This is a public identifier (not a secret) registered with WalletConnect Cloud\nexport const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";AAKO,IAAM,WAAW;AACjB,IAAM,cAAsB;AAC5B,IAAM,WAAmB;AACzB,IAAM,SAAiB;AACvB,IAAM,aAAa;AAGnB,IAAM,kBAAkB;AAIxB,IAAM,2BAA2B;","names":[]}
|
|
@@ -315,10 +315,12 @@ type ResolvedTrustwareConfig = {
|
|
|
315
315
|
type FeatureFlags = {
|
|
316
316
|
tokensPagination?: boolean;
|
|
317
317
|
balanceStreaming?: boolean;
|
|
318
|
+
shouldAllowGA4?: boolean;
|
|
318
319
|
};
|
|
319
320
|
type ResolvedFeatureFlags = {
|
|
320
321
|
tokensPagination: boolean;
|
|
321
322
|
balanceStreaming: boolean;
|
|
323
|
+
shouldAllowGA4: boolean;
|
|
322
324
|
};
|
|
323
325
|
declare const DEFAULT_SLIPPAGE = 1;
|
|
324
326
|
declare const DEFAULT_AUTO_DETECT_PROVIDER = false;
|
|
@@ -444,6 +446,8 @@ declare const Trustware: {
|
|
|
444
446
|
/** Read resolved config */
|
|
445
447
|
getConfig(): ResolvedTrustwareConfig;
|
|
446
448
|
setDestinationAddress(address?: string | null): /*elided*/ any;
|
|
449
|
+
setDestinationChain(chain: string): /*elided*/ any;
|
|
450
|
+
setDestinationToken(token: string): /*elided*/ any;
|
|
447
451
|
/** Read active wallet */
|
|
448
452
|
getWallet(): WalletInterFaceAPI | null;
|
|
449
453
|
getIdentity(): WalletIdentity;
|
|
@@ -315,10 +315,12 @@ type ResolvedTrustwareConfig = {
|
|
|
315
315
|
type FeatureFlags = {
|
|
316
316
|
tokensPagination?: boolean;
|
|
317
317
|
balanceStreaming?: boolean;
|
|
318
|
+
shouldAllowGA4?: boolean;
|
|
318
319
|
};
|
|
319
320
|
type ResolvedFeatureFlags = {
|
|
320
321
|
tokensPagination: boolean;
|
|
321
322
|
balanceStreaming: boolean;
|
|
323
|
+
shouldAllowGA4: boolean;
|
|
322
324
|
};
|
|
323
325
|
declare const DEFAULT_SLIPPAGE = 1;
|
|
324
326
|
declare const DEFAULT_AUTO_DETECT_PROVIDER = false;
|
|
@@ -444,6 +446,8 @@ declare const Trustware: {
|
|
|
444
446
|
/** Read resolved config */
|
|
445
447
|
getConfig(): ResolvedTrustwareConfig;
|
|
446
448
|
setDestinationAddress(address?: string | null): /*elided*/ any;
|
|
449
|
+
setDestinationChain(chain: string): /*elided*/ any;
|
|
450
|
+
setDestinationToken(token: string): /*elided*/ any;
|
|
447
451
|
/** Read active wallet */
|
|
448
452
|
getWallet(): WalletInterFaceAPI | null;
|
|
449
453
|
getIdentity(): WalletIdentity;
|
package/dist/core.cjs
CHANGED
|
@@ -57,7 +57,8 @@ var init_config = __esm({
|
|
|
57
57
|
};
|
|
58
58
|
DEFAULT_FEATURE_FLAGS = {
|
|
59
59
|
tokensPagination: false,
|
|
60
|
-
balanceStreaming: false
|
|
60
|
+
balanceStreaming: false,
|
|
61
|
+
shouldAllowGA4: true
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
});
|
|
@@ -68,7 +69,7 @@ var init_constants = __esm({
|
|
|
68
69
|
"src/constants.ts"() {
|
|
69
70
|
"use strict";
|
|
70
71
|
SDK_NAME = "@trustware/sdk";
|
|
71
|
-
SDK_VERSION = "1.1.3-staging.
|
|
72
|
+
SDK_VERSION = "1.1.3-staging.31";
|
|
72
73
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
73
74
|
API_PREFIX = "/api";
|
|
74
75
|
WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
|
|
@@ -160,7 +161,8 @@ function resolveConfig(input) {
|
|
|
160
161
|
const walletConnect = resolveWalletConnectConfig(input.walletConnect);
|
|
161
162
|
const features = {
|
|
162
163
|
tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
|
|
163
|
-
balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming
|
|
164
|
+
balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
|
|
165
|
+
shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4
|
|
164
166
|
};
|
|
165
167
|
return {
|
|
166
168
|
apiKey: input.apiKey,
|
|
@@ -3535,6 +3537,26 @@ var Trustware = {
|
|
|
3535
3537
|
});
|
|
3536
3538
|
return Trustware;
|
|
3537
3539
|
},
|
|
3540
|
+
setDestinationChain(chain) {
|
|
3541
|
+
const prev = TrustwareConfigStore.get();
|
|
3542
|
+
TrustwareConfigStore.update({
|
|
3543
|
+
routes: {
|
|
3544
|
+
...prev.routes,
|
|
3545
|
+
toChain: chain
|
|
3546
|
+
}
|
|
3547
|
+
});
|
|
3548
|
+
return Trustware;
|
|
3549
|
+
},
|
|
3550
|
+
setDestinationToken(token) {
|
|
3551
|
+
const prev = TrustwareConfigStore.get();
|
|
3552
|
+
TrustwareConfigStore.update({
|
|
3553
|
+
routes: {
|
|
3554
|
+
...prev.routes,
|
|
3555
|
+
toToken: token
|
|
3556
|
+
}
|
|
3557
|
+
});
|
|
3558
|
+
return Trustware;
|
|
3559
|
+
},
|
|
3538
3560
|
/** Read active wallet */
|
|
3539
3561
|
getWallet() {
|
|
3540
3562
|
return walletManager.wallet;
|