Witness Interfaces
List of data interfaces for the Witness API.
Notice any mistakes, or something missing? Please let us know!
You can submit an issue here: Submit Issue
Witness Template
A template interface, used when creating a new witness statement.
interface WitnessTemplate {
action : string // The instruction to execute.
args ?: Literal[] // A list of arguments for the method.
content ?: string // Additional user-specified content.
method : string // The method to use for evaluation.
path : string // The spending path to select (if applicable).
stamp ?: number // The UTC timestamp for the statement.
}
Witness Data
A signed statement that is ready to be input into the virtual machine.
interface WitnessData {
action : string // The instruction to execute.
args ?: Literal[] // A list of arguments for the method.
content ?: string // Additional user-specified content.
method : string // The method to use for evaluation.
path : string // The spending path to select (if applicable).
prog_id : string // The unique identifier of the program to use.
sigs : string[] // A list of signatures endorsing the statement.
stamp : number // The UTC timestamp for the statement.
vmid : string // Hash identifier of the machine to use.
wid : string // Hash identifier of the statement (for signing).
}
Witness Receipt
A signed receipt that confirms a statement was evaluated by the machine.
interface WitnessReceipt extends WitnessData {
agent_pk : string // The public key being used by the escrow server.
commit_at : number // UTC timestamp for when the receipt was created.
commit_id : string // Hash identifier for the receipt.
commit_sig : string // A confirmation signature from the escrow server.
vm_closed : boolean // The result state of the virtual machine.
vm_head : string // The result head of the hash-chain in the machine.
vm_output : string | null // The result output of the machine.
vm_step : number // The result execution step of the machine.
}