Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ZenGo-X/binance-thresh-wallet
Wallet for Binance chain powered by two-party ECDSA
https://github.com/ZenGo-X/binance-thresh-wallet
Last synced: 3 months ago
JSON representation
Wallet for Binance chain powered by two-party ECDSA
- Host: GitHub
- URL: https://github.com/ZenGo-X/binance-thresh-wallet
- Owner: ZenGo-X
- License: gpl-3.0
- Created: 2019-05-16T12:44:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-16T15:54:58.000Z (about 5 years ago)
- Last Synced: 2024-07-09T10:28:41.631Z (4 months ago)
- Language: TypeScript
- Size: 2.61 MB
- Stars: 51
- Watchers: 10
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Binance chain threshold wallet
=====================================
Binance chain wallet powered by two-party ECDSA.
Soon to be integrated into the ZenGo iOS wallet (www.zengo.com)## Installation:
```
$ npm install @kzen-networks/binance-thresh-wallet
```
## Usage:
Server (acts as the co-signer in the two-party signing protocol):
```js
const { BncThreshSigServer} = require('@kzen-networks/binance-thresh-wallet');
const server = new BncThreshSigServer();
server.launch();
```Client:
```js
const { BncThreshSigClient } = require('@kzen-networks/binance-thresh-wallet');(async () => {
const client = new BncThreshSigClient();
// initialize
await client.init();
const address = client.getAddress();
console.log(address);
// tbnb1zaudxtp40f6w3vgjmxqpxjaxfa7mt09t5x0h2s
/* Now you should deposit BNB into this address */console.log(await client.getBalance());
// [{"free":"0.09244000","frozen":"0.00000000","locked":"0.00000000","symbol":"BNB"}]const toAddress = client.getAddress(1); // new address
console.log(toAddress);
// tbnb1glzdlqt70uk7qw8e7jy7u708emfhe9qsdwxhc5console.log(await client.transfer(address, toAddress, 0.00123, 'BNB', 'demo!'));
// {"result":[{"code":0,"hash":"DD505FB142B473471D969BA278E82548BEDD637FEC3A3ED6350408B34A74DB9E","height":"","log":"Msg 0: ","ok":true}],"status":200}
})();
```
## Demo:
You can also use a demo using the command line.
Server:
```bash
$ demo/server
```
Client:
```bash
$ demo/client --helpUsage: client [options] [command]
Options:
-h, --help output usage informationCommands:
address [options]
balance
transfer [options]
buy_order
sell_order
cancel_order```
Transfer demo:
|![Transfer demo](https://raw.githubusercontent.com/KZen-networks/binance-thresh-wallet/master/demo/binance-tss-demo.gif "Binance Threshold Wallet Demo")|
|:--:|Trade Demo:
|![Trade demo](https://raw.githubusercontent.com/KZen-networks/binance-thresh-wallet/master/demo/BNB%20trade%20demo.gif "Binance Threshold Wallet Demo")|
|:--:|## Contact
Feel free to [reach out](mailto:[email protected]) or join the KZen Research [Telegram]( https://t.me/kzen_research) for discussions on code and research.