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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ant-openunion-blockchain

v1.0.2

Published

NPM module for acquiring response from the Ant Open Union Blockchain Rest API without form authentication hassle.

Readme

antOpenUnionBlockchain

NPM module for acquiring response from the Ant Open Union Blockchain Rest API without form authentication hassle

Install

npm install ant-openunion-blockchain

Requirements

This package builds upon the fact that a correct pair of accessId and AccessKey are provided. You can generate these Here

Usage

How to initialize the module with the correct data.

const ant = require('ant-openunion-blockchain');

const options = {
	AccessId: "AEVMeqalDIMMPKLX", 
	AccessKey: "./access.key" //控制台下载的access.key 文件内需要将 -----BEGIN BEGIN PRIVATE KEY----- 及 -----END BEGIN PRIVATE KEY----- 替换为 -----BEGIN PRIVATE KEY----- 和 -----END PRIVATE KEY-----
};

const antblc = new ant(options, (err, result) => {
	if(err) throw err;
	console.log(result); 
	// Configured successfully
});

ShakeHand and Get token 握手并获得access token

a token will be returned to you.

const getToken = antblc.shakeHand((err, result) => {
	if(err) throw err;
	console.log(result);
	//返回数据
 	//{ success: true,
    //  code: '200',
    //  data: '067d1e51-3766-48f9-9d77-426ae6f1e9e3' }
});

Create Transactions 交易消息类

Endpoint https://rest.baas.alipay.com/api/contract/chainCallForBiz

存证

let options={"orderId":"uniqueOrderid","bizid":"a00e36c5","account":"链上账户名","content":"hello","tenantid":"tenantid","mykmsKeyId":"kmskeyid","method":"DEPOSIT","accessId":"accessId","token":"token got from shakeHand","gas":100000}
antblc.callApi("api/contract/chainCallForBiz",options, (err, result) => {
	if(err) throw err;
	console.log(result)
	//返回数据
	//{ success: true,
    //  code: '200',
    //  data: 'bed3d2cf1836853e665304a9f05c485ca577341fb5ea2cd4fc4301d9d0e59336' }
});

异步调用solidity合约

let callContractPostData={"orderId":"uniqueOrderid","bizid":"a00e36c5","account":"链上账户名","contractName":"contractName","methodSignature":"testfunc(uint256)","outTypes":"[bool]","requestStr":"[1001]","tenantid":"tenantid","mykmsKeyId":"mykmsKeyId","method":"CALLCONTRACTBIZASYNC","accessId":"accessId","token":"token got from shakeHand","gas":120000}
antblc.callApi("api/contract/chainCallForBiz",options, (err, result) => {
	if(err) throw err;
	console.log(result)
	//返回数据
	//{ success: true,
    //  code: '200',
    //  data: '340504146e71fe592218ebaba7a77f476c94df0ce37bb45b468af9e90b6f6f0b' }
});

其他

参照在线文档 https://tech.antfin.com/docs/2/146925

Query Transactions 查询消息类

Endpoint https://rest.baas.alipay.com/api/contract/chainCall

查询交易

let options ={"bizid":"a00e36c5","method":"QUERYTRANSACTION","hash":"4697408818a38989dad45f13a7467d0eb16e8d89430fbd3d84cda57fabab614f","accessId":"accessId","token":"token got from shakeHand"}
antblc.callApi("api/contract/chainCall",options, (err, result) => {
		if(err) throw err;
		console.log(result);
		//返回数据
		// { success: true,
        // code: '200',
        // data: '{"blockNumber":6669833,"transactionDO":{"data":"EstwxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2QMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQDQzOTk0NDFjNDM2OGY5ZjM3NWY3Y2NhYTI3MzgxZThjOTg3M2E5Yzc5Y2YwOTIzMTFiZjI1NDBmZTU3ZTAzNzg=","timestamp":1585826930345}}' }
	   });

其他

参照在线文档 https://tech.antfin.com/docs/2/146925