@thurinlabs/identity-kit 1.4.0 → 2.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.
- package/README.md +44 -384
- package/dist/{chunk-ZAQ2EPF5.js → chunk-AAJWERE2.js} +2455 -1343
- package/dist/{chunk-M2OJDB7I.cjs → chunk-DJGCYNJN.cjs} +2460 -1348
- package/dist/core.cjs +44 -3
- package/dist/core.d.cts +1563 -903
- package/dist/core.d.ts +1563 -903
- package/dist/core.js +65 -24
- package/dist/index.cjs +25 -459
- package/dist/index.d.cts +1 -83
- package/dist/index.d.ts +1 -83
- package/dist/index.js +65 -499
- package/package.json +5 -22
- package/dist/chunk-M2OJDB7I.cjs.map +0 -1
- package/dist/chunk-ZAQ2EPF5.js.map +0 -1
- package/dist/core.cjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/embed.global.js +0 -32213
- package/dist/embed.global.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -185
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,84 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { IdentityKitConfig, Theme, ThurinIdentity, Attestation, EFPGraph, PGPKeyInfo, ProofResult, EnsHint, ParsedRecord } from './core.js';
|
|
4
|
-
export { ARWEAVE_GATEWAY, AUTHORIZATION_TYPES, AttestAuthorization, AuthorizationAction, CLAIM_CHECK_LABEL, ClaimCheckKind, ClaimCheckText, ClaimFate, EIP712_NAME, EIP712_VERSION, ENS_HINT_KEY, ENS_TEXT_RESOLVER_ABI, EnsHintState, EnsTextReader, FARCASTER_HUB, IDENTITY_ERROR_TEXT, IDENTITY_KINDS, IPFS_GATEWAY, IPFS_GATEWAYS, IdentityErrorKind, IdentityLookupState, KNOWN_KINDS, KnownKind, MAX_RECORD_BYTES, NETWORKS, NFT_AVATAR_ABI, NetworkName, NftAvatar, Notation, PGPVerification, PointerEntry, PointerRecord, Proof, ProofOptions, REGISTRY_ABI, REGISTRY_ADDRESS, ReattestAuthorization, RecordData, RecordReader, RegistryDeployment, RevokeAuthorization, SetRecordAuthorization, StrippedKey, SubkeyInfo, UpdateKeyAuthorization, addPointer, attestTypedData, authorizationDigest, avatarFallbacks, avatarUrl, bytesToFingerprint, chainFor, claimCheckText, claimFateText, claimFates, decodeRecord, displayUrl, encodeRecord, ensHintFor, ensHintValue, ensHintWrite, expiresSoon, expiresSoonText, fetchEFPGraph, fetchEnsHint, fetchRecords, fingerprintHash, fingerprintToBytes, formatClaimDate, getRegistry, hasEmailUserID, identifyProof, identityErrorKind, isNetworkName, keyIdOf, keyIdToBytes, kindName, needsRpcProbe, nftAvatarImage, normalizeFingerprint, parseNftAvatar, parsePgpKey, parsePointer, parseRecord, proofHref, proofSecondaryHref, reattestTypedData, recordKind, registryDomain, renderPointer, revokeTypedData, setRecordTypedData, stripEmailUserIDs, updateKeyTypedData, verifyAttestation, verifyClearsigned, verifyProof } from './core.js';
|
|
1
|
+
export { ARWEAVE_GATEWAY, AUTHORIZATION_TYPES, AttestAuthorization, Attestation, AuthorizationAction, CLAIM_CHECK_LABEL, CLAIM_LIMIT, CONTRACT_ERROR_TEXT, ClaimCheckKind, ClaimCheckText, ClaimFate, ClaimReader, EIP712_NAME, EIP712_VERSION, ENS_HINT_KEY, ENS_TEXT_RESOLVER_ABI, EncryptRefusal, EncryptionKey, EncryptionKeyResult, EnsHint, EnsHintState, EnsTextReader, FARCASTER_HUB, IPFS_GATEWAY, IPFS_GATEWAYS, KNOWN_KINDS, KeyStanding, KnownKind, LeanKey, MAX_KIND_BYTES, MAX_RECORD_BYTES, MarkCompromisedAuthorization, NETWORKS, NFT_AVATAR_ABI, NetworkName, NftAvatar, Notation, OWNER_REVOKE_REASONS, PGPKeyInfo, PGPVerification, ParsedRecord, PgpInput, Proof, ProofOptions, REGISTRY_ABI, REGISTRY_ADDRESS, REVOKE_REASONS, ReattestAuthorization, RecordData, RecordReader, RegistryDeployment, ReleaseEntry, ReleasesRecord, RevokeAuthorization, RevokeReason, SetRecordAuthorization, SshKey, StrippedKey, SubkeyInfo, UpdateKeyAuthorization, addRelease, attestTypedData, authorizationDigest, avatarFallbacks, avatarUrl, bytesToFingerprint, chainFor, checkKindName, checkRecordValue, claimCheckText, claimFateText, claimFates, claimSignature, contractErrorName, contractErrorText, displayUrl, encryptRefusalText, encryptTo, encryptionKeyFor, ensHintFor, ensHintValue, ensHintWrite, expiresSoon, expiresSoonText, fetchEnsHint, fetchRecords, findOwners, fingerprintHash, fingerprintToBytes, formatClaimDate, getRegistry, hasEmailUserID, identifyProof, isNetworkName, keyChangedText, keyIdOf, keyIdToBytes, keyProblemText, keyStanding, kindName, leanKey, markCompromisedTypedData, nftAvatarImage, normalizeFingerprint, pageRecords, parseNftAvatar, parsePgpKey, parseRecord, parseReleases, payloadText, pickRecords, proofHref, proofSecondaryHref, readClaims, reattestTypedData, recordKind, registryDomain, renderReleases, revokeTypedData, sameFingerprint, setRecordTypedData, signatureEmail, sshKeys, statementText, stripEmailUserIDs, updateKeyTypedData, verifyAttestation, verifyClearsigned, verifyProof, verifyStatementSignature } from './core.js';
|
|
5
2
|
import 'viem';
|
|
6
|
-
|
|
7
|
-
interface IdentityKitProviderProps extends IdentityKitConfig {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare function IdentityKitProvider({ children, rpcUrl, neynarApiKey, farcasterHub, baseUrl, network, registryAddress, }: IdentityKitProviderProps): react_jsx_runtime.JSX.Element;
|
|
11
|
-
|
|
12
|
-
interface ThurinCardProps {
|
|
13
|
-
ens?: string;
|
|
14
|
-
address?: string;
|
|
15
|
-
theme?: Theme;
|
|
16
|
-
}
|
|
17
|
-
declare function ThurinCard({ ens, address, theme }: ThurinCardProps): react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
declare function useThurinIdentity(ensOrAddress: string | undefined | null): ThurinIdentity;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* On-chain attestations for an address, read straight from the v2 registry:
|
|
23
|
-
* `attestationsOf` for the history, `getPayload` for each stored signature + key.
|
|
24
|
-
* No event logs, so any RPC works. Each claim is verified off-chain.
|
|
25
|
-
*/
|
|
26
|
-
declare function useAttestations(address: string | undefined | null): {
|
|
27
|
-
claims: Attestation[];
|
|
28
|
-
totalClaims: number;
|
|
29
|
-
activeClaims: number;
|
|
30
|
-
currentFingerprint: string | null;
|
|
31
|
-
isLoading: boolean;
|
|
32
|
-
/** A registry read failed (the RPC may be down; useThurinIdentity finds out which). */
|
|
33
|
-
error: Error | null;
|
|
34
|
-
refetch: () => void;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
declare function useEFPGraph(address: string | undefined | null): {
|
|
38
|
-
efp: EFPGraph | null;
|
|
39
|
-
isLoading: boolean;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Proofs for an identity, read from the PGP key stored in its on-chain
|
|
44
|
-
* attestation. No keyserver is consulted: keys.openpgp.org only serves user
|
|
45
|
-
* IDs whose email is verified and drops non-email user IDs entirely, so it can
|
|
46
|
-
* never carry the published (non-email) identity that holds the notations.
|
|
47
|
-
*
|
|
48
|
-
* @param fingerprint the attested fingerprint (proofs must name it)
|
|
49
|
-
* @param armoredKey the attestation's `pgpPublicKey`
|
|
50
|
-
*/
|
|
51
|
-
declare function usePGPProofs(fingerprint: string | undefined | null, armoredKey: string | undefined | null): {
|
|
52
|
-
keyInfo: PGPKeyInfo | null;
|
|
53
|
-
proofs: ProofResult[];
|
|
54
|
-
isLoading: boolean;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* A name's `id.thurin` record against the fingerprint the registry verifies for its
|
|
59
|
-
* address. `state` is `match`, `unset`, or `mismatch`; the last one is the signal worth
|
|
60
|
-
* showing — a name advertising a key its address has not claimed.
|
|
61
|
-
*/
|
|
62
|
-
declare function useEnsHint(name: string | undefined | null, verifiedFingerprint: string | null | undefined): EnsHint & {
|
|
63
|
-
isLoading: boolean;
|
|
64
|
-
refetch: () => void;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* The records on one claim, for the kinds given (default: the kinds an identity page shows),
|
|
69
|
-
* read in one multicall and parsed. Kinds with no record are left out.
|
|
70
|
-
*/
|
|
71
|
-
declare function useRecords(address: string | undefined | null, index: number | undefined | null, kinds?: readonly string[], armoredKey?: string | null): {
|
|
72
|
-
records: ParsedRecord[];
|
|
73
|
-
isLoading: boolean;
|
|
74
|
-
refetch: () => void;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The avatar to show for a normalized ENS name, or null. Reads the raw `avatar` record and
|
|
79
|
-
* loads only what `avatarUrl` allows (see core/avatar.ts); wagmi's useEnsAvatar would fetch
|
|
80
|
-
* whatever host the name's owner chose.
|
|
81
|
-
*/
|
|
82
|
-
declare function useSafeAvatar(name: string | undefined, chainId: number): string | null;
|
|
83
|
-
|
|
84
|
-
export { Attestation, EFPGraph, EnsHint, IdentityKitConfig, IdentityKitProvider, type IdentityKitProviderProps, PGPKeyInfo, ParsedRecord, ProofResult, Theme, ThurinCard, type ThurinCardProps, ThurinIdentity, useAttestations, useEFPGraph, useEnsHint, usePGPProofs, useRecords, useSafeAvatar, useThurinIdentity };
|