From b3faa2c033c80e505a681c3061a49602154f8a68 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Sat, 7 Dec 2024 19:02:33 +0530 Subject: [PATCH] docs: easier way to import wallets --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 00883c6..48de790 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,14 @@ fetched_wallet = Wallet.fetch(wallet.id) fetched_wallet.load_seed(file_path) ``` +An easier way to import data if you have the exported data as a dictionary object: +```python +from cdp import WalletData, Wallet +fetched_wallet = WalletData.from_dict(wallet_data) +wallet = Wallet.import_data(fetched_data) +``` + + ### Creating a Webhook A webhook is a way to provide other applications with real-time information from the blockchain. When an event occurs on a blockchain address, it can send a POST request to a URL you specify. You can create a webhook to receive notifications about events that occur in your wallet or crypto address, such as when a user makes a transfer. ```python