@bitgen/sdk 1.0.7 → 1.0.8

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,8 @@
1
+ ## [1.0.8] - 2026-10-09
2
+
3
+ ### Changed
4
+ - Documentation: the `scope` placeholder in the examples is now `YOUR_ORGANIZATION_SCOPE` (was `YOUR_SCOPE_UUID`) — the uuid of the organization that owns the key
5
+
1
6
  ## [1.0.7] - 2026-10-07
2
7
 
3
8
  ### Added
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @bitgen/sdk — v1.0.7
1
+ # @bitgen/sdk — v1.0.8
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).
@@ -7,9 +7,9 @@ Install it with `npm install @bitgen/sdk` (Node.js 20 or later).
7
7
  import { BitgenClient, Env } from '@bitgen/sdk'
8
8
 
9
9
  const client = new BitgenClient({
10
- scope: 'YOUR_SCOPE_UUID', // uuid of the organization that owns the key
10
+ scope: 'YOUR_ORGANIZATION_SCOPE', // uuid of the organization that owns the key
11
11
  apiKey: 'YOUR_API_KEY',
12
- env: Env.SANDBOX, // Env.PRODUCTION by default
12
+ env: Env.SANDBOX, // Env.PRODUCTION by default
13
13
  })
14
14
 
15
15
  const account = await client.bank.get('CUSTOMER_UUID')
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.7";
1
+ export declare const VERSION = "1.0.8";
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.7";
5
+ exports.VERSION = "1.0.8";
6
6
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.7";
1
+ export declare const VERSION = "1.0.8";
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.7";
2
+ export const VERSION = "1.0.8";
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.7",
3
+ "version": "1.0.8",
4
4
  "license": "UNLICENSED",
5
5
  "author": "BITGEN",
6
6
  "description": "Official Node.js SDK for the BITGEN API v4.0.x",
@@ -6,7 +6,7 @@ A `BitgenClient` is built once per API key and reused: it holds the credentials,
6
6
  import { BitgenClient, Env } from '@bitgen/sdk'
7
7
 
8
8
  const client = new BitgenClient({
9
- scope: 'YOUR_SCOPE_UUID',
9
+ scope: 'YOUR_ORGANIZATION_SCOPE',
10
10
  apiKey: 'YOUR_API_KEY',
11
11
  env: Env.PRODUCTION, // default
12
12
  timeout: 30, // seconds, default 30
@@ -39,7 +39,7 @@ To reach the API through another hostname — a container, a tunnel — give `ho
39
39
 
40
40
  ```ts
41
41
  const client = new BitgenClient({
42
- scope: 'YOUR_SCOPE_UUID',
42
+ scope: 'YOUR_ORGANIZATION_SCOPE',
43
43
  apiKey: 'YOUR_API_KEY',
44
44
  host: 'my-hostname', // bare hostname: no scheme, port or path
45
45
  port: 8080, // default 80
@@ -8,9 +8,9 @@ Create the client once, then run a first journey: create a customer, read their
8
8
  import { BitgenClient, Env } from '@bitgen/sdk'
9
9
 
10
10
  const client = new BitgenClient({
11
- scope: 'YOUR_SCOPE_UUID', // uuid of the organization that owns the key
11
+ scope: 'YOUR_ORGANIZATION_SCOPE', // uuid of the organization that owns the key
12
12
  apiKey: 'YOUR_API_KEY',
13
- env: Env.SANDBOX, // Env.PRODUCTION by default
13
+ env: Env.SANDBOX, // Env.PRODUCTION by default
14
14
  })
15
15
  ```
16
16
 
@@ -28,7 +28,7 @@ for (const wallet of wallets) {
28
28
  console.log(wallet.asset.iso, wallet.balance, wallet.address) // 'ETH' '0.5' '0xabc…'
29
29
  }
30
30
 
31
- const treasury = await client.custody.wallets('YOUR_SCOPE_UUID') // the treasury wallets of your organization
31
+ const treasury = await client.custody.wallets('YOUR_ORGANIZATION_SCOPE') // the treasury wallets of your organization
32
32
  ```
33
33
 
34
34
  Returns the wallets without their `history`:
@@ -242,7 +242,7 @@ Answer with a 2xx status: a delivery that does not get one is retried 4 times (a
242
242
  import { createServer } from 'node:http'
243
243
  import { BitgenClient, BitgenError, WebhookEventName } from '@bitgen/sdk'
244
244
 
245
- const client = new BitgenClient({ scope: 'YOUR_SCOPE_UUID', apiKey: 'YOUR_API_KEY' })
245
+ const client = new BitgenClient({ scope: 'YOUR_ORGANIZATION_SCOPE', apiKey: 'YOUR_API_KEY' })
246
246
  const { secret } = await client.webhooks.list()
247
247
 
248
248
  createServer((req, res) => {
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.7"
2
+ export const VERSION = "1.0.8"