@libid/contracts 0.14.0 → 0.15.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 (63) hide show
  1. package/README.md +41 -40
  2. package/dist/abis/handleEscrow.d.ts +25 -25
  3. package/dist/abis/handleEscrow.js +32 -32
  4. package/dist/abis/handleEscrow.js.map +1 -1
  5. package/dist/abis/handleResolver.d.ts +1 -1
  6. package/dist/abis/handleResolver.js +1 -1
  7. package/dist/abis/handleResolver.js.map +1 -1
  8. package/dist/abis/{identityNames.d.ts → identityRegistry.d.ts} +140 -158
  9. package/dist/abis/{identityNames.d.ts.map → identityRegistry.d.ts.map} +1 -1
  10. package/dist/abis/{identityNames.js → identityRegistry.js} +171 -195
  11. package/dist/abis/identityRegistry.js.map +1 -0
  12. package/dist/abis/index.d.ts +1 -1
  13. package/dist/abis/index.d.ts.map +1 -1
  14. package/dist/abis/index.js +1 -1
  15. package/dist/abis/index.js.map +1 -1
  16. package/dist/calls/{identityNames.d.ts → identityRegistry.d.ts} +12 -12
  17. package/dist/calls/identityRegistry.d.ts.map +1 -0
  18. package/dist/calls/identityRegistry.js +55 -0
  19. package/dist/calls/identityRegistry.js.map +1 -0
  20. package/dist/calls/index.d.ts +1 -1
  21. package/dist/calls/index.d.ts.map +1 -1
  22. package/dist/calls/index.js +1 -1
  23. package/dist/calls/index.js.map +1 -1
  24. package/dist/ceremony/profiles.d.ts +34 -2
  25. package/dist/ceremony/profiles.d.ts.map +1 -1
  26. package/dist/ceremony/profiles.js +52 -2
  27. package/dist/ceremony/profiles.js.map +1 -1
  28. package/dist/identity/handle.d.ts +1 -1
  29. package/dist/identity/handle.d.ts.map +1 -1
  30. package/dist/identity/handle.js +10 -9
  31. package/dist/identity/handle.js.map +1 -1
  32. package/dist/identity/handleVectors.d.ts +3 -6
  33. package/dist/identity/handleVectors.d.ts.map +1 -1
  34. package/dist/identity/handleVectors.js +3 -13
  35. package/dist/identity/handleVectors.js.map +1 -1
  36. package/dist/identity/index.js +1 -1
  37. package/dist/identity/index.js.map +1 -1
  38. package/dist/identity/node.d.ts +1 -2
  39. package/dist/identity/node.d.ts.map +1 -1
  40. package/dist/identity/node.js +10 -9
  41. package/dist/identity/node.js.map +1 -1
  42. package/dist/identity/resolve.d.ts +14 -15
  43. package/dist/identity/resolve.d.ts.map +1 -1
  44. package/dist/identity/resolve.js +58 -65
  45. package/dist/identity/resolve.js.map +1 -1
  46. package/package.json +2 -2
  47. package/src/abis/handleEscrow.ts +32 -32
  48. package/src/abis/handleResolver.ts +1 -1
  49. package/src/abis/{identityNames.ts → identityRegistry.ts} +170 -194
  50. package/src/abis/index.ts +1 -1
  51. package/src/calls/identityRegistry.ts +91 -0
  52. package/src/calls/index.ts +1 -1
  53. package/src/ceremony/profiles.ts +55 -2
  54. package/src/identity/handle.ts +12 -8
  55. package/src/identity/handleVectors.ts +3 -14
  56. package/src/identity/index.ts +1 -1
  57. package/src/identity/node.ts +10 -9
  58. package/src/identity/resolve.ts +95 -106
  59. package/dist/abis/identityNames.js.map +0 -1
  60. package/dist/calls/identityNames.d.ts.map +0 -1
  61. package/dist/calls/identityNames.js +0 -55
  62. package/dist/calls/identityNames.js.map +0 -1
  63. package/src/calls/identityNames.ts +0 -88
@@ -1,18 +1,18 @@
1
- /// Reading names from the chain.
1
+ /// Reading identities from the chain.
2
2
  ///
3
- /// Everything here is a view call. Binding a name needs a ceremony payload and a
4
- /// wallet; reading one needs neither, which is the point — any product can
5
- /// resolve a name without touching the ceremony that created it.
3
+ /// Everything here is a view call. Binding an identity needs a ceremony payload
4
+ /// and a wallet; reading one needs neither, which is the point — any product
5
+ /// can resolve a handle without touching the ceremony that bound it.
6
6
  ///
7
7
  /// The client and the contract address are arguments rather than imports. This
8
8
  /// package ships separately from the repository it currently lives in, so it
9
9
  /// carries no configuration of its own and reaches for nothing outside itself.
10
10
  import { keccak256, toHex, zeroAddress } from 'viem';
11
- import { identityNamesAbi } from '../abis/identityNames.js';
12
- /// A platform id is `keccak256` of its domain string. The domains are generated
11
+ import { identityRegistryAbi } from '../abis/identityRegistry.js';
12
+ /// A platform id is `keccak256` of its platform key. The keys are generated
13
13
  /// from `handles.json`, so this and the contract agree by construction.
14
- export function platformId(domain) {
15
- return keccak256(toHex(domain));
14
+ export function platformId(platformKey) {
15
+ return keccak256(toHex(platformKey));
16
16
  }
17
17
  /// One view call.
18
18
  ///
@@ -24,15 +24,15 @@ function read(reader, functionName, args) {
24
24
  return reader.client.readContract({
25
25
  authorizationList: undefined,
26
26
  address: reader.address,
27
- abi: identityNamesAbi,
27
+ abi: identityRegistryAbi,
28
28
  functionName,
29
29
  args,
30
30
  });
31
31
  }
32
32
  /// The platform's normalization rules as configured on chain now
33
- /// (`IdentityNames.rulesOf`); only the platform id is sent.
34
- export async function rulesOnChain(reader, domain) {
35
- const rules = await read(reader, 'rulesOf', [platformId(domain)]);
33
+ /// (`IdentityRegistry.rulesOf`).
34
+ export async function rulesOf(reader, platformId) {
35
+ const rules = await read(reader, 'rulesOf', [platformId]);
36
36
  return {
37
37
  maxLength: Number(rules.maxLength),
38
38
  stripLeadingAt: rules.stripLeadingAt,
@@ -41,84 +41,77 @@ export async function rulesOnChain(reader, domain) {
41
41
  allowHyphen: rules.allowHyphen,
42
42
  };
43
43
  }
44
- /// The wallet that proved this account id, or `null`.
45
- export async function resolveId(reader, platform, userId) {
46
- const owner = await read(reader, 'resolveId', [platform, userId]);
47
- return owner === zeroAddress ? null : owner;
44
+ /// The holder that proved this id, or `null`.
45
+ export async function resolveId(reader, platformId, id) {
46
+ const holder = await read(reader, 'resolveId', [platformId, id]);
47
+ return holder === zeroAddress ? null : holder;
48
48
  }
49
- /// The wallet that last proved this handle, or `null`.
49
+ /// The holder that last proved this handle, or `null`.
50
50
  ///
51
51
  /// The handle is normalized on chain before it is looked up, so a caller may
52
- /// pass what a user typed — including something that is not a handle at all.
53
- /// The contract is total in the handle: a string no platform could hold answers
54
- /// the zero address, which is the same answer as a handle nobody has proved,
55
- /// and the one a search box wants.
52
+ /// pass what was typed — including something that is not a handle at all.
53
+ /// The contract is total in the handle: a string the platform's rules refuse
54
+ /// answers the zero address, which is the same answer as a handle nobody has
55
+ /// proved, and the one a search box wants.
56
56
  ///
57
57
  /// A revert propagates. `UnknownPlatform` in particular means the platform is
58
- /// not configured, and answering "unowned" would bury a deployment mistake
58
+ /// not configured, and answering "unbound" would bury a deployment mistake
59
59
  /// under a plausible result.
60
- export async function resolveHandle(reader, platform, handle) {
61
- const owner = await read(reader, 'resolveHandle', [platform, handle]);
62
- return owner === zeroAddress ? null : owner;
60
+ export async function resolveHandle(reader, platformId, handle) {
61
+ const holder = await read(reader, 'resolveHandle', [platformId, handle]);
62
+ return holder === zeroAddress ? null : holder;
63
63
  }
64
- /// The handle a wallet published, exactly as stored.
65
- ///
66
- /// It may be stale: it says what the wallet proved once, not what the handle
67
- /// resolves to now. Use `primaryName` to display one.
68
- export async function reverseOf(reader, wallet, platform) {
69
- const name = await read(reader, 'reverseOf', [wallet, platform]);
70
- return name.length === 0 ? null : name;
71
- }
72
- /// The handle to show for a wallet, or `null`.
64
+ /// The handle to show for a holder, or `null`.
73
65
  ///
74
66
  /// Forward-checked on chain: empty once the stored handle resolves somewhere
75
67
  /// else. ENS asks integrators to perform that check themselves and warns that
76
- /// skipping it displays a name its holder no longer owns; here it cannot be
77
- /// skipped, because the contract does it.
78
- export async function primaryName(reader, wallet, platform) {
79
- const name = await read(reader, 'primaryOf', [wallet, platform]);
80
- return name.length === 0 ? null : name;
68
+ /// skipping it displays an ENS primary name that no longer resolves back; here
69
+ /// it cannot be skipped, because the contract does it.
70
+ export async function publishedHandleOf(reader, holder, platformId) {
71
+ const handle = await read(reader, 'publishedHandleOf', [holder, platformId]);
72
+ return handle.length === 0 ? null : handle;
81
73
  }
82
- /// Resolve a handle and report whether an account id still agrees with it.
74
+ /// Resolve a handle and report whether an id still agrees with it.
83
75
  ///
84
- /// **Read this before signing, and do not let it block a transfer.** A name
85
- /// that will not route is not a name: sending to a handle means sending to
76
+ /// **Read this before signing, and do not let it block a transfer.** A handle
77
+ /// that will not route is not a handle: sending to a handle means sending to
86
78
  /// whoever proved it last, which is what the handle now means. What the flag is
87
- /// for is telling a user that the account they think they are paying is not the
88
- /// one that holds the name today — a decision they can only make beforehand.
79
+ /// for is telling whoever is paying that the identity they think they are
80
+ /// paying is not the one that has the handle today — a decision they can only
81
+ /// make beforehand.
89
82
  ///
90
83
  /// Both halves are needed. A handle on its own has nothing to disagree with.
91
84
  ///
92
- /// A handle the platform's rules reject resolves to `{wallet: null, idAgrees:
85
+ /// A handle the platform's rules reject resolves to `{holder: null, idAgrees:
93
86
  /// false}`, the same as one nobody has proved — see `resolveHandle`.
94
- export async function resolvePair(reader, platform, handle, userId) {
95
- const [wallet, idAgrees] = await read(reader, 'resolvePair', [
96
- platform,
87
+ export async function resolveHandleAndId(reader, platformId, handle, id) {
88
+ const [holder, idAgrees] = await read(reader, 'resolveHandleAndId', [
89
+ platformId,
97
90
  handle,
98
- userId,
91
+ id,
99
92
  ]);
100
- return { wallet: wallet === zeroAddress ? null : wallet, idAgrees };
93
+ return { holder: holder === zeroAddress ? null : holder, idAgrees };
101
94
  }
102
- /// How many accounts a wallet holds, on every platform together.
103
- export async function accountCount(reader, wallet) {
104
- return read(reader, 'accountCount', [wallet]);
95
+ /// How many identities a holder has, on every platform together.
96
+ export async function identityCount(reader, holder) {
97
+ return read(reader, 'identityCount', [holder]);
105
98
  }
106
- /// A page of the accounts a wallet holds, on every platform together: the
107
- /// indices `[from, from + limit)` of its list, counted from zero and clipped
108
- /// to the list. A `from` past the end answers an empty page. A reader that
109
- /// wants one platform filters a page by `platformId`.
99
+ /// A page of a holder's identities, on every platform together:
100
+ /// the indices `[from, from + limit)` of its list, counted from zero and
101
+ /// clipped to the list. A `from` past the end answers an empty page. A reader
102
+ /// that wants one platform filters a page by `platformId`.
110
103
  ///
111
- /// Order is arbitrary and changes when an account leaves the list, so two
104
+ /// Order is arbitrary and changes when an identity leaves the list, so two
112
105
  /// pages read across a removal may overlap or skip. A reader that needs every
113
- /// account reads `accountCount` and the pages against one block.
106
+ /// identity reads `identityCount` and the pages against one block.
114
107
  ///
115
- /// A list is as long as its wallet made it, and a call's gas is not. A caller
116
- /// enumerating a wallet it did not choose keeps `limit` small and pages.
117
- export async function accountsOf(reader, wallet, from, limit) {
118
- const page = await read(reader, 'accountsOf', [wallet, from, limit]);
119
- return page.map(({ platformId, userId, handle, handleCurrent }) => ({
108
+ /// A list is as long as its holder made it, and a call's gas is not. A caller
109
+ /// enumerating a holder it did not choose keeps `limit` small and pages.
110
+ export async function identitiesOf(reader, holder, from, limit) {
111
+ const page = await read(reader, 'identitiesOf', [holder, from, limit]);
112
+ return page.map(({ platformId, id, handle, handleCurrent }) => ({
120
113
  platformId,
121
- userId,
114
+ id,
122
115
  handle,
123
116
  handleCurrent,
124
117
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/identity/resolve.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,GAAG;AACH,iFAAiF;AACjF,2EAA2E;AAC3E,iEAAiE;AACjE,GAAG;AACH,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAE/E,OAAO,EAAgB,SAAS,EAAqB,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAErF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAQ3D,gFAAgF;AAChF,wEAAwE;AACxE,MAAM,UAAU,UAAU,CAAmB,MAAyB;IACpE,OAAO,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;AACjC,CAAC;AAQD,kBAAkB;AAClB,GAAG;AACH,gDAAgD;AAChD,mEAAmE;AACnE,0EAA0E;AAC1E,kDAAkD;AAClD,SAAS,IAAI,CAAI,MAAmB,EAAE,YAAoB,EAAE,IAAwB;IAClF,OACE,MAAM,CAAC,MAGR,CAAC,YAAY,CAAC;QACb,iBAAi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,EAAE,QAAQ,EAAE,CAAA;AACrE,CAAC;AAkBD,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAsB,EAAE,MAAe;IACzE,OAAO,IAAI,CAAS,MAAM,EAAE,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AACxD,CAAC;AAED,gEAAgE;AAChE,yEAAyE;AACzE,8EAA8E;AAC9E,2DAA2D;AAC3D,GAAG;AACH,2EAA2E;AAC3E,8EAA8E;AAC9E,mEAAmE;AACnE,GAAG;AACH,8EAA8E;AAC9E,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAsB,EACtB,MAAe,EACf,IAAY,EACZ,KAAa;IAEb,MAAM,IAAI,GAAG,MAAM,IAAI,CAAsB,MAAM,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;IAC3F,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9D,UAAU;QACV,EAAE;QACF,MAAM;QACN,aAAa;KACd,CAAC,CAAC,CAAA;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@libid/contracts",
3
- "version": "0.14.0",
4
- "description": "Typed viem-ready ABIs and call builders for the libid contracts, plus the identity helper layer (handle normalization, name resolution).",
3
+ "version": "0.15.0",
4
+ "description": "Typed viem-ready ABIs and call builders for the libid contracts, plus the identity helper layer (handle normalization, handle resolution).",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "repository": {
7
7
  "type": "git",
@@ -132,27 +132,14 @@ export const handleEscrowAbi = [
132
132
  "internalType": "address"
133
133
  },
134
134
  {
135
- "name": "names_",
135
+ "name": "registry_",
136
136
  "type": "address",
137
- "internalType": "contract IIdentityNames"
137
+ "internalType": "contract IIdentityRegistry"
138
138
  }
139
139
  ],
140
140
  "outputs": [],
141
141
  "stateMutability": "nonpayable"
142
142
  },
143
- {
144
- "type": "function",
145
- "name": "names",
146
- "inputs": [],
147
- "outputs": [
148
- {
149
- "name": "",
150
- "type": "address",
151
- "internalType": "contract IIdentityNames"
152
- }
153
- ],
154
- "stateMutability": "view"
155
- },
156
143
  {
157
144
  "type": "function",
158
145
  "name": "owner",
@@ -244,6 +231,19 @@ export const handleEscrowAbi = [
244
231
  ],
245
232
  "stateMutability": "view"
246
233
  },
234
+ {
235
+ "type": "function",
236
+ "name": "registry",
237
+ "inputs": [],
238
+ "outputs": [
239
+ {
240
+ "name": "",
241
+ "type": "address",
242
+ "internalType": "contract IIdentityRegistry"
243
+ }
244
+ ],
245
+ "stateMutability": "view"
246
+ },
247
247
  {
248
248
  "type": "function",
249
249
  "name": "renounceOwnership",
@@ -601,22 +601,6 @@ export const handleEscrowAbi = [
601
601
  "name": "InvalidInitialization",
602
602
  "inputs": []
603
603
  },
604
- {
605
- "type": "error",
606
- "name": "NamesLacks",
607
- "inputs": [
608
- {
609
- "name": "names",
610
- "type": "address",
611
- "internalType": "address"
612
- },
613
- {
614
- "name": "selector",
615
- "type": "bytes4",
616
- "internalType": "bytes4"
617
- }
618
- ]
619
- },
620
604
  {
621
605
  "type": "error",
622
606
  "name": "NativeTransferFailed",
@@ -635,7 +619,7 @@ export const handleEscrowAbi = [
635
619
  },
636
620
  {
637
621
  "type": "error",
638
- "name": "NoNames",
622
+ "name": "NoRegistry",
639
623
  "inputs": []
640
624
  },
641
625
  {
@@ -761,6 +745,22 @@ export const handleEscrowAbi = [
761
745
  "name": "ReentrancyGuardReentrantCall",
762
746
  "inputs": []
763
747
  },
748
+ {
749
+ "type": "error",
750
+ "name": "RegistryLacks",
751
+ "inputs": [
752
+ {
753
+ "name": "registry",
754
+ "type": "address",
755
+ "internalType": "address"
756
+ },
757
+ {
758
+ "name": "selector",
759
+ "type": "bytes4",
760
+ "internalType": "bytes4"
761
+ }
762
+ ]
763
+ },
764
764
  {
765
765
  "type": "error",
766
766
  "name": "RenounceDisabled",
@@ -117,7 +117,7 @@ export const handleResolverAbi = [
117
117
  "name": "resolve",
118
118
  "inputs": [
119
119
  {
120
- "name": "name",
120
+ "name": "ensName",
121
121
  "type": "bytes",
122
122
  "internalType": "bytes"
123
123
  },