npm package: @mariano-aguero/sdk
Description: A module for interacting with Livepeer's smart contracts. The SDK is a core dependency of most LivepeerJS packages.
Latest version: 1.0.0-alpha.6

# LivepeerJS SDK

[![home](https://img.shields.io/badge/%E2%97%80-home-lightgrey.svg?style=flat-square)](https://github.com/livepeer/livepeerjs#readme)
[![npm](https://img.shields.io/npm/v/@livepeer/sdk.svg?style=flat-square)](https://www.npmjs.com/package/@livepeer/sdk)
[![Discord](https://img.shields.io/discord/423160867534929930.svg?style=flat-square)](https://discord.gg/7wRSUGX)
[![coverage](https://github.com/livepeer/livepeerjs/raw/master/packages/sdk/coverage.svg?sanitize=true)](https://codeclimate.com/github/livepeer/livepeerjs/code?q=packages%2Fsdk%2Fsrc)
[![GitHub issues](https://img.shields.io/github/issues/livepeer/livepeerjs/sdk.svg?style=flat-square)](https://github.com/livepeer/livepeerjs/labels/sdk)

A module for interacting with Livepeer's smart contracts. The SDK is a core dependency of most LivepeerJS packages.

<!-- hide-on-docup-start -->

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API](#api)

<!-- hide-on-docup-stop -->

## Installation

```bash
yarn add @livepeer/sdk
```

## Usage

Here's a code snippet showing instantiation and basic usage of the Livepeer SDK.

```js
import LivepeerSDK from '@livepeer/sdk'

// Or if you prefer require
// const { LivepeerSDK } = require('@livepeer/sdk')
//
// First, call the SDK factory function
// pass it any configuration options
LivepeerSDK({ ... }).then(async (sdk) => {

  // Once initialized, you can access the methods under the `rpc` namespace
  const { rpc } = sdk

  // For example, you can get the total supply of Livepeer Tokens like so
  const tokens = await rpc.getTokenTotalSupply()

  console.log(tokens)
  // => string representation of some absurdly high number, maybe "9999999999999999999999" or something like that :)
})
```

To use with a testnet please instantiate with the following params:

```js
const provider = "https://rinkeby.infura.io" #or your testnet of choice
const controllerAddress = "0x37dC71366Ec655093b9930bc816E16e6b587F968"

LivepeerSDK({ provider, controllerAddress }).then(async sdk => {
  mycode...
})
```

The following section details the rpc API's function signatures and typedefs.

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

- [module~exports](#moduleexports)
  - [default](#default)
- [livepeer~rpc](#livepeerrpc)
  - [getENSName](#getensname)
  - [getENSAddress](#getensaddress)
  - [getBlock](#getblock)
  - [getEthBalance](#getethbalance)
  - [getUnbondingPeriod](#getunbondingperiod)
  - [getNumActiveTranscoders](#getnumactivetranscoders)
  - [getMaxEarningsClaimsRounds](#getmaxearningsclaimsrounds)
  - [getTotalBonded](#gettotalbonded)
  - [getTokenTotalSupply](#gettokentotalsupply)
  - [getTokenBalance](#gettokenbalance)
  - [getTokenInfo](#gettokeninfo)
  - [transferToken](#transfertoken)
  - [getFaucetAmount](#getfaucetamount)
  - [getFaucetWait](#getfaucetwait)
  - [getFaucetNext](#getfaucetnext)
  - [getFaucetInfo](#getfaucetinfo)
  - [getInflation](#getinflation)
  - [getInflationChange](#getinflationchange)
  - [getBroadcaster](#getbroadcaster)
  - [getDelegatorStatus](#getdelegatorstatus)
  - [getDelegator](#getdelegator)
  - [getTranscoderIsActive](#gettranscoderisactive)
  - [getTranscoderStatus](#gettranscoderstatus)
  - [getTranscoderTotalStake](#gettranscodertotalstake)
  - [getTranscoderPoolMaxSize](#gettranscoderpoolmaxsize)
  - [getTranscoder](#gettranscoder)
  - [getTranscoders](#gettranscoders)
  - [getProtocolPaused](#getprotocolpaused)
  - [getProtocol](#getprotocol)
  - [getRoundLength](#getroundlength)
  - [getRoundsPerYear](#getroundsperyear)
  - [getCurrentRound](#getcurrentround)
  - [getCurrentRoundIsInitialized](#getcurrentroundisinitialized)
  - [getCurrentRoundStartBlock](#getcurrentroundstartblock)
  - [getLastInitializedRound](#getlastinitializedround)
  - [getCurrentRoundInfo](#getcurrentroundinfo)
  - [getTotalJobs](#gettotaljobs)
  - [getJobVerificationRate](#getjobverificationrate)
  - [getJobVerificationPeriod](#getjobverificationperiod)
  - [getJobVerificationSlashingPeriod](#getjobverificationslashingperiod)
  - [getJobFinderFee](#getjobfinderfee)
  - [getJobsInfo](#getjobsinfo)
  - [getJob](#getjob)
  - [getJobs](#getjobs)
  - [tapFaucet](#tapfaucet)
  - [initializeRound](#initializeround)
  - [claimEarnings](#claimearnings)
  - [estimateGas](#estimategas)
  - [unbond](#unbond)
  - [setupTranscoder](#setuptranscoder)
  - [getTargetBondingRate](#gettargetbondingrate)
  - [deposit](#deposit)
  - [withdraw](#withdraw)
  - [withdrawStake](#withdrawstake)
  - [withdrawFees](#withdrawfees)
  - [createJob](#createjob)
- [getDelegatorUnbondingLock](#getdelegatorunbondinglock)
- [ABIPropDescriptor](#abipropdescriptor)
- [ContractArtifact](#contractartifact)
- [LivepeerSDKOptions](#livepeersdkoptions)
- [LivepeerSDK](#livepeersdk)
- [TokenInfo](#tokeninfo)
- [TxConfig](#txconfig)
- [TxReceipt](#txreceipt)
- [Protocol](#protocol)
- [FaucetInfo](#faucetinfo)
- [Broadcaster](#broadcaster)
- [Delegator](#delegator)
- [Transcoder](#transcoder)
- [UnbondingLock](#unbondinglock)
- [RoundInfo](#roundinfo)
- [Block](#block)
- [JobsInfo](#jobsinfo)
- [Job](#job)
- [Log](#log)

### module~exports

Livepeer SDK main module exports

#### default

Livepeer SDK factory function. Creates an instance of the Livepeer SDK -- an object with useful methods for interacting with Livepeer protocol smart contracts

**Parameters**

- `opts` **[LivepeerSDKOptions](#livepeersdkoptions)** SDK configuration options

**Examples**

```javascript
// Here we're naming the default export "LivepeerSDK"
import LivepeerSDK from '@livepeer/sdk'

// Call the factory function and await its Promise
LivepeerSDK().then(sdk => {
  // Your Livepeer SDK instance is now ready to use
})
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[LivepeerSDK](#livepeersdk)>**

### livepeer~rpc

"rpc" namespace of a Livepeer SDK instance

**Examples**

```javascript
import LivepeerSDK from '@livepeer/sdk'

LivepeerSDK().then(({ rpc }) => {
  // Here, we're destructuring the sdk to expose only its rpc namespace
  // Now, you you are able call rpc.<method-name>()
  // All rpc method yield Promises. Their usage is further explained below.
})
```

#### getENSName

Gets the ENS name for an address. This is known as a reverse lookup.
Unfortunately, users must explicitly set their own resolver.
So most of the time, this method just returns an empty string
More info here:
(<https://docs.ens.domains/en/latest/userguide.html#reverse-name-resolution>)

**Parameters**

- `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** address to look up an ENS name for

**Examples**

```javascript
await rpc.getENSName('0xd34db33f...')
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getENSAddress

Gets the address for an ENS name

**Parameters**

- `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ENS name to look up an address for

**Examples**

```javascript
await rpc.getENSAddress('vitalik.eth')
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getBlock

Gets a block by number, hash, or keyword ('earliest' | 'latest')

**Parameters**

- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `block` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Number of block to get

**Examples**

```javascript
await rpc.getBlock('latest')
// => {
  "number": string,
  "hash": string,
  "parentHash": string,
  "nonce": string,
  "sha3Uncles": string,
  "logsBloom": string,
  "transactionsRoot": string,
  "stateRoot": string,
  "receiptsRoot": string,
  "miner": string,
  "mixHash": string,
  "difficulty": string,
  "totalDifficulty": string,
  "extraData": string,
  "size": string,
  "gasLimit": string,
  "gasUsed": string,
  "timestamp": number,
  "transactions": Array<Transaction>,
  "transactionsRoot": string,
  "uncles": Array<Uncle>,
}
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Block](#block)>**

#### getEthBalance

Gets the ETH balance for an account

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ETH account address

**Examples**

```javascript
await rpc.getEthBalance('0xf00...')
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getUnbondingPeriod

Gets the unbonding period for transcoders

**Examples**

```javascript
await rpc.getUnbondingPeriod()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getNumActiveTranscoders

Gets the number of active transcoders

**Examples**

```javascript
await rpc.getNumActiveTranscoders()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getMaxEarningsClaimsRounds

Gets the maximum earnings for claims rounds

**Examples**

```javascript
await rpc.getMaxEarningsClaimsRounds()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTotalBonded

Gets the total amount of bonded tokens

**Examples**

```javascript
await rpc.getTotalBonded()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTokenTotalSupply

Gets the total supply of token (LTPU) available in the protocol

**Examples**

```javascript
await rpc.getTokenTotalSupply()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTokenBalance

Gets a user's token balance (LPTU)

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTokenBalance('0xf00...')
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTokenInfo

Gets general information about tokens

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTokenInfo()
// => TokenInfo { totalSupply: string, balance: string }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TokenInfo](#tokeninfo)>**

#### transferToken

Transfers tokens (LPTU) from one account to another

**Parameters**

- `to` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the account ETH address to send tokens to
- `amount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of token to send (LPTU)
- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.transferToken('0xf00...', '10')
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### getFaucetAmount

The amount of LPT the faucet distributes when tapped

**Examples**

```javascript
await rpc.getFaucetAmount()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getFaucetWait

How often an address can tap the faucet (in hours)

**Examples**

```javascript
await rpc.getFaucetWait()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getFaucetNext

Next timestamp at which the given address will be allowed to tap the faucet

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getFaucetNext()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getFaucetInfo

Info about the state of the LPT faucet

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getFaucetInfo('0xf00...')
// => FaucetInfo {
//   amount: string,
//   wait: string,
//   next: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[FaucetInfo](#faucetinfo)>**

#### getInflation

Gets the per round inflation rate

**Examples**

```javascript
await rpc.getInflation()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getInflationChange

Gets the change in inflation rate per round until the target bonding rate is achieved

**Examples**

```javascript
await rpc.getInflationChange()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getBroadcaster

Info about a broadcaster

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getBroadcaster('0xf00...')
// => Broadcaster {
//   address: string,
//   deposit: string,
//   withdrawBlock: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Broadcaster](#broadcaster)>**

#### getDelegatorStatus

The delegator status of the given address

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getDelegatorStatus('0xf00...')
// => 'Pending' | 'Bonded' | 'Unbonded'
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getDelegator

General info about a delegator

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getDelegator('0xf00...')
// => Delegator {
//   allowance: string,
//   address: string,
//   bondedAmount: string,
//   delegateAddress: string,
//   delegateAmount: string,
//   fees: string,
//   lastClaimRound: string,
//   pendingFees: string,
//   pendingStake: string,
//   startRound: string,
//   status: 'Pending' | 'Bonded' | 'Unbonding' | 'Unbonded',
//   withdrawRound: string,
//   nextUnbondingLockId: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Delegator](#delegator)>**

#### getTranscoderIsActive

Whether or not the transcoder is active

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTranscoderIsActive('0xf00...')
// => boolean
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**

#### getTranscoderStatus

Gets the status of a transcoder

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTranscoderStatus('0xf00...')
// => 'NotRegistered' | 'Registered'
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTranscoderTotalStake

Gets a transcoder's total stake

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTranscoderTotalStake('0xf00...')
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTranscoderPoolMaxSize

Gets a transcoder's pool max size

**Examples**

```javascript
await rpc.getTranscoderPoolMaxSize()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getTranscoder

Gets info about a transcoder

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's ETH address

**Examples**

```javascript
await rpc.getTranscoder('0xf00...')
// => Transcoder {
//   active: boolean,
//   address: string,
//   rewardCut: string,
//   feeShare: string,
//   lastRewardRound: string,
//   pendingRewardCut string,
//   pendingFeeShare: string,
//   pendingPricePerSegment: string,
//   pricePerSegment: string,
//   status: 'NotRegistered' | 'Registered',
//   totalStake: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Transcoder](#transcoder)>**

#### getTranscoders

Gets transcoders

**Examples**

```javascript
await rpc.getTranscoders()
// => Array<Transcoder>
```

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Transcoder](#transcoder)>**

#### getProtocolPaused

Whether the protocol is paused

**Examples**

```javascript
await rpc.getProtocolPaused()
// => boolean
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**

#### getProtocol

Gets the protocol

**Examples**

```javascript
await rpc.getProtocol()
// => Protocol {
paused
totalTokenSupply
totalBondedToken
targetBondingRate
transcoderPoolMaxSize
}
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Protocol](#protocol)>**

#### getRoundLength

Gets the length of a round (in blocks)

**Examples**

```javascript
await rpc.getRoundLength()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getRoundsPerYear

Gets the estimated number of rounds per year

**Examples**

```javascript
await rpc.getRoundsPerYear()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getCurrentRound

Gets the number of the current round

**Examples**

```javascript
await rpc.getCurrentRound()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getCurrentRoundIsInitialized

Whether or not the current round is initalized

**Examples**

```javascript
await rpc.getCurrentRoundIsInitialized()
// => boolean
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>**

#### getCurrentRoundStartBlock

The block at which the current round started

**Examples**

```javascript
await rpc.getCurrentRoundStartBlock()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getLastInitializedRound

The previously intitialized round

**Examples**

```javascript
await rpc.getLastInitializedRound()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getCurrentRoundInfo

Gets general information about the rounds in the protocol

**Examples**

```javascript
await rpc.getCurrentRoundInfo()
// => RoundInfo {
//   id: string,
//   initialized: boolean,
//   startBlock: string,
//   lastInitializedRound: string,
//   length: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[RoundInfo](#roundinfo)>**

#### getTotalJobs

Total jobs that have been created

**Examples**

```javascript
await rpc.getTotalJobs()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getJobVerificationRate

Verification rate for jobs

**Examples**

```javascript
await rpc.getJobVerificationRate()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getJobVerificationPeriod

Verification period for jobs

**Examples**

```javascript
await rpc.getJobVerificationPeriod()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getJobVerificationSlashingPeriod

Slashing period for jobs

**Examples**

```javascript
await rpc.getJobVerificationSlashingPeriod()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getJobFinderFee

Finder fee for jobs

**Examples**

```javascript
await rpc.getJobFinderFee()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### getJobsInfo

Gets general info about the state of jobs in the protocol

**Examples**

```javascript
await rpc.getJobsInfo()
// => JobsInfo {
//   total: string,
//   verificationRate: string,
//   verificationPeriod: string,
//   verificationSlashingPeriod: string,
//   finderFee: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[JobsInfo](#jobsinfo)>**

#### getJob

Gets a job by id

**Parameters**

- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the job id

**Examples**

```javascript
await rpc.getJob('1337')
// => Job {
//   id: string,
//   streamId: string,
//   transcodingOptions: Array<JobProfile>
//   transcoder: string,
//   broadcaster: string,
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Job](#job)>**

#### getJobs

Gets a list of jobs

**Parameters**

- `$0` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `{}`)
  - `$0.to`
  - `$0.from`
  - `$0.blocksAgo` (optional, default `100*10000`)
  - `$0.filters` **...any**

**Examples**

```javascript
await rpc.getJobs()
// => Array<Job>
```

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Job](#job)>**

#### tapFaucet

Gets LPT from the faucet

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.tapFaucet('1337')
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### initializeRound

Initializes the round

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.initializeRound()
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### claimEarnings

Claims token and eth earnings from the sender's `lastClaimRound + 1` through a given `endRound`

**Parameters**

- `endRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the round to claim earnings until
- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.claimEarnings()
// => string
```

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

#### estimateGas

Gets the estimated amount of gas to be used by a smart contract
method.

**Parameters**

- `contractName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** : name of contract containing method you wish to find gas price for.
  methodName: name of method on contract.
  methodArgs: array of argument to be passed to the contract in specified order.
  tx: (optioanl){
  from: address - 0x...,
  gas: number,
  value: (optional) number or string containing number
  }
- `methodName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `methodArgs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**
- `tx` (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.estimateGas('BondingManager', 'bond', [10, '0x00.....'])
// => 33454
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>** containing estimated gas price

#### unbond

Unbonds LPT from an address

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.unbond()
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### setupTranscoder

Sets transcoder parameters

**Parameters**

- `rewardCut` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the block reward cut you wish to set
- `feeShare` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the fee share you wish to set
- `pricePerSegment` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the price per segment you wish to set
- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.setupTranscoder('10', '10', '5')
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### getTargetBondingRate

Get target bonding rate

**Examples**

```javascript
await rpc.getTargetBondingRate()
// => string
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

#### deposit

Deposits ETH for broadcasting

**Parameters**

- `amount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** amount of ETH to deposit
- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.deposit('100')
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### withdraw

Withdraws deposited ETH

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.withdraw()
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

#### withdrawStake

Withdraws earned token (Transfers a sender's delegator `bondedAmount` to their `tokenBalance`)

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.withdrawStake()
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[TxReceipt](#txreceipt)**

#### withdrawFees

Withdraws earned fees (Transfers a sender's delegator `fees` to their `ethBalance`)

**Parameters**

- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.withdrawFees()
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[TxReceipt](#txreceipt)**

#### createJob

Creates a job

**Parameters**

- `streamId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the stream id for the job
- `profiles` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** a list of profiles to transcode the job into (optional, default `[// default profiles 'P240p30fps4x3','P360p30fps16x9']`)
- `maxPricePerSegment` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the maximum LPTU price the broadcaster is willing to pay per segment
- `tx` **[TxConfig](#txconfig)** an object specifying the `from` and `gas` values of the transaction (optional, default `config.defaultTx`)

**Examples**

```javascript
await rpc.createJob('foo', [P240p30fps4x3', 'P360p30fps16x9'], '5')
// => TxReceipt {
//   transactionHash: string,
//   transactionIndex": BN,
//   blockHash: string,
//   blockNumber: BN,
//   cumulativeGasUsed: BN,
//   gasUsed: BN,
//   contractAddress: string,
//   logs: Array<Log {
//     logIndex: BN,
//     blockNumber: BN,
//     blockHash: string,
//     transactionHash: string,
//     transactionIndex: string,
//     address: string,
//     data: string,
//     topics: Array<string>
//   }>
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[TxReceipt](#txreceipt)>**

### getDelegatorUnbondingLock

Get an unbonding lock for a delegator

**Parameters**

- `addr` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** delegator's ETH address
- `unbondingLockId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** unbonding lock ID

**Examples**

```javascript
await rpc.getDelegatorUnbondingLock('0xf00...', 1)
// => UnbondingLock {
//   id: string,
//   delegator: string,
//   amount: string,
//   withdrawRound: string
// }
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[UnbondingLock](#unbondinglock)>**

### ABIPropDescriptor

ABI property descriptor

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `constants` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** is the method constant?
- `inputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>** the method params
- `outputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>** method return values
- `payable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** is the method payable?
- `stateMutability` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** type of state mutability
- `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** type of contract property

### ContractArtifact

Mostly "`truffle`-style" ABI artifacts but no bytecode/network properties required

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the contract
- `abi` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[ABIPropDescriptor](#abipropdescriptor)>** lists info about contract properties

### LivepeerSDKOptions

SDK configuration options

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `controllerAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The address of the delpoyed Controller contract
- `provider` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The ETH http provider for rpc methods
- `gas` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** the amount of gas to include with transactions by default
- `artifacts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [ContractArtifact](#contractartifact)>** an object containing contract name -> ContractArtifact mappings
- `privateKeys` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** an object containing public -> private key mappings. Should be specified if using the SDK for transactions without MetaMask (via CLI, etc)
- `account` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number))** the account that will be used for transacting and data-fetching. Can be one of the publicKeys specified in the `privateKeys` option or an index of an account available via MetaMask

### LivepeerSDK

An object containing contract info and utility methods for interacting with the Livepeer protocol's smart contracts

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), any>** this prop is mostly for debugging purposes and could change a lot in the future. Currently, it contains the following props: `abis`, `accounts`, `contracts`, `defaultTx`, `eth`
- `constants` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), any>** Exposes some constant values. Currently, it contains the following props: `ADDRESS_PAD`, `DELEGATOR_STATUS`, `EMPTY_ADDRESS`, `TRANSCODER_STATUS`, `VIDEO_PROFILES`, `VIDEO_PROFILE_ID_SIZE`
- `create` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** same as the `createLivepeerSDK` function
- `events` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** Object mapping an event name -> contract event descriptor object
- `rpc` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)>** contains all of the rpc methods available for interacting with the Livepeer protocol
- `utils` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)>** contains utility methods. Mostly here just because. Could possibly be removed or moved into its own module in the future

### TokenInfo

An object containing the total token supply and a user's account balance.

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `totalSupply` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** total supply of token available in the protocol (LPTU)
- `balance` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user's token balance (LPTU)

### TxConfig

Transaction config object

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `from` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the ETH account address to sign the transaction from
- `gas` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the amount of gas to include in the transaction

### TxReceipt

Transaction receipt

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `transactionHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the transaction hash
- `transactionIndex` **BN** the transaction index
- `blockHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the transaction block hash
- `blockNumber` **BN** the transaction block number
- `cumulativeGasUsed` **BN** the cumulative gas used in the transaction
- `gasUsed` **BN** the gas used in the transaction
- `contractAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the contract address of the transaction method
- `logs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Log](#log)>** an object containing logs that were fired during the transaction

### Protocol

A Protocol struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `paused` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the protocol paused or not
- `totalTokenSupply` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** total token supply for protocol
- `totalBondedToken` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** total bonded token for protocol
- `targetBondingRate` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** target bonding rate for protocol
- `transcoderPoolMaxSize` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** transcoder pool max size

### FaucetInfo

Information about the status of the LPT faucet

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `amount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount distributed by the faucet
- `wait` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the faucet request cooldown time
- `next` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the next time a valid faucet request may be made

### Broadcaster

A Broadcaster struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the ETH address of the broadcaster
- `deposit` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of LPT the broadcaster has deposited
- `withdrawBlock` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the next block at which a broadcaster may withdraw their deposit

### Delegator

A Delegator struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `allowance` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the delegator's LivepeerToken approved amount for transfer
- `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the delegator's ETH address
- `bondedAmount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The amount of LPTU a delegator has bonded
- `delegateAddress` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the ETH address of the delegator's delegate
- `delegatedAmount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of LPTU the delegator has delegated
- `fees` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of LPTU a delegator has collected
- `lastClaimRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the last round that the delegator claimed reward and fee pool shares
- `pendingFees` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of ETH the delegator has earned up to the current round
- `pendingStake` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of token the delegator has earned up to the current round
- `startRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the round the delegator becomes bonded and delegated to its delegate
- `status` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the delegator's status
- `withdrawableAmount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of LPTU a delegator can withdraw
- `withdrawRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the round the delegator can withdraw its stake
- `nextUnbondingLockId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the next unbonding lock ID for the delegator

### Transcoder

A Transcoder struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `active` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether or not the transcoder is active
- `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the transcoder's ETH address
- `rewardCut` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** % of block reward cut paid to transcoder by a delegator
- `feeShare` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** % of fees paid to delegators by transcoder
- `lastRewardRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** last round that the transcoder called reward
- `pendingRewardCut` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** pending block reward cut for next round if the transcoder is active
- `pendingFeeShare` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** pending fee share for next round if the transcoder is active
- `pendingPricePerSegment` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** pending price per segment for next round if the transcoder is active
- `pricePerSegment` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** price per segment for a stream (LPTU)
- `status` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the transcoder's status
- `totalStake` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** total tokens delegated toward a transcoder (including their own)

### UnbondingLock

An UnbondingLock struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the unbonding lock ID
- `delegator` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the delegator's ETH address
- `amount` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the amount of tokens being unbonded
- `withdrawRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the round at which unbonding period is over and tokens can be withdrawn

### RoundInfo

An object containing information about the current round

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the number of the current round
- `initialized` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether or not the current round is initialized
- `startBlock` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the start block of the current round
- `lastInitializedRound` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the last round that was initialized prior to the current
- `length` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the length of rounds

### Block

An object containing information about an Ethereum block

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `number` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block number
- `hash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block hash
- `parentHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** parent has of the block
- `nonce` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block nonce
- `sha3Uncles` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block sha3 uncles
- `logsBloom` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** logss bloom for the block
- `transactionsRoot` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block transaction root hash
- `stateRoot` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block state root hash
- `receiptsRoot` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block receipts root hash
- `miner` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block miner hash
- `mixHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block mixHash
- `difficulty` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** difficulty int
- `totalDifficulty` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** total difficulty int
- `extraData` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** hash of extra data
- `size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block size
- `gasLimit` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block gas limit
- `gasUsed` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** gas used in block
- `timestamp` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** block timestamp
- `transactions` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block transactions hash
- `uncles` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** block uncles hash
- `transactions` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;Transaction>** transactions in the block
- `transactionsRoot` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** root transaction hash
- `uncles` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;Uncle>** block uncles

### JobsInfo

An object containing overview information about the jobs in the protocol

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `total` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the total number of jobs created
- `verificationRate` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the verification rate for jobs
- `verificationPeriod` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the verification period for jobs
- `verificationSlashingPeriod` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the slashing period for jobs
- `finderFee` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the finder fee for jobs

### Job

A Job struct

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `jobId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the id of the job
- `streamId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the job's stream id
- `transcodingOptions` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;TranscodingProfile>** transcoding profiles
- `transcoder` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** the ETH address of the assigned transcoder
- `broadcaster` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the ETH address of the broadcaster who created the job

### Log

An object representing a contract log

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

**Properties**

- `logIndex` **BN** the log index
- `blockNumber` **BN** the log block number
- `blockHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the log block hash
- `transactionHash` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the log's transaction hash
- `transactionIndex` **BN** the log's transaction index
- `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the log's address
- `data` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the log's data
- `topics` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** the log's topics