mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The module already called itself github.com/luxfi/node while containing no node in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and the Go column of the matrix measured a VM plugin. A repo that fetches the thing it claims to be has not replaced it, so the Go sources move in — 1515 files, the daemon and everything under it — and the build reaches outside this module for nothing. Rust and C++ sit beside it unchanged and are still measured against it by the differential. That is the point of one repo: the reference implementation and the two ports are the same checkout, so parity is a thing you can run rather than a thing you assert. Verified: builds, and the closure carries no lux-private — checked at build time rather than believed. The daemon starts twelve chains on a local network (P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
77 lines
4.5 KiB
Go
77 lines
4.5 KiB
Go
// Code generated by zipdoc; DO NOT EDIT.
|
|
|
|
package xvm
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/zap-proto/zip"
|
|
)
|
|
|
|
func init() {
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /asset", zip.Doc{
|
|
Description: "Returns an asset's name, symbol and denomination.",
|
|
Example: json.RawMessage(`{"assetID":"LUX"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /balance", zip.Doc{
|
|
Description: "Returns the balance of one asset held by an address.\n\nWithout includePartial it counts only what the address holds outright — a\n1-of-1 output whose locktime has passed. With it, partially held and\nstill-locked outputs count too.",
|
|
Fields: map[string]string{
|
|
"UTXOID.txID": "Serialized:",
|
|
},
|
|
Example: json.RawMessage(`{"address":"X-lux1...","assetID":"LUX"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /balances", zip.Doc{
|
|
Description: "Returns every asset an address holds a non-zero balance of.\n\nWithout includePartial it counts only what the address holds outright — a\n1-of-1 output whose locktime has passed. With it, partially held and\nstill-locked outputs count too.",
|
|
Example: json.RawMessage(`{"address":"X-lux1..."}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /block", zip.Doc{
|
|
Description: "Returns the block with the given id.",
|
|
Fields: map[string]string{
|
|
"GetBlockResponse.encoding": "If GetBlockResponse.Encoding is formatting.Hex, GetBlockResponse.Block is\nthe string representation of the block under hex encoding.\nIf GetBlockResponse.Encoding is formatting.JSON, GetBlockResponse.Block\nis the actual block returned as a JSON.",
|
|
},
|
|
Example: json.RawMessage(`{"blockID":"11111111111111111111111111111111LpoYY","encoding":"hex"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /block/:height", zip.Doc{
|
|
Description: "Returns the block accepted at the given height.",
|
|
Fields: map[string]string{
|
|
"GetBlockResponse.encoding": "If GetBlockResponse.Encoding is formatting.Hex, GetBlockResponse.Block is\nthe string representation of the block under hex encoding.\nIf GetBlockResponse.Encoding is formatting.JSON, GetBlockResponse.Block\nis the actual block returned as a JSON.",
|
|
},
|
|
Example: json.RawMessage(`{"height":"1","encoding":"hex"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /height", zip.Doc{
|
|
Description: "Returns the height of the last accepted block.",
|
|
Response: json.RawMessage(`{"height":"1"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /tx", zip.Doc{
|
|
Description: "Returns the transaction with the given id.",
|
|
Fields: map[string]string{
|
|
"GetTxReply.tx": "If [GetTxArgs.Encoding] is [Hex], [Tx] is the string representation of\nthe tx under hex encoding.\nIf [GetTxArgs.Encoding] is [JSON], [Tx] is the actual tx, which will be\nreturned as JSON to the caller.",
|
|
},
|
|
Example: json.RawMessage(`{"txID":"11111111111111111111111111111111LpoYY","encoding":"hex"}`),
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /txs", zip.Doc{
|
|
Description: "Returns the transactions of an address, one page at a time.\n\nThe reply carries the cursor to pass back for the next page.",
|
|
Fields: map[string]string{
|
|
"GetAddressTxsArgs.assetID": "AssetID defaulted to LUX if omitted or left blank",
|
|
"GetAddressTxsArgs.cursor": "Cursor used as a page index / offset",
|
|
"GetAddressTxsArgs.pageSize": "PageSize num of items per page",
|
|
"GetAddressTxsReply.cursor": "Cursor used as a page index / offset",
|
|
},
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm GET /utxos", zip.Doc{
|
|
Description: "Returns the UTXOs referencing at least one of the given addresses.\n\nThe reply's endIndex is where the next page starts: pass it back as\nstartIndex to continue.",
|
|
Fields: map[string]string{
|
|
"GetUTXOsReply.encoding": "Encoding specifies the encoding format the UTXOs are returned in.",
|
|
"GetUTXOsReply.endIndex": "The last UTXO that was returned, and the address it corresponds to.\nUsed for pagination. To get the rest of the UTXOs, call GetUTXOs\nagain and set [StartIndex] to this value.",
|
|
"GetUTXOsReply.numFetched": "Number of UTXOs returned.",
|
|
"GetUTXOsReply.utxos": "The UTXOs.",
|
|
"Index.address": "The address as a string",
|
|
"Index.utxo": "The UTXO ID as a string",
|
|
},
|
|
})
|
|
zip.Describe("github.com/luxfi/node/vms/xvm POST /tx", zip.Doc{
|
|
Description: "Sends a signed transaction to consensus and returns its id.\n\nThe bytes carry their own authority: the node holds no key that could have\nsigned them, so it checks no signature and consensus is what decides.",
|
|
Example: json.RawMessage(`{"tx":"0x00000000000...","encoding":"hex"}`),
|
|
})
|
|
}
|