@unifold/core 0.1.76 → 0.1.78

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/index.d.mts CHANGED
@@ -352,8 +352,10 @@ interface OnrampQuote {
352
352
  destination_network: string;
353
353
  exchange_rate: number;
354
354
  /**
355
- * Unified payment method type (`card` / `apple_pay` / `sepa`). Provider-native
356
- * values (e.g. Meld's `credit_debit_card`) are normalized to this vocabulary.
355
+ * Unified payment method type (`card` / `apple_pay` / `sepa` / `upi`).
356
+ * Provider-native values (e.g. Meld's `CREDIT_DEBIT_CARD`, `UPI`) are
357
+ * normalized to this vocabulary. Pass it back on the session request to keep
358
+ * the rail this quote priced.
357
359
  */
358
360
  payment_method_type: OnrampSessionPaymentMethodType;
359
361
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -402,11 +404,13 @@ declare function getOnrampQuotes(request: OnrampQuotesRequest, publishableKey?:
402
404
  * - `us_bank_account` — US bank transfer (HiFi). One account accepts ACH, wire
403
405
  * and RTP; the payer picks the rail at their bank, so it is not split into
404
406
  * per-rail methods.
407
+ * - `upi` — India's instant rail, served inside the provider's widget by the
408
+ * Indian onramps (Onramp Money, Onmeta).
405
409
  *
406
410
  * This is the account/rail family the user pays over, not how the receiving
407
411
  * account is provisioned (pooled vs dedicated) — that's a backend detail.
408
412
  */
409
- type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account';
413
+ type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account' | 'upi';
410
414
  /**
411
415
  * @deprecated Use `OnrampSessionPaymentMethodType` instead. Retained as an alias so
412
416
  * previously-released SDK consumers keep compiling.
@@ -429,8 +433,9 @@ interface OnrampSessionRequest {
429
433
  external_id?: string;
430
434
  email?: string;
431
435
  /**
432
- * Payment method type for the session (`card` / `sepa` / `apple_pay`).
433
- * Defaults to `card`.
436
+ * Payment method type for the session (`card` / `sepa` / `apple_pay` / `upi`).
437
+ * Defaults to `card`. Send back what the chosen quote reported; a method the
438
+ * provider cannot serve is rejected rather than downgraded.
434
439
  */
435
440
  payment_method_type?: OnrampSessionPaymentMethodType;
436
441
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -1138,7 +1143,7 @@ interface GetIntegrationExchangesQuery {
1138
1143
  }
1139
1144
  /**
1140
1145
  * Get the exchanges available from the Connect Exchange entrypoint
1141
- * (Coinbase, Binance, Kraken, etc.).
1146
+ * (Coinbase, Binance Pay, etc.).
1142
1147
  * Returns provider info with icons, enabled status, connection_method
1143
1148
  * ('oauth' or 'redirect'), and supported networks/currencies.
1144
1149
  */
@@ -1654,6 +1659,13 @@ interface CashAppSessionRequest {
1654
1659
  recipient_address: string;
1655
1660
  source_amount: string;
1656
1661
  external_id?: string;
1662
+ /**
1663
+ * Post-delivery calls to run on the destination chain, same constraints as
1664
+ * `createDepositAddress`. Pass the identical array here: the deposit wallet
1665
+ * the onramp pays out to is derived from the recipient *and* these calls, so
1666
+ * omitting them settles the session on a different wallet.
1667
+ */
1668
+ contract_calls?: EvmContractCall[];
1657
1669
  }
1658
1670
  interface CashAppSessionResponse {
1659
1671
  id: string;
@@ -1978,10 +1990,20 @@ interface CreateOnrampVerificationSessionRequest {
1978
1990
  /** US phone in E.164 (e.g. +12345678901). */
1979
1991
  phone: string;
1980
1992
  terms_accepted: boolean;
1981
- /** Skip email OTP when the caller has verified the address out-of-band. Phone OTP is never skippable. */
1993
+ /**
1994
+ * When `true`, skip email OTP (merchant attest — not a verification clock).
1995
+ * When `false`, Wallet Pay sends this today; API still skips email OTP
1996
+ * (TODO: honor `false` and send email OTP). Omit to require email OTP.
1997
+ */
1982
1998
  email_already_verified?: boolean;
1983
1999
  /** Optional correlation id for a planned order. */
1984
2000
  external_id?: string;
2001
+ /**
2002
+ * Your end-user id. When set, a successful OTP persists a global identity.
2003
+ * Not a skip credential. Wallet Pay omits this (Coinbase stays Redis-only
2004
+ * + JWT) until bank-transfer identity is live.
2005
+ */
2006
+ external_user_id?: string;
1985
2007
  }
1986
2008
  interface OnrampVerificationTokenResponse {
1987
2009
  token: string;
package/dist/index.d.ts CHANGED
@@ -352,8 +352,10 @@ interface OnrampQuote {
352
352
  destination_network: string;
353
353
  exchange_rate: number;
354
354
  /**
355
- * Unified payment method type (`card` / `apple_pay` / `sepa`). Provider-native
356
- * values (e.g. Meld's `credit_debit_card`) are normalized to this vocabulary.
355
+ * Unified payment method type (`card` / `apple_pay` / `sepa` / `upi`).
356
+ * Provider-native values (e.g. Meld's `CREDIT_DEBIT_CARD`, `UPI`) are
357
+ * normalized to this vocabulary. Pass it back on the session request to keep
358
+ * the rail this quote priced.
357
359
  */
358
360
  payment_method_type: OnrampSessionPaymentMethodType;
359
361
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -402,11 +404,13 @@ declare function getOnrampQuotes(request: OnrampQuotesRequest, publishableKey?:
402
404
  * - `us_bank_account` — US bank transfer (HiFi). One account accepts ACH, wire
403
405
  * and RTP; the payer picks the rail at their bank, so it is not split into
404
406
  * per-rail methods.
407
+ * - `upi` — India's instant rail, served inside the provider's widget by the
408
+ * Indian onramps (Onramp Money, Onmeta).
405
409
  *
406
410
  * This is the account/rail family the user pays over, not how the receiving
407
411
  * account is provisioned (pooled vs dedicated) — that's a backend detail.
408
412
  */
409
- type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account';
413
+ type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account' | 'upi';
410
414
  /**
411
415
  * @deprecated Use `OnrampSessionPaymentMethodType` instead. Retained as an alias so
412
416
  * previously-released SDK consumers keep compiling.
@@ -429,8 +433,9 @@ interface OnrampSessionRequest {
429
433
  external_id?: string;
430
434
  email?: string;
431
435
  /**
432
- * Payment method type for the session (`card` / `sepa` / `apple_pay`).
433
- * Defaults to `card`.
436
+ * Payment method type for the session (`card` / `sepa` / `apple_pay` / `upi`).
437
+ * Defaults to `card`. Send back what the chosen quote reported; a method the
438
+ * provider cannot serve is rejected rather than downgraded.
434
439
  */
435
440
  payment_method_type?: OnrampSessionPaymentMethodType;
436
441
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -1138,7 +1143,7 @@ interface GetIntegrationExchangesQuery {
1138
1143
  }
1139
1144
  /**
1140
1145
  * Get the exchanges available from the Connect Exchange entrypoint
1141
- * (Coinbase, Binance, Kraken, etc.).
1146
+ * (Coinbase, Binance Pay, etc.).
1142
1147
  * Returns provider info with icons, enabled status, connection_method
1143
1148
  * ('oauth' or 'redirect'), and supported networks/currencies.
1144
1149
  */
@@ -1654,6 +1659,13 @@ interface CashAppSessionRequest {
1654
1659
  recipient_address: string;
1655
1660
  source_amount: string;
1656
1661
  external_id?: string;
1662
+ /**
1663
+ * Post-delivery calls to run on the destination chain, same constraints as
1664
+ * `createDepositAddress`. Pass the identical array here: the deposit wallet
1665
+ * the onramp pays out to is derived from the recipient *and* these calls, so
1666
+ * omitting them settles the session on a different wallet.
1667
+ */
1668
+ contract_calls?: EvmContractCall[];
1657
1669
  }
1658
1670
  interface CashAppSessionResponse {
1659
1671
  id: string;
@@ -1978,10 +1990,20 @@ interface CreateOnrampVerificationSessionRequest {
1978
1990
  /** US phone in E.164 (e.g. +12345678901). */
1979
1991
  phone: string;
1980
1992
  terms_accepted: boolean;
1981
- /** Skip email OTP when the caller has verified the address out-of-band. Phone OTP is never skippable. */
1993
+ /**
1994
+ * When `true`, skip email OTP (merchant attest — not a verification clock).
1995
+ * When `false`, Wallet Pay sends this today; API still skips email OTP
1996
+ * (TODO: honor `false` and send email OTP). Omit to require email OTP.
1997
+ */
1982
1998
  email_already_verified?: boolean;
1983
1999
  /** Optional correlation id for a planned order. */
1984
2000
  external_id?: string;
2001
+ /**
2002
+ * Your end-user id. When set, a successful OTP persists a global identity.
2003
+ * Not a skip credential. Wallet Pay omits this (Coinbase stays Redis-only
2004
+ * + JWT) until bank-transfer identity is live.
2005
+ */
2006
+ external_user_id?: string;
1985
2007
  }
1986
2008
  interface OnrampVerificationTokenResponse {
1987
2009
  token: string;
package/dist/index.js CHANGED
@@ -191,7 +191,7 @@ function generatePrefixedKSUID(prefix) {
191
191
  }
192
192
 
193
193
  // src/lib/client-headers.ts
194
- var SDK_VERSION = true ? "0.1.76" : "0.0.0-dev";
194
+ var SDK_VERSION = true ? "0.1.78" : "0.0.0-dev";
195
195
  var CLIENT_VERSION_HEADER = "x-unifold-client-version";
196
196
  var CLIENT_USER_AGENT_HEADER = "x-unifold-client-user-agent";
197
197
  function detectRuntime() {
package/dist/index.mjs CHANGED
@@ -41,7 +41,7 @@ function generatePrefixedKSUID(prefix) {
41
41
  }
42
42
 
43
43
  // src/lib/client-headers.ts
44
- var SDK_VERSION = true ? "0.1.76" : "0.0.0-dev";
44
+ var SDK_VERSION = true ? "0.1.78" : "0.0.0-dev";
45
45
  var CLIENT_VERSION_HEADER = "x-unifold-client-version";
46
46
  var CLIENT_USER_AGENT_HEADER = "x-unifold-client-user-agent";
47
47
  function detectRuntime() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifold/core",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Unifold Core SDK - Core types, API client, and business logic",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",