Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adamsoffer/livepeer-graphql-sdk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adamsoffer/livepeer-graphql-sdk

A GraphQL schema that can be used to simplify protocol interactions in the browser or node.js.

  • 1.0.0-alpha.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

GraphQL SDK

home npm Discord coverage GitHub issues

A GraphQL schema that can be used to simplify protocol interactions in the browser or node.js.

Table of Contents

Installation

yarn add @livepeer/graphql-sdk

Schema Types

Table of Contents

Query

Contains all protocol data-fetching queries

FieldArgumentTypeDescription
accountAccount!

An Account by ETH address or ENS name

idString
broadcasterBroadcaster!

A Broadcaster by ETH address

idString!
coinbaseString!

The currently authenticated user's ETH address

currentBlockBlock!

The current Ethereum block

currentRoundRound!

The current round in the Livepeer protocol

delegatorDelegator!

A Delegator by ETH address

idString!
jobJob!

A Job by id

idString!
jobs[Job!]!

A list of Jobs

broadcasterString
skipInt
limitInt
meAccount!

The currently selected account (usually set by something like MetaMask)

transactions[Transaction!]!

All transactions to or from an account between the given start block and end block

addressString!
startBlockString
endBlockString
skipString
limitString
sortString
transcoderTranscoder!

A Transcoder by ETH address

idString!
transcoders[Transcoder!]!

A list of Transcoders

skipInt
firstInt
protocolProtocol

The protocol as a whole

unbondlocks[UnbondLock]!

The unbonding locks for an account

idString!
unbondlockUnbondLock!

An unbond lock for an account

idString!
lockIdString!
transactionTransaction!

A transaction receipt

idString!

Mutation

Contains all protocol transaction queries

FieldArgumentTypeDescription
approveJSON

Approve an amount for an ERC20 token transfer

typeString!
amountString!
bondJSON

Submits a bond transaction for a previously approved amount

toString!
amountString!
claimEarningsJSON

Claims earnings from your last claim round through specified round

endRoundString!
sendTransactionJSON

Sends a transaction based on an input object

optionsJSON!
unbondJSON

Submits a bond transaction for a previously approved amount

amountString!
rebondJSON

Rebond tokens for an unbonding lock to a delegator's current delegate while a delegator is in the Bonded or Pending states

unbondingLockIdInt!
rebondFromUnbondedJSON

Rebond tokens for an unbonding lock to a delegate while a delegator is in the Unbonded state

delegateString!
unbondingLockIdInt!
initializeRoundJSON

Submits a round initialization transaction

Objects

Account

A type that describes a Livepeer account

FieldArgumentTypeDescription
idString!

The ETH address for an account

ensNameString!

The ENS name for an account

ethBalanceString!

The ETH balance for an account

tokenBalanceString!

The Livepeer Token (LPTU) balance for an account

broadcasterBroadcaster!

The broadcaster info for an account

delegatorDelegator!

The delegator info for an account

transcoderTranscoder!

The transcoder info for an account

unbondlocks[UnbondLock]!

The unbonding locks for an account

unbondlockUnbondLock!

An unbond lock for an account

lockIdString!
Block

Info about an Ethereum block.

FieldArgumentTypeDescription
idString!

The block number

Broadcaster

Submit transcode jobs for live video streams.

FieldArgumentTypeDescription
idString!

The broadcaster's ETH address

ensNameString!

The ENS name for an account

depositString!

The broadcaster's ETH deposit (required to create a Job)

withdrawBlockString!

The earliest ETH block at which the broadcaster is eligible to withdraw their deposited ETH

jobs[Job!]!

The jobs created by a broadcaster

skipInt
limitInt
Delegator

Users that bond tokens and delegate their bonded stake to other users, usually registered transcoders in exchange for shared rewards and fees.

FieldArgumentTypeDescription
idString!

The ETH address of a delegator

ensNameString!

The ENS name for an account

allowanceString!

The delegator's token allowance

bondedAmountString!

The amount of Livepeer Token a delegator has bonded

feesString!

The amount of fees a delegator has collected

delegateAddressString!

The ETH address of the delegate (the one whom the delegator has bonded to)

delegatedAmountString!

The amount of Livepeer Token the delegator has delegated

lastClaimRoundString!

The last round that the delegator claimed reward and fee pool shares

pendingFeesString!

The total amount of ETH the delegator has earned through the current round

pendingStakeString!

The total amount of tokens the delegator has earned through the current round

startRoundString!

The round the delegator becomes bonded and delegated to its delegate

statusDelegatorStatus!

The status of a delegator

withdrawAmountString!

The amount of Livepeer Token to withdraw for a delegator

withdrawRoundString!

The round the delegator can withdraw its stake.

nextUnbondingLockIdString!

The ID of the delegator's next unbonding lock

Job

A transcode job, created by a broadcaster

FieldArgumentTypeDescription
idString!

Unique identifer for job

broadcasterString!

Address of broadcaster that requested the transcoding job

broadcasterENSNameString!

The broadcaster's ENS name

profiles[JobProfile!]!

Transcoding profiles associated with the job

streamIdString!

Unique identifier for the stream

JobProfile

A job's transcoding profile

FieldArgumentTypeDescription
idString!

The hashcode for the transcoding profile

nameString!

The name of the profile

bitrateString!

The profile bitrate

framerateInt!

The profile framerate

resolutionString!

The screen resolution of the profile

Protocol
FieldArgumentTypeDescription
idString!

Protocol id

pausedBoolean!

Protocol paused

totalTokenSupplyString!

Protocol totalTokenSupply

totalBondedTokenString!

Protocol totalBondedToken

targetBondingRateString!

Protocol targetBondingRate

transcoderPoolMaxSizeString!

Protocol transcoderPoolMaxSize

maxEarningsClaimsRoundsString!

Protocol maxEarningsClaimsRounds

Round

Submit transcode jobs for live video streams.

FieldArgumentTypeDescription
idString!

The round number

initializedBoolean!

Whether the round was initialized

lastInitializedRoundString!

The last previously initialized round

lengthString!

The number of blocks this round lasts for

startBlockString!

When the round starts

Subscription
FieldArgumentTypeDescription
transactionSubmittedTransaction!

A newly submitted transaction

transactionConfirmedTransaction!

A newly confirmed transaction

Transaction

An Ethereum transaction receipt

FieldArgumentTypeDescription
idString!

The transaction hash

blockNumberString!
timeStampString!
nonceString!
blockHashString!
transactionIndexString!
fromString!
toString!
valueString!
gasString!
gasPriceString!
isErrorString!
statusString!
inputString!
contractAddressString!
cumulativeGasUsedString!
gasUsedString!
confirmationsString!
contractString!
methodString!
paramsJSON!
Transcoder

Perform transcoding work for the network. The transcoders with the most delegated stake are elected as active transcoders that process transcode jobs for the network.

FieldArgumentTypeDescription
idString!

The transcoder's ETH address

activeBoolean!

Whether or not the transcoder is active

ensNameString!

The ENS name for an account

statusTranscoderStatus!

The status of the transcoder

lastRewardRoundString!

Last round that the transcoder called reward

rewardCutString!

% of block reward cut paid to transcoder by a delegator

feeShareString!

% of fees paid to delegators by transcoder

pricePerSegmentString!

Price per segment for a stream (LPTU)

pendingRewardCutString!

Pending block reward cut for next round if the transcoder is active

pendingFeeShareString!

Pending fee share for next round if the transcoder is active

pendingPricePerSegmentString!

Pending price per segment for next round if the transcoder is active

totalStakeString!

Total tokens delegated toward a transcoder (including their own)

UnbondLock

Get an unbonding lock for a delegator

FieldArgumentTypeDescription
idString!

unbonding lock id

delegatorString!

The address of delegator unbonding from

amountString!

The amount being unbonded

withdrawRoundString!

When the unbonding amount will be available for withdrawal

Enums

DelegatorStatus

The possible statuses of a delegator

ValueDescription
Pending
Bonded
Unbonded
Unbonding
TranscoderStatus

The possible statuses of a transcoder

ValueDescription
NotRegistered
Registered
Resigned

Scalars

Boolean

The Boolean scalar type represents true or false.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

JSON

The JSON scalar type represents JSON values as specified by ECMA-404.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

FAQs

Package last updated on 03 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc