0.1.2 • Published 3 years ago
@azpool/chia-client v0.1.2
Chia Client
TypeScript client for communicating with Chia RPC interfaces. All API calls return promises.
Edit from chia-client by Freddie Coleman
Configs for using testnet
chia.host : CHIA__HOSTNAME || '0.0.0.0'
chia.ca_cert_path: CHIA__CA_CERT_PATH || false
chia.fullnode.port: CHIA__FULLNODE__PORT || 8555
chia.fullnode.cert_path : CHIA__FULLNODE__CERT_PATH
chia.fullnode.key_path : CHIA__FULLNODE__KEY_PATH
chia.wallet.port: CHIA__WALLET__PORT || 9256
chia.wallet.cert_path : CHIA__WALLET__CERT_PATH
chia.wallet.key_path : CHIA__WALLET__KEY_PATH
chia.wallet.backup_host : CHIA__WALLET__BACKUP_HOST || 'https://backup.chia.net'
Full Node
const { FullNode } = require('@azpool/chia-client');
const fullNode = new FullNode({
protocol: 'http',
hostname: 'localhost',
port: 8555
});
const blockchain = await fullNode.getBlockchainState();
Wallet
import { Wallet } = require('@azpool/chia-client');
const wallet = new Wallet({
protocol: 'http',
hostname: 'localhost',
port: 8555
});
const mnemonic = await wallet.generateMnemonic();
Credits
This client is provided by Chia Blockchain Explorer.