@livepeer/graphql-sdk
v1.0.0-alpha.6
Published
A GraphQL schema that can be used to simplify protocol interactions in the browser or node.js.
Downloads
34
Keywords
Readme
GraphQL SDK
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
Query
Contains all protocol data-fetching queries
An Account by ETH address or ENS name
A Broadcaster by ETH address
The currently authenticated user's ETH address
The current Ethereum block
The current round in the Livepeer protocol
A Delegator by ETH address
A Job by id
A list of Jobs
The currently selected account (usually set by something like MetaMask)
All transactions to or from an account between the given start block and end block
A Transcoder by ETH address
A list of Transcoders
The protocol as a whole
Objects
Account
A type that describes a Livepeer account
The ETH address for an account
The ENS name for an account
The ETH balance for an account
The Livepeer Token (LPTU) balance for an account
The broadcaster info for an account
The delegator info for an account
The transcoder info for an account
Block
Info about an Ethereum block.
The block number
Broadcaster
Submit transcode jobs for live video streams.
The broadcaster's ETH address
The ENS name for an account
The broadcaster's ETH deposit (required to create a Job)
The earliest ETH block at which the broadcaster is eligible to withdraw their deposited ETH
The jobs created by a broadcaster
Delegator
Users that bond tokens and delegate their bonded stake to other users, usually registered transcoders in exchange for shared rewards and fees.
The ETH address of a delegator
The ENS name for an account
The delegator's token allowance
The amount of Livepeer Token a delegator has bonded
The amount of fees a delegator has collected
The ETH address of the delegate (the one whom the delegator has bonded to)
The amount of Livepeer Token the delegator has delegated
The last round that the delegator claimed reward and fee pool shares
The total amount of ETH the delegator has earned through the current round
The total amount of tokens the delegator has earned through the current round
The round the delegator becomes bonded and delegated to its delegate
The status of a delegator
The amount of Livepeer Token to withdraw for a delegator
The round the delegator can withdraw its stake.
The ID of the delegator's next unbonding lock
Job
A transcode job, created by a broadcaster
Unique identifer for job
Address of broadcaster that requested the transcoding job
The broadcaster's ENS name
Transcoding profiles associated with the job
Unique identifier for the stream
JobProfile
A job's transcoding profile
The hashcode for the transcoding profile
The name of the profile
The profile bitrate
The profile framerate
The screen resolution of the profile
Mutation
Contains all protocol transaction queries
Approve an amount for an ERC20 token transfer
Submits a bond transaction for a previously approved amount
Claims earnings from your last claim round through specified round
Sends a transaction based on an input object
Submits a bond transaction for a previously approved amount
Protocol
Protocol id
Protocol paused
Protocol totalTokenSupply
Protocol totalBondedToken
Protocol targetBondingRate
Protocol transcoderPoolMaxSize
Protocol maxEarningsClaimsRounds
Round
Submit transcode jobs for live video streams.
The round number
Whether the round was initialized
The last previously initialized round
The number of blocks this round lasts for
When the round starts
Subscription
A newly submitted transaction
A newly confirmed transaction
Transaction
An Ethereum transaction receipt
The transaction hash
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.
The transcoder's ETH address
Whether or not the transcoder is active
The ENS name for an account
The status of the transcoder
Last round that the transcoder called reward
% of block reward cut paid to transcoder by a delegator
% of fees paid to delegators by transcoder
Price per segment for a stream (LPTU)
Pending block reward cut for next round if the transcoder is active
Pending fee share for next round if the transcoder is active
Pending price per segment for next round if the transcoder is active
Total tokens delegated toward a transcoder (including their own)
Enums
DelegatorStatus
The possible statuses of a delegator
TranscoderStatus
The possible statuses of a transcoder
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.