@dimcool/sdk 0.1.10 → 0.1.11
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 +6 -4
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23106,10 +23106,12 @@ var Wallet = class {
|
|
|
23106
23106
|
*/
|
|
23107
23107
|
async getBalances() {
|
|
23108
23108
|
try {
|
|
23109
|
-
const
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
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
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
|
|
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)
|