@nowramp/sdk 0.1.13 → 0.1.16

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +31 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -287,6 +287,30 @@ interface SupportedNetworksResult {
287
287
  /** Total count of networks */
288
288
  total: number;
289
289
  }
290
+ /**
291
+ * Configuration for a single field lock
292
+ */
293
+ interface FieldLockConfig {
294
+ /** Is the field locked? */
295
+ locked: boolean;
296
+ /** Locked value (required if locked is true for non-amount fields) */
297
+ value?: string | number;
298
+ /** For amounts: minimum allowed value */
299
+ min?: number;
300
+ /** For amounts: maximum allowed value */
301
+ max?: number;
302
+ }
303
+ /**
304
+ * Configuration for all field locks
305
+ * Each field is optional - if not specified, the field is not locked
306
+ */
307
+ interface FieldLocksConfig {
308
+ destinationAddress?: FieldLockConfig;
309
+ network?: FieldLockConfig;
310
+ destinationCurrency?: FieldLockConfig;
311
+ sourceAmount?: FieldLockConfig;
312
+ sourceCurrency?: FieldLockConfig;
313
+ }
290
314
  /**
291
315
  * Session type
292
316
  */
@@ -322,6 +346,11 @@ interface CreateSessionParams {
322
346
  expiresInSeconds?: number;
323
347
  /** Partner metadata */
324
348
  metadata?: Record<string, unknown>;
349
+ /**
350
+ * Field locks configuration for this session
351
+ * Allows locking specific fields to prevent user modification
352
+ */
353
+ fieldLocks?: FieldLocksConfig;
325
354
  }
326
355
  /**
327
356
  * Session data returned from API
@@ -351,6 +380,8 @@ interface Session {
351
380
  redirectUrl?: string;
352
381
  /** Metadata */
353
382
  metadata?: Record<string, unknown>;
383
+ /** Session-level field locks */
384
+ fieldLocks?: FieldLocksConfig;
354
385
  /** Associated order ID */
355
386
  orderId?: string;
356
387
  /** Expiry timestamp */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowramp/sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.16",
4
4
  "description": "Official SDK for embedding the NowRamp fiat-to-crypto widget",
5
5
  "author": "NowRamp <support@nowramp.com>",
6
6
  "license": "MIT",