Optional
type: EncryptionTypesExports all stored permits.
Creates a new permit for a specific contract address. Also saves the permit to localstorage (if available)
The address of the contract.
Optional
provider: SupportedProviderThe provider from which to sign the permit - must container a signer.
Optional
signer: PermitSignerthe signer to use to sign the permit if provider does not support signing (e.g. hardhat)
Permit - The permit associated with the contract address.
Retrieves the stored permit for a specific contract address.
The address of the contract.
The address of the user account.
Stores a permit for a specific contract address. Will overwrite any existing permit for the same contract address. Does not store the permit in localstorage (should it?)
The permit to store.
Unseals an encrypted message using the stored permit for a specific contract address.
The address of the contract.
The encrypted message to unseal.
The account attached to existing permits.
bigint - The unsealed message.
Static
createStatic
getRetrieves the FHE public key from the provider.
The provider from which to retrieve the key.
The security zone for which to retrieve the key (default 0).
The FhenixClientSync class provides functionalities to interact with a FHE (Fully Homomorphic Encryption) system. It includes methods for encryption, unsealing, and managing permits.
The Sync FhenixClient allows the
client.encrypt_<xxxx>()
functions to be performed synchronouslyNote
The Sync FhenixClient must be created using
await FhenixClientSync.create({provider})
instead ofnew FhenixClient({provider})