Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BroadcastAPI

Hierarchy

  • BroadcastAPI

Index

Constructors

constructor

Properties

client

client: Client

expireTime

expireTime: number = 60 * 1000

How many milliseconds in the future to set the expiry time to when broadcasting a transaction, defaults to 1 minute.

Methods

call

  • call(method: string, params?: any[]): Promise<any>
  • Convenience for calling condenser_api.

    Parameters

    • method: string
    • Optional params: any[]

    Returns Promise<any>

comment

  • Broadcast a comment, also used to create a new top level post.

    Parameters

    • comment: object

      The comment/post.

      • author: string
      • body: string
      • json_metadata: string
      • parent_author: string
      • parent_permlink: string
      • permlink: string
      • title: string
    • key: PrivateKey

      Private posting key of comment author.

    Returns Promise<TransactionConfirmation>

commentWithOptions

  • Broadcast a comment and set the options.

    Parameters

    • comment: object

      The comment/post.

      • author: string
      • body: string
      • json_metadata: string
      • parent_author: string
      • parent_permlink: string
      • permlink: string
      • title: string
    • options: object

      The comment/post options.

      • allow_curation_rewards: boolean

        Whether to allow post to recieve curation rewards.

      • allow_votes: boolean

        Whether to allow post to receive votes.

      • author: string
      • extensions: Array<[0, object]>
      • max_accepted_payout: Asset | string

        SBD value of the maximum payout this post will receive.

      • percent_steem_dollars: number

        The percent of Steem Dollars to key, unkept amounts will be received as Steem Power.

      • permlink: string
    • key: PrivateKey

      Private posting key of comment author.

    Returns Promise<TransactionConfirmation>

createTestAccount

delegateVestingShares

  • Delegate vesting shares from one account to the other. The vesting shares are still owned by the original account, but content voting rights and bandwidth allocation are transferred to the receiving account. This sets the delegation to vesting_shares, increasing it or decreasing it as needed. (i.e. a delegation of 0 removes the delegation)

    When a delegation is removed the shares are placed in limbo for a week to prevent a satoshi of VESTS from voting on the same content twice.

    Parameters

    • options: object

      Delegation options.

      • delegatee: string

        The account receiving vesting shares.

      • delegator: string

        The account delegating vesting shares.

      • vesting_shares: string | Asset

        The amount of vesting shares delegated.

    • key: PrivateKey

      Private active key of the delegator.

    Returns Promise<TransactionConfirmation>

json

  • Broadcast custom JSON.

    Parameters

    • data: object

      The custom_json operation payload.

      • id: string

        ID string, must be less than 32 characters long.

      • json: string

        JSON encoded string, must be valid JSON.

      • required_auths: string[]
      • required_posting_auths: string[]
    • key: PrivateKey

      Private posting or active key.

    Returns Promise<TransactionConfirmation>

send

sendOperations

sign

transfer

  • Broadcast a transfer.

    Parameters

    • data: object

      The transfer operation payload.

      • amount: string | Asset

        Amount of STEEM or SBD to send.

      • from: string

        Sending account name.

      • memo: string

        Plain-text note attached to transaction.

      • to: string

        Receiving account name.

    • key: PrivateKey

      Private active key of sender.

    Returns Promise<TransactionConfirmation>

updateAccount

vote

  • Broadcast a vote.

    Parameters

    • vote: object

      The vote to send.

      • author: string
      • permlink: string
      • voter: string
      • weight: number

        Voting weight, 100% = 10000 (STEEMIT_100_PERCENT).

    • key: PrivateKey

      Private posting key of the voter.

    Returns Promise<TransactionConfirmation>

Generated using TypeDoc