Home

api/CP_Account.js

Manages cryptocurrency accounts using remote, local, or in-memory database(s), and provides live blockchain interaction functionality.
Version:
  • 0.5.1
Source:

api/CP_SmartContract.js

Manages proxy CypherPoker smart contracts and defines a number of related utility functions.
Version:
  • 0.5.1
Source:

api/WSS_Connect.js

WebSocket Session connection API endpoint. The handshake MUST be established prior to attempting a connection.
Version:
  • 0.4.1
Source:

Example

Client Request -> {"jsonrpc":"2.0","method":"WSS_Connect","id":"2,"params":{"user_token":"7060939278321507","server_token":"9789091435706088"}}
Server Response -> {"jsonrpc":"2.0","result":{"message":"open","options":{},"private_id":"021b92efb9954fa4244c729190e05d2d9b55530d5e4f18da2d3615fdbad9c44d"},"id":"2"}
Note: SHA256("9789091435706088:7060939278321507") = "021b92efb9954fa4244c729190e05d2d9b55530d5e4f18da2d3615fdbad9c44d";

api/WSS_Handshake.js

WebSocket Session initiation API endpoint.
Version:
  • 0.4.1
Source:

Example

Client Request -> {"jsonrpc":"2.0","method":"WSS_Handshake","id":"1","params":{"user_token":"7060939278321507"}}
Server Response -> {"jsonrpc":"2.0","result":{"message":"accept","numconnections":1,"maxconnections":3,"peerconnections":1,"server_token":"9789091435706088"},"id":"1"}

api/WSS_Send.js

WebSocket Session message send API endpoint.
The handshake and connection MUST be established prior to attempting a send.
Version:
  • 0.4.1
Source:

Example

Client Request -> {"jsonrpc":"2.0","method":"WSS_Send","id":3,"params":{"user_token":"7060939278321507","server_token":"9789091435706088","type":"broadcast","data":"Hello, everyone!"}}
Server Response -> {"jsonrpc":"2.0","result":{"message":"ok"},"id":3}

api/WSS_Session.js

api/WSS_Tunnel.js

WebSocket tunneling using Sessions connectivity. Once established, the tunneled connections may send and retreive arbitrary data (not just JSON-RPC).
Version:
  • 0.4.1
Source:

server.js

A JSON-RPC 2.0 WebSocket and HTTP server. The full specification (http://www.jsonrpc.org/specification), including batched requests is supported.
Version:
  • 0.5.1
Author:
  • Patrick Bay
Source:
To Do:
  • Separate CypherPoker.JS-specific and generic WebSocket Sessions functionality and publish WSS as an independent project (e.g. NPM + GitHub)

utils/newHDWallet.js

Command line utility to generate a HD (Hierarchical Deterministic) wallet from which addresses can be generated.
Version:
  • 0.5.0
Source: