Home Reference Source Test
public class | source

Account

Direct Subclass:

BasicAccount, Contract

Static Method Summary

Static Public Methods
public static

dataToPlain(data: Uint8Array): object

public static

fromAny(o: Account | object): *

public static

fromPlain(plain: object): Account

public static

proofToPlain(proof: Uint8Array): object

public static

Create Account object from binary form.

Constructor Summary

Public Constructor
public

constructor(type: Account.Type, balance: number)

Member Summary

Public Members
public get

balance: number

public get

serializedSize: number: *

public get

type: Account.Type

Method Summary

Public Methods
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

toPlain(): object

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

Static Public Methods

public static dataToPlain(data: Uint8Array): object source

Params:

NameTypeAttributeDescription
data Uint8Array

Return:

object

public static fromAny(o: Account | object): * source

Params:

NameTypeAttributeDescription
o Account | object

Return:

*

public static fromPlain(plain: object): Account source

Params:

NameTypeAttributeDescription
plain object

Return:

Account

public static proofToPlain(proof: Uint8Array): object source

Params:

NameTypeAttributeDescription
proof Uint8Array

Return:

object

public static unserialize(buf: SerialBuffer): Account source

Create Account object from binary form.

Params:

NameTypeAttributeDescription
buf SerialBuffer

Buffer to read from.

Return:

Account

Newly created Account object.

Public Constructors

public constructor(type: Account.Type, balance: number) source

Params:

NameTypeAttributeDescription
type Account.Type
balance number

Public Members

public get balance: number source

public get serializedSize: number: * source

Return:

number

public get type: Account.Type source

Public Methods

public equals(o: Account): boolean source

Check if two Accounts are the same.

Params:

NameTypeAttributeDescription
o Account

Object to compare with.

Return:

boolean

Set if both objects describe the same data.

public isInitial(): boolean source

Return:

boolean

public isToBePruned(): boolean source

Return:

boolean

public serialize(buf: SerialBuffer): SerialBuffer source

Serialize this Account object into binary form.

Params:

NameTypeAttributeDescription
buf SerialBuffer
  • optional
  • nullable: true

Buffer to write to.

Return:

SerialBuffer

Buffer from buf or newly generated one.

public toPlain(): object source

Return:

object

public toString(): string source

Return:

string

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

Params:

NameTypeAttributeDescription
balance number

Return:

Account | *

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

Params:

NameTypeAttributeDescription
transaction Transaction
blockHeight number
revert boolean
  • optional

Return:

Account

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

Params:

NameTypeAttributeDescription
transaction Transaction
blockHeight number
revert boolean
  • optional

Return:

Account

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

Params:

NameTypeAttributeDescription
transaction Transaction
blockHeight number
transactionsCache TransactionCache
revert boolean
  • optional

Return:

Account