home | heroText | tagline | features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
true |
SWTC公链/联盟链nodejs库 |
专为应用开发者打造 |
|
::: tip 安装
区块链操作使用
::: ::: tip 定义区块链区块链定义举例
::: ::: tip 使用区块链操作使用
属性静态绑定
::: stateDiagram-v2 direction BT LIB --> BLOCKCHAIN : websocket RPC --> BLOCKCHAIN : rpc BLOCKCHAIN: 区块链网络服务 The Block Chain Network (defined by chain specification) where Nodes Provide Websocket And RPC Services LIB: Class Remote state LIB { WWallet: Wallet -- LIBFactory: require("@swtc/lib").Factory(chain) -- WTransaction: Transaction } RPC: Class Remote state RPC { RTransaction: Transaction -- RPCFactory: require("@swtc/rpc").Factory(chain) -- RWallet: Wallet } CTransaction: Class Transaction CSerializer: Class Serializer CKeypair: Class Keypair CWallet: Class Wallet state CWallet { KeyPair -- WalletFactory: require("@swtc/wallet").Factory(chain) -- addressCodec } AddressCodec --> CKeypair CKeypair --> CWallet CWallet --> LIB : 依赖 CWallet --> Utils CSerializer --> CTransaction CWallet --> CTransaction : 依赖 Utils --> CTransaction CWallet --> CSerializer CWallet --> RPC : 依赖 CTransaction --> LIB : 依赖 CTransaction --> RPC : 依赖国密综合 - 国密 公链 联盟链 定制链
程序包名称 | CDN | 功能描述 |
---|---|---|
@swtc/rpc | name: swtc_rpc unpkg jsdelivery |
SWTC 公链/联盟链库, 基于 rpc |
@swtc/lib | name: swtc_lib unpkg jsdelivery |
SWTC 公链/联盟链库, 基于 websocket |
@swtc/proxy | 节点代理, 提供标准 API 接口 | |
@swtc/api | name: swtc_api unpkg jsdelivery |
SWTC 公链库, 基于 restapi |
@swtc/transaction | name: swtc_transaction unpkg jsdelivery |
井通公链交易库, 支付/挂单/关系/合约 |
@swtc/serializer | 井通公链交易序列化库, 基于钱包 | |
@swtc/utils | 井通公链 utility 库,基于钱包 | |
@swtc/wallet | name: swtc_wallet unpkg jsdelivery |
井通公链钱包库, 支持所有联盟链 |
@swtc/keypairs | 公钥私钥 | |
@swtc/address-codec | 编码解码 | |
@swtc/common | 基础信息 |
**金主** 经济支援单位。可以参与影响库规划, 享受专业支持
**赞助** 欢迎喜欢项目的个人捐助
**用户** 列出公司或者个人也是对项目的支持
<script> export default { data () { return { install: [ ' websocket接口 npm install @swtc/lib ', ' rpc接口 npm install @swtc/rpc ', ' 只使用 钱包 npm install @swtc/wallet ' ], simplified: [ ' const {Transaction, Wallet, Serializer, utils} = Remote ', ' const {KeyPair, addressCodec, config} = Wallet ' ], startups: [ ' websocket接口 const Remote = require("@swtc/lib").Factory(chain_spec)', ' rpc接口 const Remote = require("@swtc/rpc").Factory(chain_spec)', ' 只使用 钱包 const Wallet = require("@swtc/wallet").Factory(chain_spec)' ], chainspecs: [ '缺省为井通公链', '用字串指定预定义的链 "jingtum" 对应 井通公链', '用字串指定预定义的链 "ripple" 对应 瑞波公链', '用字串指定预定义的链 "bizain" 对应 商链', '用对象定制链 {fee: 1000} 定制转账费用的 井通链', '用对象定制链 {guomi: true} 定制符合国密标准的 井通链', '用对象定制链 {fee: 1000000, currency: "BWT", ACCOUNT_ALPHABET: "bpsh...Axyz"} 定制转账费用的 商链', '用对象定制链 还可以定制默认issuer/通证别名/默认节点等' ] } }, } </script>