@zeroxyz/sdk 0.3.0 → 0.5.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/CHANGELOG.md +11 -0
- package/README.md +14 -7
- package/dist/{chunk-LVK77C6A.cjs → chunk-ED754B5U.cjs} +124 -18
- package/dist/chunk-ED754B5U.cjs.map +1 -0
- package/dist/{chunk-FH6C6TXR.js → chunk-RY3VFSIE.js} +124 -18
- package/dist/chunk-RY3VFSIE.js.map +1 -0
- package/dist/{client-CEC0IuN3.d.cts → client-BKAiYZYS.d.cts} +23 -2
- package/dist/{client-CEC0IuN3.d.ts → client-BKAiYZYS.d.ts} +23 -2
- package/dist/index.cjs +31 -31
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-FH6C6TXR.js.map +0 -1
- package/dist/chunk-LVK77C6A.cjs.map +0 -1
|
@@ -87,6 +87,7 @@ declare const FETCH_SKIP_REASONS: Readonly<{
|
|
|
87
87
|
readonly mppSessionCloseFailedNotRecorded: "mpp_session_close_failed_not_recorded";
|
|
88
88
|
readonly paidButStill402NotRecorded: "paid_but_still_402_not_recorded";
|
|
89
89
|
readonly paymentSettlementUnconfirmed: "payment_settlement_unconfirmed";
|
|
90
|
+
readonly insufficientFunds: "insufficient_funds_not_recorded";
|
|
90
91
|
}>;
|
|
91
92
|
declare class Payments {
|
|
92
93
|
private readonly client;
|
|
@@ -139,6 +140,7 @@ type FetchOptions = {
|
|
|
139
140
|
maxPay?: string;
|
|
140
141
|
capabilityId?: string;
|
|
141
142
|
searchId?: string;
|
|
143
|
+
fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
|
|
142
144
|
account?: LocalAccount;
|
|
143
145
|
signal?: AbortSignal;
|
|
144
146
|
timeoutMs?: number;
|
|
@@ -154,7 +156,7 @@ type FetchOptions = {
|
|
|
154
156
|
responseSchema?: Record<string, unknown>;
|
|
155
157
|
};
|
|
156
158
|
};
|
|
157
|
-
type FetchOutcome = "success" | "payment_failed" | "payment_rejected" | "payment_close_failed" | "server_error" | "network_error";
|
|
159
|
+
type FetchOutcome = "success" | "payment_failed" | "insufficient_funds" | "payment_rejected" | "payment_close_failed" | "server_error" | "network_error";
|
|
158
160
|
type UpstreamError = {
|
|
159
161
|
status: number;
|
|
160
162
|
message?: string;
|
|
@@ -175,6 +177,12 @@ type FetchResult = {
|
|
|
175
177
|
upstreamError?: UpstreamError;
|
|
176
178
|
runTrackingSkipped?: string[];
|
|
177
179
|
warnings?: string[];
|
|
180
|
+
capabilityResolution?: {
|
|
181
|
+
resolved: boolean;
|
|
182
|
+
capabilityId?: string;
|
|
183
|
+
capabilitySlug?: string;
|
|
184
|
+
matchedVia?: string;
|
|
185
|
+
};
|
|
178
186
|
};
|
|
179
187
|
|
|
180
188
|
declare const userWalletDtoSchema: z.ZodObject<{
|
|
@@ -433,11 +441,23 @@ type GetCapabilityOptions = {
|
|
|
433
441
|
searchId?: string;
|
|
434
442
|
signal?: AbortSignal;
|
|
435
443
|
};
|
|
444
|
+
declare const resolveCapabilityResponseSchema: z.ZodObject<{
|
|
445
|
+
capabilityId: z.ZodString;
|
|
446
|
+
capabilitySlug: z.ZodString;
|
|
447
|
+
matchedVia: z.ZodEnum<{
|
|
448
|
+
exact: "exact";
|
|
449
|
+
template: "template";
|
|
450
|
+
}>;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
type ResolveCapabilityResponse = z.infer<typeof resolveCapabilityResponseSchema>;
|
|
436
453
|
|
|
437
454
|
declare class Capabilities {
|
|
438
455
|
private readonly client;
|
|
439
456
|
constructor(client: ZeroClient);
|
|
440
457
|
get: (id: string, opts?: GetCapabilityOptions) => Promise<CapabilityResponse>;
|
|
458
|
+
resolveByUrl: (url: string, method: string, opts?: {
|
|
459
|
+
signal?: AbortSignal;
|
|
460
|
+
}) => Promise<ResolveCapabilityResponse | null>;
|
|
441
461
|
}
|
|
442
462
|
|
|
443
463
|
declare const createRunResponseSchema: z.ZodObject<{
|
|
@@ -530,6 +550,7 @@ type CreateRunInput = {
|
|
|
530
550
|
errorSnippetLength?: number;
|
|
531
551
|
requestSchema?: Record<string, unknown>;
|
|
532
552
|
responseSchema?: Record<string, unknown>;
|
|
553
|
+
fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
|
|
533
554
|
};
|
|
534
555
|
type CreateReviewInput = {
|
|
535
556
|
runId: string;
|
|
@@ -839,4 +860,4 @@ declare class ZeroClient {
|
|
|
839
860
|
close: () => Promise<void>;
|
|
840
861
|
}
|
|
841
862
|
|
|
842
|
-
export { type BugReportCategory as $, type AccountCredentials as A, BugReports as B, type Credentials as C, Wallet as D, type ClientOptions as E, type FetchOptions as F, DEFAULT_BASE_URL as G, DEFAULT_MAX_RETRIES as H, DEFAULT_TIMEOUT_MS as I, type Logger as J, type LogLevel as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type InternalUserDto as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type PublicUserDto as V, type WalletBalance as W, type UserWalletDto as X, type WelcomeBonusSummary as Y, ZeroClient as Z, BUG_REPORT_CATEGORIES as _, type SessionCredentialsInput as a, type CreateBugReportInput as a0, type CreateBugReportResponse as a1, type CapabilityResponse as a2, type GetCapabilityOptions as a3, type
|
|
863
|
+
export { type BugReportCategory as $, type AccountCredentials as A, BugReports as B, type Credentials as C, Wallet as D, type ClientOptions as E, type FetchOptions as F, DEFAULT_BASE_URL as G, DEFAULT_MAX_RETRIES as H, DEFAULT_TIMEOUT_MS as I, type Logger as J, type LogLevel as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type InternalUserDto as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type PublicUserDto as V, type WalletBalance as W, type UserWalletDto as X, type WelcomeBonusSummary as Y, ZeroClient as Z, BUG_REPORT_CATEGORIES as _, type SessionCredentialsInput as a, type CreateBugReportInput as a0, type CreateBugReportResponse as a1, type CapabilityResponse as a2, type GetCapabilityOptions as a3, type ResolveCapabilityResponse as a4, type DevicePollResult as a5, type DeviceStartResponse as a6, type SessionExchangeResponse as a7, type BatchReviewResponse as a8, type CreateReviewInput as a9, type CreateReviewResponse as aa, type CreateRunInput as ab, type CreateRunResponse as ac, type ListRunsParams as ad, type ListRunsResponse as ae, type RunListItem as af, type SearchOptions as ag, type SearchResponse as ah, type SearchResult as ai, type FetchOutcome as b, type FetchResult as c, type SignMessageInput as d, type SignTransactionInput as e, type SignTypedDataInput as f, Auth as g, AuthDevice as h, Capabilities as i, type PayInput as j, type PaymentChain as k, type PaymentProtocol as l, type PaymentResult as m, type PayResult as n, type SessionReceiptPayload as o, coerceTempoChainId as p, FETCH_SKIP_REASONS as q, FETCH_WARNINGS as r, Payments as s, paymentHasAnchor as t, TEMPO_TESTNET_CHAIN_ID as u, tempoChainLabelFromId as v, type BalanceOptions as w, type BalanceReadError as x, type FundingUrlOptions as y, type MigrateAuthorizationResponse as z };
|
|
@@ -87,6 +87,7 @@ declare const FETCH_SKIP_REASONS: Readonly<{
|
|
|
87
87
|
readonly mppSessionCloseFailedNotRecorded: "mpp_session_close_failed_not_recorded";
|
|
88
88
|
readonly paidButStill402NotRecorded: "paid_but_still_402_not_recorded";
|
|
89
89
|
readonly paymentSettlementUnconfirmed: "payment_settlement_unconfirmed";
|
|
90
|
+
readonly insufficientFunds: "insufficient_funds_not_recorded";
|
|
90
91
|
}>;
|
|
91
92
|
declare class Payments {
|
|
92
93
|
private readonly client;
|
|
@@ -139,6 +140,7 @@ type FetchOptions = {
|
|
|
139
140
|
maxPay?: string;
|
|
140
141
|
capabilityId?: string;
|
|
141
142
|
searchId?: string;
|
|
143
|
+
fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
|
|
142
144
|
account?: LocalAccount;
|
|
143
145
|
signal?: AbortSignal;
|
|
144
146
|
timeoutMs?: number;
|
|
@@ -154,7 +156,7 @@ type FetchOptions = {
|
|
|
154
156
|
responseSchema?: Record<string, unknown>;
|
|
155
157
|
};
|
|
156
158
|
};
|
|
157
|
-
type FetchOutcome = "success" | "payment_failed" | "payment_rejected" | "payment_close_failed" | "server_error" | "network_error";
|
|
159
|
+
type FetchOutcome = "success" | "payment_failed" | "insufficient_funds" | "payment_rejected" | "payment_close_failed" | "server_error" | "network_error";
|
|
158
160
|
type UpstreamError = {
|
|
159
161
|
status: number;
|
|
160
162
|
message?: string;
|
|
@@ -175,6 +177,12 @@ type FetchResult = {
|
|
|
175
177
|
upstreamError?: UpstreamError;
|
|
176
178
|
runTrackingSkipped?: string[];
|
|
177
179
|
warnings?: string[];
|
|
180
|
+
capabilityResolution?: {
|
|
181
|
+
resolved: boolean;
|
|
182
|
+
capabilityId?: string;
|
|
183
|
+
capabilitySlug?: string;
|
|
184
|
+
matchedVia?: string;
|
|
185
|
+
};
|
|
178
186
|
};
|
|
179
187
|
|
|
180
188
|
declare const userWalletDtoSchema: z.ZodObject<{
|
|
@@ -433,11 +441,23 @@ type GetCapabilityOptions = {
|
|
|
433
441
|
searchId?: string;
|
|
434
442
|
signal?: AbortSignal;
|
|
435
443
|
};
|
|
444
|
+
declare const resolveCapabilityResponseSchema: z.ZodObject<{
|
|
445
|
+
capabilityId: z.ZodString;
|
|
446
|
+
capabilitySlug: z.ZodString;
|
|
447
|
+
matchedVia: z.ZodEnum<{
|
|
448
|
+
exact: "exact";
|
|
449
|
+
template: "template";
|
|
450
|
+
}>;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
type ResolveCapabilityResponse = z.infer<typeof resolveCapabilityResponseSchema>;
|
|
436
453
|
|
|
437
454
|
declare class Capabilities {
|
|
438
455
|
private readonly client;
|
|
439
456
|
constructor(client: ZeroClient);
|
|
440
457
|
get: (id: string, opts?: GetCapabilityOptions) => Promise<CapabilityResponse>;
|
|
458
|
+
resolveByUrl: (url: string, method: string, opts?: {
|
|
459
|
+
signal?: AbortSignal;
|
|
460
|
+
}) => Promise<ResolveCapabilityResponse | null>;
|
|
441
461
|
}
|
|
442
462
|
|
|
443
463
|
declare const createRunResponseSchema: z.ZodObject<{
|
|
@@ -530,6 +550,7 @@ type CreateRunInput = {
|
|
|
530
550
|
errorSnippetLength?: number;
|
|
531
551
|
requestSchema?: Record<string, unknown>;
|
|
532
552
|
responseSchema?: Record<string, unknown>;
|
|
553
|
+
fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
|
|
533
554
|
};
|
|
534
555
|
type CreateReviewInput = {
|
|
535
556
|
runId: string;
|
|
@@ -839,4 +860,4 @@ declare class ZeroClient {
|
|
|
839
860
|
close: () => Promise<void>;
|
|
840
861
|
}
|
|
841
862
|
|
|
842
|
-
export { type BugReportCategory as $, type AccountCredentials as A, BugReports as B, type Credentials as C, Wallet as D, type ClientOptions as E, type FetchOptions as F, DEFAULT_BASE_URL as G, DEFAULT_MAX_RETRIES as H, DEFAULT_TIMEOUT_MS as I, type Logger as J, type LogLevel as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type InternalUserDto as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type PublicUserDto as V, type WalletBalance as W, type UserWalletDto as X, type WelcomeBonusSummary as Y, ZeroClient as Z, BUG_REPORT_CATEGORIES as _, type SessionCredentialsInput as a, type CreateBugReportInput as a0, type CreateBugReportResponse as a1, type CapabilityResponse as a2, type GetCapabilityOptions as a3, type
|
|
863
|
+
export { type BugReportCategory as $, type AccountCredentials as A, BugReports as B, type Credentials as C, Wallet as D, type ClientOptions as E, type FetchOptions as F, DEFAULT_BASE_URL as G, DEFAULT_MAX_RETRIES as H, DEFAULT_TIMEOUT_MS as I, type Logger as J, type LogLevel as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type InternalUserDto as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type PublicUserDto as V, type WalletBalance as W, type UserWalletDto as X, type WelcomeBonusSummary as Y, ZeroClient as Z, BUG_REPORT_CATEGORIES as _, type SessionCredentialsInput as a, type CreateBugReportInput as a0, type CreateBugReportResponse as a1, type CapabilityResponse as a2, type GetCapabilityOptions as a3, type ResolveCapabilityResponse as a4, type DevicePollResult as a5, type DeviceStartResponse as a6, type SessionExchangeResponse as a7, type BatchReviewResponse as a8, type CreateReviewInput as a9, type CreateReviewResponse as aa, type CreateRunInput as ab, type CreateRunResponse as ac, type ListRunsParams as ad, type ListRunsResponse as ae, type RunListItem as af, type SearchOptions as ag, type SearchResponse as ah, type SearchResult as ai, type FetchOutcome as b, type FetchResult as c, type SignMessageInput as d, type SignTransactionInput as e, type SignTypedDataInput as f, Auth as g, AuthDevice as h, Capabilities as i, type PayInput as j, type PaymentChain as k, type PaymentProtocol as l, type PaymentResult as m, type PayResult as n, type SessionReceiptPayload as o, coerceTempoChainId as p, FETCH_SKIP_REASONS as q, FETCH_WARNINGS as r, Payments as s, paymentHasAnchor as t, TEMPO_TESTNET_CHAIN_ID as u, tempoChainLabelFromId as v, type BalanceOptions as w, type BalanceReadError as x, type FundingUrlOptions as y, type MigrateAuthorizationResponse as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkED754B5U_cjs = require('./chunk-ED754B5U.cjs');
|
|
4
4
|
|
|
5
5
|
// src/status.ts
|
|
6
6
|
var AVAILABILITY_BADGES = {
|
|
@@ -25,123 +25,123 @@ var preferHealthy = sortByHealth;
|
|
|
25
25
|
|
|
26
26
|
Object.defineProperty(exports, "Auth", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkED754B5U_cjs.Auth; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "AuthDevice", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkED754B5U_cjs.AuthDevice; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "BUG_REPORT_CATEGORIES", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkED754B5U_cjs.BUG_REPORT_CATEGORIES; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "BugReports", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkED754B5U_cjs.BugReports; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "Capabilities", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkED754B5U_cjs.Capabilities; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "DEFAULT_BASE_URL", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkED754B5U_cjs.DEFAULT_BASE_URL; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "DEFAULT_MAX_RETRIES", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkED754B5U_cjs.DEFAULT_MAX_RETRIES; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "DEFAULT_TIMEOUT_MS", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkED754B5U_cjs.DEFAULT_TIMEOUT_MS; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "FETCH_SKIP_REASONS", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkED754B5U_cjs.FETCH_SKIP_REASONS; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "FETCH_WARNINGS", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkED754B5U_cjs.FETCH_WARNINGS; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "Payments", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkED754B5U_cjs.Payments; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "Runs", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkED754B5U_cjs.Runs; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "SDK_VERSION", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkED754B5U_cjs.SDK_VERSION; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "TEMPO_CHAIN_ID", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkED754B5U_cjs.TEMPO_CHAIN_ID; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "TEMPO_TESTNET_CHAIN_ID", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkED754B5U_cjs.TEMPO_TESTNET_CHAIN_ID; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "Wallet", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkED754B5U_cjs.Wallet; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "ZeroApiError", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkED754B5U_cjs.ZeroApiError; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "ZeroAuthError", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkED754B5U_cjs.ZeroAuthError; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "ZeroClient", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkED754B5U_cjs.ZeroClient; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "ZeroConfigurationError", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkED754B5U_cjs.ZeroConfigurationError; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "ZeroError", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkED754B5U_cjs.ZeroError; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "ZeroPaymentError", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkED754B5U_cjs.ZeroPaymentError; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "ZeroSessionCloseFailedError", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkED754B5U_cjs.ZeroSessionCloseFailedError; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "ZeroTimeoutError", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkED754B5U_cjs.ZeroTimeoutError; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "ZeroValidationError", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkED754B5U_cjs.ZeroValidationError; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "ZeroWalletError", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkED754B5U_cjs.ZeroWalletError; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "coerceTempoChainId", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkED754B5U_cjs.coerceTempoChainId; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "createManagedAccount", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkED754B5U_cjs.createManagedAccount; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "paymentHasAnchor", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkED754B5U_cjs.paymentHasAnchor; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "tempoChainLabelFromId", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkED754B5U_cjs.tempoChainLabelFromId; }
|
|
145
145
|
});
|
|
146
146
|
exports.AVAILABILITY_BADGES = AVAILABILITY_BADGES;
|
|
147
147
|
exports.preferHealthy = preferHealthy;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Z as ZeroClient, P as PaymentSessionMeta } from './client-
|
|
2
|
-
export { A as AccountCredentials, g as Auth, h as AuthDevice, _ as BUG_REPORT_CATEGORIES, w as BalanceOptions, x as BalanceReadError,
|
|
1
|
+
import { Z as ZeroClient, P as PaymentSessionMeta } from './client-BKAiYZYS.cjs';
|
|
2
|
+
export { A as AccountCredentials, g as Auth, h as AuthDevice, _ as BUG_REPORT_CATEGORIES, w as BalanceOptions, x as BalanceReadError, a8 as BatchReviewResponse, $ as BugReportCategory, B as BugReports, i as Capabilities, a2 as CapabilityResponse, E as ClientOptions, a0 as CreateBugReportInput, a1 as CreateBugReportResponse, a9 as CreateReviewInput, aa as CreateReviewResponse, ab as CreateRunInput, ac as CreateRunResponse, C as Credentials, G as DEFAULT_BASE_URL, H as DEFAULT_MAX_RETRIES, I as DEFAULT_TIMEOUT_MS, a5 as DevicePollResult, a6 as DeviceStartResponse, q as FETCH_SKIP_REASONS, r as FETCH_WARNINGS, F as FetchOptions, b as FetchOutcome, c as FetchResult, y as FundingUrlOptions, a3 as GetCapabilityOptions, Q as InternalUserDto, ad as ListRunsParams, ae as ListRunsResponse, L as LogEvent, K as LogLevel, J as Logger, M as MigrateAuthorization, z as MigrateAuthorizationResponse, N as NoCredentials, O as OnSessionRefreshed, j as PayInput, n as PayResult, k as PaymentChain, l as PaymentProtocol, m as PaymentResult, s as Payments, V as PublicUserDto, a4 as ResolveCapabilityResponse, af as RunListItem, R as Runs, ag as SearchOptions, ah as SearchResponse, ai as SearchResult, S as SessionCredentials, a as SessionCredentialsInput, a7 as SessionExchangeResponse, o as SessionReceiptPayload, d as SignMessageInput, e as SignTransactionInput, f as SignTypedDataInput, T as TEMPO_CHAIN_ID, u as TEMPO_TESTNET_CHAIN_ID, U as UpstreamError, X as UserWalletDto, D as Wallet, W as WalletBalance, Y as WelcomeBonusSummary, p as coerceTempoChainId, t as paymentHasAnchor, v as tempoChainLabelFromId } from './client-BKAiYZYS.cjs';
|
|
3
3
|
import { Address, LocalAccount } from 'viem';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
declare const createManagedAccount: (client: ZeroClient, address: Address) => LocalAccount;
|
|
7
7
|
|
|
8
|
-
type ZeroErrorCode = "api_error" | "auth_error" | "auth_session_expired" | "auth_no_credentials" | "payment_error" | "payment_session_close_failed" | "wallet_error" | "validation_error" | "timeout_error" | "configuration_error";
|
|
8
|
+
type ZeroErrorCode = "api_error" | "auth_error" | "auth_session_expired" | "auth_no_credentials" | "payment_error" | "payment_session_close_failed" | "insufficient_funds" | "wallet_error" | "validation_error" | "timeout_error" | "configuration_error";
|
|
9
9
|
type ZeroErrorOptions = {
|
|
10
10
|
cause?: unknown;
|
|
11
11
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Z as ZeroClient, P as PaymentSessionMeta } from './client-
|
|
2
|
-
export { A as AccountCredentials, g as Auth, h as AuthDevice, _ as BUG_REPORT_CATEGORIES, w as BalanceOptions, x as BalanceReadError,
|
|
1
|
+
import { Z as ZeroClient, P as PaymentSessionMeta } from './client-BKAiYZYS.js';
|
|
2
|
+
export { A as AccountCredentials, g as Auth, h as AuthDevice, _ as BUG_REPORT_CATEGORIES, w as BalanceOptions, x as BalanceReadError, a8 as BatchReviewResponse, $ as BugReportCategory, B as BugReports, i as Capabilities, a2 as CapabilityResponse, E as ClientOptions, a0 as CreateBugReportInput, a1 as CreateBugReportResponse, a9 as CreateReviewInput, aa as CreateReviewResponse, ab as CreateRunInput, ac as CreateRunResponse, C as Credentials, G as DEFAULT_BASE_URL, H as DEFAULT_MAX_RETRIES, I as DEFAULT_TIMEOUT_MS, a5 as DevicePollResult, a6 as DeviceStartResponse, q as FETCH_SKIP_REASONS, r as FETCH_WARNINGS, F as FetchOptions, b as FetchOutcome, c as FetchResult, y as FundingUrlOptions, a3 as GetCapabilityOptions, Q as InternalUserDto, ad as ListRunsParams, ae as ListRunsResponse, L as LogEvent, K as LogLevel, J as Logger, M as MigrateAuthorization, z as MigrateAuthorizationResponse, N as NoCredentials, O as OnSessionRefreshed, j as PayInput, n as PayResult, k as PaymentChain, l as PaymentProtocol, m as PaymentResult, s as Payments, V as PublicUserDto, a4 as ResolveCapabilityResponse, af as RunListItem, R as Runs, ag as SearchOptions, ah as SearchResponse, ai as SearchResult, S as SessionCredentials, a as SessionCredentialsInput, a7 as SessionExchangeResponse, o as SessionReceiptPayload, d as SignMessageInput, e as SignTransactionInput, f as SignTypedDataInput, T as TEMPO_CHAIN_ID, u as TEMPO_TESTNET_CHAIN_ID, U as UpstreamError, X as UserWalletDto, D as Wallet, W as WalletBalance, Y as WelcomeBonusSummary, p as coerceTempoChainId, t as paymentHasAnchor, v as tempoChainLabelFromId } from './client-BKAiYZYS.js';
|
|
3
3
|
import { Address, LocalAccount } from 'viem';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
declare const createManagedAccount: (client: ZeroClient, address: Address) => LocalAccount;
|
|
7
7
|
|
|
8
|
-
type ZeroErrorCode = "api_error" | "auth_error" | "auth_session_expired" | "auth_no_credentials" | "payment_error" | "payment_session_close_failed" | "wallet_error" | "validation_error" | "timeout_error" | "configuration_error";
|
|
8
|
+
type ZeroErrorCode = "api_error" | "auth_error" | "auth_session_expired" | "auth_no_credentials" | "payment_error" | "payment_session_close_failed" | "insufficient_funds" | "wallet_error" | "validation_error" | "timeout_error" | "configuration_error";
|
|
9
9
|
type ZeroErrorOptions = {
|
|
10
10
|
cause?: unknown;
|
|
11
11
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Auth, AuthDevice, BUG_REPORT_CATEGORIES, BugReports, Capabilities, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, FETCH_SKIP_REASONS, FETCH_WARNINGS, Payments, Runs, SDK_VERSION, TEMPO_CHAIN_ID, TEMPO_TESTNET_CHAIN_ID, Wallet, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, coerceTempoChainId, createManagedAccount, paymentHasAnchor, tempoChainLabelFromId } from './chunk-
|
|
1
|
+
export { Auth, AuthDevice, BUG_REPORT_CATEGORIES, BugReports, Capabilities, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, FETCH_SKIP_REASONS, FETCH_WARNINGS, Payments, Runs, SDK_VERSION, TEMPO_CHAIN_ID, TEMPO_TESTNET_CHAIN_ID, Wallet, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, coerceTempoChainId, createManagedAccount, paymentHasAnchor, tempoChainLabelFromId } from './chunk-RY3VFSIE.js';
|
|
2
2
|
|
|
3
3
|
// src/status.ts
|
|
4
4
|
var AVAILABILITY_BADGES = {
|
package/dist/testing.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkED754B5U_cjs = require('./chunk-ED754B5U.cjs');
|
|
4
4
|
|
|
5
5
|
// src/testing/index.ts
|
|
6
6
|
var FALLBACK_HANDLER = (request) => {
|
|
@@ -34,7 +34,7 @@ var respondJson = (body, init) => new Response(JSON.stringify(body), {
|
|
|
34
34
|
});
|
|
35
35
|
var createTestClient = (opts = {}) => {
|
|
36
36
|
const { routes, ...rest } = opts;
|
|
37
|
-
return new
|
|
37
|
+
return new chunkED754B5U_cjs.ZeroClient({
|
|
38
38
|
...rest,
|
|
39
39
|
baseUrl: rest.baseUrl ?? "http://test.zero.local",
|
|
40
40
|
// Tests should fail fast, not retry-and-mask flakiness.
|
package/dist/testing.d.cts
CHANGED
package/dist/testing.d.ts
CHANGED
package/dist/testing.js
CHANGED