@insignia-education/api-sdk-js 0.15.126 → 0.15.128

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insignia-education/api-sdk-js",
3
- "version": "0.15.126",
3
+ "version": "0.15.128",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -45,7 +45,28 @@ export default class Admin {
45
45
  return this.#client.get('/admin/statistics/stripe-transactions', { from_date: fromDate, to_date: toDate });
46
46
  }
47
47
 
48
- /** Our Binance Spot account's real exchange balance (every non-zero asset) — distinct from statisticsCryptoBalances()' on-chain wallet balance. Resolves `{ available: false }` if the API key isn't configured or the request fails. */
48
+ /**
49
+ * Our Binance holdings and recent money movement — distinct from
50
+ * statisticsCryptoBalances()' on-chain wallet balance. Resolves
51
+ * `{ available, spot, earn, transactions }`:
52
+ * - `spot` — non-zero Spot balances `{ asset, free, locked }`.
53
+ * - `earn` — Simple Earn positions `{ asset, amount, type }`. Read from the
54
+ * dedicated endpoints, not the `LD*` pseudo-assets in the Spot response
55
+ * (those lag and under-report), which are stripped from `spot`.
56
+ * - `transactions` — deposits, withdrawals, Binance Pay and P2P trades over
57
+ * Binance's 90-day window, newest first:
58
+ * `{ type, at, asset, amount, network, counterparty, tx_id, fiat_amount,
59
+ * fiat_currency, unit_price, pay_method, completed }` where type is
60
+ * `deposit` | `withdrawal` | `pay-in` | `pay-out` | `p2p-buy` | `p2p-sell`.
61
+ * Only P2P trades carry a fiat leg (`fiat_amount`/`fiat_currency`/
62
+ * `unit_price`/`pay_method`); they're null for every other type.
63
+ * `counterparty` is the destination wallet on a withdrawal and the other
64
+ * person on Pay/P2P, but null on a deposit — Binance records only our own
65
+ * receiving address there, so the sender is reachable only by looking
66
+ * `tx_id` up on-chain. `tx_id` is set for on-chain movements only.
67
+ *
68
+ * Resolves `{ available: false }` if the proxy isn't configured or the call fails.
69
+ */
49
70
  statisticsBinanceBalances() {
50
71
  return this.#client.get('/admin/statistics/binance-balances');
51
72
  }