Home Reference Source Repository
import {FincIfNode} from 'fincontracts-lib/src/fincontract.js'
public class | source

FincIfNode

Extends:

FincNode → FincIfNode

FincIfNode extends FincNode and implements If primitive, which takes two sub-fincontracts and a Gateway address. Upon execution Gateway defines, which sub-fincontract is valid and which is not. If Gateway returns 1 then the first sub-fincontract is chosen, otherwise second sub-fincontract is chosen. Gateway has to conform to the Gateway interface (see Gateway smart contract at FincontractMarketplace).

Constructor Summary

Public Constructor
public

constructor(leftChild: FincNode, rightChild: FincNode, gatewayAddress: String)

Constructs FincIfNode with two children and a Gateway address

Member Summary

Public Members
public

32-byte address of the blockchain deployed Gateway

Inherited Summary

From class FincNode
public

References to children, can be an Array of FincNode, a FincNode or simply null.

Public Constructors

public constructor(leftChild: FincNode, rightChild: FincNode, gatewayAddress: String) source

Constructs FincIfNode with two children and a Gateway address

Override:

FincNode#constructor

Params:

NameTypeAttributeDescription
leftChild FincNode

first sub-fincontract to be embedded

rightChild FincNode

second sub-fincontract to be embedded

gatewayAddress String

32-byte address of the blockchain deployed Gateway

Public Members

public gatewayAddress: String source

32-byte address of the blockchain deployed Gateway