@arkiv-network/sdk 0.8.1 and viem 2.57.4. Works in browsers and Node.js 22+.
createPrivateClient
Options
Namespace for key derivation. Different apps get independent keys. Also the default
project.Sign in with an existing passkey (WebAuthn PRF) instead of a wallet: one biometric or PIN prompt.
Create it first with
WorkerVault.createPasskey(app, opts?). See passkeys.Also find records others wrote to your inbox address. Costs one curve multiplication per record
in the app when listing.
Apps with at most this many records are downloaded whole when reading, so nothing says which are
yours.
0 always fetches batches plus cover batches.Optional
group descriptor and snarkArtifacts. The group project must match the client project.
Uses recoverable group-specific proofs through the normal record API. Requires a build containing
arkognito/semaphore and a relayer configured for that group. See
anonymous group permissions.Value of the
project attribute on this app’s records. Reads and writes are scoped to it.Send every relayer call through this Oblivious HTTP relay. Gateway keys are read from heartbeats.
Keep keys in a Web Worker. If the worker cannot start, the client warns and keeps keys in-process.
Reader used for all Arkiv queries. Pass your own to use a different RPC or a proxy.
Smallest batch a record may land in. Above 1, the relayer holds the record until a batch that
large forms, or fails it.
How long the relayer may hold a record for
minAnonymity.Warn when fewer than this many existing records share a record’s attribute values.
0 disables it."auto" fetches tokens at session start when a relayer requires them, using tokenIdentity.
Semaphore clients skip automatic acquisition and do not redeem a blind token for a membership write.Who asks the issuer for tokens.
"derived": an address derived from the user’s keys for this app,
so asking opens no wallet prompt and the issuer never sees the wallet. "wallet": the wallet signs
each request, for issuers that key quotas to known wallets.When to check that the wallet signs deterministically.
"first-use": twice the first time a
device sees the wallet for this app, then once against a stored fingerprint.Where
"first-use" remembers verified wallets.Where auto mode keeps unspent tokens.
browserTokenStore() keeps them across sessions.Client
createEntity
MyRecord
Returned bymyEntities(): key, entityKey, owner, creator, app, contentType, data
(decrypted), toText(), toJson(), attributes, createdAt, expiresAt, expSeconds,
envelope, ref.
Vaults
Every vault implements
Vault: newRecord(), scopeRecord(name), openTags(tags),
addressOf(ref), signer(ref), encrypt(ref, data), decrypt(ref, data). A signer
(ArkognitoSigner) exposes only address, signEnvelope(body, attributes) and signProof(body).
Related: derivationTypedData(app, chainId?), DERIVATION_PURPOSE ("arkognito key v1"),
scopeRef(name), TAG_BYTES (44).
Verification and proofs
Reading
Tokens
Fingerprinting
Envelopes and attributes
sealEnvelope, parseEnvelope, envelopeSigner, envelopeDigest, padEnvelope,
expiryBucket(seconds), expirySeconds(expires), toBase64, fromBase64; canonicalAttributes,
toWire, fromWire, nameProblem(name), assertNodeSafeNames(attributes). See the
protocol reference for formats.
Oblivious HTTP
Constants
Protocol types are exported too:
SubmitRequest, StatusResponse, InfoResponse,
TokenRedemption, IssueRequest, IssueResponse.
Errors
Semaphore writes stop automatic failover after submission starts.ArkognitoError may expose
txHash, requestId and nullifier for reconciliation; never infer that an error means no write.
The optional module exports MembershipInvalid and VerificationUnavailable. See
Semaphore reference for group, proof, reader and coordinator exports.