@zeroxyz/sdk 0.5.0 → 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.
@@ -133,12 +133,18 @@ declare class Payments {
133
133
  private completeMppSession;
134
134
  }
135
135
 
136
+ /** Returns true when `id` is a short search-attribution token (`z_xxx.N`). */
137
+ declare const isShortToken: (id: string) => boolean;
136
138
  type FetchOptions = {
137
139
  method?: string;
138
140
  headers?: Record<string, string>;
139
141
  body?: string | Uint8Array;
140
142
  maxPay?: string;
141
143
  capabilityId?: string;
144
+ /**
145
+ * @deprecated Pass the `z_xxx.N` token from `search()` as `capabilityId`
146
+ * instead — it embeds the searchId. This field is kept for back-compat.
147
+ */
142
148
  searchId?: string;
143
149
  fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
144
150
  account?: LocalAccount;
@@ -438,6 +444,11 @@ declare const capabilityResponseSchema: z.ZodObject<{
438
444
  }, z.core.$strip>;
439
445
  type CapabilityResponse = z.infer<typeof capabilityResponseSchema>;
440
446
  type GetCapabilityOptions = {
447
+ /**
448
+ * @deprecated Pass the `z_xxx.N` token from `search()` as the `id` argument
449
+ * instead — it embeds the searchId. This field is kept for back-compat with
450
+ * callers that still pass uid + searchId separately.
451
+ */
441
452
  searchId?: string;
442
453
  signal?: AbortSignal;
443
454
  };
@@ -506,6 +517,33 @@ declare const listRunsResponseSchema: z.ZodObject<{
506
517
  }, z.core.$strip>>;
507
518
  nextCursor: z.ZodNullable<z.ZodString>;
508
519
  }, z.core.$strip>;
520
+ declare const runDetailSchema: z.ZodObject<{
521
+ runId: z.ZodString;
522
+ status: z.ZodNullable<z.ZodNumber>;
523
+ latencyMs: z.ZodNullable<z.ZodNumber>;
524
+ errorClass: z.ZodNullable<z.ZodString>;
525
+ createdAt: z.ZodCoercedDate<unknown>;
526
+ cost: z.ZodNullable<z.ZodObject<{
527
+ amount: z.ZodString;
528
+ asset: z.ZodNullable<z.ZodString>;
529
+ }, z.core.$strip>>;
530
+ payment: z.ZodNullable<z.ZodObject<{
531
+ protocol: z.ZodString;
532
+ chain: z.ZodNullable<z.ZodString>;
533
+ txHash: z.ZodNullable<z.ZodString>;
534
+ mode: z.ZodNullable<z.ZodString>;
535
+ }, z.core.$strip>>;
536
+ capability: z.ZodObject<{
537
+ uid: z.ZodString;
538
+ slug: z.ZodString;
539
+ name: z.ZodString;
540
+ url: z.ZodString;
541
+ method: z.ZodString;
542
+ whatItDoes: z.ZodNullable<z.ZodString>;
543
+ tags: z.ZodArray<z.ZodString>;
544
+ }, z.core.$strip>;
545
+ reviewed: z.ZodBoolean;
546
+ }, z.core.$strip>;
509
547
  declare const createReviewResponseSchema: z.ZodObject<{
510
548
  reviewId: z.ZodString;
511
549
  recorded: z.ZodBoolean;
@@ -530,6 +568,7 @@ declare const batchReviewResponseSchema: z.ZodObject<{
530
568
  }, z.core.$strip>;
531
569
  }, z.core.$strip>;
532
570
  type RunListItem = z.infer<typeof runListItemSchema>;
571
+ type RunDetail = z.infer<typeof runDetailSchema>;
533
572
  type ListRunsResponse = z.infer<typeof listRunsResponseSchema>;
534
573
  type CreateRunResponse = z.infer<typeof createRunResponseSchema>;
535
574
  type CreateReviewResponse = z.infer<typeof createReviewResponseSchema>;
@@ -537,6 +576,10 @@ type BatchReviewResponse = z.infer<typeof batchReviewResponseSchema>;
537
576
  type CreateRunInput = {
538
577
  capabilityId: string;
539
578
  paymentMethodId?: string;
579
+ /**
580
+ * @deprecated Pass the `z_xxx.N` token from `search()` as `capabilityId`
581
+ * instead — it embeds the searchId. This field is kept for back-compat.
582
+ */
540
583
  searchId?: string;
541
584
  status?: number;
542
585
  latencyMs?: number;
@@ -576,6 +619,9 @@ declare class Runs {
576
619
  list: (params?: ListRunsParams, opts?: {
577
620
  signal?: AbortSignal;
578
621
  }) => Promise<ListRunsResponse>;
622
+ get: (runId: string, opts?: {
623
+ signal?: AbortSignal;
624
+ }) => Promise<RunDetail>;
579
625
  review: (input: CreateReviewInput, opts?: {
580
626
  signal?: AbortSignal;
581
627
  }) => Promise<CreateReviewResponse>;
@@ -684,6 +730,7 @@ declare const DEFAULT_MAX_RETRIES = 2;
684
730
 
685
731
  declare const searchResultSchema: z.ZodObject<{
686
732
  id: z.ZodString;
733
+ token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
734
  position: z.ZodNumber;
688
735
  slug: z.ZodString;
689
736
  name: z.ZodString;
@@ -709,6 +756,7 @@ declare const searchResultSchema: z.ZodObject<{
709
756
  rated: "rated";
710
757
  }>>;
711
758
  }, z.core.$strip>;
759
+ activationCount: z.ZodOptional<z.ZodNumber>;
712
760
  availabilityStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
713
761
  unknown: "unknown";
714
762
  healthy: "healthy";
@@ -729,6 +777,7 @@ declare const searchResponseSchema: z.ZodObject<{
729
777
  hasMore: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
730
778
  capabilities: z.ZodArray<z.ZodObject<{
731
779
  id: z.ZodString;
780
+ token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
732
781
  position: z.ZodNumber;
733
782
  slug: z.ZodString;
734
783
  name: z.ZodString;
@@ -754,6 +803,7 @@ declare const searchResponseSchema: z.ZodObject<{
754
803
  rated: "rated";
755
804
  }>>;
756
805
  }, z.core.$strip>;
806
+ activationCount: z.ZodOptional<z.ZodNumber>;
757
807
  availabilityStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
758
808
  unknown: "unknown";
759
809
  healthy: "healthy";
@@ -860,4 +910,4 @@ declare class ZeroClient {
860
910
  close: () => Promise<void>;
861
911
  }
862
912
 
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 };
913
+ export { BUG_REPORT_CATEGORIES as $, type AccountCredentials as A, BugReports as B, type Credentials as C, type MigrateAuthorizationResponse as D, Wallet as E, type FetchOptions as F, type ClientOptions as G, DEFAULT_BASE_URL as H, DEFAULT_MAX_RETRIES as I, DEFAULT_TIMEOUT_MS as J, type Logger as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type LogLevel as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type InternalUserDto as V, type WalletBalance as W, type PublicUserDto as X, type UserWalletDto as Y, ZeroClient as Z, type WelcomeBonusSummary as _, type SessionCredentialsInput as a, type BugReportCategory as a0, type CreateBugReportInput as a1, type CreateBugReportResponse as a2, type CapabilityResponse as a3, type GetCapabilityOptions as a4, type ResolveCapabilityResponse as a5, type DevicePollResult as a6, type DeviceStartResponse as a7, type SessionExchangeResponse as a8, type BatchReviewResponse as a9, type CreateReviewInput as aa, type CreateReviewResponse as ab, type CreateRunInput as ac, type CreateRunResponse as ad, type ListRunsParams as ae, type ListRunsResponse as af, type RunDetail as ag, type RunListItem as ah, type SearchOptions as ai, type SearchResponse as aj, type SearchResult as ak, 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, isShortToken as i, Capabilities as j, type PayInput as k, type PaymentChain as l, type PaymentProtocol as m, type PaymentResult as n, type PayResult as o, type SessionReceiptPayload as p, coerceTempoChainId as q, FETCH_SKIP_REASONS as r, FETCH_WARNINGS as s, Payments as t, paymentHasAnchor as u, TEMPO_TESTNET_CHAIN_ID as v, tempoChainLabelFromId as w, type BalanceOptions as x, type BalanceReadError as y, type FundingUrlOptions as z };
@@ -133,12 +133,18 @@ declare class Payments {
133
133
  private completeMppSession;
134
134
  }
135
135
 
136
+ /** Returns true when `id` is a short search-attribution token (`z_xxx.N`). */
137
+ declare const isShortToken: (id: string) => boolean;
136
138
  type FetchOptions = {
137
139
  method?: string;
138
140
  headers?: Record<string, string>;
139
141
  body?: string | Uint8Array;
140
142
  maxPay?: string;
141
143
  capabilityId?: string;
144
+ /**
145
+ * @deprecated Pass the `z_xxx.N` token from `search()` as `capabilityId`
146
+ * instead — it embeds the searchId. This field is kept for back-compat.
147
+ */
142
148
  searchId?: string;
143
149
  fetchOrigin?: "from_search" | "direct_slug" | "direct_url";
144
150
  account?: LocalAccount;
@@ -438,6 +444,11 @@ declare const capabilityResponseSchema: z.ZodObject<{
438
444
  }, z.core.$strip>;
439
445
  type CapabilityResponse = z.infer<typeof capabilityResponseSchema>;
440
446
  type GetCapabilityOptions = {
447
+ /**
448
+ * @deprecated Pass the `z_xxx.N` token from `search()` as the `id` argument
449
+ * instead — it embeds the searchId. This field is kept for back-compat with
450
+ * callers that still pass uid + searchId separately.
451
+ */
441
452
  searchId?: string;
442
453
  signal?: AbortSignal;
443
454
  };
@@ -506,6 +517,33 @@ declare const listRunsResponseSchema: z.ZodObject<{
506
517
  }, z.core.$strip>>;
507
518
  nextCursor: z.ZodNullable<z.ZodString>;
508
519
  }, z.core.$strip>;
520
+ declare const runDetailSchema: z.ZodObject<{
521
+ runId: z.ZodString;
522
+ status: z.ZodNullable<z.ZodNumber>;
523
+ latencyMs: z.ZodNullable<z.ZodNumber>;
524
+ errorClass: z.ZodNullable<z.ZodString>;
525
+ createdAt: z.ZodCoercedDate<unknown>;
526
+ cost: z.ZodNullable<z.ZodObject<{
527
+ amount: z.ZodString;
528
+ asset: z.ZodNullable<z.ZodString>;
529
+ }, z.core.$strip>>;
530
+ payment: z.ZodNullable<z.ZodObject<{
531
+ protocol: z.ZodString;
532
+ chain: z.ZodNullable<z.ZodString>;
533
+ txHash: z.ZodNullable<z.ZodString>;
534
+ mode: z.ZodNullable<z.ZodString>;
535
+ }, z.core.$strip>>;
536
+ capability: z.ZodObject<{
537
+ uid: z.ZodString;
538
+ slug: z.ZodString;
539
+ name: z.ZodString;
540
+ url: z.ZodString;
541
+ method: z.ZodString;
542
+ whatItDoes: z.ZodNullable<z.ZodString>;
543
+ tags: z.ZodArray<z.ZodString>;
544
+ }, z.core.$strip>;
545
+ reviewed: z.ZodBoolean;
546
+ }, z.core.$strip>;
509
547
  declare const createReviewResponseSchema: z.ZodObject<{
510
548
  reviewId: z.ZodString;
511
549
  recorded: z.ZodBoolean;
@@ -530,6 +568,7 @@ declare const batchReviewResponseSchema: z.ZodObject<{
530
568
  }, z.core.$strip>;
531
569
  }, z.core.$strip>;
532
570
  type RunListItem = z.infer<typeof runListItemSchema>;
571
+ type RunDetail = z.infer<typeof runDetailSchema>;
533
572
  type ListRunsResponse = z.infer<typeof listRunsResponseSchema>;
534
573
  type CreateRunResponse = z.infer<typeof createRunResponseSchema>;
535
574
  type CreateReviewResponse = z.infer<typeof createReviewResponseSchema>;
@@ -537,6 +576,10 @@ type BatchReviewResponse = z.infer<typeof batchReviewResponseSchema>;
537
576
  type CreateRunInput = {
538
577
  capabilityId: string;
539
578
  paymentMethodId?: string;
579
+ /**
580
+ * @deprecated Pass the `z_xxx.N` token from `search()` as `capabilityId`
581
+ * instead — it embeds the searchId. This field is kept for back-compat.
582
+ */
540
583
  searchId?: string;
541
584
  status?: number;
542
585
  latencyMs?: number;
@@ -576,6 +619,9 @@ declare class Runs {
576
619
  list: (params?: ListRunsParams, opts?: {
577
620
  signal?: AbortSignal;
578
621
  }) => Promise<ListRunsResponse>;
622
+ get: (runId: string, opts?: {
623
+ signal?: AbortSignal;
624
+ }) => Promise<RunDetail>;
579
625
  review: (input: CreateReviewInput, opts?: {
580
626
  signal?: AbortSignal;
581
627
  }) => Promise<CreateReviewResponse>;
@@ -684,6 +730,7 @@ declare const DEFAULT_MAX_RETRIES = 2;
684
730
 
685
731
  declare const searchResultSchema: z.ZodObject<{
686
732
  id: z.ZodString;
733
+ token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
734
  position: z.ZodNumber;
688
735
  slug: z.ZodString;
689
736
  name: z.ZodString;
@@ -709,6 +756,7 @@ declare const searchResultSchema: z.ZodObject<{
709
756
  rated: "rated";
710
757
  }>>;
711
758
  }, z.core.$strip>;
759
+ activationCount: z.ZodOptional<z.ZodNumber>;
712
760
  availabilityStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
713
761
  unknown: "unknown";
714
762
  healthy: "healthy";
@@ -729,6 +777,7 @@ declare const searchResponseSchema: z.ZodObject<{
729
777
  hasMore: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
730
778
  capabilities: z.ZodArray<z.ZodObject<{
731
779
  id: z.ZodString;
780
+ token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
732
781
  position: z.ZodNumber;
733
782
  slug: z.ZodString;
734
783
  name: z.ZodString;
@@ -754,6 +803,7 @@ declare const searchResponseSchema: z.ZodObject<{
754
803
  rated: "rated";
755
804
  }>>;
756
805
  }, z.core.$strip>;
806
+ activationCount: z.ZodOptional<z.ZodNumber>;
757
807
  availabilityStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
758
808
  unknown: "unknown";
759
809
  healthy: "healthy";
@@ -860,4 +910,4 @@ declare class ZeroClient {
860
910
  close: () => Promise<void>;
861
911
  }
862
912
 
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 };
913
+ export { BUG_REPORT_CATEGORIES as $, type AccountCredentials as A, BugReports as B, type Credentials as C, type MigrateAuthorizationResponse as D, Wallet as E, type FetchOptions as F, type ClientOptions as G, DEFAULT_BASE_URL as H, DEFAULT_MAX_RETRIES as I, DEFAULT_TIMEOUT_MS as J, type Logger as K, type LogEvent as L, type MigrateAuthorization as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type LogLevel as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, type UpstreamError as U, type InternalUserDto as V, type WalletBalance as W, type PublicUserDto as X, type UserWalletDto as Y, ZeroClient as Z, type WelcomeBonusSummary as _, type SessionCredentialsInput as a, type BugReportCategory as a0, type CreateBugReportInput as a1, type CreateBugReportResponse as a2, type CapabilityResponse as a3, type GetCapabilityOptions as a4, type ResolveCapabilityResponse as a5, type DevicePollResult as a6, type DeviceStartResponse as a7, type SessionExchangeResponse as a8, type BatchReviewResponse as a9, type CreateReviewInput as aa, type CreateReviewResponse as ab, type CreateRunInput as ac, type CreateRunResponse as ad, type ListRunsParams as ae, type ListRunsResponse as af, type RunDetail as ag, type RunListItem as ah, type SearchOptions as ai, type SearchResponse as aj, type SearchResult as ak, 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, isShortToken as i, Capabilities as j, type PayInput as k, type PaymentChain as l, type PaymentProtocol as m, type PaymentResult as n, type PayResult as o, type SessionReceiptPayload as p, coerceTempoChainId as q, FETCH_SKIP_REASONS as r, FETCH_WARNINGS as s, Payments as t, paymentHasAnchor as u, TEMPO_TESTNET_CHAIN_ID as v, tempoChainLabelFromId as w, type BalanceOptions as x, type BalanceReadError as y, type FundingUrlOptions as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkED754B5U_cjs = require('./chunk-ED754B5U.cjs');
3
+ var chunk2HZJHVDN_cjs = require('./chunk-2HZJHVDN.cjs');
4
4
 
5
5
  // src/status.ts
6
6
  var AVAILABILITY_BADGES = {
@@ -25,123 +25,143 @@ var preferHealthy = sortByHealth;
25
25
 
26
26
  Object.defineProperty(exports, "Auth", {
27
27
  enumerable: true,
28
- get: function () { return chunkED754B5U_cjs.Auth; }
28
+ get: function () { return chunk2HZJHVDN_cjs.Auth; }
29
29
  });
30
30
  Object.defineProperty(exports, "AuthDevice", {
31
31
  enumerable: true,
32
- get: function () { return chunkED754B5U_cjs.AuthDevice; }
32
+ get: function () { return chunk2HZJHVDN_cjs.AuthDevice; }
33
33
  });
34
34
  Object.defineProperty(exports, "BUG_REPORT_CATEGORIES", {
35
35
  enumerable: true,
36
- get: function () { return chunkED754B5U_cjs.BUG_REPORT_CATEGORIES; }
36
+ get: function () { return chunk2HZJHVDN_cjs.BUG_REPORT_CATEGORIES; }
37
37
  });
38
38
  Object.defineProperty(exports, "BugReports", {
39
39
  enumerable: true,
40
- get: function () { return chunkED754B5U_cjs.BugReports; }
40
+ get: function () { return chunk2HZJHVDN_cjs.BugReports; }
41
41
  });
42
42
  Object.defineProperty(exports, "Capabilities", {
43
43
  enumerable: true,
44
- get: function () { return chunkED754B5U_cjs.Capabilities; }
44
+ get: function () { return chunk2HZJHVDN_cjs.Capabilities; }
45
45
  });
46
46
  Object.defineProperty(exports, "DEFAULT_BASE_URL", {
47
47
  enumerable: true,
48
- get: function () { return chunkED754B5U_cjs.DEFAULT_BASE_URL; }
48
+ get: function () { return chunk2HZJHVDN_cjs.DEFAULT_BASE_URL; }
49
49
  });
50
50
  Object.defineProperty(exports, "DEFAULT_MAX_RETRIES", {
51
51
  enumerable: true,
52
- get: function () { return chunkED754B5U_cjs.DEFAULT_MAX_RETRIES; }
52
+ get: function () { return chunk2HZJHVDN_cjs.DEFAULT_MAX_RETRIES; }
53
53
  });
54
54
  Object.defineProperty(exports, "DEFAULT_TIMEOUT_MS", {
55
55
  enumerable: true,
56
- get: function () { return chunkED754B5U_cjs.DEFAULT_TIMEOUT_MS; }
56
+ get: function () { return chunk2HZJHVDN_cjs.DEFAULT_TIMEOUT_MS; }
57
57
  });
58
58
  Object.defineProperty(exports, "FETCH_SKIP_REASONS", {
59
59
  enumerable: true,
60
- get: function () { return chunkED754B5U_cjs.FETCH_SKIP_REASONS; }
60
+ get: function () { return chunk2HZJHVDN_cjs.FETCH_SKIP_REASONS; }
61
61
  });
62
62
  Object.defineProperty(exports, "FETCH_WARNINGS", {
63
63
  enumerable: true,
64
- get: function () { return chunkED754B5U_cjs.FETCH_WARNINGS; }
64
+ get: function () { return chunk2HZJHVDN_cjs.FETCH_WARNINGS; }
65
65
  });
66
66
  Object.defineProperty(exports, "Payments", {
67
67
  enumerable: true,
68
- get: function () { return chunkED754B5U_cjs.Payments; }
68
+ get: function () { return chunk2HZJHVDN_cjs.Payments; }
69
69
  });
70
70
  Object.defineProperty(exports, "Runs", {
71
71
  enumerable: true,
72
- get: function () { return chunkED754B5U_cjs.Runs; }
72
+ get: function () { return chunk2HZJHVDN_cjs.Runs; }
73
73
  });
74
74
  Object.defineProperty(exports, "SDK_VERSION", {
75
75
  enumerable: true,
76
- get: function () { return chunkED754B5U_cjs.SDK_VERSION; }
76
+ get: function () { return chunk2HZJHVDN_cjs.SDK_VERSION; }
77
77
  });
78
78
  Object.defineProperty(exports, "TEMPO_CHAIN_ID", {
79
79
  enumerable: true,
80
- get: function () { return chunkED754B5U_cjs.TEMPO_CHAIN_ID; }
80
+ get: function () { return chunk2HZJHVDN_cjs.TEMPO_CHAIN_ID; }
81
81
  });
82
82
  Object.defineProperty(exports, "TEMPO_TESTNET_CHAIN_ID", {
83
83
  enumerable: true,
84
- get: function () { return chunkED754B5U_cjs.TEMPO_TESTNET_CHAIN_ID; }
84
+ get: function () { return chunk2HZJHVDN_cjs.TEMPO_TESTNET_CHAIN_ID; }
85
85
  });
86
86
  Object.defineProperty(exports, "Wallet", {
87
87
  enumerable: true,
88
- get: function () { return chunkED754B5U_cjs.Wallet; }
88
+ get: function () { return chunk2HZJHVDN_cjs.Wallet; }
89
89
  });
90
90
  Object.defineProperty(exports, "ZeroApiError", {
91
91
  enumerable: true,
92
- get: function () { return chunkED754B5U_cjs.ZeroApiError; }
92
+ get: function () { return chunk2HZJHVDN_cjs.ZeroApiError; }
93
93
  });
94
94
  Object.defineProperty(exports, "ZeroAuthError", {
95
95
  enumerable: true,
96
- get: function () { return chunkED754B5U_cjs.ZeroAuthError; }
96
+ get: function () { return chunk2HZJHVDN_cjs.ZeroAuthError; }
97
97
  });
98
98
  Object.defineProperty(exports, "ZeroClient", {
99
99
  enumerable: true,
100
- get: function () { return chunkED754B5U_cjs.ZeroClient; }
100
+ get: function () { return chunk2HZJHVDN_cjs.ZeroClient; }
101
101
  });
102
102
  Object.defineProperty(exports, "ZeroConfigurationError", {
103
103
  enumerable: true,
104
- get: function () { return chunkED754B5U_cjs.ZeroConfigurationError; }
104
+ get: function () { return chunk2HZJHVDN_cjs.ZeroConfigurationError; }
105
105
  });
106
106
  Object.defineProperty(exports, "ZeroError", {
107
107
  enumerable: true,
108
- get: function () { return chunkED754B5U_cjs.ZeroError; }
108
+ get: function () { return chunk2HZJHVDN_cjs.ZeroError; }
109
109
  });
110
110
  Object.defineProperty(exports, "ZeroPaymentError", {
111
111
  enumerable: true,
112
- get: function () { return chunkED754B5U_cjs.ZeroPaymentError; }
112
+ get: function () { return chunk2HZJHVDN_cjs.ZeroPaymentError; }
113
113
  });
114
114
  Object.defineProperty(exports, "ZeroSessionCloseFailedError", {
115
115
  enumerable: true,
116
- get: function () { return chunkED754B5U_cjs.ZeroSessionCloseFailedError; }
116
+ get: function () { return chunk2HZJHVDN_cjs.ZeroSessionCloseFailedError; }
117
117
  });
118
118
  Object.defineProperty(exports, "ZeroTimeoutError", {
119
119
  enumerable: true,
120
- get: function () { return chunkED754B5U_cjs.ZeroTimeoutError; }
120
+ get: function () { return chunk2HZJHVDN_cjs.ZeroTimeoutError; }
121
121
  });
122
122
  Object.defineProperty(exports, "ZeroValidationError", {
123
123
  enumerable: true,
124
- get: function () { return chunkED754B5U_cjs.ZeroValidationError; }
124
+ get: function () { return chunk2HZJHVDN_cjs.ZeroValidationError; }
125
125
  });
126
126
  Object.defineProperty(exports, "ZeroWalletError", {
127
127
  enumerable: true,
128
- get: function () { return chunkED754B5U_cjs.ZeroWalletError; }
128
+ get: function () { return chunk2HZJHVDN_cjs.ZeroWalletError; }
129
+ });
130
+ Object.defineProperty(exports, "asSchemaNode", {
131
+ enumerable: true,
132
+ get: function () { return chunk2HZJHVDN_cjs.asSchemaNode; }
129
133
  });
130
134
  Object.defineProperty(exports, "coerceTempoChainId", {
131
135
  enumerable: true,
132
- get: function () { return chunkED754B5U_cjs.coerceTempoChainId; }
136
+ get: function () { return chunk2HZJHVDN_cjs.coerceTempoChainId; }
133
137
  });
134
138
  Object.defineProperty(exports, "createManagedAccount", {
135
139
  enumerable: true,
136
- get: function () { return chunkED754B5U_cjs.createManagedAccount; }
140
+ get: function () { return chunk2HZJHVDN_cjs.createManagedAccount; }
141
+ });
142
+ Object.defineProperty(exports, "extractInputEnvelope", {
143
+ enumerable: true,
144
+ get: function () { return chunk2HZJHVDN_cjs.extractInputEnvelope; }
145
+ });
146
+ Object.defineProperty(exports, "isShortToken", {
147
+ enumerable: true,
148
+ get: function () { return chunk2HZJHVDN_cjs.isShortToken; }
149
+ });
150
+ Object.defineProperty(exports, "normalizeTransportEnvelopeRequest", {
151
+ enumerable: true,
152
+ get: function () { return chunk2HZJHVDN_cjs.normalizeTransportEnvelopeRequest; }
137
153
  });
138
154
  Object.defineProperty(exports, "paymentHasAnchor", {
139
155
  enumerable: true,
140
- get: function () { return chunkED754B5U_cjs.paymentHasAnchor; }
156
+ get: function () { return chunk2HZJHVDN_cjs.paymentHasAnchor; }
141
157
  });
142
158
  Object.defineProperty(exports, "tempoChainLabelFromId", {
143
159
  enumerable: true,
144
- get: function () { return chunkED754B5U_cjs.tempoChainLabelFromId; }
160
+ get: function () { return chunk2HZJHVDN_cjs.tempoChainLabelFromId; }
161
+ });
162
+ Object.defineProperty(exports, "unwrapTransportEnvelope", {
163
+ enumerable: true,
164
+ get: function () { return chunk2HZJHVDN_cjs.unwrapTransportEnvelope; }
145
165
  });
146
166
  exports.AVAILABILITY_BADGES = AVAILABILITY_BADGES;
147
167
  exports.preferHealthy = preferHealthy;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
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';
1
+ import { Z as ZeroClient, P as PaymentSessionMeta } from './client-7zp9ZyYd.cjs';
2
+ export { A as AccountCredentials, g as Auth, h as AuthDevice, $ as BUG_REPORT_CATEGORIES, x as BalanceOptions, y as BalanceReadError, a9 as BatchReviewResponse, a0 as BugReportCategory, B as BugReports, j as Capabilities, a3 as CapabilityResponse, G as ClientOptions, a1 as CreateBugReportInput, a2 as CreateBugReportResponse, aa as CreateReviewInput, ab as CreateReviewResponse, ac as CreateRunInput, ad as CreateRunResponse, C as Credentials, H as DEFAULT_BASE_URL, I as DEFAULT_MAX_RETRIES, J as DEFAULT_TIMEOUT_MS, a6 as DevicePollResult, a7 as DeviceStartResponse, r as FETCH_SKIP_REASONS, s as FETCH_WARNINGS, F as FetchOptions, b as FetchOutcome, c as FetchResult, z as FundingUrlOptions, a4 as GetCapabilityOptions, V as InternalUserDto, ae as ListRunsParams, af as ListRunsResponse, L as LogEvent, Q as LogLevel, K as Logger, M as MigrateAuthorization, D as MigrateAuthorizationResponse, N as NoCredentials, O as OnSessionRefreshed, k as PayInput, o as PayResult, l as PaymentChain, m as PaymentProtocol, n as PaymentResult, t as Payments, X as PublicUserDto, a5 as ResolveCapabilityResponse, ag as RunDetail, ah as RunListItem, R as Runs, ai as SearchOptions, aj as SearchResponse, ak as SearchResult, S as SessionCredentials, a as SessionCredentialsInput, a8 as SessionExchangeResponse, p as SessionReceiptPayload, d as SignMessageInput, e as SignTransactionInput, f as SignTypedDataInput, T as TEMPO_CHAIN_ID, v as TEMPO_TESTNET_CHAIN_ID, U as UpstreamError, Y as UserWalletDto, E as Wallet, W as WalletBalance, _ as WelcomeBonusSummary, q as coerceTempoChainId, i as isShortToken, u as paymentHasAnchor, w as tempoChainLabelFromId } from './client-7zp9ZyYd.cjs';
3
3
  import { Address, LocalAccount } from 'viem';
4
4
  import { z } from 'zod';
5
5
 
@@ -61,6 +61,61 @@ declare class ZeroConfigurationError extends ZeroError {
61
61
  constructor(message: string, options?: ZeroErrorOptions);
62
62
  }
63
63
 
64
+ /**
65
+ * Zero's HTTP-transport envelope — `{ input: { type: "http", method, queryParams,
66
+ * body } }` — is the proxy descriptor a cap stores, NOT the user-facing request.
67
+ * Some caps (esp. x402 GET endpoints mis-indexed with an MPP-style envelope)
68
+ * carry it in their `bodySchema`/`example`, which leads agents to send the whole
69
+ * wrapper as a body → the SDK infers POST → the GET endpoint 404s.
70
+ *
71
+ * These pure helpers unwrap the envelope so BOTH the CLI display AND SDK-direct
72
+ * partners read the real request shape (queryParams for reads, body for writes).
73
+ * Transport-schema logic belongs in the SDK (the CLI is a thin shell over it);
74
+ * the CLI imports these instead of keeping its own copy.
75
+ */
76
+ type JsonSchemaNode = Record<string, unknown>;
77
+ declare const asSchemaNode: (v: unknown) => JsonSchemaNode | null;
78
+ /**
79
+ * The JSON Schema nodes (each carrying `.properties`/`.required`) for the query
80
+ * params and body a cap accepts. Handles two shapes:
81
+ * - wrapped envelope: `{ properties: { input: { properties: { queryParams, body } } } }`
82
+ * - flat: `{ type, required, properties: {...} }` — routed to queryParams for
83
+ * GET-like verbs (GET/DELETE), body otherwise.
84
+ */
85
+ declare const extractInputEnvelope: (bodySchema: Record<string, unknown> | null | undefined, method: string) => {
86
+ queryParams?: JsonSchemaNode;
87
+ body?: JsonSchemaNode;
88
+ };
89
+ /**
90
+ * Unwrap a stored example request from the HTTP-transport envelope to the
91
+ * meaningful inner payload — body for writes, queryParams for reads. Returns the
92
+ * request unchanged when it isn't an envelope, or null when the envelope carries
93
+ * no real input (e.g. a GET with empty queryParams).
94
+ */
95
+ declare const unwrapTransportEnvelope: (request: unknown) => unknown;
96
+ /**
97
+ * Normalize a request whose body is Zero's HTTP-transport envelope
98
+ * (`{ input: { type:"http", method, queryParams, body } }`) into a real wire
99
+ * request. The envelope is never a wire format (MPP/x402 both call the endpoint
100
+ * URL directly, layering payment), so an agent that sends the envelope as a body
101
+ * would otherwise make the SDK infer POST and 404 a GET endpoint.
102
+ *
103
+ * The verb is CARRIED, not inferred: explicit `method` wins, else the envelope's
104
+ * `input.method`, else body-presence. For GET-like verbs the envelope's
105
+ * queryParams move onto the URL query string and the body is dropped; for writes
106
+ * the inner `input.body` becomes the wire body. Non-envelope requests (and
107
+ * non-string bodies) pass through untouched so `method` stays undefined and the
108
+ * caller's own inference applies.
109
+ */
110
+ declare const normalizeTransportEnvelopeRequest: (url: string, opts: {
111
+ method?: string;
112
+ body?: string | Uint8Array;
113
+ }) => {
114
+ url: string;
115
+ method?: string;
116
+ body?: string | Uint8Array;
117
+ };
118
+
64
119
  declare const ratingSchema: z.ZodObject<{
65
120
  score: z.ZodString;
66
121
  successRate: z.ZodString;
@@ -145,4 +200,4 @@ declare const preferHealthy: <T extends {
145
200
 
146
201
  declare const SDK_VERSION: string;
147
202
 
148
- export { AVAILABILITY_BADGES, type AvailabilityBadge, type AvailabilityStatus, PaymentSessionMeta, type Rating, SDK_VERSION, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, type ZeroErrorCode, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, createManagedAccount, preferHealthy, sortByHealth };
203
+ export { AVAILABILITY_BADGES, type AvailabilityBadge, type AvailabilityStatus, type JsonSchemaNode, PaymentSessionMeta, type Rating, SDK_VERSION, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, type ZeroErrorCode, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, asSchemaNode, createManagedAccount, extractInputEnvelope, normalizeTransportEnvelopeRequest, preferHealthy, sortByHealth, unwrapTransportEnvelope };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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';
1
+ import { Z as ZeroClient, P as PaymentSessionMeta } from './client-7zp9ZyYd.js';
2
+ export { A as AccountCredentials, g as Auth, h as AuthDevice, $ as BUG_REPORT_CATEGORIES, x as BalanceOptions, y as BalanceReadError, a9 as BatchReviewResponse, a0 as BugReportCategory, B as BugReports, j as Capabilities, a3 as CapabilityResponse, G as ClientOptions, a1 as CreateBugReportInput, a2 as CreateBugReportResponse, aa as CreateReviewInput, ab as CreateReviewResponse, ac as CreateRunInput, ad as CreateRunResponse, C as Credentials, H as DEFAULT_BASE_URL, I as DEFAULT_MAX_RETRIES, J as DEFAULT_TIMEOUT_MS, a6 as DevicePollResult, a7 as DeviceStartResponse, r as FETCH_SKIP_REASONS, s as FETCH_WARNINGS, F as FetchOptions, b as FetchOutcome, c as FetchResult, z as FundingUrlOptions, a4 as GetCapabilityOptions, V as InternalUserDto, ae as ListRunsParams, af as ListRunsResponse, L as LogEvent, Q as LogLevel, K as Logger, M as MigrateAuthorization, D as MigrateAuthorizationResponse, N as NoCredentials, O as OnSessionRefreshed, k as PayInput, o as PayResult, l as PaymentChain, m as PaymentProtocol, n as PaymentResult, t as Payments, X as PublicUserDto, a5 as ResolveCapabilityResponse, ag as RunDetail, ah as RunListItem, R as Runs, ai as SearchOptions, aj as SearchResponse, ak as SearchResult, S as SessionCredentials, a as SessionCredentialsInput, a8 as SessionExchangeResponse, p as SessionReceiptPayload, d as SignMessageInput, e as SignTransactionInput, f as SignTypedDataInput, T as TEMPO_CHAIN_ID, v as TEMPO_TESTNET_CHAIN_ID, U as UpstreamError, Y as UserWalletDto, E as Wallet, W as WalletBalance, _ as WelcomeBonusSummary, q as coerceTempoChainId, i as isShortToken, u as paymentHasAnchor, w as tempoChainLabelFromId } from './client-7zp9ZyYd.js';
3
3
  import { Address, LocalAccount } from 'viem';
4
4
  import { z } from 'zod';
5
5
 
@@ -61,6 +61,61 @@ declare class ZeroConfigurationError extends ZeroError {
61
61
  constructor(message: string, options?: ZeroErrorOptions);
62
62
  }
63
63
 
64
+ /**
65
+ * Zero's HTTP-transport envelope — `{ input: { type: "http", method, queryParams,
66
+ * body } }` — is the proxy descriptor a cap stores, NOT the user-facing request.
67
+ * Some caps (esp. x402 GET endpoints mis-indexed with an MPP-style envelope)
68
+ * carry it in their `bodySchema`/`example`, which leads agents to send the whole
69
+ * wrapper as a body → the SDK infers POST → the GET endpoint 404s.
70
+ *
71
+ * These pure helpers unwrap the envelope so BOTH the CLI display AND SDK-direct
72
+ * partners read the real request shape (queryParams for reads, body for writes).
73
+ * Transport-schema logic belongs in the SDK (the CLI is a thin shell over it);
74
+ * the CLI imports these instead of keeping its own copy.
75
+ */
76
+ type JsonSchemaNode = Record<string, unknown>;
77
+ declare const asSchemaNode: (v: unknown) => JsonSchemaNode | null;
78
+ /**
79
+ * The JSON Schema nodes (each carrying `.properties`/`.required`) for the query
80
+ * params and body a cap accepts. Handles two shapes:
81
+ * - wrapped envelope: `{ properties: { input: { properties: { queryParams, body } } } }`
82
+ * - flat: `{ type, required, properties: {...} }` — routed to queryParams for
83
+ * GET-like verbs (GET/DELETE), body otherwise.
84
+ */
85
+ declare const extractInputEnvelope: (bodySchema: Record<string, unknown> | null | undefined, method: string) => {
86
+ queryParams?: JsonSchemaNode;
87
+ body?: JsonSchemaNode;
88
+ };
89
+ /**
90
+ * Unwrap a stored example request from the HTTP-transport envelope to the
91
+ * meaningful inner payload — body for writes, queryParams for reads. Returns the
92
+ * request unchanged when it isn't an envelope, or null when the envelope carries
93
+ * no real input (e.g. a GET with empty queryParams).
94
+ */
95
+ declare const unwrapTransportEnvelope: (request: unknown) => unknown;
96
+ /**
97
+ * Normalize a request whose body is Zero's HTTP-transport envelope
98
+ * (`{ input: { type:"http", method, queryParams, body } }`) into a real wire
99
+ * request. The envelope is never a wire format (MPP/x402 both call the endpoint
100
+ * URL directly, layering payment), so an agent that sends the envelope as a body
101
+ * would otherwise make the SDK infer POST and 404 a GET endpoint.
102
+ *
103
+ * The verb is CARRIED, not inferred: explicit `method` wins, else the envelope's
104
+ * `input.method`, else body-presence. For GET-like verbs the envelope's
105
+ * queryParams move onto the URL query string and the body is dropped; for writes
106
+ * the inner `input.body` becomes the wire body. Non-envelope requests (and
107
+ * non-string bodies) pass through untouched so `method` stays undefined and the
108
+ * caller's own inference applies.
109
+ */
110
+ declare const normalizeTransportEnvelopeRequest: (url: string, opts: {
111
+ method?: string;
112
+ body?: string | Uint8Array;
113
+ }) => {
114
+ url: string;
115
+ method?: string;
116
+ body?: string | Uint8Array;
117
+ };
118
+
64
119
  declare const ratingSchema: z.ZodObject<{
65
120
  score: z.ZodString;
66
121
  successRate: z.ZodString;
@@ -145,4 +200,4 @@ declare const preferHealthy: <T extends {
145
200
 
146
201
  declare const SDK_VERSION: string;
147
202
 
148
- export { AVAILABILITY_BADGES, type AvailabilityBadge, type AvailabilityStatus, PaymentSessionMeta, type Rating, SDK_VERSION, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, type ZeroErrorCode, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, createManagedAccount, preferHealthy, sortByHealth };
203
+ export { AVAILABILITY_BADGES, type AvailabilityBadge, type AvailabilityStatus, type JsonSchemaNode, PaymentSessionMeta, type Rating, SDK_VERSION, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, type ZeroErrorCode, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, asSchemaNode, createManagedAccount, extractInputEnvelope, normalizeTransportEnvelopeRequest, preferHealthy, sortByHealth, unwrapTransportEnvelope };
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-RY3VFSIE.js';
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, asSchemaNode, coerceTempoChainId, createManagedAccount, extractInputEnvelope, isShortToken, normalizeTransportEnvelopeRequest, paymentHasAnchor, tempoChainLabelFromId, unwrapTransportEnvelope } from './chunk-26IHUYNK.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 chunkED754B5U_cjs = require('./chunk-ED754B5U.cjs');
3
+ var chunk2HZJHVDN_cjs = require('./chunk-2HZJHVDN.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 chunkED754B5U_cjs.ZeroClient({
37
+ return new chunk2HZJHVDN_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.
@@ -1,4 +1,4 @@
1
- import { E as ClientOptions, Z as ZeroClient } from './client-BKAiYZYS.cjs';
1
+ import { G as ClientOptions, Z as ZeroClient } from './client-7zp9ZyYd.cjs';
2
2
  import 'viem';
3
3
  import 'zod';
4
4