cookietrack-types
Advanced tools
Comparing version 1.3.2 to 1.5.0
@@ -13,3 +13,3 @@ /*! | ||
export declare type TerraAddress = `terra1${string}`; | ||
export declare type TokenType = 'nativeToken' | 'token' | 'lpToken' | 'debt'; | ||
export declare type TokenType = 'nativeToken' | 'token' | 'lpToken' | 'debt' | 'xToken'; | ||
export declare type TXType = 'transfer' | 'approve' | 'revoke'; | ||
@@ -47,2 +47,7 @@ export declare type Hash = `0x${string}`; | ||
} | ||
export interface XToken extends OwnedToken { | ||
type: 'xToken'; | ||
logo: URL; | ||
underlyingToken: PricedToken; | ||
} | ||
export declare function isNativeToken(token: OwnedToken): token is NativeToken; | ||
@@ -52,2 +57,3 @@ export declare function isToken(token: OwnedToken): token is Token; | ||
export declare function isDebtToken(token: OwnedToken): token is DebtToken; | ||
export declare function isXToken(token: OwnedToken): token is XToken; | ||
export interface SimpleTX { | ||
@@ -54,0 +60,0 @@ wallet: Address; |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isTransferTX = exports.isApprovalTX = exports.isDebtToken = exports.isLPToken = exports.isToken = exports.isNativeToken = exports.ChainEndpoint = void 0; | ||
exports.isTransferTX = exports.isApprovalTX = exports.isXToken = exports.isDebtToken = exports.isLPToken = exports.isToken = exports.isNativeToken = exports.ChainEndpoint = void 0; | ||
exports.ChainEndpoint = { | ||
@@ -37,2 +37,6 @@ eth: "ethereum", | ||
exports.isDebtToken = isDebtToken; | ||
function isXToken(token) { | ||
return token.type === 'xToken'; | ||
} | ||
exports.isXToken = isXToken; | ||
function isApprovalTX(tx) { | ||
@@ -39,0 +43,0 @@ return (tx.type === 'approve' || tx.type === 'revoke'); |
{ | ||
"name": "cookietrack-types", | ||
"version": "1.3.2", | ||
"version": "1.5.0", | ||
"description": "Common Typings for CookieTrack.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,0 +0,0 @@ ![CookieTrack Logo][logo] |
@@ -17,3 +17,4 @@ /*! | ||
export type TerraAddress = `terra1${string}`; | ||
export type TokenType = 'nativeToken' | 'token' | 'lpToken' | 'debt'; | ||
export type TokenType = 'nativeToken' | 'token' | 'lpToken' | 'debt' | 'xToken'; | ||
export type TokenStatus = 'none' | 'staked' | 'liquidity' | 'lent' | 'borrowed' | 'unclaimed'; | ||
export type TXType = 'transfer' | 'approve' | 'revoke'; | ||
@@ -50,2 +51,3 @@ export type Hash = `0x${string}`; | ||
location: string | ||
status: TokenStatus | ||
owner: Address | SolAddress | ||
@@ -67,2 +69,7 @@ } | ||
} | ||
export interface XToken extends OwnedToken { | ||
type: 'xToken' | ||
logo: URL | ||
underlyingToken: PricedToken | ||
} | ||
@@ -82,2 +89,5 @@ // Token Type Guards: | ||
} | ||
export function isXToken(token: OwnedToken): token is XToken { | ||
return token.type === 'xToken'; | ||
} | ||
@@ -84,0 +94,0 @@ /* ========================================================================================================================================================================= */ |
@@ -0,0 +0,0 @@ { |
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
14665
411