Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected api

Methods

countAll

  • countAll(): Observable<Long>
  • Get the total number of accounts registered on the blockchain.

    Returns Observable<Long>

create

  • Create a new account.

    Parameters

    • registrar: Credentials

      credentials used to register the new account

    • name: string

      new account name

    • address: Address

      new account public key address

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

    a transaction confirmation

createAccountOperation

  • Create a register new account operation.

    Parameters

    • registrar: ChainObject

      credentials used to register the new account

    • name: string

      new account name

    • address: Address

      new account public key address

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AccountCreateOperation>

    a transaction confirmation

createCredentials

  • createCredentials(accountName: string, privateKey: string): Observable<Credentials>
  • Create API credentials.

    Parameters

    • accountName: string

      account name

    • privateKey: string

      private key in wif base58 format, eg. 5Jd7zdvxXYNdUfnEXt5XokrE3zwJSs734yQ36a1YaqioRTGGLtn

    Returns Observable<Credentials>

    credentials

createMemo

createTransfer

  • Create a transfer operation.

    Parameters

    • credentials: Credentials

      account credentials

    • account: AccountRef

      account id or account name

    • amount: AssetAmount

      amount to send with asset type

    • Optional memo: undefined | string

      optional message

    • Default value encrypted: boolean = true

      encrypted is visible only for sender and receiver, unencrypted is visible publicly

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransferOperation>

    a transaction confirmation

createUpdateOperation

  • Create update account operation. Fills model with actual account values.

    Parameters

    • account: AccountRef

      account id or name

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AccountUpdateOperation>

exist

  • Check if the account exist.

    Parameters

    Returns Observable<boolean>

    account exists in DCore database

findAll

  • Get registered accounts that match search term.

    Parameters

    • searchTerm: string

      will try to partially match account name or id

    • Default value order: SearchAccountsOrder = SearchAccountsOrder.NameDesc

      sort data by field

    • Default value id: ChainObject = ObjectType.Null.genericId()

      object id to start searching from

    • Default value limit: number = 1000

      number of items to get, max 1000

    Returns Observable<Account[]>

    list of found accounts

findAllReferencesByAccount

  • Get all accounts that refer to the account id in their owner or active authorities.

    Parameters

    Returns Observable<ChainObject[]>

    a list of account object ids

findAllReferencesByKeys

  • Get account object ids by public key addresses.

    Parameters

    • keys: Address[]

      formatted public keys of the account, eg. DCT5j2bMj7XVWLxUW7AXeMiYPambYFZfCcMroXDvbCfX1VoswcZG4

    Returns Observable<ChainObject[][]>

    a list of account object ids

get

getAll

getAllByNames

  • getAllByNames(names: string[]): Observable<Account[]>

getByName

  • getByName(name: string): Observable<Account>

getFullAccounts

  • getFullAccounts(namesOrIds: string[], subscribe?: boolean): Observable<Map<string, FullAccount>>
  • Fetch all objects relevant to the specified accounts and subscribe to updates.

    Parameters

    • namesOrIds: string[]

      list of account names or ids

    • Default value subscribe: boolean = false

      true to subscribe to updates

    Returns Observable<Map<string, FullAccount>>

    map of names or ids to account, or empty map if not present

getStatistics

listAllRelative

  • listAllRelative(lowerBound: string, limit?: number): Observable<Map<string, ChainObject>>
  • Get names and IDs for registered accounts.

    Parameters

    • lowerBound: string

      lower bound of the first name to return

    • Default value limit: number = 1000

      number of items to get, max 1000

    Returns Observable<Map<string, ChainObject>>

    map of account names to corresponding IDs

Protected request

transfer

  • Make a transfer.

    Parameters

    • credentials: Credentials

      account credentials

    • account: AccountRef

      account id or account name

    • amount: AssetAmount

      amount to send with asset type

    • Optional memo: undefined | string

      optional message

    • Default value encrypted: boolean = true

      encrypted is visible only for sender and receiver, unencrypted is visible publicly

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

    a transaction confirmation

update

  • Update account.

    Parameters

    • credentials: Credentials

      account credentials

    • Optional options: AccountOptions

      new account options

    • Optional active: Authority

      new active authority

    • Optional owner: Authority

      new owner authority

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

Generated using TypeDoc