laconicd/gql
Nabarun 776799ea02
Some checks failed
Pull Request Labeler / triage (push) Successful in 58s
Run Gosec / Gosec (push) Failing after 2m29s
Tests / cleanup-runs (push) Has been skipped
Lint / Run flake8 on python integration tests (push) Failing after 4m48s
Tests / test-unit-cover (push) Failing after 8m52s
Tests / sdk_tests (push) Failing after 22s
Tests / test-rpc (push) Failing after 1m18s
Lint / Run golangci-lint (push) Successful in 15m15s
Tests / test-importer (push) Successful in 11m6s
CodeQL / Analyze (go) (push) Failing after 3m14s
Semgrep / Scan (push) Failing after 47s
Remove hard-coded record types (#132)
- Resolves #107 and is initial work on #108
  - Refactors the `Record.Attributes` from Any into a byte string and removes the hard-coded Protobuf record types.
  - Fixes EIP-712 bytes decoding.
- Resolves #109
  - Rewords the graphql schema to be able to represent generic IPLD objects encoded as DAG-JSON.

Co-authored-by: Roy Crihfield <roy@manteia.ltd>
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: #132
Reviewed-by: Thomas E Lackey <telackey@noreply.git.vdb.to>
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-01-15 04:20:38 +00:00
..
cerc-io/laconicd Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
generated.go Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
gqlgen.yml Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
graphiql.go Changes to run laconic-console app with laconicd (#75) 2023-01-11 13:06:42 +05:30
models_gen.go Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
README.md paths 2022-09-07 17:14:15 +05:30
resolver.go Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
scalar.go Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
server.go Changes to run laconic-console app with laconicd (#75) 2023-01-11 13:06:42 +05:30
status.go ignore gosec 2022-10-18 15:36:34 +05:30
util.go Remove hard-coded record types (#132) 2024-01-15 04:20:38 +00:00
version.go rename nameservie to registry (#54) 2022-12-09 09:47:14 +05:30

Cerc-io laconic gql

Browser : http://localhost:9473 for gql

Start server

./build/laconicd start --gql-playground --gql-server

Basic node status:

{
  getStatus {
    version
    node {
      id
      network
      moniker
    }
    sync {
      latest_block_height
      catching_up
    }
    num_peers
    peers {
      is_outbound
      remote_ip
    }
    disk_usage
  }
}

Full node status:

{
  getStatus {
    version
    node {
      id
      network
      moniker
    }
    sync {
      latest_block_hash
      latest_block_time
      latest_block_height
      catching_up
    }
    validator {
      address
      voting_power
      proposer_priority
    }
    validators {
      address
      voting_power
      proposer_priority
    }
    num_peers
    peers {
      node {
        id
        network
        moniker
      }
      is_outbound
      remote_ip
    }
    disk_usage
  }
}

Get records by IDs.

{
  getRecordsByIds(ids: ["QmYDtNCKtTu6u6jaHaFAC5PWZXcj7fAmry6NoWwMaixFHz"]) {
    id
    names
    bondId
    createTime
    expiryTime
    owners
    attributes {
      key
      value {
        string
      }
    }
  }
}

Query records.

{
  queryRecords(attributes: [{ key: "type", value: { string: "crn:bot" } }]) {
    id
    names
    bondId
    createTime
    expiryTime
    owners
    attributes {
      key
      value {
        string
      }
    }
  }
}

Get account details:

{
  getAccounts(addresses: ["cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094"]) {
    address
    pubKey
    number
    sequence
    balance {
      type
      quantity
    }
  }
}

Query bonds:

{
  queryBonds(
    attributes: [
      {
        key: "owner"
        value: { string: "cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094" }
      }
    ]
  ) {
    id
    owner
    balance {
      type
      quantity
    }
  }
}

Get bonds by IDs.

{
  getBondsByIds(
    ids: [
      "1c2b677cb2a27c88cc6bf8acf675c94b69051125b40c4fd073153b10f046dd87"
      "c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440"
    ]
  ) {
    id
    owner
    balance {
      type
      quantity
    }
  }
}

Query Bonds by Owner

{
  queryBondsByOwner(
    ownerAddresses: ["ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"]
  ) {
    owner
    bonds {
      id
      owner
      balance {
        type
        quantity
      }
    }
  }
}

Query auctions by ids

{
  getAuctionsByIds(
    ids: ["be98f2073c246194276554eefdb4c95b682a35a0f06fbe619a6da57c10c93e90"]
  ) {
    id
    ownerAddress
    createTime
    minimumBid {
      type
      quantity
    }
    commitFee {
      type
      quantity
    }
    commitsEndTime
    revealFee {
      type
      quantity
    }
    revealsEndTime
    winnerBid {
      type
      quantity
    }
    winnerPrice {
      type
      quantity
    }
    winnerAddress
    bids {
      bidderAddress
      commitHash
      commitTime
      commitFee {
        type
        quantity
      }
      revealFee {
        type
        quantity
      }
      revealTime
      bidAmount {
        type
        quantity
      }
      status
    }
  }
}

LookUp Authorities

{
  lookupAuthorities(names: []) {
    ownerAddress
    ownerAddress
    height
    bondId
    status
    expiryTime
    auction {
      id
      ownerAddress
      createTime
      minimumBid {
        type
        quantity
      }
      commitFee {
        type
        quantity
      }
      commitsEndTime
      revealFee {
        type
        quantity
      }
      revealsEndTime
      winnerBid {
        type
        quantity
      }
      winnerPrice {
        type
        quantity
      }
      winnerAddress
      bids {
        bidderAddress
        commitHash
        commitTime
        commitFee {
          type
          quantity
        }
        revealFee {
          type
          quantity
        }
        revealTime
        bidAmount {
          type
          quantity
        }
        status
      }
    }
  }
}

LookUp Names

{
  lookupNames(names: ["crn://hello/test"]) {
    latest {
      id
      height
    }
    history {
      id
      height
    }
  }
}

Resolve Names

{
  resolveNames(names: ["asd"]) {
    id
    names
    bondId
    createTime
    expiryTime
    owners
    attributes {
      key
      value {
        string
      }
    }
  }
}