accounts 0.3.0 → 0.4.1

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.
Files changed (168) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +97 -0
  4. package/dist/core/AccessKey.d.ts +55 -0
  5. package/dist/core/AccessKey.d.ts.map +1 -0
  6. package/dist/core/AccessKey.js +69 -0
  7. package/dist/core/AccessKey.js.map +1 -0
  8. package/dist/core/Account.d.ts +91 -0
  9. package/dist/core/Account.d.ts.map +1 -0
  10. package/dist/core/Account.js +64 -0
  11. package/dist/core/Account.js.map +1 -0
  12. package/dist/core/Adapter.d.ts +187 -0
  13. package/dist/core/Adapter.d.ts.map +1 -0
  14. package/dist/core/Adapter.js +7 -0
  15. package/dist/core/Adapter.js.map +1 -0
  16. package/dist/core/Ceremony.d.ts +109 -0
  17. package/dist/core/Ceremony.d.ts.map +1 -0
  18. package/dist/core/Ceremony.js +104 -0
  19. package/dist/core/Ceremony.js.map +1 -0
  20. package/dist/core/Client.d.ts +16 -0
  21. package/dist/core/Client.d.ts.map +1 -0
  22. package/dist/core/Client.js +18 -0
  23. package/dist/core/Client.js.map +1 -0
  24. package/dist/core/Dialog.d.ts +52 -0
  25. package/dist/core/Dialog.d.ts.map +1 -0
  26. package/dist/core/Dialog.js +342 -0
  27. package/dist/core/Dialog.js.map +1 -0
  28. package/dist/core/Expiry.d.ts +15 -0
  29. package/dist/core/Expiry.d.ts.map +1 -0
  30. package/dist/core/Expiry.js +29 -0
  31. package/dist/core/Expiry.js.map +1 -0
  32. package/dist/core/Messenger.d.ts +86 -0
  33. package/dist/core/Messenger.d.ts.map +1 -0
  34. package/dist/core/Messenger.js +127 -0
  35. package/dist/core/Messenger.js.map +1 -0
  36. package/dist/core/Provider.d.ts +69 -0
  37. package/dist/core/Provider.d.ts.map +1 -0
  38. package/dist/core/Provider.js +401 -0
  39. package/dist/core/Provider.js.map +1 -0
  40. package/dist/core/Remote.d.ts +114 -0
  41. package/dist/core/Remote.d.ts.map +1 -0
  42. package/dist/core/Remote.js +116 -0
  43. package/dist/core/Remote.js.map +1 -0
  44. package/dist/core/Schema.d.ts +805 -0
  45. package/dist/core/Schema.d.ts.map +1 -0
  46. package/dist/core/Schema.js +43 -0
  47. package/dist/core/Schema.js.map +1 -0
  48. package/dist/core/Storage.d.ts +42 -0
  49. package/dist/core/Storage.d.ts.map +1 -0
  50. package/dist/core/Storage.js +173 -0
  51. package/dist/core/Storage.js.map +1 -0
  52. package/dist/core/Store.d.ts +58 -0
  53. package/dist/core/Store.d.ts.map +1 -0
  54. package/dist/core/Store.js +58 -0
  55. package/dist/core/Store.js.map +1 -0
  56. package/dist/core/adapters/dangerous_secp256k1.d.ts +30 -0
  57. package/dist/core/adapters/dangerous_secp256k1.d.ts.map +1 -0
  58. package/dist/core/adapters/dangerous_secp256k1.js +39 -0
  59. package/dist/core/adapters/dangerous_secp256k1.js.map +1 -0
  60. package/dist/core/adapters/dialog.d.ts +31 -0
  61. package/dist/core/adapters/dialog.d.ts.map +1 -0
  62. package/dist/core/adapters/dialog.js +306 -0
  63. package/dist/core/adapters/dialog.js.map +1 -0
  64. package/dist/core/adapters/local.d.ts +33 -0
  65. package/dist/core/adapters/local.d.ts.map +1 -0
  66. package/dist/core/adapters/local.js +227 -0
  67. package/dist/core/adapters/local.js.map +1 -0
  68. package/dist/core/adapters/webAuthn.d.ts +36 -0
  69. package/dist/core/adapters/webAuthn.d.ts.map +1 -0
  70. package/dist/core/adapters/webAuthn.js +93 -0
  71. package/dist/core/adapters/webAuthn.js.map +1 -0
  72. package/dist/core/internal/withDedupe.d.ts +12 -0
  73. package/dist/core/internal/withDedupe.d.ts.map +1 -0
  74. package/dist/core/internal/withDedupe.js +12 -0
  75. package/dist/core/internal/withDedupe.js.map +1 -0
  76. package/dist/core/zod/request.d.ts +31 -0
  77. package/dist/core/zod/request.d.ts.map +1 -0
  78. package/dist/core/zod/request.js +41 -0
  79. package/dist/core/zod/request.js.map +1 -0
  80. package/dist/core/zod/rpc.d.ts +603 -0
  81. package/dist/core/zod/rpc.d.ts.map +1 -0
  82. package/dist/core/zod/rpc.js +293 -0
  83. package/dist/core/zod/rpc.js.map +1 -0
  84. package/dist/core/zod/utils.d.ts +18 -0
  85. package/dist/core/zod/utils.d.ts.map +1 -0
  86. package/dist/core/zod/utils.js +21 -0
  87. package/dist/core/zod/utils.js.map +1 -0
  88. package/dist/index.d.ts +15 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +15 -0
  91. package/dist/index.js.map +1 -0
  92. package/dist/internal/types.d.ts +284 -0
  93. package/dist/internal/types.d.ts.map +1 -0
  94. package/dist/internal/types.js +2 -0
  95. package/dist/internal/types.js.map +1 -0
  96. package/dist/server/Handler.d.ts +257 -0
  97. package/dist/server/Handler.d.ts.map +1 -0
  98. package/dist/server/Handler.js +433 -0
  99. package/dist/server/Handler.js.map +1 -0
  100. package/dist/server/Kv.d.ts +16 -0
  101. package/dist/server/Kv.d.ts.map +1 -0
  102. package/dist/server/Kv.js +30 -0
  103. package/dist/server/Kv.js.map +1 -0
  104. package/dist/server/index.d.ts +3 -0
  105. package/dist/server/index.d.ts.map +1 -0
  106. package/dist/server/index.js +3 -0
  107. package/dist/server/index.js.map +1 -0
  108. package/dist/server/internal/requestListener.d.ts +124 -0
  109. package/dist/server/internal/requestListener.d.ts.map +1 -0
  110. package/dist/server/internal/requestListener.js +173 -0
  111. package/dist/server/internal/requestListener.js.map +1 -0
  112. package/dist/wagmi/Connector.d.ts +93 -0
  113. package/dist/wagmi/Connector.d.ts.map +1 -0
  114. package/dist/wagmi/Connector.js +238 -0
  115. package/dist/wagmi/Connector.js.map +1 -0
  116. package/dist/wagmi/index.d.ts +3 -0
  117. package/dist/wagmi/index.d.ts.map +1 -0
  118. package/dist/wagmi/index.js +3 -0
  119. package/dist/wagmi/index.js.map +1 -0
  120. package/package.json +56 -2
  121. package/src/core/AccessKey.test.ts +257 -0
  122. package/src/core/AccessKey.ts +123 -0
  123. package/src/core/Account.test.ts +309 -0
  124. package/src/core/Account.ts +152 -0
  125. package/src/core/Adapter.ts +238 -0
  126. package/src/core/Ceremony.browser.test.ts +239 -0
  127. package/src/core/Ceremony.test.ts +151 -0
  128. package/src/core/Ceremony.ts +203 -0
  129. package/src/core/Client.ts +36 -0
  130. package/src/core/Dialog.browser.test.ts +309 -0
  131. package/src/core/Dialog.test-d.ts +19 -0
  132. package/src/core/Dialog.ts +442 -0
  133. package/src/core/Expiry.ts +34 -0
  134. package/src/core/Messenger.ts +206 -0
  135. package/src/core/Provider.browser.test.ts +774 -0
  136. package/src/core/Provider.connect.browser.test.ts +415 -0
  137. package/src/core/Provider.test-d.ts +53 -0
  138. package/src/core/Provider.test.ts +1566 -0
  139. package/src/core/Provider.ts +559 -0
  140. package/src/core/Remote.ts +262 -0
  141. package/src/core/Schema.test-d.ts +211 -0
  142. package/src/core/Schema.ts +143 -0
  143. package/src/core/Storage.ts +213 -0
  144. package/src/core/Store.test.ts +287 -0
  145. package/src/core/Store.ts +129 -0
  146. package/src/core/adapters/dangerous_secp256k1.ts +53 -0
  147. package/src/core/adapters/dialog.ts +379 -0
  148. package/src/core/adapters/local.test.ts +97 -0
  149. package/src/core/adapters/local.ts +277 -0
  150. package/src/core/adapters/webAuthn.ts +129 -0
  151. package/src/core/internal/withDedupe.test.ts +116 -0
  152. package/src/core/internal/withDedupe.ts +20 -0
  153. package/src/core/mppx.test.ts +83 -0
  154. package/src/core/zod/request.test.ts +121 -0
  155. package/src/core/zod/request.ts +70 -0
  156. package/src/core/zod/rpc.ts +374 -0
  157. package/src/core/zod/utils.test.ts +69 -0
  158. package/src/core/zod/utils.ts +40 -0
  159. package/src/index.ts +14 -0
  160. package/src/internal/types.ts +378 -0
  161. package/src/server/Handler.test.ts +1014 -0
  162. package/src/server/Handler.ts +605 -0
  163. package/src/server/Kv.ts +46 -0
  164. package/src/server/index.ts +2 -0
  165. package/src/server/internal/requestListener.ts +273 -0
  166. package/src/tsconfig.json +9 -0
  167. package/src/wagmi/Connector.ts +287 -0
  168. package/src/wagmi/index.ts +2 -0
@@ -0,0 +1,284 @@
1
+ /** Combines members of an intersection into a readable type. */
2
+ export type Compute<type> = {
3
+ [key in keyof type]: type[key];
4
+ } & unknown;
5
+ declare const symbol: unique symbol;
6
+ /**
7
+ * Creates a branded type of `T` with the brand `U`.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * type Result = Branded<string, 'foo'>
12
+ * // ^? type Result = string & { [symbol]: 'foo' }
13
+ * ```
14
+ */
15
+ export type Branded<T, U> = T & {
16
+ [symbol]: U;
17
+ };
18
+ /**
19
+ * Filters out all members of `T` that are not `P`
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * type Result = Filter<['a', 'b', 'c'], 'b'>
24
+ * // ^? type Result = ['a', 'c']
25
+ * ```
26
+ *
27
+ * @internal
28
+ */
29
+ export type Filter<T extends readonly unknown[], P, Acc extends readonly unknown[] = []> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]] ? [F] extends [P] ? Filter<Rest, P, [...Acc, F]> : Filter<Rest, P, Acc> : readonly [...Acc];
30
+ /**
31
+ * Checks if `T` can be narrowed further than `U`
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * type Result = IsNarrowable<'foo', string>
36
+ * // ^? true
37
+ * ```
38
+ */
39
+ export type IsNarrowable<T, U> = IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true;
40
+ /**
41
+ * Checks if `T` is `never`
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * type Result = IsNever<never>
46
+ * // ^? type Result = true
47
+ * ```
48
+ */
49
+ export type IsNever<T> = [T] extends [never] ? true : false;
50
+ /**
51
+ * Removes `readonly` from all properties of an object.
52
+ *
53
+ * @internal
54
+ */
55
+ export type Mutable<type extends object> = {
56
+ -readonly [key in keyof type]: type[key];
57
+ };
58
+ /**
59
+ * Evaluates boolean "or" condition for `T` properties.
60
+ *
61
+ * * @example
62
+ * ```ts
63
+ * type Result = Or<[false, true, false]>
64
+ * // ^? type Result = true
65
+ * ```
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * type Result = Or<[false, false, false]>
70
+ * // ^? type Result = false
71
+ * ```
72
+ *
73
+ * @internal
74
+ */
75
+ export type Or<T extends readonly unknown[]> = T extends readonly [infer Head, ...infer Tail] ? Head extends true ? true : Or<Tail> : false;
76
+ /**
77
+ * Checks if `T` is `undefined`
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * type Result = IsUndefined<undefined>
82
+ * // ^? type Result = true
83
+ * ```
84
+ *
85
+ * @internal
86
+ */
87
+ export type IsUndefined<T> = [undefined] extends [T] ? true : false;
88
+ /**
89
+ * Checks if type `T` is the `unknown` type.
90
+ *
91
+ * @internal
92
+ */
93
+ export type IsUnknown<T> = unknown extends T ? ([T] extends [null] ? false : true) : false;
94
+ /** @internal */
95
+ export type MaybePromise<T> = T | Promise<T>;
96
+ /**
97
+ * Makes attributes on the type T required if required is true.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * MaybeRequired<{ a: string, b?: number }, true>
102
+ * // { a: string, b: number }
103
+ *
104
+ * MaybeRequired<{ a: string, b?: number }, false>
105
+ * // { a: string, b?: number }
106
+ * ```
107
+ *
108
+ * @internal
109
+ */
110
+ export type MaybeRequired<T, required extends boolean> = required extends true ? ExactRequired<T> : T;
111
+ /**
112
+ * Assigns the properties of U onto T.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
117
+ * // { a: undefined, b: number, c: boolean }
118
+ * ```
119
+ *
120
+ * @internal
121
+ */
122
+ export type Assign<T, U> = Assign_inner<T, U> & U;
123
+ /** @internal */
124
+ export type Assign_inner<T, U> = {
125
+ [K in keyof T as K extends keyof U ? (U[K] extends void ? never : K) : K]: K extends keyof U ? U[K] : T[K];
126
+ };
127
+ /**
128
+ * Constructs a type by excluding `undefined` from `T`.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * NoUndefined<string | undefined>
133
+ * // string
134
+ * ```
135
+ *
136
+ * @internal
137
+ */
138
+ export type NoUndefined<T> = T extends undefined ? never : T;
139
+ /**
140
+ * Strict version of built-in Omit type
141
+ *
142
+ * @internal
143
+ */
144
+ export type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
145
+ /**
146
+ * Creates a type that is a partial of T, but with the required keys K.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * PartialBy<{ a: string, b: number }, 'a'>
151
+ * // { a?: string, b: number }
152
+ * ```
153
+ *
154
+ * @internal
155
+ */
156
+ export type PartialBy<T, K extends keyof T> = Omit<T, K> & ExactPartial<Pick<T, K>>;
157
+ export type RecursiveArray<T> = T | readonly RecursiveArray<T>[];
158
+ /**
159
+ * Creates a type that is T with the required keys K.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * RequiredBy<{ a?: string, b: number }, 'a'>
164
+ * // { a: string, b: number }
165
+ * ```
166
+ *
167
+ * @internal
168
+ */
169
+ export type RequiredBy<T, K extends keyof T> = Omit<T, K> & ExactRequired<Pick<T, K>>;
170
+ /**
171
+ * Returns truthy if `array` contains `value`.
172
+ *
173
+ * @example
174
+ * ```ts
175
+ * Some<[1, 2, 3], 2>
176
+ * // true
177
+ * ```
178
+ *
179
+ * @internal
180
+ */
181
+ export type Some<array extends readonly unknown[], value> = array extends readonly [
182
+ value,
183
+ ...unknown[]
184
+ ] ? true : array extends readonly [unknown, ...infer rest] ? Some<rest, value> : false;
185
+ /**
186
+ * Prints custom error message
187
+ *
188
+ * @param messages - Error message
189
+ * @returns Custom error message
190
+ *
191
+ * @example
192
+ * ```ts
193
+ * type Result = TypeErrorMessage<'Custom error message'>
194
+ * // ^? type Result = ['Error: Custom error message']
195
+ * ```
196
+ */
197
+ export type TypeErrorMessage<messages extends string | string[]> = messages extends string ? [
198
+ `Error: ${messages}`
199
+ ] : {
200
+ [key in keyof messages]: messages[key] extends infer message extends string ? `Error: ${message}` : never;
201
+ };
202
+ /** @internal */
203
+ export type UnionToTuple<union, last = LastInUnion<union>> = [union] extends [never] ? [] : [...UnionToTuple<Exclude<union, last>>, last];
204
+ /** @internal */
205
+ export type LastInUnion<U> = UnionToIntersection<U extends unknown ? (x: U) => 0 : never> extends (x: infer l) => 0 ? l : never;
206
+ /** @internal */
207
+ export type UnionToIntersection<union> = (union extends unknown ? (arg: union) => 0 : never) extends (arg: infer i) => 0 ? i : never;
208
+ /** @internal */
209
+ export type IsUnion<union, union2 = union> = union extends union2 ? ([union2] extends [union] ? false : true) : never;
210
+ /** @internal */
211
+ export type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Compute<ExactPartial<type>> : type;
212
+ export type ExactPartial<type> = {
213
+ [key in keyof type]?: type[key] | undefined;
214
+ };
215
+ /** @internal */
216
+ export type ExactRequired<type> = {
217
+ [key in keyof type]-?: Exclude<type[key], undefined>;
218
+ };
219
+ export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Compute<item & {
220
+ [key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined;
221
+ }> : never;
222
+ /** @internal */
223
+ export type KeyofUnion<type> = type extends type ? keyof type : never;
224
+ /** @internal */
225
+ export type Undefined<type> = {
226
+ [key in keyof type]?: undefined;
227
+ };
228
+ /**
229
+ * Loose version of {@link Omit}
230
+ * @internal
231
+ */
232
+ export type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;
233
+ /** @internal */
234
+ export type UnionCompute<type> = type extends object ? Compute<type> : type;
235
+ /** @internal */
236
+ export type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never;
237
+ /**
238
+ * Construct a type with the properties of union type T except for those in type K.
239
+ * @example
240
+ * ```ts
241
+ * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
242
+ * // { b: number } | { b: undefined, c: number }
243
+ * ```
244
+ *
245
+ * @internal
246
+ */
247
+ export type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never;
248
+ /**
249
+ * Construct a type with the properties of union type T except for those in type K.
250
+ * @example
251
+ * ```ts
252
+ * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
253
+ * // { b: number } | { b: undefined, c: number }
254
+ * ```
255
+ *
256
+ * @internal
257
+ */
258
+ export type UnionPick<type, keys extends keyof type> = type extends any ? Pick<type, keys> : never;
259
+ /**
260
+ * Creates a type that is a partial of T, but with the required keys K.
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
265
+ * // { a?: string, b: number } | { a?: string, b: undefined, c: number }
266
+ * ```
267
+ *
268
+ * @internal
269
+ */
270
+ export type UnionPartialBy<T, K extends keyof T> = T extends any ? PartialBy<T, K> : never;
271
+ /**
272
+ * Creates a type that is T with the required keys K.
273
+ *
274
+ * @example
275
+ * ```ts
276
+ * RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'>
277
+ * // { a: string, b: number } | { a: string, c?: number }
278
+ * ```
279
+ *
280
+ * @internal
281
+ */
282
+ export type UnionRequiredBy<T, K extends keyof T> = T extends any ? RequiredBy<T, K> : never;
283
+ export {};
284
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI;KAAG,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;CAAE,GAAG,OAAO,CAAA;AAExE,OAAO,CAAC,MAAM,MAAM,EAAE,OAAO,MAAM,CAAA;AAEnC;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,MAAM,CA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AAK,CAAA;AAET;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,KAAK,CAAA;AAElG;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,KAAK,CAAA;AAElG;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAA;AAE1F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,257 @@
1
+ import { type Router, type RouterOptions } from '@remix-run/fetch-router';
2
+ import { RpcRequest } from 'ox';
3
+ import { type Chain, type Transport } from 'viem';
4
+ import type { LocalAccount } from 'viem/accounts';
5
+ import type { Kv } from './Kv.js';
6
+ export type Handler = Omit<Router, 'fetch'> & {
7
+ fetch: (input: string | URL | Request, ...args: any[]) => Promise<Response>;
8
+ listener: (req: any, res: any) => void;
9
+ };
10
+ export declare function compose(handlers: Handler[], options?: compose.Options): Handler;
11
+ export declare namespace compose {
12
+ type Options = from.Options & {
13
+ /** The path to use for the handler. */
14
+ path?: string | undefined;
15
+ };
16
+ }
17
+ /**
18
+ * Instantiates a new request handler.
19
+ *
20
+ * @param options - constructor options
21
+ * @returns Handler instance
22
+ */
23
+ export declare function from(options?: from.Options): Handler;
24
+ export declare namespace from {
25
+ type Options = RouterOptions & {
26
+ /**
27
+ * CORS configuration.
28
+ * - `true` (default): Allow all origins with default methods/headers
29
+ * - `false`: Disable CORS headers
30
+ * - Object: Custom CORS configuration
31
+ */
32
+ cors?: boolean | Cors | undefined;
33
+ /** Headers to add to the response. */
34
+ headers?: Headers | Record<string, string> | undefined;
35
+ };
36
+ type Cors = {
37
+ /** Allowed origins. Defaults to `'*'`. */
38
+ origin?: string | string[] | undefined;
39
+ /** Allowed methods. Defaults to `'GET, POST, PUT, DELETE, OPTIONS'`. */
40
+ methods?: string | undefined;
41
+ /** Allowed headers. Defaults to `'Content-Type'`. */
42
+ headers?: string | undefined;
43
+ /** Whether to allow credentials. */
44
+ credentials?: boolean | undefined;
45
+ /** Headers to expose to the browser. */
46
+ exposeHeaders?: string | undefined;
47
+ /** Max age for preflight cache in seconds. */
48
+ maxAge?: number | undefined;
49
+ };
50
+ }
51
+ /**
52
+ * Instantiates a fee payer service request handler that can be used to
53
+ * sponsor the fee for user transactions.
54
+ *
55
+ * @example
56
+ * ### Cloudflare Worker
57
+ *
58
+ * ```ts
59
+ * import { privateKeyToAccount } from 'viem/accounts'
60
+ * import { Handler } from 'accounts/server'
61
+ *
62
+ * export default {
63
+ * fetch(request) {
64
+ * return Handler.feePayer({
65
+ * account: privateKeyToAccount('0x...'),
66
+ * }).fetch(request)
67
+ * }
68
+ * }
69
+ * ```
70
+ *
71
+ * @example
72
+ * ### Next.js
73
+ *
74
+ * ```ts
75
+ * import { privateKeyToAccount } from 'viem/accounts'
76
+ * import { Handler } from 'accounts/server'
77
+ *
78
+ * const handler = Handler.feePayer({
79
+ * account: privateKeyToAccount('0x...'),
80
+ * })
81
+ *
82
+ * export GET = handler.fetch
83
+ * export POST = handler.fetch
84
+ * ```
85
+ *
86
+ * @example
87
+ * ### Hono
88
+ *
89
+ * ```ts
90
+ * import { privateKeyToAccount } from 'viem/accounts'
91
+ * import { Handler } from 'accounts/server'
92
+ *
93
+ * const handler = Handler.feePayer({
94
+ * account: privateKeyToAccount('0x...'),
95
+ * })
96
+ *
97
+ * const app = new Hono()
98
+ * app.all('*', handler)
99
+ *
100
+ * export default app
101
+ * ```
102
+ *
103
+ * @example
104
+ * ### Node.js
105
+ *
106
+ * ```ts
107
+ * import { privateKeyToAccount } from 'viem/accounts'
108
+ * import { Handler } from 'accounts/server'
109
+ *
110
+ * const handler = Handler.feePayer({
111
+ * account: privateKeyToAccount('0x...'),
112
+ * })
113
+ *
114
+ * const server = createServer(handler.listener)
115
+ * server.listen(3000)
116
+ * ```
117
+ *
118
+ * @example
119
+ * ### Bun
120
+ *
121
+ * ```ts
122
+ * import { privateKeyToAccount } from 'viem/accounts'
123
+ * import { Handler } from 'accounts/server'
124
+ *
125
+ * const handler = Handler.feePayer({
126
+ * account: privateKeyToAccount('0x...'),
127
+ * })
128
+ *
129
+ * Bun.serve(handler)
130
+ * ```
131
+ *
132
+ * @example
133
+ * ### Deno
134
+ *
135
+ * ```ts
136
+ * import { privateKeyToAccount } from 'viem/accounts'
137
+ * import { Handler } from 'accounts/server'
138
+ *
139
+ * const handler = Handler.feePayer({
140
+ * account: privateKeyToAccount('0x...'),
141
+ * })
142
+ *
143
+ * Deno.serve(handler)
144
+ * ```
145
+ *
146
+ * @example
147
+ * ### Express
148
+ *
149
+ * ```ts
150
+ * import { privateKeyToAccount } from 'viem/accounts'
151
+ * import { Handler } from 'accounts/server'
152
+ *
153
+ * const handler = Handler.feePayer({
154
+ * account: privateKeyToAccount('0x...'),
155
+ * })
156
+ *
157
+ * const app = express()
158
+ * app.use(handler.listener)
159
+ * app.listen(3000)
160
+ * ```
161
+ *
162
+ * @example
163
+ * ### Custom chains & transports
164
+ *
165
+ * ```ts
166
+ * import { http } from 'viem'
167
+ * import { privateKeyToAccount } from 'viem/accounts'
168
+ * import { tempo, tempoModerato } from 'viem/chains'
169
+ * import { Handler } from 'accounts/server'
170
+ *
171
+ * const handler = Handler.feePayer({
172
+ * account: privateKeyToAccount('0x...'),
173
+ * chains: [tempo, tempoModerato],
174
+ * transports: {
175
+ * [tempo.id]: http('https://rpc.tempo.xyz'),
176
+ * [tempoModerato.id]: http('https://rpc.moderato.tempo.xyz'),
177
+ * },
178
+ * })
179
+ * ```
180
+ *
181
+ * @param options - Options.
182
+ * @returns Request handler.
183
+ */
184
+ export declare function feePayer(options: feePayer.Options): Handler;
185
+ export declare namespace feePayer {
186
+ type Options = from.Options & {
187
+ /** Account to use as the fee payer. */
188
+ account: LocalAccount;
189
+ /**
190
+ * Supported chains. The handler resolves the client based on the
191
+ * `chainId` in the incoming transaction.
192
+ * @default [tempo, tempoModerato]
193
+ */
194
+ chains?: readonly [Chain, ...Chain[]] | undefined;
195
+ /** Function to call before handling the request. */
196
+ onRequest?: (request: RpcRequest.RpcRequest) => Promise<void>;
197
+ /** Path to use for the handler. */
198
+ path?: string | undefined;
199
+ /** Transports keyed by chain ID. Defaults to `http()` for each chain. */
200
+ transports?: Record<number, Transport> | undefined;
201
+ };
202
+ }
203
+ /**
204
+ * Instantiates a WebAuthn ceremony handler that manages registration and
205
+ * authentication flows server-side.
206
+ *
207
+ * Exposes 4 POST endpoints following the webauthx convention:
208
+ * - `POST /register/options` — generate credential creation options
209
+ * - `POST /register` — verify registration and store credential
210
+ * - `POST /login/options` — generate credential request options
211
+ * - `POST /login` — verify authentication
212
+ *
213
+ * @example
214
+ * ```ts
215
+ * import { Handler, Kv } from 'accounts/server'
216
+ *
217
+ * const handler = Handler.webauthn({
218
+ * kv: Kv.memory(),
219
+ * origin: 'https://example.com',
220
+ * rpId: 'example.com',
221
+ * })
222
+ *
223
+ * export default handler
224
+ * ```
225
+ *
226
+ * @param options - Options.
227
+ * @returns Request handler.
228
+ */
229
+ export declare function webauthn(options: webauthn.Options): Handler;
230
+ export declare namespace webauthn {
231
+ type Options = from.Options & {
232
+ /** Maximum age of a challenge in seconds before it expires. @default 300 */
233
+ challengeTtl?: number | undefined;
234
+ /** Key-value store for challenges and credentials. */
235
+ kv: Kv;
236
+ /** Called after a successful registration. The returned response is merged onto the default JSON response. */
237
+ onRegister?: (parameters: {
238
+ credentialId: string;
239
+ publicKey: string;
240
+ request: Request;
241
+ }) => Response | Promise<Response> | void | Promise<void>;
242
+ /** Called after a successful authentication. The returned response is merged onto the default JSON response. */
243
+ onAuthenticate?: (parameters: {
244
+ credentialId: string;
245
+ publicKey: string;
246
+ userId?: string | undefined;
247
+ request: Request;
248
+ }) => Response | Promise<Response> | void | Promise<void>;
249
+ /** Expected origin(s) (e.g. `"https://example.com"` or `["https://a.com", "https://b.com"]`). */
250
+ origin: string | readonly string[];
251
+ /** Path prefix for the WebAuthn endpoints (e.g. `"/webauthn"`). @default "" */
252
+ path?: string | undefined;
253
+ /** Relying Party ID (e.g. `"example.com"`). */
254
+ rpId: string;
255
+ };
256
+ }
257
+ //# sourceMappingURL=Handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Handler.d.ts","sourceRoot":"","sources":["../../src/server/Handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAsB,UAAU,EAAe,MAAM,IAAI,CAAA;AAEhE,OAAO,EAAE,KAAK,KAAK,EAAmC,KAAK,SAAS,EAAE,MAAM,MAAM,CAAA;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAWjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAEjC,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC5C,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,C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