accounts 0.15.3 → 0.16.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.
@@ -4,9 +4,9 @@ import { type Chain, type Client, type Transport } from 'viem';
4
4
  import * as z from 'zod/mini';
5
5
  import type { MaybePromise } from '../internal/types.js';
6
6
  import type { Kv } from './Kv.js';
7
- /** Supported access-key types for CLI bootstrap. */
7
+ /** Supported access key types for CLI bootstrap. */
8
8
  export declare const keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
9
- /** Signed key authorization returned by the device-code flow. */
9
+ /** Signed key authorization returned by the device code flow. */
10
10
  export declare const keyAuthorization: z.ZodMiniObject<{
11
11
  address: z.ZodMiniTemplateLiteral<`0x${string}`>;
12
12
  chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
@@ -19,8 +19,9 @@ export declare const keyAuthorization: z.ZodMiniObject<{
19
19
  }, z.core.$strip>>>>;
20
20
  signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
21
21
  }, z.core.$strip>;
22
- /** CLI auth device-code creation request body. */
23
- export declare const createRequest: z.ZodMiniObject<{
22
+ /** CLI auth device code creation request body. */
23
+ export declare const createRequest: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
24
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
24
25
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
25
26
  chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
26
27
  codeChallenge: z.ZodMiniString<string>;
@@ -37,7 +38,119 @@ export declare const createRequest: z.ZodMiniObject<{
37
38
  on: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"login">, z.ZodMiniLiteral<"register">]>>;
38
39
  token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
39
40
  }, z.core.$strip>]>>;
40
- }, z.core.$strip>;
41
+ }, z.core.$strip>, z.ZodMiniObject<{
42
+ action: z.ZodMiniLiteral<"updateAccessKey">;
43
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
44
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
45
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
46
+ codeChallenge: z.ZodMiniString<string>;
47
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
48
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
49
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
50
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
51
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
52
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
53
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
54
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
55
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
56
+ }, z.core.$strip>>>>;
57
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
58
+ }, z.core.$strip>>;
59
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
60
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
61
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
62
+ }, z.core.$strip>>>;
63
+ }, z.core.$strip>]>, "_zod"> & {
64
+ _zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
65
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
66
+ account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
67
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
68
+ codeChallenge: z.ZodMiniString<string>;
69
+ expiry: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
70
+ keyType: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>>;
71
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
72
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
73
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
74
+ }, z.core.$strip>>>>;
75
+ pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
76
+ showDeposit: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniObject<{
77
+ amount: z.ZodMiniOptional<z.ZodMiniString<string>>;
78
+ displayName: z.ZodMiniOptional<z.ZodMiniString<string>>;
79
+ on: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"login">, z.ZodMiniLiteral<"register">]>>;
80
+ token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
81
+ }, z.core.$strip>]>>;
82
+ }, z.core.$strip>, z.ZodMiniObject<{
83
+ action: z.ZodMiniLiteral<"updateAccessKey">;
84
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
85
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
86
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
87
+ codeChallenge: z.ZodMiniString<string>;
88
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
89
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
90
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
91
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
92
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
93
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
94
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
95
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
96
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
97
+ }, z.core.$strip>>>>;
98
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
99
+ }, z.core.$strip>>;
100
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
101
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
102
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
103
+ }, z.core.$strip>>>;
104
+ }, z.core.$strip>]>, "output"> & {
105
+ output: {
106
+ codeChallenge: string;
107
+ pubKey: `0x${string}`;
108
+ action?: "authorizeAccessKey" | undefined;
109
+ account?: `0x${string}` | undefined;
110
+ chainId?: bigint | undefined;
111
+ expiry?: number | undefined;
112
+ keyType?: "secp256k1" | "p256" | "webAuthn" | undefined;
113
+ limits?: readonly {
114
+ token: `0x${string}`;
115
+ limit: bigint;
116
+ }[] | undefined;
117
+ showDeposit?: boolean | {
118
+ amount?: string | undefined;
119
+ displayName?: string | undefined;
120
+ on?: "register" | "login" | undefined;
121
+ token?: string | undefined;
122
+ } | undefined;
123
+ accessKeyAddress?: undefined;
124
+ keyAuthorization?: undefined;
125
+ } | {
126
+ action: "updateAccessKey";
127
+ accessKeyAddress: `0x${string}`;
128
+ account: `0x${string}`;
129
+ codeChallenge: string;
130
+ limits: readonly {
131
+ token: `0x${string}`;
132
+ limit: bigint;
133
+ }[];
134
+ chainId?: bigint | undefined;
135
+ keyAuthorization?: {
136
+ address: `0x${string}`;
137
+ chainId: bigint;
138
+ expiry: number | null | undefined;
139
+ keyId: `0x${string}`;
140
+ keyType: "secp256k1" | "p256" | "webAuthn";
141
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
142
+ limits?: readonly {
143
+ token: `0x${string}`;
144
+ limit: bigint;
145
+ }[] | undefined;
146
+ } | undefined;
147
+ expiry?: undefined;
148
+ keyType?: undefined;
149
+ showDeposit?: undefined;
150
+ pubKey?: undefined;
151
+ };
152
+ };
153
+ };
41
154
  /** Response body for `POST /cli-auth/device-code`. */
42
155
  export declare const createResponse: z.ZodMiniObject<{
43
156
  code: z.ZodMiniString<string>;
@@ -64,6 +177,21 @@ export declare const pollResponse: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject
64
177
  }, z.core.$strip>>>>;
65
178
  signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
66
179
  }, z.core.$strip>;
180
+ }, z.core.$strip>, z.ZodMiniObject<{
181
+ action: z.ZodMiniLiteral<"updateAccessKey">;
182
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
183
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
184
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
185
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
186
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
187
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
188
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
189
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
190
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
191
+ }, z.core.$strip>>>>;
192
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
193
+ }, z.core.$strip>>;
194
+ status: z.ZodMiniLiteral<"authorized">;
67
195
  }, z.core.$strip>, z.ZodMiniObject<{
68
196
  status: z.ZodMiniLiteral<"expired">;
69
197
  }, z.core.$strip>]>, "_zod"> & {
@@ -84,12 +212,28 @@ export declare const pollResponse: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject
84
212
  }, z.core.$strip>>>>;
85
213
  signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
86
214
  }, z.core.$strip>;
215
+ }, z.core.$strip>, z.ZodMiniObject<{
216
+ action: z.ZodMiniLiteral<"updateAccessKey">;
217
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
218
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
219
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
220
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
221
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
222
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
223
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
224
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
225
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
226
+ }, z.core.$strip>>>>;
227
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
228
+ }, z.core.$strip>>;
229
+ status: z.ZodMiniLiteral<"authorized">;
87
230
  }, z.core.$strip>, z.ZodMiniObject<{
88
231
  status: z.ZodMiniLiteral<"expired">;
89
232
  }, z.core.$strip>]>, "output"> & {
90
233
  output: {
91
234
  status: "pending";
92
235
  keyAuthorization?: undefined;
236
+ action?: undefined;
93
237
  accountAddress?: undefined;
94
238
  } | {
95
239
  status: "authorized";
@@ -106,15 +250,34 @@ export declare const pollResponse: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject
106
250
  limit: bigint;
107
251
  }[] | undefined;
108
252
  };
253
+ action?: undefined;
254
+ } | {
255
+ action: "updateAccessKey";
256
+ status: "authorized";
257
+ keyAuthorization?: {
258
+ address: `0x${string}`;
259
+ chainId: bigint;
260
+ expiry: number | null | undefined;
261
+ keyId: `0x${string}`;
262
+ keyType: "secp256k1" | "p256" | "webAuthn";
263
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
264
+ limits?: readonly {
265
+ token: `0x${string}`;
266
+ limit: bigint;
267
+ }[] | undefined;
268
+ } | undefined;
269
+ accountAddress?: undefined;
109
270
  } | {
110
271
  status: "expired";
111
272
  keyAuthorization?: undefined;
273
+ action?: undefined;
112
274
  accountAddress?: undefined;
113
275
  };
114
276
  };
115
277
  };
116
278
  /** Response body for `GET /auth/pkce/pending/:code`. */
117
- export declare const pendingResponse: z.ZodMiniObject<{
279
+ export declare const pendingResponse: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
280
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
118
281
  accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
119
282
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
120
283
  chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
@@ -133,9 +296,128 @@ export declare const pendingResponse: z.ZodMiniObject<{
133
296
  token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
134
297
  }, z.core.$strip>]>>;
135
298
  status: z.ZodMiniLiteral<"pending">;
136
- }, z.core.$strip>;
299
+ }, z.core.$strip>, z.ZodMiniObject<{
300
+ action: z.ZodMiniLiteral<"updateAccessKey">;
301
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
302
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
303
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
304
+ code: z.ZodMiniString<string>;
305
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
306
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
307
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
308
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
309
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
310
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
311
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
312
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
313
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
314
+ }, z.core.$strip>>>>;
315
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
316
+ }, z.core.$strip>>;
317
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
318
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
319
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
320
+ }, z.core.$strip>>>;
321
+ status: z.ZodMiniLiteral<"pending">;
322
+ }, z.core.$strip>]>, "_zod"> & {
323
+ _zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
324
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
325
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
326
+ account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
327
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
328
+ code: z.ZodMiniString<string>;
329
+ expiry: z.ZodMiniNumber<number>;
330
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
331
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
332
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
333
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
334
+ }, z.core.$strip>>>>;
335
+ pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
336
+ showDeposit: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniObject<{
337
+ amount: z.ZodMiniOptional<z.ZodMiniString<string>>;
338
+ displayName: z.ZodMiniOptional<z.ZodMiniString<string>>;
339
+ on: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"login">, z.ZodMiniLiteral<"register">]>>;
340
+ token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
341
+ }, z.core.$strip>]>>;
342
+ status: z.ZodMiniLiteral<"pending">;
343
+ }, z.core.$strip>, z.ZodMiniObject<{
344
+ action: z.ZodMiniLiteral<"updateAccessKey">;
345
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
346
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
347
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
348
+ code: z.ZodMiniString<string>;
349
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
350
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
351
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
352
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
353
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
354
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
355
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
356
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
357
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
358
+ }, z.core.$strip>>>>;
359
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
360
+ }, z.core.$strip>>;
361
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
362
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
363
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
364
+ }, z.core.$strip>>>;
365
+ status: z.ZodMiniLiteral<"pending">;
366
+ }, z.core.$strip>]>, "output"> & {
367
+ output: {
368
+ accessKeyAddress: `0x${string}`;
369
+ chainId: bigint;
370
+ code: string;
371
+ expiry: number;
372
+ keyType: "secp256k1" | "p256" | "webAuthn";
373
+ pubKey: `0x${string}`;
374
+ status: "pending";
375
+ action?: "authorizeAccessKey" | undefined;
376
+ account?: `0x${string}` | undefined;
377
+ limits?: readonly {
378
+ token: `0x${string}`;
379
+ limit: bigint;
380
+ }[] | undefined;
381
+ showDeposit?: boolean | {
382
+ amount?: string | undefined;
383
+ displayName?: string | undefined;
384
+ on?: "register" | "login" | undefined;
385
+ token?: string | undefined;
386
+ } | undefined;
387
+ keyAuthorization?: undefined;
388
+ } | {
389
+ action: "updateAccessKey";
390
+ accessKeyAddress: `0x${string}`;
391
+ account: `0x${string}`;
392
+ chainId: bigint;
393
+ code: string;
394
+ limits: readonly {
395
+ token: `0x${string}`;
396
+ limit: bigint;
397
+ }[];
398
+ status: "pending";
399
+ keyAuthorization?: {
400
+ address: `0x${string}`;
401
+ chainId: bigint;
402
+ expiry: number | null | undefined;
403
+ keyId: `0x${string}`;
404
+ keyType: "secp256k1" | "p256" | "webAuthn";
405
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
406
+ limits?: readonly {
407
+ token: `0x${string}`;
408
+ limit: bigint;
409
+ }[] | undefined;
410
+ } | undefined;
411
+ expiry?: undefined;
412
+ keyType?: undefined;
413
+ showDeposit?: undefined;
414
+ pubKey?: undefined;
415
+ };
416
+ };
417
+ };
137
418
  /** Request body for `POST /auth/pkce`. */
138
- export declare const authorizeRequest: z.ZodMiniObject<{
419
+ export declare const authorizeRequest: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
420
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
139
421
  accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
140
422
  code: z.ZodMiniString<string>;
141
423
  keyAuthorization: z.ZodMiniObject<{
@@ -150,13 +432,102 @@ export declare const authorizeRequest: z.ZodMiniObject<{
150
432
  }, z.core.$strip>>>>;
151
433
  signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
152
434
  }, z.core.$strip>;
153
- }, z.core.$strip>;
435
+ }, z.core.$strip>, z.ZodMiniObject<{
436
+ action: z.ZodMiniLiteral<"updateAccessKey">;
437
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
438
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
439
+ code: z.ZodMiniString<string>;
440
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
441
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
442
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
443
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
444
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
445
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
446
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
447
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
448
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
449
+ }, z.core.$strip>>>>;
450
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
451
+ }, z.core.$strip>>;
452
+ }, z.core.$strip>]>, "_zod"> & {
453
+ _zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
454
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
455
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
456
+ code: z.ZodMiniString<string>;
457
+ keyAuthorization: z.ZodMiniObject<{
458
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
459
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
460
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
461
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
462
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
463
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
464
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
465
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
466
+ }, z.core.$strip>>>>;
467
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
468
+ }, z.core.$strip>;
469
+ }, z.core.$strip>, z.ZodMiniObject<{
470
+ action: z.ZodMiniLiteral<"updateAccessKey">;
471
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
472
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
473
+ code: z.ZodMiniString<string>;
474
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
475
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
476
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
477
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
478
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
479
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
480
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
481
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
482
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
483
+ }, z.core.$strip>>>>;
484
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
485
+ }, z.core.$strip>>;
486
+ }, z.core.$strip>]>, "output"> & {
487
+ output: {
488
+ accountAddress: `0x${string}`;
489
+ code: string;
490
+ keyAuthorization: {
491
+ address: `0x${string}`;
492
+ chainId: bigint;
493
+ expiry: number | null | undefined;
494
+ keyId: `0x${string}`;
495
+ keyType: "secp256k1" | "p256" | "webAuthn";
496
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
497
+ limits?: readonly {
498
+ token: `0x${string}`;
499
+ limit: bigint;
500
+ }[] | undefined;
501
+ };
502
+ action?: "authorizeAccessKey" | undefined;
503
+ chainId?: undefined;
504
+ } | {
505
+ action: "updateAccessKey";
506
+ accountAddress: `0x${string}`;
507
+ chainId: bigint;
508
+ code: string;
509
+ keyAuthorization?: {
510
+ address: `0x${string}`;
511
+ chainId: bigint;
512
+ expiry: number | null | undefined;
513
+ keyId: `0x${string}`;
514
+ keyType: "secp256k1" | "p256" | "webAuthn";
515
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
516
+ limits?: readonly {
517
+ token: `0x${string}`;
518
+ limit: bigint;
519
+ }[] | undefined;
520
+ } | undefined;
521
+ };
522
+ };
523
+ };
154
524
  /** Response body for `POST /cli-auth/authorize`. */
155
525
  export declare const authorizeResponse: z.ZodMiniObject<{
156
526
  status: z.ZodMiniLiteral<"authorized">;
157
527
  }, z.core.$strip>;
158
- /** Stored device-code entry schema. */
528
+ /** Stored device code entry schema. */
159
529
  export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
530
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
160
531
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
161
532
  chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
162
533
  code: z.ZodMiniString<string>;
@@ -178,6 +549,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
178
549
  }, z.core.$strip>]>>;
179
550
  status: z.ZodMiniLiteral<"pending">;
180
551
  }, z.core.$strip>, z.ZodMiniObject<{
552
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
181
553
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
182
554
  accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
183
555
  authorizedAt: z.ZodMiniNumber<number>;
@@ -213,6 +585,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
213
585
  }, z.core.$strip>]>>;
214
586
  status: z.ZodMiniLiteral<"authorized">;
215
587
  }, z.core.$strip>, z.ZodMiniObject<{
588
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
216
589
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
217
590
  accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
218
591
  authorizedAt: z.ZodMiniNumber<number>;
@@ -248,8 +621,92 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
248
621
  token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
249
622
  }, z.core.$strip>]>>;
250
623
  status: z.ZodMiniLiteral<"consumed">;
624
+ }, z.core.$strip>, z.ZodMiniObject<{
625
+ action: z.ZodMiniLiteral<"updateAccessKey">;
626
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
627
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
628
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
629
+ code: z.ZodMiniString<string>;
630
+ codeChallenge: z.ZodMiniString<string>;
631
+ createdAt: z.ZodMiniNumber<number>;
632
+ expiresAt: z.ZodMiniNumber<number>;
633
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
634
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
635
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
636
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
637
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
638
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
639
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
640
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
641
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
642
+ }, z.core.$strip>>>>;
643
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
644
+ }, z.core.$strip>>;
645
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
646
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
647
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
648
+ }, z.core.$strip>>>;
649
+ status: z.ZodMiniLiteral<"pending">;
650
+ }, z.core.$strip>, z.ZodMiniObject<{
651
+ action: z.ZodMiniLiteral<"updateAccessKey">;
652
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
653
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
654
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
655
+ authorizedAt: z.ZodMiniNumber<number>;
656
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
657
+ code: z.ZodMiniString<string>;
658
+ codeChallenge: z.ZodMiniString<string>;
659
+ createdAt: z.ZodMiniNumber<number>;
660
+ expiresAt: z.ZodMiniNumber<number>;
661
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
662
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
663
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
664
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
665
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
666
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
667
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
668
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
669
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
670
+ }, z.core.$strip>>>>;
671
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
672
+ }, z.core.$strip>>;
673
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
674
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
675
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
676
+ }, z.core.$strip>>>;
677
+ status: z.ZodMiniLiteral<"authorized">;
678
+ }, z.core.$strip>, z.ZodMiniObject<{
679
+ action: z.ZodMiniLiteral<"updateAccessKey">;
680
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
681
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
682
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
683
+ authorizedAt: z.ZodMiniNumber<number>;
684
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
685
+ code: z.ZodMiniString<string>;
686
+ codeChallenge: z.ZodMiniString<string>;
687
+ consumedAt: z.ZodMiniNumber<number>;
688
+ createdAt: z.ZodMiniNumber<number>;
689
+ expiresAt: z.ZodMiniNumber<number>;
690
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
691
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
692
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
693
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
694
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
695
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
696
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
697
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
698
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
699
+ }, z.core.$strip>>>>;
700
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
701
+ }, z.core.$strip>>;
702
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
703
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
704
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
705
+ }, z.core.$strip>>>;
706
+ status: z.ZodMiniLiteral<"consumed">;
251
707
  }, z.core.$strip>]>, "_zod"> & {
252
708
  _zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
709
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
253
710
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
254
711
  chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
255
712
  code: z.ZodMiniString<string>;
@@ -271,6 +728,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
271
728
  }, z.core.$strip>]>>;
272
729
  status: z.ZodMiniLiteral<"pending">;
273
730
  }, z.core.$strip>, z.ZodMiniObject<{
731
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
274
732
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
275
733
  accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
276
734
  authorizedAt: z.ZodMiniNumber<number>;
@@ -306,6 +764,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
306
764
  }, z.core.$strip>]>>;
307
765
  status: z.ZodMiniLiteral<"authorized">;
308
766
  }, z.core.$strip>, z.ZodMiniObject<{
767
+ action: z.ZodMiniOptional<z.ZodMiniLiteral<"authorizeAccessKey">>;
309
768
  account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
310
769
  accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
311
770
  authorizedAt: z.ZodMiniNumber<number>;
@@ -341,6 +800,89 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
341
800
  token: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>]>>;
342
801
  }, z.core.$strip>]>>;
343
802
  status: z.ZodMiniLiteral<"consumed">;
803
+ }, z.core.$strip>, z.ZodMiniObject<{
804
+ action: z.ZodMiniLiteral<"updateAccessKey">;
805
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
806
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
807
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
808
+ code: z.ZodMiniString<string>;
809
+ codeChallenge: z.ZodMiniString<string>;
810
+ createdAt: z.ZodMiniNumber<number>;
811
+ expiresAt: z.ZodMiniNumber<number>;
812
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
813
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
814
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
815
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
816
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
817
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
818
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
819
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
820
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
821
+ }, z.core.$strip>>>>;
822
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
823
+ }, z.core.$strip>>;
824
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
825
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
826
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
827
+ }, z.core.$strip>>>;
828
+ status: z.ZodMiniLiteral<"pending">;
829
+ }, z.core.$strip>, z.ZodMiniObject<{
830
+ action: z.ZodMiniLiteral<"updateAccessKey">;
831
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
832
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
833
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
834
+ authorizedAt: z.ZodMiniNumber<number>;
835
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
836
+ code: z.ZodMiniString<string>;
837
+ codeChallenge: z.ZodMiniString<string>;
838
+ createdAt: z.ZodMiniNumber<number>;
839
+ expiresAt: z.ZodMiniNumber<number>;
840
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
841
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
842
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
843
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
844
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
845
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
846
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
847
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
848
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
849
+ }, z.core.$strip>>>>;
850
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
851
+ }, z.core.$strip>>;
852
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
853
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
854
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
855
+ }, z.core.$strip>>>;
856
+ status: z.ZodMiniLiteral<"authorized">;
857
+ }, z.core.$strip>, z.ZodMiniObject<{
858
+ action: z.ZodMiniLiteral<"updateAccessKey">;
859
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
860
+ account: z.ZodMiniTemplateLiteral<`0x${string}`>;
861
+ accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
862
+ authorizedAt: z.ZodMiniNumber<number>;
863
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
864
+ code: z.ZodMiniString<string>;
865
+ codeChallenge: z.ZodMiniString<string>;
866
+ consumedAt: z.ZodMiniNumber<number>;
867
+ createdAt: z.ZodMiniNumber<number>;
868
+ expiresAt: z.ZodMiniNumber<number>;
869
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
870
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
871
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
872
+ expiry: z.ZodMiniUnion<readonly [z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>, z.ZodMiniNull, z.ZodMiniUndefined]>;
873
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
874
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
875
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
876
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
877
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
878
+ }, z.core.$strip>>>>;
879
+ signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
880
+ }, z.core.$strip>>;
881
+ limits: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
882
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
883
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
884
+ }, z.core.$strip>>>;
885
+ status: z.ZodMiniLiteral<"consumed">;
344
886
  }, z.core.$strip>]>, "output"> & {
345
887
  output: {
346
888
  chainId: bigint;
@@ -352,6 +894,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
352
894
  keyType: "secp256k1" | "p256" | "webAuthn";
353
895
  pubKey: `0x${string}`;
354
896
  status: "pending";
897
+ action?: "authorizeAccessKey" | undefined;
355
898
  account?: `0x${string}` | undefined;
356
899
  limits?: readonly {
357
900
  token: `0x${string}`;
@@ -363,6 +906,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
363
906
  on?: "register" | "login" | undefined;
364
907
  token?: string | undefined;
365
908
  } | undefined;
909
+ accessKeyAddress?: undefined;
366
910
  keyAuthorization?: undefined;
367
911
  accountAddress?: undefined;
368
912
  authorizedAt?: undefined;
@@ -391,6 +935,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
391
935
  keyType: "secp256k1" | "p256" | "webAuthn";
392
936
  pubKey: `0x${string}`;
393
937
  status: "authorized";
938
+ action?: "authorizeAccessKey" | undefined;
394
939
  account?: `0x${string}` | undefined;
395
940
  limits?: readonly {
396
941
  token: `0x${string}`;
@@ -402,6 +947,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
402
947
  on?: "register" | "login" | undefined;
403
948
  token?: string | undefined;
404
949
  } | undefined;
950
+ accessKeyAddress?: undefined;
405
951
  consumedAt?: undefined;
406
952
  } | {
407
953
  accountAddress: `0x${string}`;
@@ -428,6 +974,7 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
428
974
  keyType: "secp256k1" | "p256" | "webAuthn";
429
975
  pubKey: `0x${string}`;
430
976
  status: "consumed";
977
+ action?: "authorizeAccessKey" | undefined;
431
978
  account?: `0x${string}` | undefined;
432
979
  limits?: readonly {
433
980
  token: `0x${string}`;
@@ -439,6 +986,106 @@ export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
439
986
  on?: "register" | "login" | undefined;
440
987
  token?: string | undefined;
441
988
  } | undefined;
989
+ accessKeyAddress?: undefined;
990
+ } | {
991
+ action: "updateAccessKey";
992
+ accessKeyAddress: `0x${string}`;
993
+ account: `0x${string}`;
994
+ chainId: bigint;
995
+ code: string;
996
+ codeChallenge: string;
997
+ createdAt: number;
998
+ expiresAt: number;
999
+ limits: readonly {
1000
+ token: `0x${string}`;
1001
+ limit: bigint;
1002
+ }[];
1003
+ status: "pending";
1004
+ keyAuthorization?: {
1005
+ address: `0x${string}`;
1006
+ chainId: bigint;
1007
+ expiry: number | null | undefined;
1008
+ keyId: `0x${string}`;
1009
+ keyType: "secp256k1" | "p256" | "webAuthn";
1010
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
1011
+ limits?: readonly {
1012
+ token: `0x${string}`;
1013
+ limit: bigint;
1014
+ }[] | undefined;
1015
+ } | undefined;
1016
+ expiry?: undefined;
1017
+ keyType?: undefined;
1018
+ showDeposit?: undefined;
1019
+ pubKey?: undefined;
1020
+ accountAddress?: undefined;
1021
+ authorizedAt?: undefined;
1022
+ consumedAt?: undefined;
1023
+ } | {
1024
+ action: "updateAccessKey";
1025
+ accessKeyAddress: `0x${string}`;
1026
+ account: `0x${string}`;
1027
+ accountAddress: `0x${string}`;
1028
+ authorizedAt: number;
1029
+ chainId: bigint;
1030
+ code: string;
1031
+ codeChallenge: string;
1032
+ createdAt: number;
1033
+ expiresAt: number;
1034
+ limits: readonly {
1035
+ token: `0x${string}`;
1036
+ limit: bigint;
1037
+ }[];
1038
+ status: "authorized";
1039
+ keyAuthorization?: {
1040
+ address: `0x${string}`;
1041
+ chainId: bigint;
1042
+ expiry: number | null | undefined;
1043
+ keyId: `0x${string}`;
1044
+ keyType: "secp256k1" | "p256" | "webAuthn";
1045
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
1046
+ limits?: readonly {
1047
+ token: `0x${string}`;
1048
+ limit: bigint;
1049
+ }[] | undefined;
1050
+ } | undefined;
1051
+ expiry?: undefined;
1052
+ keyType?: undefined;
1053
+ showDeposit?: undefined;
1054
+ pubKey?: undefined;
1055
+ consumedAt?: undefined;
1056
+ } | {
1057
+ action: "updateAccessKey";
1058
+ accessKeyAddress: `0x${string}`;
1059
+ account: `0x${string}`;
1060
+ accountAddress: `0x${string}`;
1061
+ authorizedAt: number;
1062
+ chainId: bigint;
1063
+ code: string;
1064
+ codeChallenge: string;
1065
+ consumedAt: number;
1066
+ createdAt: number;
1067
+ expiresAt: number;
1068
+ limits: readonly {
1069
+ token: `0x${string}`;
1070
+ limit: bigint;
1071
+ }[];
1072
+ status: "consumed";
1073
+ keyAuthorization?: {
1074
+ address: `0x${string}`;
1075
+ chainId: bigint;
1076
+ expiry: number | null | undefined;
1077
+ keyId: `0x${string}`;
1078
+ keyType: "secp256k1" | "p256" | "webAuthn";
1079
+ signature: SignatureEnvelope.SignatureEnvelopeRpc;
1080
+ limits?: readonly {
1081
+ token: `0x${string}`;
1082
+ limit: bigint;
1083
+ }[] | undefined;
1084
+ } | undefined;
1085
+ expiry?: undefined;
1086
+ keyType?: undefined;
1087
+ showDeposit?: undefined;
1088
+ pubKey?: undefined;
442
1089
  };
443
1090
  };
444
1091
  };
@@ -453,25 +1100,29 @@ export type CliAuth = {
453
1100
  /** Authorizes a pending device code after validating the signed key authorization. */
454
1101
  authorize: (options: authorize.Parameters) => Promise<authorize.ReturnType>;
455
1102
  };
456
- /** Stored device-code entry. */
1103
+ /** Stored device code entry. */
457
1104
  export type Entry = z.output<typeof entry>;
458
- /** Device-code storage contract. */
1105
+ /** Device code storage contract. */
459
1106
  export type Store = {
460
- /** Saves a new pending device-code entry. */
1107
+ /** Saves a new pending device code entry. */
461
1108
  create: (entry: Entry.Pending) => MaybePromise<void>;
462
- /** Loads a device-code entry by verification code. */
1109
+ /** Loads a device code entry by verification code. */
463
1110
  get: (code: string) => MaybePromise<Entry | undefined>;
464
- /** Marks a pending device-code as authorized. */
1111
+ /** Marks a pending device code as authorized. */
465
1112
  authorize: (options: Store.authorize.Options) => MaybePromise<Entry.Authorized | undefined>;
466
- /** Consumes an authorized device-code exactly once. */
1113
+ /** Marks a pending access key update as complete. */
1114
+ update: (options: Store.update.Options) => MaybePromise<Entry.Authorized | undefined>;
1115
+ /** Consumes an authorized device code exactly once. */
467
1116
  consume: (code: string) => MaybePromise<Entry.Authorized | undefined>;
468
- /** Deletes a device-code entry. */
1117
+ /** Deletes a device code entry. */
469
1118
  delete: (code: string) => MaybePromise<void>;
470
1119
  };
471
1120
  /** Host validation and sanitization for requested CLI auth defaults. */
472
1121
  export type Policy = {
473
1122
  /** Validates and optionally rewrites requested defaults before the entry is stored. */
474
1123
  validate: (options: Policy.validate.Options) => MaybePromise<Policy.validate.ReturnType>;
1124
+ /** Validates and optionally rewrites requested access key limit updates. */
1125
+ update?: ((options: Policy.update.Options) => MaybePromise<Policy.update.ReturnType>) | undefined;
475
1126
  };
476
1127
  /** Request rate limiter used by CLI auth handlers. */
477
1128
  export type RateLimit = {
@@ -479,15 +1130,15 @@ export type RateLimit = {
479
1130
  limit: (options: RateLimit.limit.Options) => MaybePromise<RateLimit.limit.ReturnType>;
480
1131
  };
481
1132
  export declare namespace Entry {
482
- /** Pending device-code entry. */
1133
+ /** Pending device code entry. */
483
1134
  type Pending = Extract<z.output<typeof entry>, {
484
1135
  status: 'pending';
485
1136
  }>;
486
- /** Authorized device-code entry. */
1137
+ /** Authorized device code entry. */
487
1138
  type Authorized = Extract<z.output<typeof entry>, {
488
1139
  status: 'authorized';
489
1140
  }>;
490
- /** Consumed device-code entry. */
1141
+ /** Consumed device code entry. */
491
1142
  type Consumed = Extract<z.output<typeof entry>, {
492
1143
  status: 'consumed';
493
1144
  }>;
@@ -503,6 +1154,16 @@ export declare namespace Store {
503
1154
  code: string;
504
1155
  };
505
1156
  }
1157
+ namespace update {
1158
+ type Options = {
1159
+ /** Root account that updated the access key. */
1160
+ accountAddress: Address.Address;
1161
+ /** Replacement authorization for an access key that is still pending publication. */
1162
+ keyAuthorization?: z.output<typeof keyAuthorization> | undefined;
1163
+ /** Verification code to complete. */
1164
+ code: string;
1165
+ };
1166
+ }
506
1167
  namespace kv {
507
1168
  type Options = {
508
1169
  /** Prefix used for KV keys. @default "cli-auth" */
@@ -517,7 +1178,7 @@ export declare namespace Policy {
517
1178
  account?: Address.Address | undefined;
518
1179
  /** Requested chain ID. */
519
1180
  chainId: bigint;
520
- /** Requested access-key expiry timestamp. Omit to let the server choose one. */
1181
+ /** Requested access key expiry timestamp. Omit to let the server choose one. */
521
1182
  expiry?: number | undefined;
522
1183
  /** Requested key type. */
523
1184
  keyType: z.output<typeof keyType>;
@@ -526,11 +1187,11 @@ export declare namespace Policy {
526
1187
  token: Address.Address;
527
1188
  limit: bigint;
528
1189
  }[] | undefined;
529
- /** Requested access-key public key. */
1190
+ /** Requested access key public key. */
530
1191
  pubKey: Hex.Hex;
531
1192
  };
532
1193
  type ReturnType = {
533
- /** Suggested access-key expiry timestamp. */
1194
+ /** Suggested access key expiry timestamp. */
534
1195
  expiry: number;
535
1196
  /** Suggested spending limits. */
536
1197
  limits?: readonly {
@@ -539,6 +1200,28 @@ export declare namespace Policy {
539
1200
  }[] | undefined;
540
1201
  };
541
1202
  }
1203
+ namespace update {
1204
+ type Options = {
1205
+ /** Access key to update. */
1206
+ accessKeyAddress: Address.Address;
1207
+ /** Root account that owns the access key. */
1208
+ account: Address.Address;
1209
+ /** Requested chain ID. */
1210
+ chainId: bigint;
1211
+ /** Requested spending limits. */
1212
+ limits: readonly {
1213
+ token: Address.Address;
1214
+ limit: bigint;
1215
+ }[];
1216
+ };
1217
+ type ReturnType = {
1218
+ /** Approved spending limits. */
1219
+ limits: readonly {
1220
+ token: Address.Address;
1221
+ limit: bigint;
1222
+ }[];
1223
+ };
1224
+ }
542
1225
  }
543
1226
  export declare namespace RateLimit {
544
1227
  namespace limit {
@@ -576,22 +1259,22 @@ export declare namespace RateLimit {
576
1259
  };
577
1260
  }
578
1261
  }
579
- /** Error thrown when pending device-code lookup cannot return a pending request. */
1262
+ /** Error thrown when pending device code lookup cannot return a pending request. */
580
1263
  export declare class PendingError extends Error {
581
1264
  /** HTTP status returned by handler surfaces. */
582
1265
  status: 400 | 404;
583
1266
  constructor(message: string, status: 400 | 404);
584
1267
  }
585
- /** Built-in device-code store helpers. */
1268
+ /** Built-in device code store helpers. */
586
1269
  export declare const Store: {
587
1270
  /**
588
- * Creates an in-memory device-code store.
1271
+ * Creates an in-memory device code store.
589
1272
  *
590
1273
  * Useful for tests and single-process servers.
591
1274
  */
592
1275
  memory(): Store;
593
1276
  /**
594
- * Creates a key-value backed device-code store.
1277
+ * Creates a key-value backed device code store.
595
1278
  *
596
1279
  * Stored values are encoded through the shared entry schema so they remain
597
1280
  * JSON-safe across KV implementations.
@@ -659,7 +1342,7 @@ export declare namespace from {
659
1342
  policy?: Policy | undefined;
660
1343
  /** Random byte generator used for verification code allocation. */
661
1344
  random?: ((size: number) => Uint8Array) | undefined;
662
- /** Device-code store. */
1345
+ /** Device code store. */
663
1346
  store?: Store | undefined;
664
1347
  /** Pending entry TTL in milliseconds. @default 600000 */
665
1348
  ttlMs?: number | undefined;
@@ -694,19 +1377,21 @@ export declare function createDeviceCode(options: createDeviceCode.Options): Pro
694
1377
  export declare namespace createDeviceCode {
695
1378
  /** Parameters for creating a new device code. */
696
1379
  type Parameters = {
697
- /** Incoming device-code creation request. */
1380
+ /** Client used to verify a pending key authorization. */
1381
+ client?: Client<Transport, Chain | undefined> | undefined;
1382
+ /** Incoming device code creation request. */
698
1383
  request: z.output<typeof createRequest>;
699
1384
  };
700
- /** Shared CLI auth defaults plus create-device-code parameters. */
1385
+ /** Shared CLI auth defaults plus create device code parameters. */
701
1386
  type Options = from.Options & Parameters;
702
- /** Created device-code response body. */
1387
+ /** Created device code response body. */
703
1388
  type ReturnType = z.output<typeof createResponse>;
704
1389
  }
705
1390
  /**
706
1391
  * Looks up a pending device code for browser approval UIs.
707
1392
  *
708
1393
  * @param {pending.Options} options - Shared defaults plus the pending lookup parameters.
709
- * @returns {Promise<pending.ReturnType>} Pending device-code payload.
1394
+ * @returns {Promise<pending.ReturnType>} Pending device code payload.
710
1395
  *
711
1396
  * @example
712
1397
  * ```ts
@@ -733,7 +1418,7 @@ export declare namespace pending {
733
1418
  };
734
1419
  /** Shared CLI auth defaults plus pending lookup parameters. */
735
1420
  type Options = from.Options & Parameters;
736
- /** Pending device-code response body. */
1421
+ /** Pending device code response body. */
737
1422
  type ReturnType = z.output<typeof pendingResponse>;
738
1423
  }
739
1424
  /**