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

@swtc/proxy

v1.1.3

Published

rest api to jingtum blockchain

Downloads

38

Readme

swtc-proxy API服务 - 代理至井通节点

在线文档

描述

swtc-lib使用websocket,兼容性和规模化有一定的问题

swtc-proxy提供REST服务,代理到井通节点解决上述问题

约定

  1. 安全第一, 确保密钥不出本机
  2. 尽量保持数据结构 和 swtc-lib 对应一致
  3. 所有 API 应答均为 json object, 包括数据和错误
  4. 尽量支持可选参数, 几乎所有swtc-lib支持的参数都可以通过 query 获得支持
  5. 集成至 swtc-transactionswtc-api
  6. 精简为主, 面向所有用户。 提供缺省配置和 docker image
  7. swagger-ui 标准文档

使用

kubernetes (通过环境变量设置上游/调试/基于 IP 的访问限制)

  1. kubectl create -f https://raw.githubusercontent.com/swtcca/swtcproxy/master/kubernetes.yaml

docker (通过环境变量设置上游/调试/基于 IP 的访问限制)

  1. docker run --rm -e UPSTREAM=wss://s.jingtum.com:5020 -e DEBUG=true -e RATE=100 -d -p 5080:5080 lospringliu/swtcproxy

源代码

  1. git clone https://github.com/swtcca/swtcproxy.git
  2. cd swtcproxy
  3. npm install
  4. env UPSTREAM=wss://s.jingtum.com:5020 RATE=100 npm run start
  5. 本地文档: http://localhost:5080/swagger
    • 相应修改 static/swagger.jsonserver.url
  • 配合swtc-api使用,提供和swtc-lib相似的接口
    • 避免 websocket
    • 完整接口

定制

源代码

  1. git clone https://github.com/swtcca/swtclib.git
  2. cd swtclib/packages/swtc-proxy
  3. npm install
  4. npm run test
  5. npm run start
  6. 本地文档: http://localhost:5080/swagger
    • 相应修改 static/swagger.jsonserver.url

修改 start.js

  • 配置
  • 中间件
  • 后端
  • 日志
  • 扩展

修改源文件 tssrc/