Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cryptocom/ncw-asset-dashboard-api-types

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cryptocom/ncw-asset-dashboard-api-types - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

178

interfaces.d.ts
declare namespace api {
// -------------
// token price
// -------------
type TokenSlugMap = {

@@ -13,44 +10,62 @@ [key: string]: string;

// ----------------------------------------------
// Proposal new API response data start
// ----------------------------------------------
interface TokenAmount {
token: Token;
// human-readable num, for example 1.23112 but not 1231120000000000000 (18 decimals)
amount: string;
interface ProtocolDef {
shortName: string;
displayName: string;
modules: import("../../const/protocols").ProtocolModuleType[];
link: string;
logo: string;
}
interface UserBalanceBase {
// lp, farm, lend, borrow, stake (depend on PM's categories)
category: string;
// VVS Finance, MM Finance...
dApp: string;
// cronos, ethereum ....
chain: string;
// user address
userAddress: string;
// share tokens, for example: 1. VVS-FARMV2 userInfo.amount; 2. COMPOUND cTokenAmount
shareToken: TokenAmount;
// input tokens, for example: 1. VVS-FARMV2 deposit CRO-SINGLE LP...
underlyingTokens: TokenAmount[];
// reward balance. for example 1. VVS-FARMV2 pending harvest VVS, DARK...
rewardToken?: TokenAmount[];
interface Token {
id: string;
symbol: string;
decimals?: number;
name?: string;
logo?: string;
price?: string;
type?:import("../../const").BaseTokenType; // LP-Curve, LP-Balancer, LP-Univ2, LP-Compound ....
}
// XVVS,XFER USER
interface XVaultUserBalance extends UserBalanceBase {
name: string;
totalLocked: TokenAmount;
lastUnlockTime: string;
interface UserGenericBalance {
balance: string;
token: Token;
totalSupply?: string;
underlyingTokens?: UserGenericBalance[];
}
// XTonic USER
interface XStakingPoolUserBalance extends UserBalanceBase {
cooldownXToken: TokenAmount;
cooldownToken: TokenAmount;
type UserPoolBalance = UserGenericBalance & ext.PoolExt;
/// xVVS vault, xFer vault
type UserXVaultBalance = UserPoolBalance & ext.XTokenVaultExt;
/// stake Tonic and get xTonic as shares
type UserXTonicBalance = UserPoolBalance & ext.XTonicExt;
/// compound like lending
type UserLendBorrowBalance = UserGenericBalance & ext.LendBorrowExt;
/// extra properties response for specific protocols
namespace ext {
interface PoolExt {
poolType: string;
name: string;
}
interface XTokenVaultExt {
totalLocked: string;
lastUnlockTime: number;
}
interface XTonicExt {
cooldownXToken: string;
cooldownToken: string;
}
interface LendBorrowExt {
side: string;
supplyRate: string;
borrowRate: string;
}
}
// ----------------------------------------------
// Proposal new API response data end
/// deprecated begin
// ----------------------------------------------
interface UserYieldBalance {

@@ -131,3 +146,3 @@ tokenAddress: string;

tokenSymbol?: string;
underlyingTokens?: graphql.lp.ferro.Coin[];
underlyingTokens?: graphql.Token[];
pool?: graphql.lp.ferro.Pool;

@@ -138,3 +153,3 @@ }

poolType: import("../../const").PoolTypes;
name?: string;
name: string;
tokenAddress: string;

@@ -154,13 +169,5 @@ tokenSymbol: string;

}
type Token = graphql.Token;
type Pair = graphql.lp.Pair;
interface ProtocolDef {
shortName: string;
displayName: string;
modules: import("../../const/protocols").ProtocolModuleType[];
link: string;
logo: string;
}
// ----------------------------------------------
/// deprecated end
// ----------------------------------------------
}

@@ -175,7 +182,7 @@

type GraphNames = {
[key in GraphCategories]?: string;
[key in import("../../const").GraphCategories]?: string;
};
type GraphQueries = {
[key in GraphCategories]?:
[key in import("../../const").GraphCategories]?:
| UserLPBalanceCall

@@ -190,3 +197,3 @@ | UserFarmBalanceCall

type Middlewares = {
[key in GraphCategories]?: ApplyMiddlewareCallback<T, U>;
[key in import("../../const").GraphCategories]?: ApplyMiddlewareCallback<T, U>;
};

@@ -200,9 +207,7 @@

interface Token {
id: string;
symbol: string;
decimals?: number;
name?: string;
logo?: string;
price?: string;
type Token = api.Token;
interface TokenBalance extends Token {
// use Human-readable format
balance: string;
}

@@ -225,2 +230,3 @@

inputToken: {
id: string;
symbol: string;

@@ -273,2 +279,29 @@ decimals: number;

export namespace lp {
interface GenericLP {
token: Token;
totalSupply: string;
reserve: string;
underlyingTokens: GenericLP[];
}
interface BalancerLPBase {
poolId: string;
vault: string;
}
type BalancerLP = BalancerLPBase & GenericLP;
interface FerroLPBase {
minter: string;
}
type FerroLP = FerroLPBase & GenericLP;
type AnyLP = GenericLP | BalancerLP | FerroLP;
interface Balance {
id: string;
balance: string;
}
interface Pair {

@@ -329,17 +362,2 @@ id: string;

interface Balance {
id: string;
balance: string;
}
interface Coin {
id?: string;
balance?: string;
price?: string;
logo?: string;
name: string;
symbol: string;
decimals?: number;
}
interface LPPoolInfo {

@@ -349,12 +367,6 @@ pools: Pool[];

interface LPToken {
id?: string;
name: string;
decimals?: number;
}
interface Pool {
balances: Balance[];
coins: Coin[];
lpToken: LPToken;
coins: Token[];
lpToken: Token;
totalSupply: string;

@@ -379,3 +391,3 @@ }

id: string;
outputTokenBalance: bigint;
outputTokenBalance: string;
inputTokenBalances: string[];

@@ -382,0 +394,0 @@ market: Market;

{
"name": "@cryptocom/ncw-asset-dashboard-api-types",
"version": "0.1.8",
"version": "0.1.9",
"description": "Type declarations for NCW Asset Dashboard API",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -6,3 +6,3 @@ # The types for ncw-asset-dashboard-api

```
"@cryptocom/ncw-asset-dashboard-api-types": "0.1.7"
"@cryptocom/ncw-asset-dashboard-api-types": "0.1.9"
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc