Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# CDP Python SDK Changelog

## Unreleased
## [0.14.0] - 2025-01-14

### Added

- `ExternalAddress` derived `Address` class.
- Add `skip_batching` option to `Wallet.transfer` to allow for lower latency gasless transfers.
- Add `Webhook.delete_webhook` instance method to delete a webhook instance.
- Add `ExternalAddress` derived `Address` class.

### Deprecated

- Deprecate `Webhook.delete` static method in `Webhook` which deletes a webhook by its ID.

## [0.13.0] - 2024-12-19

Expand All @@ -14,7 +19,7 @@
- Add support for fetching address reputation
- Add `reputation` method to `Address` to fetch the reputation of the address.
- Add support for registering, updating, and listing smart contracts that are
deployed external to CDP.
deployed external to CDP.
- Add `network_id` to `WalletData` so that it is saved with the seed data and surfaced via the export function
- Add ability to import external wallets into CDP via a BIP-39 mnemonic phrase, as a 1-of-1 wallet
- Add ability to import WalletData files exported by the NodeJS CDP SDK
Expand Down Expand Up @@ -42,7 +47,7 @@ deployed external to CDP.
### Added

- Add support for funding wallets (Alpha feature release)
- Must reach out to CDP SDK Discord channel to be considered for this feature.
- Must reach out to CDP SDK Discord channel to be considered for this feature.
- Added create and update feature for `SmartContractEventActivity` webhook and its related event type filter.

### Fixed
Expand Down Expand Up @@ -88,7 +93,7 @@ deployed external to CDP.
### Changed

- Make faucet transactions async i.e. using `faucet_tx.wait()` to wait for the transaction to be confirmed.
- This will make the SDK more consistent and make faucet transactions more reliable.
- This will make the SDK more consistent and make faucet transactions more reliable.

## [0.0.9] - 2024-10-29

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pip install cdp-sdk
```

if you prefer to manage dependencies with Poetry:

```bash
poetry add cdp-sdk
```
Expand Down Expand Up @@ -155,6 +156,12 @@ print(f"Faucet transaction successfully completed: {usdc_faucet_tx}")
transfer = wallet1.transfer(0.00001, "usdc", wallet3, gasless=True).wait()
```

By default, gasless transfers are batched with other transfers, and might take longer to submit. If you want to opt out of batching, you can set the `skip_batching` option to `True`, which will submit the transaction immediately.

```python
transfer = wallet1.transfer(0.00001, "usdc", wallet3, gasless=True, skip_batching=True).wait()
```

### Listing Transfers

```python
Expand Down Expand Up @@ -239,7 +246,9 @@ fetched_wallet.load_seed(file_path)
```

### 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
from cdp.client.models.webhook import WebhookEventType
from cdp.client.models.webhook import WebhookEventFilter
Expand All @@ -252,10 +261,13 @@ wh1 = Webhook.create(
)
print(wh1)
```

In the above example, parameter `network_id` is optional, if not provided, the default network is `base-sepolia`. Today we support Base mainnet and Base Sepolia networks.

### Creating a Webhook On A Wallet

A webhook can be attached to an existing wallet to monitor events that occur on the wallet, i.e. all addresses associated with this wallet. A list of supported blockchain events can be found [here](https://docs.cdp.coinbase.com/get-started/docs/webhooks/event-types).

```python
import cdp

Expand All @@ -265,9 +277,9 @@ print(wh1)
```

## Examples

Examples, demo apps, and further code samples can be found in the [CDP SDK Python Documentation](https://docs.cdp.coinbase.com/cdp-apis/docs/welcome).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

2 changes: 1 addition & 1 deletion cdp/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.12.1"
__version__ = "0.14.0"
2 changes: 2 additions & 0 deletions cdp/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from cdp.client.models.asset import Asset
from cdp.client.models.balance import Balance
from cdp.client.models.broadcast_contract_invocation_request import BroadcastContractInvocationRequest
from cdp.client.models.broadcast_external_transfer_request import BroadcastExternalTransferRequest
from cdp.client.models.broadcast_staking_operation_request import BroadcastStakingOperationRequest
from cdp.client.models.broadcast_trade_request import BroadcastTradeRequest
from cdp.client.models.broadcast_transfer_request import BroadcastTransferRequest
Expand All @@ -70,6 +71,7 @@
from cdp.client.models.contract_invocation_list import ContractInvocationList
from cdp.client.models.create_address_request import CreateAddressRequest
from cdp.client.models.create_contract_invocation_request import CreateContractInvocationRequest
from cdp.client.models.create_external_transfer_request import CreateExternalTransferRequest
from cdp.client.models.create_fund_operation_request import CreateFundOperationRequest
from cdp.client.models.create_fund_quote_request import CreateFundQuoteRequest
from cdp.client.models.create_payload_signature_request import CreatePayloadSignatureRequest
Expand Down
Loading
Loading