chiguireitor / xcpjsv2

Modern Counterparty XCP Javascript library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XCPJSv2:

A modern javascript library for Counterparty (XCP)

Usage:

xcpjsv2.setNetwork('regtest') // optional
xcpjsv2.setBroadcastService(xcpjsv2.services.transactionBroadcaster(process.env.BITCOIN_ENDPOINT))
xcpjsv2.setUtxoService(xcpjsv2.services.indexdUtxos(process.env.INDEXD_HTTP_ENDPOINT))
let addr = xcpjsv2.services.transactionSigner.wifKeyP2PKHSigner(yourWif, bitcoin.networks['regtest']) // optional Network parameter
let sendResult = await xcpjsv2.send(sourceAddress, destinationAddress, asset, amount, memo)
console.log('send result:', sendResult)

About

Modern Counterparty XCP Javascript library


Languages

Language:JavaScript 100.0%