@bitgen/sdk 1.0.5 → 1.0.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [1.0.6] - 2026-09-23
2
+
3
+ ### Changed
4
+ - Documentation only, no code change. `readme/resource/bank.md`: `credit` on a provider that reports the deposit itself answers `201` with an empty body and no `uuid` (it answered `202` before) — `uuid` is `undefined`, the movement appears in `pending.in` a second later
5
+ - `readme/resource/trading.md`: new `429 daily_buy_limit_exceeded` on `buy` — **sandbox only**, purchases are capped per customer and per calendar day because the sandbox buys with test tokens. No such cap exists in production
6
+
1
7
  ## [1.0.4] - 2026-09-18
2
8
 
3
9
  ### Changed
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @bitgen/sdk — v1.0.5
1
+ # @bitgen/sdk — v1.0.6
2
2
 
3
3
  Official Node.js SDK for the BITGEN API v4 — server-side, TypeScript, ESM and CommonJS, no runtime dependency.
4
4
  Install it with `npm install @bitgen/sdk` (Node.js 20 or later).
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.5";
1
+ export declare const VERSION = "1.0.6";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Generated by scripts/prebuild.js from package.json — do not edit
5
- exports.VERSION = "1.0.5";
5
+ exports.VERSION = "1.0.6";
6
6
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.5";
1
+ export declare const VERSION = "1.0.6";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/prebuild.js from package.json — do not edit
2
- export const VERSION = "1.0.5";
2
+ export const VERSION = "1.0.6";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgen/sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "UNLICENSED",
5
5
  "author": "BITGEN",
6
6
  "description": "Official Node.js SDK for the BITGEN API v4.0.x",
@@ -106,7 +106,7 @@ The withdrawal goes to the customer's IBAN: the amount is reserved in `pending.o
106
106
  client.bank.credit(params: BankCreditParams): Promise<Created>
107
107
  ```
108
108
 
109
- `credit` only applies when your organization's bank provider is **manual** — deposits are not reported to BITGEN automatically: you tell BITGEN a wire has arrived on the organization's account. The amount enters `pending.in`, goes through BITGEN's processing and the compliance analysis, and the account is credited then — `bank.credited` at that moment ([Following a deposit and a withdrawal](../concepts.md#following-a-deposit-and-a-withdrawal)). On a provider that **takes the declaration and reports the deposit itself** — the test bank of the sandbox environment — the call answers `202` with an empty body: the incoming movement appears in `pending.in` a few seconds later, once the provider has reported it, and the `bank.transaction` / `bank.credited` events follow as for any deposit. With an automated provider that refuses declarations, deposits are detected and credited automatically and you are notified by the `bank.credited` webhook ([Webhooks](webhooks.md)) — do not call `credit`: the API refuses it (`412 deposit_reported_by_provider`). The account is designated either by the customer (`user`) or by the wire transfer reference of the account (`message`).
109
+ `credit` only applies when your organization's bank provider is **manual** — deposits are not reported to BITGEN automatically: you tell BITGEN a wire has arrived on the organization's account. The amount enters `pending.in`, goes through BITGEN's processing and the compliance analysis, and the account is credited then — `bank.credited` at that moment ([Following a deposit and a withdrawal](../concepts.md#following-a-deposit-and-a-withdrawal)). On a provider that **takes the declaration and reports the deposit itself** — the test bank of the sandbox environment — the call answers `201` with an empty body, no `uuid`: the incoming movement appears in `pending.in` a second later, once the provider has reported it, and the `bank.transaction` / `bank.credited` events follow as for any deposit. With an automated provider that refuses declarations, deposits are detected and credited automatically and you are notified by the `bank.credited` webhook ([Webhooks](webhooks.md)) — do not call `credit`: the API refuses it (`412 deposit_reported_by_provider`). The account is designated either by the customer (`user`) or by the wire transfer reference of the account (`message`).
110
110
 
111
111
  | Parameter | Type | Description |
112
112
  |---|---|---|
@@ -124,7 +124,7 @@ const { uuid } = await client.bank.credit({
124
124
  })
125
125
  ```
126
126
 
127
- Returns a `Created` — the `uuid` of the declared deposit: the incoming movement, not credited yet. On a `202` (provider that reports the deposit itself, see above) `uuid` is `undefined`. Without `user` nor `message`, the API answers `400 bank_target_required`.
127
+ Returns a `Created` — the `uuid` of the declared deposit: the incoming movement, not credited yet. On a provider that reports the deposit itself (see above) `uuid` is `undefined`. Without `user` nor `message`, the API answers `400 bank_target_required`.
128
128
 
129
129
  ![An EUR deposit: the wire to the organization account at the bank provider, its report, the matching by reference, the compliance analysis, the credit of the ledger](../media/deposit-flow.svg)
130
130
 
@@ -40,7 +40,7 @@ const order = await client.trading.get(tunnel)
40
40
  console.log(order.state === OrderState.DONE, order.received, order.executedPrice) // true 0.0123 2031.5
41
41
  ```
42
42
 
43
- The API reserves `amount` on the customer's EUR account (`423 insufficient_funds` if the balance is insufficient, `404 unknown_bank` without an EUR account) and creates the order. `tunnel` is its uuid, `state` its initial state.
43
+ The API reserves `amount` on the customer's EUR account (`423 insufficient_funds` if the balance is insufficient, `404 unknown_bank` without an EUR account) and creates the order. `tunnel` is its uuid, `state` its initial state. On the **sandbox** environment only, purchases are capped per customer and per calendar day — the sandbox buys with test tokens, whose supply is limited: beyond the cap the call answers `429 daily_buy_limit_exceeded`. No such cap exists in production.
44
44
 
45
45
  ![A purchase: REGISTERED, EXECUTING, FILLED, DELIVERING, DONE — FAILED and PARKED](../media/order-buy.svg)
46
46
 
@@ -160,6 +160,7 @@ In addition to the [common errors](../errors.md#common-errors), and the custody
160
160
  | `423` | `insufficient_funds` | `buy`: insufficient EUR balance |
161
161
  | `423` | `blocked_by_alert` | An active compliance alert blocks the customer |
162
162
  | `423` | `bank_lock_unavailable` | The EUR account is locked by a concurrent operation |
163
+ | `429` | `daily_buy_limit_exceeded` | **Sandbox only** — the daily purchase cap for this customer is reached. Never returned in production |
163
164
 
164
165
  ## Related
165
166
 
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by scripts/prebuild.js from package.json — do not edit
2
- export const VERSION = "1.0.5"
2
+ export const VERSION = "1.0.6"