cosmos-rest

0.2.1 • Public • Published

cosmos-rest

JavaScript client for the Cosmos SDK API

Useage

npm i cosmos-rest -s

import Client from 'cosmos-rest';
//init cosmos server provider
const cosmosClient = new Client("http://192.168.16.11:1314");
/**
* @address  The address you should  query
*/
cosmosClient.query_account(address[, callback])
//Join Game
cosmosClient.join_game(signMsg[,callback])
//获取gsid
cosmosClient.get_gc(json[,callback])
//游戏行为
cosmosClient.player_action(gsid,json[,callback])
//退出游戏
cosmosClient.end_game(gsid,json[,callback])
//查询游戏筹码
cosmosClient.query_amount(gsid,json[,callback])
//状态迁移
cosmosClient.game_relay(json[,callback])
//交易查询
cosmosClient.query_tx(txhash[,callback])
//结束游戏并进行结算
cosmosClient.end_game_session(gsid[,callback])

Readme

Keywords

Package Sidebar

Install

npm i cosmos-rest

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

26.2 kB

Total Files

9

Last publish

Collaborators

  • meyun