@openfacilitator/sdk 0.2.0 → 0.3.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/index.d.mts CHANGED
@@ -73,9 +73,11 @@ interface PaymentRequirements {
73
73
  }
74
74
  interface VerifyResponse {
75
75
  /** Whether the payment is valid */
76
- valid: boolean;
77
- /** Error message if invalid */
78
- error?: string;
76
+ isValid: boolean;
77
+ /** Reason if invalid (x402 standard) */
78
+ invalidReason?: string;
79
+ /** Payer address */
80
+ payer?: string;
79
81
  /** Additional verification details */
80
82
  details?: {
81
83
  /** Verified amount */
@@ -89,12 +91,14 @@ interface VerifyResponse {
89
91
  interface SettleResponse {
90
92
  /** Whether settlement was successful */
91
93
  success: boolean;
92
- /** Transaction hash/signature */
93
- transactionHash?: string;
94
+ /** Transaction hash/signature (empty string when failed, x402 standard) */
95
+ transaction: string;
96
+ /** Payer address (x402 standard) */
97
+ payer: string;
94
98
  /** Network the transaction was settled on */
95
- network?: string;
96
- /** Error message if failed */
97
- error?: string;
99
+ network: string;
100
+ /** Error reason if failed (x402 standard) */
101
+ errorReason?: string;
98
102
  }
99
103
  interface SupportedResponse {
100
104
  /** Supported payment kinds */
package/dist/index.d.ts CHANGED
@@ -73,9 +73,11 @@ interface PaymentRequirements {
73
73
  }
74
74
  interface VerifyResponse {
75
75
  /** Whether the payment is valid */
76
- valid: boolean;
77
- /** Error message if invalid */
78
- error?: string;
76
+ isValid: boolean;
77
+ /** Reason if invalid (x402 standard) */
78
+ invalidReason?: string;
79
+ /** Payer address */
80
+ payer?: string;
79
81
  /** Additional verification details */
80
82
  details?: {
81
83
  /** Verified amount */
@@ -89,12 +91,14 @@ interface VerifyResponse {
89
91
  interface SettleResponse {
90
92
  /** Whether settlement was successful */
91
93
  success: boolean;
92
- /** Transaction hash/signature */
93
- transactionHash?: string;
94
+ /** Transaction hash/signature (empty string when failed, x402 standard) */
95
+ transaction: string;
96
+ /** Payer address (x402 standard) */
97
+ payer: string;
94
98
  /** Network the transaction was settled on */
95
- network?: string;
96
- /** Error message if failed */
97
- error?: string;
99
+ network: string;
100
+ /** Error reason if failed (x402 standard) */
101
+ errorReason?: string;
98
102
  }
99
103
  interface SupportedResponse {
100
104
  /** Supported payment kinds */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfacilitator/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "TypeScript SDK for x402 payment facilitation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",