Const Optional options: PermitV2OptionsPartial PermitV2 fields to create the Permit with, if no options provided will be filled with the defaults: { type: "self", issuer: initializedUserAddress, projects: initializedProjects, contracts: initializedContracts }
Encrypts a numeric value according to the specified encryption type or the most efficient one based on the value.
Useful when not using Encryptable utility structures.
The numeric value to encrypt.
Optional type: EncryptionTypesOptional. The encryption type (uint8, uint16, uint32).
The security zone for which to encrypt the value (default 0).
Retrieves a stored permission based on the permit's hash.
If no hash is provided, the currently active permit will be used.
The PermissionV2 is extracted from the permit.
Optional hash: stringOptional hash of the permission to get, defaults to active permit's permission
hash, as a result object.Retrieves a stored permit based on its hash. If no hash is provided, the currently active permit will be retrieved.
Optional hash: stringOptional PermitV2.getHash of the permit.
hash as a Result object.Imports a fully formed existing permit, expected to be valid.
Does not ask for user signature, expects to already be populated.
Will throw an error if the imported permit is invalid, see PermitV2.isValid.
The imported PermitV2 will be inserted into the store and marked as the active permit.
Permit to import as a text string or PermitV2Interface
Initializes the fhenixsdk to enable encrypting input data, creating permits / permissions, and decrypting sealed outputs.
Initializes fhevm client FHE wasm module and fetches the provided chain's FHE publicKey.
If a valid signer is provided, a permit/permission is generated automatically
Uses the privateKey of permit.sealingPair to recursively unseal any contained SealedItems.
If item is a single SealedItem it will be individually.
NOTE: Only unseals typed SealedItems returned from FHE.sealoutputTyped and the FHE bindings' e____.sealTyped.
Array, object, or item. Any nested SealedItems will be unsealed.
Optional account: stringOptional hash: stringUnseals an encrypted message using the stored permit for a specific contract address.
NOTE: Wrapper around PermitV2.unseal
The encrypted message to unseal.
Optional account: stringUsers address, defaults to store.account
Optional hash: stringThe hash of the permit to use for this operation, defaults to active permitV2 hash
bigint - The unsealed message.
Creates a new permit with options, prompts user for signature. Handles all
permit.types, and prompts for the correct signature type. The created PermitV2 will be inserted into the store and marked as the active permit. NOTE: This is a wrapper aroundPermitV2.createandPermitV2.sign