Constructors

Properties

client: Client
expireTime: number = ...

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

Methods

  • Set witness voting proxy.

    Parameters

    • data: {
          account: string;
          proxy: string;
      }

      The account_witness_proxy payload. See AccountWitnessProxyOperation

      • account: string
      • proxy: string
    • key: PrivateKey

      The private key of the account, should be the Active key at least.

    Returns Promise<TransactionConfirmation>

    Current Blurt Layer 1 rejects witness proxies after hardfork 0.8 (account_witness_proxy_evaluator asserts that proxies were disabled). Use direct witness votes instead.

  • Witness vote. Vote from an account to a witness.

    Parameters

    • data: {
          account: string;
          approve: boolean;
          witness: string;
      }

      The account_witness_vote payload. See AccountWitnessVoteOperation

      • account: string
      • approve: boolean
      • witness: string
    • key: PrivateKey

      The private key of the account, should be the Active key at least.

    Returns Promise<TransactionConfirmation>

    Since HF 0.8 the formula VS/N where VP is the Vesting Share of the account and N the number of witnesses upvoted by the account is applied.

  • Convenience for calling condenser_api.

    Parameters

    • method: string
    • Optionalparams: any[]

    Returns Promise<any>

  • Change recovery account. Funds withdrawals from the savings can be canceled at any time before it is executed.

    Parameters

    • data: {
          account_to_recover: string;
          extensions: any[];
          new_recovery_account: string;
      }

      The change_recovery_account payload. See ChangeRecoveryAccountOperation

      • account_to_recover: string

        The account that would be recovered in case of compromise.

      • extensions: any[]

        Extensions. Not currently used.

      • new_recovery_account: string

        The account that creates the recover request.

    • key: PrivateKey

      The Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Claim account. Requests from users or dApps to get an account creation ticket in order to create new accounts. These operations are issued before the actual creation of the account on the blockchain.

    Parameters

    • data: {
          creator: string;
          extensions: any[];
          fee: string | Asset;
      }

      The claim_account payload. See ClaimAccountOperation

      • creator: string
      • extensions: any[]

        Extensions. Not currently used.

      • fee: string | Asset
    • key: PrivateKey

      The Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

    Current Blurt Layer 1 rejects claim_account after hardfork 0.2 (claim_account_evaluator asserts that this operation is disabled). Use regular account creation flows supported by current chain rules instead.

  • Claim reward balance. Author and curator rewards are not automatically transferred to the account’s balances. One has to issue a claim_reward_balance operation to trigger the transfer from the reward pool to its balance.

    Parameters

    • data: {
          account: string;
          reward_blurt: string | Asset;
          reward_vests: string | Asset;
      }

      The claim_reward_balance payload. See ClaimRewardBalanceOperation

      • account: string
      • reward_blurt: string | Asset
      • reward_vests: string | Asset
    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Comment. Creates a post/comment.

    Parameters

    • data: {
          author: string;
          body: string;
          json_metadata: string;
          parent_author: string;
          parent_permlink: string;
          permlink: string;
          title: string;
      }

      The comment payload. See CommentOperation

      • author: string

        author of the post/comment being submitted (account name).

      • body: string

        body of the post/comment being submitted, or diff-match-patch when updating.

      • json_metadata: string

        JSON object string.

      • parent_author: string

        the author that comment is being submitted to, when posting a new blog this is an empty string.

      • parent_permlink: string

        specific post that comment is being submitted to, when posting a new blog this become the category of the post (tags[0]).

      • permlink: string

        unique string identifier for the post, linked to the author of the post.

      • title: string

        human readable title of the post being submitted, this is often blank when commenting.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    • Optionaloptions: {
          allow_curation_rewards: boolean;
          allow_votes: boolean;
          author: string;
          extensions: [number, {
              beneficiaries: BeneficiaryRoute[];
          } | {
              percent_blurt: number;
          }][];
          max_accepted_payout: string | Asset;
          permlink: string;
      }

      The comment_options payload [optional]. See CommentOptionsOperation

      • allow_curation_rewards: boolean

        Whether to allow post to recieve curation rewards. If false rewards return to reward fund.

      • allow_votes: boolean

        Whether to allow post to receive votes.

      • author: string

        author of the post/comment being submitted (account name).

      • extensions: [number, {
            beneficiaries: BeneficiaryRoute[];
        } | {
            percent_blurt: number;
        }][]
      • max_accepted_payout: string | Asset

        the maximum payout this post will receive. asset( 1000000000, BLURT_SYMBOL )

      • permlink: string

        human readable title of the post being submitted, this is often blank when commenting.

    Returns Promise<TransactionConfirmation>

    Rules:

    • The “title” must not be longer than 256 bytes
    • The “title” must be UTF-8
    • The “body” must be larger than 0 bytes
    • The “body” much also be UTF-8

    json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure:

    • tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five
    • app - A user agent style application identifier. Typically app_name/version, e.g. beblurt/0.1
    • format - The format of the body, e.g. markdown

    In addition to the above keys, application developers are free to add any other keys they want to help manage the content they broadcast.

    When a comment is first broadcast, the permlink must be unique for the author. Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch.

  • Comment options. Authors of posts may not want all of the benefits that come from creating a post. This operation allows authors to update properties associated with their post. Typically, these options will accompany a comment operation in the same transaction.

    Parameters

    • data: {
          allow_curation_rewards: boolean;
          allow_votes: boolean;
          author: string;
          extensions: [number, {
              beneficiaries: BeneficiaryRoute[];
          } | {
              percent_blurt: number;
          }][];
          max_accepted_payout: string | Asset;
          permlink: string;
      }

      The comment_options payload. See CommentOptionsOperation

      • allow_curation_rewards: boolean

        Whether to allow post to recieve curation rewards. If false rewards return to reward fund.

      • allow_votes: boolean

        Whether to allow post to receive votes.

      • author: string

        author of the post/comment being submitted (account name).

      • extensions: [number, {
            beneficiaries: BeneficiaryRoute[];
        } | {
            percent_blurt: number;
        }][]
      • max_accepted_payout: string | Asset

        the maximum payout this post will receive. asset( 1000000000, BLURT_SYMBOL )

      • permlink: string

        human readable title of the post being submitted, this is often blank when commenting.

    • key: PrivateKey

      The Active or Owner private key of the account creator.

    Returns Promise<TransactionConfirmation>

  • Create claimed account. When used with claim_account, works identically to account_create See accountCreate.

    Parameters

    Returns Promise<TransactionConfirmation>

    Current Blurt Layer 1 rejects create_claimed_account after hardfork 0.2 (create_claimed_account_evaluator asserts that this operation is disabled). Use regular account creation flows supported by current chain rules instead.

  • Create a governance proposal.

    Parameters

    • data: {
          creator: string;
          daily_pay: string | Asset;
          end_date: string;
          extensions: any[];
          permlink: string;
          receiver: string;
          start_date: string;
          subject: string;
      }
      • creator: string
      • daily_pay: string | Asset
      • end_date: string
      • extensions: any[]

        Extensions. Not currently used.

      • permlink: string
      • receiver: string
      • start_date: string
      • subject: string
    • key: PrivateKey

    Returns Promise<TransactionConfirmation>

  • Broadcast custom JSON. Serves the same purpose as custom but also supports required posting authorities. Unlike custom, this operation is designed to be human readable/developer friendly.

    Parameters

    • data: {
          id: string;
          json: string;
          required_auths: string[];
          required_posting_auths: string[];
      }

      The custom_json operation payload. See CustomJsonOperation

      • 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

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • 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: {
          delegatee: string;
          delegator: string;
          vesting_shares: string | Asset;
      }

      Delegation options. See DelegateVestingSharesOperation

      • 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>

  • Approve or reject an escrow transfer.

    Parameters

    • data: {
          agent: string;
          approve: boolean;
          escrow_id: number;
          from: string;
          to: string;
          who: string;
      }

      The escrow_approve payload. See EscrowApproveOperation.

      • agent: string
      • approve: boolean
      • escrow_id: number
      • from: string
      • to: string
      • who: string

        Either to or agent.

    • key: PrivateKey

      Private active key of data.who.

    Returns Promise<TransactionConfirmation>

  • Release funds from an escrow transfer.

    Parameters

    • data: {
          agent: string;
          blurt_amount: string | Asset;
          escrow_id: number;
          from: string;
          receiver: string;
          to: string;
          who: string;
      }

      The escrow_release payload. See EscrowReleaseOperation.

      • agent: string
      • blurt_amount: string | Asset

        The amount of blurt to release.

      • escrow_id: number
      • from: string
      • receiver: string

        The account that should receive funds (might be from, might be to).

      • to: string

        The original 'to'.

      • who: string

        The account that is attempting to release the funds, determines valid 'receiver'.

    • key: PrivateKey

      Private active key of data.who.

    Returns Promise<TransactionConfirmation>

  • Create an escrow transfer.

    Parameters

    • data: {
          agent: string;
          blurt_amount: string | Asset;
          escrow_expiration: string;
          escrow_id: number;
          fee: string | Asset;
          from: string;
          json_meta: string;
          ratification_deadline: string;
          to: string;
      }

      The escrow_transfer payload. See EscrowTransferOperation.

      • agent: string
      • blurt_amount: string | Asset
      • escrow_expiration: string
      • escrow_id: number
      • fee: string | Asset
      • from: string
      • json_meta: string
      • ratification_deadline: string
      • to: string
    • key: PrivateKey

      Private active key of the sender.

    Returns Promise<TransactionConfirmation>

  • Stickies a post to the top of the community homepage (Mods or higher). If multiple posts are stickied, the newest ones are shown first.

    Parameters

    • authority: string

      The account submitting the custom_json operation.

    • referrer: string

      The referrer of the account.

    • campaign: string

      The campaign id of the referrer.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Used by guests to suggest a post for the review queue. It’s up to the community to define what constitutes flagging.

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • notes: string

      short notes

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Mute a post (Mods or higher). Can be a topic or a comment.

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • notes: string

      short notes

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Stickies a post to the top of the community homepage (Mods or higher). If multiple posts are stickied, the newest ones are shown first.

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Stickies a post to the top of the community homepage (Mods or higher). If multiple posts are stickied, the newest ones are shown first.

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The account submitting the custom_json operation.

    • role:
          | "muted"
          | "guest"
          | "member"
          | "mod"
          | "admin"

      The author of the post.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Stickies a post to the top of the community homepage (Mods or higher). If multiple posts are stickied, the newest ones are shown first.

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The account submitting the custom_json operation.

    • title: string

      title for the account

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Un/subscribe to a community (Guest Operations)

    Parameters

    • community: string

      The community account concerned.

    • action: "subscribe" | "unsubscribe"

      Un/subscribe to a community.

    • account: string

      The account submitting the custom_json operation.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Unmute a post (Mods or higher).

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • notes: string

      short notes

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Removes a post to the top of the community homepage (Mods or higher).

    Parameters

    • community: string

      The community account concerned.

    • authority: string

      The account submitting the custom_json operation.

    • account: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Reblurt/Undo Reblurt a post

    Parameters

    • account: string

      The account submitting the custom_json operation.

    • author: string

      The author of the post.

    • permlink: string

      The permlink of the post.

    • undo: boolean = false

      if true Undo Reblurt else Reblurt

    • key: PrivateKey

      The Posting, Active or Owner private key of the account.

    Returns Promise<TransactionConfirmation>

  • Recover an account using current and recent owner authorities.

    Parameters

    • data: {
          account_to_recover: string;
          extensions: any[];
          new_owner_authority: AuthorityType;
          recent_owner_authority: AuthorityType;
      }

      The recover_account payload. See RecoverAccountOperation.

      • account_to_recover: string

        The account to be recovered.

      • extensions: any[]

        Extensions. Not currently used.

      • new_owner_authority: AuthorityType

        The new owner authority as specified in the request account recovery operation.

      • recent_owner_authority: AuthorityType

        A previous owner authority that the account holder will use to prove past ownership of the account to be recovered.

    • key: PrivateKey | PrivateKey[]

      Private owner key or keys required by the recovery authorities.

    Returns Promise<TransactionConfirmation>

  • Remove governance proposals owned by an account.

    Parameters

    • data: {
          extensions: any[];
          proposal_ids: number[];
          proposal_owner: string;
      }
      • extensions: any[]
      • proposal_ids: number[]

        IDs of proposals to be removed. Nonexisting IDs are ignored.

      • proposal_owner: string
    • key: PrivateKey

    Returns Promise<TransactionConfirmation>

  • Create an account recovery request.

    Parameters

    • data: {
          account_to_recover: string;
          extensions: any[];
          new_owner_authority: AuthorityType;
          recovery_account: string;
      }

      The request_account_recovery payload. See RequestAccountRecoveryOperation.

      • account_to_recover: string

        The account to recover. This is likely due to a compromised owner authority.

      • extensions: any[]

        Extensions. Not currently used.

      • new_owner_authority: AuthorityType

        The new owner authority the account to recover wishes to have. This is secret known by the account to recover and will be confirmed in a recover_account_operation.

      • recovery_account: string

        The recovery account is listed as the recovery account on the account to recover.

    • key: PrivateKey

      Private owner key of the recovery account.

    Returns Promise<TransactionConfirmation>

  • Vote for or against governance proposals.

    Parameters

    • data: {
          approve: boolean;
          extensions: any[];
          proposal_ids: number[];
          voter: string;
      }
      • approve: boolean
      • extensions: any[]
      • proposal_ids: number[]
      • voter: string

        IDs of proposals to vote for/against. Nonexisting IDs are ignored.

    • key: PrivateKey

    Returns Promise<TransactionConfirmation>

  • Broadcast a vote.

    Parameters

    • vote: {
          author: string;
          permlink: string;
          voter: string;
          weight: number;
      }

      The vote to send.

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

        Voting weight, 100% = 10000 (100_PERCENT).

    • key: PrivateKey

      Private posting key of the voter.

    Returns Promise<TransactionConfirmation>