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 🙏

© 2025 – Pkg Stats / Ryan Hefner

waykibridge

v0.1.0

Published

act as a bridge to connect waykichain web wallet and mobile wallet.

Downloads

4

Readme

waykiBridge第三方调用

调用方式

参数:接口名,接口参数,成功回调,失败回调

waykiBridge.walletPlugin(name,query,function(res){},function(err){})

注:query内属性均为string, 数组除外

注:金额需乘以10的8次方

walletPluginContractInvoke(合约调用)

query参数:

{
    "regId":"",     // 合约id
    "contractField", "", // 合约字段
    "inputAmount":"",   // 输入金额(没有传0)
    "remark" :""  // 备注,如:猜数字
}

example:

    waykiBridge.walletPlugin(
        "walletPluginTransfer",
        {
          regId: "13103-1",
          contractField: "f0",
          inputAmount: "1",
          remark : ""

        },
        function(res) {
            console.log(res)
        },
        function(err) {
            console.log(err)
        }
    );

成功回调

{ 
    "result": { 
        "amount": 100000000,
        "fee": 1000000, 
        "contract": "f0",
        "txid":"029c86a648030e2b28ccc64c5ed60c96a0c61de95a30cab82159a476ceeeaf3d", 
        "regId": "91647-1", 
        "txType": null,
        "toAddress": "wNTJYM3gyXJH9dPQe96ofyHotf5eq3EP14", 
        "sendAddress": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa" 
      }, 
    "errorCode": 0 
}

失败回调

{ "errorMsg": "errors.InvalidArgument is not a constructor" }

walletPluginContractIssue(合约发布)

query参数

{
    "contractContent": "", //合约内容
    "contractDesc": ""     //合约描述
}

example

    waykiBridge.walletPlugin(
        "walletPluginContractInvoke",
        {
          contractContent: 'mylib = require "mylib"',
          contractDesc: "描述",
        },
        function(res) {
            console.log(res)
        },
        function(err) {
            console.log(err)
        }
    );

成功回调

{
    "result": { 
         "amount": 0, 
         "fee": 110000000, 
         "contract": null, 
         "txid": "4bbbee4320843d19d4a008bfc7dc1a26fdf5ed9c1a96415db033d4f83c6e9fa0", 
         "regId": "91647-1", 
         "txType": null,
         "toAddress": null,
         "sendAddress": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa"
    }, 
    "errorCode": 0 
}

失败回调

{ "errorMsg": "error from server response: [-4],submittx Error:operate-account-failed " }

walletPluginTransfer

query参数

{
    "amount",""   //转账金额(单位wicc)
    "collectionAddress", "" //转账目标钱包的地址
    "remark": "" //备注
}

example:

    waykiBridge.walletPlugin(
        "walletPluginTransfer",
        {
          amount: "1", 
          collectionAddress: "Wi2H3XAhMtdLPkjQVSkYXhF3GRNTwAhtqA",
          remark: "备注"
        },
        function(res) {
          _this.transferRes = res;
        },
        function(err) {
          _this.transferRes = err;
        }
    );

成功回调

{ 
    "result": { 
        "amount": 10000000, 
        "fee": 10000, 
        "contract": "", 
        "txid": "64244292b9abb2e5b8d55a3f37584781e0151e0358a440b0e910100f9970957b",
        "regId": "91647-1", 
        "txType": null, 
        "toAddress": "weyg6FeZP5Mf6dNn1TQJbU7pHhLx1QMkZ8", 
        "sendAddress": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa" 
    }, 
    "errorCode": 0 
}

失败回调

{ "errorMsg": "error from server response: [-4],submittx Error:dust amount " }

walletPluginNodeVote

query参数

{
    "nodeList": [
    {
      "votedAddress":""  //被投票地址
      "voteCount": ""    //wicc数量
    },
    ...
  ]
}

example

    waykiBridge.walletPlugin(
        "walletPluginNodeVote",
        {
          nodeList: [
              votedAddress: "Wi2H3XAhMtdLPkjQVSkYXhF3GRNTwAhtqA",
              voteCount: "1"
          ]
        },
        function(res) {
            console.log(res)
        },
        function(err) {
            console.log(err)
        }
    );

成功回调

{ 
    "result": {
         "amount": 0, 
         "fee": 10000, 
         "contract": null, 
         "txid": "9d9afcc62505ef256f54ca6eeeced369395698eb25487f89ea99b37d9be9479b", 
         "regId": 
         "91647-1", 
         "txType": null, 
         "toAddress": null, 
         "sendAddress": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa" 
    }, 
    "errorCode": 0 
    }

失败回调

{ "errorMsg": "Wi2H3XAhMtdLPkjQVSkYXhF3GRNTwAhtqA not found" }

getAddressInfo

query参数

{} //无参数请传空对象

example

    waykiBridge.walletPlugin(
        "getAddressInfo",
        {},
        function(res) {
            console.log(res)
        },
        function(err) {
            console.log(err)
        }
    );

成功回调

{ 
    "result": { 
        "account": { 
            "address": "WPqY8RJHN1u4Kzrnj2mHG9V8igJJVVcveb", 
            "id": "bd2356fa-6137-448e-806f-d6ab09785749", "testnetAddress": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa" 
            }, 
        "network": "testnet", 
        "address": "wLnwB9n9PCdP2sWAF3R3KvMujxGnVsE6aa" 
    }, 
    "errorCode": 0 
}

失败回调

{ "errorMsg": "Please unlock wallet first" }

所有接口返回错误信息

{
    "errorCode": int   //错误码: 0-成功 100-参数错误  101-取消 200-钱包不存在
    "errorMsg" : ""    //错误信息
    "result": ""       //返回数据 (只有成功(errorCode == 0)才有返回)
}