API Reference

Queries

action

Response

Returns an Action

Arguments

Name

Description

where - ActionWhereInput

Example

Query

query Action($where: ActionWhereInput) {
  action(where: $where) {
    id
    type
    configuration
  }
}

Variables

{"where": ActionWhereInput}

Response

{
  "data": {
    "action": {
      "id": "xyz789",
      "type": "xyz789",
      "configuration": {}
    }
  }
}

Queries

actions

Response

Returns an Actions

Arguments

Name

Description

where - ActionWhereInput

take - Int

skip - Int

gt - ActionWhereInput

lt - ActionWhereInput

like - ActionWhereInput

orderBy - [JSONObject]

Example

Query

query Actions(
  $where: ActionWhereInput,
  $take: Int,
  $skip: Int,
  $gt: ActionWhereInput,
  $lt: ActionWhereInput,
  $like: ActionWhereInput,
  $orderBy: [JSONObject]
) {
  actions(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      type
      configuration
    }
    count
  }
}

Variables

{
  "where": ActionWhereInput,
  "take": 987,
  "skip": 123,
  "gt": ActionWhereInput,
  "lt": ActionWhereInput,
  "like": ActionWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"actions": {"data": [Action], "count": 123}}}

Queries

address

Response

Returns an Address

Arguments

Name

Description

where - AddressWhereInput

Example

Query

query Address($where: AddressWhereInput) {
  address(where: $where) {
    id
    value
    publicKey
    type
    meta
    escrow {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
  }
}

Variables

{"where": AddressWhereInput}

Response

{
  "data": {
    "address": {
      "id": "abc123",
      "value": "abc123",
      "publicKey": "abc123",
      "type": "xyz789",
      "meta": {},
      "escrow": Escrow
    }
  }
}

Queries

addresses

Response

Returns an Addresses

Arguments

Name

Description

where - AddressWhereInput

take - Int

skip - Int

gt - AddressWhereInput

lt - AddressWhereInput

like - AddressWhereInput

orderBy - [JSONObject]

Example

Query

query Addresses(
  $where: AddressWhereInput,
  $take: Int,
  $skip: Int,
  $gt: AddressWhereInput,
  $lt: AddressWhereInput,
  $like: AddressWhereInput,
  $orderBy: [JSONObject]
) {
  addresses(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      value
      publicKey
      type
      meta
      escrow {
        ...EscrowFragment
      }
    }
    count
  }
}

Variables

{
  "where": AddressWhereInput,
  "take": 987,
  "skip": 987,
  "gt": AddressWhereInput,
  "lt": AddressWhereInput,
  "like": AddressWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"addresses": {"data": [Address], "count": 987}}}

Queries

asset

Response

Returns an Asset

Arguments

Name

Description

where - AssetWhereInput

Example

Query

query Asset($where: AssetWhereInput) {
  asset(where: $where) {
    id
    type
    usdValue
    content {
      meta
      node
    }
    collateral {
      id
      assets {
        ...AssetFragment
      }
      escrow {
        ...EscrowFragment
      }
    }
    addresses {
      id
      value
      publicKey
      type
      meta
      escrow {
        ...EscrowFragment
      }
    }
    action {
      id
      type
      configuration
    }
  }
}

Variables

{"where": AssetWhereInput}

Response

{
  "data": {
    "asset": {
      "id": "xyz789",
      "type": "abc123",
      "usdValue": "xyz789",
      "content": Content,
      "collateral": Collateral,
      "addresses": [Address],
      "action": Action
    }
  }
}

Queries

assets

Response

Returns an Assets

Arguments

Name

Description

where - AssetWhereInput

take - Int

skip - Int

gt - AssetWhereInput

lt - AssetWhereInput

like - AssetWhereInput

orderBy - [JSONObject]

Example

Query

query Assets(
  $where: AssetWhereInput,
  $take: Int,
  $skip: Int,
  $gt: AssetWhereInput,
  $lt: AssetWhereInput,
  $like: AssetWhereInput,
  $orderBy: [JSONObject]
) {
  assets(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      type
      usdValue
      content {
        ...ContentFragment
      }
      collateral {
        ...CollateralFragment
      }
      addresses {
        ...AddressFragment
      }
      action {
        ...ActionFragment
      }
    }
    count
  }
}

Variables

{
  "where": AssetWhereInput,
  "take": 123,
  "skip": 123,
  "gt": AssetWhereInput,
  "lt": AssetWhereInput,
  "like": AssetWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"assets": {"data": [Asset], "count": 123}}}

Queries

balance

Response

Returns an Account

Arguments

Name

Description

where - AccountWhereInput

Example

Query

query Balance($where: AccountWhereInput) {
  balance(where: $where) {
    id
    wallet
    debit
    credit
  }
}

Variables

{"where": AccountWhereInput}

Response

{
  "data": {
    "balance": {
      "id": "xyz789",
      "wallet": "abc123",
      "debit": "abc123",
      "credit": "xyz789"
    }
  }
}

Queries

block

Response

Returns a Block

Arguments

Name

Description

where - BlockWhereInput

Example

Query

query Block($where: BlockWhereInput) {
  block(where: $where) {
    id
    indexed
  }
}

Variables

{"where": BlockWhereInput}

Response

{
  "data": {
    "block": {
      "id": "abc123",
      "indexed": true
    }
  }
}

Queries

blocks

Response

Returns a Blocks

Arguments

Name

Description

where - BlockWhereInput

take - Int

skip - Int

gt - BlockWhereInput

lt - BlockWhereInput

like - BlockWhereInput

orderBy - [JSONObject]

Example

Query

query Blocks(
  $where: BlockWhereInput,
  $take: Int,
  $skip: Int,
  $gt: BlockWhereInput,
  $lt: BlockWhereInput,
  $like: BlockWhereInput,
  $orderBy: [JSONObject]
) {
  blocks(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      indexed
    }
    count
  }
}

Variables

{
  "where": BlockWhereInput,
  "take": 987,
  "skip": 987,
  "gt": BlockWhereInput,
  "lt": BlockWhereInput,
  "like": BlockWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"blocks": {"data": [Block], "count": 123}}}

Queries

collateral

Response

Returns a Collateral

Arguments

Name

Description

where - ActionWhereInput

Example

Query

query Collateral($where: ActionWhereInput) {
  collateral(where: $where) {
    id
    assets {
      id
      type
      usdValue
      content {
        ...ContentFragment
      }
      collateral {
        ...CollateralFragment
      }
      addresses {
        ...AddressFragment
      }
      action {
        ...ActionFragment
      }
    }
    escrow {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
  }
}

Variables

{"where": ActionWhereInput}

Response

{
  "data": {
    "collateral": {
      "id": "xyz789",
      "assets": [Asset],
      "escrow": Escrow
    }
  }
}

Queries

collaterals

Response

Returns an Actions

Arguments

Name

Description

where - CollateralWhereInput

take - Int

skip - Int

gt - CollateralWhereInput

lt - ActionWhereInput

like - ActionWhereInput

orderBy - [JSONObject]

Example

Query

query Collaterals(
  $where: CollateralWhereInput,
  $take: Int,
  $skip: Int,
  $gt: CollateralWhereInput,
  $lt: ActionWhereInput,
  $like: ActionWhereInput,
  $orderBy: [JSONObject]
) {
  collaterals(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      type
      configuration
    }
    count
  }
}

Variables

{
  "where": CollateralWhereInput,
  "take": 987,
  "skip": 123,
  "gt": CollateralWhereInput,
  "lt": ActionWhereInput,
  "like": ActionWhereInput,
  "orderBy": [{}]
}

Response

{
  "data": {
    "collaterals": {"data": [Action], "count": 987}
  }
}

Queries

element

Response

Returns an Element

Arguments

Name

Description

where - ElementWhereInput

Example

Query

query Element($where: ElementWhereInput) {
  element(where: $where) {
    id
    number
    sequence
    type
    externalId
  }
}

Variables

{"where": ElementWhereInput}

Response

{
  "data": {
    "element": {
      "id": "abc123",
      "number": "abc123",
      "sequence": "xyz789",
      "type": "abc123",
      "externalId": "xyz789"
    }
  }
}

Queries

elements

Response

Returns an Elements

Arguments

Name

Description

where - ElementWhereInput

take - Int

skip - Int

gt - ElementWhereInput

lt - ElementWhereInput

like - ElementWhereInput

orderBy - [JSONObject]

Example

Query

query Elements(
  $where: ElementWhereInput,
  $take: Int,
  $skip: Int,
  $gt: ElementWhereInput,
  $lt: ElementWhereInput,
  $like: ElementWhereInput,
  $orderBy: [JSONObject]
) {
  elements(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      number
      sequence
      type
      externalId
    }
    count
  }
}

Variables

{
  "where": ElementWhereInput,
  "take": 987,
  "skip": 123,
  "gt": ElementWhereInput,
  "lt": ElementWhereInput,
  "like": ElementWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"elements": {"data": [Element], "count": 987}}}

Queries

escrow

Response

Returns an Escrow

Arguments

Name

Description

where - EscrowWhereInput

Example

Query

query Escrow($where: EscrowWhereInput) {
  escrow(where: $where) {
    id
    startDate
    endDate
    status
    collateral {
      id
      assets {
        ...AssetFragment
      }
      escrow {
        ...EscrowFragment
      }
    }
    meta
    transactions {
      id
      hex
      type
      base64
      txid
      inputs
      outputs
    }
    sides {
      id
      movement
      action
      leaf
    }
    product {
      id
      name
      type
      key {
        ...KeyFragment
      }
    }
  }
}

Variables

{"where": EscrowWhereInput}

Response

{
  "data": {
    "escrow": {
      "id": "xyz789",
      "startDate": "abc123",
      "endDate": "xyz789",
      "status": "abc123",
      "collateral": Collateral,
      "meta": {},
      "transactions": [Transaction],
      "sides": [Side],
      "product": Product
    }
  }
}

Queries

escrows

Response

Returns an Escrows

Arguments

Name

Description

where - EscrowWhereInput

take - Int

skip - Int

gt - EscrowWhereInput

lt - EscrowWhereInput

like - EscrowWhereInput

orderBy - [JSONObject]

Example

Query

query Escrows(
  $where: EscrowWhereInput,
  $take: Int,
  $skip: Int,
  $gt: EscrowWhereInput,
  $lt: EscrowWhereInput,
  $like: EscrowWhereInput,
  $orderBy: [JSONObject]
) {
  escrows(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
    count
  }
}

Variables

{
  "where": EscrowWhereInput,
  "take": 987,
  "skip": 987,
  "gt": EscrowWhereInput,
  "lt": EscrowWhereInput,
  "like": EscrowWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"escrows": {"data": [Escrow], "count": 987}}}

Queries

fee

Response

Returns a Fee

Arguments

Name

Description

where - FeeWhereInput

Example

Query

query Fee($where: FeeWhereInput) {
  fee(where: $where) {
    value
    escrow {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
  }
}

Variables

{"where": FeeWhereInput}

Response

{
  "data": {
    "fee": {
      "value": "xyz789",
      "escrow": Escrow
    }
  }
}

Queries

flow

Response

Returns a Flow

Arguments

Name

Description

where - FlowWhereInput

Example

Query

query Flow($where: FlowWhereInput) {
  flow(where: $where) {
    id
    escrows {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
    step
  }
}

Variables

{"where": FlowWhereInput}

Response

{
  "data": {
    "flow": {
      "id": "xyz789",
      "escrows": [Escrow],
      "step": {}
    }
  }
}

Queries

flows

Response

Returns a Flows

Arguments

Name

Description

where - FlowWhereInput

take - Int

skip - Int

gt - FlowWhereInput

lt - FlowWhereInput

like - FlowWhereInput

orderBy - [JSONObject]

Example

Query

query Flows(
  $where: FlowWhereInput,
  $take: Int,
  $skip: Int,
  $gt: FlowWhereInput,
  $lt: FlowWhereInput,
  $like: FlowWhereInput,
  $orderBy: [JSONObject]
) {
  flows(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      escrows {
        ...EscrowFragment
      }
      step
    }
    count
  }
}

Variables

{
  "where": FlowWhereInput,
  "take": 123,
  "skip": 123,
  "gt": FlowWhereInput,
  "lt": FlowWhereInput,
  "like": FlowWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"flows": {"data": [Flow], "count": 123}}}

Queries

leg

Response

Returns a Leg

Arguments

Name

Description

where - LegWhereInput

Example

Query

query Leg($where: LegWhereInput) {
  leg(where: $where) {
    id
    startDate
    endDate
    type
    nature
    activationDate
    address
    value
  }
}

Variables

{"where": LegWhereInput}

Response

{
  "data": {
    "leg": {
      "id": "abc123",
      "startDate": "abc123",
      "endDate": "abc123",
      "type": "abc123",
      "nature": "abc123",
      "activationDate": "abc123",
      "address": "abc123",
      "value": "xyz789"
    }
  }
}

Queries

legs

Response

Returns a Legs

Arguments

Name

Description

where - LegWhereInput

take - Int

skip - Int

gt - LegWhereInput

lt - LegWhereInput

like - LegWhereInput

orderBy - [JSONObject]

Example

Query

query Legs(
  $where: LegWhereInput,
  $take: Int,
  $skip: Int,
  $gt: LegWhereInput,
  $lt: LegWhereInput,
  $like: LegWhereInput,
  $orderBy: [JSONObject]
) {
  legs(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      startDate
      endDate
      type
      nature
      activationDate
      address
      value
    }
    count
  }
}

Variables

{
  "where": LegWhereInput,
  "take": 123,
  "skip": 987,
  "gt": LegWhereInput,
  "lt": LegWhereInput,
  "like": LegWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"legs": {"data": [Leg], "count": 123}}}

Queries

outcome

Response

Returns an Outcome

Arguments

Name

Description

where - OutcomeWhereInput

Example

Query

query Outcome($where: OutcomeWhereInput) {
  outcome(where: $where) {
    id
    description
    tag
    conditions {
      id
      filter
      module
      outcome {
        ...OutcomeFragment
      }
      transaction {
        ...TransactionFragment
      }
      verification {
        ...VerificationFragment
      }
    }
    signature {
      publicKey
      wif
    }
    block {
      id
      indexed
    }
  }
}

Variables

{"where": OutcomeWhereInput}

Response

{
  "data": {
    "outcome": {
      "id": "xyz789",
      "description": "abc123",
      "tag": "abc123",
      "conditions": [Condition],
      "signature": Signature,
      "block": Block
    }
  }
}

Queries

outcomes

Response

Returns an Outcomes

Arguments

Name

Description

where - OutcomeWhereInput

take - Int

skip - Int

gt - OutcomeWhereInput

lt - OutcomeWhereInput

like - OutcomeWhereInput

orderBy - [JSONObject]

Example

Query

query Outcomes(
  $where: OutcomeWhereInput,
  $take: Int,
  $skip: Int,
  $gt: OutcomeWhereInput,
  $lt: OutcomeWhereInput,
  $like: OutcomeWhereInput,
  $orderBy: [JSONObject]
) {
  outcomes(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      description
      tag
      conditions {
        ...ConditionFragment
      }
      signature {
        ...SignatureFragment
      }
      block {
        ...BlockFragment
      }
    }
    count
  }
}

Variables

{
  "where": OutcomeWhereInput,
  "take": 123,
  "skip": 987,
  "gt": OutcomeWhereInput,
  "lt": OutcomeWhereInput,
  "like": OutcomeWhereInput,
  "orderBy": [{}]
}

Response

{"data": {"outcomes": {"data": [Outcome], "count": 123}}}

Queries

transaction

Response

Returns a Transaction

Arguments

Name

Description

where - TransactionWhereInput

Example

Query

query Transaction($where: TransactionWhereInput) {
  transaction(where: $where) {
    id
    hex
    type
    base64
    txid
    inputs
    outputs
  }
}

Variables

{"where": TransactionWhereInput}

Response

{
  "data": {
    "transaction": {
      "id": "xyz789",
      "hex": "xyz789",
      "type": "abc123",
      "base64": "xyz789",
      "txid": "xyz789",
      "inputs": 123,
      "outputs": 123
    }
  }
}

Queries

transactions

Response

Returns a Transactions

Arguments

Name

Description

where - TransactionWhereInput

take - Int

skip - Int

gt - TransactionWhereInput

lt - TransactionWhereInput

like - TransactionWhereInput

orderBy - [JSONObject]

Example

Query

query Transactions(
  $where: TransactionWhereInput,
  $take: Int,
  $skip: Int,
  $gt: TransactionWhereInput,
  $lt: TransactionWhereInput,
  $like: TransactionWhereInput,
  $orderBy: [JSONObject]
) {
  transactions(
    where: $where,
    take: $take,
    skip: $skip,
    gt: $gt,
    lt: $lt,
    like: $like,
    orderBy: $orderBy
  ) {
    data {
      id
      hex
      type
      base64
      txid
      inputs
      outputs
    }
    count
  }
}

Variables

{
  "where": TransactionWhereInput,
  "take": 987,
  "skip": 987,
  "gt": TransactionWhereInput,
  "lt": TransactionWhereInput,
  "like": TransactionWhereInput,
  "orderBy": [{}]
}

Response

{
  "data": {
    "transactions": {"data": [Transaction], "count": 987}
  }
}

Queries

tvl

Response

Returns a Liquidity

Arguments

Name

Description

where - LiquidityWhereInput

lt - LiquidityWhereInput

Example

Query

query Tvl(
  $where: LiquidityWhereInput,
  $lt: LiquidityWhereInput
) {
  tvl(
    where: $where,
    lt: $lt
  ) {
    id
    amount
    escrow {
      id
      startDate
      endDate
      status
      collateral {
        ...CollateralFragment
      }
      meta
      transactions {
        ...TransactionFragment
      }
      sides {
        ...SideFragment
      }
      product {
        ...ProductFragment
      }
    }
    organization {
      id
      name
      logo
      webhooks {
        ...WebhookFragment
      }
    }
  }
}

Variables

{
  "where": LiquidityWhereInput,
  "lt": LiquidityWhereInput
}

Response

{
  "data": {
    "tvl": {
      "id": 123,
      "amount": "xyz789",
      "escrow": Escrow,
      "organization": Organization
    }
  }
}

Queries

Mutations

Mutations

broadcastEscrow

Response

Returns an Escrow

Arguments

Name

Description

data - EscrowDataInput

Example

Query

mutation BroadcastEscrow($data: EscrowDataInput) {
  broadcastEscrow(data: $data) {
    id
    startDate
    endDate
    status
    collateral {
      id
      assets {
        ...AssetFragment
      }
      escrow {
        ...EscrowFragment
      }
    }
    meta
    transactions {
      id
      hex
      type
      base64
      txid
      inputs
      outputs
    }
    sides {
      id
      movement
      action
      leaf
    }
    product {
      id
      name
      type
      key {
        ...KeyFragment
      }
    }
  }
}

Variables

{"data": EscrowDataInput}

Response

{
  "data": {
    "broadcastEscrow": {
      "id": "xyz789",
      "startDate": "xyz789",
      "endDate": "xyz789",
      "status": "abc123",
      "collateral": Collateral,
      "meta": {},
      "transactions": [Transaction],
      "sides": [Side],
      "product": Product
    }
  }
}

Mutations

buildSignature

Response

Returns a Signature

Arguments

Name

Description

where - SignatureWhereInput

Example

Query

mutation BuildSignature($where: SignatureWhereInput) {
  buildSignature(where: $where) {
    publicKey
    wif
  }
}