@neutral-trade/sdk - v1.0.0
    Preparing search index...

    Function computeUserBundleBalance

    • Calculates the raw balance fields returned by the legacy SDK's calculateBundleUserBalance. The legacy helper used floating-point PPS and Math.round; this helper uses the exact integer floor from calculate_assets_from_shares at bundle.rs:259-270.

      Parameters

      • args: {
            bundle: Bundle;
            bundleAccount: Address;
            nowUnixSeconds: number | bigint;
            oracleData: OracleData;
            user: Address;
            userBundle: UserBundleAccount;
        }

      Returns UserBundleBalance