@helium/currency
Advanced tools
Comparing version 4.6.2 to 4.7.0
@@ -1,6 +0,5 @@ | ||
import { TokenType } from '@helium/transactions'; | ||
import { BaseCurrencyType, DataCredits, IotTokens, MobileTokens, NetworkTokens, SecurityTokens, TestNetworkTokens, USDollars } from './currency_types'; | ||
export declare type AnyCurrencyType = NetworkTokens | MobileTokens | IotTokens | TestNetworkTokens | SecurityTokens | DataCredits | USDollars; | ||
export default class CurrencyType { | ||
static fromTokenType(type: TokenType): BaseCurrencyType; | ||
static fromTicker(ticker?: string): BaseCurrencyType; | ||
static get default(): NetworkTokens; | ||
@@ -7,0 +6,0 @@ static get networkToken(): NetworkTokens; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const transactions_1 = require("@helium/transactions"); | ||
const currency_types_1 = require("./currency_types"); | ||
class CurrencyType { | ||
static fromTokenType(type) { | ||
switch (type) { | ||
static fromTicker(ticker) { | ||
switch (ticker === null || ticker === void 0 ? void 0 : ticker.toUpperCase()) { | ||
default: | ||
case transactions_1.TokenType.hnt: | ||
case this.default.ticker: | ||
return this.default; | ||
case transactions_1.TokenType.hst: | ||
case this.security.ticker: | ||
return this.security; | ||
case transactions_1.TokenType.mobile: | ||
case this.mobile.ticker: | ||
return this.mobile; | ||
case transactions_1.TokenType.iot: | ||
case this.iot.ticker: | ||
return this.iot; | ||
@@ -17,0 +16,0 @@ } |
{ | ||
"name": "@helium/currency", | ||
"version": "4.6.2", | ||
"version": "4.7.0", | ||
"description": "Utilities for handling different currency types on the Helium blockchain", | ||
@@ -29,6 +29,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@helium/transactions": "^4.6.2", | ||
"bignumber.js": "^9.0.0" | ||
}, | ||
"gitHead": "6800dfa927a111bb028bb68531e67dd334d52e0f" | ||
"gitHead": "20d7cf8f2002f3962dce732bf4c1f0ef7e88b6f7" | ||
} |
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
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
1
50921
431
- Removed@helium/transactions@^4.6.2
- Removed@helium/address@4.12.0(transitive)
- Removed@helium/proto@1.6.0(transitive)
- Removed@helium/transactions@4.12.0(transitive)
- Removed@protobufjs/aspromise@1.1.2(transitive)
- Removed@protobufjs/base64@1.1.2(transitive)
- Removed@protobufjs/codegen@2.0.4(transitive)
- Removed@protobufjs/eventemitter@1.1.0(transitive)
- Removed@protobufjs/fetch@1.1.0(transitive)
- Removed@protobufjs/float@1.0.2(transitive)
- Removed@protobufjs/inquire@1.1.0(transitive)
- Removed@protobufjs/path@1.1.2(transitive)
- Removed@protobufjs/pool@1.1.0(transitive)
- Removed@protobufjs/utf8@1.1.0(transitive)
- Removed@types/libsodium-wrappers@0.7.14(transitive)
- Removed@types/long@4.0.2(transitive)
- Removed@types/node@22.9.0(transitive)
- Removedbase-x@4.0.0(transitive)
- Removedbs58@5.0.0(transitive)
- Removedinherits@2.0.3(transitive)
- Removedjs-sha256@0.9.0(transitive)
- Removedlong@4.0.0(transitive)
- Removedmultiformats@9.9.0(transitive)
- Removedpath@0.12.7(transitive)
- Removedprocess@0.11.10(transitive)
- Removedprotobufjs@6.11.4(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedutil@0.10.4(transitive)