@mysten/seal 1.3.0 → 1.3.2
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 +4 -0
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/docs/index.md +44 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/version.mjs
CHANGED
package/dist/version.mjs.map
CHANGED
|
@@ -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.3.
|
|
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.3.2';\n"],"mappings":";AAKA,MAAa,kBAAkB"}
|
package/docs/index.md
CHANGED
|
@@ -36,10 +36,53 @@ const client = new SuiGrpcClient({
|
|
|
36
36
|
|
|
37
37
|
The `seal()` function accepts the following options:
|
|
38
38
|
|
|
39
|
-
- **`serverConfigs`** (required) - Array of key server configurations
|
|
39
|
+
- **`serverConfigs`** (required) - Array of key server configurations (see
|
|
40
|
+
[Choosing key servers](#choosing-key-servers)). Each entry contains:
|
|
41
|
+
- **`objectId`** (required) - The key server object ID
|
|
42
|
+
- **`weight`** (required) - How many times the key server can contribute towards reaching the
|
|
43
|
+
decryption threshold
|
|
44
|
+
- **`aggregatorUrl`** (required for decentralized servers) - The aggregator endpoint URL
|
|
45
|
+
- **`apiKeyName`** and **`apiKey`** (optional) - Required if the server requires API key
|
|
46
|
+
authentication
|
|
40
47
|
- **`verifyKeyServers`** (optional) - Whether to verify key server authenticity (default: `true`)
|
|
41
48
|
- **`timeout`** (optional) - Timeout in milliseconds for network requests (default: `10000`)
|
|
42
49
|
|
|
50
|
+
## Choosing key servers
|
|
51
|
+
|
|
52
|
+
Seal supports two server types, **independent** and **decentralized** (committee mode), which you
|
|
53
|
+
can use individually or in combination. Each key server counts as one server in your threshold
|
|
54
|
+
configuration. Decentralized servers require an `aggregatorUrl`, because all fetch key calls go
|
|
55
|
+
through an aggregator:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const client = new SuiGrpcClient({
|
|
59
|
+
network: 'testnet',
|
|
60
|
+
baseUrl: 'https://fullnode.testnet.sui.io:443',
|
|
61
|
+
}).$extend(
|
|
62
|
+
seal({
|
|
63
|
+
serverConfigs: [
|
|
64
|
+
// Decentralized (committee mode) server
|
|
65
|
+
{
|
|
66
|
+
objectId: '0xb012378c9f3799fb5b1a7083da74a4069e3c3f1c93de0b27212a5799ce1e1e98',
|
|
67
|
+
aggregatorUrl: 'https://seal-aggregator-testnet.mystenlabs.com',
|
|
68
|
+
weight: 1,
|
|
69
|
+
},
|
|
70
|
+
// Independent server
|
|
71
|
+
{
|
|
72
|
+
objectId: '0x73d05d62c18d9374e3ea529e8e0ed6161da1a141a94d3f76ae3fe4e99356db75',
|
|
73
|
+
weight: 1,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If a server requires API key authentication, include `apiKeyName` and `apiKey` in its configuration
|
|
81
|
+
object. The SDK sends these as an HTTP header in the format `apiKeyName: apiKey`.
|
|
82
|
+
|
|
83
|
+
For more details on server types, verified key servers, and API key authentication, see
|
|
84
|
+
[Using Seal](https://seal-docs.wal.app/UsingSeal) in the main Seal documentation.
|
|
85
|
+
|
|
43
86
|
## Basic usage
|
|
44
87
|
|
|
45
88
|
### Encrypting data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten/seal",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Seal SDK",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Mysten Labs <build@mystenlabs.com>",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@mysten/bcs": "^2.1.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@mysten/sui": "^2.
|
|
43
|
+
"@mysten/sui": "^2.21.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|