@ensforge/sdk 0.0.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 (70) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +69 -0
  3. package/dist/ensforge.d.ts +38 -0
  4. package/dist/ensforge.d.ts.map +1 -0
  5. package/dist/ensforge.js +57 -0
  6. package/dist/ensforge.js.map +1 -0
  7. package/dist/groups/batch.d.ts +20 -0
  8. package/dist/groups/batch.d.ts.map +1 -0
  9. package/dist/groups/batch.js +20 -0
  10. package/dist/groups/batch.js.map +1 -0
  11. package/dist/groups/capabilities.d.ts +536 -0
  12. package/dist/groups/capabilities.d.ts.map +1 -0
  13. package/dist/groups/capabilities.js +24 -0
  14. package/dist/groups/capabilities.js.map +1 -0
  15. package/dist/groups/dns.d.ts +79 -0
  16. package/dist/groups/dns.d.ts.map +1 -0
  17. package/dist/groups/dns.js +20 -0
  18. package/dist/groups/dns.js.map +1 -0
  19. package/dist/groups/events.d.ts +66 -0
  20. package/dist/groups/events.d.ts.map +1 -0
  21. package/dist/groups/events.js +13 -0
  22. package/dist/groups/events.js.map +1 -0
  23. package/dist/groups/index.d.ts +15 -0
  24. package/dist/groups/migration.d.ts +175 -0
  25. package/dist/groups/migration.d.ts.map +1 -0
  26. package/dist/groups/migration.js +17 -0
  27. package/dist/groups/migration.js.map +1 -0
  28. package/dist/groups/name.d.ts +146 -0
  29. package/dist/groups/name.d.ts.map +1 -0
  30. package/dist/groups/name.js +25 -0
  31. package/dist/groups/name.js.map +1 -0
  32. package/dist/groups/ownership.d.ts +16 -0
  33. package/dist/groups/ownership.d.ts.map +1 -0
  34. package/dist/groups/ownership.js +16 -0
  35. package/dist/groups/ownership.js.map +1 -0
  36. package/dist/groups/permissions.d.ts +21 -0
  37. package/dist/groups/permissions.d.ts.map +1 -0
  38. package/dist/groups/permissions.js +21 -0
  39. package/dist/groups/permissions.js.map +1 -0
  40. package/dist/groups/records.d.ts +98 -0
  41. package/dist/groups/records.d.ts.map +1 -0
  42. package/dist/groups/records.js +37 -0
  43. package/dist/groups/records.js.map +1 -0
  44. package/dist/groups/registration.d.ts +257 -0
  45. package/dist/groups/registration.d.ts.map +1 -0
  46. package/dist/groups/registration.js +25 -0
  47. package/dist/groups/registration.js.map +1 -0
  48. package/dist/groups/resolution.d.ts +53 -0
  49. package/dist/groups/resolution.d.ts.map +1 -0
  50. package/dist/groups/resolution.js +22 -0
  51. package/dist/groups/resolution.js.map +1 -0
  52. package/dist/groups/reverse.d.ts +18 -0
  53. package/dist/groups/reverse.d.ts.map +1 -0
  54. package/dist/groups/reverse.js +15 -0
  55. package/dist/groups/reverse.js.map +1 -0
  56. package/dist/groups/subnames.d.ts +17 -0
  57. package/dist/groups/subnames.d.ts.map +1 -0
  58. package/dist/groups/subnames.js +17 -0
  59. package/dist/groups/subnames.js.map +1 -0
  60. package/dist/groups/wrapping.d.ts +17 -0
  61. package/dist/groups/wrapping.d.ts.map +1 -0
  62. package/dist/groups/wrapping.js +17 -0
  63. package/dist/groups/wrapping.js.map +1 -0
  64. package/dist/index.d.ts +20 -0
  65. package/dist/index.js +4 -0
  66. package/dist/internal/bind-action.d.ts +28 -0
  67. package/dist/internal/bind-action.d.ts.map +1 -0
  68. package/dist/internal/bind-action.js +28 -0
  69. package/dist/internal/bind-action.js.map +1 -0
  70. package/package.json +56 -0
@@ -0,0 +1,536 @@
1
+ import { BoundAction } from "../internal/bind-action.js";
2
+ import "../index.js";
3
+ import { EnsforgeConfig } from "@ensforge/core";
4
+ //#region src/groups/capabilities.d.ts
5
+ declare const makeCapabilitiesActions: (config: EnsforgeConfig) => Readonly<{
6
+ getNameCapabilities: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetNameCapabilitiesParameters, {
7
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
8
+ readonly account: `0x${string}`;
9
+ readonly registry: {
10
+ readonly address: `0x${string}`;
11
+ readonly protocol: "v1" | "v2";
12
+ readonly kind: "registry" | "name-wrapper" | "permissioned-registry" | "wrapper-registry";
13
+ readonly owned: boolean;
14
+ readonly permissioned: boolean;
15
+ readonly temporal: boolean;
16
+ readonly tokenized: boolean;
17
+ readonly wrapped: boolean;
18
+ readonly setOwner: boolean;
19
+ readonly setResolver: boolean;
20
+ readonly createSubname: boolean;
21
+ readonly transfer: boolean;
22
+ readonly setExpiry: boolean;
23
+ };
24
+ readonly resolver: {
25
+ readonly address: `0x${string}` | null;
26
+ readonly node: `0x${string}` & import("effect/Brand").Brand<"Namehash">;
27
+ readonly inherited: boolean;
28
+ readonly extended: boolean;
29
+ readonly permissioned: boolean;
30
+ readonly authorization: "unknown" | "none" | "owner-delegate" | "role";
31
+ readonly profiles: {
32
+ readonly address: boolean;
33
+ readonly text: boolean;
34
+ readonly contentHash: boolean;
35
+ readonly abi: boolean;
36
+ readonly pubkey: boolean;
37
+ readonly interface: boolean;
38
+ readonly name: boolean;
39
+ readonly data: boolean;
40
+ readonly dnsRecord: boolean;
41
+ readonly dnsZone: boolean;
42
+ };
43
+ };
44
+ readonly records: readonly {
45
+ readonly record: {
46
+ readonly type: "address";
47
+ readonly coinType: bigint;
48
+ } | {
49
+ readonly type: "text";
50
+ readonly key: string;
51
+ } | {
52
+ readonly type: "contentHash";
53
+ } | {
54
+ readonly type: "pubkey";
55
+ } | {
56
+ readonly type: "abi";
57
+ readonly contentType?: bigint | undefined;
58
+ } | {
59
+ readonly type: "interface";
60
+ readonly interfaceId?: (`0x${string}` & import("effect/Brand").Brand<"InterfaceId">) | undefined;
61
+ } | {
62
+ readonly type: "name";
63
+ } | {
64
+ readonly type: "data";
65
+ readonly key: string;
66
+ } | {
67
+ readonly type: "alias";
68
+ } | {
69
+ readonly type: "dnsRecord";
70
+ } | {
71
+ readonly type: "dnsZone";
72
+ } | {
73
+ readonly type: "clear";
74
+ };
75
+ readonly supported: boolean;
76
+ readonly authorization: {
77
+ readonly status: "authorized";
78
+ readonly source: "owner" | "operator-approval" | "token-approval" | "resolver-delegate" | "registry-role" | "resolver-role" | "wrapper-permission";
79
+ } | {
80
+ readonly status: "unauthorized";
81
+ readonly requirement: {
82
+ readonly kind: "none";
83
+ } | {
84
+ readonly kind: "owner";
85
+ } | {
86
+ readonly kind: "operator-approval";
87
+ } | {
88
+ readonly kind: "token-approval";
89
+ } | {
90
+ readonly kind: "resolver-delegate";
91
+ } | {
92
+ readonly kind: "registry-role";
93
+ readonly roles: bigint;
94
+ readonly resource: bigint;
95
+ } | {
96
+ readonly kind: "resolver-role";
97
+ readonly roles: bigint;
98
+ readonly resource: bigint;
99
+ } | {
100
+ readonly kind: "wrapper-permission";
101
+ } | {
102
+ readonly kind: "unsupported";
103
+ };
104
+ } | {
105
+ readonly status: "unknown";
106
+ readonly reason: "CUSTOM_RESOLVER";
107
+ };
108
+ readonly requiredRole: bigint;
109
+ readonly resource: bigint | null;
110
+ }[];
111
+ readonly ownership: {
112
+ readonly setOwner: boolean;
113
+ readonly setResolver: boolean;
114
+ readonly createSubname: boolean;
115
+ readonly transfer: boolean;
116
+ readonly setExpiry: boolean;
117
+ };
118
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
119
+ getOperatorApproval: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetOperatorApprovalParameters, {
120
+ readonly owner: `0x${string}`;
121
+ readonly operator: `0x${string}`;
122
+ readonly targets: readonly {
123
+ readonly kind: "registry" | "resolver" | "registrar" | "wrapper";
124
+ readonly address: `0x${string}`;
125
+ readonly supported: boolean;
126
+ readonly approved: boolean;
127
+ }[];
128
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
129
+ getRecordPermissions: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRecordPermissionsParameters, {
130
+ readonly resolver: `0x${string}` | null;
131
+ readonly inherited: boolean;
132
+ readonly account: `0x${string}`;
133
+ readonly records: readonly {
134
+ readonly record: {
135
+ readonly type: "address";
136
+ readonly coinType: bigint;
137
+ } | {
138
+ readonly type: "text";
139
+ readonly key: string;
140
+ } | {
141
+ readonly type: "contentHash";
142
+ } | {
143
+ readonly type: "pubkey";
144
+ } | {
145
+ readonly type: "abi";
146
+ readonly contentType?: bigint | undefined;
147
+ } | {
148
+ readonly type: "interface";
149
+ readonly interfaceId?: (`0x${string}` & import("effect/Brand").Brand<"InterfaceId">) | undefined;
150
+ } | {
151
+ readonly type: "name";
152
+ } | {
153
+ readonly type: "data";
154
+ readonly key: string;
155
+ } | {
156
+ readonly type: "alias";
157
+ } | {
158
+ readonly type: "dnsRecord";
159
+ } | {
160
+ readonly type: "dnsZone";
161
+ } | {
162
+ readonly type: "clear";
163
+ };
164
+ readonly supported: boolean;
165
+ readonly authorization: {
166
+ readonly status: "authorized";
167
+ readonly source: "owner" | "operator-approval" | "token-approval" | "resolver-delegate" | "registry-role" | "resolver-role" | "wrapper-permission";
168
+ } | {
169
+ readonly status: "unauthorized";
170
+ readonly requirement: {
171
+ readonly kind: "none";
172
+ } | {
173
+ readonly kind: "owner";
174
+ } | {
175
+ readonly kind: "operator-approval";
176
+ } | {
177
+ readonly kind: "token-approval";
178
+ } | {
179
+ readonly kind: "resolver-delegate";
180
+ } | {
181
+ readonly kind: "registry-role";
182
+ readonly roles: bigint;
183
+ readonly resource: bigint;
184
+ } | {
185
+ readonly kind: "resolver-role";
186
+ readonly roles: bigint;
187
+ readonly resource: bigint;
188
+ } | {
189
+ readonly kind: "wrapper-permission";
190
+ } | {
191
+ readonly kind: "unsupported";
192
+ };
193
+ } | {
194
+ readonly status: "unknown";
195
+ readonly reason: "CUSTOM_RESOLVER";
196
+ };
197
+ readonly requiredRole: bigint;
198
+ readonly resource: bigint | null;
199
+ }[];
200
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
201
+ getRegistryCapabilities: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRegistryCapabilitiesParameters, {
202
+ readonly address: `0x${string}`;
203
+ readonly protocol: "v1" | "v2";
204
+ readonly kind: "registry" | "name-wrapper" | "permissioned-registry" | "wrapper-registry";
205
+ readonly owned: boolean;
206
+ readonly permissioned: boolean;
207
+ readonly temporal: boolean;
208
+ readonly tokenized: boolean;
209
+ readonly wrapped: boolean;
210
+ readonly setOwner: boolean;
211
+ readonly setResolver: boolean;
212
+ readonly createSubname: boolean;
213
+ readonly transfer: boolean;
214
+ readonly setExpiry: boolean;
215
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
216
+ getRegistryRoles: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRegistryRolesParameters, {
217
+ readonly supported: false;
218
+ readonly protocol: "v1" | "v2";
219
+ readonly reason: "RESOLVER_NOT_FOUND" | "ROLE_BASED_PERMISSIONS_UNSUPPORTED";
220
+ } | {
221
+ readonly supported: true;
222
+ readonly protocol: "v2";
223
+ readonly registry: `0x${string}`;
224
+ readonly resource: bigint;
225
+ readonly account: `0x${string}`;
226
+ readonly roles: bigint;
227
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
228
+ getRequiredAuthorization: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRequiredAuthorizationParameters, {
229
+ readonly account: `0x${string}`;
230
+ readonly operation: {
231
+ readonly type: "address";
232
+ readonly coinType: bigint;
233
+ } | {
234
+ readonly type: "text";
235
+ readonly key: string;
236
+ } | {
237
+ readonly type: "contentHash";
238
+ } | {
239
+ readonly type: "pubkey";
240
+ } | {
241
+ readonly type: "abi";
242
+ readonly contentType?: bigint | undefined;
243
+ } | {
244
+ readonly type: "interface";
245
+ readonly interfaceId?: (`0x${string}` & import("effect/Brand").Brand<"InterfaceId">) | undefined;
246
+ } | {
247
+ readonly type: "name";
248
+ } | {
249
+ readonly type: "data";
250
+ readonly key: string;
251
+ } | {
252
+ readonly type: "alias";
253
+ } | {
254
+ readonly type: "dnsRecord";
255
+ } | {
256
+ readonly type: "dnsZone";
257
+ } | {
258
+ readonly type: "clear";
259
+ } | {
260
+ readonly type: "setOwner";
261
+ } | {
262
+ readonly type: "setTtl";
263
+ } | {
264
+ readonly type: "setResolver";
265
+ } | {
266
+ readonly type: "createSubname";
267
+ } | {
268
+ readonly type: "transfer";
269
+ } | {
270
+ readonly type: "setExpiry";
271
+ };
272
+ readonly target: {
273
+ readonly available: false;
274
+ readonly protocol: "v1" | "v2";
275
+ readonly reason: "NAME_NOT_REGISTERED" | "RESOLVER_NOT_FOUND" | "OPERATION_UNSUPPORTED";
276
+ } | {
277
+ readonly available: true;
278
+ readonly protocol: "v1" | "v2";
279
+ readonly kind: "registry" | "name-wrapper" | "wrapper-registry" | "resolver" | "registrar";
280
+ readonly address: `0x${string}`;
281
+ readonly operation: {
282
+ readonly type: "address";
283
+ readonly coinType: bigint;
284
+ } | {
285
+ readonly type: "text";
286
+ readonly key: string;
287
+ } | {
288
+ readonly type: "contentHash";
289
+ } | {
290
+ readonly type: "pubkey";
291
+ } | {
292
+ readonly type: "abi";
293
+ readonly contentType?: bigint | undefined;
294
+ } | {
295
+ readonly type: "interface";
296
+ readonly interfaceId?: (`0x${string}` & import("effect/Brand").Brand<"InterfaceId">) | undefined;
297
+ } | {
298
+ readonly type: "name";
299
+ } | {
300
+ readonly type: "data";
301
+ readonly key: string;
302
+ } | {
303
+ readonly type: "alias";
304
+ } | {
305
+ readonly type: "dnsRecord";
306
+ } | {
307
+ readonly type: "dnsZone";
308
+ } | {
309
+ readonly type: "clear";
310
+ } | {
311
+ readonly type: "setOwner";
312
+ } | {
313
+ readonly type: "setTtl";
314
+ } | {
315
+ readonly type: "setResolver";
316
+ } | {
317
+ readonly type: "createSubname";
318
+ } | {
319
+ readonly type: "transfer";
320
+ } | {
321
+ readonly type: "setExpiry";
322
+ };
323
+ readonly node: `0x${string}` & import("effect/Brand").Brand<"Namehash">;
324
+ readonly tokenId: bigint | null;
325
+ readonly resource: bigint | null;
326
+ readonly inheritedResolver: boolean;
327
+ };
328
+ readonly authorization: {
329
+ readonly status: "authorized";
330
+ readonly source: "owner" | "operator-approval" | "token-approval" | "resolver-delegate" | "registry-role" | "resolver-role" | "wrapper-permission";
331
+ } | {
332
+ readonly status: "unauthorized";
333
+ readonly requirement: {
334
+ readonly kind: "none";
335
+ } | {
336
+ readonly kind: "owner";
337
+ } | {
338
+ readonly kind: "operator-approval";
339
+ } | {
340
+ readonly kind: "token-approval";
341
+ } | {
342
+ readonly kind: "resolver-delegate";
343
+ } | {
344
+ readonly kind: "registry-role";
345
+ readonly roles: bigint;
346
+ readonly resource: bigint;
347
+ } | {
348
+ readonly kind: "resolver-role";
349
+ readonly roles: bigint;
350
+ readonly resource: bigint;
351
+ } | {
352
+ readonly kind: "wrapper-permission";
353
+ } | {
354
+ readonly kind: "unsupported";
355
+ };
356
+ } | {
357
+ readonly status: "unknown";
358
+ readonly reason: "CUSTOM_RESOLVER";
359
+ };
360
+ readonly blockers: readonly ("NAME_NOT_REGISTERED" | "RESOLVER_NOT_FOUND" | "OPERATION_UNSUPPORTED" | "WRAPPER_FUSE" | "TRANSFER_ROLE")[];
361
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
362
+ getResolverCapabilities: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRegistryCapabilitiesParameters, {
363
+ readonly address: `0x${string}` | null;
364
+ readonly node: `0x${string}` & import("effect/Brand").Brand<"Namehash">;
365
+ readonly inherited: boolean;
366
+ readonly extended: boolean;
367
+ readonly permissioned: boolean;
368
+ readonly authorization: "unknown" | "none" | "owner-delegate" | "role";
369
+ readonly profiles: {
370
+ readonly address: boolean;
371
+ readonly text: boolean;
372
+ readonly contentHash: boolean;
373
+ readonly abi: boolean;
374
+ readonly pubkey: boolean;
375
+ readonly interface: boolean;
376
+ readonly name: boolean;
377
+ readonly data: boolean;
378
+ readonly dnsRecord: boolean;
379
+ readonly dnsZone: boolean;
380
+ };
381
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
382
+ getResolverDelegateApproval: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetResolverDelegateApprovalParameters, {
383
+ readonly supported: false;
384
+ readonly protocol: "v1" | "v2";
385
+ readonly reason: "RESOLVER_NOT_FOUND" | "DELEGATE_APPROVAL_UNSUPPORTED";
386
+ } | {
387
+ readonly supported: true;
388
+ readonly protocol: "v1" | "v2";
389
+ readonly resolver: `0x${string}`;
390
+ readonly owner: `0x${string}`;
391
+ readonly delegate: `0x${string}`;
392
+ readonly approved: boolean;
393
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
394
+ getResolverRoles: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetResolverRolesParameters, {
395
+ readonly supported: false;
396
+ readonly protocol: "v1" | "v2";
397
+ readonly reason: "RESOLVER_NOT_FOUND" | "ROLE_BASED_PERMISSIONS_UNSUPPORTED";
398
+ } | {
399
+ readonly supported: true;
400
+ readonly protocol: "v2";
401
+ readonly resolver: `0x${string}`;
402
+ readonly resource: bigint;
403
+ readonly account: `0x${string}`;
404
+ readonly roles: bigint;
405
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
406
+ getTokenApproval: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRegistryCapabilitiesParameters, {
407
+ readonly supported: false;
408
+ readonly protocol: "v1" | "v2";
409
+ readonly reason: "PER_TOKEN_APPROVAL_UNSUPPORTED" | "NAME_NOT_TOKENIZED";
410
+ } | {
411
+ readonly supported: true;
412
+ readonly protocol: "v1";
413
+ readonly kind: "name-wrapper" | "registrar";
414
+ readonly contract: `0x${string}`;
415
+ readonly tokenId: bigint;
416
+ readonly approved: `0x${string}` | null;
417
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
418
+ getWrapperPermissions: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetRegistryRolesParameters, {
419
+ readonly supported: false;
420
+ readonly protocol: "v1" | "v2";
421
+ readonly reason: "NAME_NOT_WRAPPED";
422
+ } | {
423
+ readonly supported: true;
424
+ readonly protocol: "v1";
425
+ readonly wrapper: `0x${string}`;
426
+ readonly account: `0x${string}`;
427
+ readonly owner: `0x${string}`;
428
+ readonly tokenId: bigint;
429
+ readonly fuses: number;
430
+ readonly expiry: bigint;
431
+ readonly approved: `0x${string}` | null;
432
+ readonly operatorApproved: boolean;
433
+ readonly canModify: boolean;
434
+ readonly canExtendSubnames: boolean;
435
+ readonly canUnwrap: boolean;
436
+ readonly canTransfer: boolean;
437
+ readonly canSetResolver: boolean;
438
+ readonly canSetTtl: boolean;
439
+ readonly canCreateSubname: boolean;
440
+ readonly canApprove: boolean;
441
+ } | {
442
+ readonly supported: true;
443
+ readonly protocol: "v2";
444
+ readonly wrapper: `0x${string}`;
445
+ readonly account: `0x${string}`;
446
+ readonly resource: bigint;
447
+ readonly roles: bigint;
448
+ readonly operatorApproved: boolean;
449
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
450
+ getWriteTarget: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetWriteTargetParameters, {
451
+ readonly available: false;
452
+ readonly protocol: "v1" | "v2";
453
+ readonly reason: "NAME_NOT_REGISTERED" | "RESOLVER_NOT_FOUND" | "OPERATION_UNSUPPORTED";
454
+ } | {
455
+ readonly available: true;
456
+ readonly protocol: "v1" | "v2";
457
+ readonly kind: "registry" | "name-wrapper" | "wrapper-registry" | "resolver" | "registrar";
458
+ readonly address: `0x${string}`;
459
+ readonly operation: {
460
+ readonly type: "address";
461
+ readonly coinType: bigint;
462
+ } | {
463
+ readonly type: "text";
464
+ readonly key: string;
465
+ } | {
466
+ readonly type: "contentHash";
467
+ } | {
468
+ readonly type: "pubkey";
469
+ } | {
470
+ readonly type: "abi";
471
+ readonly contentType?: bigint | undefined;
472
+ } | {
473
+ readonly type: "interface";
474
+ readonly interfaceId?: (`0x${string}` & import("effect/Brand").Brand<"InterfaceId">) | undefined;
475
+ } | {
476
+ readonly type: "name";
477
+ } | {
478
+ readonly type: "data";
479
+ readonly key: string;
480
+ } | {
481
+ readonly type: "alias";
482
+ } | {
483
+ readonly type: "dnsRecord";
484
+ } | {
485
+ readonly type: "dnsZone";
486
+ } | {
487
+ readonly type: "clear";
488
+ } | {
489
+ readonly type: "setOwner";
490
+ } | {
491
+ readonly type: "setTtl";
492
+ } | {
493
+ readonly type: "setResolver";
494
+ } | {
495
+ readonly type: "createSubname";
496
+ } | {
497
+ readonly type: "transfer";
498
+ } | {
499
+ readonly type: "setExpiry";
500
+ };
501
+ readonly node: `0x${string}` & import("effect/Brand").Brand<"Namehash">;
502
+ readonly tokenId: bigint | null;
503
+ readonly resource: bigint | null;
504
+ readonly inheritedResolver: boolean;
505
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
506
+ hasRegistryRoles: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").HasRegistryRolesParameters, {
507
+ readonly supported: false;
508
+ readonly protocol: "v1" | "v2";
509
+ readonly reason: "RESOLVER_NOT_FOUND" | "ROLE_BASED_PERMISSIONS_UNSUPPORTED";
510
+ } | {
511
+ readonly supported: true;
512
+ readonly protocol: "v2";
513
+ readonly registry: `0x${string}`;
514
+ readonly resource: bigint;
515
+ readonly account: `0x${string}`;
516
+ readonly roles: bigint;
517
+ readonly authorized: boolean;
518
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
519
+ hasResolverRoles: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").HasResolverRolesParameters, {
520
+ readonly supported: false;
521
+ readonly protocol: "v1" | "v2";
522
+ readonly reason: "RESOLVER_NOT_FOUND" | "ROLE_BASED_PERMISSIONS_UNSUPPORTED";
523
+ } | {
524
+ readonly supported: true;
525
+ readonly protocol: "v2";
526
+ readonly resolver: `0x${string}`;
527
+ readonly resource: bigint;
528
+ readonly account: `0x${string}`;
529
+ readonly roles: bigint;
530
+ readonly authorized: boolean;
531
+ }, import("@ensforge/core").GetCanonicalResourceError>>;
532
+ }>;
533
+ type CapabilitiesActions = ReturnType<typeof makeCapabilitiesActions>;
534
+ //#endregion
535
+ export { CapabilitiesActions, makeCapabilitiesActions };
536
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../src/groups/capabilities.ts"],"mappings":";;;;cAoBa,0BAA2B,QAAQ,mBAAc;uBAAd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBpC,sBAAsB,kBAAkB"}
@@ -0,0 +1,24 @@
1
+ import { bindAction } from "../internal/bind-action.js";
2
+ import { getNameCapabilities, getOperatorApproval, getRecordPermissions, getRegistryCapabilities, getRegistryRoles, getRequiredAuthorization, getResolverCapabilities, getResolverDelegateApproval, getResolverRoles, getTokenApproval, getWrapperPermissions, getWriteTarget, hasRegistryRoles, hasResolverRoles } from "@ensforge/core";
3
+
4
+ //#region src/groups/capabilities.ts
5
+ const makeCapabilitiesActions = (config) => Object.freeze({
6
+ getNameCapabilities: bindAction(config, getNameCapabilities),
7
+ getOperatorApproval: bindAction(config, getOperatorApproval),
8
+ getRecordPermissions: bindAction(config, getRecordPermissions),
9
+ getRegistryCapabilities: bindAction(config, getRegistryCapabilities),
10
+ getRegistryRoles: bindAction(config, getRegistryRoles),
11
+ getRequiredAuthorization: bindAction(config, getRequiredAuthorization),
12
+ getResolverCapabilities: bindAction(config, getResolverCapabilities),
13
+ getResolverDelegateApproval: bindAction(config, getResolverDelegateApproval),
14
+ getResolverRoles: bindAction(config, getResolverRoles),
15
+ getTokenApproval: bindAction(config, getTokenApproval),
16
+ getWrapperPermissions: bindAction(config, getWrapperPermissions),
17
+ getWriteTarget: bindAction(config, getWriteTarget),
18
+ hasRegistryRoles: bindAction(config, hasRegistryRoles),
19
+ hasResolverRoles: bindAction(config, hasResolverRoles)
20
+ });
21
+
22
+ //#endregion
23
+ export { makeCapabilitiesActions };
24
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","names":[],"sources":["../../src/groups/capabilities.ts"],"sourcesContent":["import {\n getNameCapabilities,\n getOperatorApproval,\n getRecordPermissions,\n getRegistryCapabilities,\n getRegistryRoles,\n getRequiredAuthorization,\n getResolverCapabilities,\n getResolverDelegateApproval,\n getResolverRoles,\n getTokenApproval,\n getWrapperPermissions,\n getWriteTarget,\n hasRegistryRoles,\n hasResolverRoles,\n type EnsforgeConfig,\n} from \"@ensforge/core\";\n\nimport { bindAction } from \"../internal/bind-action.js\";\n\nexport const makeCapabilitiesActions = (config: EnsforgeConfig) =>\n Object.freeze({\n getNameCapabilities: bindAction(config, getNameCapabilities),\n getOperatorApproval: bindAction(config, getOperatorApproval),\n getRecordPermissions: bindAction(config, getRecordPermissions),\n getRegistryCapabilities: bindAction(config, getRegistryCapabilities),\n getRegistryRoles: bindAction(config, getRegistryRoles),\n getRequiredAuthorization: bindAction(config, getRequiredAuthorization),\n getResolverCapabilities: bindAction(config, getResolverCapabilities),\n getResolverDelegateApproval: bindAction(config, getResolverDelegateApproval),\n getResolverRoles: bindAction(config, getResolverRoles),\n getTokenApproval: bindAction(config, getTokenApproval),\n getWrapperPermissions: bindAction(config, getWrapperPermissions),\n getWriteTarget: bindAction(config, getWriteTarget),\n hasRegistryRoles: bindAction(config, hasRegistryRoles),\n hasResolverRoles: bindAction(config, hasResolverRoles),\n });\n\nexport type CapabilitiesActions = ReturnType<typeof makeCapabilitiesActions>;\n"],"mappings":";;;;AAoBA,MAAa,2BAA2B,WACtC,OAAO,OAAO;CACZ,qBAAqB,WAAW,QAAQ,mBAAmB;CAC3D,qBAAqB,WAAW,QAAQ,mBAAmB;CAC3D,sBAAsB,WAAW,QAAQ,oBAAoB;CAC7D,yBAAyB,WAAW,QAAQ,uBAAuB;CACnE,kBAAkB,WAAW,QAAQ,gBAAgB;CACrD,0BAA0B,WAAW,QAAQ,wBAAwB;CACrE,yBAAyB,WAAW,QAAQ,uBAAuB;CACnE,6BAA6B,WAAW,QAAQ,2BAA2B;CAC3E,kBAAkB,WAAW,QAAQ,gBAAgB;CACrD,kBAAkB,WAAW,QAAQ,gBAAgB;CACrD,uBAAuB,WAAW,QAAQ,qBAAqB;CAC/D,gBAAgB,WAAW,QAAQ,cAAc;CACjD,kBAAkB,WAAW,QAAQ,gBAAgB;CACrD,kBAAkB,WAAW,QAAQ,gBAAgB;AACvD,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { BoundAction } from "../internal/bind-action.js";
2
+ import "../index.js";
3
+ import { EnsforgeConfig } from "@ensforge/core";
4
+ //#region src/groups/dns.d.ts
5
+ declare const makeDnsActions: (config: EnsforgeConfig) => Readonly<{
6
+ claimDnsName: BoundAction<import("@ensforge/core").EnsWriteAction<import("@ensforge/core").ClaimDnsNameParameters, import("@ensforge/core").CallExecutionResult, import("@ensforge/core").WriteError>>;
7
+ getDnsClaimStatus: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetDnsClaimStatusParameters, {
8
+ readonly status: "unsupported";
9
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
10
+ readonly reason: "DNS_REGISTRAR_UNAVAILABLE";
11
+ } | {
12
+ readonly status: "claimed";
13
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
14
+ readonly owner: `0x${string}`;
15
+ readonly resolver: `0x${string}` | null;
16
+ readonly previousInception: bigint;
17
+ } | {
18
+ readonly status: "proof-required";
19
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
20
+ readonly previousInception: bigint;
21
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
22
+ getDnsImportPlan: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetDnsImportPlanParameters, {
23
+ readonly status: "unsupported";
24
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
25
+ readonly reason: "DNS_REGISTRAR_UNAVAILABLE";
26
+ } | {
27
+ readonly status: "already-claimed";
28
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
29
+ readonly registrar: `0x${string}`;
30
+ readonly oracle: `0x${string}`;
31
+ readonly owner: `0x${string}`;
32
+ readonly resolver: `0x${string}` | null;
33
+ } | {
34
+ readonly status: "proof-required";
35
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
36
+ readonly registrar: `0x${string}`;
37
+ readonly oracle: `0x${string}`;
38
+ readonly proofRequest: {
39
+ readonly name: `0x${string}` & import("effect/Brand").Brand<"DnsEncodedName">;
40
+ readonly previousInception: bigint;
41
+ };
42
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
43
+ getDnsRecord: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetDnsRecordParameters, {
44
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
45
+ readonly recordName: string & import("effect/Brand").Brand<"NormalizedName">;
46
+ readonly resource: number;
47
+ readonly resolver: `0x${string}` | null;
48
+ readonly value: `0x${string}` | null;
49
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
50
+ getDnsRecords: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetDnsRecordsParameters, {
51
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
52
+ readonly resolver: `0x${string}` | null;
53
+ readonly records: readonly {
54
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
55
+ readonly recordName: string & import("effect/Brand").Brand<"NormalizedName">;
56
+ readonly resource: number;
57
+ readonly resolver: `0x${string}` | null;
58
+ readonly value: `0x${string}` | null;
59
+ }[];
60
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
61
+ getZoneHash: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").GetZoneHashParameters, {
62
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
63
+ readonly resolver: `0x${string}` | null;
64
+ readonly value: `0x${string}` | null;
65
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
66
+ hasDnsRecords: BoundAction<import("@ensforge/core").EnsReadAction<import("@ensforge/core").HasDnsRecordsParameters, {
67
+ readonly name: string & import("effect/Brand").Brand<"NormalizedName">;
68
+ readonly recordName: string & import("effect/Brand").Brand<"NormalizedName">;
69
+ readonly resolver: `0x${string}` | null;
70
+ readonly exists: boolean;
71
+ }, import("@ensforge/core").GetDnsClaimStatusError>>;
72
+ importDnsName: BoundAction<import("@ensforge/core").EnsAction<import("@ensforge/core").ImportDnsNameParameters, import("@ensforge/core").ImportDnsNameResult, import("@ensforge/core").WriteError>>;
73
+ setDnsRecords: BoundAction<import("@ensforge/core").EnsWriteAction<import("@ensforge/core").SetDnsRecordsParameters, import("@ensforge/core").CallExecutionResult, import("@ensforge/core").WriteError>>;
74
+ setZoneHash: BoundAction<import("@ensforge/core").EnsWriteAction<import("@ensforge/core").SetZoneHashParameters, import("@ensforge/core").CallExecutionResult, import("@ensforge/core").WriteError>>;
75
+ }>;
76
+ type DnsActions = ReturnType<typeof makeDnsActions>;
77
+ //#endregion
78
+ export { DnsActions, makeDnsActions };
79
+ //# sourceMappingURL=dns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns.d.ts","names":[],"sources":["../../src/groups/dns.ts"],"mappings":";;;;cAgBa,iBAAkB,QAAQ,mBAAc;gBAAd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAc3B,aAAa,kBAAkB"}
@@ -0,0 +1,20 @@
1
+ import { bindAction } from "../internal/bind-action.js";
2
+ import { claimDnsName, getDnsClaimStatus, getDnsImportPlan, getDnsRecord, getDnsRecords, getZoneHash, hasDnsRecords, importDnsName, setDnsRecords, setZoneHash } from "@ensforge/core";
3
+
4
+ //#region src/groups/dns.ts
5
+ const makeDnsActions = (config) => Object.freeze({
6
+ claimDnsName: bindAction(config, claimDnsName),
7
+ getDnsClaimStatus: bindAction(config, getDnsClaimStatus),
8
+ getDnsImportPlan: bindAction(config, getDnsImportPlan),
9
+ getDnsRecord: bindAction(config, getDnsRecord),
10
+ getDnsRecords: bindAction(config, getDnsRecords),
11
+ getZoneHash: bindAction(config, getZoneHash),
12
+ hasDnsRecords: bindAction(config, hasDnsRecords),
13
+ importDnsName: bindAction(config, importDnsName),
14
+ setDnsRecords: bindAction(config, setDnsRecords),
15
+ setZoneHash: bindAction(config, setZoneHash)
16
+ });
17
+
18
+ //#endregion
19
+ export { makeDnsActions };
20
+ //# sourceMappingURL=dns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns.js","names":[],"sources":["../../src/groups/dns.ts"],"sourcesContent":["import {\n claimDnsName,\n getDnsClaimStatus,\n getDnsImportPlan,\n getDnsRecord,\n getDnsRecords,\n getZoneHash,\n hasDnsRecords,\n importDnsName,\n setDnsRecords,\n setZoneHash,\n type EnsforgeConfig,\n} from \"@ensforge/core\";\n\nimport { bindAction } from \"../internal/bind-action.js\";\n\nexport const makeDnsActions = (config: EnsforgeConfig) =>\n Object.freeze({\n claimDnsName: bindAction(config, claimDnsName),\n getDnsClaimStatus: bindAction(config, getDnsClaimStatus),\n getDnsImportPlan: bindAction(config, getDnsImportPlan),\n getDnsRecord: bindAction(config, getDnsRecord),\n getDnsRecords: bindAction(config, getDnsRecords),\n getZoneHash: bindAction(config, getZoneHash),\n hasDnsRecords: bindAction(config, hasDnsRecords),\n importDnsName: bindAction(config, importDnsName),\n setDnsRecords: bindAction(config, setDnsRecords),\n setZoneHash: bindAction(config, setZoneHash),\n });\n\nexport type DnsActions = ReturnType<typeof makeDnsActions>;\n"],"mappings":";;;;AAgBA,MAAa,kBAAkB,WAC7B,OAAO,OAAO;CACZ,cAAc,WAAW,QAAQ,YAAY;CAC7C,mBAAmB,WAAW,QAAQ,iBAAiB;CACvD,kBAAkB,WAAW,QAAQ,gBAAgB;CACrD,cAAc,WAAW,QAAQ,YAAY;CAC7C,eAAe,WAAW,QAAQ,aAAa;CAC/C,aAAa,WAAW,QAAQ,WAAW;CAC3C,eAAe,WAAW,QAAQ,aAAa;CAC/C,eAAe,WAAW,QAAQ,aAAa;CAC/C,eAAe,WAAW,QAAQ,aAAa;CAC/C,aAAa,WAAW,QAAQ,WAAW;AAC7C,CAAC"}