Skip to content

Commit d5c9fff

Browse files
authored
fix: Update doc and example to 0.4.6 sdk (#127)
1 parent 509df23 commit d5c9fff

File tree

12 files changed

+2720
-985
lines changed

12 files changed

+2720
-985
lines changed

.github/workflows/move.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
platform: ubuntu
2929
arch: x86_64
3030
extension-matching: true
31+
tag: testnet-v1.49.1
3132
3233
- name: Run move tests
3334
run: |

UsingSeal.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,12 @@ Next, the app should create a `SealClient` object for the selected key servers.
7474
```typescript
7575
const suiClient = new SuiClient({ url: getFullnodeUrl('testnet') });
7676
const client = new SealClient({
77-
suiClient,
78-
serverObjectIds: keyServerIds.map((id) => [id, 1]),
79-
verifyKeyServers: false,
77+
suiClient,
78+
serverConfigs: getAllowlistedKeyServers('testnet').map((id) => ({
79+
objectId: id,
80+
weight: 1,
81+
})),
82+
verifyKeyServers: false,
8083
});
8184
```
8285
The `serverObjectIds` is a list of tuples, where each tuple contains a key server object ID and its weight. Recall that the weight indicates how many times the key server can contribute towards reaching the decryption threshold. In this case, all key servers are given equal weight 1.
@@ -120,6 +123,7 @@ const sessionKey = new SessionKey({
120123
address: suiAddress,
121124
packageId: fromHEX(packageId),
122125
ttlMin: 10, // TTL of 10 minutes
126+
suiClient: new SuiClient({ url: getFullnodeUrl('testnet') }),
123127
});
124128
const message = sessionKey.getPersonalMessage();
125129
const { signature } = await keypair.signPersonalMessage(message); // User confirms in wallet

examples/frontend/.eslintrc.cjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ module.exports = {
1515
parser: '@typescript-eslint/parser',
1616
plugins: ['react-refresh', 'react', '@typescript-eslint'],
1717
rules: {
18-
'react-refresh/only-export-components': [
19-
'warn',
20-
{ allowConstantExport: true },
21-
],
18+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
2219
'react/react-in-jsx-scope': 'off',
2320
'react/prop-types': 'off',
2421
},
@@ -34,4 +31,4 @@ module.exports = {
3431
jsx: true,
3532
},
3633
},
37-
}
34+
};

examples/frontend/.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"trailingComma": "all",
77
"jsxSingleQuote": false,
88
"bracketSpacing": true
9-
}
9+
}

examples/frontend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
},
2323
"dependencies": {
2424
"@mysten/bcs": "^1.6.0",
25-
"@mysten/dapp-kit": "^0.16.5",
26-
"@mysten/seal": "0.4.5",
27-
"@mysten/sui": "^1.30.1",
25+
"@mysten/dapp-kit": "^0.16.6",
26+
"@mysten/seal": "0.4.6",
27+
"@mysten/sui": "^1.30.2",
2828
"@radix-ui/colors": "^3.0.0",
2929
"@radix-ui/react-icons": "^1.3.2",
3030
"@radix-ui/react-label": "^2.1.2",

0 commit comments

Comments
 (0)