@genql/sideshift.ai
v1.0.0
Published
Graphql client
Downloads
5
Readme
@genql/sideshift.ai
Your awesome graphql client ❤️
Example usage
import { createClient } from '@genql/sideshift.ai'
const client = createClient()
client
.query({
session: {
transfers: {
createdAt: true,
},
rewards: {
pageInfo: {
hasPreviousPage: true,
},
edges: {
node: {
id: true,
},
cursor: true,
},
totalCount: true,
},
credited: true,
telegramPairingPayload: true,
lifetimeStakingRewards: true,
mfaEnabled: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
assets: {
id: true,
name: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
rates: {
depositAsset: true,
settleAsset: true,
shapeshiftRate: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
// variables
var depositRange__depositMethodId
var depositRange__settleMethodId
var hookEvent__id
var order__orderId
client
.query({
paymentMethodCategories: {
id: true,
priority: true,
},
rates: {
rate: true,
},
session: {
id: true,
sessionId: true,
secret: true,
telegramPairingPayload: true,
staked: true,
unstaking: true,
},
depositRange: [
{
depositMethodId: depositRange__depositMethodId,
settleMethodId: depositRange__settleMethodId,
},
{
min: true,
max: true,
},
],
stats: {
shiftCount1H: true,
shiftTotalUsd1D: true,
shiftCount1W: true,
},
depositMethods: {
asset: true,
enabled: true,
fixedOnly: true,
},
settleMethods: {
categories: {
name: true,
},
method: true,
},
assets: {
name: true,
},
hooks: {
id: true,
createdAt: true,
enabled: true,
},
hookEvent: [
{
id: hookEvent__id,
},
{
deliveries: {
event: {
hook: {
id: true,
updatedAt: true,
targetUrl: true,
},
createdAt: true,
payload: true,
},
id: true,
createdAt: true,
updatedAt: true,
responseMessage: true,
},
hook: {
id: true,
name: true,
createdAt: true,
targetUrl: true,
},
updatedAt: true,
payload: true,
},
],
order: [
{
orderId: order__orderId,
},
{
quote: {
createdAt: true,
expiresAt: true,
depositAmount: true,
},
depositMethod: {
categories: {
name: true,
priority: true,
},
asset: true,
method: true,
fixedOnly: true,
},
settleMethod: {
categories: {
name: true,
},
asset: true,
method: true,
enabled: true,
},
deposits: {
order: {
id: true,
orderId: true,
createdAt: true,
createdAtISO: true,
settleMethodId: true,
refundAddress: true,
sessionId: true,
expiresAt: true,
expiresAtISO: true,
settleRate: true,
},
id: true,
depositId: true,
createdAtISO: true,
depositAmount: true,
depositTx: true,
settleRate: true,
settleAmount: true,
networkFeeAmount: true,
refundAddress: true,
refundTx: true,
reason: true,
},
id: true,
orderId: true,
createdAt: true,
createdAtISO: true,
depositMethodId: true,
settleMethodId: true,
depositAddress: true,
settleAddress: true,
depositMax: true,
refundAddress: true,
expiresAt: true,
expiresAtISO: true,
},
],
unstakes: {
totalCount: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))