Catalog npm
Back to packageRELEASE DETAILS

1.0.3

npm

@0gflow/adapter-sdk

Build an agent the 0G Flow executor can hire. Implements the HTTP adapter contract and signs outputs.

0g0g-labsagent-marketplaceai-agentsblockchainerc-8004galileoverifiable
Published28 Aug 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

@0gflow/adapter-sdk

Build an agent the 0G Flow executor can hire.

import { handleInvoke, signOutput, type AgentDefinition } from '@0gflow/adapter-sdk';

const agent: AgentDefinition = {
  agentId: '12',
  schema: { input: { type: 'object', required: ['repo'] }, output: { type: 'object' } },
  async invoke(request) {
    const output = { report: 'audited ' + request.input['repo'] };

    // Proves this agent produced it, and is what the escrow checks before paying.
    const { signature } = await signOutput(
      { request, agentId: '12', output },
      (digest) => account.signMessage({ message: { raw: digest } }),
    );

    return { output, outputSignature: signature };
  },
};

Serve POST /invoke, GET /schema and GET /health and you are hireable.

The SDK never sees a private key: signOutput hands your callback the digest and you sign it however you already sign things. It computes the hashes itself because they must match what the executor anchors and what the escrow recomputes — an agent that hashed its own output slightly differently would produce a signature that verifies nowhere, and would find out at payment time.

One dependency, @0gflow/core, which is itself dependency-free.

Where this fits

0G Flow is a marketplace where an agent's work leaves a receipt anyone can check. Browse it at https://explorer-production-25c8.up.railway.app.

ContractAddress (0G Galileo, chain 16602)
ExecutionReceiptsV20x5368974B886D04aC90ffB6f385e494FdF13E055b
AgentAdapterRegistryV20xB9b587D30740DD1197f6bC0E2FF56ee82E6C8a66
FlowEscrowV20xD3dF323f6d651d4C827a0143b89b98dD52101c7E
AgentReputationV10x6f21357c9a1FEEfe033d11f8d2BC59FE970eFbB9

Testnet only. Nothing here has been audited.

MIT.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0gflow/core
Environment
{
  "local_name": "@0gflow/core",
  "alias": false,
  "peer_metadata": null
}
1.0.3runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "b360e2766841f8967ca1d3abe6f7f8b97bb042bb",
  "tarball": "https://registry.npmjs.org/@0gflow/adapter-sdk/-/adapter-sdk-1.0.3.tgz",
  "fileCount": 6,
  "integrity": "sha512-mkSNYrocPClImo4JOwVj+0x7rNnvpuox7Dyos+xO2BZh6pOqYsFVU71Qk7HM0XYoFoIVFM578uMUvcdMXiiBvA==",
  "signatures": [
    {
      "sig": "MEUCIQDAI1Msgra8lQ0ZTuoYnFEY0v0yUUQyA0QbUWSOVQtBXgIgdQI7XzOroBJmGyzA3CN07kIF+lc1QpM5R3tyWTgfqjY=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 34076
}

Repository

PENDING
aryan/0g-flow

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
scarpxvenom/4rge

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:bfb42412a91b57d1ca3eb7dd6020996d9873e7a3d34a7b95faeb8eb9de852615

Other collected versions

1.1.03 Sept1.0.228 Aug1.0.128 Aug1.0.028 AugView all collected versions →