An object defining the data to use while compiling this scenario. The
properties specified here are used to extend the existing scenario data
based on this scenario's extends
property.
Each property is extended individually – to unset a previously-set property, the property must be individually overridden in this object.
An optionally multi-line, free-form, human-readable description for this scenario (for use in user interfaces). If displayed, this description should use a monospace font to properly render ASCII diagrams.
The identifier of the scenario which this scenario extends. Any data
or
transaction
properties not defined in this scenario inherit from the
extended parent scenario.
If undefined, this scenario is assumed to extend the default scenario:
The default values for data
are set:
Key
variables and entities in this template
are lexicographically sorted, then each is assigned an incrementing
positive integer – beginning with 1
– encoded as an unsigned, 256-bit,
big-endian integer (i.e. 0x0000...0001
(32 bytes), 0x0000...0002
,
0x0000...0003
, etc.). For Key
s, this assigned value is used as the
private key; For entities, the assigned value is used as the master seed of
that entity's HdPrivateKey
. If hdKey
is set, the addressIndex
is set
to 0
.currentBlockHeight
is set to 2
. This is the height of the second
mined block after the genesis block:
000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd
. This
default value was chosen to be low enough to simplify the debugging of
block height offsets while remaining differentiated from 0
and 1
which
are used both as boolean return values and for control flow.currentBlockTime
is set to 1231469665
. This is the Median Time-Past
block time (BIP113) of block 2
.Then transaction
is set based on use:
transaction
property used.When a scenario is extended, each property of data
and transaction
is
extended individually: if the extending scenario does not provide a new
value for data.bytecode.value
or transaction.property
, the parent value
is used. To avoid inheriting a parent value, each child value must be
individually overridden.
A single-line, Title Case, human-readable name for this scenario for use in
user interfaces, e.g.: Delayed Recovery
.
The transaction within which this scenario should be evaluated. This is used for script testing and validation.
If undefined, inherits the default value for each property:
{
"inputs": [{ "unlockingBytecode": null }],
"locktime": 0,
"outputs": [{ "lockingBytecode": "" }],
"version": 2
}
Any transaction
property which is not set will be inherited from the
scenario specified by extends
. when specifying the inputs
and outputs
properties, each input and output extends the default values for inputs and
outputs, respectively.
For example, an input of {}
is interpreted as:
{
"outpointIndex": 0,
"outpointTransactionHash":
"0000000000000000000000000000000000000000000000000000000000000000",
"sequenceNumber": 0
}
And an output of {}
is interpreted as:
{
"lockingBytecode": {
"script": null,
"overrides": { "hdKeys": { "addressIndex": 1 } }
},
"satoshis": 0
}
The value in satoshis of the hypothetical output being spent by the input under test in this scenario.
May be encoded as either a number (for values below 2^53-1
) or a
little-endian, unsigned 64-bit integer in hexadecimal format (a
16-character string).
If undefined, defaults to 0
.
Generated using TypeDoc
An object describing the configuration for a particular scenario within an authentication template.