@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/README.md +109 -4
- 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 +1062 -3
- package/dist/index.d.ts +1062 -3
- package/dist/index.js +3185 -609
- package/dist/index.mjs +2181 -586
- 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-DGBeCWT-.d.mts} +20 -0
- package/dist/{webhook-handler-D5CigE9G.d.ts → webhook-handler-DGBeCWT-.d.ts} +20 -0
- 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
|
}
|
|
@@ -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.
|
|
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",
|