@zendfi/sdk 0.8.2 → 0.8.4

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.
@@ -1,4 +1,4 @@
1
- import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CgaLeGO4.mjs';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CdtQHVU5.mjs';
2
2
 
3
3
  /**
4
4
  * Express Webhook Handler
package/dist/express.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CgaLeGO4.js';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CdtQHVU5.js';
2
2
 
3
3
  /**
4
4
  * Express Webhook Handler
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CreateAgentApiKeyRequest, A as AgentApiKey, b as CreateAgentSessionRequest, c as AgentSession, d as AgentPaymentRequest, e as AgentPaymentResponse, f as AgentAnalytics, g as CreatePaymentIntentRequest, P as PaymentIntent, h as ConfirmPaymentIntentRequest, i as PaymentIntentEvent, j as PPPFactor, k as PricingSuggestionRequest, l as PricingSuggestion, E as EnableAutonomyRequest, m as EnableAutonomyResponse, n as AutonomyStatus, S as SmartPaymentRequest, o as SmartPaymentResponse, Z as ZendFiConfig, p as CreatePaymentRequest, q as Payment, L as ListPaymentsRequest, r as PaginatedResponse, s as CreateSubscriptionPlanRequest, t as SubscriptionPlan, u as CreateSubscriptionRequest, v as Subscription, w as CreatePaymentLinkRequest, x as PaymentLink, y as CreateInstallmentPlanRequest, I as InstallmentPlan, z as CreateEscrowRequest, B as Escrow, D as ApproveEscrowRequest, R as RefundEscrowRequest, F as DisputeEscrowRequest, G as CreateInvoiceRequest, H as Invoice, V as VerifyWebhookRequest, J as WebhookPayload, K as ApiKeyMode } from './webhook-handler-CgaLeGO4.mjs';
2
- export { X as AgentKeyId, at as ApiKeyScope, az as AutonomousDelegate, Q as Brand, aw as CaptureMethod, aF as CreateDeviceBoundSessionKeyRequest, aG as CreateDeviceBoundSessionKeyResponse, aq as CreateInstallmentPlanResponse, aC as CreateSessionKeyRequest, aD as CreateSessionKeyResponse, af as Currency, ae as Environment, a0 as EscrowId, ak as EscrowStatus, a1 as InstallmentPlanId, aj as InstallmentPlanStatus, ap as InstallmentScheduleItem, a3 as IntentId, _ as InvoiceId, as as InvoiceLineItem, al as InvoiceStatus, aJ as LinkedSessionInfo, Y as MerchantId, ay as PPPConfig, T as PaymentId, av as PaymentIntentStatus, a2 as PaymentLinkCode, ah as PaymentStatus, ag as PaymentToken, ar as ReleaseCondition, aA as RevokeAutonomyRequest, aK as SecurityStatus, U as SessionId, aE as SessionKeyInstructions, aP as SessionKeyListResponse, aH as SessionKeySecurityInfo, aQ as SessionKeyStats, aI as SessionKeyStatus, au as SessionLimits, aB as SmartPaymentStatus, ao as SplitRecipient, am as SplitStatus, aN as SubmitSignedTransactionRequest, aO as SubmitTransactionResponse, $ as SubscriptionId, ai as SubscriptionStatus, aL as TopUpSessionKeyRequest, aM as TopUpSessionKeyResponse, ax as UserProfile, an as WebhookEvent, O as WebhookEventHandler, W as WebhookHandlerConfig, a as WebhookHandlers, N as WebhookResult, a6 as asAgentKeyId, aa as asEscrowId, ab as asInstallmentPlanId, ad as asIntentId, a8 as asInvoiceId, a7 as asMerchantId, a4 as asPaymentId, ac as asPaymentLinkCode, a5 as asSessionId, a9 as asSubscriptionId, M as processWebhook } from './webhook-handler-CgaLeGO4.mjs';
1
+ import { C as CreateAgentApiKeyRequest, A as AgentApiKey, b as CreateAgentSessionRequest, c as AgentSession, d as AgentPaymentRequest, e as AgentPaymentResponse, f as AgentAnalytics, g as CreatePaymentIntentRequest, P as PaymentIntent, h as ConfirmPaymentIntentRequest, i as PaymentIntentEvent, j as PPPFactor, k as PricingSuggestionRequest, l as PricingSuggestion, E as EnableAutonomyRequest, m as EnableAutonomyResponse, n as AutonomyStatus, S as SmartPaymentRequest, o as SmartPaymentResponse, Z as ZendFiConfig, p as CreatePaymentRequest, q as Payment, L as ListPaymentsRequest, r as PaginatedResponse, s as CreateSubscriptionPlanRequest, t as SubscriptionPlan, u as CreateSubscriptionRequest, v as Subscription, w as CreatePaymentLinkRequest, x as PaymentLink, y as CreateInstallmentPlanRequest, I as InstallmentPlan, z as CreateEscrowRequest, B as Escrow, D as ApproveEscrowRequest, R as RefundEscrowRequest, F as DisputeEscrowRequest, G as CreateInvoiceRequest, H as Invoice, V as VerifyWebhookRequest, J as WebhookPayload, K as ApiKeyMode } from './webhook-handler-CdtQHVU5.mjs';
2
+ export { X as AgentKeyId, at as ApiKeyScope, az as AutonomousDelegate, Q as Brand, aw as CaptureMethod, aF as CreateDeviceBoundSessionKeyRequest, aG as CreateDeviceBoundSessionKeyResponse, aq as CreateInstallmentPlanResponse, aC as CreateSessionKeyRequest, aD as CreateSessionKeyResponse, af as Currency, ae as Environment, a0 as EscrowId, ak as EscrowStatus, a1 as InstallmentPlanId, aj as InstallmentPlanStatus, ap as InstallmentScheduleItem, a3 as IntentId, _ as InvoiceId, as as InvoiceLineItem, al as InvoiceStatus, aJ as LinkedSessionInfo, Y as MerchantId, ay as PPPConfig, T as PaymentId, av as PaymentIntentStatus, a2 as PaymentLinkCode, ah as PaymentStatus, ag as PaymentToken, ar as ReleaseCondition, aA as RevokeAutonomyRequest, aK as SecurityStatus, U as SessionId, aE as SessionKeyInstructions, aP as SessionKeyListResponse, aH as SessionKeySecurityInfo, aQ as SessionKeyStats, aI as SessionKeyStatus, au as SessionLimits, aB as SmartPaymentStatus, ao as SplitRecipient, am as SplitStatus, aN as SubmitSignedTransactionRequest, aO as SubmitTransactionResponse, $ as SubscriptionId, ai as SubscriptionStatus, aL as TopUpSessionKeyRequest, aM as TopUpSessionKeyResponse, ax as UserProfile, an as WebhookEvent, O as WebhookEventHandler, W as WebhookHandlerConfig, a as WebhookHandlers, N as WebhookResult, a6 as asAgentKeyId, aa as asEscrowId, ab as asInstallmentPlanId, ad as asIntentId, a8 as asInvoiceId, a7 as asMerchantId, a4 as asPaymentId, ac as asPaymentLinkCode, a5 as asSessionId, a9 as asSubscriptionId, M as processWebhook } from './webhook-handler-CdtQHVU5.mjs';
3
3
  import { Keypair, Transaction } from '@solana/web3.js';
4
4
 
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CreateAgentApiKeyRequest, A as AgentApiKey, b as CreateAgentSessionRequest, c as AgentSession, d as AgentPaymentRequest, e as AgentPaymentResponse, f as AgentAnalytics, g as CreatePaymentIntentRequest, P as PaymentIntent, h as ConfirmPaymentIntentRequest, i as PaymentIntentEvent, j as PPPFactor, k as PricingSuggestionRequest, l as PricingSuggestion, E as EnableAutonomyRequest, m as EnableAutonomyResponse, n as AutonomyStatus, S as SmartPaymentRequest, o as SmartPaymentResponse, Z as ZendFiConfig, p as CreatePaymentRequest, q as Payment, L as ListPaymentsRequest, r as PaginatedResponse, s as CreateSubscriptionPlanRequest, t as SubscriptionPlan, u as CreateSubscriptionRequest, v as Subscription, w as CreatePaymentLinkRequest, x as PaymentLink, y as CreateInstallmentPlanRequest, I as InstallmentPlan, z as CreateEscrowRequest, B as Escrow, D as ApproveEscrowRequest, R as RefundEscrowRequest, F as DisputeEscrowRequest, G as CreateInvoiceRequest, H as Invoice, V as VerifyWebhookRequest, J as WebhookPayload, K as ApiKeyMode } from './webhook-handler-CgaLeGO4.js';
2
- export { X as AgentKeyId, at as ApiKeyScope, az as AutonomousDelegate, Q as Brand, aw as CaptureMethod, aF as CreateDeviceBoundSessionKeyRequest, aG as CreateDeviceBoundSessionKeyResponse, aq as CreateInstallmentPlanResponse, aC as CreateSessionKeyRequest, aD as CreateSessionKeyResponse, af as Currency, ae as Environment, a0 as EscrowId, ak as EscrowStatus, a1 as InstallmentPlanId, aj as InstallmentPlanStatus, ap as InstallmentScheduleItem, a3 as IntentId, _ as InvoiceId, as as InvoiceLineItem, al as InvoiceStatus, aJ as LinkedSessionInfo, Y as MerchantId, ay as PPPConfig, T as PaymentId, av as PaymentIntentStatus, a2 as PaymentLinkCode, ah as PaymentStatus, ag as PaymentToken, ar as ReleaseCondition, aA as RevokeAutonomyRequest, aK as SecurityStatus, U as SessionId, aE as SessionKeyInstructions, aP as SessionKeyListResponse, aH as SessionKeySecurityInfo, aQ as SessionKeyStats, aI as SessionKeyStatus, au as SessionLimits, aB as SmartPaymentStatus, ao as SplitRecipient, am as SplitStatus, aN as SubmitSignedTransactionRequest, aO as SubmitTransactionResponse, $ as SubscriptionId, ai as SubscriptionStatus, aL as TopUpSessionKeyRequest, aM as TopUpSessionKeyResponse, ax as UserProfile, an as WebhookEvent, O as WebhookEventHandler, W as WebhookHandlerConfig, a as WebhookHandlers, N as WebhookResult, a6 as asAgentKeyId, aa as asEscrowId, ab as asInstallmentPlanId, ad as asIntentId, a8 as asInvoiceId, a7 as asMerchantId, a4 as asPaymentId, ac as asPaymentLinkCode, a5 as asSessionId, a9 as asSubscriptionId, M as processWebhook } from './webhook-handler-CgaLeGO4.js';
1
+ import { C as CreateAgentApiKeyRequest, A as AgentApiKey, b as CreateAgentSessionRequest, c as AgentSession, d as AgentPaymentRequest, e as AgentPaymentResponse, f as AgentAnalytics, g as CreatePaymentIntentRequest, P as PaymentIntent, h as ConfirmPaymentIntentRequest, i as PaymentIntentEvent, j as PPPFactor, k as PricingSuggestionRequest, l as PricingSuggestion, E as EnableAutonomyRequest, m as EnableAutonomyResponse, n as AutonomyStatus, S as SmartPaymentRequest, o as SmartPaymentResponse, Z as ZendFiConfig, p as CreatePaymentRequest, q as Payment, L as ListPaymentsRequest, r as PaginatedResponse, s as CreateSubscriptionPlanRequest, t as SubscriptionPlan, u as CreateSubscriptionRequest, v as Subscription, w as CreatePaymentLinkRequest, x as PaymentLink, y as CreateInstallmentPlanRequest, I as InstallmentPlan, z as CreateEscrowRequest, B as Escrow, D as ApproveEscrowRequest, R as RefundEscrowRequest, F as DisputeEscrowRequest, G as CreateInvoiceRequest, H as Invoice, V as VerifyWebhookRequest, J as WebhookPayload, K as ApiKeyMode } from './webhook-handler-CdtQHVU5.js';
2
+ export { X as AgentKeyId, at as ApiKeyScope, az as AutonomousDelegate, Q as Brand, aw as CaptureMethod, aF as CreateDeviceBoundSessionKeyRequest, aG as CreateDeviceBoundSessionKeyResponse, aq as CreateInstallmentPlanResponse, aC as CreateSessionKeyRequest, aD as CreateSessionKeyResponse, af as Currency, ae as Environment, a0 as EscrowId, ak as EscrowStatus, a1 as InstallmentPlanId, aj as InstallmentPlanStatus, ap as InstallmentScheduleItem, a3 as IntentId, _ as InvoiceId, as as InvoiceLineItem, al as InvoiceStatus, aJ as LinkedSessionInfo, Y as MerchantId, ay as PPPConfig, T as PaymentId, av as PaymentIntentStatus, a2 as PaymentLinkCode, ah as PaymentStatus, ag as PaymentToken, ar as ReleaseCondition, aA as RevokeAutonomyRequest, aK as SecurityStatus, U as SessionId, aE as SessionKeyInstructions, aP as SessionKeyListResponse, aH as SessionKeySecurityInfo, aQ as SessionKeyStats, aI as SessionKeyStatus, au as SessionLimits, aB as SmartPaymentStatus, ao as SplitRecipient, am as SplitStatus, aN as SubmitSignedTransactionRequest, aO as SubmitTransactionResponse, $ as SubscriptionId, ai as SubscriptionStatus, aL as TopUpSessionKeyRequest, aM as TopUpSessionKeyResponse, ax as UserProfile, an as WebhookEvent, O as WebhookEventHandler, W as WebhookHandlerConfig, a as WebhookHandlers, N as WebhookResult, a6 as asAgentKeyId, aa as asEscrowId, ab as asInstallmentPlanId, ad as asIntentId, a8 as asInvoiceId, a7 as asMerchantId, a4 as asPaymentId, ac as asPaymentLinkCode, a5 as asSessionId, a9 as asSubscriptionId, M as processWebhook } from './webhook-handler-CdtQHVU5.js';
3
3
  import { Keypair, Transaction } from '@solana/web3.js';
4
4
 
5
5
  /**
package/dist/index.js CHANGED
@@ -2408,7 +2408,7 @@ var DeviceBoundSessionKey = class _DeviceBoundSessionKey {
2408
2408
  }
2409
2409
  };
2410
2410
  async function encryptKeypairWithLit(keypair, options) {
2411
- const network = options?.network || "datil-dev";
2411
+ const network = options?.network || "datil";
2412
2412
  const debug = options?.debug || false;
2413
2413
  if (debug) {
2414
2414
  console.log("[Lit] Encrypting keypair with Lit Protocol...");
@@ -2543,7 +2543,7 @@ var SessionKeysAPI = class {
2543
2543
  try {
2544
2544
  this.debug(`Encrypting session key with Lit Protocol (attempt ${attempt}/${maxRetries})...`);
2545
2545
  litEncryption = await encryptKeypairWithLit(sessionKey.getKeypair(), {
2546
- network: options.litNetwork || "datil-dev",
2546
+ network: options.litNetwork || "datil",
2547
2547
  debug: this.debugMode
2548
2548
  });
2549
2549
  this.debug("Lit Protocol encryption successful - autonomous signing enabled");
@@ -3133,7 +3133,8 @@ var ZendFiClient = class {
3133
3133
  const response = await this.request("POST", "/api/v1/payment-links", {
3134
3134
  ...request,
3135
3135
  currency: request.currency || "USD",
3136
- token: request.token || "USDC"
3136
+ token: request.token || "USDC",
3137
+ onramp: request.onramp || false
3137
3138
  });
3138
3139
  return {
3139
3140
  ...response,
package/dist/index.mjs CHANGED
@@ -1941,7 +1941,7 @@ var DeviceBoundSessionKey = class _DeviceBoundSessionKey {
1941
1941
  }
1942
1942
  };
1943
1943
  async function encryptKeypairWithLit(keypair, options) {
1944
- const network = options?.network || "datil-dev";
1944
+ const network = options?.network || "datil";
1945
1945
  const debug = options?.debug || false;
1946
1946
  if (debug) {
1947
1947
  console.log("[Lit] Encrypting keypair with Lit Protocol...");
@@ -2076,7 +2076,7 @@ var SessionKeysAPI = class {
2076
2076
  try {
2077
2077
  this.debug(`Encrypting session key with Lit Protocol (attempt ${attempt}/${maxRetries})...`);
2078
2078
  litEncryption = await encryptKeypairWithLit(sessionKey.getKeypair(), {
2079
- network: options.litNetwork || "datil-dev",
2079
+ network: options.litNetwork || "datil",
2080
2080
  debug: this.debugMode
2081
2081
  });
2082
2082
  this.debug("Lit Protocol encryption successful - autonomous signing enabled");
@@ -2666,7 +2666,8 @@ var ZendFiClient = class {
2666
2666
  const response = await this.request("POST", "/api/v1/payment-links", {
2667
2667
  ...request,
2668
2668
  currency: request.currency || "USD",
2669
- token: request.token || "USDC"
2669
+ token: request.token || "USDC",
2670
+ onramp: request.onramp || false
2670
2671
  });
2671
2672
  return {
2672
2673
  ...response,
package/dist/nextjs.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CgaLeGO4.mjs';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CdtQHVU5.mjs';
2
2
 
3
3
  /**
4
4
  * Next.js Webhook Handler for App Router
package/dist/nextjs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CgaLeGO4.js';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-CdtQHVU5.js';
2
2
 
3
3
  /**
4
4
  * Next.js Webhook Handler for App Router
@@ -85,6 +85,7 @@ interface CreatePaymentLinkRequest {
85
85
  max_uses?: number;
86
86
  expires_at?: string;
87
87
  metadata?: Record<string, any>;
88
+ onramp?: boolean;
88
89
  }
89
90
  interface PaymentLink {
90
91
  link_code: string;
@@ -107,6 +108,7 @@ interface PaymentLink {
107
108
  max_uses?: number;
108
109
  uses_count?: number;
109
110
  is_active?: boolean;
111
+ onramp?: boolean;
110
112
  }
111
113
  interface Payment {
112
114
  id: string;
@@ -85,6 +85,7 @@ interface CreatePaymentLinkRequest {
85
85
  max_uses?: number;
86
86
  expires_at?: string;
87
87
  metadata?: Record<string, any>;
88
+ onramp?: boolean;
88
89
  }
89
90
  interface PaymentLink {
90
91
  link_code: string;
@@ -107,6 +108,7 @@ interface PaymentLink {
107
108
  max_uses?: number;
108
109
  uses_count?: number;
109
110
  is_active?: boolean;
111
+ onramp?: boolean;
110
112
  }
111
113
  interface Payment {
112
114
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendfi/sdk",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "Zero-config TypeScript SDK for ZendFi crypto payments",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",