UNPKG

@lidofinance/lido-ethereum-sdk

Version:

<div style="display: flex;" align="center"> <h1 align="center">Lido Ethereum SDK</h1> </div>

138 lines (125 loc) 2.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InitialStateQuery = exports.StatusQuery = exports.TotalRewardsQuery = exports.LidoTransfersQuery = void 0; const graphql_request_1 = require("graphql-request"); exports.LidoTransfersQuery = (0, graphql_request_1.gql) ` query LidoTransfers( $skip: Int $first: Int! $fromBlock: Int! $toBlock: Int! $address: Bytes! ) { lidoTransfers( first: $first skip: $skip where: { and: [ { or: [{ to: $address }, { from: $address }] } { _change_block: { number_gte: $fromBlock } } ] } block: { number: $toBlock } ) { from to value shares sharesBeforeDecrease sharesAfterDecrease sharesBeforeIncrease sharesAfterIncrease totalPooledEther totalShares balanceAfterDecrease balanceAfterIncrease block blockTime transactionHash transactionIndex logIndex } } `; exports.TotalRewardsQuery = (0, graphql_request_1.gql) ` query TotalRewards( $skip: Int $first: Int! $fromBlock: Int! $toBlock: Int! ) { totalRewards( first: $first skip: $skip where: { _change_block: { number_gte: $fromBlock } } block: { number: $toBlock } ) { id totalPooledEtherBefore totalPooledEtherAfter totalSharesBefore totalSharesAfter apr block blockTime logIndex } } `; exports.StatusQuery = (0, graphql_request_1.gql) ` query { _meta { block { number hash } } } `; exports.InitialStateQuery = (0, graphql_request_1.gql) ` query BalanceBefore($address: Bytes!, $block: Int!) { lidoTransfers( first: 1 skip: 0 orderBy: block orderDirection: desc where: { or: [{ to: $address }, { from: $address }] } block: { number: $block } ) { from to value shares sharesBeforeDecrease sharesAfterDecrease sharesBeforeIncrease sharesAfterIncrease totalPooledEther totalShares balanceAfterDecrease balanceAfterIncrease block blockTime transactionHash transactionIndex logIndex } totalRewards( first: 1 skip: 0 orderBy: block orderDirection: desc block: { number: $block } ) { totalPooledEtherBefore totalPooledEtherAfter totalSharesBefore totalSharesAfter apr block blockTime logIndex } } `; //# sourceMappingURL=queries.js.map