@zendfi/sdk 0.5.7 → 0.6.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/dist/nextjs.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-D5CigE9G.mjs';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-DGBeCWT-.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-D5CigE9G.js';
1
+ import { W as WebhookHandlerConfig, a as WebhookHandlers } from './webhook-handler-DGBeCWT-.js';
2
2
 
3
3
  /**
4
4
  * Next.js Webhook Handler for App Router
package/dist/nextjs.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  processWebhook
3
- } from "./chunk-YFOBPGQE.mjs";
3
+ } from "./chunk-3ACJUM6V.mjs";
4
+ import "./chunk-Y6FXYEAI.mjs";
4
5
 
5
6
  // src/nextjs.ts
6
7
  import { createHmac, timingSafeEqual } from "crypto";
@@ -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
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendfi/sdk",
3
- "version": "0.5.7",
3
+ "version": "0.6.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",