@mysten/seal 1.1.2 → 1.1.3

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,5 +1,14 @@
1
1
  # @mysten/seal
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f7de3e5: Restore docs in published tarballs.
8
+ - Updated dependencies [f7de3e5]
9
+ - @mysten/bcs@2.0.5
10
+ - @mysten/sui@2.16.2
11
+
3
12
  ## 1.1.2
4
13
 
5
14
  ### Patch Changes
package/dist/version.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- const PACKAGE_VERSION = "1.1.2";
2
+ const PACKAGE_VERSION = "1.1.3";
3
3
 
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION };
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '1.1.2';\n"],"mappings":";AAKA,MAAa,kBAAkB"}
1
+ {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '1.1.3';\n"],"mappings":";AAKA,MAAa,kBAAkB"}
package/docs/index.md ADDED
@@ -0,0 +1,85 @@
1
+ # Seal SDK
2
+
3
+ > Decentralized secrets management with threshold encryption on Sui.
4
+
5
+ > **Note:** This is a beta version of Seal. See https://github.com/MystenLabs/seal for more details.
6
+
7
+ The Seal SDK provides threshold encryption capabilities for Sui applications, enabling secure data
8
+ encryption with configurable key servers.
9
+
10
+ ## Installation
11
+
12
+ ```bash npm2yarn
13
+ npm install --save @mysten/seal @mysten/sui
14
+ ```
15
+
16
+ ## Setup
17
+
18
+ To use the Seal SDK, create a Sui client and extend it with the Seal extension:
19
+
20
+ ```ts
21
+
22
+ const client = new SuiGrpcClient({
23
+ network: 'testnet',
24
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
25
+ }).$extend(
26
+ seal({
27
+ serverConfigs: [
28
+ { objectId: '0x...keyserver1', weight: 1 },
29
+ { objectId: '0x...keyserver2', weight: 1 },
30
+ ],
31
+ }),
32
+ );
33
+ ```
34
+
35
+ ## Configuration options
36
+
37
+ The `seal()` function accepts the following options:
38
+
39
+ - **`serverConfigs`** (required) - Array of key server configurations with `objectId` and `weight`
40
+ - **`verifyKeyServers`** (optional) - Whether to verify key server authenticity (default: `true`)
41
+ - **`timeout`** (optional) - Timeout in milliseconds for network requests (default: `10000`)
42
+
43
+ ## Basic usage
44
+
45
+ ### Encrypting data
46
+
47
+ ```ts
48
+ const data = new Uint8Array([1, 2, 3]);
49
+
50
+ const { encryptedObject } = await client.seal.encrypt({
51
+ threshold: 2, // Number of key servers needed to decrypt
52
+ packageId: '0x...your-package-id',
53
+ id: '0x...your-object-id',
54
+ data,
55
+ });
56
+ ```
57
+
58
+ ### Decrypting data
59
+
60
+ ```ts
61
+
62
+ // Create a session key for decryption
63
+ const sessionKey = await SessionKey.create({
64
+ address: senderAddress,
65
+ packageId: '0x...your-package-id',
66
+ ttlMin: 10, // Time-to-live in minutes
67
+ signer: keypair,
68
+ suiClient: client,
69
+ });
70
+
71
+ // Build transaction bytes that call seal_approve
72
+ const txBytes = await buildApprovalTransaction(/* ... */);
73
+
74
+ // Decrypt the data
75
+ const decryptedData = await client.seal.decrypt({
76
+ data: encryptedObject,
77
+ sessionKey,
78
+ txBytes,
79
+ });
80
+ ```
81
+
82
+ ## Resources
83
+
84
+ For detailed documentation on threshold encryption and key server setup, see the
85
+ [Seal repository](https://github.com/MystenLabs/seal).
@@ -0,0 +1,4 @@
1
+ # Seal
2
+ > Use Seal, a decentralized secrets management service that secures your data using threshold encryption and on-chain access control.
3
+
4
+ - [Seal SDK](..md): Decentralized secrets management with threshold encryption on Sui.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/seal",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Seal SDK",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Mysten Labs <build@mystenlabs.com>",
@@ -37,10 +37,10 @@
37
37
  "dependencies": {
38
38
  "@noble/curves": "^2.0.1",
39
39
  "@noble/hashes": "^2.0.1",
40
- "@mysten/bcs": "^2.0.4"
40
+ "@mysten/bcs": "^2.0.5"
41
41
  },
42
42
  "peerDependencies": {
43
- "@mysten/sui": "^2.16.1"
43
+ "@mysten/sui": "^2.16.2"
44
44
  },
45
45
  "scripts": {
46
46
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",