Skip to main content
Glama
@odatano/nightgate-mcp

@odatano/nightgate-mcp

Official
by ODATANO

build_sponsorable_transaction

Prepare, prove, and sign an AttestationVault call locally, then return fee-unpaid transaction bytes and txId for a sponsor or later hand-over while keeping seed and witness secret.

Instructions

Build, prove and sign an AttestationVault call LOCALLY and hand back the bytes, for a sponsor on another server or a later hand-over; submit_vault_call does build and submit in one go. The caller seed (NIGHTGATE_SEED_HEX, else the seed file) stays here, the attestation secret is derived from it, nothing secret leaves this machine. The fee-unpaid transaction stays in this process under the returned txId (its sha256; characters and bytes alongside), or is written to outFile: UNBOUND by default (hand the txId to sponsor_unbound_transaction, parallel channel) or bound with bind:true (sponsor_finalized_transaction). The on-chain effect carries the attester id of THIS builder (returned). Proving takes 20-60 s in-process (the first call also fetches the prover keys from the NIGHTGATE /zk-config); NIGHTGATE_PROOF_SERVER_URL switches to a proof server. params by call: attest {payloadHash, metadataHash}; anchorContentRoot {payloadHash, contentRoot, schemaId}; grantDisclosure {payloadHash, grantee, level 0|1|2}; revokeDisclosure {payloadHash, grantee}; registerPassport {passportId, ownerId}; bindPassport {passportId, payloadHash}. The owner-gated calls address THIS builder's own record of the payload (the circuit derives recordKey(attesterId, payloadHash) from the caller). ZK CLAIMS, proven here with no wallet on the server and no witness ever sent to it, address a record explicitly: pass payloadHash (this builder's record) or payloadHash + attesterId (another attester's record) or recordKey directly: proveFieldPredicate {payloadHash, fieldKey, threshold, op 0=lessOrEqual|1=greaterOrEqual} plus merkleProof {fieldValue, fieldSalt, siblings, dirs}; proveFieldEquality {payloadHash, fieldKey, expectedDigest} plus merkleProof {fieldSalt, siblings, dirs}; proveFieldMembership {payloadHash, fieldKey, setRoot} plus merkleProof {fieldDigest, fieldSalt, siblings, dirs, setProof}; proveFieldsUnchangedExcept {payloadHashA, payloadHashB, allowedMask} and proveFieldsDiffer {payloadHashA, payloadHashB, k} (optionally attesterIdA / attesterIdB, or recordKeyA / recordKeyB), both plus docPair {schema, openingA, openingB}. Every witness field comes straight out of prepare_document_proof. All hashes 64 hex. The built bytes are valid for the transaction TTL (~30 min) and against the contract state at build time: if the sponsor job ends CHAIN_EXECUTION_FAILED, build again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "call": "<call>",
      "params": "<params>"
    },
    "name": "build_sponsorable_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
bindNofalse (default): unbound for sponsor_unbound_transaction; true: finalized for sponsor_finalized_transaction
callYesWhich circuit to call
paramsYesThe call parameters (see the per-call list in the description)
docPairNoWITNESS bundle { schema, openingA, openingB } for proveFieldsUnchangedExcept / proveFieldsDiffer; both documents must be prepared with the same ordered field list
outFileNoAlso write the built bytes as base64 to this path, for a sponsor tool on another server (its file argument)
merkleProofNoWITNESS material for the proveField* calls, as prepare_document_proof returns it for that field (fieldValue/fieldDigest, fieldSalt, siblings, dirs, setProof). It is consumed by the local prover and never sent to NIGHTGATE
contractAddressNoAttestationVault address (64 hex); default NIGHTGATE_SANDBOX_VAULT, else the shared sandbox vault of the network (preprod, preview)
compiledArtifactRefNoVault lineage to build against, defaults to 'attestation-vault-32' (the hosted sandbox vaults). Use 'attestation-vault' for a 16-slot vault: it has its own circuits, so the builder loads that contract class and fetches ITS prover keys from the server's /zk-config. The address must belong to the lineage named here

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.22.0
    • changedInput schema / properties / contractAddress / description
      Previous value: -"AttestationVault address (64 hex); default the shared sandbox vault of the network (preprod, preview)"New value: +"AttestationVault address (64 hex); default NIGHTGATE_SANDBOX_VAULT, else the shared sandbox vault of the network (preprod, preview)"
  2. Addedv0.18.3

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does: secrets/seeds never leave the machine, witness is consumed by the local prover only, proving takes 20-60s with a first-call prover-key fetch, a proof-server override exists, bytes are valid only for the ~30 min TTL and against build-time state, and the tx is retained in-process by txId or written to outFile. These are exactly the traits an agent must know before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the sibling contrast, and nearly every clause carries operational information (per-call params, TTL, rebuild advice). It is dense, semicolon-chained prose and the per-call parameter block would read better as a list, but little is genuinely wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, nested-witness tool with no output schema, the definition covers inputs, secret handling, timing, failure recovery, and even the return values (bytes, txId as sha256 with character/byte forms, the builder's attester id). Nothing material for a correct first call appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description goes well beyond it by enumerating the params for each of the 11 call values (attest, anchorContentRoot, the proveField* family, etc.), explaining how owner-gated calls derive recordKey(attesterId, payloadHash) from the caller, and stating that merkleProof/docPair witness fields come straight from prepare_document_proof. It also gives bind/outFile routing meaning and the 64-hex hash convention.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verbs (build, prove, sign) and a specific resource (an AttestationVault call), plus the output (bytes handed back) and the scope (LOCALLY, for a sponsor elsewhere or later hand-over). It explicitly contrasts with sibling submit_vault_call, so an agent can distinguish it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (submit_vault_call does build-and-submit in one go) and the condition that selects this tool instead. It also routes downstream: unbound txId to sponsor_unbound_transaction, bind:true to sponsor_finalized_transaction, and tells the agent to rebuild after CHAIN_EXECUTION_FAILED.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.