0.0.10 • Published 2 years ago

@cmdcode/core-orm v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Core ORM

An ORM for Bitcoin Core

Example code:

import { Address }    from '@scrow/tapscript'
import { CoreDaemon } from '@cmdcode/core-orm'

const core = new CoreDaemon()

core.on('ready', async (client) => {
  
  const wallet = await client.get_wallet('test_wallet')
  const addr   = await wallet.newaddress

  console.log('addr:', addr)

  const template = {
    vout : [{
      value : 800_000,
      scriptPubKey : Address.parse(addr).script
    }]
  }

  await wallet.ensure_funds(1_000_000)

  const txdata = await wallet.fund_tx(template)

  console.log(txdata)

  const txid = await wallet.publish_tx(txdata)

  console.log('txid:', txid)

  await core.shutdown()
})

await core.startup()
0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago