Socket
Socket
Sign inDemoInstall

@cmdcode/core-orm

Package Overview
Dependencies
12
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cmdcode/core-orm

Command Bitcoin Core via an ORM suite of automation tools.


Version published
Maintainers
1
Created

Readme

Source

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()

FAQs

Last updated on 17 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc