https://github.com/button-tech/utils-hip
This package provides BIP44 coin constants
https://github.com/button-tech/utils-hip
Last synced: about 2 months ago
JSON representation
This package provides BIP44 coin constants
- Host: GitHub
- URL: https://github.com/button-tech/utils-hip
- Owner: button-tech
- License: mit
- Created: 2019-09-17T16:16:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T16:22:39.000Z (over 6 years ago)
- Last Synced: 2025-08-14T09:59:45.074Z (8 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
You can read more about BIP44 here:
https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
```
type Constants []constant
// Create is starting point. You get constants.
Create() Constants
// If arguments are not passed, all constants will be returned, you can also pass coin-symbol and recieve slice constant as a result.
func(c Constants) Get(coinSymbol ...string) []constant
```
```
Format: constant, coinSymbol, coinName
ie. [{"2147483708" "ETH" "Ether"}]
Usage:
consts := bip44.Create()
eth := c.Get("ETH") // [{"2147483708" "ETH" "Ether"}]
ethBtc := c.Get("ETH", "BTC") // [{"2147483648" "BTC" "Bitcoin"} {"2147483708" "ETH" "Ether"}]
Also you can get all constants:
all := c.Get()
// [{"2147483648" "BTC" "Bitcoin"} {"2147483649" Testnet (all coins)} {"2147483650" "LTC" "Litecoin"} {"2147483651" "DOGE" "Dogecoin"} ...]
```
LICENSE MIT