@pioneer-platform/helpers 4.0.6 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ type TokenTax = {
9
9
  buy: number;
10
10
  sell: number;
11
11
  };
12
+ export declare function safeValue(value: NumberPrimitives, decimal: number): bigint;
12
13
  type AssetValueParams = {
13
14
  decimal: number;
14
15
  value: SwapKitValueType;
@@ -24,6 +25,7 @@ type TokenNames = TCTokenNames | (typeof CoinGeckoList)['tokens'][number]['ident
24
25
  export declare class AssetValue extends BigIntArithmetics {
25
26
  address?: string;
26
27
  caip?: string;
28
+ pubkey?: string;
27
29
  chain: Chain;
28
30
  isGasAsset: boolean;
29
31
  isSynthetic: boolean;
@@ -94,7 +94,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
94
94
  return to.concat(ar || Array.prototype.slice.call(from));
95
95
  };
96
96
  Object.defineProperty(exports, "__esModule", { value: true });
97
- exports.getMinAmountByChain = exports.AssetValue = void 0;
97
+ exports.getMinAmountByChain = exports.AssetValue = exports.safeValue = void 0;
98
98
  var types_1 = require("@coinmasters/types");
99
99
  var asset_1 = require("../helpers/asset");
100
100
  var validators_1 = require("../helpers/validators");
@@ -119,6 +119,7 @@ function safeValue(value, decimal) {
119
119
  return BigInt(0);
120
120
  }
121
121
  }
122
+ exports.safeValue = safeValue;
122
123
  var staticTokensMap;
123
124
  var getStaticToken = function (identifier) {
124
125
  var tag = TAG + " | getStaticToken | ";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/helpers",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -26,7 +26,7 @@ const TAG = " | assetValue | ";
26
26
 
27
27
  type TokenTax = { buy: number; sell: number };
28
28
 
29
- function safeValue(value: NumberPrimitives, decimal: number) {
29
+ export function safeValue(value: NumberPrimitives, decimal: number) {
30
30
  let tag = TAG + " | safeValue | ";
31
31
  try {
32
32
  if (typeof value === 'bigint') {
@@ -105,6 +105,7 @@ const createAssetValue = async (assetString: string, value: NumberPrimitives = 0
105
105
  export class AssetValue extends BigIntArithmetics {
106
106
  address?: string;
107
107
  caip?: string;
108
+ pubkey?: string;
108
109
  //@ts-ignore
109
110
  chain: Chain;
110
111
  isGasAsset = false;