Skip to content

Commit f27c9f0

Browse files
authored
Merge pull request #142 from Phala-Network/fix-kms
fix: correct purpose parameter in getKey()
2 parents 008db61 + 173f790 commit f27c9f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

phala-cloud/key-management/get-a-key.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ The `getKey()` method accepts an optional second parameter called `purpose`:
5959
const result = await client.getKey('wallet/ethereum', 'mainnet');
6060
```
6161

62-
This is equivalent to using a longer path: `getKey('wallet/ethereum/mainnet')`. The purpose parameter is purely for organization - use whichever approach feels cleaner to you.
62+
The `purpose` parameter is purely for organization and signature chain management. It doesn't affect the returned key material (only `path` participates in key derivation). `getKey()` returns an ECDSA-based signature chain where `purpose` is hased into the signed message to isolate the namespace. Please leave it empty it if you are not sure what it does.
6363
</Tip>
6464

6565
## Key Properties
6666

6767
- **Application-specific**: Keys are derived from your app's unique master key (tied to app ID)
68-
- **Deterministic**: Same `path` + `purpose` always generates the same key
68+
- **Deterministic**: Same `path` always generates the same key
6969
- **Isolated**: Different applications cannot derive each other's keys
7070
- **32 bytes**: Raw key material suitable for various cryptographic operations
7171

0 commit comments

Comments
 (0)