@ledgerhq/types-cryptoassets
Advanced tools
Comparing version 7.0.0 to 7.1.0-next.0
# @ledgerhq/types-cryptoassets | ||
## 7.1.0-next.0 | ||
### Minor Changes | ||
- [#3079](https://github.com/LedgerHQ/ledger-live/pull/3079) [`d9732f38ed`](https://github.com/LedgerHQ/ledger-live/commit/d9732f38ed891ce090c98645de55103208015a60) Thanks [@gre](https://github.com/gre)! - Sunset Compound Lending from Ledger Live 'native' codebase | ||
## 7.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -0,1 +1,3 @@ | ||
import { CoinType } from "./slip44"; | ||
export declare type CryptoCurrencyId = "aeternity" | "aion" | "akroma" | "algorand" | "ark" | "atheios" | "avalanche_c_chain" | "banano" | "bitcoin" | "bitcoin_cash" | "bitcoin_gold" | "bitcoin_private" | "bsc" | "callisto" | "cardano" | "cardano_testnet" | "celo" | "clubcoin" | "cosmos" | "cosmos_testnet" | "dash" | "decred" | "dexon" | "ellaism" | "dogecoin" | "digibyte" | "energywebchain" | "eos" | "elastos" | "elrond" | "ethereum" | "ethereum_classic" | "ether1" | "ethergem" | "ethersocial" | "expanse" | "factom" | "fic" | "flow" | "game_credits" | "gochain" | "groestlcoin" | "hcash" | "hedera" | "helium" | "hpb" | "hycon" | "icon" | "icp" | "iota" | "juno" | "iov" | "kin" | "komodo" | "kusama" | "lbry" | "litecoin" | "lisk" | "mix" | "monero" | "moonriver" | "musicoin" | "nano" | "nem" | "neo" | "nervos" | "nimiq" | "nix" | "nos" | "ontology" | "particl" | "peercoin" | "pirl" | "pivx" | "poa" | "polkadot" | "polygon" | "poswallet" | "qrl" | "qtum" | "ravencoin" | "ripple" | "rise" | "reosc" | "resistance" | "solana" | "stakenet" | "stratis" | "stealthcoin" | "stellar" | "osmosis" | "shyft" | "tezos" | "thundercore" | "tomo" | "tron" | "ubiq" | "vechain" | "vertcoin" | "viacoin" | "wanchain" | "waves" | "zcash" | "zclassic" | "zcoin" | "zencash" | "zilliqa" | "crypto_org" | "bitcoin_testnet" | "ethereum_ropsten" | "ethereum_goerli" | "stacks" | "crypto_org_croeseid" | "solana_testnet" | "solana_devnet" | "filecoin" | "arbitrum" | "cronos" | "fantom" | "flare" | "songbird" | "moonbeam" | "near"; | ||
/** | ||
@@ -34,3 +36,2 @@ * | ||
tokenType: string; | ||
compoundFor?: string; | ||
}; | ||
@@ -56,6 +57,6 @@ /** | ||
type: "CryptoCurrency"; | ||
id: string; | ||
id: CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo"; | ||
forkedFrom?: string; | ||
managerAppName: string; | ||
coinType: number; | ||
coinType: CoinType; | ||
scheme: string; | ||
@@ -77,3 +78,3 @@ color: string; | ||
networkId?: number; | ||
baseChain?: string; | ||
baseChain?: "mainnet" | "goerli" | "ropsten"; | ||
hardfork?: string; | ||
@@ -98,3 +99,3 @@ rpc?: string; | ||
export declare type CryptoOrTokenCurrency = CryptoCurrency | TokenCurrency; | ||
export {}; | ||
export { CoinType }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
import { CoinType } from "./slip44"; | ||
export { CoinType }; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,3 @@ | ||
import { CoinType } from "./slip44"; | ||
export declare type CryptoCurrencyId = "aeternity" | "aion" | "akroma" | "algorand" | "ark" | "atheios" | "avalanche_c_chain" | "banano" | "bitcoin" | "bitcoin_cash" | "bitcoin_gold" | "bitcoin_private" | "bsc" | "callisto" | "cardano" | "cardano_testnet" | "celo" | "clubcoin" | "cosmos" | "cosmos_testnet" | "dash" | "decred" | "dexon" | "ellaism" | "dogecoin" | "digibyte" | "energywebchain" | "eos" | "elastos" | "elrond" | "ethereum" | "ethereum_classic" | "ether1" | "ethergem" | "ethersocial" | "expanse" | "factom" | "fic" | "flow" | "game_credits" | "gochain" | "groestlcoin" | "hcash" | "hedera" | "helium" | "hpb" | "hycon" | "icon" | "icp" | "iota" | "juno" | "iov" | "kin" | "komodo" | "kusama" | "lbry" | "litecoin" | "lisk" | "mix" | "monero" | "moonriver" | "musicoin" | "nano" | "nem" | "neo" | "nervos" | "nimiq" | "nix" | "nos" | "ontology" | "particl" | "peercoin" | "pirl" | "pivx" | "poa" | "polkadot" | "polygon" | "poswallet" | "qrl" | "qtum" | "ravencoin" | "ripple" | "rise" | "reosc" | "resistance" | "solana" | "stakenet" | "stratis" | "stealthcoin" | "stellar" | "osmosis" | "shyft" | "tezos" | "thundercore" | "tomo" | "tron" | "ubiq" | "vechain" | "vertcoin" | "viacoin" | "wanchain" | "waves" | "zcash" | "zclassic" | "zcoin" | "zencash" | "zilliqa" | "crypto_org" | "bitcoin_testnet" | "ethereum_ropsten" | "ethereum_goerli" | "stacks" | "crypto_org_croeseid" | "solana_testnet" | "solana_devnet" | "filecoin" | "arbitrum" | "cronos" | "fantom" | "flare" | "songbird" | "moonbeam" | "near"; | ||
/** | ||
@@ -34,3 +36,2 @@ * | ||
tokenType: string; | ||
compoundFor?: string; | ||
}; | ||
@@ -56,6 +57,6 @@ /** | ||
type: "CryptoCurrency"; | ||
id: string; | ||
id: CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo"; | ||
forkedFrom?: string; | ||
managerAppName: string; | ||
coinType: number; | ||
coinType: CoinType; | ||
scheme: string; | ||
@@ -77,3 +78,3 @@ color: string; | ||
networkId?: number; | ||
baseChain?: string; | ||
baseChain?: "mainnet" | "goerli" | "ropsten"; | ||
hardfork?: string; | ||
@@ -98,3 +99,3 @@ rpc?: string; | ||
export declare type CryptoOrTokenCurrency = CryptoCurrency | TokenCurrency; | ||
export {}; | ||
export { CoinType }; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.CoinType = void 0; | ||
var slip44_1 = require("./slip44"); | ||
exports.CoinType = slip44_1.CoinType; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ledgerhq/types-cryptoassets", | ||
"version": "7.0.0", | ||
"version": "7.1.0-next.0", | ||
"description": "Ledger types for crypto assets and tokens", | ||
@@ -23,2 +23,13 @@ "keywords": [ | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.0", | ||
"@types/node": "^18.15.3", | ||
"documentation": "13.2.4", | ||
"jest": "^28.1.1", | ||
"rimraf": "^4.1.2", | ||
"source-map-support": "^0.5.21", | ||
"ts-jest": "^28.0.5", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4" | ||
}, | ||
"scripts": { | ||
@@ -25,0 +36,0 @@ "clean": "rimraf lib lib-es", |
141
src/index.ts
@@ -0,1 +1,130 @@ | ||
import { CoinType } from "./slip44"; | ||
// All cryptocurrency ids | ||
// list should be append only. **do not modify existing ids** | ||
export type CryptoCurrencyId = | ||
| "aeternity" | ||
| "aion" | ||
| "akroma" | ||
| "algorand" | ||
| "ark" | ||
| "atheios" | ||
| "avalanche_c_chain" | ||
| "banano" | ||
| "bitcoin" | ||
| "bitcoin_cash" | ||
| "bitcoin_gold" | ||
| "bitcoin_private" | ||
| "bsc" | ||
| "callisto" | ||
| "cardano" | ||
| "cardano_testnet" | ||
| "celo" | ||
| "clubcoin" | ||
| "cosmos" | ||
| "cosmos_testnet" | ||
| "dash" | ||
| "decred" | ||
| "dexon" | ||
| "ellaism" | ||
| "dogecoin" | ||
| "digibyte" | ||
| "energywebchain" | ||
| "eos" | ||
| "elastos" | ||
| "elrond" | ||
| "ethereum" | ||
| "ethereum_classic" | ||
| "ether1" | ||
| "ethergem" | ||
| "ethersocial" | ||
| "expanse" | ||
| "factom" | ||
| "fic" | ||
| "flow" | ||
| "game_credits" | ||
| "gochain" | ||
| "groestlcoin" | ||
| "hcash" | ||
| "hedera" | ||
| "helium" | ||
| "hpb" | ||
| "hycon" | ||
| "icon" | ||
| "icp" | ||
| "iota" | ||
| "juno" | ||
| "iov" | ||
| "kin" | ||
| "komodo" | ||
| "kusama" | ||
| "lbry" | ||
| "litecoin" | ||
| "lisk" | ||
| "mix" | ||
| "monero" | ||
| "moonriver" | ||
| "musicoin" | ||
| "nano" | ||
| "nem" | ||
| "neo" | ||
| "nervos" | ||
| "nimiq" | ||
| "nix" | ||
| "nos" | ||
| "ontology" | ||
| "particl" | ||
| "peercoin" | ||
| "pirl" | ||
| "pivx" | ||
| "poa" | ||
| "polkadot" | ||
| "polygon" | ||
| "poswallet" | ||
| "qrl" | ||
| "qtum" | ||
| "ravencoin" | ||
| "ripple" | ||
| "rise" | ||
| "reosc" | ||
| "resistance" | ||
| "solana" | ||
| "stakenet" | ||
| "stratis" | ||
| "stealthcoin" | ||
| "stellar" | ||
| "osmosis" | ||
| "shyft" | ||
| "tezos" | ||
| "thundercore" | ||
| "tomo" | ||
| "tron" | ||
| "ubiq" | ||
| "vechain" | ||
| "vertcoin" | ||
| "viacoin" | ||
| "wanchain" | ||
| "waves" | ||
| "zcash" | ||
| "zclassic" | ||
| "zcoin" | ||
| "zencash" | ||
| "zilliqa" | ||
| "crypto_org" | ||
| "bitcoin_testnet" | ||
| "ethereum_ropsten" | ||
| "ethereum_goerli" | ||
| "stacks" | ||
| "crypto_org_croeseid" | ||
| "solana_testnet" | ||
| "solana_devnet" | ||
| "filecoin" | ||
| "arbitrum" | ||
| "cronos" | ||
| "fantom" | ||
| "flare" | ||
| "songbird" | ||
| "moonbeam" | ||
| "near"; | ||
/** | ||
@@ -51,4 +180,2 @@ * | ||
tokenType: string; | ||
// indicates this is a compound token and it's "parent" erc20 have this id | ||
compoundFor?: string; | ||
}; | ||
@@ -78,3 +205,5 @@ | ||
// unique internal id of a crypto currency | ||
id: string; | ||
// LBRY | groestcoin | osmo are expectional ids | ||
// because in `cryptocurrenciesById` the key of the object is different from the id | ||
id: CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo"; | ||
// define if a crypto is a fork from another coin. helps dealing with split/unsplit | ||
@@ -85,3 +214,3 @@ forkedFrom?: string; | ||
// coin type according to slip44. THIS IS NOT GUARANTEED UNIQUE across currencies (e.g testnets,..) | ||
coinType: number; | ||
coinType: CoinType; | ||
// the scheme name to use when formatting an URI (without the ':') | ||
@@ -109,3 +238,3 @@ scheme: string; | ||
networkId?: number; | ||
baseChain?: string; | ||
baseChain?: "mainnet" | "goerli" | "ropsten"; | ||
hardfork?: string; | ||
@@ -135,1 +264,3 @@ // used by evm light integration | ||
export type CryptoOrTokenCurrency = CryptoCurrency | TokenCurrency; | ||
export { CoinType }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53800
24
993
9
1
1