@moonwell-fi/moonwell-sdk
Version:
TypeScript Interface for Moonwell
38 lines • 1.32 kB
TypeScript
/**
* Helper functions for working with Lunar Indexer marketId and tokenId formats
*/
/**
* Build a marketId string from chainId and market address
* Format: {chainId}-{marketAddress}
* @param chainId - The chain ID
* @param marketAddress - The market contract address
* @returns Formatted marketId string
*/
export declare function buildMarketId(chainId: number, marketAddress: string): string;
/**
* Parse a marketId string into chainId and marketAddress
* @param marketId - The marketId string to parse
* @returns Object containing chainId and marketAddress
*/
export declare function parseMarketId(marketId: string): {
chainId: number;
marketAddress: string;
};
/**
* Build a tokenId string from chainId and token address
* Format: {chainId}-{tokenAddress}
* @param chainId - The chain ID
* @param tokenAddress - The token contract address
* @returns Formatted tokenId string
*/
export declare function buildTokenId(chainId: number, tokenAddress: string): string;
/**
* Parse a tokenId string into chainId and tokenAddress
* @param tokenId - The tokenId string to parse
* @returns Object containing chainId and tokenAddress
*/
export declare function parseTokenId(tokenId: string): {
chainId: number;
tokenAddress: string;
};
//# sourceMappingURL=lunar-indexer-helpers.d.ts.map