@zeroxyz/sdk 0.9.0 → 0.11.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.
@@ -168,6 +168,7 @@ type UpstreamError = {
168
168
  message?: string;
169
169
  snippetHash: string;
170
170
  snippetLength: number;
171
+ fixHint?: string;
171
172
  };
172
173
  type FetchResult = {
173
174
  runId: string | null;
@@ -199,6 +200,7 @@ declare const userWalletDtoSchema: z.ZodObject<{
199
200
  }>;
200
201
  isPrimary: z.ZodBoolean;
201
202
  linkedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
203
+ importedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
202
204
  delegationGranted: z.ZodBoolean;
203
205
  signerQuorumId: z.ZodNullable<z.ZodString>;
204
206
  maxTransactionUsdcBaseUnits: z.ZodNullable<z.ZodNumber>;
@@ -222,6 +224,7 @@ declare const internalUserDtoSchema: z.ZodObject<{
222
224
  }>;
223
225
  isPrimary: z.ZodBoolean;
224
226
  linkedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
227
+ importedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
225
228
  delegationGranted: z.ZodBoolean;
226
229
  signerQuorumId: z.ZodNullable<z.ZodString>;
227
230
  maxTransactionUsdcBaseUnits: z.ZodNullable<z.ZodNumber>;
@@ -282,6 +285,153 @@ declare const sessionExchangeResponseSchema: z.ZodObject<{
282
285
  }, z.core.$strip>;
283
286
  type SessionExchangeResponse = z.infer<typeof sessionExchangeResponseSchema>;
284
287
 
288
+ type AgentAuthEndpoints = {
289
+ authorizationServer: string;
290
+ identityEndpoint: string;
291
+ claimEndpoint: string | null;
292
+ tokenEndpoint: string;
293
+ };
294
+ declare const identityEnvelopeSchema: z.ZodPipe<z.ZodObject<{
295
+ id: z.ZodString;
296
+ identity: z.ZodObject<{
297
+ assertion: z.ZodString;
298
+ expires_at: z.ZodOptional<z.ZodString>;
299
+ refresh_token: z.ZodOptional<z.ZodObject<{
300
+ value: z.ZodString;
301
+ }, z.core.$loose>>;
302
+ }, z.core.$loose>;
303
+ claim: z.ZodOptional<z.ZodObject<{
304
+ token: z.ZodOptional<z.ZodString>;
305
+ expires_at: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$loose>>;
307
+ }, z.core.$loose>, z.ZodTransform<{
308
+ registrationId: string;
309
+ identityAssertion: string;
310
+ assertionExpires: string | null;
311
+ refreshToken: string | null;
312
+ claimToken: string | null;
313
+ claimTokenExpires: string | null;
314
+ }, {
315
+ [x: string]: unknown;
316
+ id: string;
317
+ identity: {
318
+ [x: string]: unknown;
319
+ assertion: string;
320
+ expires_at?: string | undefined;
321
+ refresh_token?: {
322
+ [x: string]: unknown;
323
+ value: string;
324
+ } | undefined;
325
+ };
326
+ claim?: {
327
+ [x: string]: unknown;
328
+ token?: string | undefined;
329
+ expires_at?: string | undefined;
330
+ } | undefined;
331
+ }>>;
332
+ type AgentRegistration = z.infer<typeof identityEnvelopeSchema>;
333
+ declare const agentTokenResponseSchema: z.ZodPipe<z.ZodObject<{
334
+ access_token: z.ZodString;
335
+ }, z.core.$loose>, z.ZodTransform<{
336
+ accessToken: string;
337
+ }, {
338
+ [x: string]: unknown;
339
+ access_token: string;
340
+ }>>;
341
+ type AgentToken = z.infer<typeof agentTokenResponseSchema>;
342
+ declare const startClaimResponseSchema: z.ZodPipe<z.ZodObject<{
343
+ attempt: z.ZodObject<{
344
+ verification_uri: z.ZodString;
345
+ expires_at: z.ZodOptional<z.ZodString>;
346
+ }, z.core.$loose>;
347
+ }, z.core.$loose>, z.ZodTransform<{
348
+ verificationUri: string;
349
+ expiresAt: string | null;
350
+ }, {
351
+ [x: string]: unknown;
352
+ attempt: {
353
+ [x: string]: unknown;
354
+ verification_uri: string;
355
+ expires_at?: string | undefined;
356
+ };
357
+ }>>;
358
+ type AgentClaimAttempt = z.infer<typeof startClaimResponseSchema>;
359
+ declare const completeClaimResponseSchema: z.ZodPipe<z.ZodObject<{
360
+ identity: z.ZodObject<{
361
+ assertion: z.ZodString;
362
+ expires_at: z.ZodOptional<z.ZodString>;
363
+ refresh_token: z.ZodOptional<z.ZodObject<{
364
+ value: z.ZodString;
365
+ }, z.core.$loose>>;
366
+ }, z.core.$loose>;
367
+ }, z.core.$loose>, z.ZodTransform<{
368
+ identityAssertion: string;
369
+ assertionExpires: string | null;
370
+ refreshToken: string | null;
371
+ }, {
372
+ [x: string]: unknown;
373
+ identity: {
374
+ [x: string]: unknown;
375
+ assertion: string;
376
+ expires_at?: string | undefined;
377
+ refresh_token?: {
378
+ [x: string]: unknown;
379
+ value: string;
380
+ } | undefined;
381
+ };
382
+ }>>;
383
+ type AgentVerifiedIdentity = z.infer<typeof completeClaimResponseSchema>;
384
+ type CompleteClaimResult = {
385
+ status: "not_confirmed";
386
+ } | {
387
+ status: "invalid_code";
388
+ } | {
389
+ status: "expired";
390
+ code: string;
391
+ } | ({
392
+ status: "ok";
393
+ } & AgentVerifiedIdentity);
394
+ declare const agentZeroSessionSchema: z.ZodObject<{
395
+ accessToken: z.ZodString;
396
+ refreshToken: z.ZodString;
397
+ expiresIn: z.ZodNumber;
398
+ user: z.ZodObject<{
399
+ id: z.ZodString;
400
+ }, z.core.$loose>;
401
+ walletAddress: z.ZodOptional<z.ZodString>;
402
+ }, z.core.$loose>;
403
+ type AgentZeroSession = z.infer<typeof agentZeroSessionSchema>;
404
+ type AgentSignupResult = {
405
+ registration: AgentRegistration;
406
+ session: AgentZeroSession;
407
+ };
408
+
409
+ declare class AuthAgent {
410
+ private readonly client;
411
+ private endpointsPromise;
412
+ constructor(client: ZeroClient);
413
+ signup: () => Promise<AgentSignupResult>;
414
+ register: () => Promise<AgentRegistration>;
415
+ exchangeAssertion: (identityAssertion: string) => Promise<AgentToken>;
416
+ exchangeAtZero: (accessToken: string, opts?: {
417
+ signal?: AbortSignal;
418
+ }) => Promise<AgentZeroSession>;
419
+ startClaim: (input: {
420
+ claimToken: string;
421
+ email: string;
422
+ }) => Promise<AgentClaimAttempt>;
423
+ completeClaim: (input: {
424
+ claimToken: string;
425
+ userCode: string;
426
+ }) => Promise<CompleteClaimResult>;
427
+ endpoints: () => Promise<AgentAuthEndpoints>;
428
+ private discover;
429
+ private getJson;
430
+ private postJson;
431
+ private postForm;
432
+ private post;
433
+ }
434
+
285
435
  declare class AuthDevice {
286
436
  private readonly client;
287
437
  constructor(client: ZeroClient);
@@ -305,6 +455,7 @@ type SignOptions = {
305
455
  };
306
456
  declare class Auth {
307
457
  private readonly client;
458
+ readonly agent: AuthAgent;
308
459
  readonly device: AuthDevice;
309
460
  constructor(client: ZeroClient);
310
461
  me: (opts?: {
@@ -372,7 +523,9 @@ type CreateBugReportResponse = z.infer<typeof createBugReportResponseSchema>;
372
523
  declare class BugReports {
373
524
  private readonly client;
374
525
  constructor(client: ZeroClient);
375
- create: (input: CreateBugReportInput, opts?: {
526
+ create: (input: CreateBugReportInput & {
527
+ contextSeed?: string;
528
+ }, opts?: {
376
529
  signal?: AbortSignal;
377
530
  }) => Promise<CreateBugReportResponse>;
378
531
  }
@@ -410,6 +563,7 @@ declare const capabilityResponseSchema: z.ZodObject<{
410
563
  unknown_unparsed: "unknown_unparsed";
411
564
  unprobed: "unprobed";
412
565
  }>>;
566
+ priceSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
567
  requiresHandshake: z.ZodOptional<z.ZodBoolean>;
414
568
  reviewCount: z.ZodNumber;
415
569
  rating: z.ZodObject<{
@@ -675,21 +829,15 @@ declare class Runs {
675
829
  }) => Promise<BatchReviewResponse>;
676
830
  }
677
831
 
832
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
833
+ declare const USDC_BASE: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
834
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
835
+ declare const USDC_TEMPO: "0x20c000000000000000000000b9537d11c60e8b50";
836
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
837
+ declare const USDC_DECIMALS = 6;
838
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
678
839
  type BalanceChainId = "base" | "tempo";
679
840
 
680
- declare const migrateAuthorizationResponseSchema: z.ZodObject<{
681
- transactionHash: z.ZodString;
682
- }, z.core.$strip>;
683
- type MigrateAuthorization = {
684
- from: string;
685
- to: string;
686
- value: string;
687
- validAfter: string;
688
- validBefore: string;
689
- nonce: string;
690
- signature: string;
691
- };
692
- type MigrateAuthorizationResponse = z.infer<typeof migrateAuthorizationResponseSchema>;
693
841
  type BalanceReadError = {
694
842
  chain: BalanceChainId;
695
843
  message: string;
@@ -709,11 +857,27 @@ type FundingUrlOptions = {
709
857
  provider?: "stripe" | "coinbase";
710
858
  signal?: AbortSignal;
711
859
  };
860
+ type ImportWalletOptions = {
861
+ privateKey: string;
862
+ makePrimary?: boolean;
863
+ signal?: AbortSignal;
864
+ };
865
+ type SetPrimaryWalletOptions = {
866
+ walletAddress: string;
867
+ signal?: AbortSignal;
868
+ };
869
+ type RemoveWalletOptions = {
870
+ walletAddress: string;
871
+ signal?: AbortSignal;
872
+ };
712
873
  declare class Wallet {
713
874
  private readonly client;
714
875
  private readonly clients;
715
876
  constructor(client: ZeroClient);
716
- get address(): `0x${string}` | null;
877
+ private get configuredAddress();
878
+ address: (opts?: {
879
+ signal?: AbortSignal;
880
+ }) => Promise<`0x${string}`>;
717
881
  balance: (opts?: BalanceOptions) => Promise<WalletBalance>;
718
882
  list: (opts?: {
719
883
  signal?: AbortSignal;
@@ -721,9 +885,9 @@ declare class Wallet {
721
885
  provision: (opts?: {
722
886
  signal?: AbortSignal;
723
887
  }) => Promise<UserWalletDto>;
724
- migrateAuthorization: (authorization: MigrateAuthorization, opts?: {
725
- signal?: AbortSignal;
726
- }) => Promise<MigrateAuthorizationResponse>;
888
+ import: (opts: ImportWalletOptions) => Promise<UserWalletDto>;
889
+ setPrimary: (opts: SetPrimaryWalletOptions) => Promise<UserWalletDto>;
890
+ remove: (opts: RemoveWalletOptions) => Promise<void>;
727
891
  fundingUrl: (opts?: FundingUrlOptions) => Promise<string>;
728
892
  private getPublicClient;
729
893
  /**
@@ -790,6 +954,10 @@ declare const searchResultSchema: z.ZodObject<{
790
954
  amount: z.ZodString;
791
955
  asset: z.ZodString;
792
956
  }, z.core.$strip>;
957
+ pricing: z.ZodOptional<z.ZodObject<{
958
+ kind: z.ZodString;
959
+ summary: z.ZodString;
960
+ }, z.core.$strip>>;
793
961
  protocol: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
962
  reviewCount: z.ZodOptional<z.ZodNumber>;
795
963
  rating: z.ZodObject<{
@@ -838,6 +1006,10 @@ declare const searchResponseSchema: z.ZodObject<{
838
1006
  amount: z.ZodString;
839
1007
  asset: z.ZodString;
840
1008
  }, z.core.$strip>;
1009
+ pricing: z.ZodOptional<z.ZodObject<{
1010
+ kind: z.ZodString;
1011
+ summary: z.ZodString;
1012
+ }, z.core.$strip>>;
841
1013
  protocol: z.ZodOptional<z.ZodNullable<z.ZodString>>;
842
1014
  reviewCount: z.ZodOptional<z.ZodNumber>;
843
1015
  rating: z.ZodObject<{
@@ -954,7 +1126,12 @@ declare class ZeroClient {
954
1126
  peekManagedAccount: () => LocalAccount | null;
955
1127
  search: (query: string, opts?: SearchOptions) => Promise<SearchResponse>;
956
1128
  fetch: (url: string, opts?: FetchOptions) => Promise<FetchResult>;
1129
+ ping: (opts?: {
1130
+ maxAttempts?: number;
1131
+ timeoutMs?: number;
1132
+ retryDelayMs?: number;
1133
+ }) => Promise<void>;
957
1134
  close: () => Promise<void>;
958
1135
  }
959
1136
 
960
- 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 };
1137
+ export { type Logger as $, type AccountCredentials as A, type BalanceChainId as B, type Credentials as C, TEMPO_TESTNET_CHAIN_ID as D, tempoChainLabelFromId as E, type FetchOptions as F, type BalanceOptions as G, type BalanceReadError as H, type FundingUrlOptions as I, type ImportWalletOptions as J, type RemoveWalletOptions as K, type SetPrimaryWalletOptions as L, Wallet as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type ClientOptions as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, USDC_BASE as U, DEFAULT_BASE_URL as V, type WalletBalance as W, DEFAULT_MAX_RETRIES as X, DEFAULT_TIMEOUT_MS as Y, ZeroClient as Z, type LogEvent as _, type SessionCredentialsInput as a, type LogLevel as a0, type AgentAuthEndpoints as a1, type AgentClaimAttempt as a2, type AgentRegistration as a3, type AgentSignupResult as a4, type AgentToken as a5, type AgentVerifiedIdentity as a6, type AgentZeroSession as a7, type CompleteClaimResult as a8, type InternalUserDto as a9, type PublicUserDto as aa, type UserWalletDto as ab, type WelcomeBonusSummary as ac, BUG_REPORT_CATEGORIES as ad, type BugReportCategory as ae, type CreateBugReportInput as af, type CreateBugReportResponse as ag, type CapabilityResponse as ah, type GetCapabilityOptions as ai, type ResolveCapabilityResponse as aj, type DevicePollResult as ak, type DeviceStartResponse as al, type SessionExchangeResponse as am, type BatchReviewResponse as an, type CreateReviewInput as ao, type CreateReviewResponse as ap, type CreateRunInput as aq, type CreateRunResponse as ar, type ListRunsParams as as, type ListRunsResponse as at, type RunDetail as au, type RunListItem as av, type SearchOptions as aw, type SearchResponse as ax, type SearchResult as ay, USDC_DECIMALS as b, USDC_TEMPO as c, type FetchOutcome as d, type FetchResult as e, type UpstreamError as f, type SignMessageInput as g, type SignTransactionInput as h, isShortToken as i, type SignTypedDataInput as j, Auth as k, AuthAgent as l, AuthDevice as m, BugReports as n, Capabilities as o, type PayInput as p, type PaymentChain as q, type PaymentProtocol as r, type PaymentResult as s, type PayResult as t, type SessionReceiptPayload as u, coerceTempoChainId as v, FETCH_SKIP_REASONS as w, FETCH_WARNINGS as x, Payments as y, paymentHasAnchor as z };
@@ -168,6 +168,7 @@ type UpstreamError = {
168
168
  message?: string;
169
169
  snippetHash: string;
170
170
  snippetLength: number;
171
+ fixHint?: string;
171
172
  };
172
173
  type FetchResult = {
173
174
  runId: string | null;
@@ -199,6 +200,7 @@ declare const userWalletDtoSchema: z.ZodObject<{
199
200
  }>;
200
201
  isPrimary: z.ZodBoolean;
201
202
  linkedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
203
+ importedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
202
204
  delegationGranted: z.ZodBoolean;
203
205
  signerQuorumId: z.ZodNullable<z.ZodString>;
204
206
  maxTransactionUsdcBaseUnits: z.ZodNullable<z.ZodNumber>;
@@ -222,6 +224,7 @@ declare const internalUserDtoSchema: z.ZodObject<{
222
224
  }>;
223
225
  isPrimary: z.ZodBoolean;
224
226
  linkedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
227
+ importedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>>;
225
228
  delegationGranted: z.ZodBoolean;
226
229
  signerQuorumId: z.ZodNullable<z.ZodString>;
227
230
  maxTransactionUsdcBaseUnits: z.ZodNullable<z.ZodNumber>;
@@ -282,6 +285,153 @@ declare const sessionExchangeResponseSchema: z.ZodObject<{
282
285
  }, z.core.$strip>;
283
286
  type SessionExchangeResponse = z.infer<typeof sessionExchangeResponseSchema>;
284
287
 
288
+ type AgentAuthEndpoints = {
289
+ authorizationServer: string;
290
+ identityEndpoint: string;
291
+ claimEndpoint: string | null;
292
+ tokenEndpoint: string;
293
+ };
294
+ declare const identityEnvelopeSchema: z.ZodPipe<z.ZodObject<{
295
+ id: z.ZodString;
296
+ identity: z.ZodObject<{
297
+ assertion: z.ZodString;
298
+ expires_at: z.ZodOptional<z.ZodString>;
299
+ refresh_token: z.ZodOptional<z.ZodObject<{
300
+ value: z.ZodString;
301
+ }, z.core.$loose>>;
302
+ }, z.core.$loose>;
303
+ claim: z.ZodOptional<z.ZodObject<{
304
+ token: z.ZodOptional<z.ZodString>;
305
+ expires_at: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$loose>>;
307
+ }, z.core.$loose>, z.ZodTransform<{
308
+ registrationId: string;
309
+ identityAssertion: string;
310
+ assertionExpires: string | null;
311
+ refreshToken: string | null;
312
+ claimToken: string | null;
313
+ claimTokenExpires: string | null;
314
+ }, {
315
+ [x: string]: unknown;
316
+ id: string;
317
+ identity: {
318
+ [x: string]: unknown;
319
+ assertion: string;
320
+ expires_at?: string | undefined;
321
+ refresh_token?: {
322
+ [x: string]: unknown;
323
+ value: string;
324
+ } | undefined;
325
+ };
326
+ claim?: {
327
+ [x: string]: unknown;
328
+ token?: string | undefined;
329
+ expires_at?: string | undefined;
330
+ } | undefined;
331
+ }>>;
332
+ type AgentRegistration = z.infer<typeof identityEnvelopeSchema>;
333
+ declare const agentTokenResponseSchema: z.ZodPipe<z.ZodObject<{
334
+ access_token: z.ZodString;
335
+ }, z.core.$loose>, z.ZodTransform<{
336
+ accessToken: string;
337
+ }, {
338
+ [x: string]: unknown;
339
+ access_token: string;
340
+ }>>;
341
+ type AgentToken = z.infer<typeof agentTokenResponseSchema>;
342
+ declare const startClaimResponseSchema: z.ZodPipe<z.ZodObject<{
343
+ attempt: z.ZodObject<{
344
+ verification_uri: z.ZodString;
345
+ expires_at: z.ZodOptional<z.ZodString>;
346
+ }, z.core.$loose>;
347
+ }, z.core.$loose>, z.ZodTransform<{
348
+ verificationUri: string;
349
+ expiresAt: string | null;
350
+ }, {
351
+ [x: string]: unknown;
352
+ attempt: {
353
+ [x: string]: unknown;
354
+ verification_uri: string;
355
+ expires_at?: string | undefined;
356
+ };
357
+ }>>;
358
+ type AgentClaimAttempt = z.infer<typeof startClaimResponseSchema>;
359
+ declare const completeClaimResponseSchema: z.ZodPipe<z.ZodObject<{
360
+ identity: z.ZodObject<{
361
+ assertion: z.ZodString;
362
+ expires_at: z.ZodOptional<z.ZodString>;
363
+ refresh_token: z.ZodOptional<z.ZodObject<{
364
+ value: z.ZodString;
365
+ }, z.core.$loose>>;
366
+ }, z.core.$loose>;
367
+ }, z.core.$loose>, z.ZodTransform<{
368
+ identityAssertion: string;
369
+ assertionExpires: string | null;
370
+ refreshToken: string | null;
371
+ }, {
372
+ [x: string]: unknown;
373
+ identity: {
374
+ [x: string]: unknown;
375
+ assertion: string;
376
+ expires_at?: string | undefined;
377
+ refresh_token?: {
378
+ [x: string]: unknown;
379
+ value: string;
380
+ } | undefined;
381
+ };
382
+ }>>;
383
+ type AgentVerifiedIdentity = z.infer<typeof completeClaimResponseSchema>;
384
+ type CompleteClaimResult = {
385
+ status: "not_confirmed";
386
+ } | {
387
+ status: "invalid_code";
388
+ } | {
389
+ status: "expired";
390
+ code: string;
391
+ } | ({
392
+ status: "ok";
393
+ } & AgentVerifiedIdentity);
394
+ declare const agentZeroSessionSchema: z.ZodObject<{
395
+ accessToken: z.ZodString;
396
+ refreshToken: z.ZodString;
397
+ expiresIn: z.ZodNumber;
398
+ user: z.ZodObject<{
399
+ id: z.ZodString;
400
+ }, z.core.$loose>;
401
+ walletAddress: z.ZodOptional<z.ZodString>;
402
+ }, z.core.$loose>;
403
+ type AgentZeroSession = z.infer<typeof agentZeroSessionSchema>;
404
+ type AgentSignupResult = {
405
+ registration: AgentRegistration;
406
+ session: AgentZeroSession;
407
+ };
408
+
409
+ declare class AuthAgent {
410
+ private readonly client;
411
+ private endpointsPromise;
412
+ constructor(client: ZeroClient);
413
+ signup: () => Promise<AgentSignupResult>;
414
+ register: () => Promise<AgentRegistration>;
415
+ exchangeAssertion: (identityAssertion: string) => Promise<AgentToken>;
416
+ exchangeAtZero: (accessToken: string, opts?: {
417
+ signal?: AbortSignal;
418
+ }) => Promise<AgentZeroSession>;
419
+ startClaim: (input: {
420
+ claimToken: string;
421
+ email: string;
422
+ }) => Promise<AgentClaimAttempt>;
423
+ completeClaim: (input: {
424
+ claimToken: string;
425
+ userCode: string;
426
+ }) => Promise<CompleteClaimResult>;
427
+ endpoints: () => Promise<AgentAuthEndpoints>;
428
+ private discover;
429
+ private getJson;
430
+ private postJson;
431
+ private postForm;
432
+ private post;
433
+ }
434
+
285
435
  declare class AuthDevice {
286
436
  private readonly client;
287
437
  constructor(client: ZeroClient);
@@ -305,6 +455,7 @@ type SignOptions = {
305
455
  };
306
456
  declare class Auth {
307
457
  private readonly client;
458
+ readonly agent: AuthAgent;
308
459
  readonly device: AuthDevice;
309
460
  constructor(client: ZeroClient);
310
461
  me: (opts?: {
@@ -372,7 +523,9 @@ type CreateBugReportResponse = z.infer<typeof createBugReportResponseSchema>;
372
523
  declare class BugReports {
373
524
  private readonly client;
374
525
  constructor(client: ZeroClient);
375
- create: (input: CreateBugReportInput, opts?: {
526
+ create: (input: CreateBugReportInput & {
527
+ contextSeed?: string;
528
+ }, opts?: {
376
529
  signal?: AbortSignal;
377
530
  }) => Promise<CreateBugReportResponse>;
378
531
  }
@@ -410,6 +563,7 @@ declare const capabilityResponseSchema: z.ZodObject<{
410
563
  unknown_unparsed: "unknown_unparsed";
411
564
  unprobed: "unprobed";
412
565
  }>>;
566
+ priceSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
567
  requiresHandshake: z.ZodOptional<z.ZodBoolean>;
414
568
  reviewCount: z.ZodNumber;
415
569
  rating: z.ZodObject<{
@@ -675,21 +829,15 @@ declare class Runs {
675
829
  }) => Promise<BatchReviewResponse>;
676
830
  }
677
831
 
832
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
833
+ declare const USDC_BASE: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913";
834
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
835
+ declare const USDC_TEMPO: "0x20c000000000000000000000b9537d11c60e8b50";
836
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
837
+ declare const USDC_DECIMALS = 6;
838
+ /** @internal Zero-surface constant — not part of the supported partner contract. */
678
839
  type BalanceChainId = "base" | "tempo";
679
840
 
680
- declare const migrateAuthorizationResponseSchema: z.ZodObject<{
681
- transactionHash: z.ZodString;
682
- }, z.core.$strip>;
683
- type MigrateAuthorization = {
684
- from: string;
685
- to: string;
686
- value: string;
687
- validAfter: string;
688
- validBefore: string;
689
- nonce: string;
690
- signature: string;
691
- };
692
- type MigrateAuthorizationResponse = z.infer<typeof migrateAuthorizationResponseSchema>;
693
841
  type BalanceReadError = {
694
842
  chain: BalanceChainId;
695
843
  message: string;
@@ -709,11 +857,27 @@ type FundingUrlOptions = {
709
857
  provider?: "stripe" | "coinbase";
710
858
  signal?: AbortSignal;
711
859
  };
860
+ type ImportWalletOptions = {
861
+ privateKey: string;
862
+ makePrimary?: boolean;
863
+ signal?: AbortSignal;
864
+ };
865
+ type SetPrimaryWalletOptions = {
866
+ walletAddress: string;
867
+ signal?: AbortSignal;
868
+ };
869
+ type RemoveWalletOptions = {
870
+ walletAddress: string;
871
+ signal?: AbortSignal;
872
+ };
712
873
  declare class Wallet {
713
874
  private readonly client;
714
875
  private readonly clients;
715
876
  constructor(client: ZeroClient);
716
- get address(): `0x${string}` | null;
877
+ private get configuredAddress();
878
+ address: (opts?: {
879
+ signal?: AbortSignal;
880
+ }) => Promise<`0x${string}`>;
717
881
  balance: (opts?: BalanceOptions) => Promise<WalletBalance>;
718
882
  list: (opts?: {
719
883
  signal?: AbortSignal;
@@ -721,9 +885,9 @@ declare class Wallet {
721
885
  provision: (opts?: {
722
886
  signal?: AbortSignal;
723
887
  }) => Promise<UserWalletDto>;
724
- migrateAuthorization: (authorization: MigrateAuthorization, opts?: {
725
- signal?: AbortSignal;
726
- }) => Promise<MigrateAuthorizationResponse>;
888
+ import: (opts: ImportWalletOptions) => Promise<UserWalletDto>;
889
+ setPrimary: (opts: SetPrimaryWalletOptions) => Promise<UserWalletDto>;
890
+ remove: (opts: RemoveWalletOptions) => Promise<void>;
727
891
  fundingUrl: (opts?: FundingUrlOptions) => Promise<string>;
728
892
  private getPublicClient;
729
893
  /**
@@ -790,6 +954,10 @@ declare const searchResultSchema: z.ZodObject<{
790
954
  amount: z.ZodString;
791
955
  asset: z.ZodString;
792
956
  }, z.core.$strip>;
957
+ pricing: z.ZodOptional<z.ZodObject<{
958
+ kind: z.ZodString;
959
+ summary: z.ZodString;
960
+ }, z.core.$strip>>;
793
961
  protocol: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
962
  reviewCount: z.ZodOptional<z.ZodNumber>;
795
963
  rating: z.ZodObject<{
@@ -838,6 +1006,10 @@ declare const searchResponseSchema: z.ZodObject<{
838
1006
  amount: z.ZodString;
839
1007
  asset: z.ZodString;
840
1008
  }, z.core.$strip>;
1009
+ pricing: z.ZodOptional<z.ZodObject<{
1010
+ kind: z.ZodString;
1011
+ summary: z.ZodString;
1012
+ }, z.core.$strip>>;
841
1013
  protocol: z.ZodOptional<z.ZodNullable<z.ZodString>>;
842
1014
  reviewCount: z.ZodOptional<z.ZodNumber>;
843
1015
  rating: z.ZodObject<{
@@ -954,7 +1126,12 @@ declare class ZeroClient {
954
1126
  peekManagedAccount: () => LocalAccount | null;
955
1127
  search: (query: string, opts?: SearchOptions) => Promise<SearchResponse>;
956
1128
  fetch: (url: string, opts?: FetchOptions) => Promise<FetchResult>;
1129
+ ping: (opts?: {
1130
+ maxAttempts?: number;
1131
+ timeoutMs?: number;
1132
+ retryDelayMs?: number;
1133
+ }) => Promise<void>;
957
1134
  close: () => Promise<void>;
958
1135
  }
959
1136
 
960
- 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 };
1137
+ export { type Logger as $, type AccountCredentials as A, type BalanceChainId as B, type Credentials as C, TEMPO_TESTNET_CHAIN_ID as D, tempoChainLabelFromId as E, type FetchOptions as F, type BalanceOptions as G, type BalanceReadError as H, type FundingUrlOptions as I, type ImportWalletOptions as J, type RemoveWalletOptions as K, type SetPrimaryWalletOptions as L, Wallet as M, type NoCredentials as N, type OnSessionRefreshed as O, type PaymentSessionMeta as P, type ClientOptions as Q, Runs as R, type SessionCredentials as S, TEMPO_CHAIN_ID as T, USDC_BASE as U, DEFAULT_BASE_URL as V, type WalletBalance as W, DEFAULT_MAX_RETRIES as X, DEFAULT_TIMEOUT_MS as Y, ZeroClient as Z, type LogEvent as _, type SessionCredentialsInput as a, type LogLevel as a0, type AgentAuthEndpoints as a1, type AgentClaimAttempt as a2, type AgentRegistration as a3, type AgentSignupResult as a4, type AgentToken as a5, type AgentVerifiedIdentity as a6, type AgentZeroSession as a7, type CompleteClaimResult as a8, type InternalUserDto as a9, type PublicUserDto as aa, type UserWalletDto as ab, type WelcomeBonusSummary as ac, BUG_REPORT_CATEGORIES as ad, type BugReportCategory as ae, type CreateBugReportInput as af, type CreateBugReportResponse as ag, type CapabilityResponse as ah, type GetCapabilityOptions as ai, type ResolveCapabilityResponse as aj, type DevicePollResult as ak, type DeviceStartResponse as al, type SessionExchangeResponse as am, type BatchReviewResponse as an, type CreateReviewInput as ao, type CreateReviewResponse as ap, type CreateRunInput as aq, type CreateRunResponse as ar, type ListRunsParams as as, type ListRunsResponse as at, type RunDetail as au, type RunListItem as av, type SearchOptions as aw, type SearchResponse as ax, type SearchResult as ay, USDC_DECIMALS as b, USDC_TEMPO as c, type FetchOutcome as d, type FetchResult as e, type UpstreamError as f, type SignMessageInput as g, type SignTransactionInput as h, isShortToken as i, type SignTypedDataInput as j, Auth as k, AuthAgent as l, AuthDevice as m, BugReports as n, Capabilities as o, type PayInput as p, type PaymentChain as q, type PaymentProtocol as r, type PaymentResult as s, type PayResult as t, type SessionReceiptPayload as u, coerceTempoChainId as v, FETCH_SKIP_REASONS as w, FETCH_WARNINGS as x, Payments as y, paymentHasAnchor as z };