npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tx-inspection-bap

v1.1.0

Published

Inspection transaction of BAP challenge

Downloads

1

Readme

#BAP CHALLENGE PRODUCT

In order to use this package, first of all, you need to install

npm i tx-inspection-bap

Create instance from tx-inspection-bap , for example :

const tx = require('tx-inspection-bap')

First, you need to have instance of Transaction service class,using https://rinkeby.infura.io/ for web3 provider:

let inspect = new tx.TransactionService(provider)

###You can also check status of an transaction with :

let status = await inspect.checkStatusTransaction(txHash)

This is an example result

{
  transaction_hash: '0x398599db0d610f7550cc76fdfbe8b01015a913e7ce3c0b62a9b4d7725aec0c0a',
  block_number: 4412771,
  status: 1 
}

status : 0 is pending, 1 is success, 2 is fail

block_number : null is pending or it will be a number of block

transaction_hash : what you put in


###You can also check status of create new contract challenge with :

let status = await inspect.checkStatusCreated(txHash) //for challenge by ETH 
let status = await inspect.checkStatusCreatedWithToken(txHash) // for challenge by Token

This is an example result

{
  transaction_hash: '0x398599db0d610f7550cc76fdfbe8b01015a913e7ce3c0b62a9b4d7725aec0c0a',
  block_number: 4412771,
  status: 1,
  address: '0xe44424579FFd20a198C0f7E852AD9663AB6Da11D' 
}

status : 0 is pending, 1 is success, 2 is fail

blockNumber : null is pending or it will be a number of block

transaction_hash : what you put in

address : null if transaction is pending or failed, or it will be an address of challenge contract


###You can check status of close contract challenge with :

let status = await inspect.checkStatusCloseChallenge(txHash)

This is an example result

{ transaction_hash: '0xd3d6b9b5545defed3f914a2d88564fb548b0b137b586b4f63db51debc2945d0b',
  contractAddress: '0xbf6417b682c87a64574e37cd56b35bd7b0e26c62',
  status: 1,
  challengeStatus: 1 }

status : 0 is pending, 1 is success, 2 is fail

contractAddress : challenge address

transaction_hash : what you put in

challengeStatus : 0 is challenge fail, 1 is success


###You can generate new signature from a message :

let status = await inspect.generateSignature(message, privateKey)

message : any string which was signed from begin, "1", "2" and so on


###You can recover address which signed the message :

let status = await inspect.recoverAddress(message, signature)

message : any string which was signed from begin

signature : type string, example : 0x0471a82879fff01d8ad90ac66ae8ee85657e726feb80b1d0ef3bc83bc297f15b6498174ec7fd7eec52e46aa17cebc85fab079b42a7274a09cfdd4781de410b5e1c