Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
erdimaden committed Jun 3, 2024
1 parent 3ac1fed commit d2d5b41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ In order to persist the data for the Wallet, you will need to implement a store
await store(data);
```

For convenience during testing, we provide a `saveSeed` method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.
For convenience during testing, we provide a `saveSeed` method that stores the wallet's seed in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

```typescript
user.saveSeed(wallet);
wallet.saveSeed(wallet);
```

To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveSeed` and `loadWallets`.
To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveSeed` and `loadSeed`.

```typescript
user.saveSeed(wallet, true);
wallet.saveSeed(wallet, true);
```

The below code demonstrates how to re-instantiate a Wallet from the data export.
Expand All @@ -188,8 +188,8 @@ To import Wallets that were persisted to your local file system using `saveWalle

```typescript
// The Wallet can be re-instantiated using the exported data.
const wallets = await user.loadWallets();
const reinitWallet = wallets[wallet.getId()];
const w = await user.getWallet(w.getId());
w.loadSeed(filePath);
```

## Development
Expand Down

0 comments on commit d2d5b41

Please sign in to comment.