• Public
  • Public/Protected
  • All

Interface AuthenticationTemplateScenarioData

An object defining the data to use while compiling a scenario.


  • AuthenticationTemplateScenarioData



Optional bytecode

bytecode: undefined | {}

A map of full identifiers to scripts which compile to their values for this scenario.

Scripts are provided in BTL, and have access to each other and all other template scripts and defined variables. However, cyclical references will produce an error at compile time. Also, because the results of these compilations will be used to generate the transaction context for this scenario, these scripts may not use compiler operations which themselves require access to transaction context (e.g. signatures).

The provided fullIdentifier should match the complete identifier for each item, e.g. some_wallet_data, variable_id.public_key, or variable_id.signature.all_outputs.

All AddressData and WalletData variables must be provided via bytecode, and pre-computed results for operations of other variable types (e.g. key.public_key) may also be provided via this property.

Because each bytecode identifier may precisely match the identifier of the variable it defines for this scenario, references between these scripts must refer to the target script with a _scenario_ prefix. E.g. to reference a sibling script my_foo from my_bar, the my_bar script must use the identifier _scenario_my_foo.

Optional currentBlockHeight

currentBlockHeight: undefined | number

The current block height at the "address creation time" implied in this scenario.

Optional currentBlockTime

currentBlockTime: undefined | number

The current MTP block time as a UNIX timestamp at the "address creation time" implied in this scenario.

Note, this is never a current timestamp, but rather the median timestamp of the last 11 blocks. It is therefore approximately one hour in the past.

Every block has a precise MTP block time, much like a block height. See BIP113 for details.

Optional hdKeys

hdKeys: undefined | { addressIndex?: undefined | number; hdPrivateKeys?: undefined | {}; hdPublicKeys?: undefined | {} }

An object describing the settings used for HdKey variables in this scenario.

Optional keys

keys: undefined | { privateKeys?: undefined | {} }

An object describing the settings used for Key variables in this scenario.

Generated using TypeDoc