🟒Simple API requests

Simple, one-line APIs. No rocket science


All APIs that the KLY core contains are well documented and available in our Postman organization

Please, follow the link to test it on your own and check the useful example for each request ☺️

Multilanguage support

Web1337 SDK has implementations for various languages ​​such as JS(Node.js), Golang, Python and others!

In the initial stages, this documentation will provide an example of an API call for the JS SDK, but in other languages ​​the methods and their names have a similar meaning.

Also, don't forget to use the Postman documentation where you can learn about queries and data formats.

Create the Web1337 instance

Here you just need to import the library to your project workspace and create the instance using this snippet:

import Web1337 from 'web1337'

let web1337 = new Web1337({

    proxyURL:'http://localhost:8888' // for example 'http(s)://login:password@' or 'socks5h://Vlad:Cher@'
  • symbioteID - 256-bit identifier of appropriate symbiote(something like chain id in EVM). On a technical level, this is the BLAKE3 manifest hash of the chain file which includes the genesis hash, the repository version hash and so on. For maximum security, it is recommended to include the manifest in several blockchains (hostchains) at once

  • workflowVersion - major version number of workflow of your symbiote to make sure you know the further logic in this version

  • nodeURL - the endpoint of node to interact with network. It might be your own node, Node-as-a-Service provider, etc.

  • proxyURL - the URL of proxy that will be used to interact with node. It might be HTTP(s) or SOCKS proxy(to allow connections over TOR/I2P or other SOCKS)

Only three first components are required for proper work

Call methods

Once you create web1337 instance you have ability to call methods without manual request construction.

For example, to get block by ID, call:

// Block id format is <epochIndex>:<pubkeyOfCreator>:<blockIndexInEpoch>
let blockID = "1:9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBK:15"

await web1337.getBlockByBlockID(blockID)

For example, to get information about pool call

let poolPubKey = "6XvZpuCDjdvSuot3eLr24C1wqzcf2w4QqeDh9BnDKsNE"

await web1337.getPoolStats(poolPubKey)

Or, to check the synchronization status of your node, call

await web1337.getSynchronizationStatus()

Try yourself πŸ€“

Try playing and studying the methods available in the SDK. If necessary, as mentioned earlier, check Postman.

Last updated