tapimo 0.0.2 → 0.1.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.
Files changed (265) hide show
  1. package/README.md +11 -2
  2. package/dist/ApiKey.d.ts +12 -11
  3. package/dist/ApiKey.d.ts.map +1 -1
  4. package/dist/ApiKey.js +10 -12
  5. package/dist/ApiKey.js.map +1 -1
  6. package/dist/ApiKeys.d.ts +139 -0
  7. package/dist/ApiKeys.d.ts.map +1 -0
  8. package/dist/ApiKeys.js +166 -0
  9. package/dist/ApiKeys.js.map +1 -0
  10. package/dist/App.d.ts +920 -910
  11. package/dist/App.d.ts.map +1 -1
  12. package/dist/App.js +36 -12
  13. package/dist/App.js.map +1 -1
  14. package/dist/Handler.d.ts +86 -0
  15. package/dist/Handler.d.ts.map +1 -0
  16. package/dist/Handler.js +83 -0
  17. package/dist/Handler.js.map +1 -0
  18. package/dist/Scope.d.ts +4 -1
  19. package/dist/Scope.d.ts.map +1 -1
  20. package/dist/Scope.js +5 -1
  21. package/dist/Scope.js.map +1 -1
  22. package/dist/Webhooks.d.ts +3 -5
  23. package/dist/Webhooks.d.ts.map +1 -1
  24. package/dist/Webhooks.js +9 -2
  25. package/dist/Webhooks.js.map +1 -1
  26. package/dist/admin/Access.d.ts +1 -3
  27. package/dist/admin/Access.d.ts.map +1 -1
  28. package/dist/admin/Access.js +1 -3
  29. package/dist/admin/Access.js.map +1 -1
  30. package/dist/admin/App.d.ts +98 -209
  31. package/dist/admin/App.d.ts.map +1 -1
  32. package/dist/admin/App.js +2 -4
  33. package/dist/admin/App.js.map +1 -1
  34. package/dist/admin/apps/api-keys.d.ts +7 -5
  35. package/dist/admin/apps/api-keys.d.ts.map +1 -1
  36. package/dist/admin/apps/api-keys.js +8 -9
  37. package/dist/admin/apps/api-keys.js.map +1 -1
  38. package/dist/admin/apps/scopes.d.ts +3 -0
  39. package/dist/admin/apps/scopes.d.ts.map +1 -1
  40. package/dist/admin/apps/verified-tokens.d.ts +101 -215
  41. package/dist/admin/apps/verified-tokens.d.ts.map +1 -1
  42. package/dist/admin/apps/verified-tokens.js +17 -38
  43. package/dist/admin/apps/verified-tokens.js.map +1 -1
  44. package/dist/admin/ui.generated.d.ts +1 -1
  45. package/dist/admin/ui.generated.js +1 -1
  46. package/dist/apps/balances.d.ts +2 -2
  47. package/dist/apps/receipts.d.ts +43 -43
  48. package/dist/apps/tokens.d.ts +454 -454
  49. package/dist/apps/transactions.d.ts +43 -43
  50. package/dist/apps/transfers.d.ts +29 -29
  51. package/dist/apps/webhooks.d.ts +5 -2
  52. package/dist/apps/webhooks.d.ts.map +1 -1
  53. package/dist/apps/webhooks.js +38 -34
  54. package/dist/apps/webhooks.js.map +1 -1
  55. package/dist/{Cli.d.ts → cli/Cli.d.ts} +13 -2
  56. package/dist/cli/Cli.d.ts.map +1 -0
  57. package/dist/cli/Cli.js +19 -0
  58. package/dist/cli/Cli.js.map +1 -0
  59. package/dist/cli/bin.d.ts +3 -0
  60. package/dist/cli/bin.d.ts.map +1 -0
  61. package/dist/cli/bin.js +4 -0
  62. package/dist/cli/bin.js.map +1 -0
  63. package/dist/cli/commands/admin.d.ts +15 -0
  64. package/dist/cli/commands/admin.d.ts.map +1 -0
  65. package/dist/cli/commands/admin.js +60 -0
  66. package/dist/cli/commands/admin.js.map +1 -0
  67. package/dist/cloudflare.d.ts +7 -0
  68. package/dist/cloudflare.d.ts.map +1 -1
  69. package/dist/cloudflare.js +9 -0
  70. package/dist/cloudflare.js.map +1 -1
  71. package/dist/db/Db.d.ts +103 -0
  72. package/dist/db/Db.d.ts.map +1 -0
  73. package/dist/db/Db.js +274 -0
  74. package/dist/db/Db.js.map +1 -0
  75. package/dist/db/Schema.d.ts +88 -0
  76. package/dist/db/Schema.d.ts.map +1 -0
  77. package/dist/db/Schema.js +130 -0
  78. package/dist/db/Schema.js.map +1 -0
  79. package/dist/db/tables/organizations.d.ts +79 -0
  80. package/dist/db/tables/organizations.d.ts.map +1 -0
  81. package/dist/db/tables/organizations.js +81 -0
  82. package/dist/db/tables/organizations.js.map +1 -0
  83. package/dist/db/tables/verifiedTokens.d.ts +53 -0
  84. package/dist/db/tables/verifiedTokens.d.ts.map +1 -0
  85. package/dist/db/tables/verifiedTokens.js +74 -0
  86. package/dist/db/tables/verifiedTokens.js.map +1 -0
  87. package/dist/db/tables/webhookDeliveries.d.ts +71 -0
  88. package/dist/db/tables/webhookDeliveries.d.ts.map +1 -0
  89. package/dist/db/tables/webhookDeliveries.js +119 -0
  90. package/dist/db/tables/webhookDeliveries.js.map +1 -0
  91. package/dist/db/tables/webhookSubscriptions.d.ts +158 -0
  92. package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -0
  93. package/dist/db/tables/webhookSubscriptions.js +272 -0
  94. package/dist/db/tables/webhookSubscriptions.js.map +1 -0
  95. package/dist/handlers/internal/executionError.d.ts +25 -0
  96. package/dist/handlers/internal/executionError.d.ts.map +1 -0
  97. package/dist/handlers/internal/executionError.js +184 -0
  98. package/dist/handlers/internal/executionError.js.map +1 -0
  99. package/dist/handlers/internal/multisig.d.ts +237 -0
  100. package/dist/handlers/internal/multisig.d.ts.map +1 -0
  101. package/dist/handlers/internal/multisig.js +567 -0
  102. package/dist/handlers/internal/multisig.js.map +1 -0
  103. package/dist/handlers/internal/requestListener.d.ts +124 -0
  104. package/dist/handlers/internal/requestListener.d.ts.map +1 -0
  105. package/dist/handlers/internal/requestListener.js +173 -0
  106. package/dist/handlers/internal/requestListener.js.map +1 -0
  107. package/dist/handlers/internal/sponsorship.d.ts +83 -0
  108. package/dist/handlers/internal/sponsorship.d.ts.map +1 -0
  109. package/dist/handlers/internal/sponsorship.js +103 -0
  110. package/dist/handlers/internal/sponsorship.js.map +1 -0
  111. package/dist/handlers/internal/types.d.ts +284 -0
  112. package/dist/handlers/internal/types.d.ts.map +1 -0
  113. package/dist/handlers/internal/types.js +2 -0
  114. package/dist/handlers/internal/types.js.map +1 -0
  115. package/dist/handlers/internal/utils.d.ts +34 -0
  116. package/dist/handlers/internal/utils.d.ts.map +1 -0
  117. package/dist/handlers/internal/utils.js +131 -0
  118. package/dist/handlers/internal/utils.js.map +1 -0
  119. package/dist/handlers/relay.d.ts +119 -0
  120. package/dist/handlers/relay.d.ts.map +1 -0
  121. package/dist/handlers/relay.js +1264 -0
  122. package/dist/handlers/relay.js.map +1 -0
  123. package/dist/index.d.ts +4 -2
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +4 -2
  126. package/dist/index.js.map +1 -1
  127. package/dist/internal/Auth.d.ts +16 -10
  128. package/dist/internal/Auth.d.ts.map +1 -1
  129. package/dist/internal/Auth.js +72 -12
  130. package/dist/internal/Auth.js.map +1 -1
  131. package/dist/internal/RpcSchema.d.ts +10 -0
  132. package/dist/internal/RpcSchema.d.ts.map +1 -0
  133. package/dist/internal/RpcSchema.js +2 -0
  134. package/dist/internal/RpcSchema.js.map +1 -0
  135. package/dist/internal/Store.d.ts +42 -3
  136. package/dist/internal/Store.d.ts.map +1 -1
  137. package/dist/internal/Store.js +65 -3
  138. package/dist/internal/Store.js.map +1 -1
  139. package/dist/internal/VerifiedTokens.d.ts +15 -34
  140. package/dist/internal/VerifiedTokens.d.ts.map +1 -1
  141. package/dist/internal/VerifiedTokens.js +115 -159
  142. package/dist/internal/VerifiedTokens.js.map +1 -1
  143. package/dist/internal/Webhooks.d.ts +49 -35
  144. package/dist/internal/Webhooks.d.ts.map +1 -1
  145. package/dist/internal/Webhooks.js +92 -205
  146. package/dist/internal/Webhooks.js.map +1 -1
  147. package/package.json +7 -2
  148. package/src/ApiKey.test.ts +3 -3
  149. package/src/ApiKey.ts +10 -12
  150. package/src/ApiKeys.test.ts +175 -0
  151. package/src/ApiKeys.ts +205 -0
  152. package/src/App.test-d.ts +1 -1
  153. package/src/App.test.ts +10768 -351
  154. package/src/App.ts +79 -36
  155. package/src/Client.test-d.ts +1 -1
  156. package/src/Handler.ts +154 -0
  157. package/src/Scope.ts +5 -1
  158. package/src/Webhooks.test.ts +8 -7
  159. package/src/Webhooks.ts +11 -5
  160. package/src/admin/Access.ts +1 -3
  161. package/src/admin/App.ts +19 -24
  162. package/src/admin/apps/api-keys.test.ts +19 -18
  163. package/src/admin/apps/api-keys.ts +8 -9
  164. package/src/admin/apps/scopes.test.ts +4 -0
  165. package/src/admin/apps/verified-tokens.test.ts +3 -30
  166. package/src/admin/apps/verified-tokens.ts +17 -36
  167. package/src/admin/ui.generated.ts +1 -1
  168. package/src/apps/balances.test.ts +4 -3
  169. package/src/apps/blocks.test.ts +1 -1
  170. package/src/apps/exchanges.test.ts +1 -1
  171. package/src/apps/indexer.test.ts +1 -1
  172. package/src/apps/receipts.test.ts +1 -1
  173. package/src/apps/rpc.test.ts +100 -10
  174. package/src/apps/tokenlist.test.ts +5 -7
  175. package/src/apps/tokens.test.ts +4 -3
  176. package/src/apps/transactions.test.ts +1 -1
  177. package/src/apps/transfers.test.ts +1 -1
  178. package/src/apps/verified-tokens.test.ts +24 -12
  179. package/src/apps/webhooks.test.ts +130 -143
  180. package/src/apps/webhooks.ts +45 -47
  181. package/src/{Cli.test.ts → cli/Cli.test.ts} +10 -9
  182. package/src/{Cli.ts → cli/Cli.ts} +16 -9
  183. package/src/cli/bin.ts +4 -0
  184. package/src/cli/commands/admin.test.ts +71 -0
  185. package/src/cli/commands/admin.ts +60 -0
  186. package/src/cloudflare.ts +10 -0
  187. package/src/db/Db.test.ts +84 -0
  188. package/src/db/Db.ts +383 -0
  189. package/src/db/Schema.ts +164 -0
  190. package/src/db/tables/organizations.test.ts +124 -0
  191. package/src/db/tables/organizations.ts +127 -0
  192. package/src/db/tables/verifiedTokens.ts +111 -0
  193. package/src/db/tables/webhookDeliveries.ts +159 -0
  194. package/src/db/tables/webhookSubscriptions.ts +358 -0
  195. package/src/handlers/internal/executionError.ts +205 -0
  196. package/src/handlers/internal/multisig.localnet.test.ts +146 -0
  197. package/src/handlers/internal/multisig.test.ts +744 -0
  198. package/src/handlers/internal/multisig.ts +858 -0
  199. package/src/handlers/internal/relay.localnet.test.ts +2035 -0
  200. package/src/handlers/internal/requestListener.ts +273 -0
  201. package/src/handlers/internal/sponsorship.ts +186 -0
  202. package/src/handlers/internal/types.ts +378 -0
  203. package/src/handlers/internal/utils.ts +153 -0
  204. package/src/handlers/relay.ts +1605 -0
  205. package/src/index.ts +4 -2
  206. package/src/internal/Auth.test.ts +21 -21
  207. package/src/internal/Auth.ts +92 -19
  208. package/src/internal/RateLimit.test.ts +1 -1
  209. package/src/internal/RpcSchema.ts +10 -0
  210. package/src/internal/Store.test.ts +98 -10
  211. package/src/internal/Store.ts +112 -6
  212. package/src/internal/VerifiedTokens.test.ts +99 -115
  213. package/src/internal/VerifiedTokens.ts +123 -175
  214. package/src/internal/Webhooks.test.ts +107 -107
  215. package/src/internal/Webhooks.ts +102 -220
  216. package/dist/ApiKeySource.d.ts +0 -166
  217. package/dist/ApiKeySource.d.ts.map +0 -1
  218. package/dist/ApiKeySource.js +0 -234
  219. package/dist/ApiKeySource.js.map +0 -1
  220. package/dist/Cli.d.ts.map +0 -1
  221. package/dist/Cli.js +0 -13
  222. package/dist/Cli.js.map +0 -1
  223. package/seeds/31318/icons/0x20c0000000000000000000000000000000000000.svg +0 -1
  224. package/seeds/31318/icons/0x20c0000000000000000000000000000000000001.svg +0 -1
  225. package/seeds/31318/icons/0x20c0000000000000000000000000000000000002.svg +0 -1
  226. package/seeds/31318/icons/0x20c0000000000000000000000000000000000003.svg +0 -1
  227. package/seeds/31318/verified-tokens.json +0 -30
  228. package/seeds/4217/icons/0x20c0000000000000000000000000000000000000.svg +0 -25
  229. package/seeds/4217/icons/0x20c000000000000000000000048c8f36df1c9a4a.svg +0 -1
  230. package/seeds/4217/icons/0x20c0000000000000000000000520792dcccccccc.svg +0 -1
  231. package/seeds/4217/icons/0x20c0000000000000000000000a6da882d075a4c3.svg +0 -4
  232. package/seeds/4217/icons/0x20c000000000000000000000111111111e910f0f.svg +0 -30
  233. package/seeds/4217/icons/0x20c00000000000000000000014f22ca97301eb73.svg +0 -1
  234. package/seeds/4217/icons/0x20c0000000000000000000001621e21f71cf12fb.svg +0 -1
  235. package/seeds/4217/icons/0x20c0000000000000000000002f52d5cc21a3207b.svg +0 -1
  236. package/seeds/4217/icons/0x20c0000000000000000000003158081efd85bfc2.svg +0 -11
  237. package/seeds/4217/icons/0x20c0000000000000000000003554d28269e0f3c2.svg +0 -1
  238. package/seeds/4217/icons/0x20c000000000000000000000383a23bacb546ab9.svg +0 -1
  239. package/seeds/4217/icons/0x20c00000000000000000000042109aef2f8b28e1.png +0 -0
  240. package/seeds/4217/icons/0x20c0000000000000000000005c0bac7cef389a11.svg +0 -1
  241. package/seeds/4217/icons/0x20c0000000000000000000006fd9a167923ba194.png +0 -0
  242. package/seeds/4217/icons/0x20c0000000000000000000007f7ba549dd0251b9.svg +0 -1
  243. package/seeds/4217/icons/0x20c0000000000000000000008191667423f70e67.svg +0 -5
  244. package/seeds/4217/icons/0x20c0000000000000000000008ee4fcff88888888.svg +0 -1
  245. package/seeds/4217/icons/0x20c0000000000000000000009a4a4b17e0dc6651.svg +0 -1
  246. package/seeds/4217/icons/0x20c000000000000000000000ab02d39df30bd17e.svg +0 -1
  247. package/seeds/4217/icons/0x20c000000000000000000000ae247a1130450f09.svg +0 -1
  248. package/seeds/4217/icons/0x20c000000000000000000000aeed2ec36a54d0e5.svg +0 -1
  249. package/seeds/4217/icons/0x20c000000000000000000000b9537d11c60e8b50.svg +0 -1
  250. package/seeds/4217/icons/0x20c000000000000000000000bd95bfb69fbe6ce3.svg +0 -1
  251. package/seeds/4217/icons/0x20c000000000000000000000c412ec89d0c08be5.svg +0 -1
  252. package/seeds/4217/icons/0x20c000000000000000000000f047dd7018e50367.png +0 -0
  253. package/seeds/4217/verified-tokens.json +0 -177
  254. package/seeds/42431/icons/0x20c0000000000000000000000000000000000000.svg +0 -25
  255. package/seeds/42431/icons/0x20c0000000000000000000000000000000000001.svg +0 -1
  256. package/seeds/42431/icons/0x20c0000000000000000000000000000000000002.svg +0 -1
  257. package/seeds/42431/icons/0x20c0000000000000000000000000000000000003.svg +0 -1
  258. package/seeds/42431/icons/0x20c0000000000000000000009e8d7eb59b783726.svg +0 -1
  259. package/seeds/42431/icons/0x20c000000000000000000000d72572838bbee59c.svg +0 -1
  260. package/seeds/42431/verified-tokens.json +0 -44
  261. package/seeds/openrpc/README.md +0 -27
  262. package/seeds/openrpc/execution-apis.json +0 -8989
  263. package/src/ApiKeySource.test-d.ts +0 -11
  264. package/src/ApiKeySource.test.ts +0 -295
  265. package/src/ApiKeySource.ts +0 -303
@@ -1,8 +1,8 @@
1
1
  import { type RequestIdVariables } from 'hono/request-id';
2
- import * as ApiKeySource from '../ApiKeySource.js';
3
2
  import type * as Assets from '../Assets.js';
4
- import * as Response from '../internal/Response.js';
3
+ import type * as Db from '../db/Db.js';
5
4
  import type * as Store from '../internal/Store.js';
5
+ import * as Response from '../internal/Response.js';
6
6
  /** A verified admin identity, as returned by {@link create.Options.identify}. */
7
7
  export type Identity = {
8
8
  /** The admin's verified email, recorded as `createdBy` on every minted key. */
@@ -13,14 +13,14 @@ export type Environment = {
13
13
  Variables: RequestIdVariables & {
14
14
  /** Static-asset writer (e.g. the R2 icon bucket), when configured. */
15
15
  assets: create.Assets | undefined;
16
+ /** Authoritative Postgres store, or a per-request factory. Resolve at the leaf with `Db.get`. */
17
+ db: Db.Source;
18
+ /** KV state store backing API-key records (mint/list/revoke). */
19
+ kv: {
20
+ store: Store.State;
21
+ };
16
22
  /** The admin identity, or `null` when unauthenticated (gated routes reject). */
17
23
  identity: Identity | null;
18
- /** The API-key source provisioned against (mint/list/revoke). */
19
- source: ApiKeySource.Source;
20
- /** Verified-token state store, when management is enabled. */
21
- verifiedTokens: {
22
- store: Store.State;
23
- } | undefined;
24
24
  };
25
25
  };
26
26
  /** The admin portal Hono app. Inferred from {@link create}. */
@@ -36,6 +36,9 @@ export declare function create(options: create.Options): import("hono/hono-base"
36
36
  }, {
37
37
  readonly description: 'Run ad-hoc queries against the raw indexer passthrough.';
38
38
  readonly scope: 'indexer:query';
39
+ }, {
40
+ readonly description: 'Fill and submit transactions through the relay.';
41
+ readonly scope: 'rpc-relay';
39
42
  }, {
40
43
  readonly description: 'Read webhook subscriptions.';
41
44
  readonly scope: 'webhooks:read';
@@ -62,7 +65,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
62
65
  perMinute: number;
63
66
  };
64
67
  } | undefined;
65
- scopes: readonly ("*" | "data:read" | "indexer:query" | "webhooks:read" | "webhooks:write")[];
68
+ scopes: readonly ("*" | "data:read" | "indexer:query" | "rpc-relay" | "webhooks:read" | "webhooks:write")[];
66
69
  createdAt: string;
67
70
  createdBy?: string | undefined;
68
71
  expiresAt?: string | undefined;
@@ -78,7 +81,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
78
81
  rateLimits?: Record<string, {
79
82
  perMinute: number;
80
83
  }> | undefined;
81
- scopes: readonly ("*" | "data:read" | "indexer:query" | "webhooks:read" | "webhooks:write")[];
84
+ scopes: readonly ("*" | "data:read" | "indexer:query" | "rpc-relay" | "webhooks:read" | "webhooks:write")[];
82
85
  expiresAt?: string | undefined;
83
86
  orgId?: string | undefined;
84
87
  };
@@ -99,7 +102,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
99
102
  perMinute: number;
100
103
  };
101
104
  } | undefined;
102
- scopes: readonly ("*" | "data:read" | "indexer:query" | "webhooks:read" | "webhooks:write")[];
105
+ scopes: readonly ("*" | "data:read" | "indexer:query" | "rpc-relay" | "webhooks:read" | "webhooks:write")[];
103
106
  createdAt: string;
104
107
  createdBy?: string | undefined;
105
108
  expiresAt?: string | undefined;
@@ -149,22 +152,6 @@ export declare function create(options: create.Options): import("hono/hono-base"
149
152
  }, "/api-keys"> | import("hono/types").MergeSchemaPath<{
150
153
  "/": {
151
154
  $get: {
152
- output: {
153
- error: {
154
- code: "verified_tokens_not_enabled";
155
- details?: readonly Response.error.Detail[] | undefined;
156
- message: string;
157
- };
158
- requestId: string;
159
- };
160
- outputFormat: "json";
161
- status: 404;
162
- input: {
163
- query: {
164
- chainId: string | string[];
165
- };
166
- };
167
- } | {
168
155
  output: {
169
156
  data: {
170
157
  address: `0x${string}`;
@@ -191,14 +178,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
191
178
  $post: {
192
179
  output: {
193
180
  error: {
194
- code: "verified_tokens_not_enabled";
181
+ code: string;
195
182
  details?: readonly Response.error.Detail[] | undefined;
196
183
  message: string;
197
184
  };
198
185
  requestId: string;
199
186
  };
200
187
  outputFormat: "json";
201
- status: 404;
188
+ status: 400 | 413 | 415;
202
189
  input: {
203
190
  json: {
204
191
  address: `0x${string}`;
@@ -214,14 +201,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
214
201
  } | {
215
202
  output: {
216
203
  error: {
217
- code: "assets_not_enabled";
204
+ code: "upstream_error";
218
205
  details?: readonly Response.error.Detail[] | undefined;
219
206
  message: string;
220
207
  };
221
208
  requestId: string;
222
209
  };
223
210
  outputFormat: "json";
224
- status: 404;
211
+ status: 502;
225
212
  input: {
226
213
  json: {
227
214
  address: `0x${string}`;
@@ -237,7 +224,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
237
224
  } | {
238
225
  output: {
239
226
  error: {
240
- code: "verified_token_not_found";
227
+ code: "assets_not_enabled";
241
228
  details?: readonly Response.error.Detail[] | undefined;
242
229
  message: string;
243
230
  };
@@ -259,38 +246,19 @@ export declare function create(options: create.Options): import("hono/hono-base"
259
246
  };
260
247
  } | {
261
248
  output: {
262
- error: {
263
- code: "duplicate_address";
264
- details?: readonly Response.error.Detail[] | undefined;
265
- message: string;
266
- };
267
- requestId: string;
268
- };
269
- outputFormat: "json";
270
- status: 409;
271
- input: {
272
- json: {
249
+ data: {
273
250
  address: `0x${string}`;
274
251
  currency: string;
275
252
  decimals: number;
276
253
  logoUri?: string | undefined;
277
254
  name: string;
278
255
  symbol: string;
279
- chainId: unknown;
280
- logo?: string | undefined;
281
- };
282
- };
283
- } | {
284
- output: {
285
- error: {
286
- code: "duplicate_symbol";
287
- details?: readonly Response.error.Detail[] | undefined;
288
- message: string;
256
+ id: string;
289
257
  };
290
- requestId: string;
258
+ version: string;
291
259
  };
292
260
  outputFormat: "json";
293
- status: 409;
261
+ status: import("hono/utils/http-status").ContentfulStatusCode;
294
262
  input: {
295
263
  json: {
296
264
  address: `0x${string}`;
@@ -306,14 +274,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
306
274
  } | {
307
275
  output: {
308
276
  error: {
309
- code: "version_mismatch";
277
+ code: "duplicate_address";
310
278
  details?: readonly Response.error.Detail[] | undefined;
311
279
  message: string;
312
280
  };
313
281
  requestId: string;
314
282
  };
315
283
  outputFormat: "json";
316
- status: 412;
284
+ status: 409;
317
285
  input: {
318
286
  json: {
319
287
  address: `0x${string}`;
@@ -329,14 +297,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
329
297
  } | {
330
298
  output: {
331
299
  error: {
332
- code: "upstream_error";
300
+ code: "duplicate_symbol";
333
301
  details?: readonly Response.error.Detail[] | undefined;
334
302
  message: string;
335
303
  };
336
304
  requestId: string;
337
305
  };
338
306
  outputFormat: "json";
339
- status: 502;
307
+ status: 409;
340
308
  input: {
341
309
  json: {
342
310
  address: `0x${string}`;
@@ -351,19 +319,15 @@ export declare function create(options: create.Options): import("hono/hono-base"
351
319
  };
352
320
  } | {
353
321
  output: {
354
- data: {
355
- address: `0x${string}`;
356
- currency: string;
357
- decimals: number;
358
- logoUri?: string | undefined;
359
- name: string;
360
- symbol: string;
361
- id: string;
322
+ error: {
323
+ code: "verified_token_not_found";
324
+ details?: readonly Response.error.Detail[] | undefined;
325
+ message: string;
362
326
  };
363
- version: string;
327
+ requestId: string;
364
328
  };
365
329
  outputFormat: "json";
366
- status: import("hono/utils/http-status").ContentfulStatusCode;
330
+ status: 404;
367
331
  input: {
368
332
  json: {
369
333
  address: `0x${string}`;
@@ -379,14 +343,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
379
343
  } | {
380
344
  output: {
381
345
  error: {
382
- code: string;
346
+ code: "version_mismatch";
383
347
  details?: readonly Response.error.Detail[] | undefined;
384
348
  message: string;
385
349
  };
386
350
  requestId: string;
387
351
  };
388
352
  outputFormat: "json";
389
- status: 400 | 413 | 415;
353
+ status: 412;
390
354
  input: {
391
355
  json: {
392
356
  address: `0x${string}`;
@@ -406,14 +370,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
406
370
  $put: {
407
371
  output: {
408
372
  error: {
409
- code: "verified_tokens_not_enabled";
373
+ code: string;
410
374
  details?: readonly Response.error.Detail[] | undefined;
411
375
  message: string;
412
376
  };
413
377
  requestId: string;
414
378
  };
415
379
  outputFormat: "json";
416
- status: 404;
380
+ status: 400 | 413 | 415;
417
381
  input: {
418
382
  query: {
419
383
  chainId: string | string[];
@@ -433,14 +397,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
433
397
  } | {
434
398
  output: {
435
399
  error: {
436
- code: "verified_token_not_found";
400
+ code: "upstream_error";
437
401
  details?: readonly Response.error.Detail[] | undefined;
438
402
  message: string;
439
403
  };
440
404
  requestId: string;
441
405
  };
442
406
  outputFormat: "json";
443
- status: 404;
407
+ status: 502;
444
408
  input: {
445
409
  query: {
446
410
  chainId: string | string[];
@@ -514,14 +478,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
514
478
  } | {
515
479
  output: {
516
480
  error: {
517
- code: "version_mismatch";
481
+ code: "verified_token_not_found";
518
482
  details?: readonly Response.error.Detail[] | undefined;
519
483
  message: string;
520
484
  };
521
485
  requestId: string;
522
486
  };
523
487
  outputFormat: "json";
524
- status: 412;
488
+ status: 404;
525
489
  input: {
526
490
  query: {
527
491
  chainId: string | string[];
@@ -541,14 +505,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
541
505
  } | {
542
506
  output: {
543
507
  error: {
544
- code: "upstream_error";
508
+ code: "version_mismatch";
545
509
  details?: readonly Response.error.Detail[] | undefined;
546
510
  message: string;
547
511
  };
548
512
  requestId: string;
549
513
  };
550
514
  outputFormat: "json";
551
- status: 502;
515
+ status: 412;
552
516
  input: {
553
517
  query: {
554
518
  chainId: string | string[];
@@ -596,33 +560,6 @@ export declare function create(options: create.Options): import("hono/hono-base"
596
560
  }[];
597
561
  };
598
562
  };
599
- } | {
600
- output: {
601
- error: {
602
- code: string;
603
- details?: readonly Response.error.Detail[] | undefined;
604
- message: string;
605
- };
606
- requestId: string;
607
- };
608
- outputFormat: "json";
609
- status: 400 | 413 | 415;
610
- input: {
611
- query: {
612
- chainId: string | string[];
613
- };
614
- } & {
615
- json: {
616
- tokens: {
617
- address: `0x${string}`;
618
- currency: string;
619
- decimals: number;
620
- logoUri?: string | undefined;
621
- name: string;
622
- symbol: string;
623
- }[];
624
- };
625
- };
626
563
  };
627
564
  };
628
565
  } & {
@@ -630,14 +567,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
630
567
  $patch: {
631
568
  output: {
632
569
  error: {
633
- code: "verified_tokens_not_enabled";
570
+ code: string;
634
571
  details?: readonly Response.error.Detail[] | undefined;
635
572
  message: string;
636
573
  };
637
574
  requestId: string;
638
575
  };
639
576
  outputFormat: "json";
640
- status: 404;
577
+ status: 400 | 413 | 415;
641
578
  input: {
642
579
  param: {
643
580
  address: `0x${string}`;
@@ -658,14 +595,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
658
595
  } | {
659
596
  output: {
660
597
  error: {
661
- code: "verified_token_not_found";
598
+ code: "upstream_error";
662
599
  details?: readonly Response.error.Detail[] | undefined;
663
600
  message: string;
664
601
  };
665
602
  requestId: string;
666
603
  };
667
604
  outputFormat: "json";
668
- status: 404;
605
+ status: 502;
669
606
  input: {
670
607
  param: {
671
608
  address: `0x${string}`;
@@ -685,15 +622,19 @@ export declare function create(options: create.Options): import("hono/hono-base"
685
622
  };
686
623
  } | {
687
624
  output: {
688
- error: {
689
- code: "duplicate_address";
690
- details?: readonly Response.error.Detail[] | undefined;
691
- message: string;
625
+ data: {
626
+ address: `0x${string}`;
627
+ currency: string;
628
+ decimals: number;
629
+ logoUri?: string | undefined;
630
+ name: string;
631
+ symbol: string;
632
+ id: string;
692
633
  };
693
- requestId: string;
634
+ version: string;
694
635
  };
695
636
  outputFormat: "json";
696
- status: 409;
637
+ status: import("hono/utils/http-status").ContentfulStatusCode;
697
638
  input: {
698
639
  param: {
699
640
  address: `0x${string}`;
@@ -714,7 +655,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
714
655
  } | {
715
656
  output: {
716
657
  error: {
717
- code: "duplicate_symbol";
658
+ code: "duplicate_address";
718
659
  details?: readonly Response.error.Detail[] | undefined;
719
660
  message: string;
720
661
  };
@@ -742,14 +683,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
742
683
  } | {
743
684
  output: {
744
685
  error: {
745
- code: "version_mismatch";
686
+ code: "duplicate_symbol";
746
687
  details?: readonly Response.error.Detail[] | undefined;
747
688
  message: string;
748
689
  };
749
690
  requestId: string;
750
691
  };
751
692
  outputFormat: "json";
752
- status: 412;
693
+ status: 409;
753
694
  input: {
754
695
  param: {
755
696
  address: `0x${string}`;
@@ -770,46 +711,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
770
711
  } | {
771
712
  output: {
772
713
  error: {
773
- code: "upstream_error";
714
+ code: "verified_token_not_found";
774
715
  details?: readonly Response.error.Detail[] | undefined;
775
716
  message: string;
776
717
  };
777
718
  requestId: string;
778
719
  };
779
720
  outputFormat: "json";
780
- status: 502;
781
- input: {
782
- param: {
783
- address: `0x${string}`;
784
- };
785
- } & {
786
- query: {
787
- chainId: string | string[];
788
- };
789
- } & {
790
- json: {
791
- currency?: string | undefined;
792
- decimals?: number | undefined;
793
- logoUri?: string | undefined;
794
- name?: string | undefined;
795
- symbol?: string | undefined;
796
- };
797
- };
798
- } | {
799
- output: {
800
- data: {
801
- address: `0x${string}`;
802
- currency: string;
803
- decimals: number;
804
- logoUri?: string | undefined;
805
- name: string;
806
- symbol: string;
807
- id: string;
808
- };
809
- version: string;
810
- };
811
- outputFormat: "json";
812
- status: import("hono/utils/http-status").ContentfulStatusCode;
721
+ status: 404;
813
722
  input: {
814
723
  param: {
815
724
  address: `0x${string}`;
@@ -830,14 +739,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
830
739
  } | {
831
740
  output: {
832
741
  error: {
833
- code: string;
742
+ code: "version_mismatch";
834
743
  details?: readonly Response.error.Detail[] | undefined;
835
744
  message: string;
836
745
  };
837
746
  requestId: string;
838
747
  };
839
748
  outputFormat: "json";
840
- status: 400 | 413 | 415;
749
+ status: 412;
841
750
  input: {
842
751
  param: {
843
752
  address: `0x${string}`;
@@ -862,14 +771,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
862
771
  $delete: {
863
772
  output: {
864
773
  error: {
865
- code: "verified_tokens_not_enabled";
774
+ code: string;
866
775
  details?: readonly Response.error.Detail[] | undefined;
867
776
  message: string;
868
777
  };
869
778
  requestId: string;
870
779
  };
871
780
  outputFormat: "json";
872
- status: 404;
781
+ status: 400 | 413 | 415;
873
782
  input: {
874
783
  param: {
875
784
  address: `0x${string}`;
@@ -882,14 +791,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
882
791
  } | {
883
792
  output: {
884
793
  error: {
885
- code: "verified_token_not_found";
794
+ code: "upstream_error";
886
795
  details?: readonly Response.error.Detail[] | undefined;
887
796
  message: string;
888
797
  };
889
798
  requestId: string;
890
799
  };
891
800
  outputFormat: "json";
892
- status: 404;
801
+ status: 502;
893
802
  input: {
894
803
  param: {
895
804
  address: `0x${string}`;
@@ -942,14 +851,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
942
851
  } | {
943
852
  output: {
944
853
  error: {
945
- code: "version_mismatch";
854
+ code: "verified_token_not_found";
946
855
  details?: readonly Response.error.Detail[] | undefined;
947
856
  message: string;
948
857
  };
949
858
  requestId: string;
950
859
  };
951
860
  outputFormat: "json";
952
- status: 412;
861
+ status: 404;
953
862
  input: {
954
863
  param: {
955
864
  address: `0x${string}`;
@@ -962,14 +871,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
962
871
  } | {
963
872
  output: {
964
873
  error: {
965
- code: "upstream_error";
874
+ code: "version_mismatch";
966
875
  details?: readonly Response.error.Detail[] | undefined;
967
876
  message: string;
968
877
  };
969
878
  requestId: string;
970
879
  };
971
880
  outputFormat: "json";
972
- status: 502;
881
+ status: 412;
973
882
  input: {
974
883
  param: {
975
884
  address: `0x${string}`;
@@ -994,17 +903,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
994
903
  chainId: string | string[];
995
904
  };
996
905
  };
997
- } | {
998
- output: {
999
- error: {
1000
- code: string;
1001
- details?: readonly Response.error.Detail[] | undefined;
1002
- message: string;
1003
- };
1004
- requestId: string;
1005
- };
1006
- outputFormat: "json";
1007
- status: 400 | 413 | 415;
906
+ };
907
+ };
908
+ } & {
909
+ "/:address/logo": {
910
+ $get: {
911
+ output: ArrayBuffer;
912
+ outputFormat: "body";
913
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1008
914
  input: {
1009
915
  param: {
1010
916
  address: `0x${string}`;
@@ -1014,11 +920,7 @@ export declare function create(options: create.Options): import("hono/hono-base"
1014
920
  chainId: string | string[];
1015
921
  };
1016
922
  };
1017
- };
1018
- };
1019
- } & {
1020
- "/:address/logo": {
1021
- $get: {
923
+ } | {
1022
924
  output: {
1023
925
  error: {
1024
926
  code: "logo_not_found";
@@ -1038,19 +940,6 @@ export declare function create(options: create.Options): import("hono/hono-base"
1038
940
  chainId: string | string[];
1039
941
  };
1040
942
  };
1041
- } | {
1042
- output: ArrayBuffer;
1043
- outputFormat: "body";
1044
- status: import("hono/utils/http-status").ContentfulStatusCode;
1045
- input: {
1046
- param: {
1047
- address: `0x${string}`;
1048
- };
1049
- } & {
1050
- query: {
1051
- chainId: string | string[];
1052
- };
1053
- };
1054
943
  };
1055
944
  };
1056
945
  } & {
@@ -1098,14 +987,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
1098
987
  } | {
1099
988
  output: {
1100
989
  error: {
1101
- code: "payload_too_large";
990
+ code: "unsupported_media_type";
1102
991
  details?: readonly Response.error.Detail[] | undefined;
1103
992
  message: string;
1104
993
  };
1105
994
  requestId: string;
1106
995
  };
1107
996
  outputFormat: "json";
1108
- status: 413;
997
+ status: 415;
1109
998
  input: {
1110
999
  param: {
1111
1000
  address: `0x${string}`;
@@ -1118,14 +1007,14 @@ export declare function create(options: create.Options): import("hono/hono-base"
1118
1007
  } | {
1119
1008
  output: {
1120
1009
  error: {
1121
- code: "unsupported_media_type";
1010
+ code: "payload_too_large";
1122
1011
  details?: readonly Response.error.Detail[] | undefined;
1123
1012
  message: string;
1124
1013
  };
1125
1014
  requestId: string;
1126
1015
  };
1127
1016
  outputFormat: "json";
1128
- status: 415;
1017
+ status: 413;
1129
1018
  input: {
1130
1019
  param: {
1131
1020
  address: `0x${string}`;
@@ -1180,16 +1069,24 @@ export declare namespace create {
1180
1069
  type Assets = Assets.Assets;
1181
1070
  /** Options for {@link create}. */
1182
1071
  type Options = {
1183
- /** API-key provisioning config (mirrors the API app's `apiKey` option). */
1184
- apiKey: {
1185
- /** Source to provision against (mint/list/revoke). */
1186
- source: ApiKeySource.Source;
1187
- };
1188
1072
  /**
1189
1073
  * Static-asset writer for logo uploads (shared with the main API's `assets`
1190
1074
  * loader) to enable `PUT /verified-tokens/:address/logo`; omit for `404`.
1191
1075
  */
1192
1076
  assets?: Assets | undefined;
1077
+ /**
1078
+ * Authoritative Postgres store shared with the main API (verified
1079
+ * tokens). Pass a long-lived `Db.postgres(...)` singleton on Node, or a
1080
+ * factory (`() => Db.postgres(...)`) on Workers.
1081
+ */
1082
+ db: Db.Source;
1083
+ /**
1084
+ * KV state store backing API-key records (shared with the main API's
1085
+ * `kv` option), provisioned against by the `/api-keys` routes.
1086
+ */
1087
+ kv: {
1088
+ store: Store.State;
1089
+ };
1193
1090
  /**
1194
1091
  * Extracts the verified admin identity from a request, or `null` to deny.
1195
1092
  * Must only return an identity for an already-authenticated request (a
@@ -1201,14 +1098,6 @@ export declare namespace create {
1201
1098
  * `loginUrl`/`logoutUrl` are surfaced in `GET /config.json`.
1202
1099
  */
1203
1100
  ui?: Ui | false | undefined;
1204
- /**
1205
- * Verified-token management config (store shared with the main API's reads)
1206
- * to enable the `/verified-tokens` routes; omit to serve them as `404`.
1207
- */
1208
- verifiedTokens?: {
1209
- /** Verified-token state store (shared with the main API's reads). */
1210
- store: Store.State;
1211
- } | undefined;
1212
1101
  };
1213
1102
  /** Admin UI options surfaced to the SPA via `GET /config.json`. */
1214
1103
  type Ui = {