0.0.10 • Published 9 months ago

@cmdcode/core-orm v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months 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

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago