Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 7.26 KB

factor-rpc.md

File metadata and controls

77 lines (53 loc) · 7.26 KB

FACTOR RPC reference

FACTOR Core exposes node-local JSON-RPC for chain inspection, mining, wallets and Deadpool. This inventory describes registered FACTOR-specific methods at the reviewed revision.

For public bounty queries or client-scoped hosted requests, start with the Gateway REST and MCP quickstart and agent guide. Those hosted interfaces are separate from the authenticated node-local RPC methods below.

Reviewed source: e224c5277, version fields 6.0.43; documentation review December 2, 2026. This is a descriptive engineering reference. The applicable implementation and validated chain state determine active behavior; release publication alone does not prove activation.

Authentication and versioning

Run factornd and use factorn-cli; the configuration file remains factorn.conf. The daemon enables RPC; GUI builds use -server to enable it. Same-user CLI calls use the network data directory's .cookie by default. For static integrations use rpcauth. Keep RPC on loopback or a secured private connection; it can spend wallet funds and is not an encrypted, hardened public API. See JSON-RPC security, configuration and ports.

Query getnetworkinfo for the node version and help <method> for its actual schema. Do not apply Bitcoin Core's major-version deprecation promises as FACTOR policy. These signatures were inspected in source; node help could not run in this environment because the pre-existing binaries lack libboost_system.so.1.83.0.

Registered Deadpool methods

Decimal integers are JSON strings to avoid precision loss; hashes/transaction bytes are hex strings. Amounts accept JSON numbers or decimal strings via AmountFromValue, measured in FACT. Optional arguments appear in brackets. All construction methods return hex rather than broadcasting automatically.

Signature Return and behavior
getdeadpoolid n Hex identifier: SHA256 of canonical Script integer serialization, displayed as uint256. Checks the integer range; does not require activation.
getdeadpoolentry deadpoolid Object: n string, bits number, deadpoolid, bounty FACT amount, entries array and announcements array. Requires activation and index.
listdeadpoolentries [num_blocks=1000] [limit=1000] [include_claimed=false] [include_announced=true] Array of objects with deadpoolid, bounty FACT amount, numeric entries and announcements. Discovery uses recent entry heights, not a complete unbounded marketplace view.
createdeadpoolentry amount n Unfunded, unsigned entry transaction template. Requires activation.
announcedeadpoolclaim burn_amount address entry_n solution Unfunded, unsigned announcement template. Validates minimum burn, address and target, and tests divisibility; requires activation.
claimdeadpooltxs inputs to_address solution Claim hex for explicit bounty outpoints. inputs is an array of objects with hex txid and numeric vout; requires activation and current UTXOs.
claimdeadpoolid deadpoolid to_address solution Claim hex selecting indexed entry outputs that remain in the UTXO set; requires activation and index.

getdeadpoolentry.entries supplies txid, vout, amount, height, claimed, with optional claim_height, claim_blockhash, claim_txid, solution. Announcement records supply txid, vout, burn_amount, height. Its top-level bounty sums all indexed entry values, including claimed values. listdeadpoolentries excludes claimed values by default but announcement filtering considers indexed announcement existence, not necessarily a presently mature commitment. Reorgs and asynchronous indexing limit discovery accuracy.

Both claim helpers use an internal fixed rate of 10 base units per estimated byte. There is no fee_rate argument. Decode and assess the actual fee/output before broadcasting; helper construction is not proof that a claim is mature, eligible, confirmed or safe for arbitrary malformed inputs.

Examples

With a synchronized local node:

src/factorn-cli getblockchaininfo
src/factorn-cli help createdeadpoolentry
src/factorn-cli listdeadpoolentries 1000 20 false true
src/factorn-cli getdeadpoolid '1461501637330902918203684832716283019655932542977'

The final value is a 161-bit illustrative integer; hashing it does not certify that it is composite or create a bounty. Workflow placeholders below are not literal valid arguments:

createdeadpoolentry 1.0 "<decimal N>"
fundrawtransaction "<entry hex>"
signrawtransactionwithwallet "<funded hex>"
sendrawtransaction "<signed hex>"
announcedeadpoolclaim 0.01 "<FACT address>" "<decimal N>" "<proper divisor>"
# Fund, sign and broadcast the announcement; wait for an eligible height.
claimdeadpooltxs [{"txid":"<entry txid>","vout":0}] "<same payout address>" "<same divisor>"
# Decode and validate returned claim before sendrawtransaction.

Funding/signing uses a loaded wallet and available funds. Bounty publication and announcement burns move or destroy real value when broadcast and confirmed. Review Deadpool for the actual inclusive window and public-data behavior.

Mining and chain interfaces

Signature FACTOR-specific interpretation
getblocktemplate [template_request] Request object accepts rules, e.g. {"rules":["segwit"]}; follow required active rules. Returns numeric integer bits and target, merkleroothash, mintime, maxtime, coinbasevalue in base units, transactions and deployment data. Help labels for some inherited types do not match the actual values inserted into the result.
submitblock hexdata [dummy] Full FACTOR serialized block; returns JSON null on acceptance or a rejection/status string, or raises a decoding/validation error. Valid factorization alone is insufficient.
submitheader hexdata FACTOR serialized header; throws on invalidity, returns null on success.
getnetworkhashps [nblocks=120] [height=-1] Number derived from chainwork difference / timestamp span; inherited name is not a literal hash-rate measurement.
getblockchaininfo Chain state and deployment reporting, including ASERT at this HEAD; earlier release output may omit it.

getmininginfo, fee estimation, raw transaction, wallet and networking RPCs are inherited interfaces with FACTOR-specific data. They remain version-dependent; consult registered help and raw transaction source or wallet source. REST is separate and unauthenticated; see REST reference.

Evidence: RegisterDeadpoolRPCCommands, RegisterMiningRPCCommands, blockchain.cpp, Deadpool RPC tests.

Further reading

Developer knowledge · Website integration reference

Documentation index · Release history · Repository knowledge index