Giter Club home page Giter Club logo

Comments (3)

simon-jentzsch avatar simon-jentzsch commented on May 25, 2024 1

on the commandline this works as

in3 -c btc -f 5 getrawtransaction f84f182e531d0c33b6952c57a8b3e1edecc1851a273dbdd0db2404213bcec8d6 true
in3 -c btc -f 5 getblockheader  00000000000000000002596ec480fb2aa28dad2ef020a74c406a9bd73901950d true

in ts

import { IN3 } from 'in3-wasm'

async function showBlock() {
  // create new incubed instance
  const client = new IN3({
    chainId: 'btc'
  })

  // send raw RPC-Request
  const lastBlock = await client.btc.getBlockHeader(
      '00000000000000000002596ec480fb2aa28dad2ef020a74c406a9bd73901950d'
  )

  console.log("Blockheader: ", JSON.stringify(lastBlock, null, 2))

  // clean up
  client.free()

}

showBlock().catch(console.error)

But since this feature is not officially released yet ( but already included in the last binaries) in the next weeks (after finishing up the tests) we will anounce it and explain more in a blogpost.

But feel free to already hava a look at the documentation: https://in3.readthedocs.io/en/develop/bitcoin.html

from in3.

lessmore92 avatar lessmore92 commented on May 25, 2024

Can we use IN3 client to develop an app like a SPV wallet?

from in3.

simon-jentzsch avatar simon-jentzsch commented on May 25, 2024

of course! But at the moment incubed is able to verify transactions and blocks. What we are not able to verify yet, is a balance of an account, since this means you would need to proof, that those tx outputs have not been spent. We are working on this, but at the moment those balances would be unverifified yet.

from in3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.