Type alias PermitV2Interface

PermitV2Interface: {
    contracts: string[];
    expiration: number;
    issuer: string;
    issuerSignature: string;
    name: string;
    projects: string[];
    recipient: string;
    recipientSignature: string;
    sealingPair: SealingKey;
    type: "self" | "sharing" | "recipient";
    validatorContract: string;
    validatorId: number;
}

Type representing the full PermitV2

Type declaration

  • contracts: string[]

    (base) List of contract addresses that can be accessed with this permission

  • expiration: number

    (base) Expiration timestamp

  • issuer: string

    (base) User that initially created the permission, target of data fetching

  • issuerSignature: string

    (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: string

    Name for this permit, for organization and UI usage, not included in signature.

  • projects: string[]

    (base) List of project identifiers (strings) that can be accessed

  • recipient: string

    (sharing) The user that this permission will be shared with ** optional, use address(0) to disable **

  • recipientSignature: string

    (sharing) signTypedData signature created by recipient with format: (sharing) < sealingKey, issuerSignature> ** required for shared permits **

  • sealingPair: SealingKey

    (base) The publicKey of a sealingPair used to re-encrypt issuers confidential data (non-sharing) Populated by issuer (sharing) Populated by recipient

  • type: "self" | "sharing" | "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

  • validatorContract: string

    (issuer defined validation) The contract to query to determine permission validity ** optional, user address(0) to disable **

  • validatorId: number

    (issuer defined validation) An id used to query a contract to check this permissions validity ** optional, use 0 to disable **