For the complete documentation index, see llms.txt. This page is also available as Markdown.

RPC/LCD API

Public RPC/LCD Endpoint

Testnet

Please refer to Current testnet to get the latest chain ID, RPC, LCD and explorer for testnet

https://github.com/likecoin/testnets

Mainnet

Please refer to this Github repo to get the latest chain ID, RPC, LCD and explorer for testnet

https://github.com/likecoin/mainnet

RPC/LCD API

Since LikeCoin chain is based on Cosmos SDK, you may refer to the Cosmos SDK documents for most of the API:

https://v1.cosmos.network/rpc/v0.42.6

GET /auth/accounts/{address}

Returns the information about the account.

Some commonly used fields:

response.result.value.coins ([{amount: string, denom: string}]): the balance of the account. response.result.value.account_number (string): the account number, which is needed when signing transactions. response.result.value.sequence (string): the sequence for replay protection, which is needed when signing transactions.

Example:

https://mainnet-node.like.co/auth/accounts/cosmos1mnyn7x24xj6vraxeeq56dfkxa009tvhgknhm04

GET /txs/{hash}

Fetch the transaction information.

A transaction may contain multiple messages, and if any of them failed during execution, the whole transaction fails without any state change, i.e. previous messages will be rollbacked.

User can check if the whole transaction succeeded by checking if the last object in response.logs shows success: true or not.

Example:

https://mainnet-node.like.co/txs/F7AE531BC8CDD70A8C69ADBCD1F77029C11965900F3F0F239627E1DAF2C72A77

POST /txs

Sends a signed transaction.

Example request body:

Response:

Last updated