@bitgen/sdk 1.0.4 → 1.0.5
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/README.md +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/readme/concepts.md +1 -1
- package/readme/configuration.md +1 -1
- package/readme/resource/apikeys.md +1 -1
- package/readme/resource/bank.md +3 -3
- package/src/version.ts +1 -1
package/README.md
CHANGED
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.
|
|
1
|
+
export declare const VERSION = "1.0.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.
|
|
1
|
+
export declare const VERSION = "1.0.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/esm/version.js
CHANGED
package/package.json
CHANGED
package/readme/concepts.md
CHANGED
|
@@ -121,7 +121,7 @@ The EUR of a customer are held by the bank provider of your organization, on the
|
|
|
121
121
|
|
|
122
122
|

|
|
123
123
|
|
|
124
|
-
A deposit: the customer wires EUR to the organization's account with the reference `BTGN` followed by the code of their account (`message`) → the provider reports the wire to BITGEN — with a manual bank, you declare it ([credit](resource/bank.md#credit)) → BITGEN matches the reference and the amount enters `pending.in` → compliance analysis: a `BANK` `IN` transaction, `bank.transaction` (`PENDING` if an alert holds it — [Transactions](resource/transaction.md)) → `balance` credited, operation `DEPOSIT`, `bank.credited`. The credit is never immediate; without a valid reference the wire is never credited, and the compliance of your organization is notified.
|
|
124
|
+
A deposit: the customer wires EUR to the organization's account with the reference `BTGN` followed by the code of their account (`message`) → the provider reports the wire to BITGEN — with a manual bank, you declare it ([credit](resource/bank.md#credit)) — on the sandbox test bank, that declaration is taken and reported back within seconds → BITGEN matches the reference and the amount enters `pending.in` → compliance analysis: a `BANK` `IN` transaction, `bank.transaction` (`PENDING` if an alert holds it — [Transactions](resource/transaction.md)) → `balance` credited, operation `DEPOSIT`, `bank.credited`. The credit is never immediate; without a valid reference the wire is never credited, and the compliance of your organization is notified.
|
|
125
125
|
|
|
126
126
|

|
|
127
127
|
|
package/readme/configuration.md
CHANGED
|
@@ -18,7 +18,7 @@ const client = new BitgenClient({
|
|
|
18
18
|
| Option | Description |
|
|
19
19
|
|---|---|
|
|
20
20
|
| `scope` | uuid of the organization that owns the key. Sent as the `BITGEN-Scope` header. It is also the organization the SDK uses wherever the API expects yours (webhooks, API keys, the organization of a new customer). |
|
|
21
|
-
| `apiKey` | The raw key, shown once when it is created. Sent as the `Api-key` header. |
|
|
21
|
+
| `apiKey` | The raw key, shown once when it is created by an administrator of the organization, in the BITGEN interface — never through the API. Sent as the `Api-key` header. |
|
|
22
22
|
|
|
23
23
|
A missing key, an unknown, revoked or expired key, or a `scope` that is not the key's organization, is refused with a `401` ([Common errors](errors.md#common-errors)).
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# API keys
|
|
2
2
|
|
|
3
|
-
An API key belongs to your organization: it is valid until it expires or is revoked, and every call made with it is journaled. `client.apikeys` reads the keys of your organization and the journal of their calls — it is read-only: a key
|
|
3
|
+
An API key belongs to your organization: it is valid until it expires or is revoked, and every call made with it is journaled. `client.apikeys` reads the keys of your organization and the journal of their calls — it is read-only: a key is created, configured and revoked by an administrator of the organization, in the BITGEN interface — never through the API, and the SDK does not revoke.
|
|
4
4
|
|
|
5
5
|
Examples use `client`, a configured `BitgenClient` ([Configuration](../configuration.md)). Wherever the API expects your organization, the SDK sends the `scope` of the client.
|
|
6
6
|
|
package/readme/resource/bank.md
CHANGED
|
@@ -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)). With an automated provider, 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 `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`).
|
|
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. 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 `202` (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
|

|
|
130
130
|
|
|
@@ -143,7 +143,7 @@ In addition to the [common errors](../errors.md#common-errors):
|
|
|
143
143
|
| `412` | `owner_identity_not_validated` | Your organization uses BITGEN's identity verification and the customer's identity is not validated: the account cannot be created |
|
|
144
144
|
| `412` | `bank_rib_required` | `withdraw` without an IBAN or a bank on the account |
|
|
145
145
|
| `412` | `ramp_not_enabled` | The `CoreType.RAMP` (bank) connector of your organization is not enabled |
|
|
146
|
-
| `412` | `deposit_reported_by_provider` | `credit` on an automated bank provider: deposits are reported by the provider itself |
|
|
146
|
+
| `412` | `deposit_reported_by_provider` | `credit` on an automated bank provider that refuses declarations: deposits are reported by the provider itself |
|
|
147
147
|
| `412` | `trading_not_enabled` | The `CoreType.TRADING` connector of your organization is not enabled |
|
|
148
148
|
| `416` | `requested_amount_error` | Insufficient balance |
|
|
149
149
|
| `416` | `amount_below_fee` | The amount does not cover the fee |
|
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.
|
|
2
|
+
export const VERSION = "1.0.5"
|