@zendfi/sdk 0.5.8 → 0.7.0
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 +220 -12
- package/dist/cache-T5YPC7OK.mjs +9 -0
- package/dist/{chunk-YFOBPGQE.mjs → chunk-3ACJUM6V.mjs} +0 -8
- package/dist/chunk-5O5NAX65.mjs +366 -0
- package/dist/chunk-XERHBDUK.mjs +587 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/device-bound-crypto-VX7SFVHT.mjs +13 -0
- package/dist/express.d.mts +1 -1
- package/dist/express.d.ts +1 -1
- package/dist/express.mjs +2 -1
- package/dist/index.d.mts +1267 -3
- package/dist/index.d.ts +1267 -3
- package/dist/index.js +3765 -516
- package/dist/index.mjs +2783 -516
- package/dist/nextjs.d.mts +1 -1
- package/dist/nextjs.d.ts +1 -1
- package/dist/nextjs.mjs +2 -1
- package/dist/{webhook-handler-D5CigE9G.d.mts → webhook-handler-D5INiR-l.d.mts} +21 -1
- package/dist/{webhook-handler-D5CigE9G.d.ts → webhook-handler-D5INiR-l.d.ts} +21 -1
- package/package.json +5 -4
package/dist/nextjs.d.mts
CHANGED
package/dist/nextjs.d.ts
CHANGED
package/dist/nextjs.mjs
CHANGED
|
@@ -816,6 +816,10 @@ interface AgentAnalytics {
|
|
|
816
816
|
interface CreateSessionKeyRequest {
|
|
817
817
|
/** User's main wallet address */
|
|
818
818
|
user_wallet: string;
|
|
819
|
+
/** Agent identifier for cross-app compatibility (e.g., "shopping-assistant-v1") */
|
|
820
|
+
agent_id: string;
|
|
821
|
+
/** Human-readable agent name (e.g., "AI Shopping Assistant") */
|
|
822
|
+
agent_name?: string;
|
|
819
823
|
/** Spending limit in USDC */
|
|
820
824
|
limit_usdc: number;
|
|
821
825
|
/** Duration in days (1-30) */
|
|
@@ -841,6 +845,10 @@ interface CreateSessionKeyResponse {
|
|
|
841
845
|
session_key_id: string;
|
|
842
846
|
/** User's main wallet address */
|
|
843
847
|
user_wallet: string;
|
|
848
|
+
/** Agent identifier */
|
|
849
|
+
agent_id: string;
|
|
850
|
+
/** Agent name (if provided) */
|
|
851
|
+
agent_name?: string;
|
|
844
852
|
/** Spending limit in USDC */
|
|
845
853
|
limit_usdc: number;
|
|
846
854
|
/** Expiration timestamp */
|
|
@@ -849,6 +857,8 @@ interface CreateSessionKeyResponse {
|
|
|
849
857
|
requires_approval: boolean;
|
|
850
858
|
/** Base64 encoded approval transaction (user must sign) */
|
|
851
859
|
approval_transaction: string;
|
|
860
|
+
/** True if this session key works across multiple apps with same agent_id */
|
|
861
|
+
cross_app_compatible: boolean;
|
|
852
862
|
/** Setup instructions */
|
|
853
863
|
instructions: SessionKeyInstructions;
|
|
854
864
|
}
|
|
@@ -865,6 +875,10 @@ interface SessionKeyInstructions {
|
|
|
865
875
|
interface CreateDeviceBoundSessionKeyRequest {
|
|
866
876
|
/** User's main wallet address */
|
|
867
877
|
user_wallet: string;
|
|
878
|
+
/** Agent identifier for cross-app compatibility (e.g., "shopping-assistant-v1") */
|
|
879
|
+
agent_id: string;
|
|
880
|
+
/** Human-readable agent name (e.g., "AI Shopping Assistant") */
|
|
881
|
+
agent_name?: string;
|
|
868
882
|
/** Spending limit in USDC */
|
|
869
883
|
limit_usdc: number;
|
|
870
884
|
/** Duration in days (1-30) */
|
|
@@ -892,6 +906,10 @@ interface CreateDeviceBoundSessionKeyResponse {
|
|
|
892
906
|
is_custodial: boolean;
|
|
893
907
|
/** User's main wallet address */
|
|
894
908
|
user_wallet: string;
|
|
909
|
+
/** Agent identifier */
|
|
910
|
+
agent_id: string;
|
|
911
|
+
/** Agent name (if provided) */
|
|
912
|
+
agent_name?: string;
|
|
895
913
|
/** Session wallet public key */
|
|
896
914
|
session_wallet: string;
|
|
897
915
|
/** Spending limit in USDC */
|
|
@@ -900,6 +918,8 @@ interface CreateDeviceBoundSessionKeyResponse {
|
|
|
900
918
|
expires_at: string;
|
|
901
919
|
/** Always true for device-bound */
|
|
902
920
|
requires_client_signing: boolean;
|
|
921
|
+
/** True if this session key works across multiple apps with same agent_id */
|
|
922
|
+
cross_app_compatible: boolean;
|
|
903
923
|
/** Security details */
|
|
904
924
|
security_info: SessionKeySecurityInfo;
|
|
905
925
|
}
|
|
@@ -1128,4 +1148,4 @@ interface WebhookResult {
|
|
|
1128
1148
|
}
|
|
1129
1149
|
declare function processWebhook(a: any, b?: any, c?: any): Promise<WebhookResult>;
|
|
1130
1150
|
|
|
1131
|
-
export {
|
|
1151
|
+
export { type ApiKeyMode as $, type AgentApiKey as A, type PaginatedResponse as B, type CreateAgentApiKeyRequest as C, type CreateSubscriptionPlanRequest as D, type EnableAutonomyRequest as E, type SubscriptionPlan as F, type CreateSubscriptionRequest as G, type Subscription as H, type CreatePaymentLinkRequest as I, type PaymentLink as J, type CreateInstallmentPlanRequest as K, type ListPaymentsRequest as L, type InstallmentPlan as M, type CreateEscrowRequest as N, type Escrow as O, type PaymentIntent as P, type ApproveEscrowRequest as Q, type RefundEscrowRequest as R, type SmartPaymentRequest as S, type TopUpSessionKeyRequest as T, type DisputeEscrowRequest as U, type CreateInvoiceRequest as V, type WebhookHandlerConfig as W, type Invoice as X, type VerifyWebhookRequest as Y, type ZendFiConfig as Z, type WebhookPayload as _, type WebhookHandlers as a, processWebhook as a0, type WebhookResult as a1, type WebhookEventHandler as a2, type Brand as a3, type PaymentId as a4, type SessionId as a5, type AgentKeyId as a6, type MerchantId as a7, type InvoiceId as a8, type SubscriptionId as a9, type CreateInstallmentPlanResponse as aA, type ReleaseCondition as aB, type InvoiceLineItem as aC, type ApiKeyScope as aD, type SessionLimits as aE, type PaymentIntentStatus as aF, type CaptureMethod as aG, type UserProfile as aH, type PPPConfig as aI, type AutonomousDelegate as aJ, type RevokeAutonomyRequest as aK, type SmartPaymentStatus as aL, type SessionKeyInstructions as aM, type SessionKeySecurityInfo as aN, type LinkedSessionInfo as aO, type SecurityStatus as aP, type SessionKeyStats as aQ, type EscrowId as aa, type InstallmentPlanId as ab, type PaymentLinkCode as ac, type IntentId as ad, asPaymentId as ae, asSessionId as af, asAgentKeyId as ag, asMerchantId as ah, asInvoiceId as ai, asSubscriptionId as aj, asEscrowId as ak, asInstallmentPlanId as al, asPaymentLinkCode as am, asIntentId as an, type Environment as ao, type Currency as ap, type PaymentToken as aq, type PaymentStatus as ar, type SubscriptionStatus as as, type InstallmentPlanStatus as at, type EscrowStatus as au, type InvoiceStatus as av, type SplitStatus as aw, type WebhookEvent as ax, type SplitRecipient as ay, type InstallmentScheduleItem as az, type CreateAgentSessionRequest as b, type AgentSession as c, type AgentPaymentRequest as d, type AgentPaymentResponse as e, type AgentAnalytics as f, type CreatePaymentIntentRequest as g, type ConfirmPaymentIntentRequest as h, type PaymentIntentEvent as i, type PPPFactor as j, type PricingSuggestionRequest as k, type PricingSuggestion as l, type EnableAutonomyResponse as m, type AutonomyStatus as n, type SmartPaymentResponse as o, type CreateSessionKeyRequest as p, type CreateSessionKeyResponse as q, type CreateDeviceBoundSessionKeyRequest as r, type CreateDeviceBoundSessionKeyResponse as s, type SubmitSignedTransactionRequest as t, type SubmitTransactionResponse as u, type SessionKeyStatus as v, type SessionKeyListResponse as w, type TopUpSessionKeyResponse as x, type CreatePaymentRequest as y, type Payment as z };
|
|
@@ -816,6 +816,10 @@ interface AgentAnalytics {
|
|
|
816
816
|
interface CreateSessionKeyRequest {
|
|
817
817
|
/** User's main wallet address */
|
|
818
818
|
user_wallet: string;
|
|
819
|
+
/** Agent identifier for cross-app compatibility (e.g., "shopping-assistant-v1") */
|
|
820
|
+
agent_id: string;
|
|
821
|
+
/** Human-readable agent name (e.g., "AI Shopping Assistant") */
|
|
822
|
+
agent_name?: string;
|
|
819
823
|
/** Spending limit in USDC */
|
|
820
824
|
limit_usdc: number;
|
|
821
825
|
/** Duration in days (1-30) */
|
|
@@ -841,6 +845,10 @@ interface CreateSessionKeyResponse {
|
|
|
841
845
|
session_key_id: string;
|
|
842
846
|
/** User's main wallet address */
|
|
843
847
|
user_wallet: string;
|
|
848
|
+
/** Agent identifier */
|
|
849
|
+
agent_id: string;
|
|
850
|
+
/** Agent name (if provided) */
|
|
851
|
+
agent_name?: string;
|
|
844
852
|
/** Spending limit in USDC */
|
|
845
853
|
limit_usdc: number;
|
|
846
854
|
/** Expiration timestamp */
|
|
@@ -849,6 +857,8 @@ interface CreateSessionKeyResponse {
|
|
|
849
857
|
requires_approval: boolean;
|
|
850
858
|
/** Base64 encoded approval transaction (user must sign) */
|
|
851
859
|
approval_transaction: string;
|
|
860
|
+
/** True if this session key works across multiple apps with same agent_id */
|
|
861
|
+
cross_app_compatible: boolean;
|
|
852
862
|
/** Setup instructions */
|
|
853
863
|
instructions: SessionKeyInstructions;
|
|
854
864
|
}
|
|
@@ -865,6 +875,10 @@ interface SessionKeyInstructions {
|
|
|
865
875
|
interface CreateDeviceBoundSessionKeyRequest {
|
|
866
876
|
/** User's main wallet address */
|
|
867
877
|
user_wallet: string;
|
|
878
|
+
/** Agent identifier for cross-app compatibility (e.g., "shopping-assistant-v1") */
|
|
879
|
+
agent_id: string;
|
|
880
|
+
/** Human-readable agent name (e.g., "AI Shopping Assistant") */
|
|
881
|
+
agent_name?: string;
|
|
868
882
|
/** Spending limit in USDC */
|
|
869
883
|
limit_usdc: number;
|
|
870
884
|
/** Duration in days (1-30) */
|
|
@@ -892,6 +906,10 @@ interface CreateDeviceBoundSessionKeyResponse {
|
|
|
892
906
|
is_custodial: boolean;
|
|
893
907
|
/** User's main wallet address */
|
|
894
908
|
user_wallet: string;
|
|
909
|
+
/** Agent identifier */
|
|
910
|
+
agent_id: string;
|
|
911
|
+
/** Agent name (if provided) */
|
|
912
|
+
agent_name?: string;
|
|
895
913
|
/** Session wallet public key */
|
|
896
914
|
session_wallet: string;
|
|
897
915
|
/** Spending limit in USDC */
|
|
@@ -900,6 +918,8 @@ interface CreateDeviceBoundSessionKeyResponse {
|
|
|
900
918
|
expires_at: string;
|
|
901
919
|
/** Always true for device-bound */
|
|
902
920
|
requires_client_signing: boolean;
|
|
921
|
+
/** True if this session key works across multiple apps with same agent_id */
|
|
922
|
+
cross_app_compatible: boolean;
|
|
903
923
|
/** Security details */
|
|
904
924
|
security_info: SessionKeySecurityInfo;
|
|
905
925
|
}
|
|
@@ -1128,4 +1148,4 @@ interface WebhookResult {
|
|
|
1128
1148
|
}
|
|
1129
1149
|
declare function processWebhook(a: any, b?: any, c?: any): Promise<WebhookResult>;
|
|
1130
1150
|
|
|
1131
|
-
export {
|
|
1151
|
+
export { type ApiKeyMode as $, type AgentApiKey as A, type PaginatedResponse as B, type CreateAgentApiKeyRequest as C, type CreateSubscriptionPlanRequest as D, type EnableAutonomyRequest as E, type SubscriptionPlan as F, type CreateSubscriptionRequest as G, type Subscription as H, type CreatePaymentLinkRequest as I, type PaymentLink as J, type CreateInstallmentPlanRequest as K, type ListPaymentsRequest as L, type InstallmentPlan as M, type CreateEscrowRequest as N, type Escrow as O, type PaymentIntent as P, type ApproveEscrowRequest as Q, type RefundEscrowRequest as R, type SmartPaymentRequest as S, type TopUpSessionKeyRequest as T, type DisputeEscrowRequest as U, type CreateInvoiceRequest as V, type WebhookHandlerConfig as W, type Invoice as X, type VerifyWebhookRequest as Y, type ZendFiConfig as Z, type WebhookPayload as _, type WebhookHandlers as a, processWebhook as a0, type WebhookResult as a1, type WebhookEventHandler as a2, type Brand as a3, type PaymentId as a4, type SessionId as a5, type AgentKeyId as a6, type MerchantId as a7, type InvoiceId as a8, type SubscriptionId as a9, type CreateInstallmentPlanResponse as aA, type ReleaseCondition as aB, type InvoiceLineItem as aC, type ApiKeyScope as aD, type SessionLimits as aE, type PaymentIntentStatus as aF, type CaptureMethod as aG, type UserProfile as aH, type PPPConfig as aI, type AutonomousDelegate as aJ, type RevokeAutonomyRequest as aK, type SmartPaymentStatus as aL, type SessionKeyInstructions as aM, type SessionKeySecurityInfo as aN, type LinkedSessionInfo as aO, type SecurityStatus as aP, type SessionKeyStats as aQ, type EscrowId as aa, type InstallmentPlanId as ab, type PaymentLinkCode as ac, type IntentId as ad, asPaymentId as ae, asSessionId as af, asAgentKeyId as ag, asMerchantId as ah, asInvoiceId as ai, asSubscriptionId as aj, asEscrowId as ak, asInstallmentPlanId as al, asPaymentLinkCode as am, asIntentId as an, type Environment as ao, type Currency as ap, type PaymentToken as aq, type PaymentStatus as ar, type SubscriptionStatus as as, type InstallmentPlanStatus as at, type EscrowStatus as au, type InvoiceStatus as av, type SplitStatus as aw, type WebhookEvent as ax, type SplitRecipient as ay, type InstallmentScheduleItem as az, type CreateAgentSessionRequest as b, type AgentSession as c, type AgentPaymentRequest as d, type AgentPaymentResponse as e, type AgentAnalytics as f, type CreatePaymentIntentRequest as g, type ConfirmPaymentIntentRequest as h, type PaymentIntentEvent as i, type PPPFactor as j, type PricingSuggestionRequest as k, type PricingSuggestion as l, type EnableAutonomyResponse as m, type AutonomyStatus as n, type SmartPaymentResponse as o, type CreateSessionKeyRequest as p, type CreateSessionKeyResponse as q, type CreateDeviceBoundSessionKeyRequest as r, type CreateDeviceBoundSessionKeyResponse as s, type SubmitSignedTransactionRequest as t, type SubmitTransactionResponse as u, type SessionKeyStatus as v, type SessionKeyListResponse as w, type TopUpSessionKeyResponse as x, type CreatePaymentRequest as y, type Payment as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendfi/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Zero-config TypeScript SDK for ZendFi crypto payments",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -47,11 +47,12 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@solana/web3.js": "^1.98.4",
|
|
50
|
-
"cross-fetch": "^4.0.0"
|
|
50
|
+
"cross-fetch": "^4.0.0",
|
|
51
|
+
"react": "^19.2.3"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"@lit-protocol/lit-node-client": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
54
54
|
"@lit-protocol/auth-helpers": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
55
|
+
"@lit-protocol/lit-node-client": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
55
56
|
"ethers": "^5.0.0 || ^6.0.0"
|
|
56
57
|
},
|
|
57
58
|
"peerDependenciesMeta": {
|
|
@@ -66,8 +67,8 @@
|
|
|
66
67
|
}
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
|
-
"@lit-protocol/lit-node-client": "^6.11.0",
|
|
70
70
|
"@lit-protocol/auth-helpers": "^6.11.0",
|
|
71
|
+
"@lit-protocol/lit-node-client": "^6.11.0",
|
|
71
72
|
"@types/node": "^20.11.19",
|
|
72
73
|
"ethers": "^6.13.4",
|
|
73
74
|
"tsup": "^8.0.2",
|