Authority

Cryptographic ownership of Smart Workflows. Authority is a Smart Action.

Authority executes as a Smart Action, producing cryptographic attestations of authorization. Can be simple (single signature) or complex (DAO governance).

Examples

w3-io/actions/authority/ed25519

v1

Simple single-key authorization. Verify cryptographic signature from the workflow owner. Most common pattern for personal workflows.

Action Definition

action.yml (w3-io/actions repo)
# action.yml - Published in w3-io/actions repository
name: Single Key Authority
description: Simple Ed25519 signature verification

inputs:
  pubkey:
    description: Public key of workflow owner
    required: true

outputs:
  authorized:
    description: Boolean authorization result
  signer:
    description: Recovered signer address

runs:
  using: javascript
  main: index.js

Authority Configuration

Authority Section
authority:
  uses: w3-io/actions/authority/ed25519@v1
  with:
    pubkey: "0x892b3c5e8d1f4a7c9e2b6d8a3f5c7e9b4d6a8c1e3b5d7a9c2e4f6b8d1a3c5e7"

Execution

Authorization Logic
// Verify signature
const signer = recover_signer(
  trigger_request,
  authority_signature
);

if (signer === inputs.pubkey) {
  return {
    authorized: true,
    signer: signer
  };
}

return {
  authorized: false,
  reason: "Invalid signature"
};
Authorization Result
{
  "authorized": true,
  "signer": "0x892b3c5e8d1f4a7c9e2b6d8a3f5c7e9b4d6a8c1e3b5d7a9c2e4f6b8d1a3c5e7"
}

Verification

Verify Authorization
// Everyone can verify the signature
fn verify(attestation: Attestation) -> bool {
    let recovered = ecrecover(
        attestation.trigger_hash,
        attestation.signature
    );

    recovered == attestation.authority_pubkey
        && attestation.authority_pubkey == workflow.authority
}

Operations

The authority can perform the following operations on a workflow:

  • deploy_workflow — Deploy compiled workflow (bytecode + manifest), generates workflow_hash from content
  • dispatch_workflow — Manually trigger workflow execution (workflow_dispatch)
  • update_workflow_authority — Transfer workflow ownership to new public key
  • update_workflow_payer — Change account paying for workflow execution
  • update_workflow_triggers — Modify the on: conditions (schedules, blockchain events, etc.)
  • archive_workflow — Permanently disable workflow, mark as deprecated

Note: Changing workflow logic requires deploying a new workflow with a new hash. There is no "update logic" operation.