xverse-wallet-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

Run example

cd example
npm install
npm start

USAGE

import BitcoinWalletAPI from 'xverse-wallet-api';

const api = new BitcoinWalletAPI();

// Get addresses
api.getAddresses().then(addresses => {
  console.log('Addresses:', addresses);
});

// Send transaction
api.sendTransaction('mockAddress1', 1000).then(response => {
  console.log('Transaction:', response.txid);
});

// Sign message
api.signMessage('Hello, Bitcoin!').then(response => {
  console.log('Signed Message:', response);
});

// Sign PSBT
api.signPSBT('mockPSBT', [0, 1]).then(response => {
  console.log('Signed PSBT:', response.txid);
});

// Deploy contract
api.deployContract({ contractCode: 'code', contractName: 'MyContract' }).then(response => {
  console.log('Deploy Contract Response:', response.txid);
});

Readme

Keywords

Package Sidebar

Install

npm i xverse-wallet-api

Weekly Downloads

1

Version

1.0.11

License

MIT

Unpacked Size

748 kB

Total Files

28

Last publish

Collaborators

  • rickalon