@dimcool/sdk 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -23106,10 +23106,12 @@ var Wallet = class {
23106
23106
  */
23107
23107
  async getBalances() {
23108
23108
  try {
23109
- const response = await this.http.get(
23110
- "/wallets/me/balance"
23111
- );
23112
- return response;
23109
+ const raw = await this.http.get("/wallets/me/balance");
23110
+ const usdcDollars = raw.usdc / 1e6;
23111
+ return {
23112
+ ...raw,
23113
+ usdcFormatted: `$${usdcDollars.toFixed(2)}`
23114
+ };
23113
23115
  } catch (error) {
23114
23116
  this.logger.error("Failed to get balances", {
23115
23117
  error: error instanceof Error ? error.message : String(error)
package/dist/index.d.cts CHANGED
@@ -707,6 +707,8 @@ interface WalletSigner {
707
707
  interface BalanceResponse {
708
708
  sol: number;
709
709
  usdc: MoneyMinor;
710
+ /** Always present: USDC as display string (e.g. "$0.00" or "$1.50"). 1 USDC = 1,000,000 minor units. */
711
+ usdcFormatted: string;
710
712
  publicKey: string;
711
713
  }
712
714
  type WalletActivityKind = 'DEPOSIT' | 'REFUND' | 'PAYOUT' | 'TRANSFER';
package/dist/index.d.ts CHANGED
@@ -707,6 +707,8 @@ interface WalletSigner {
707
707
  interface BalanceResponse {
708
708
  sol: number;
709
709
  usdc: MoneyMinor;
710
+ /** Always present: USDC as display string (e.g. "$0.00" or "$1.50"). 1 USDC = 1,000,000 minor units. */
711
+ usdcFormatted: string;
710
712
  publicKey: string;
711
713
  }
712
714
  type WalletActivityKind = 'DEPOSIT' | 'REFUND' | 'PAYOUT' | 'TRANSFER';
package/dist/index.js CHANGED
@@ -23065,10 +23065,12 @@ var Wallet = class {
23065
23065
  */
23066
23066
  async getBalances() {
23067
23067
  try {
23068
- const response = await this.http.get(
23069
- "/wallets/me/balance"
23070
- );
23071
- return response;
23068
+ const raw = await this.http.get("/wallets/me/balance");
23069
+ const usdcDollars = raw.usdc / 1e6;
23070
+ return {
23071
+ ...raw,
23072
+ usdcFormatted: `$${usdcDollars.toFixed(2)}`
23073
+ };
23072
23074
  } catch (error) {
23073
23075
  this.logger.error("Failed to get balances", {
23074
23076
  error: error instanceof Error ? error.message : String(error)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimcool/sdk",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",