Home Reference Source Test
public class | source

VestingContract

Extends:

AccountContract → VestingContract

Static Method Summary

Static Public Methods
public static

create(balance: number, blockHeight: number, transaction: Transaction): *

public static
public static

verifyIncomingTransaction(transaction: Transaction): boolean

public static

verifyOutgoingTransaction(transaction: Transaction): boolean

Constructor Summary

Public Constructor
public

constructor(balance: number, owner: Address, vestingStart: number, vestingStepBlocks: number, vestingStepAmount: number, vestingTotalAmount: number)

Member Summary

Public Members
public get
public get

serializedSize: number: *

public get

vestingStart: number

public get
public get
public get

Method Summary

Public Methods
public

equals(o: Account): boolean

Check if two Accounts are the same.

public

getMinCap(blockHeight: number): number

public

Serialize this VestingContract object into binary form.

public

toString(): string

public

withBalance(balance: number): Account | *

public

withIncomingTransaction(transaction: Transaction, blockHeight: number, revert: boolean): Account

public

withOutgoingTransaction(transaction: Transaction, blockHeight: number, transactionsCache: TransactionCache, revert: boolean): Account | *

Inherited Summary

From class Account
public static

Create Account object from binary form.

public get

balance: number

public get

serializedSize: number: *

public get

type: Account.Type

public

equals(o: Account): boolean

Check if two Accounts are the same.

public

isInitial(): boolean

public

isToBePruned(): boolean

public

Serialize this Account object into binary form.

public

toString(): string

public

withBalance(balance: number): Account | *

public

withContractCommand(transaction: Transaction, blockHeight: number, revert: boolean): Account

public

withIncomingTransaction(transaction: Transaction, blockHeight: number, revert: boolean): Account

public

withOutgoingTransaction(transaction: Transaction, blockHeight: number, transactionsCache: TransactionCache, revert: boolean): Account

From class Contract
public static

verifyIncomingTransaction(transaction: Transaction): boolean

public

withContractCommand(transaction: Transaction, blockHeight: number, revert: boolean): Account

public

withIncomingTransaction(transaction: Transaction, blockHeight: number, revert: boolean): Account

Static Public Methods

public static create(balance: number, blockHeight: number, transaction: Transaction): * source

Params:

NameTypeAttributeDescription
balance number
blockHeight number
transaction Transaction

Return:

*

public static unserialize(buf: SerialBuffer): VestingContract source

Create Account object from binary form.

Override:

Account#unserialize

Params:

NameTypeAttributeDescription
buf SerialBuffer

Return:

VestingContract

public static verifyIncomingTransaction(transaction: Transaction): boolean source

Override:

Contract#verifyIncomingTransaction

Params:

NameTypeAttributeDescription
transaction Transaction

Return:

boolean

public static verifyOutgoingTransaction(transaction: Transaction): boolean source

Params:

NameTypeAttributeDescription
transaction Transaction

Return:

boolean

Public Constructors

public constructor(balance: number, owner: Address, vestingStart: number, vestingStepBlocks: number, vestingStepAmount: number, vestingTotalAmount: number) source

Override:

Contract#constructor

Params:

NameTypeAttributeDescription
balance number
  • optional
owner Address
  • optional
vestingStart number
  • optional
vestingStepBlocks number
  • optional
vestingStepAmount number
  • optional
vestingTotalAmount number
  • optional

Public Members

public get owner: Address source

public get serializedSize: number: * source

Override:

Account#serializedSize

Return:

number

public get vestingStart: number source

public get vestingStepAmount: number source

public get vestingStepBlocks: number source

public get vestingTotalAmount: number source

Public Methods

public equals(o: Account): boolean source

Check if two Accounts are the same.

Override:

Account#equals

Params:

NameTypeAttributeDescription
o Account

Object to compare with.

Return:

boolean

Set if both objects describe the same data.

public getMinCap(blockHeight: number): number source

Params:

NameTypeAttributeDescription
blockHeight number

Return:

number

public serialize(buf: SerialBuffer): SerialBuffer source

Serialize this VestingContract object into binary form.

Override:

Account#serialize

Params:

NameTypeAttributeDescription
buf SerialBuffer
  • optional
  • nullable: true

Buffer to write to.

Return:

SerialBuffer

Buffer from buf or newly generated one.

public toString(): string source

Override:

Account#toString

Return:

string

public withBalance(balance: number): Account | * source

Override:

Account#withBalance

Params:

NameTypeAttributeDescription
balance number

Return:

Account | *

public withIncomingTransaction(transaction: Transaction, blockHeight: number, revert: boolean): Account source

Override:

Contract#withIncomingTransaction

Params:

NameTypeAttributeDescription
transaction Transaction
blockHeight number
revert boolean
  • optional

Return:

Account

public withOutgoingTransaction(transaction: Transaction, blockHeight: number, transactionsCache: TransactionCache, revert: boolean): Account | * source

Override:

Account#withOutgoingTransaction

Params:

NameTypeAttributeDescription
transaction Transaction
blockHeight number
transactionsCache TransactionCache
revert boolean
  • optional

Return:

Account | *