Optional metadata: Partial<PermitV2Metadata>(base) List of contract addresses that can be accessed with this permission
(base) Expiration timestamp
(base) User that initially created the permission, target of data fetching
(base) signTypedData signature created by issuer.
(base) Shared- and Self- permissions differ in signature format: (sealingKey absent in shared signature)
(non-sharing) < issuer, expiration, contracts, projects, recipient, validatorId, validatorContract, sealingKey >
(sharing) < issuer, expiration, contracts, projects, recipient, validatorId, validatorContract >
Name for this permit, for organization and UI usage, not included in signature.
(base) List of project identifiers (strings) that can be accessed
(sharing) The user that this permission will be shared with
** optional, use address(0) to disable **
(sharing) signTypedData signature created by recipient with format:
(sharing) < sealingKey, issuerSignature>
** required for shared permits **
(base) The publicKey of a sealingPair used to re-encrypt issuers confidential data
(non-sharing) Populated by issuer
(sharing) Populated by recipient
The type of the PermitV2 (self / sharing) (self) Permit that will be signed and used by the issuer (sharing) Permit that is signed by the issuer, but intended to be shared with recipient (recipient) Permit that has been received, and signed by the recipient
(issuer defined validation) The contract to query to determine permission validity
** optional, user address(0) to disable **
(issuer defined validation) An id used to query a contract to check this permissions validity
** optional, use 0 to disable **
Utility to extract the public data from a permit.
Used in serialize, getPermission, getHash etc
Extracts a contract input ready permission from this permit.
The permission inherits most fields from the permit, however
permit.sealingPair is removed and replaced by permit.sealingPair.publicKey in the sealingKey field.
(base) List of contract addresses that can be accessed with this permission
(base) Expiration timestamp
(base) User that initially created the permission, target of data fetching
(base) signTypedData signature created by issuer.
(base) Shared- and Self- permissions differ in signature format: (sealingKey absent in shared signature)
(non-sharing) < issuer, expiration, contracts, projects, recipient, validatorId, validatorContract, sealingKey >
(sharing) < issuer, expiration, contracts, projects, recipient, validatorId, validatorContract >
(base) List of project identifiers (strings) that can be accessed
(sharing) The user that this permission will be shared with
** optional, use address(0) to disable **
(sharing) signTypedData signature created by recipient with format:
(sharing) < sealingKey, issuerSignature>
** required for shared permits **
(issuer defined validation) The contract to query to determine permission validity
** optional, user address(0) to disable **
(issuer defined validation) An id used to query a contract to check this permissions validity
** optional, use 0 to disable **
skipValidation - Flag to prevent running validation on the permit before returning the extracted permission. Used internally.
Check if permit satisfies the requirements param. Permit must satisfy either the contracts list or the projects list
Lists of contract and project requirements.
Optional contracts?: string[]Optional projects?: string[]Returns the domain, types, primaryType, and message fields required to request the user's signature Primary type is returned to allow viem clients to more easily connect
Overall validity checker of a permit, checks the signatures and expirations
valid, error is null, else error indicates which validity check failedReturns a serializable permit instance, removing classes and methods. NOTE: Does not return a stringified permit
Determines the required signature type.
Creates the EIP712 types and message.
Prompts the user for their signature.
Inserts the signature into issuerSignature or recipientSignature as necessary.
Used as part of the EIP712 domain, throws if undefined
Signer responsible for signing the EIP712 permit signature, throws if undefined
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.
Static createStatic createStatic deserializeCreates a PermitV2 from a serialized permit, hydrating methods and classes
NOTE: Does not return a stringified permit
Permit structure excluding classes
Static validate
Chain that this permit was signed on. In part used for mock encrypt/unseal on hardhat network. Should not be set manually, included in metadata as part of serialization flows.