@ledgerhq/coin-aptos
Version:
Ledger Aptos Coin integration
92 lines • 2.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetCurrentDelegatorBalancesData = exports.GetNumActiveDelegatorPerPoolData = exports.GetAccountTransactionsDataLt = exports.GetAccountTransactionsDataGt = exports.GetAccountTransactionsData = exports.GetDelegatedStakingActivities = void 0;
const client_1 = require("@apollo/client");
exports.GetDelegatedStakingActivities = (0, client_1.gql) `
query getDelegatedStakingActivities($delegatorAddress: String) {
delegated_staking_activities(
where: { delegator_address: { _eq: $delegatorAddress } }
order_by: { transaction_version: asc }
) {
amount
delegator_address
pool_address
transaction_version
}
}
`;
exports.GetAccountTransactionsData = (0, client_1.gql) `
query GetAccountTransactionsData($address: String, $limit: Int) {
account_transactions(
where: { account_address: { _eq: $address } }
order_by: { transaction_version: desc }
limit: $limit
) {
transaction_version
__typename
}
}
`;
exports.GetAccountTransactionsDataGt = (0, client_1.gql) `
query GetAccountTransactionsDataGt($address: String, $limit: Int, $gt: bigint) {
account_transactions(
where: { account_address: { _eq: $address }, transaction_version: { _gt: $gt } }
order_by: { transaction_version: desc }
limit: $limit
) {
transaction_version
__typename
}
}
`;
exports.GetAccountTransactionsDataLt = (0, client_1.gql) `
query GetAccountTransactionsDataLt($address: String, $limit: Int, $lt: bigint) {
account_transactions(
where: { account_address: { _eq: $address }, transaction_version: { _lt: $lt } }
order_by: { transaction_version: desc }
limit: $limit
) {
transaction_version
__typename
}
}
`;
exports.GetNumActiveDelegatorPerPoolData = (0, client_1.gql) `
query GetNumActiveDelegatorPerPoolData {
num_active_delegator_per_pool {
num_active_delegator
pool_address
}
delegated_staking_pools {
staking_pool_address
current_staking_pool {
operator_address
operator_aptos_name(where: { is_active: { _eq: true } }) {
domain
is_primary
}
}
}
}
`;
exports.GetCurrentDelegatorBalancesData = (0, client_1.gql) `
query GetCurrentDelegatorBalances {
current_delegator_balances(distinct_on: pool_address) {
current_pool_balance {
total_coins
operator_commission_percentage
staking_pool_address
total_shares
}
shares
delegator_address
staking_pool_metadata {
operator_aptos_name {
domain_with_suffix
is_active
}
}
}
}
`;
//# sourceMappingURL=queries.js.map