REPL
About
This repository contains javascript console for waves blockchain. It is built on top of jsconsole and have predefined functions to work with waves
Builtin functions
JS lib
Console uses waves-transactions library. Top level library functions are bound to console global scope. The difference is that in console, seed argument is equal to env.SEED by default. You need to pass null explicitly if you only want to create transaction and not to sign it E.x.:
Console
const signedTx = //returns tx with no proofs "type": 4 "version": 2 "fee": 100000 "senderPublicKey": "8ViwGfvyyN1teUKV4Uvk2orK6XiYB4S4VuM2DqJ9Mj5b" "timestamp": 1542640481876 "proofs": "id": "CveeKH16XQcshV5GZP2RXppg3snxcKqRsM4wE5gxcuzc" "chainId": "T" "amount": 100 "recipient": "3MyAGEBuZGDKZDzYn6sbh2noqk9uYHy4kjw"
Additional functions
Broadcast signed tx using node from global variable
const resp = await
Deploy current open contract using node from global variable
const resp =
Sign arbitrary transaction
const tx = const signedTx =
Compile contract. Returns base64
const compiled =
Get contract text by tab name. Used inside web-ide or vscode plugin
const contractText =
Get contract text from currently open tab. Used inside web-ide or vscode plugin
const contractText =
Keys
// Address from seed. // Keypair from seed // Public key from seed // Private key from seed
Global object env
envSEED // Default seedenvCHAIN_ID // Default network byteenvAPI_BASE // Node url enveditors // Open editor tabs info
Usage
Dev server:
npm start
Starts dev server
React component
;;; renderApp/, document.getElementById'root';