### Hierarchy

- BroadcastAPI

## Index

### Constructors

- constructor

### Properties

- client
- expireTime

### Methods

- call
- comment
- commentWithOptions
- createAccount
- delegateVestingShares
- json
- send
- sendOperations
- sign
- transfer
- updateAccount
- vote

## Constructors

### constructor

- new BroadcastAPI(client: Client): BroadcastAPI

- - Defined in helpers/broadcast.ts:103

  #### Parameters

  - ##### client: Client

  #### Returns BroadcastAPI

## Properties

### client

client: Client

- Defined in helpers/broadcast.ts:105

### expireTime

expireTime: number = 60 * 1000

- Defined in helpers/broadcast.ts:103

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>

- - Defined in helpers/broadcast.ts:305

  Convenience for calling `network_broadcast_api`.

  #### Parameters

  - ##### method: string

  - ##### Optional params: any[]

  #### Returns Promise<any>

### comment

- comment(comment: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:112

  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

- commentWithOptions(comment: object, options: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:123

  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>

### createAccount

- createAccount(options: CreateAccountOptions, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:168

  Create a new account.

  #### Parameters

  - ##### options: CreateAccountOptions

    New account options.

  - ##### key: PrivateKey

    Private active key of account creator.

  #### Returns Promise<TransactionConfirmation>

### delegateVestingShares

- delegateVestingShares(options: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:255

  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

- json(data: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:158

  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

- send(transaction: SignedTransaction): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:298

  Broadcast a signed transaction to the network.

  #### Parameters

  - ##### transaction: SignedTransaction

  #### Returns Promise<TransactionConfirmation>

### sendOperations

- sendOperations(operations: Operation[], key: PrivateKey | PrivateKey[]): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:265

  Sign and broadcast transaction with operations to the network. Throws if the transaction expires.

  #### Parameters

  - ##### operations: Operation[]

    List of operations to send.

  - ##### key: PrivateKey | PrivateKey[]

    Private key(s) used to sign transaction.

  #### Returns Promise<TransactionConfirmation>

### sign

- sign(transaction: Transaction, key: PrivateKey | PrivateKey[]): SignedTransaction

- - Defined in helpers/broadcast.ts:291

  Sign a transaction with key(s).

  #### Parameters

  - ##### transaction: Transaction

  - ##### key: PrivateKey | PrivateKey[]

  #### Returns SignedTransaction

### transfer

- transfer(data: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:148

  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

- updateAccount(data: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:238

  Update account.

  #### Parameters

  - ##### data: object

    The account_update payload.

    - ##### account: string

    - ##### Optional active?: AuthorityType

    - ##### json_metadata: string

    - ##### memo_key: string | PublicKey

    - ##### Optional owner?: AuthorityType

    - ##### Optional posting?: AuthorityType

  - ##### key: PrivateKey

    The private key of the account affected, should be the corresponding key level or higher for updating account authorities.

  #### Returns Promise<TransactionConfirmation>

### vote

- vote(vote: object, key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:138

  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