accounts 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +38 -7
- package/dist/cli/Provider.d.ts +12 -0
- package/dist/cli/Provider.d.ts.map +1 -0
- package/dist/cli/Provider.js +19 -0
- package/dist/cli/Provider.js.map +1 -0
- package/dist/cli/adapter.d.ts +24 -0
- package/dist/cli/adapter.d.ts.map +1 -0
- package/dist/cli/adapter.js +173 -0
- package/dist/cli/adapter.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/Dialog.d.ts.map +1 -1
- package/dist/core/Dialog.js +25 -1
- package/dist/core/Dialog.js.map +1 -1
- package/dist/core/IntersectionObserver.d.ts +3 -0
- package/dist/core/IntersectionObserver.d.ts.map +1 -0
- package/dist/core/IntersectionObserver.js +6 -0
- package/dist/core/IntersectionObserver.js.map +1 -0
- package/dist/core/Messenger.d.ts +14 -3
- package/dist/core/Messenger.d.ts.map +1 -1
- package/dist/core/Messenger.js +4 -4
- package/dist/core/Messenger.js.map +1 -1
- package/dist/core/Remote.d.ts +6 -3
- package/dist/core/Remote.d.ts.map +1 -1
- package/dist/core/Remote.js +3 -6
- package/dist/core/Remote.js.map +1 -1
- package/dist/core/adapters/local.d.ts.map +1 -1
- package/dist/core/adapters/local.js +2 -2
- package/dist/core/adapters/local.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/Remote.d.ts +21 -0
- package/dist/react/Remote.d.ts.map +1 -0
- package/dist/react/Remote.js +51 -0
- package/dist/react/Remote.js.map +1 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +2 -0
- package/dist/react/index.js.map +1 -0
- package/dist/server/CliAuth.d.ts +553 -0
- package/dist/server/CliAuth.d.ts.map +1 -0
- package/dist/server/CliAuth.js +446 -0
- package/dist/server/CliAuth.js.map +1 -0
- package/dist/server/Handler.d.ts +36 -2
- package/dist/server/Handler.d.ts.map +1 -1
- package/dist/server/Handler.js +84 -0
- package/dist/server/Handler.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/package.json +16 -54
- package/src/cli/Provider.test-d.ts +28 -0
- package/src/cli/Provider.test.ts +235 -0
- package/src/cli/Provider.ts +26 -0
- package/src/cli/adapter.ts +229 -0
- package/src/cli/index.ts +2 -0
- package/src/core/Dialog.ts +31 -1
- package/src/core/IntersectionObserver.ts +6 -0
- package/src/core/Messenger.ts +18 -8
- package/src/core/Provider.test.ts +12 -2
- package/src/core/Remote.ts +9 -10
- package/src/core/adapters/local.ts +7 -2
- package/src/index.ts +1 -0
- package/src/react/Remote.ts +94 -0
- package/src/react/index.ts +1 -0
- package/src/server/CliAuth.test-d.ts +56 -0
- package/src/server/CliAuth.test.ts +800 -0
- package/src/server/CliAuth.ts +634 -0
- package/src/server/Handler.ts +123 -1
- package/src/server/index.ts +1 -0
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
import { Hex } from 'ox';
|
|
2
|
+
import { SignatureEnvelope } from 'ox/tempo';
|
|
3
|
+
import { type Chain, type Client, type Transport } from 'viem';
|
|
4
|
+
import type { Address } from 'viem/accounts';
|
|
5
|
+
import * as z from 'zod/mini';
|
|
6
|
+
import type { MaybePromise } from '../internal/types.js';
|
|
7
|
+
import type { Kv } from './Kv.js';
|
|
8
|
+
/** Supported access-key types for CLI bootstrap. */
|
|
9
|
+
export declare const keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
10
|
+
/** Signed key authorization returned by the device-code flow. */
|
|
11
|
+
export declare const keyAuthorization: z.ZodMiniObject<{
|
|
12
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
13
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
14
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
15
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
16
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
17
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
18
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
19
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
20
|
+
}, z.core.$strip>>>>;
|
|
21
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
/** Request body for `POST /auth/pkce/code`. */
|
|
24
|
+
export declare const createRequest: z.ZodMiniObject<{
|
|
25
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
26
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
27
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
28
|
+
keyType: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>>;
|
|
29
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
30
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
31
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
32
|
+
}, z.core.$strip>>>>;
|
|
33
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/** Response body for `POST /cli-auth/device-code`. */
|
|
36
|
+
export declare const createResponse: z.ZodMiniObject<{
|
|
37
|
+
code: z.ZodMiniString<string>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
/** Request body for `POST /auth/pkce/poll/:code`. */
|
|
40
|
+
export declare const pollRequest: z.ZodMiniObject<{
|
|
41
|
+
codeVerifier: z.ZodMiniString<string>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
/** Response body for `POST /auth/pkce/poll/:code`. */
|
|
44
|
+
export declare const pollResponse: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
45
|
+
status: z.ZodMiniLiteral<"pending">;
|
|
46
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
47
|
+
status: z.ZodMiniLiteral<"authorized">;
|
|
48
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
49
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
50
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
51
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
52
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
53
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
54
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
55
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
56
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
57
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
58
|
+
}, z.core.$strip>>>>;
|
|
59
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
62
|
+
status: z.ZodMiniLiteral<"expired">;
|
|
63
|
+
}, z.core.$strip>]>, "_zod"> & {
|
|
64
|
+
_zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
|
|
65
|
+
status: z.ZodMiniLiteral<"pending">;
|
|
66
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
67
|
+
status: z.ZodMiniLiteral<"authorized">;
|
|
68
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
69
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
70
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
71
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
72
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
73
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
74
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
75
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
76
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
77
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
78
|
+
}, z.core.$strip>>>>;
|
|
79
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
82
|
+
status: z.ZodMiniLiteral<"expired">;
|
|
83
|
+
}, z.core.$strip>]>, "output"> & {
|
|
84
|
+
output: {
|
|
85
|
+
status: "pending";
|
|
86
|
+
keyAuthorization?: undefined;
|
|
87
|
+
accountAddress?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
status: "authorized";
|
|
90
|
+
accountAddress: `0x${string}`;
|
|
91
|
+
keyAuthorization: {
|
|
92
|
+
address: `0x${string}`;
|
|
93
|
+
chainId: bigint;
|
|
94
|
+
keyId: `0x${string}`;
|
|
95
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
96
|
+
signature: SignatureEnvelope.SignatureEnvelopeRpc;
|
|
97
|
+
expiry?: number | null | undefined;
|
|
98
|
+
limits?: readonly {
|
|
99
|
+
token: `0x${string}`;
|
|
100
|
+
limit: bigint;
|
|
101
|
+
}[] | undefined;
|
|
102
|
+
};
|
|
103
|
+
} | {
|
|
104
|
+
status: "expired";
|
|
105
|
+
keyAuthorization?: undefined;
|
|
106
|
+
accountAddress?: undefined;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** Response body for `GET /auth/pkce/pending/:code`. */
|
|
111
|
+
export declare const pendingResponse: z.ZodMiniObject<{
|
|
112
|
+
accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
113
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
114
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
115
|
+
code: z.ZodMiniString<string>;
|
|
116
|
+
expiry: z.ZodMiniNumber<number>;
|
|
117
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
118
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
119
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
120
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
121
|
+
}, z.core.$strip>>>>;
|
|
122
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
123
|
+
status: z.ZodMiniLiteral<"pending">;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
/** Request body for `POST /auth/pkce`. */
|
|
126
|
+
export declare const authorizeRequest: z.ZodMiniObject<{
|
|
127
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
128
|
+
code: z.ZodMiniString<string>;
|
|
129
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
130
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
131
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
132
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
133
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
134
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
135
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
136
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
137
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
138
|
+
}, z.core.$strip>>>>;
|
|
139
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
/** Response body for `POST /cli-auth/authorize`. */
|
|
143
|
+
export declare const authorizeResponse: z.ZodMiniObject<{
|
|
144
|
+
status: z.ZodMiniLiteral<"authorized">;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
/** Stored device-code entry schema. */
|
|
147
|
+
export declare const entry: Omit<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
148
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
149
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
150
|
+
code: z.ZodMiniString<string>;
|
|
151
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
152
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
153
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
154
|
+
expiry: z.ZodMiniNumber<number>;
|
|
155
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
156
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
157
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
158
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
159
|
+
}, z.core.$strip>>>>;
|
|
160
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
161
|
+
status: z.ZodMiniLiteral<"pending">;
|
|
162
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
163
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
164
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
165
|
+
authorizedAt: z.ZodMiniNumber<number>;
|
|
166
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
167
|
+
code: z.ZodMiniString<string>;
|
|
168
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
169
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
170
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
171
|
+
expiry: z.ZodMiniNumber<number>;
|
|
172
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
173
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
174
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
175
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
176
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
177
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
178
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
179
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
180
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
181
|
+
}, z.core.$strip>>>>;
|
|
182
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
185
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
186
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
187
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
188
|
+
}, z.core.$strip>>>>;
|
|
189
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
190
|
+
status: z.ZodMiniLiteral<"authorized">;
|
|
191
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
192
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
193
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
194
|
+
authorizedAt: z.ZodMiniNumber<number>;
|
|
195
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
196
|
+
code: z.ZodMiniString<string>;
|
|
197
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
198
|
+
consumedAt: z.ZodMiniNumber<number>;
|
|
199
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
200
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
201
|
+
expiry: z.ZodMiniNumber<number>;
|
|
202
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
203
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
204
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
205
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
206
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
207
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
208
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
209
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
210
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
211
|
+
}, z.core.$strip>>>>;
|
|
212
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
215
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
216
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
217
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
218
|
+
}, z.core.$strip>>>>;
|
|
219
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
220
|
+
status: z.ZodMiniLiteral<"consumed">;
|
|
221
|
+
}, z.core.$strip>]>, "_zod"> & {
|
|
222
|
+
_zod: Omit<z.core.$ZodUnionInternals<readonly [z.ZodMiniObject<{
|
|
223
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
224
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
225
|
+
code: z.ZodMiniString<string>;
|
|
226
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
227
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
228
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
229
|
+
expiry: z.ZodMiniNumber<number>;
|
|
230
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
231
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
232
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
233
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
234
|
+
}, z.core.$strip>>>>;
|
|
235
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
236
|
+
status: z.ZodMiniLiteral<"pending">;
|
|
237
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
238
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
239
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
240
|
+
authorizedAt: z.ZodMiniNumber<number>;
|
|
241
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
242
|
+
code: z.ZodMiniString<string>;
|
|
243
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
244
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
245
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
246
|
+
expiry: z.ZodMiniNumber<number>;
|
|
247
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
248
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
249
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
250
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
251
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
252
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
253
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
254
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
255
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
256
|
+
}, z.core.$strip>>>>;
|
|
257
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
260
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
261
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
262
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
263
|
+
}, z.core.$strip>>>>;
|
|
264
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
265
|
+
status: z.ZodMiniLiteral<"authorized">;
|
|
266
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
267
|
+
account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
268
|
+
accountAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
269
|
+
authorizedAt: z.ZodMiniNumber<number>;
|
|
270
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
271
|
+
code: z.ZodMiniString<string>;
|
|
272
|
+
codeChallenge: z.ZodMiniString<string>;
|
|
273
|
+
consumedAt: z.ZodMiniNumber<number>;
|
|
274
|
+
createdAt: z.ZodMiniNumber<number>;
|
|
275
|
+
expiresAt: z.ZodMiniNumber<number>;
|
|
276
|
+
expiry: z.ZodMiniNumber<number>;
|
|
277
|
+
keyAuthorization: z.ZodMiniObject<{
|
|
278
|
+
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
279
|
+
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
280
|
+
expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
|
|
281
|
+
keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
282
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
283
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
284
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
285
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
286
|
+
}, z.core.$strip>>>>;
|
|
287
|
+
signature: z.ZodMiniCustom<SignatureEnvelope.SignatureEnvelopeRpc, SignatureEnvelope.SignatureEnvelopeRpc>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
|
|
290
|
+
limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
291
|
+
token: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
292
|
+
limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
293
|
+
}, z.core.$strip>>>>;
|
|
294
|
+
pubKey: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
295
|
+
status: z.ZodMiniLiteral<"consumed">;
|
|
296
|
+
}, z.core.$strip>]>, "output"> & {
|
|
297
|
+
output: {
|
|
298
|
+
chainId: bigint;
|
|
299
|
+
code: string;
|
|
300
|
+
codeChallenge: string;
|
|
301
|
+
createdAt: number;
|
|
302
|
+
expiresAt: number;
|
|
303
|
+
expiry: number;
|
|
304
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
305
|
+
pubKey: `0x${string}`;
|
|
306
|
+
status: "pending";
|
|
307
|
+
account?: `0x${string}` | undefined;
|
|
308
|
+
limits?: readonly {
|
|
309
|
+
token: `0x${string}`;
|
|
310
|
+
limit: bigint;
|
|
311
|
+
}[] | undefined;
|
|
312
|
+
keyAuthorization?: undefined;
|
|
313
|
+
accountAddress?: undefined;
|
|
314
|
+
authorizedAt?: undefined;
|
|
315
|
+
consumedAt?: undefined;
|
|
316
|
+
} | {
|
|
317
|
+
accountAddress: `0x${string}`;
|
|
318
|
+
authorizedAt: number;
|
|
319
|
+
chainId: bigint;
|
|
320
|
+
code: string;
|
|
321
|
+
codeChallenge: string;
|
|
322
|
+
createdAt: number;
|
|
323
|
+
expiresAt: number;
|
|
324
|
+
expiry: number;
|
|
325
|
+
keyAuthorization: {
|
|
326
|
+
address: `0x${string}`;
|
|
327
|
+
chainId: bigint;
|
|
328
|
+
keyId: `0x${string}`;
|
|
329
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
330
|
+
signature: SignatureEnvelope.SignatureEnvelopeRpc;
|
|
331
|
+
expiry?: number | null | undefined;
|
|
332
|
+
limits?: readonly {
|
|
333
|
+
token: `0x${string}`;
|
|
334
|
+
limit: bigint;
|
|
335
|
+
}[] | undefined;
|
|
336
|
+
};
|
|
337
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
338
|
+
pubKey: `0x${string}`;
|
|
339
|
+
status: "authorized";
|
|
340
|
+
account?: `0x${string}` | undefined;
|
|
341
|
+
limits?: readonly {
|
|
342
|
+
token: `0x${string}`;
|
|
343
|
+
limit: bigint;
|
|
344
|
+
}[] | undefined;
|
|
345
|
+
consumedAt?: undefined;
|
|
346
|
+
} | {
|
|
347
|
+
accountAddress: `0x${string}`;
|
|
348
|
+
authorizedAt: number;
|
|
349
|
+
chainId: bigint;
|
|
350
|
+
code: string;
|
|
351
|
+
codeChallenge: string;
|
|
352
|
+
consumedAt: number;
|
|
353
|
+
createdAt: number;
|
|
354
|
+
expiresAt: number;
|
|
355
|
+
expiry: number;
|
|
356
|
+
keyAuthorization: {
|
|
357
|
+
address: `0x${string}`;
|
|
358
|
+
chainId: bigint;
|
|
359
|
+
keyId: `0x${string}`;
|
|
360
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
361
|
+
signature: SignatureEnvelope.SignatureEnvelopeRpc;
|
|
362
|
+
expiry?: number | null | undefined;
|
|
363
|
+
limits?: readonly {
|
|
364
|
+
token: `0x${string}`;
|
|
365
|
+
limit: bigint;
|
|
366
|
+
}[] | undefined;
|
|
367
|
+
};
|
|
368
|
+
keyType: "secp256k1" | "p256" | "webAuthn";
|
|
369
|
+
pubKey: `0x${string}`;
|
|
370
|
+
status: "consumed";
|
|
371
|
+
account?: `0x${string}` | undefined;
|
|
372
|
+
limits?: readonly {
|
|
373
|
+
token: `0x${string}`;
|
|
374
|
+
limit: bigint;
|
|
375
|
+
}[] | undefined;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
/** Stored device-code entry. */
|
|
380
|
+
export type Entry = z.output<typeof entry>;
|
|
381
|
+
/** Device-code storage contract. */
|
|
382
|
+
export type Store = {
|
|
383
|
+
/** Saves a new pending device-code entry. */
|
|
384
|
+
create: (entry: Entry.Pending) => MaybePromise<void>;
|
|
385
|
+
/** Loads a device-code entry by verification code. */
|
|
386
|
+
get: (code: string) => MaybePromise<Entry | undefined>;
|
|
387
|
+
/** Marks a pending device-code as authorized. */
|
|
388
|
+
authorize: (options: Store.authorize.Options) => MaybePromise<Entry.Authorized | undefined>;
|
|
389
|
+
/** Consumes an authorized device-code exactly once. */
|
|
390
|
+
consume: (code: string) => MaybePromise<Entry.Authorized | undefined>;
|
|
391
|
+
/** Deletes a device-code entry. */
|
|
392
|
+
delete: (code: string) => MaybePromise<void>;
|
|
393
|
+
};
|
|
394
|
+
export declare namespace Entry {
|
|
395
|
+
/** Pending device-code entry. */
|
|
396
|
+
type Pending = Extract<z.output<typeof entry>, {
|
|
397
|
+
status: 'pending';
|
|
398
|
+
}>;
|
|
399
|
+
/** Authorized device-code entry. */
|
|
400
|
+
type Authorized = Extract<z.output<typeof entry>, {
|
|
401
|
+
status: 'authorized';
|
|
402
|
+
}>;
|
|
403
|
+
/** Consumed device-code entry. */
|
|
404
|
+
type Consumed = Extract<z.output<typeof entry>, {
|
|
405
|
+
status: 'consumed';
|
|
406
|
+
}>;
|
|
407
|
+
}
|
|
408
|
+
export declare namespace Store {
|
|
409
|
+
namespace authorize {
|
|
410
|
+
type Options = {
|
|
411
|
+
/** Root account that approved the access key. */
|
|
412
|
+
accountAddress: Address;
|
|
413
|
+
/** Signed key authorization. */
|
|
414
|
+
keyAuthorization: z.output<typeof keyAuthorization>;
|
|
415
|
+
/** Verification code to authorize. */
|
|
416
|
+
code: string;
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
namespace kv {
|
|
420
|
+
type Options = {
|
|
421
|
+
/** Prefix used for KV keys. @default "cli-auth" */
|
|
422
|
+
key?: string | undefined;
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/** Error thrown when pending device-code lookup cannot return a pending request. */
|
|
427
|
+
export declare class PendingError extends Error {
|
|
428
|
+
status: 400 | 404;
|
|
429
|
+
constructor(message: string, status: 400 | 404);
|
|
430
|
+
}
|
|
431
|
+
/** Host validation and sanitization for requested CLI auth defaults. */
|
|
432
|
+
export type Policy = {
|
|
433
|
+
/** Validates and optionally rewrites requested policy before the entry is stored. */
|
|
434
|
+
validate: (options: Policy.validate.Options) => MaybePromise<Policy.validate.ReturnType>;
|
|
435
|
+
};
|
|
436
|
+
export declare namespace Policy {
|
|
437
|
+
namespace validate {
|
|
438
|
+
type Options = {
|
|
439
|
+
/** Requested root account restriction. */
|
|
440
|
+
account?: Address | undefined;
|
|
441
|
+
/** Requested access-key expiry timestamp. Omit to let the server choose one. */
|
|
442
|
+
expiry?: number | undefined;
|
|
443
|
+
/** Requested key type. */
|
|
444
|
+
keyType: z.output<typeof keyType>;
|
|
445
|
+
/** Requested spending limits. */
|
|
446
|
+
limits?: readonly {
|
|
447
|
+
token: Address;
|
|
448
|
+
limit: bigint;
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
/** Requested access-key public key. */
|
|
451
|
+
pubKey: Hex.Hex;
|
|
452
|
+
};
|
|
453
|
+
type ReturnType = {
|
|
454
|
+
/** Approved access-key expiry timestamp. */
|
|
455
|
+
expiry: number;
|
|
456
|
+
/** Approved spending limits. */
|
|
457
|
+
limits?: readonly {
|
|
458
|
+
token: Address;
|
|
459
|
+
limit: bigint;
|
|
460
|
+
}[] | undefined;
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/** Built-in device-code store helpers. */
|
|
465
|
+
export declare const Store: {
|
|
466
|
+
/**
|
|
467
|
+
* Creates an in-memory device-code store.
|
|
468
|
+
*
|
|
469
|
+
* Useful for tests and single-process servers.
|
|
470
|
+
*/
|
|
471
|
+
memory(): Store;
|
|
472
|
+
/**
|
|
473
|
+
* Creates a key-value backed device-code store.
|
|
474
|
+
*
|
|
475
|
+
* Stored values are encoded through the shared entry schema so they remain
|
|
476
|
+
* JSON-safe across KV implementations.
|
|
477
|
+
*/
|
|
478
|
+
kv(kv: Kv, options?: Store.kv.Options): Store;
|
|
479
|
+
};
|
|
480
|
+
/** Built-in policy helpers. */
|
|
481
|
+
export declare const Policy: {
|
|
482
|
+
/** Creates an allow-all policy with a default 24-hour expiry when omitted. */
|
|
483
|
+
allow(): Policy;
|
|
484
|
+
/** Returns the provided policy unchanged. */
|
|
485
|
+
from(policy: Policy): Policy;
|
|
486
|
+
};
|
|
487
|
+
/** Creates and stores a new device code. */
|
|
488
|
+
export declare function createDeviceCode(options: createDeviceCode.Options): Promise<createDeviceCode.ReturnType>;
|
|
489
|
+
export declare namespace createDeviceCode {
|
|
490
|
+
type Options = {
|
|
491
|
+
/** Chain ID embedded into the expected key authorization. @default tempo.id */
|
|
492
|
+
chainId?: bigint | number | undefined;
|
|
493
|
+
/** Time source used for TTL evaluation. */
|
|
494
|
+
now?: (() => number) | undefined;
|
|
495
|
+
/** Policy used to validate requested expiry and limits. */
|
|
496
|
+
policy?: Policy | undefined;
|
|
497
|
+
/** Random byte generator used for verification code allocation. */
|
|
498
|
+
random?: ((size: number) => Uint8Array) | undefined;
|
|
499
|
+
/** Incoming device-code creation request. */
|
|
500
|
+
request: z.output<typeof createRequest>;
|
|
501
|
+
/** Device-code store. */
|
|
502
|
+
store?: Store | undefined;
|
|
503
|
+
/** Pending entry TTL in milliseconds. @default 600000 */
|
|
504
|
+
ttlMs?: number | undefined;
|
|
505
|
+
};
|
|
506
|
+
type ReturnType = z.output<typeof createResponse>;
|
|
507
|
+
}
|
|
508
|
+
/** Looks up a pending device code for browser approval UIs. */
|
|
509
|
+
export declare function pending(options: pending.Options): Promise<pending.ReturnType>;
|
|
510
|
+
export declare namespace pending {
|
|
511
|
+
type Options = {
|
|
512
|
+
/** Verification code from the route path. */
|
|
513
|
+
code: string;
|
|
514
|
+
/** Time source used for TTL evaluation. */
|
|
515
|
+
now?: (() => number) | undefined;
|
|
516
|
+
/** Device-code store. */
|
|
517
|
+
store?: Store | undefined;
|
|
518
|
+
};
|
|
519
|
+
type ReturnType = z.output<typeof pendingResponse>;
|
|
520
|
+
}
|
|
521
|
+
/** Polls a device code with PKCE verification. */
|
|
522
|
+
export declare function poll(options: poll.Options): Promise<poll.ReturnType>;
|
|
523
|
+
export declare namespace poll {
|
|
524
|
+
type Options = {
|
|
525
|
+
/** Verification code from the route path. */
|
|
526
|
+
code: string;
|
|
527
|
+
/** Time source used for TTL evaluation. */
|
|
528
|
+
now?: (() => number) | undefined;
|
|
529
|
+
/** Poll request body. */
|
|
530
|
+
request: z.output<typeof pollRequest>;
|
|
531
|
+
/** Device-code store. */
|
|
532
|
+
store?: Store | undefined;
|
|
533
|
+
};
|
|
534
|
+
type ReturnType = z.output<typeof pollResponse>;
|
|
535
|
+
}
|
|
536
|
+
/** Authorizes a pending device code after validating the signed key authorization. */
|
|
537
|
+
export declare function authorize(options: authorize.Options): Promise<authorize.ReturnType>;
|
|
538
|
+
export declare namespace authorize {
|
|
539
|
+
type Options = {
|
|
540
|
+
/** Chain ID embedded into the expected key authorization. Defaults to the client chain or tempo.id. */
|
|
541
|
+
chainId?: bigint | number | undefined;
|
|
542
|
+
/** Client used to verify the signed key authorization. */
|
|
543
|
+
client?: Client<Transport, Chain | undefined> | undefined;
|
|
544
|
+
/** Time source used for TTL evaluation. */
|
|
545
|
+
now?: (() => number) | undefined;
|
|
546
|
+
/** Authorize request body. */
|
|
547
|
+
request: z.output<typeof authorizeRequest>;
|
|
548
|
+
/** Device-code store. */
|
|
549
|
+
store?: Store | undefined;
|
|
550
|
+
};
|
|
551
|
+
type ReturnType = z.output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