index
cifer-sdk API Reference v0.4.1
cifer-sdk API Reference v0.4.1
CIFER SDK - Cryptographic Infrastructure for Encrypted Records.
This SDK provides a complete toolkit for working with the CIFER encryption system, which offers quantum-resistant encryption using ML-KEM-768 key encapsulation and AES-GCM symmetric encryption.
Main Features​
- keyManagement: Secret creation, delegation, and ownership management
- blackbox: Payload and file encryption/decryption via the blackbox API
- commitments: On-chain encrypted data storage and retrieval
- flows: High-level orchestrated operations
Getting Started​
Examples​
import { createCiferSdk, Eip1193SignerAdapter } from 'cifer-sdk';
// Create the SDK instance with auto-discovery
const sdk = await createCiferSdk({
blackboxUrl: 'https://cifer-blackbox.ternoa.dev:3010',
});
// Connect any EIP-1193 wallet
const signer = new Eip1193SignerAdapter(window.ethereum);
// Get chain configuration
const chainId = 752025;
const controllerAddress = sdk.getControllerAddress(chainId);
// Read operations
const fee = await sdk.keyManagement.getSecretCreationFee({
chainId,
controllerAddress,
readClient: sdk.readClient,
});
// Build transactions (execute with your wallet)
const txIntent = sdk.keyManagement.buildCreateSecretTx({
chainId,
controllerAddress,
fee,
});
// Execute with your preferred method
const hash = await wallet.sendTransaction(txIntent);
import { blackbox } from 'cifer-sdk';
// Encrypt a payload
const encrypted = await blackbox.payload.encryptPayload({
chainId: 752025,
secretId: 123n,
plaintext: 'My secret message',
signer,
readClient: sdk.readClient,
blackboxUrl: sdk.blackboxUrl,
});
// Decrypt the payload
const decrypted = await blackbox.payload.decryptPayload({
chainId: 752025,
secretId: 123n,
encryptedMessage: encrypted.encryptedMessage,
cifer: encrypted.cifer,
signer,
readClient: sdk.readClient,
blackboxUrl: sdk.blackboxUrl,
});
console.log(decrypted.decryptedMessage); // 'My secret message'
Namespaces​
Classes​
Eip1193SignerAdapter​
Defined in: internal/adapters/eip1193-signer.ts:37
Signer adapter for EIP-1193 compatible providers
This adapter works with any EIP-1193 provider including:
- MetaMask (window.ethereum)
- WalletConnect
- Coinbase Wallet
- Any wagmi connector
Example​
// Browser with MetaMask
const signer = new Eip1193SignerAdapter(window.ethereum);
// With wagmi
const provider = await connector.getProvider();
const signer = new Eip1193SignerAdapter(provider);
// Usage
const address = await signer.getAddress();
const signature = await signer.signMessage('Hello, CIFER!');
Implements​
Constructors​
Constructor​
new Eip1193SignerAdapter(
provider):Eip1193SignerAdapter
Defined in: internal/adapters/eip1193-signer.ts:46
Create a new EIP-1193 signer adapter
Parameters​
provider​
An EIP-1193 compatible provider
Returns​
Methods​
getAddress()​
getAddress():
Promise<`0x${string}`>
Defined in: internal/adapters/eip1193-signer.ts:59
Get the address of the connected account
Uses eth_accounts to get the currently connected account. Caches the result for subsequent calls.
Returns​
Promise<`0x${string}`>
The checksummed address
Throws​
AuthError if no account is connected
Implementation of​
signMessage()​
signMessage(
message):Promise<`0x${string}`>
Defined in: internal/adapters/eip1193-signer.ts:106
Sign a message using personal_sign (EIP-191)
This is the signing method expected by the blackbox for authentication.
Parameters​
message​
string
The message to sign (raw string, not hashed)
Returns​
Promise<`0x${string}`>
The signature as a hex string
Implementation of​
sendTransaction()​
sendTransaction(
txRequest):Promise<TxExecutionResult>
Defined in: internal/adapters/eip1193-signer.ts:137
Optional: Send a transaction via the provider
This is an opt-in convenience method. Apps can use this to execute TxIntent objects directly, or they can handle transaction submission themselves using their preferred method.
Parameters​
txRequest​
The transaction intent to send
Returns​
Promise<TxExecutionResult>
Transaction hash and wait function
Implementation of​
clearCache()​
clearCache():
void
Defined in: internal/adapters/eip1193-signer.ts:235
Clear the cached address
Call this when the user disconnects or switches accounts.
Returns​
void
PrivateKeySignerAdapter​
Defined in: internal/adapters/private-key-signer.ts:40
Signer adapter backed by a raw secp256k1 private key.
This adapter performs EIP-191 personal_sign using the provided key,
making it ideal for Web2 session signing where there is no browser
wallet. It can also be used for server-side / backend signing.
Remarks​
The private key is stored in memory. Users are responsible for securing it (e.g. never persisting to disk unencrypted).
This adapter uses the @noble/secp256k1 and @noble/hashes
libraries for cryptographic operations.
Example​
import { PrivateKeySignerAdapter } from 'cifer-sdk';
// From an existing hex private key
const signer = new PrivateKeySignerAdapter('0xabc123...');
// Generate a fresh random keypair
const signer = PrivateKeySignerAdapter.generate();
const address = await signer.getAddress();
const signature = await signer.signMessage('Hello');
Implements​
Constructors​
Constructor​
new PrivateKeySignerAdapter(
privateKeyHex):PrivateKeySignerAdapter
Defined in: internal/adapters/private-key-signer.ts:49
Create a new private-key signer from a hex-encoded private key.
Parameters​
privateKeyHex​
string
The private key as a hex string (with or without 0x prefix)
Returns​
Methods​
generate()​
staticgenerate():PrivateKeySignerAdapter
Defined in: internal/adapters/private-key-signer.ts:70
Generate a fresh random private-key signer.
Uses crypto.getRandomValues for secure key generation.
Returns​
A new PrivateKeySignerAdapter with a random private key
getPrivateKeyHex()​
getPrivateKeyHex():
string
Defined in: internal/adapters/private-key-signer.ts:84
Get the hex-encoded private key (without 0x prefix).
Returns​
string
The private key as a hex string (no 0x prefix)
Remarks​
Use with caution. This exposes the raw private key.
getAddress()​
getAddress():
Promise<`0x${string}`>
Defined in: internal/adapters/private-key-signer.ts:93
Get the Ethereum address derived from this private key.
Returns​
Promise<`0x${string}`>
The checksummed Ethereum address
Implementation of​
signMessage()​
signMessage(
message):Promise<`0x${string}`>
Defined in: internal/adapters/private-key-signer.ts:129
Sign a message using EIP-191 personal_sign semantics.
Parameters​
message​
string
The raw message string to sign (NOT hashed or prefixed)
Returns​
Promise<`0x${string}`>
The signature as a hex string
Implementation of​
RpcReadClient​
Defined in: internal/adapters/rpc-read-client.ts:62
RPC read client for making blockchain queries
This client makes standard JSON-RPC calls to Ethereum-compatible nodes. It supports multiple chains by mapping chain IDs to RPC URLs.
Example​
const readClient = new RpcReadClient({
rpcUrlByChainId: {
752025: 'https://mainnet.ternoa.network',
11155111: 'https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY',
},
});
const blockNumber = await readClient.getBlockNumber(752025);
const logs = await readClient.getLogs(752025, {
address: '0x...',
fromBlock: 1000,
toBlock: 'latest',
});
Implements​
Constructors​
Constructor​
new RpcReadClient(
config):RpcReadClient
Defined in: internal/adapters/rpc-read-client.ts:72
Create a new RPC read client
Parameters​
config​
Configuration with RPC URLs per chain
Returns​
Methods​
setRpcUrl()​
setRpcUrl(
chainId,rpcUrl):void
Defined in: internal/adapters/rpc-read-client.ts:83
Add or update an RPC URL for a chain
Parameters​
chainId​
number
The chain ID
rpcUrl​
string
The RPC URL
Returns​
void
getBlockNumber()​
getBlockNumber(
chainId):Promise<number>
Defined in: internal/adapters/rpc-read-client.ts:97
Get the current block number for a chain.
For Web2 mode (chainId === WEB2_CHAIN_ID), returns Date.now()
(unix milliseconds) instead of making an RPC call — this is the
timestamp-based freshness value the blackbox expects.
Parameters​
chainId​
number
The chain ID
Returns​
Promise<number>
The current block number (or timestamp for Web2)
Implementation of​
getLogs()​
getLogs(
chainId,filter):Promise<Log[]>
Defined in: internal/adapters/rpc-read-client.ts:112
Get logs matching a filter
Parameters​
chainId​
number
The chain ID
filter​
The log filter
Returns​
Promise<Log[]>
Array of matching logs
Implementation of​
call()​
call(
chainId,callRequest):Promise<`0x${string}`>
Defined in: internal/adapters/rpc-read-client.ts:159
Make an eth_call to read contract state
Parameters​
chainId​
number
The chain ID
callRequest​
The call request
Returns​
Promise<`0x${string}`>
The return data as a hex string
Implementation of​
CiferError​
Defined in: internal/errors/index.ts:44
Base error class for all CIFER SDK errors.
Remarks​
All SDK errors extend this class. Use isCiferError to check if an unknown error is a CIFER SDK error.
Extends​
Error
Extended by​
Constructors​
Constructor​
new CiferError(
message,code,cause?):CiferError
Defined in: internal/errors/index.ts:69
Create a new CIFER error.
Parameters​
message​
string
Human-readable error message
code​
string
Error code for programmatic handling
cause?​
Error
Original error that caused this error
Returns​
Overrides​
Error.constructor
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
ConfigError​
Defined in: internal/errors/index.ts:94
Error thrown when SDK configuration is invalid or missing.
Extends​
Extended by​
Constructors​
Constructor​
new ConfigError(
message,cause?):ConfigError
Defined in: internal/errors/index.ts:99
Parameters​
message​
string
Description of the configuration problem
cause?​
Error
Original error if this wraps another error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
DiscoveryError​
Defined in: internal/errors/index.ts:114
Error thrown when discovery fails.
Remarks​
This error is thrown when the SDK cannot fetch configuration from
the blackbox /healthz endpoint.
Extends​
Constructors​
Constructor​
new DiscoveryError(
message,blackboxUrl,cause?):DiscoveryError
Defined in: internal/errors/index.ts:123
Parameters​
message​
string
Description of the discovery failure
blackboxUrl​
string
The URL that was attempted
cause?​
Error
Original network or parsing error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
blackboxUrl​
readonlyblackboxUrl:string
Defined in: internal/errors/index.ts:116
The blackbox URL that failed
ChainNotSupportedError​
Defined in: internal/errors/index.ts:135
Error thrown when a chain is not supported or not configured.
Extends​
Constructors​
Constructor​
new ChainNotSupportedError(
chainId,cause?):ChainNotSupportedError
Defined in: internal/errors/index.ts:143
Parameters​
chainId​
number
The unsupported chain ID
cause?​
Error
Original error if this wraps another error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
chainId​
readonlychainId:number
Defined in: internal/errors/index.ts:137
The chain ID that is not supported
AuthError​
Defined in: internal/errors/index.ts:159
Error thrown when authentication or signing fails.
Extends​
Extended by​
Constructors​
Constructor​
new AuthError(
message,cause?):AuthError
Defined in: internal/errors/index.ts:164
Parameters​
message​
string
Description of the authentication failure
cause?​
Error
Original signing or wallet error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
SignatureError​
Defined in: internal/errors/index.ts:175
Error thrown when signature verification fails.
Extends​
Constructors​
Constructor​
new SignatureError(
message,cause?):SignatureError
Defined in: internal/errors/index.ts:180
Parameters​
message​
string
Description of the signature problem
cause?​
Error
Original verification error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
BlockStaleError​
Defined in: internal/errors/index.ts:197
Error thrown when block number is stale (outside the freshness window).
Remarks​
The blackbox requires signatures to include a recent block number to prevent replay attacks. If the block is too old, this error is thrown.
The SDK automatically retries with a fresh block number (up to 3 times).
Extends​
Constructors​
Constructor​
new BlockStaleError(
blockNumber,currentBlock,maxWindow,cause?):BlockStaleError
Defined in: internal/errors/index.ts:211
Parameters​
blockNumber​
number
The stale block number that was used
currentBlock​
number
The current block number on-chain
maxWindow​
number
Maximum allowed block difference
cause?​
Error
Original error from the server
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
blockNumber​
readonlyblockNumber:number
Defined in: internal/errors/index.ts:199
The block number that was used in the signature
currentBlock​
readonlycurrentBlock:number
Defined in: internal/errors/index.ts:201
The current block number on-chain when the error occurred
maxWindow​
readonlymaxWindow:number
Defined in: internal/errors/index.ts:203
The maximum allowed difference (typically ~100 blocks / 10 minutes)
SignerMismatchError​
Defined in: internal/errors/index.ts:233
Error thrown when signer address doesn't match expected.
Extends​
Constructors​
Constructor​
new SignerMismatchError(
expected,actual,cause?):SignerMismatchError
Defined in: internal/errors/index.ts:244
Parameters​
expected​
string
Expected signer address
actual​
string
Actual signer address recovered from signature
cause?​
Error
Original verification error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
expected​
readonlyexpected:string
Defined in: internal/errors/index.ts:235
The expected signer address
actual​
readonlyactual:string
Defined in: internal/errors/index.ts:237
The actual signer address
BlackboxError​
Defined in: internal/errors/index.ts:261
Error thrown when a blackbox API call fails.
Extends​
Extended by​
Constructors​
Constructor​
new BlackboxError(
message,options?):BlackboxError
Defined in: internal/errors/index.ts:271
Parameters​
message​
string
Error message from the server or description
options?​
Additional error details
statusCode?​
number
endpoint?​
string
cause?​
Error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
statusCode?​
readonlyoptionalstatusCode:number
Defined in: internal/errors/index.ts:263
HTTP status code (if applicable)
endpoint?​
readonlyoptionalendpoint:string
Defined in: internal/errors/index.ts:265
The endpoint that failed (e.g., '/encrypt-payload')
EncryptionError​
Defined in: internal/errors/index.ts:287
Error thrown when encryption fails.
Extends​
Constructors​
Constructor​
new EncryptionError(
message,cause?):EncryptionError
Defined in: internal/errors/index.ts:292
Parameters​
message​
string
Description of the encryption failure
cause?​
Error
Original error from the blackbox
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
statusCode?​
readonlyoptionalstatusCode:number
Defined in: internal/errors/index.ts:263
HTTP status code (if applicable)
Inherited from​
endpoint?​
readonlyoptionalendpoint:string
Defined in: internal/errors/index.ts:265
The endpoint that failed (e.g., '/encrypt-payload')
Inherited from​
DecryptionError​
Defined in: internal/errors/index.ts:303
Error thrown when decryption fails.
Extends​
Constructors​
Constructor​
new DecryptionError(
message,cause?):DecryptionError
Defined in: internal/errors/index.ts:308
Parameters​
message​
string
Description of the decryption failure
cause?​
Error
Original error from the blackbox
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
statusCode?​
readonlyoptionalstatusCode:number
Defined in: internal/errors/index.ts:263
HTTP status code (if applicable)
Inherited from​
endpoint?​
readonlyoptionalendpoint:string
Defined in: internal/errors/index.ts:265
The endpoint that failed (e.g., '/encrypt-payload')
Inherited from​
JobError​
Defined in: internal/errors/index.ts:319
Error thrown when a job operation fails.
Extends​
Constructors​
Constructor​
new JobError(
message,jobId,cause?):JobError
Defined in: internal/errors/index.ts:328
Parameters​
message​
string
Description of the job failure
jobId​
string
The ID of the failed job
cause?​
Error
Original error from the blackbox
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
statusCode?​
readonlyoptionalstatusCode:number
Defined in: internal/errors/index.ts:263
HTTP status code (if applicable)
Inherited from​
endpoint?​
readonlyoptionalendpoint:string
Defined in: internal/errors/index.ts:265
The endpoint that failed (e.g., '/encrypt-payload')
Inherited from​
jobId​
readonlyjobId:string
Defined in: internal/errors/index.ts:321
The job ID that failed
SecretNotReadyError​
Defined in: internal/errors/index.ts:345
Error thrown when a secret is not ready (still syncing).
Remarks​
After creating a secret, it takes some time for the enclave cluster to generate and sync the key material. During this time, the secret cannot be used for encryption or decryption.
Extends​
Constructors​
Constructor​
new SecretNotReadyError(
secretId,cause?):SecretNotReadyError
Defined in: internal/errors/index.ts:353
Parameters​
secretId​
bigint
The ID of the secret that is still syncing
cause?​
Error
Original error from the server
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
statusCode?​
readonlyoptionalstatusCode:number
Defined in: internal/errors/index.ts:263
HTTP status code (if applicable)
Inherited from​
endpoint?​
readonlyoptionalendpoint:string
Defined in: internal/errors/index.ts:265
The endpoint that failed (e.g., '/encrypt-payload')
Inherited from​
secretId​
readonlysecretId:bigint
Defined in: internal/errors/index.ts:347
The secret ID that is not ready
KeyManagementError​
Defined in: internal/errors/index.ts:369
Error thrown when a key management operation fails.
Extends​
Extended by​
Constructors​
Constructor​
new KeyManagementError(
message,cause?):KeyManagementError
Defined in: internal/errors/index.ts:374
Parameters​
message​
string
Description of the operation failure
cause?​
Error
Original RPC or contract error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
SecretNotFoundError​
Defined in: internal/errors/index.ts:385
Error thrown when a secret is not found.
Extends​
Constructors​
Constructor​
new SecretNotFoundError(
secretId,cause?):SecretNotFoundError
Defined in: internal/errors/index.ts:393
Parameters​
secretId​
bigint
The ID that was not found
cause?​
Error
Original contract error
Returns​
Overrides​
KeyManagementError.constructor
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
secretId​
readonlysecretId:bigint
Defined in: internal/errors/index.ts:387
The secret ID that was not found
NotAuthorizedError​
Defined in: internal/errors/index.ts:405
Error thrown when caller is not authorized for a secret operation.
Extends​
Constructors​
Constructor​
new NotAuthorizedError(
secretId,caller,cause?):NotAuthorizedError
Defined in: internal/errors/index.ts:416
Parameters​
secretId​
bigint
The secret ID
caller​
string
The address that tried to perform the operation
cause?​
Error
Original contract error
Returns​
Overrides​
KeyManagementError.constructor
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
secretId​
readonlysecretId:bigint
Defined in: internal/errors/index.ts:407
The secret ID
caller​
readonlycaller:string
Defined in: internal/errors/index.ts:409
The caller address that is not authorized
CommitmentsError​
Defined in: internal/errors/index.ts:433
Error thrown when a commitment operation fails.
Extends​
Extended by​
Constructors​
Constructor​
new CommitmentsError(
message,cause?):CommitmentsError
Defined in: internal/errors/index.ts:438
Parameters​
message​
string
Description of the operation failure
cause?​
Error
Original RPC or contract error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
CommitmentNotFoundError​
Defined in: internal/errors/index.ts:449
Error thrown when commitment data is not found.
Extends​
Constructors​
Constructor​
new CommitmentNotFoundError(
dataId,cause?):CommitmentNotFoundError
Defined in: internal/errors/index.ts:457
Parameters​
dataId​
string
The data ID (bytes32) that was not found
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
dataId​
readonlydataId:string
Defined in: internal/errors/index.ts:451
The data ID that was not found
IntegrityError​
Defined in: internal/errors/index.ts:474
Error thrown when commitment integrity check fails.
Remarks​
This indicates that the data retrieved from logs does not match the hashes stored on-chain. This could indicate data corruption or tampering.
Extends​
Constructors​
Constructor​
new IntegrityError(
field,expectedHash,actualHash,cause?):IntegrityError
Defined in: internal/errors/index.ts:488
Parameters​
field​
The field that failed integrity check
"cifer" | "encryptedMessage"
expectedHash​
string
Hash from on-chain metadata
actualHash​
string
Hash computed from retrieved data
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
field​
readonlyfield:"cifer"|"encryptedMessage"
Defined in: internal/errors/index.ts:476
Which field failed verification ('cifer' or 'encryptedMessage')
expectedHash​
readonlyexpectedHash:string
Defined in: internal/errors/index.ts:478
Expected hash from on-chain metadata
actualHash​
readonlyactualHash:string
Defined in: internal/errors/index.ts:480
Actual hash computed from retrieved data
InvalidCiferSizeError​
Defined in: internal/errors/index.ts:513
Error thrown when cifer size is invalid.
Remarks​
The CIFER envelope must be exactly 1104 bytes (ML-KEM-768 ciphertext + AES-GCM tag).
Extends​
Constructors​
Constructor​
new InvalidCiferSizeError(
actualSize,expectedSize,cause?):InvalidCiferSizeError
Defined in: internal/errors/index.ts:524
Parameters​
actualSize​
number
Actual size of the cifer data
expectedSize​
number
Expected size (1104 bytes)
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
actualSize​
readonlyactualSize:number
Defined in: internal/errors/index.ts:515
The actual size in bytes
expectedSize​
readonlyexpectedSize:number
Defined in: internal/errors/index.ts:517
The expected size in bytes (1104)
PayloadTooLargeError​
Defined in: internal/errors/index.ts:543
Error thrown when encrypted message is too large.
Remarks​
The maximum payload size is 16KB (16384 bytes) for on-chain commitments.
Extends​
Constructors​
Constructor​
new PayloadTooLargeError(
actualSize,maxSize,cause?):PayloadTooLargeError
Defined in: internal/errors/index.ts:554
Parameters​
actualSize​
number
Actual size of the encrypted message
maxSize​
number
Maximum allowed size
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
actualSize​
readonlyactualSize:number
Defined in: internal/errors/index.ts:545
The actual size in bytes
maxSize​
readonlymaxSize:number
Defined in: internal/errors/index.ts:547
The maximum allowed size in bytes (16384)
FlowError​
Defined in: internal/errors/index.ts:574
Error thrown when a flow operation fails.
Extends​
Extended by​
Constructors​
Constructor​
new FlowError(
message,flowName,stepName?,cause?):FlowError
Defined in: internal/errors/index.ts:586
Parameters​
message​
string
Description of the failure
flowName​
string
Name of the flow that failed
stepName?​
string
Name of the step that failed (optional)
cause?​
Error
Original error from the failed step
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
flowName​
readonlyflowName:string
Defined in: internal/errors/index.ts:576
The flow that failed (e.g., 'createSecretAndWaitReady')
stepName?​
readonlyoptionalstepName:string
Defined in: internal/errors/index.ts:578
The step that failed (if applicable)
FlowAbortedError​
Defined in: internal/errors/index.ts:608
Error thrown when a flow is aborted.
Remarks​
Flows can be aborted by passing an AbortSignal to the flow context.
When the signal is aborted, this error is thrown.
Extends​
Constructors​
Constructor​
new FlowAbortedError(
flowName,stepName?,cause?):FlowAbortedError
Defined in: internal/errors/index.ts:614
Parameters​
flowName​
string
Name of the aborted flow
stepName?​
string
Step where abort was detected (optional)
cause?​
Error
Original abort error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
flowName​
readonlyflowName:string
Defined in: internal/errors/index.ts:576
The flow that failed (e.g., 'createSecretAndWaitReady')
Inherited from​
stepName?​
readonlyoptionalstepName:string
Defined in: internal/errors/index.ts:578
The step that failed (if applicable)
Inherited from​
FlowTimeoutError​
Defined in: internal/errors/index.ts:625
Error thrown when a flow times out.
Extends​
Constructors​
Constructor​
new FlowTimeoutError(
flowName,timeoutMs,stepName?,cause?):FlowTimeoutError
Defined in: internal/errors/index.ts:635
Parameters​
flowName​
string
Name of the flow that timed out
timeoutMs​
number
Timeout duration in milliseconds
stepName?​
string
Step where timeout occurred (optional)
cause?​
Error
Original timeout error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
flowName​
readonlyflowName:string
Defined in: internal/errors/index.ts:576
The flow that failed (e.g., 'createSecretAndWaitReady')
Inherited from​
stepName?​
readonlyoptionalstepName:string
Defined in: internal/errors/index.ts:578
The step that failed (if applicable)
Inherited from​
timeoutMs​
readonlytimeoutMs:number
Defined in: internal/errors/index.ts:627
Timeout in milliseconds
Web2Error​
Defined in: internal/errors/index.ts:661
Base error class for Web2-specific errors.
Extends​
Extended by​
Constructors​
Constructor​
new Web2Error(
message,cause?):Web2Error
Defined in: internal/errors/index.ts:666
Parameters​
message​
string
Description of the Web2 error
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
Web2SessionError​
Defined in: internal/errors/index.ts:683
Error thrown when a Web2 session is expired, missing, or cannot be renewed.
Remarks​
This error is thrown when:
- A managed session has expired and renewal failed
- An existing-key session has expired (cannot be renewed without Ed25519)
- The server reports "no active session"
Extends​
Constructors​
Constructor​
new Web2SessionError(
message,cause?):Web2SessionError
Defined in: internal/errors/index.ts:688
Parameters​
message​
string
Description of the session error
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
Web2AuthError​
Defined in: internal/errors/index.ts:706
Error thrown when a Web2 authentication operation fails.
Remarks​
This error is thrown for failures in:
- Registration (email/password validation)
- Email verification (invalid/expired OTP)
- Key registration (Ed25519 signature invalid, password wrong)
- Password reset flows
Extends​
Constructors​
Constructor​
new Web2AuthError(
message,cause?):Web2AuthError
Defined in: internal/errors/index.ts:711
Parameters​
message​
string
Description of the auth error
cause?​
Error
Original error
Returns​
Overrides​
Properties​
code​
readonlycode:string
Defined in: internal/errors/index.ts:57
Error code for programmatic handling.
Remarks​
Possible codes:
CONFIG_ERROR- Configuration or discovery errorsAUTH_ERROR- Authentication and signing errorsBLACKBOX_ERROR- Blackbox API errorsKEY_MANAGEMENT_ERROR- SecretsController errorsCOMMITMENTS_ERROR- On-chain commitment errorsFLOW_ERROR- Flow execution errors
Inherited from​
cause?​
readonlyoptionalcause:Error
Defined in: internal/errors/index.ts:60
Original error that caused this error (for error chaining)
Inherited from​
Interfaces​
CiferSdk​
Defined in: index.ts:241
CIFER SDK instance.
Provides access to all SDK functionality through organized namespaces and helper methods for chain configuration.
Remarks​
Create an instance using createCiferSdk (async with discovery) or createCiferSdkSync (sync without discovery).
Properties​
keyManagement​
readonlykeyManagement:keyManagement
Defined in: index.ts:249
Key management operations (SecretsController).
Remarks​
Provides functions for reading secret state, building transaction intents, and parsing events.
blackbox​
readonlyblackbox:blackbox
Defined in: index.ts:257
Blackbox API operations (encryption/decryption).
Remarks​
Provides namespaces for payload, file, and job operations.
commitments​
readonlycommitments:commitments
Defined in: index.ts:266
On-chain commitment operations.
Remarks​
Provides functions for reading, storing, and verifying encrypted commitments on-chain.
flows​
readonlyflows:flows
Defined in: index.ts:275
High-level orchestrated flows.
Remarks​
Provides complete workflows for common operations like creating secrets, encrypting data, and decrypting from logs.
blackboxUrl​
readonlyblackboxUrl:string
Defined in: index.ts:280
The configured blackbox URL.
discovery​
readonlydiscovery:DiscoveryResult|null
Defined in: index.ts:285
The discovery result (null if discovery was not performed).
signer?​
readonlyoptionalsigner:SignerAdapter
Defined in: index.ts:290
The default signer (if configured).
readClient​
readonlyreadClient:ReadClient
Defined in: index.ts:295
The default read client.
Methods​
getControllerAddress()​
getControllerAddress(
chainId):`0x${string}`
Defined in: index.ts:304
Get the SecretsController address for a chain.
Parameters​
chainId​
number
The chain ID
Returns​
`0x${string}`
The SecretsController contract address
Throws​
ConfigError When no address is configured for the chain
getRpcUrl()​
getRpcUrl(
chainId):string
Defined in: index.ts:313
Get the RPC URL for a chain.
Parameters​
chainId​
number
The chain ID
Returns​
string
The RPC URL
Throws​
ConfigError When no RPC URL is configured for the chain
getSupportedChainIds()​
getSupportedChainIds():
number[]
Defined in: index.ts:320
Get supported chain IDs.
Returns​
number[]
Array of supported chain IDs
refreshDiscovery()​
refreshDiscovery():
Promise<void>
Defined in: index.ts:331
Refresh discovery (re-fetch /healthz).
Returns​
Promise<void>
Remarks​
Call this to update chain configuration after changes on the server.
Throws​
ConfigError When called on an SDK created without blackboxUrl
Throws​
DiscoveryError When the discovery request fails
SignerAdapter​
Defined in: types/adapters.ts:57
Minimal signer adapter interface for wallet abstraction.
This interface abstracts away the wallet implementation, allowing the SDK to work with any EIP-1193 compatible wallet (MetaMask, WalletConnect, etc.) as well as server-side signers.
Remarks​
The SDK provides a built-in Eip1193SignerAdapter that implements this interface for standard EIP-1193 providers.
Examples​
import { Eip1193SignerAdapter } from 'cifer-sdk/adapters';
const signer = new Eip1193SignerAdapter(window.ethereum);
const address = await signer.getAddress();
const signature = await signer.signMessage('Hello, CIFER!');
const customSigner: SignerAdapter = {
async getAddress() {
return myWallet.address;
},
async signMessage(message) {
return myWallet.personalSign(message);
},
};
Methods​
getAddress()​
getAddress():
Promise<`0x${string}`>
Defined in: types/adapters.ts:65
Get the address of the signer.
Returns​
Promise<`0x${string}`>
A promise resolving to the checksummed Ethereum address
Throws​
AuthError When the wallet is not connected or no accounts are available
signMessage()​
signMessage(
message):Promise<`0x${string}`>
Defined in: types/adapters.ts:82
Sign a message using EIP-191 personal_sign semantics.
Parameters​
message​
string
The raw message string to sign (NOT hashed or prefixed)
Returns​
Promise<`0x${string}`>
A promise resolving to the signature as a hex string
Remarks​
This is used for blackbox authentication where the server expects
signatures that can be verified with standard ecrecover after
applying the EIP-191 prefix.
The message should NOT be pre-hashed or prefixed by the caller.
Throws​
AuthError When signing fails or is rejected by the user
sendTransaction()?​
optionalsendTransaction(txRequest):Promise<TxExecutionResult>
Defined in: types/adapters.ts:99
Optional: Send a transaction.
Parameters​
txRequest​
The transaction intent to send
Returns​
Promise<TxExecutionResult>
A promise resolving to the transaction hash and a wait function
Remarks​
This is an opt-in convenience method. Core SDK flows work without it by returning TxIntent objects that the app broadcasts themselves.
Implementing this allows the SDK's flow execution mode to submit transactions directly.
Throws​
AuthError When the transaction fails to submit
CallRequest​
Defined in: types/adapters.ts:107
Call request for making eth_call.
Properties​
to​
to:
`0x${string}`
Defined in: types/adapters.ts:109
Contract address to call
data​
data:
`0x${string}`
Defined in: types/adapters.ts:111
Encoded calldata
blockTag?​
optionalblockTag:number|"pending"|"latest"
Defined in: types/adapters.ts:113
Block tag or number (default: 'latest')
ReadClient​
Defined in: types/adapters.ts:142
Minimal read client interface for RPC abstraction.
This interface abstracts away the RPC implementation, allowing the SDK to work with any RPC provider or custom implementations.
Remarks​
The SDK provides a built-in RpcReadClient that implements this interface using standard JSON-RPC calls.
Example​
import { RpcReadClient } from 'cifer-sdk/adapters';
const readClient = new RpcReadClient({
rpcUrlByChainId: {
752025: 'https://mainnet.ternoa.network',
11155111: 'https://eth-sepolia.g.alchemy.com/v2/...',
},
});
const blockNumber = await readClient.getBlockNumber(752025);
Methods​
getBlockNumber()​
getBlockNumber(
chainId):Promise<number>
Defined in: types/adapters.ts:151
Get the current block number for a chain.
Parameters​
chainId​
number
The chain ID to query
Returns​
Promise<number>
A promise resolving to the current block number
Throws​
AuthError When the RPC call fails
getLogs()​
getLogs(
chainId,filter):Promise<Log[]>
Defined in: types/adapters.ts:162
Get logs matching a filter.
Parameters​
chainId​
number
The chain ID to query
filter​
The log filter criteria
Returns​
Promise<Log[]>
A promise resolving to an array of matching logs
Throws​
CommitmentsError When the RPC call fails
call()?​
optionalcall(chainId,callRequest):Promise<`0x${string}`>
Defined in: types/adapters.ts:178
Optional: Make an eth_call for reading contract state.
Parameters​
chainId​
number
The chain ID to query
callRequest​
The call request with target address and calldata
Returns​
Promise<`0x${string}`>
A promise resolving to the return data as a hex string
Remarks​
Used for reading contract state. If not provided, operations that require contract reads will fail with an error indicating the method is not available.
Throws​
KeyManagementError or CommitmentsError When the call fails
Eip1193Provider​
Defined in: types/adapters.ts:192
EIP-1193 provider interface (minimal subset).
Remarks​
This is the standard interface for Ethereum providers as specified in EIP-1193. Most wallets (MetaMask, WalletConnect, Coinbase Wallet, etc.) implement this.
See​
Methods​
request()​
request(
args):Promise<unknown>
Defined in: types/adapters.ts:199
Make a JSON-RPC request.
Parameters​
args​
The request arguments including method and params
method​
string
params?​
unknown[]
Returns​
Promise<unknown>
A promise resolving to the response
RpcReadClientConfig​
Defined in: types/adapters.ts:210
Configuration for the RpcReadClient.
Properties​
rpcUrlByChainId​
rpcUrlByChainId:
Record<ChainId,string>
Defined in: types/adapters.ts:222
Map of chain IDs to RPC URLs.
Example​
{
752025: 'https://mainnet.ternoa.network',
11155111: 'https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY',
}
fetch()?​
optionalfetch: (input,init?) =>Promise<Response>
Defined in: types/adapters.ts:230
Optional: Custom fetch implementation.
Parameters​
input​
RequestInfo | URL
init?​
RequestInit
Returns​
Promise<Response>
Remarks​
Useful for testing or environments without native fetch.
Log​
Defined in: types/common.ts:151
Represents an EVM log entry from a transaction receipt.
Remarks​
Logs are used to retrieve encrypted commitment data that is emitted in events rather than stored directly in contract storage.
Properties​
address​
address:
`0x${string}`
Defined in: types/common.ts:153
Contract address that emitted the log
topics​
topics:
`0x${string}`[]
Defined in: types/common.ts:155
Array of indexed topics (topic[0] is the event signature)
data​
data:
`0x${string}`
Defined in: types/common.ts:157
Non-indexed data (ABI-encoded)
blockNumber​
blockNumber:
number
Defined in: types/common.ts:159
Block number where log was emitted
transactionHash​
transactionHash:
`0x${string}`
Defined in: types/common.ts:161
Transaction hash
logIndex​
logIndex:
number
Defined in: types/common.ts:163
Log index within the block
transactionIndex​
transactionIndex:
number
Defined in: types/common.ts:165
Transaction index within the block
LogFilter​
Defined in: types/common.ts:176
Filter for querying logs via eth_getLogs.
Remarks​
Used with ReadClient.getLogs to retrieve event logs from the blockchain.
Properties​
address?​
optionaladdress:`0x${string}`
Defined in: types/common.ts:178
Contract address to filter by
topics?​
optionaltopics: (`0x${string}`|null)[]
Defined in: types/common.ts:180
Topics to filter by (null for wildcard at that position)
fromBlock?​
optionalfromBlock:number|"latest"
Defined in: types/common.ts:182
Start block (inclusive)
toBlock?​
optionaltoBlock:number|"latest"
Defined in: types/common.ts:184
End block (inclusive)
TransactionReceipt​
Defined in: types/common.ts:192
Transaction receipt returned after a transaction is mined.
Properties​
transactionHash​
transactionHash:
`0x${string}`
Defined in: types/common.ts:194
Transaction hash
blockNumber​
blockNumber:
number
Defined in: types/common.ts:196
Block number where transaction was included
contractAddress?​
optionalcontractAddress:`0x${string}`
Defined in: types/common.ts:198
Contract address if this was a contract creation
status​
status:
0|1
Defined in: types/common.ts:200
Status (1 = success, 0 = failure/revert)
gasUsed​
gasUsed:
bigint
Defined in: types/common.ts:202
Gas used by this transaction
logs​
logs:
Log[]
Defined in: types/common.ts:204
Logs emitted by this transaction
SecretState​
Defined in: types/common.ts:221
Secret state as stored on-chain in the SecretsController contract.
Remarks​
This represents the complete state of a secret including ownership, delegation, synchronization status, and the public key location.
A secret is ready for use when:
isSyncingisfalsepublicKeyCidis non-emptysecretTypeis1(standard encryption)
Properties​
owner​
owner:
`0x${string}`
Defined in: types/common.ts:223
Owner address of the secret (can transfer, set delegate, decrypt)
delegate​
delegate:
`0x${string}`
Defined in: types/common.ts:225
Delegate address (can decrypt on owner's behalf, zero address if none)
isSyncing​
isSyncing:
boolean
Defined in: types/common.ts:227
Whether the secret is still syncing (not ready for use)
clusterId​
clusterId:
number
Defined in: types/common.ts:229
Cluster ID where the secret's private key shards are stored
secretType​
secretType:
number
Defined in: types/common.ts:231
Secret type (1 = standard ML-KEM-768 encryption)
publicKeyCid​
publicKeyCid:
string
Defined in: types/common.ts:233
IPFS CID of the public key (empty string if still syncing)
CIFERMetadata​
Defined in: types/common.ts:246
CIFER metadata stored on-chain for encrypted commitments.
Remarks​
This metadata is stored in contract storage and used to:
- Locate the block where encrypted data was emitted
- Verify integrity of retrieved data via hash comparison
Properties​
secretId​
secretId:
bigint
Defined in: types/common.ts:248
Secret ID used for encryption
storedAtBlock​
storedAtBlock:
number
Defined in: types/common.ts:250
Block number when data was stored/updated
ciferHash​
ciferHash:
`0x${string}`
Defined in: types/common.ts:252
keccak256 hash of the cifer bytes
encryptedMessageHash​
encryptedMessageHash:
`0x${string}`
Defined in: types/common.ts:254
keccak256 hash of the encrypted message bytes
CommitmentData​
Defined in: types/common.ts:266
Encrypted commitment data retrieved from event logs.
Remarks​
This data is emitted in CIFERDataStored or CIFERDataUpdated events
and must be retrieved from logs to decrypt the content.
Properties​
cifer​
cifer:
`0x${string}`
Defined in: types/common.ts:268
The CIFER envelope bytes (exactly 1104 bytes: ML-KEM ciphertext + AES-GCM tag)
encryptedMessage​
encryptedMessage:
`0x${string}`
Defined in: types/common.ts:270
The AES-GCM encrypted message bytes (variable length, max 16KB)
ciferHash​
ciferHash:
`0x${string}`
Defined in: types/common.ts:272
keccak256(cifer) - for integrity verification
encryptedMessageHash​
encryptedMessageHash:
`0x${string}`
Defined in: types/common.ts:274
keccak256(encryptedMessage) - for integrity verification
JobInfo​
Defined in: types/common.ts:286
Job information returned by the blackbox.
Remarks​
File encryption and decryption operations are asynchronous. This interface represents the state of a job at any point in its lifecycle.
Properties​
id​
id:
string
Defined in: types/common.ts:288
Unique job identifier (UUID)
type​
type:
JobType
Defined in: types/common.ts:290
Type of job (encrypt or decrypt)
status​
status:
JobStatus
Defined in: types/common.ts:292
Current status
progress​
progress:
number
Defined in: types/common.ts:294
Progress percentage (0-100)
secretId​
secretId:
number
Defined in: types/common.ts:296
Secret ID used for this job
chainId​
chainId:
number
Defined in: types/common.ts:298
Chain ID
createdAt​
createdAt:
number
Defined in: types/common.ts:300
Unix timestamp (ms) when job was created
completedAt?​
optionalcompletedAt:number
Defined in: types/common.ts:302
Unix timestamp (ms) when job completed (if completed)
expiredAt?​
optionalexpiredAt:number
Defined in: types/common.ts:304
Unix timestamp (ms) when job will expire
error?​
optionalerror:string
Defined in: types/common.ts:306
Error message if job failed
resultFileName?​
optionalresultFileName:string
Defined in: types/common.ts:308
Result filename for download
ttl​
ttl:
number
Defined in: types/common.ts:310
Time-to-live in milliseconds
originalSize?​
optionaloriginalSize:number
Defined in: types/common.ts:312
Original file size in bytes
signerPrincipalId?​
optionalsignerPrincipalId:string|null
Defined in: types/common.ts:314
Web2 principalId of job initiator. null for Web3 jobs.
secretOwnerPrincipalId?​
optionalsecretOwnerPrincipalId:string|null
Defined in: types/common.ts:316
Web2 principalId of secret owner. null for Web3 jobs.
UsageStats​
Defined in: types/common.ts:324
Usage statistics for a single direction (encryption or decryption).
Properties​
limit​
limit:
number
Defined in: types/common.ts:326
Data limit in bytes
used​
used:
number
Defined in: types/common.ts:328
Data used in bytes
remaining​
remaining:
number
Defined in: types/common.ts:330
Data remaining in bytes
count​
count:
number
Defined in: types/common.ts:332
Number of operations performed
requestLimit​
requestLimit:
number
Defined in: types/common.ts:334
Request limit per billing cycle
rateLimit​
rateLimit:
number
Defined in: types/common.ts:336
Rate limit (requests per second)
limitGB​
limitGB:
number
Defined in: types/common.ts:338
Limit in GB
usedGB​
usedGB:
number
Defined in: types/common.ts:340
Used in GB
remainingGB​
remainingGB:
number
Defined in: types/common.ts:342
Remaining in GB
DataConsumption​
Defined in: types/common.ts:355
Data consumption/usage statistics for a user.
Remarks​
The blackbox tracks encryption and decryption usage per user
for rate limiting and billing purposes. The userId identifies
the user (wallet address for Web3, principalId for Web2).
Properties​
userId​
userId:
string
Defined in: types/common.ts:357
User identifier (wallet address for web3, principalId for web2)
userType​
userType:
string
Defined in: types/common.ts:359
User type ('web3' or 'web2')
planId​
planId:
string
Defined in: types/common.ts:361
Plan identifier (e.g. 'free')
cycleType​
cycleType:
string
Defined in: types/common.ts:363
Billing cycle type (e.g. 'monthly')
periodStart​
periodStart:
string
Defined in: types/common.ts:365
Billing period start (ISO 8601)
periodEnd​
periodEnd:
string
Defined in: types/common.ts:367
Billing period end (ISO 8601)
encryption​
encryption:
UsageStats
Defined in: types/common.ts:369
Encryption usage statistics
decryption​
decryption:
UsageStats
Defined in: types/common.ts:371
Decryption usage statistics
ChainConfig​
Defined in: types/config.ts:26
Per-chain configuration from discovery or overrides.
Remarks​
Chain configuration can come from:
- Discovery (fetched from blackbox
/healthzendpoint) - Explicit overrides provided in SDK configuration
Overrides take precedence over discovery values.
Extended by​
Properties​
chainId​
chainId:
number
Defined in: types/config.ts:28
Chain ID
name?​
optionalname:string
Defined in: types/config.ts:30
Human-readable chain name (e.g., 'Ternoa Mainnet')
rpcUrl​
rpcUrl:
string
Defined in: types/config.ts:32
HTTP RPC URL for this chain
wsRpcUrl?​
optionalwsRpcUrl:string
Defined in: types/config.ts:34
WebSocket RPC URL for this chain (optional, for subscriptions)
secretsControllerAddress​
secretsControllerAddress:
`0x${string}`
Defined in: types/config.ts:36
SecretsController contract address on this chain
blockTimeMs?​
optionalblockTimeMs:number
Defined in: types/config.ts:38
Block time in milliseconds (used for timeout calculations)
DiscoveryResult​
Defined in: types/config.ts:54
Result of calling the blackbox /healthz endpoint.
Remarks​
Discovery provides runtime configuration including:
- Supported chains and their RPC URLs
- Contract addresses
- Service status
This allows the SDK to work without hardcoded configuration.
Properties​
status​
status:
string
Defined in: types/config.ts:56
Status of the blackbox service ('ok' when healthy)
enclaveWalletAddress​
enclaveWalletAddress:
`0x${string}`
Defined in: types/config.ts:58
Enclave wallet address used by the blackbox for on-chain verification
supportedChains​
supportedChains:
number[]
Defined in: types/config.ts:60
List of supported chain IDs
chains​
chains:
ChainConfig[]
Defined in: types/config.ts:62
Per-chain configuration
ipfsGatewayUrl?​
optionalipfsGatewayUrl:string
Defined in: types/config.ts:64
IPFS gateway URL for fetching public keys
fetchedAt​
fetchedAt:
number
Defined in: types/config.ts:66
Unix timestamp (ms) when this discovery result was fetched
CiferSdkConfig​
Defined in: types/config.ts:105
SDK configuration options.
Remarks​
The SDK can be configured in several ways:
-
Discovery mode (recommended): Provide
blackboxUrland the SDK will fetch configuration from the/healthzendpoint. -
Manual mode: Provide
chainOverrideswith explicit configuration for each chain you want to use. -
Hybrid mode: Use discovery with selective overrides for specific chains (e.g., custom RPC URLs).
Examples​
const sdk = await createCiferSdk({
blackboxUrl: 'https://cifer-blackbox.ternoa.dev:3010',
});
const sdk = await createCiferSdk({
blackboxUrl: 'https://cifer-blackbox.ternoa.dev:3010',
chainOverrides: {
752025: {
rpcUrl: 'https://my-private-rpc.example.com',
},
},
});
Properties​
blackboxUrl?​
optionalblackboxUrl:string
Defined in: types/config.ts:116
Blackbox URL (e.g., 'https://cifer-blackbox.ternoa.dev:3010').
Remarks​
If provided, the SDK will perform discovery by calling the /healthz
endpoint to fetch chain configurations automatically.
If not provided, the SDK will require explicit chain configs
via chainOverrides for all operations.
signer?​
optionalsigner:SignerAdapter
Defined in: types/config.ts:125
Default signer adapter to use for signing operations.
Remarks​
Can be overridden per-call. If not provided, each operation that requires signing must receive a signer explicitly.
readClient?​
optionalreadClient:ReadClient
Defined in: types/config.ts:134
Default read client for RPC operations.
Remarks​
Can be overridden per-call. If not provided, the SDK will create a read client using RPC URLs from discovery.
chainOverrides?​
optionalchainOverrides:Record<number,Partial<ChainConfig>>
Defined in: types/config.ts:158
Chain configuration overrides.
Remarks​
Use this to override discovery results or provide configuration for private deployments / offline usage.
Override values are merged with discovery values, with overrides taking precedence.
Example​
{
chainOverrides: {
752025: {
rpcUrl: 'https://my-private-rpc.example.com',
secretsControllerAddress: '0x...',
},
},
}
discoveryCacheTtlMs?​
optionaldiscoveryCacheTtlMs:number
Defined in: types/config.ts:168
Discovery cache TTL in milliseconds.
Remarks​
Discovery results are cached in memory to avoid repeated network calls.
Default Value​
300000 (5 minutes)
fetch()?​
optionalfetch: (input,init?) =>Promise<Response>
Defined in: types/config.ts:176
Custom fetch implementation.
Parameters​
input​
RequestInfo | URL
init?​
RequestInit
Returns​
Promise<Response>
Remarks​
Useful for testing or environments without native fetch.
logger()?​
optionallogger: (message) =>void
Defined in: types/config.ts:191
Logger function for debugging.
Parameters​
message​
string
Returns​
void
Remarks​
Called with progress messages during SDK operations.
Example​
{
logger: console.log,
}
ResolvedChainConfig​
Defined in: types/config.ts:202
Resolved configuration for a specific chain.
Remarks​
This extends ChainConfig with metadata about the configuration source.
Extends​
Properties​
chainId​
chainId:
number
Defined in: types/config.ts:28
Chain ID
Inherited from​
name?​
optionalname:string
Defined in: types/config.ts:30
Human-readable chain name (e.g., 'Ternoa Mainnet')
Inherited from​
rpcUrl​
rpcUrl:
string
Defined in: types/config.ts:32
HTTP RPC URL for this chain
Inherited from​
wsRpcUrl?​
optionalwsRpcUrl:string
Defined in: types/config.ts:34
WebSocket RPC URL for this chain (optional, for subscriptions)
Inherited from​
secretsControllerAddress​
secretsControllerAddress:
`0x${string}`
Defined in: types/config.ts:36
SecretsController contract address on this chain
Inherited from​
ChainConfig.secretsControllerAddress
blockTimeMs?​
optionalblockTimeMs:number
Defined in: types/config.ts:38
Block time in milliseconds (used for timeout calculations)
Inherited from​
fromDiscovery​
fromDiscovery:
boolean
Defined in: types/config.ts:204
Whether this config came from discovery (true) or overrides only (false)
SdkContext​
Defined in: types/config.ts:216
Internal
Internal SDK context passed to domain modules.
Remarks​
This is an internal type used to pass configuration and dependencies between SDK modules. It should not be used directly by SDK consumers.
Properties​
blackboxUrl​
blackboxUrl:
string
Defined in: types/config.ts:218
Blackbox base URL
discovery​
discovery:
DiscoveryResult|null
Defined in: types/config.ts:220
Discovery result (may be null if not yet fetched)
chainOverrides​
chainOverrides:
Record<ChainId,Partial<ChainConfig>>
Defined in: types/config.ts:222
Chain configuration overrides
signer?​
optionalsigner:SignerAdapter
Defined in: types/config.ts:224
Default signer
readClient?​
optionalreadClient:ReadClient
Defined in: types/config.ts:226
Default read client
fetch()​
fetch: (
input,init?) =>Promise<Response>
Defined in: types/config.ts:228
Fetch implementation
Parameters​
input​
RequestInfo | URL
init?​
RequestInit
Returns​
Promise<Response>
logger()​
logger: (
message) =>void
Defined in: types/config.ts:230
Logger
Parameters​
message​
string
Returns​
void
TxIntent​
Defined in: types/tx-intent.ts:67
A transaction intent represents a transaction that can be executed by any EIP-1193 compatible wallet or transaction executor.
Remarks​
This is the standard output format for all write operations in the SDK. The app is responsible for broadcasting the transaction using their preferred method (wagmi, ethers, viem, direct RPC, etc.).
Transaction intents intentionally do not include:
fromaddress (determined by the wallet)- Gas settings (handled by the wallet/provider)
- Nonce (managed by the wallet/provider)
Examples​
const intent = keyManagement.buildCreateSecretTx({ chainId, controllerAddress, fee });
const hash = await sendTransaction({
to: intent.to,
data: intent.data,
value: intent.value,
});
const intent = keyManagement.buildCreateSecretTx({ chainId, controllerAddress, fee });
const tx = await signer.sendTransaction({
to: intent.to,
data: intent.data,
value: intent.value,
});
const intent = keyManagement.buildCreateSecretTx({ chainId, controllerAddress, fee });
const hash = await provider.request({
method: 'eth_sendTransaction',
params: [{
to: intent.to,
data: intent.data,
value: intent.value ? `0x${intent.value.toString(16)}` : undefined,
}],
});
Extended by​
Properties​
chainId​
chainId:
number
Defined in: types/tx-intent.ts:75
The chain ID where this transaction should be executed.
Remarks​
Apps should verify the wallet is connected to the correct chain before submitting the transaction.
to​
to:
`0x${string}`
Defined in: types/tx-intent.ts:80
The recipient address (contract address for contract calls).
data​
data:
`0x${string}`
Defined in: types/tx-intent.ts:85
The calldata for the transaction (ABI-encoded function call).
value?​
optionalvalue:bigint
Defined in: types/tx-intent.ts:94
The value to send with the transaction (in wei).
Remarks​
Only set for payable functions. For non-payable functions,
this will be undefined.
TxIntentWithMeta​
Defined in: types/tx-intent.ts:106
Extended transaction intent with additional metadata useful for UX and debugging.
Remarks​
Transaction builders in the SDK return this extended type which includes human-readable descriptions and decoded arguments for display purposes.
Extends​
Properties​
chainId​
chainId:
number
Defined in: types/tx-intent.ts:75
The chain ID where this transaction should be executed.
Remarks​
Apps should verify the wallet is connected to the correct chain before submitting the transaction.
Inherited from​
to​
to:
`0x${string}`
Defined in: types/tx-intent.ts:80
The recipient address (contract address for contract calls).
Inherited from​
data​
data:
`0x${string}`
Defined in: types/tx-intent.ts:85
The calldata for the transaction (ABI-encoded function call).
Inherited from​
value?​
optionalvalue:bigint
Defined in: types/tx-intent.ts:94
The value to send with the transaction (in wei).
Remarks​
Only set for payable functions. For non-payable functions,
this will be undefined.
Inherited from​
description​
description:
string
Defined in: types/tx-intent.ts:112
Human-readable description of what this transaction does.
Example​
`'Create a new CIFER secret'`
functionName​
functionName:
string
Defined in: types/tx-intent.ts:119
The function being called (for display purposes).
Example​
`'createSecret'`
args?​
optionalargs:Record<string,unknown>
Defined in: types/tx-intent.ts:128
The decoded arguments (for display purposes).
Remarks​
Arguments are provided as a record for easy display in UIs. BigInt values are converted to strings for JSON serialization.
TxExecutionResult​
Defined in: types/tx-intent.ts:136
Result of executing a transaction intent.
Properties​
hash​
hash:
`0x${string}`
Defined in: types/tx-intent.ts:140
The transaction hash.
waitReceipt()​
waitReceipt: () =>
Promise<TransactionReceipt>
Defined in: types/tx-intent.ts:147
Function to wait for the transaction receipt.
Returns​
Promise<TransactionReceipt>
A promise resolving to the transaction receipt
Ed25519Signer​
Defined in: types/web2.ts:44
Ed25519 signer callback interface.
Remarks​
The SDK does not bundle a specific Ed25519 library. Consumers can implement this interface using any library they prefer, for example:
@noble/ed25519- Node.js
crypto.sign('ed25519', ...) - A TEE-backed signing service
Example​
import * as ed25519 from '@noble/ed25519';
const ed25519Signer: Ed25519Signer = {
async sign(message: Uint8Array) {
return ed25519.sign(message, privateKey);
},
getPublicKey() {
return ed25519.getPublicKey(privateKey);
},
};
Methods​
sign()​
sign(
message):Promise<Uint8Array<ArrayBufferLike>>
Defined in: types/web2.ts:51
Sign a message with the Ed25519 private key.
Parameters​
message​
Uint8Array
Raw bytes to sign
Returns​
Promise<Uint8Array<ArrayBufferLike>>
The 64-byte Ed25519 signature
getPublicKey()​
getPublicKey():
Uint8Array
Defined in: types/web2.ts:58
Get the Ed25519 public key (32 bytes).
Returns​
Uint8Array
The 32-byte public key
RegisterParams​
Defined in: types/web2.ts:70
Parameters for email+password registration.
Properties​
email​
email:
string
Defined in: types/web2.ts:72
Email address (must contain @)
password​
password:
string
Defined in: types/web2.ts:74
Password (minimum 8 characters)
blackboxUrl​
blackboxUrl:
string
Defined in: types/web2.ts:76
Blackbox URL
fetch()?​
optionalfetch: (input,init?) =>Promise<Response>
Defined in: types/web2.ts:78
Custom fetch implementation
Parameters​
input​
RequestInfo | URL
init?​
RequestInit
Returns​
Promise<Response>
RegisterResult​
Defined in: types/web2.ts:86
Result of registration.
Properties​
principalId​
principalId:
string
Defined in: types/web2.ts:88
The assigned principal UUID
message​
message:
string
Defined in: types/web2.ts:90
Server message (e.g. "OTP sent to email")
VerifyEmailParams​
Defined in: types/web2.ts:98
Parameters for email OTP verification.
Properties​
email​
email:
string
Defined in: types/web2.ts:100
Email address
otp​
otp:
string
Defined in: types/web2.ts:102
OTP code received via email
blackboxUrl​
blackboxUrl:
string
Defined in: types/web2.ts:104
Blackbox URL
fetch()?​
optionalfetch: (input,init?) =>Promise<Response>
Defined in: types/web2.ts:106
Custom fetch implementation
Parameters​
input​
RequestInfo | URL
init?​
RequestInit
Returns​
Promise<Response>
VerifyEmailResult​
Defined in: types/web2.ts:114
Result of email verification.
Properties​
principalId​
principalId:
string
Defined in: types/web2.ts:116
The principal UUID
emailVerified​
emailVerified:
boolean
Defined in: types/web2.ts:118
Whether the email is now verified
RegisterKeyParams​
Defined in: types/web2.ts:126
Parameters for Ed25519 key registration (Phase 2).
Properties​
principalId​
principalId:
string
Defined in: types/web2.ts:128
Principal UUID from registration
password​
password:
string
Defined in: types/web2.ts:130
Password for verification
ed25519Signer​
ed25519Signer:
Ed25519Signer
Defined in: types/web2.ts:132
Ed25519 signer (provides publicKey + sign)
blackboxUrl​
blackboxUrl:
string
Defined in: types/web2.ts:134
Blackbox URL
fetch()?​
optionalfetch: (input,init?) =>Promise<Response>
Defined in: types/web2.ts:136
Custom fetch implementation