@cubist-labs/cubesigner-sdk 0.4.183-0 → 0.4.186-0
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 +5 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ examples below.
|
|
|
56
56
|
|
|
57
57
|
```typescript
|
|
58
58
|
import * as cs from "@cubist-labs/cubesigner-sdk";
|
|
59
|
-
import { JsonFileSessionManager,
|
|
59
|
+
import { JsonFileSessionManager, defaultUserSessionManager } from "@cubist-labs/cubesigner-sdk-fs-storage";
|
|
60
60
|
import assert from "assert";
|
|
61
61
|
```
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ default location on disk (which is where the `cs login` command saves
|
|
|
68
68
|
it):
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
|
-
const cubesigner = await cs.CubeSignerClient.create(
|
|
71
|
+
const cubesigner = await cs.CubeSignerClient.create(defaultUserSessionManager());
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Alternatively, a `CubeSignerClient` instance can be created by explicitly
|
|
@@ -303,7 +303,7 @@ Trying to sign an invalid message with a secp key will fail with
|
|
|
303
303
|
|
|
304
304
|
In the above examples we've used 3 different sessions:
|
|
305
305
|
|
|
306
|
-
1. A
|
|
306
|
+
1. A user session with management-only scopes that we created using the CLI
|
|
307
307
|
2. A signing session that we created using (1)
|
|
308
308
|
3. A role session that we created used (1)
|
|
309
309
|
|
|
@@ -312,10 +312,10 @@ we'll dive into the specifics of sessions in the TypeScript SDK.
|
|
|
312
312
|
|
|
313
313
|
### Loading from disk
|
|
314
314
|
If you already have an active session in `cs` (the CubeSigner CLI), you can
|
|
315
|
-
load
|
|
315
|
+
load this user session with the TypeScript SDK as follows (as we did earlier):
|
|
316
316
|
|
|
317
317
|
```typescript
|
|
318
|
-
await cs.CubeSignerClient.create(
|
|
318
|
+
await cs.CubeSignerClient.create(defaultUserSessionManager())
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
Or we can use the CLI to create our own session explicitly for our JavaScript client:
|
package/dist/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git+https://github.com/cubist-labs/CubeSigner-TypeScript-SDK.git",
|
|
6
6
|
"directory": "packages/sdk"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.4.
|
|
8
|
+
"version": "0.4.186-0",
|
|
9
9
|
"description": "CubeSigner TypeScript SDK",
|
|
10
10
|
"license": "MIT OR Apache-2.0",
|
|
11
11
|
"author": "Cubist, Inc.",
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git+https://github.com/cubist-labs/CubeSigner-TypeScript-SDK.git",
|
|
6
6
|
"directory": "packages/sdk"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.4.
|
|
8
|
+
"version": "0.4.186-0",
|
|
9
9
|
"description": "CubeSigner TypeScript SDK",
|
|
10
10
|
"license": "MIT OR Apache-2.0",
|
|
11
11
|
"author": "Cubist, Inc.",
|