### Hierarchy

- BroadcastAPI

## Index

### Constructors

- constructor

### Properties

- client
- expireTime

### Methods

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

## Constructors

### constructor

- new BroadcastAPI(client: Client): BroadcastAPI

- - Defined in helpers/broadcast.ts:105

  #### Parameters

  - ##### client: Client

  #### Returns BroadcastAPI

## Properties

### client

client: Client

- Defined in helpers/broadcast.ts:107

### expireTime

expireTime: number = 60 * 1000

- Defined in helpers/broadcast.ts:105

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:364

  Convenience for calling `condenser_api`.

  #### Parameters

  - ##### method: string

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

  #### Returns Promise<any>

### comment

- comment(comment: CommentOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:114

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

  #### Parameters

  - ##### comment: CommentOperation[1]

    The comment/post.

  - ##### key: PrivateKey

    Private posting key of comment author.

  #### Returns Promise<TransactionConfirmation>

### commentWithOptions

- commentWithOptions(comment: CommentOperation[1], options: CommentOptionsOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:125

  Broadcast a comment and set the options.

  #### Parameters

  - ##### comment: CommentOperation[1]

    The comment/post.

  - ##### options: CommentOptionsOperation[1]

    The comment/post options.

  - ##### key: PrivateKey

    Private posting key of comment author.

  #### Returns Promise<TransactionConfirmation>

### createTestAccount

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

- - Defined in helpers/broadcast.ts:172

  Create a new account on testnet.

  #### Parameters

  - ##### options: CreateAccountOptions

    New account options.

  - ##### key: PrivateKey

    Private active key of account creator.

  #### Returns Promise<TransactionConfirmation>

### delegateVestingShares

- delegateVestingShares(options: DelegateVestingSharesOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:297

  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: DelegateVestingSharesOperation[1]

    Delegation options.

  - ##### key: PrivateKey

    Private active key of the delegator.

  #### Returns Promise<TransactionConfirmation>

### json

- json(data: CustomJsonOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:162

  Broadcast custom JSON.

  #### Parameters

  - ##### data: CustomJsonOperation[1]

    The custom_json operation payload.

  - ##### key: PrivateKey

    Private posting or active key.

  #### Returns Promise<TransactionConfirmation>

### send

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

- - Defined in helpers/broadcast.ts:355

  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:310

  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:345

  Sign a transaction with key(s).

  #### Parameters

  - ##### transaction: Transaction

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

  #### Returns SignedTransaction

### transfer

- transfer(data: TransferOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:152

  Broadcast a transfer.

  #### Parameters

  - ##### data: TransferOperation[1]

    The transfer operation payload.

  - ##### key: PrivateKey

    Private active key of sender.

  #### Returns Promise<TransactionConfirmation>

### updateAccount

- updateAccount(data: AccountUpdateOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:280

  Update account.

  #### Parameters

  - ##### data: AccountUpdateOperation[1]

    The account_update payload.

  - ##### 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: VoteOperation[1], key: PrivateKey): Promise<TransactionConfirmation>

- - Defined in helpers/broadcast.ts:142

  Broadcast a vote.

  #### Parameters

  - ##### vote: VoteOperation[1]

    The vote to send.

  - ##### key: PrivateKey

    Private posting key of the voter.

  #### Returns Promise<TransactionConfirmation>

Generated using TypeDoc