@coinmasters/toolbox-evm
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -101,3 +101,18 @@ import type { Asset } from '@coinmasters/types'; | ||
}>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -144,3 +159,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -276,3 +306,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -404,3 +449,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}) => { | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -479,3 +539,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
potentialScamFilter?: boolean | undefined; | ||
}) => Promise<AssetValue[]>; | ||
}) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
@@ -514,3 +589,18 @@ export declare const getChecksumAddressFromAsset: (asset: Asset, chain: EVMChain) => string; | ||
}; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -577,3 +667,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}) => { | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -676,3 +781,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -728,3 +848,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -753,3 +888,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}) => Promise<{ | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean | undefined) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -841,3 +991,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -956,3 +1121,18 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; | ||
}>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<AssetValue[]>; | ||
getBalance: (address: any, potentialScamFilter?: boolean) => Promise<{ | ||
address: any; | ||
chain: Chain; | ||
isGasAsset: boolean; | ||
isSynthetic: boolean; | ||
symbol: string; | ||
tax?: { | ||
buy: number; | ||
sell: number; | ||
} | undefined; | ||
ticker: string; | ||
type: Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM" | undefined; | ||
decimalMultiplier: bigint; | ||
bigIntValue: bigint; | ||
decimal?: number | undefined; | ||
}[]>; | ||
approve: (params: ApproveParams) => Promise<string>; | ||
@@ -959,0 +1139,0 @@ approvedAmount: (params: ApprovedParams) => Promise<bigint>; |
@@ -1,2 +0,2 @@ | ||
import { aY as o, aZ as t, a_ as b, aS as l, aT as r, a$ as d, bi as i, b1 as A, aW as c, b2 as T, bb as h, b7 as n, b3 as x, ba as g, b4 as k, bg as w, aU as p, bc as M, bh as W, aV as m, b0 as C, b9 as E, bd as S, be as V, b5 as u, b8 as B, aX as N, bf as P, b6 as f } from "./index-ba228008.js"; | ||
import { aY as o, aZ as t, a_ as b, aS as l, aT as r, a$ as d, bi as i, b1 as A, aW as c, b2 as T, bb as h, b7 as n, b3 as x, ba as g, b4 as k, bg as w, aU as p, bc as M, bh as W, aV as m, b0 as C, b9 as E, bd as S, be as V, b5 as u, b8 as B, aX as N, bf as P, b6 as f } from "./index-ff937b1e.js"; | ||
import "@coinmasters/helpers"; | ||
@@ -3,0 +3,0 @@ export { |
@@ -49,3 +49,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"scripts": { | ||
@@ -52,0 +52,0 @@ "build": "vite build", |
@@ -298,10 +298,12 @@ import { AssetValue, filterAssets, formatBigIntToSafeValue, SwapKitNumber } from '@coinmasters/helpers'; | ||
return filteredBalances.map( | ||
({ symbol, value, decimal }) => | ||
new AssetValue({ | ||
decimal: decimal || BaseDecimal[chain], | ||
value, | ||
identifier: `${chain}.${symbol}`, | ||
}), | ||
); | ||
return filteredBalances.map(({ symbol, value, decimal }) => { | ||
const assetValue = new AssetValue({ | ||
decimal: decimal || BaseDecimal[chain], | ||
value, | ||
identifier: `${chain}.${symbol}` | ||
}); | ||
// Extend the assetValue object with the address property | ||
return { ...assetValue, address: address[0].address }; // Assuming address is available in the scope | ||
}); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances 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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
850796
18116