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

    Function createGrantFile

    • Creates grant file structure for permission storage.

      Parameters

      • params: GrantPermissionParams

        Permission parameters to create the grant file from

      Returns GrantFile

      Grant file object for IPFS storage

      Constructs JSON structure that represents a permission grant in the Vana protocol. The grant file contains all necessary information for a grantee to perform operations on behalf of the grantor.

      const grant = createGrantFile({
      grantee: '0x742d35Cc...',
      operation: 'llm_inference',
      parameters: { model: 'gpt-4' },
      expiresAt: Date.now() + 86400000 // 24 hours
      });