Vana SDK - v2.2.2
    Preparing search index...

    Interface OnChainPermissionGrant

    Contains on-chain permission data for efficient retrieval.

    Provides fast access to permission metadata from subgraph without IPFS calls. For detailed parameters, resolve grantUrl separately.

    const grants = await vana.permissions.getUserPermissionGrantsOnChain();

    // Resolve details when needed
    const details = await retrieveGrantFile(grants[0].grantUrl);
    console.log(`Operation: ${details.operation}`);
    interface OnChainPermissionGrant {
        id: bigint;
        grantUrl: string;
        grantSignature: string;
        nonce: bigint;
        startBlock: bigint;
        endBlock: bigint;
        addedAtBlock: bigint;
        addedAtTimestamp: bigint;
        transactionHash: string;
        grantor: `0x${string}`;
        grantee: { id: string; address: string };
        active: boolean;
    }
    Index

    Properties

    id: bigint

    Unique identifier for the permission

    grantUrl: string

    The grant URL containing detailed permission parameters (IPFS link)

    grantSignature: string

    Cryptographic signature that authorized this permission

    nonce: bigint

    Nonce used when granting the permission

    startBlock: bigint

    Block number when permission started

    endBlock: bigint

    Block number when permission ends (0 or MAX_UINT256 means no expiry)

    addedAtBlock: bigint

    Block number when permission was granted

    addedAtTimestamp: bigint

    Timestamp when permission was added

    transactionHash: string

    Transaction hash of the grant transaction

    grantor: `0x${string}`

    Address that granted the permission

    grantee: { id: string; address: string }

    Grantee information

    Type Declaration

    • id: string

      Grantee ID

    • address: string

      Grantee address

    active: boolean

    Whether the permission is still active (not revoked)