Publishing
Licenses
Distributed Key Management
Lit Protocol

License Assets Through Lit Protocol

The Lit Protocol (opens in a new tab) is a decentralized key management network based on threshold cryptography. Lit allows for key issuance based on on-chain and off-chain state. Symmetric keys to encrypted assets can be stored in Lit and made accessible through a user satisfying the license for an asset.

More info on access control conditions in Lit can be found here (opens in a new tab)

VERIFY Access Standard for Lit

Asset nodes can provide access by encrypting the assets using the following patterns.

Asset Nodes

A asset should be encrypted making use of the Lit SDK (opens in a new tab), using the following access control condition:

{
    "conditionType": "evmContract",
    "contractAddress": `${contentGraphAddress}`,
    "chain": `${chain}`,
    "functionName": "auth",
    "functionAbi": {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "id",
                "type": "bytes32",
            },
            {
                "internalType": "address",
                "name": "user",
                "type": "address",
            },
        ],
        "name": "auth",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool",
            },
        ],
        "stateMutability": "view",
        "type": "function",
    },
    "functionParams": [`${id}`, ":userAddress"],
    "returnValueTest": {
        "key": "",
        "comparator": "=",
        "value": "true",
    },
}

Where:

  • contentGraphAddress = the address of the content graph
  • chain = the chain of the content graph smart contract
  • id = the id of the token which you are encrypting/licensing

Access Schema

The following schema should be used in the metadata file for the asset node under the access field:

{
    "data": {
        "access": {
            "lit-protocol": {
                "accessControlCondition": "",
                "dataHash": "",
            }
        }
    }
}