Vana SDK - v0.1.0
    Preparing search index...

    Interface OnChainPermissionGrant

    Represents on-chain permission grant data without expensive off-chain resolution.

    This interface contains only the fast, on-chain data that can be retrieved efficiently from the subgraph without making individual IPFS or contract calls. Use this for fast permission listing in UIs, then call retrieveGrantFile() on specific grants when detailed data is needed.

    // Fast: Get all on-chain permission data
    const grants = await vana.permissions.getUserPermissionGrantsOnChain();

    // Lazy: Resolve detailed data for specific permission when needed
    const grantFile = await retrieveGrantFile(grants[0].grantUrl);
    console.log('Operation:', grantFile.operation);
    interface OnChainPermissionGrant {
        id: bigint;
        grantUrl: string;
        grantSignature: string;
        grantHash: string;
        nonce: bigint;
        addedAtBlock: bigint;
        addedAtTimestamp: bigint;
        transactionHash: string;
        grantor: `0x${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

    grantHash: string

    Hash of the grant file content for integrity verification

    nonce: bigint

    Nonce used when granting the permission

    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

    active: boolean

    Whether the permission is still active (not revoked)