@trustware/sdk-staging 1.1.4-staging.34 → 1.1.4-staging.36

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.
@@ -30,12 +30,12 @@ __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.4-staging.34";
33
+ var SDK_VERSION = "1.1.4-staging.36";
34
34
  var API_ROOT = "https://bv-staging-api.trustware.io";
35
35
  var GTM_ID = "GTM-TZDGNCXB";
36
36
  var API_PREFIX = "/api";
37
+ var WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
37
38
  var ASSETS_BASE_URL = "https://app.trustware.io";
38
- var WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
39
39
  // Annotate the CommonJS export names for ESM import in node:
40
40
  0 && (module.exports = {
41
41
  API_PREFIX,
@@ -1 +1 @@
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":[]}
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;\ndeclare const __WALLETCONNECT_PROJECT_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\";\nexport const WALLETCONNECT_PROJECT_ID = __WALLETCONNECT_PROJECT_ID__;\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\n// export const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,WAAW;AACjB,IAAM,cAAsB;AAC5B,IAAM,WAAmB;AACzB,IAAM,SAAiB;AACvB,IAAM,aAAa;AACnB,IAAM,2BAA2B;AAGjC,IAAM,kBAAkB;","names":[]}
@@ -3,7 +3,7 @@ declare const SDK_VERSION: string;
3
3
  declare const API_ROOT: string;
4
4
  declare const GTM_ID: string;
5
5
  declare const API_PREFIX = "/api";
6
+ declare const WALLETCONNECT_PROJECT_ID: string;
6
7
  declare const ASSETS_BASE_URL = "https://app.trustware.io";
7
- declare const WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
8
8
 
9
9
  export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
@@ -3,7 +3,7 @@ declare const SDK_VERSION: string;
3
3
  declare const API_ROOT: string;
4
4
  declare const GTM_ID: string;
5
5
  declare const API_PREFIX = "/api";
6
+ declare const WALLETCONNECT_PROJECT_ID: string;
6
7
  declare const ASSETS_BASE_URL = "https://app.trustware.io";
7
- declare const WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
8
8
 
9
9
  export { API_PREFIX, API_ROOT, ASSETS_BASE_URL, GTM_ID, SDK_NAME, SDK_VERSION, WALLETCONNECT_PROJECT_ID };
@@ -1,11 +1,11 @@
1
1
  // src/constants.ts
2
2
  var SDK_NAME = "@trustware/sdk";
3
- var SDK_VERSION = "1.1.4-staging.34";
3
+ var SDK_VERSION = "1.1.4-staging.36";
4
4
  var API_ROOT = "https://bv-staging-api.trustware.io";
5
5
  var GTM_ID = "GTM-TZDGNCXB";
6
6
  var API_PREFIX = "/api";
7
+ var WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
7
8
  var ASSETS_BASE_URL = "https://app.trustware.io";
8
- var WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
9
9
  export {
10
10
  API_PREFIX,
11
11
  API_ROOT,
@@ -1 +1 @@
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":[]}
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;\ndeclare const __WALLETCONNECT_PROJECT_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\";\nexport const WALLETCONNECT_PROJECT_ID = __WALLETCONNECT_PROJECT_ID__;\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\n// export const WALLETCONNECT_PROJECT_ID = \"4ead125c-63be-4b1a-a835-cef2dce67b84\";\n"],"mappings":";AAMO,IAAM,WAAW;AACjB,IAAM,cAAsB;AAC5B,IAAM,WAAmB;AACzB,IAAM,SAAiB;AACvB,IAAM,aAAa;AACnB,IAAM,2BAA2B;AAGjC,IAAM,kBAAkB;","names":[]}
@@ -306,7 +306,7 @@ type ResolvedTrustwareConfig = {
306
306
  theme: TrustwareWidgetTheme;
307
307
  messages: TrustwareWidgetMessages;
308
308
  retry: ResolvedRetryConfig;
309
- walletConnect?: ResolvedWalletConnectConfig;
309
+ walletConnect?: ResolvedWalletConnectConfig | WalletConnectConfig | undefined;
310
310
  features: ResolvedFeatureFlags;
311
311
  onError?: (error: TrustwareError) => void;
312
312
  onSuccess?: (transaction: Transaction) => void;
@@ -306,7 +306,7 @@ type ResolvedTrustwareConfig = {
306
306
  theme: TrustwareWidgetTheme;
307
307
  messages: TrustwareWidgetMessages;
308
308
  retry: ResolvedRetryConfig;
309
- walletConnect?: ResolvedWalletConnectConfig;
309
+ walletConnect?: ResolvedWalletConnectConfig | WalletConnectConfig | undefined;
310
310
  features: ResolvedFeatureFlags;
311
311
  onError?: (error: TrustwareError) => void;
312
312
  onSuccess?: (transaction: Transaction) => void;
package/dist/core.cjs CHANGED
@@ -63,47 +63,7 @@ var init_config = __esm({
63
63
  }
64
64
  });
65
65
 
66
- // src/constants.ts
67
- var SDK_NAME, SDK_VERSION, API_ROOT, API_PREFIX, WALLETCONNECT_PROJECT_ID;
68
- var init_constants = __esm({
69
- "src/constants.ts"() {
70
- "use strict";
71
- SDK_NAME = "@trustware/sdk";
72
- SDK_VERSION = "1.1.4-staging.34";
73
- API_ROOT = "https://bv-staging-api.trustware.io";
74
- API_PREFIX = "/api";
75
- WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
76
- }
77
- });
78
-
79
66
  // src/config/merge.ts
80
- function resolveWalletConnectConfig(input) {
81
- if (input?.disabled) return void 0;
82
- const projectId = input?.projectId ?? WALLETCONNECT_PROJECT_ID;
83
- return {
84
- projectId,
85
- chains: input?.chains ?? [1],
86
- // Default to Ethereum mainnet
87
- optionalChains: input?.optionalChains ?? [
88
- 1,
89
- 10,
90
- 56,
91
- 137,
92
- 8453,
93
- 42161,
94
- 43114
95
- ],
96
- // ETH, OP, BSC, Polygon, Base, Arbitrum, Avalanche
97
- metadata: {
98
- name: input?.metadata?.name ?? "Trustware",
99
- description: input?.metadata?.description ?? "Cross-chain bridge & top-up",
100
- url: input?.metadata?.url ?? "https://trustware.io",
101
- icons: input?.metadata?.icons ?? ["https://app.trustware.io/icon.png"]
102
- },
103
- relayUrl: input?.relayUrl,
104
- showQrModal: input?.showQrModal ?? true
105
- };
106
- }
107
67
  function deepMerge(base, patch) {
108
68
  if (!patch) return { ...base };
109
69
  const out = Array.isArray(base) ? [...base] : { ...base };
@@ -158,7 +118,7 @@ function resolveConfig(input) {
158
118
  onRateLimited: input.retry?.onRateLimited,
159
119
  onRateLimitApproaching: input.retry?.onRateLimitApproaching
160
120
  };
161
- const walletConnect = resolveWalletConnectConfig(input.walletConnect);
121
+ const walletConnect = input.walletConnect;
162
122
  const features = {
163
123
  tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
164
124
  balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
@@ -183,7 +143,6 @@ var init_merge = __esm({
183
143
  "use strict";
184
144
  init_defaults();
185
145
  init_config();
186
- init_constants();
187
146
  }
188
147
  });
189
148
 
@@ -270,6 +229,18 @@ var init_store = __esm({
270
229
  }
271
230
  });
272
231
 
232
+ // src/constants.ts
233
+ var SDK_NAME, SDK_VERSION, API_ROOT, API_PREFIX;
234
+ var init_constants = __esm({
235
+ "src/constants.ts"() {
236
+ "use strict";
237
+ SDK_NAME = "@trustware/sdk";
238
+ SDK_VERSION = "1.1.4-staging.36";
239
+ API_ROOT = "https://bv-staging-api.trustware.io";
240
+ API_PREFIX = "/api";
241
+ }
242
+ });
243
+
273
244
  // src/config/index.ts
274
245
  var init_config2 = __esm({
275
246
  "src/config/index.ts"() {