npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aries-tssdk

v0.0.1

Published

[![Discord][discord-image]][discord-url] [![Twitter][twitter-image]][twitter-url]

Downloads

5

Readme

Aries Markets TypeScript SDK

Discord Twitter

Official Platform Docs

Quickstart

To start using aries sdk, run below command in your project directory:

yarn add @aries-markets/tssdk

SDK usage

See Sample code

SDK struct

/**
 * Model ReserveDetails
 */
type ReserveDetails = {
  initial_exchange_rate: number;
  reserve_amount: number;
  total_borrowed: number;
  total_borrowed_share: number;
  total_cash_available: number;
  total_lp_supply: number;
  reserve_config: ReserveConfig;
  interest_rate_config: InterestRateConfig;
};
/**
 * Model ReserveConfig
 */
type ReserveConfig = {
  loan_to_value: number;
  liquidation_threshold: number;
  liquidation_bonus_bips: number;
  liquidation_fee_hundredth_bips: number;
  borrow_factor: number;
  reserve_ratio: number;
  borrow_fee_hundredth_bips: number;
  withdraw_fee_hundredth_bips: number;
  deposit_limit: number;
  borrow_limit: number;
  allow_collateral: boolean;
  allow_redeem: boolean;
  flash_loan_fee_hundredth_bips: number;
};
/**
 * Model InterestRateConfig
 */
type InterestRateConfig = {
  min_borrow_rate: number;
  optimal_borrow_rate: number;
  max_borrow_rate: number;
  optimal_utilization: number;
};
/**
 * Model Profile
 */
type Profile = {
  id: string;
  meta: ResourceSnapshotId;
  profile_address: string;
  borrowed_reserves: ProfilesBorrows[];
  deposited_reserves: ProfilesDeposits[];
};

Move struct

Reserve

struct ReserveDetails has store, copy, drop {
  /// Total number of LP tokens minted.
  total_lp_supply: u128,

  /// Total cash available. This should always be the same as `value(underlying_coin)`.
  total_cash_available: u128,

  /// The initial exchange rate between LP tokens and underlying assets.
  initial_exchange_rate: Decimal,

  /// Reserve amount.
  reserve_amount: Decimal,

  /// The normalized value for total borrowed share.
  total_borrowed_share: Decimal,

  /// Total amount of outstanding debt.
  total_borrowed: Decimal,

  /// The timestamp second that the interest get accrue last time.
  interest_accrue_timestamp: u64,

  /// Reserve related configuration.
  reserve_config: ReserveConfig,

  /// Interest rate configuration.
  interest_rate_config: InterestRateConfig,
}

struct ReserveConfig has store, drop, copy {
    /// Loan to value ratio.
    loan_to_value: u8,

    /// Liquidation threshold.
    liquidation_threshold: u8,

    /// The bonus basis point that the liquidator get.
    liquidation_bonus_bips: u64,

    /// The percentage of liquidation bonus will go to the protocol as fee.
    liquidation_fee_hundredth_bips: u64,

    /// The ratio of loan asset value to risk-adjusted liability value in liquidation.
    borrow_factor: u8,

    /// The percentage of the interest that needs to be reserved
    reserve_ratio: u8,

    /// Borrow fee percentage with the unit of 1/100th of basis point (10^-6).
    borrow_fee_hundredth_bips: u64,

    /// A withdrawal fee is taken when a liquidity provider withdraws funds from the pool (redeem LP tokens).

    /// The ratio has a unit of millionth (10^-6).
    withdraw_fee_hundredth_bips: u64,

    // 0 represents no limit
    deposit_limit: u64,

    // 0 represents no limit
    borrow_limit: u64,

    // Whether to accept it as collateral to increase the bororwing power.
    allow_collateral: bool,

    /// Whether to allow the redeem from LP tokens to underlying tokens.
    /// This will be necessary in some extreme condition when we want to freeze
    /// withdrawal.
    allow_redeem: bool,

    /// Borrow fee percentage for flash loans with the unit of 1/100th of basis point (10^-6).
    /// It should be paid in addition to close the flash loan, so it is not limited to 100%
    flash_loan_fee_hundredth_bips: u64,
}

struct InterestRateConfig has store, drop, copy {
    min_borrow_rate: u64,
    optimal_borrow_rate: u64,
    max_borrow_rate: u64,
    optimal_utilization: u64
}

Profile

struct Profile has key {
    /// All reserves that the user has deposited into.
    deposited_reserves: IterableTable<TypeInfo, Deposit>,
    /// All reserves that the user has deposited into that has deposit farming
    deposit_farms: IterableTable<TypeInfo, ProfileFarm>,
    /// All reserves that the user has borrowed from.
    borrowed_reserves: IterableTable<TypeInfo, Loan>,
    /// All reserves that the user has borrowed from that has borrow farming
    borrow_farms: IterableTable<TypeInfo, ProfileFarm>,
}

struct Deposit has store, drop {
    /// The amount of LP tokens that is stored as collateral.
    collateral_amount: u64
}

struct Loan has store, drop {
    /// Normalized borrow share amount.
    borrowed_share: Decimal
}