dev.cocore.compute.paymentAuthorization

cocore.dev

Documentation

main record

No description available.

Record Key tid Timestamp-based ID

Properties

createdAt string datetime Required

An RFC 3339 formatted timestamp.

exchange string did Required

DID of the exchange authorized to charge.

expiresAt string datetime Required

An RFC 3339 formatted timestamp.

nonce string Required

16 random bytes, hex-encoded. Replay protection: any settlement re-using a consumed nonce is invalid.

maxLength: 32 bytesminLength: 32 bytes
scope string Required

singleJob: authorization is consumed by a single matching receipt. session: a bounded set of jobs may share this authorization until expiresAt.

Known values: singleJob, session
sessionBudget ref dev.cocore.compute.defs#money Optional

When scope=session, total cumulative charges across all settlements under this authorization MUST NOT exceed sessionBudget. Ignored when scope=singleJob.

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "exchange",
      "ceiling",
      "scope",
      "nonce",
      "expiresAt",
      "createdAt"
    ],
    "properties": {
      "nonce": {
        "type": "string",
        "maxLength": 32,
        "minLength": 32,
        "description": "16 random bytes, hex-encoded. Replay protection: any settlement re-using a consumed nonce is invalid."
      },
      "scope": {
        "type": "string",
        "description": "singleJob: authorization is consumed by a single matching receipt. session: a bounded set of jobs may share this authorization until expiresAt.",
        "knownValues": [
          "singleJob",
          "session"
        ]
      },
      "ceiling": {
        "ref": "dev.cocore.compute.defs#money",
        "type": "ref",
        "description": "Maximum amount the exchange may charge under this authorization."
      },
      "exchange": {
        "type": "string",
        "format": "did",
        "description": "DID of the exchange authorized to charge."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime"
      },
      "expiresAt": {
        "type": "string",
        "format": "datetime"
      },
      "sessionBudget": {
        "ref": "dev.cocore.compute.defs#money",
        "type": "ref",
        "description": "When scope=session, total cumulative charges across all settlements under this authorization MUST NOT exceed sessionBudget. Ignored when scope=singleJob."
      }
    }
  }
}

Lexicon Garden

@