@trustware/sdk-staging 1.0.17-staging.15 → 1.0.17-staging.17

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 CHANGED
@@ -1,8 +1,16 @@
1
1
  # Trustware SDK
2
2
 
3
- The Trustware SDK provides a React provider, prebuilt UI widget, and typed core API for bridging and top-up routes. It powers seamless fund transfers across chains, reusing resolved configurations for quoting, route selection, and transaction execution. Whether you embed the widget for a quick integration or use the imperative core for custom UIs, the SDK handles wallet detection, approvals, submission, and asset settlement under the hood.
3
+ Trustware SDK gives you three integration styles on top of the same routing and wallet infrastructure:
4
4
 
5
- This guide covers installation, configuration, integration patterns (widget-based and headless), and advanced usage.
5
+ - a prebuilt React widget for the full deposit flow
6
+ - a provider + host wallet bridge for apps that already manage wallet state
7
+ - a headless core API for custom UIs
8
+
9
+ The current widget flow is:
10
+
11
+ `Home -> Select Token -> Confirm Deposit -> Processing -> Success/Error`
12
+
13
+ The refactored widget keeps the same behavior, but the configuration surface is now documented around the actual `TrustwareConfigOptions` shape and the current widget step model.
6
14
 
7
15
  ## Installation
8
16
 
@@ -12,79 +20,117 @@ npm install @trustware/sdk
12
20
  pnpm add @trustware/sdk
13
21
  ```
14
22
 
15
- The package exposes ESM modules and ships full TypeScript types.
16
-
17
- ## Core Concepts
23
+ ## Main Exports
18
24
 
19
- - **`TrustwareProvider`** – Wraps your app to provide configuration (API key, routes, theme) via React context, making it available to the widget and core API.
20
- - **`TrustwareWidget`** – A prebuilt React component that renders a UI for quoting, wallet selection, top-up submission, and asset settlement.
21
- - **`Trustware core`** – An imperative singleton with helpers like `Trustware.runTopUp`, `Trustware.buildRoute`, and wallet utilities. Import once the provider is mounted.
22
- - **Config** – `TrustwareConfigOptions` defines your API key, default routes (e.g., toChain, toToken), slippage, theme, messages, and wallet detection behavior.
25
+ - `TrustwareProvider`
26
+ - `TrustwareWidget`
27
+ - `Trustware`
28
+ - `useTrustware`
23
29
 
24
- ## Configuration
30
+ ## Quick Start
25
31
 
26
- Create a config object at the root of your app. It merges defaults for routes, slippage, and fallbacks (e.g., `toAddress` defaults to `fromAddress` if unset). By default the widget will route funds to original address that initiated the transaction, if that address can support the new funds.
32
+ ```tsx
33
+ import {
34
+ TrustwareProvider,
35
+ TrustwareWidget,
36
+ type TrustwareConfigOptions,
37
+ } from "@trustware/sdk";
27
38
 
28
- ```ts
29
39
  const trustwareConfig = {
30
40
  apiKey: process.env.NEXT_PUBLIC_TRUSTWARE_API_KEY!,
31
41
  routes: {
32
- toChain: "8453", // Base chain ID
33
- toToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // Native ETH on Base
42
+ toChain: "8453",
43
+ toToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
34
44
  defaultSlippage: 1,
35
- // Optional defaults:
36
- // fromAddress: "0x...", // User's wallet address
37
- // toAddress: "0x...", // Destination; can be set later via Trustware.setDestinationAddress
38
45
  options: {
39
- // fixedFromAmount: "5.00", // USD amount (locks input)
40
- // minAmountOut: "1.00", // USD minimum
41
- // maxAmountOut: "100.00", // USD maximum
42
- // routeRefreshMs: 15000, // auto-refresh route quotes
46
+ routeRefreshMs: 15000,
43
47
  },
44
48
  },
45
- autoDetectProvider: true, // Enable EIP-6963/EIP-1193 wallet discovery
46
- theme: {
47
- primaryColor: "#FCB514",
48
- secondaryColor: "#FFFFFF",
49
- backgroundColor: "#000000",
50
- borderColor: "#FCB514",
51
- textColor: "#FFFFFF",
52
- radius: 16,
53
- },
49
+ autoDetectProvider: true,
54
50
  messages: {
55
- title: "Top up BasePass",
56
- description: "Bridge and add funds directly to your BasePass wallet.",
57
- },
58
- onError: (error) => {
59
- console.error("Trustware error:", error);
60
- },
61
- onSuccess: (tx) => {
62
- console.log("Trustware success:", tx);
63
- },
64
- onEvent: (event) => {
65
- // Optional: listen to all SDK events
66
- console.log("Trustware event:", event);
51
+ title: "Deposit",
52
+ description: "Move funds into the destination asset and chain.",
67
53
  },
68
54
  } satisfies TrustwareConfigOptions;
55
+
56
+ export function App() {
57
+ return (
58
+ <TrustwareProvider config={trustwareConfig}>
59
+ <TrustwareWidget />
60
+ </TrustwareProvider>
61
+ );
62
+ }
69
63
  ```
70
64
 
71
- Retrieve the resolved config anytime via `Trustware.getConfig()` (after provider mount).
65
+ ## Config Reference
66
+
67
+ `TrustwareConfigOptions` is the single source of truth. The current supported shape is:
72
68
 
73
69
  ```ts
74
- const cfg = Trustware.getConfig();
75
- console.log(cfg.routes.toChain); // "8453"
70
+ type TrustwareConfigOptions = {
71
+ apiKey: string;
72
+ routes: {
73
+ toChain: string;
74
+ toToken: string;
75
+ fromToken?: string;
76
+ fromAddress?: string;
77
+ toAddress?: string;
78
+ defaultSlippage?: number;
79
+ routeType?: string;
80
+ options?: {
81
+ routeRefreshMs?: number;
82
+ fixedFromAmount?: string | number;
83
+ minAmountOut?: string | number;
84
+ maxAmountOut?: string | number;
85
+ };
86
+ };
87
+ autoDetectProvider?: boolean;
88
+ theme?: TrustwareWidgetTheme;
89
+ messages?: Partial<TrustwareWidgetMessages>;
90
+ retry?: RetryConfig;
91
+ walletConnect?: WalletConnectConfig;
92
+ onError?: (error: TrustwareError) => void;
93
+ onSuccess?: (transaction: Transaction) => void;
94
+ onEvent?: (event: TrustwareEvent) => void;
95
+ };
76
96
  ```
77
97
 
78
- ## Integration Modes
98
+ ### Route Fields
99
+
100
+ - `routes.toChain`: destination chain key or chain id string.
101
+ - `routes.toToken`: destination token address or registry token identifier.
102
+ - `routes.fromToken`: optional source token preference.
103
+ - `routes.fromAddress`: optional source wallet override.
104
+ - `routes.toAddress`: optional destination address override.
105
+ - `routes.defaultSlippage`: optional slippage percentage. Defaults to `1`.
106
+ - `routes.routeType`: optional route flavor. Defaults to `"swap"`.
107
+
108
+ ### Route Options
109
+
110
+ - `routes.options.routeRefreshMs`: auto-refresh cadence for route previews.
111
+ - `routes.options.fixedFromAmount`: locks the widget amount input to a fixed USD amount.
112
+ - `routes.options.minAmountOut`: minimum allowed USD amount.
113
+ - `routes.options.maxAmountOut`: maximum allowed USD amount.
114
+
115
+ ### Other Config Groups
116
+
117
+ - `autoDetectProvider`: enables Trustware-managed wallet discovery.
118
+ - `theme`: widget color and radius customization.
119
+ - `messages`: top-level copy overrides.
120
+ - `retry`: API retry and rate-limit behavior.
121
+ - `walletConnect`: WalletConnect overrides.
122
+ - `onError`, `onSuccess`, `onEvent`: lifecycle callbacks.
79
123
 
80
- ### 1. Widget with Trustware-managed Wallet Detection
124
+ ## Widget Usage Patterns
81
125
 
82
- Ideal for apps without existing wallet connections. The SDK auto-discovers wallets (if `autoDetectProvider: true`) and prompts during the flow.
126
+ ### 1. Drop-In Widget With Trustware-Managed Wallet Detection
127
+
128
+ Use this when your app does not already manage a connected wallet.
83
129
 
84
130
  ```tsx
85
131
  import { TrustwareProvider, TrustwareWidget } from "@trustware/sdk";
86
132
 
87
- export function App() {
133
+ export function DepositPanel() {
88
134
  return (
89
135
  <TrustwareProvider config={trustwareConfig}>
90
136
  <TrustwareWidget />
@@ -93,272 +139,175 @@ export function App() {
93
139
  }
94
140
  ```
95
141
 
96
- - No external wallet libs (e.g., Wagmi) needed.
97
- - Call `Trustware.setDestinationAddress(address)` dynamically if the `toAddress` is determined at runtime (e.g., after smart wallet generation).
142
+ Use this mode when:
98
143
 
99
- ### 2. Widget or Headless with Host-managed Wallet
144
+ - you want the built-in wallet selection flow
145
+ - you want the full hosted deposit UX
146
+ - `autoDetectProvider` should stay enabled
100
147
 
101
- Reuse your app's wallet (e.g., via Wagmi/RainbowKit). Adapt clients to the `WalletInterfaceAPI` and inject via prop or `Trustware.useWallet`.
148
+ ### 2. Widget With a Host-Managed Wallet
149
+
150
+ Use this when your app already controls wallet connection through Wagmi, Viem, or another adapter.
102
151
 
103
152
  ```tsx
104
- import { useEffect, useMemo } from "react";
153
+ import { useMemo } from "react";
105
154
  import { useWalletClient } from "wagmi";
106
- import { TrustwareProvider, TrustwareWidget, Trustware } from "@trustware/sdk";
107
- import { useWagmi } from "@trustware/sdk/wallet"; // Adapter helper
155
+ import { TrustwareProvider, TrustwareWidget } from "@trustware/sdk";
156
+ import { useWagmi } from "@trustware/sdk/wallet";
108
157
 
109
- export function App() {
110
- const { data: wagmiClient } = useWalletClient();
158
+ export function DepositPanel() {
159
+ const { data: walletClient } = useWalletClient();
111
160
  const wallet = useMemo(
112
- () => (wagmiClient ? useWagmi(wagmiClient) : undefined),
113
- [wagmiClient],
161
+ () => (walletClient ? useWagmi(walletClient) : undefined),
162
+ [walletClient]
114
163
  );
115
164
 
116
- useEffect(() => {
117
- if (!wallet) return;
118
- Trustware.setDestinationAddress("0xDestination...");
119
- }, [wallet]);
120
-
121
165
  return (
122
166
  <TrustwareProvider
123
167
  config={trustwareConfig}
124
168
  wallet={wallet}
125
- autoDetect={false} // Skip detection; use injected wallet
169
+ autoDetect={false}
126
170
  >
127
- <TrustwareWidget /> {/* Or omit for headless */}
171
+ <TrustwareWidget />
128
172
  </TrustwareProvider>
129
173
  );
130
174
  }
131
175
  ```
132
176
 
133
- - Adapters: `useWagmi(client)` for Viem/Wagmi, `useEIP1193(provider)` for raw EIP-1193.
134
- - Attach imperatively post-mount: `Trustware.useWallet(wallet)`.
135
- - Bridge example for Wagmi:
136
-
137
- ```ts
138
- import { useEffect } from "react";
139
- import { useWalletClient } from "wagmi";
140
- import { useWagmi } from "@trustware/sdk/wallet";
141
- import { Trustware } from "@trustware/sdk";
142
-
143
- export function useTrustwareWalletBridge() {
144
- const { data } = useWalletClient();
145
-
146
- useEffect(() => {
147
- if (!data) return;
148
- const wallet = useWagmi(data);
149
- Trustware.useWallet(wallet);
150
- }, [data]);
151
- }
152
- ```
177
+ Use this mode when:
153
178
 
154
- ## Using the Widget
179
+ - your app already owns wallet state
180
+ - you do not want the SDK to pick another provider
181
+ - you want the widget UX but not the widget’s wallet discovery responsibilities
155
182
 
156
- The `<TrustwareWidget />` handles the full flow: quoting, wallet prompts, approvals, submission, and final asset settlement. It mirrors the core's lifecycle and uses the provider's config/wallet, without disrupting user flows in your application.
183
+ ### 3. Controlled Widget Shell
157
184
 
158
- - Customize via `theme` and `messages` in config.
159
- - For dynamic `toAddress`: Call `Trustware.setDestinationAddress` before render.
185
+ `TrustwareWidget` also supports basic shell control through props and a ref.
160
186
 
161
- ## Imperative API (Headless / Without Widget)
187
+ ```tsx
188
+ import { useRef } from "react";
189
+ import {
190
+ TrustwareProvider,
191
+ TrustwareWidget,
192
+ type TrustwareWidgetRef,
193
+ } from "@trustware/sdk";
162
194
 
163
- Import the core after mounting `TrustwareProvider`:
195
+ export function ControlledWidget() {
196
+ const widgetRef = useRef<TrustwareWidgetRef>(null);
164
197
 
165
- ```ts
166
- import { Trustware } from "@trustware/sdk";
198
+ return (
199
+ <TrustwareProvider config={trustwareConfig}>
200
+ <button onClick={() => widgetRef.current?.open()}>Open</button>
201
+ <TrustwareWidget
202
+ ref={widgetRef}
203
+ defaultOpen={false}
204
+ initialStep="home"
205
+ showThemeToggle={false}
206
+ onOpen={() => console.log("opened")}
207
+ onClose={() => console.log("closed")}
208
+ />
209
+ </TrustwareProvider>
210
+ );
211
+ }
167
212
  ```
168
213
 
169
- Build custom UIs with these helpers, reusing the provider's config and wallet.
170
-
171
- ### Wallet Detection and Management
214
+ Current widget props:
172
215
 
173
- - `Trustware.autoDetect()` Starts provider discovery (if enabled); returns unsubscribe.
174
- - `Trustware.useWallet(wallet)` Inject a connected wallet.
175
- - `Trustware.getWallet()` / `Trustware.getAddress()` – Get active wallet/address.
216
+ - `theme?: "light" | "dark" | "system"`
217
+ - `initialStep?: "home" | "select-token" | "crypto-pay" | "processing" | "success" | "error"`
218
+ - `defaultOpen?: boolean`
219
+ - `onOpen?: () => void`
220
+ - `onClose?: () => void`
221
+ - `showThemeToggle?: boolean`
176
222
 
177
- ### Building and Quoting Routes
223
+ ### 4. Headless Core API
178
224
 
179
- Create routes and fetch quotes before user interaction.
225
+ Use this when you want Trustware’s routing and wallet plumbing without the widget UI.
180
226
 
181
227
  ```ts
182
- const cfg = Trustware.getConfig();
183
- const fromAddress = await Trustware.getAddress();
228
+ import { Trustware } from "@trustware/sdk";
184
229
 
185
230
  const route = await Trustware.buildRoute({
186
- amount: "0.1", // In fromToken currency (e.g., ETH)
187
- fromAddress,
188
- toAddress: cfg.routes.toAddress ?? fromAddress, // Fallbacks applied
231
+ amount: "0.1",
232
+ fromAddress: await Trustware.getAddress(),
189
233
  });
190
234
 
191
235
  const quote = await Trustware.getQuote(route);
192
- console.log(quote.expectedAmountOut);
193
- ```
194
-
195
- - `amount`: Denominated in `fromToken` (defaults to native).
196
- - Fallbacks: `fromAddress` → connected wallet; `toAddress` → config → `fromAddress`.
197
-
198
- ### Running a Top-up
199
236
 
200
- Orchestrates quoting, approvals, and submission. Wrap with your UI (e.g., loading states).
201
-
202
- ```ts
203
- try {
204
- const result = await Trustware.runTopUp({
205
- amount: "0.25",
206
- fromAddress: await Trustware.getAddress(),
207
- toAddress: "0xDestination...", // Optional; uses config fallbacks
208
- });
209
-
210
- console.log("Top-up confirmed", result.txHash);
211
- } catch (err) {
212
- console.error("Top-up failed", err);
213
- }
237
+ const result = await Trustware.runTopUp({
238
+ amount: "0.1",
239
+ fromAddress: await Trustware.getAddress(),
240
+ });
214
241
  ```
215
242
 
216
- Returns: `{ txHash, receipt?, approvals? }`.
217
-
218
- ### Lifecycle Events
243
+ ## Common Config Examples
219
244
 
220
- Listen for updates mirroring the widget:
245
+ ### Fixed Amount Deposit
221
246
 
222
247
  ```ts
223
- const unsub = Trustware.on("status", (status) => {
224
- console.log("Status:", status); // e.g., "idle", "quoting", "submitting"
225
- });
226
-
227
- // Later:
228
- unsub();
248
+ const fixedAmountConfig = {
249
+ ...trustwareConfig,
250
+ routes: {
251
+ ...trustwareConfig.routes,
252
+ options: {
253
+ fixedFromAmount: "25",
254
+ },
255
+ },
256
+ } satisfies TrustwareConfigOptions;
229
257
  ```
230
258
 
231
- Events:
232
- - `status`: High-level updates.
233
- - `quote`: Latest quote.
234
- - `error`: Thrown errors (e.g., approval/bridge failures).
235
-
236
- ## Additional Utilities
237
-
238
- - `Trustware.setDestinationAddress(address)`: Updates runtime `toAddress`.
239
- - `Trustware.getConfig()`: Resolved config.
240
- - Hooks: `useTrustware()`, `useTrustwareRoute()` for advanced React flows.
241
- - Explore `src/core` for types on balances, tokens, chain metadata.
242
-
243
- ## Error Handling Tips
244
-
245
- - Surface actionable errors from `runTopUp` or `error` events (e.g., network/approval issues).
246
- - Add retry logic for transients.
247
- - Guard calls: Ensure provider mounted and wallet connected.
248
-
249
- ## Rate Limiting
250
-
251
- The SDK automatically handles API rate limits with retry logic. The backend enforces per-API-key limits and returns standard rate limit headers.
252
-
253
- ### Default Behavior
254
-
255
- Rate limiting is **enabled by default**. When a 429 (Too Many Requests) response is received:
256
- 1. The SDK waits for the time specified in the `Retry-After` header
257
- 2. Automatically retries the request (up to 3 times by default)
258
- 3. Uses exponential backoff if `Retry-After` is not provided
259
-
260
- ### Configuration
261
-
262
- Customize rate limit handling in your config:
259
+ ### Min / Max Guardrails
263
260
 
264
261
  ```ts
265
- const config = {
266
- apiKey: "...",
267
- routes: { toChain: "8453", toToken: "0x..." },
268
- retry: {
269
- autoRetry: true, // Enable/disable auto-retry on 429 (default: true)
270
- // Note: This does NOT disable backend rate limits,
271
- // only client-side retry behavior
272
- maxRetries: 3, // Max retry attempts (default: 3)
273
- baseDelayMs: 1000, // Base delay for exponential backoff (default: 1000)
274
- approachingThreshold: 5, // Trigger warning when remaining < threshold (default: 5)
275
-
276
- // Callbacks for monitoring
277
- onRateLimitInfo: (info) => {
278
- console.log(`${info.remaining}/${info.limit} requests remaining`);
279
- },
280
- onRateLimited: (info, retryCount) => {
281
- console.warn(`Rate limited! Retry ${retryCount}, waiting ${info.retryAfter}s`);
282
- },
283
- onRateLimitApproaching: (info, threshold) => {
284
- console.warn(`Approaching limit: ${info.remaining} remaining`);
262
+ const guardedConfig = {
263
+ ...trustwareConfig,
264
+ routes: {
265
+ ...trustwareConfig.routes,
266
+ options: {
267
+ minAmountOut: "10",
268
+ maxAmountOut: "250",
269
+ routeRefreshMs: 10000,
285
270
  },
286
271
  },
287
- };
272
+ } satisfies TrustwareConfigOptions;
288
273
  ```
289
274
 
290
- ### Rate Limit Info
291
-
292
- The `RateLimitInfo` object contains:
275
+ ### Runtime Destination Address
293
276
 
294
- | Field | Type | Description |
295
- |-------|------|-------------|
296
- | `limit` | number | Maximum requests allowed in the window |
297
- | `remaining` | number | Requests remaining in current window |
298
- | `reset` | number | Unix timestamp when window resets |
299
- | `retryAfter` | number? | Seconds to wait (only on 429) |
277
+ ```ts
278
+ import { Trustware } from "@trustware/sdk";
300
279
 
301
- ### Handling RateLimitError
280
+ Trustware.setDestinationAddress("0xDestination...");
281
+ ```
302
282
 
303
- If retries are exhausted, a `RateLimitError` is thrown:
283
+ ## Headless / Core Notes
304
284
 
305
- ```ts
306
- import { Trustware, RateLimitError } from "@trustware/sdk";
307
-
308
- try {
309
- await Trustware.buildRoute({ ... });
310
- } catch (err) {
311
- if (err instanceof RateLimitError) {
312
- console.error(`Rate limited: ${err.message}`);
313
- console.log(`Try again in ${err.rateLimitInfo.retryAfter}s`);
314
- }
315
- }
316
- ```
285
+ - `Trustware.getConfig()` returns the resolved config.
286
+ - `Trustware.getWallet()` and `Trustware.getAddress()` expose the active wallet.
287
+ - `Trustware.useWallet(wallet)` attaches a wallet imperatively.
288
+ - `Trustware.autoDetect()` can still be used if you want SDK-managed discovery outside the widget.
317
289
 
318
- ### Disabling Auto-Retry
290
+ ## Rate Limiting
319
291
 
320
- To handle rate limits manually (disable client-side retry):
292
+ Client retry behavior is configured through `retry`.
321
293
 
322
294
  ```ts
323
295
  const config = {
324
- // ...
296
+ ...trustwareConfig,
325
297
  retry: {
326
- autoRetry: false, // Disable auto-retry; 429s will throw immediately
327
- // Note: Backend rate limits still apply
298
+ autoRetry: true,
299
+ maxRetries: 3,
300
+ baseDelayMs: 1000,
301
+ approachingThreshold: 5,
328
302
  },
329
- };
303
+ } satisfies TrustwareConfigOptions;
330
304
  ```
331
305
 
332
- ## Bundle Size
333
-
334
- The SDK is optimized for minimal bundle impact:
335
-
336
- | Bundle | Gzipped Size |
337
- |--------|--------------|
338
- | Full SDK (ESM) | ~49 KB |
339
- | CSS Styles | ~5 KB |
340
- | **Total** | **~54 KB** |
341
-
342
- *Sizes exclude React peer dependency*
343
-
344
- Key optimizations:
345
- - Tree-shaking enabled via ES modules
346
- - ConfettiEffect lazy-loaded (only imported on success page)
347
- - Minimal Radix UI usage (only react-dialog)
348
- - CSS scoped with `tw-` prefix to avoid conflicts
349
-
350
- Run `npm run size` to check current bundle sizes.
351
-
352
- ## Troubleshooting
353
-
354
- - Mount `TrustwareProvider` once at app root.
355
- - For host wallets: Inject only after connection.
356
- - SSR/Next.js: Use `"use client";` for SDK-touching components.
357
- - No wallet? Enable `autoDetectProvider` or inject manually.
306
+ If retries are exhausted, the SDK throws `RateLimitError`.
358
307
 
359
- ## Further Reading
308
+ ## Docs
360
309
 
361
- - TypeScript defs in `src/core` for full API.
362
- - Source: Explore `sdk/src` for implementation details.
310
+ - [Integration Guide](docs/intergrationGuide.md)
363
311
  - [Core Guide](docs/coreGuide.md)
364
- - [Integrations](docs/integrationGuide.md)
312
+ - [Widget Architecture Boundaries](docs/widget-architecture-boundaries.md)
313
+ - [Widget Refactor Baseline](docs/widget-refactor-baseline.md)
@@ -29,7 +29,7 @@ __export(constants_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(constants_exports);
31
31
  var SDK_NAME = "@trustware/sdk";
32
- var SDK_VERSION = "1.0.17-staging.15";
32
+ var SDK_VERSION = "1.0.17-staging.17";
33
33
  var API_ROOT = "https://bv-staging-api.trustware.io";
34
34
  var API_PREFIX = "/api";
35
35
  var ASSETS_BASE_URL = "https://app.trustware.io";
@@ -1,6 +1,6 @@
1
1
  // src/constants.ts
2
2
  var SDK_NAME = "@trustware/sdk";
3
- var SDK_VERSION = "1.0.17-staging.15";
3
+ var SDK_VERSION = "1.0.17-staging.17";
4
4
  var API_ROOT = "https://bv-staging-api.trustware.io";
5
5
  var API_PREFIX = "/api";
6
6
  var ASSETS_BASE_URL = "https://app.trustware.io";
package/dist/core.cjs CHANGED
@@ -64,7 +64,7 @@ var init_constants = __esm({
64
64
  "src/constants.ts"() {
65
65
  "use strict";
66
66
  SDK_NAME = "@trustware/sdk";
67
- SDK_VERSION = "1.0.17-staging.15";
67
+ SDK_VERSION = "1.0.17-staging.17";
68
68
  API_ROOT = "https://bv-staging-api.trustware.io";
69
69
  API_PREFIX = "/api";
70
70
  WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
package/dist/core.mjs CHANGED
@@ -52,7 +52,7 @@ var init_constants = __esm({
52
52
  "src/constants.ts"() {
53
53
  "use strict";
54
54
  SDK_NAME = "@trustware/sdk";
55
- SDK_VERSION = "1.0.17-staging.15";
55
+ SDK_VERSION = "1.0.17-staging.17";
56
56
  API_ROOT = "https://bv-staging-api.trustware.io";
57
57
  API_PREFIX = "/api";
58
58
  WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
package/dist/index.cjs CHANGED
@@ -76,7 +76,7 @@ var init_constants = __esm({
76
76
  "src/constants.ts"() {
77
77
  "use strict";
78
78
  SDK_NAME = "@trustware/sdk";
79
- SDK_VERSION = "1.0.17-staging.15";
79
+ SDK_VERSION = "1.0.17-staging.17";
80
80
  API_ROOT = "https://bv-staging-api.trustware.io";
81
81
  API_PREFIX = "/api";
82
82
  ASSETS_BASE_URL = "https://app.trustware.io";
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ var init_constants = __esm({
54
54
  "src/constants.ts"() {
55
55
  "use strict";
56
56
  SDK_NAME = "@trustware/sdk";
57
- SDK_VERSION = "1.0.17-staging.15";
57
+ SDK_VERSION = "1.0.17-staging.17";
58
58
  API_ROOT = "https://bv-staging-api.trustware.io";
59
59
  API_PREFIX = "/api";
60
60
  ASSETS_BASE_URL = "https://app.trustware.io";
package/dist/widget.cjs CHANGED
@@ -74,7 +74,7 @@ var init_constants = __esm({
74
74
  "src/constants.ts"() {
75
75
  "use strict";
76
76
  SDK_NAME = "@trustware/sdk";
77
- SDK_VERSION = "1.0.17-staging.15";
77
+ SDK_VERSION = "1.0.17-staging.17";
78
78
  API_ROOT = "https://bv-staging-api.trustware.io";
79
79
  API_PREFIX = "/api";
80
80
  ASSETS_BASE_URL = "https://app.trustware.io";
package/dist/widget.mjs CHANGED
@@ -52,7 +52,7 @@ var init_constants = __esm({
52
52
  "src/constants.ts"() {
53
53
  "use strict";
54
54
  SDK_NAME = "@trustware/sdk";
55
- SDK_VERSION = "1.0.17-staging.15";
55
+ SDK_VERSION = "1.0.17-staging.17";
56
56
  API_ROOT = "https://bv-staging-api.trustware.io";
57
57
  API_PREFIX = "/api";
58
58
  ASSETS_BASE_URL = "https://app.trustware.io";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustware/sdk-staging",
3
- "version": "1.0.17-staging.15",
3
+ "version": "1.0.17-staging.17",
4
4
  "description": "Trustware partner SDK: quote → send → receipt → status, plus drop-in React widget.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Trustware",
@@ -62,6 +62,7 @@
62
62
  "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
63
63
  "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
64
64
  "check:surface": "node scripts/check-public-surface.mjs",
65
+ "test:widget-smoke": "npm run build && node --test scripts/widget-flow-smoke.test.mjs",
65
66
  "validate": "npm run typecheck && npm run lint:strict && npm run format:check",
66
67
  "size": "size-limit",
67
68
  "size:check": "size-limit --limit"