Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

General purpose library for CovenantSQL blockchain

License

NotificationsYou must be signed in to change notification settings

CovenantSQL/cql.js

Repository files navigation

CovenantSQL's client side library

Install

yarn add cql.js

or

npm i cql.js

Usage

  • Useasync andawait to handle requests
importCQLfrom'cql.js'(async()=>{// For existing valid websocket endpoint// please refer to https://developers.covenantsql.ioconstendpoint='$COVENANT_BP_WS_ENDPOINT'constcql=newCQL(endpoint)try{awaitcql.connect()}catch(e){console.error(e)}// connect successletstatus=awaitcql.bp.getRunningStatus()console.log('BP runing status: ',status)})()
  • Use promises to handle requests
importCQLfrom'cql.js'// For existing valid websocket endpoint// please refer to https://developers.covenantsql.ioconstendpoint='$COVENANT_BP_WS_ENDPOINT'constcql=newCQL(endpoint)cql.connect().then(()=>{// connect successcql.bp.getRunningStatus().then(status=>{console.log('BP runing status: ',status)})}).catch(e=>{console.error(e)})

APIs

  • getProtocolVersion
  • getRunningStatus
  • getBlockList
  • getBlockByHeight
  • getBlockByHash
  • getTransactionList
  • getTransactionListOfBlock
  • getTransactionByHash

About

General purpose library for CovenantSQL blockchain

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp