# circle-developer-controlled-wallets
This SDK provides convenient access to Circle's Developer Controlled Wallets APIs for applications written in Python. For the API reference, see the [Circle Web3 API docs](https://developers.circle.com/api-reference/w3s/common/ping).
- Package version: 2.1.0
## Requirements.
Python 3.7+
## Installation
### pip install
```sh
pip install circle-developer-controlled-wallets
```
Then import the package:
```python
from circle.web3 import developer_controlled_wallets
```
## Usage
1. Generate an API key, if you haven't already, in the [Web3 Services Console](https://console.circle.com/api-keys). This API key will be used for authentication and authorization when making requests to Circle's APIs.
```sh
export CIRCLE_WEB3_API_KEY="Your API KEY"
```
2. Generate a new entity secret by using the helper function in the SDK. This will print a new entity secret which will be used in step 3 to register it.
```python
from circle.web3 import utils
utils.generate_entity_secret()
```
> [!IMPORTANT]
Protect your Entity Secret as you would protect your house key. Losing it or sharing it with others can have serious consequences. As the name suggests, the Entity Secret is sensitive information. Store it securely and treat it with the highest level of confidentiality to prevent unauthorized access or use.
3. Register the entity secret either by using the SDK or by following Circle's [Developer-Controlled QuickStart](https://developers.circle.com/interactive-quickstarts/dev-controlled-wallets#setup-your-entity-secret). This step ensures that your account is correctly set up to interact with Circle's APIs.
```python
from circle.web3 import utils
result = utils.register_entity_secret_ciphertext(api_key='your_api_key', entity_secret='new_entity_secret')
print(result)
```
> [!IMPORTANT]
The `register_entity_secret_ciphertext` function downloads a recovery file named `recovery_file_<timestamp>.dat`. This file should be stored securely, similar to the entity secret. Additionally, the function returns the content of the recovery file as a JSON response.
4. In your code, use the `init_developer_controlled_wallets_client` function from the utils and initialize the client using your API key and entity secret:
```python
from circle.web3 import utils
client = utils.init_developer_controlled_wallets_client(api_key="Your API KEY", entity_secret="Your entity secret")
```
5. Interact with the client:
```python
from circle.web3 import utils
from circle.web3 import developer_controlled_wallets
client = utils.init_developer_controlled_wallets_client(api_key="Your API KEY", entity_secret="Your entity secret")
api_instance = developer_controlled_wallets.WalletSetsApi(client)
# create wallet sets
try:
request = developer_controlled_wallets.CreateWalletSetRequest.from_dict({
"name": "my_wallet_set"
})
response = api_instance.create_wallet_set(request)
print(response)
except developer_controlled_wallets.ApiException as e:
print("Exception when calling WalletSetsApi->create_wallet_set: %s\n" % e)
# list wallet sets
try:
response = api_instance.get_wallet_sets()
for wallet_set in response.data.wallet_sets:
print(wallet_set.actual_instance.id)
except developer_controlled_wallets.ApiException as e:
print("Exception when calling WalletSetsApi->get_wallet_sets: %s\n" % e)
```
We recommend reading through the official [documentation](https://developers.circle.com/w3s/docs) and [QuickStart guides](https://developers.circle.com/interactive-quickstarts) mentioned above to ensure a smooth setup and usage experience.
## Configuration
The client accept following configuration parameters:
Option | Required | Description
------------ | ------------- | -------------
api_key | Yes | Api Key that is used to authenticate against Circle APIs. Must be provided by ether env variable or function parameter
entity_secret | Yes | Your configured entity secret. Must be provided by ether env variable or function parameter.
host | No | Optional base URL to override the default: https://api.circle.com/v1/w3s.
user_agent | No | Optional custom user agent request header. We will prepend it to default user agent header if provided.
## Need help or have questions?
Here are some helpful links, if you encounter any issues or have questions about this SDK:
- 📖 [Getting started](https://developers.circle.com/interactive-quickstarts/dev-controlled-wallets): Check out our official Developer-Controlled Wallets QuickStart.
- 🎮 [Join our Discord Community](https://discord.com/invite/buildoncircle): Engage, learn, and collaborate.
- 🛎 [Visit our Help-Desk Page](https://support.usdc.circle.com/hc/en-us/p/contactus?_gl=1*1va6vat*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Dive into curated FAQs and guides.
- 📧 [Direct Email](mailto:customer-support@circle.com): We're always a message away.
- 📖 [Read docs](https://developers.circle.com/w3s/docs?_gl=1*15ozb5b*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Check out our developer documentation.
Happy coding!
Raw data
{
"_id": null,
"home_page": null,
"name": "circle-developer-controlled-wallets",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "OpenAPI, OpenAPI-Generator, Developer-Controlled Wallets",
"author": "OpenAPI Generator community",
"author_email": "team@openapitools.org",
"download_url": "https://files.pythonhosted.org/packages/95/4d/77886bb1af8157907162c0ae0eacc1c1e7245154fef8cc25e53321ce32e7/circle_developer_controlled_wallets-2.1.0.tar.gz",
"platform": null,
"description": "# circle-developer-controlled-wallets\nThis SDK provides convenient access to Circle's Developer Controlled Wallets APIs for applications written in Python. For the API reference, see the [Circle Web3 API docs](https://developers.circle.com/api-reference/w3s/common/ping).\n\n- Package version: 2.1.0\n\n## Requirements.\n\nPython 3.7+\n\n## Installation\n### pip install\n\n```sh\npip install circle-developer-controlled-wallets\n```\n\nThen import the package:\n```python\nfrom circle.web3 import developer_controlled_wallets\n```\n\n\n## Usage\n\n1. Generate an API key, if you haven't already, in the [Web3 Services Console](https://console.circle.com/api-keys). This API key will be used for authentication and authorization when making requests to Circle's APIs.\n\n ```sh\n export CIRCLE_WEB3_API_KEY=\"Your API KEY\"\n ```\n\n2. Generate a new entity secret by using the helper function in the SDK. This will print a new entity secret which will be used in step 3 to register it. \n\n ```python\n from circle.web3 import utils\n\n utils.generate_entity_secret()\n ```\n\n > [!IMPORTANT] \n Protect your Entity Secret as you would protect your house key. Losing it or sharing it with others can have serious consequences. As the name suggests, the Entity Secret is sensitive information. Store it securely and treat it with the highest level of confidentiality to prevent unauthorized access or use.\n\n3. Register the entity secret either by using the SDK or by following Circle's [Developer-Controlled QuickStart](https://developers.circle.com/interactive-quickstarts/dev-controlled-wallets#setup-your-entity-secret). This step ensures that your account is correctly set up to interact with Circle's APIs.\n\n ```python\n from circle.web3 import utils\n result = utils.register_entity_secret_ciphertext(api_key='your_api_key', entity_secret='new_entity_secret')\n print(result)\n ```\n > [!IMPORTANT] \n The `register_entity_secret_ciphertext` function downloads a recovery file named `recovery_file_<timestamp>.dat`. This file should be stored securely, similar to the entity secret. Additionally, the function returns the content of the recovery file as a JSON response. \n\n4. In your code, use the `init_developer_controlled_wallets_client` function from the utils and initialize the client using your API key and entity secret:\n\n ```python\n from circle.web3 import utils\n\n client = utils.init_developer_controlled_wallets_client(api_key=\"Your API KEY\", entity_secret=\"Your entity secret\")\n ```\n\n5. Interact with the client:\n\n```python\nfrom circle.web3 import utils\nfrom circle.web3 import developer_controlled_wallets\n\nclient = utils.init_developer_controlled_wallets_client(api_key=\"Your API KEY\", entity_secret=\"Your entity secret\")\napi_instance = developer_controlled_wallets.WalletSetsApi(client)\n\n# create wallet sets\ntry:\n request = developer_controlled_wallets.CreateWalletSetRequest.from_dict({\n \"name\": \"my_wallet_set\"\n })\n response = api_instance.create_wallet_set(request)\n print(response)\nexcept developer_controlled_wallets.ApiException as e:\n print(\"Exception when calling WalletSetsApi->create_wallet_set: %s\\n\" % e)\n\n# list wallet sets\ntry:\n response = api_instance.get_wallet_sets()\n for wallet_set in response.data.wallet_sets:\n print(wallet_set.actual_instance.id)\nexcept developer_controlled_wallets.ApiException as e:\n print(\"Exception when calling WalletSetsApi->get_wallet_sets: %s\\n\" % e)\n```\n\nWe recommend reading through the official [documentation](https://developers.circle.com/w3s/docs) and [QuickStart guides](https://developers.circle.com/interactive-quickstarts) mentioned above to ensure a smooth setup and usage experience.\n\n\n## Configuration\n\nThe client accept following configuration parameters:\n\nOption | Required | Description\n------------ | ------------- | -------------\napi_key | Yes | Api Key that is used to authenticate against Circle APIs. Must be provided by ether env variable or function parameter\nentity_secret | Yes | Your configured entity secret. Must be provided by ether env variable or function parameter.\nhost | No | Optional base URL to override the default: https://api.circle.com/v1/w3s.\nuser_agent | No | Optional custom user agent request header. We will prepend it to default user agent header if provided.\n\n\n## Need help or have questions?\n\nHere are some helpful links, if you encounter any issues or have questions about this SDK:\n\n- \ud83d\udcd6 [Getting started](https://developers.circle.com/interactive-quickstarts/dev-controlled-wallets): Check out our official Developer-Controlled Wallets QuickStart.\n- \ud83c\udfae [Join our Discord Community](https://discord.com/invite/buildoncircle): Engage, learn, and collaborate.\n- \ud83d\udece [Visit our Help-Desk Page](https://support.usdc.circle.com/hc/en-us/p/contactus?_gl=1*1va6vat*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Dive into curated FAQs and guides.\n- \ud83d\udce7 [Direct Email](mailto:customer-support@circle.com): We're always a message away.\n- \ud83d\udcd6 [Read docs](https://developers.circle.com/w3s/docs?_gl=1*15ozb5b*_ga*MTAyNTA0NTQ2NC4xNjk5NTYyMjgx*_ga_GJDVPCQNRV*MTcwMDQ5Mzg3Ny4xNC4xLjE3MDA0OTM4ODQuNTMuMC4w): Check out our developer documentation.\nHappy coding!\n",
"bugtrack_url": null,
"license": null,
"summary": "Developer-Controlled Wallets",
"version": "2.1.0",
"project_urls": null,
"split_keywords": [
"openapi",
" openapi-generator",
" developer-controlled wallets"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "edaf240006d3d91202874982f6dcece7e1e69bf55753937bb5a50299406cddfe",
"md5": "8ae388b90757e7edcc1aa6e30cde4d3b",
"sha256": "ab5558caff3315c69514dd1d020fcc77c75a1672a0c6cd5fef63b33f4efa62cb"
},
"downloads": -1,
"filename": "circle_developer_controlled_wallets-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8ae388b90757e7edcc1aa6e30cde4d3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 156457,
"upload_time": "2024-10-25T17:49:11",
"upload_time_iso_8601": "2024-10-25T17:49:11.535806Z",
"url": "https://files.pythonhosted.org/packages/ed/af/240006d3d91202874982f6dcece7e1e69bf55753937bb5a50299406cddfe/circle_developer_controlled_wallets-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "954d77886bb1af8157907162c0ae0eacc1c1e7245154fef8cc25e53321ce32e7",
"md5": "3deca56dfbf9899e7fd3dd45fe6976b9",
"sha256": "0397c5989da66bfea6d0010f9002b27dfbc34aa6647ce6b1536c43b91c411740"
},
"downloads": -1,
"filename": "circle_developer_controlled_wallets-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3deca56dfbf9899e7fd3dd45fe6976b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 75163,
"upload_time": "2024-10-25T17:49:12",
"upload_time_iso_8601": "2024-10-25T17:49:12.527577Z",
"url": "https://files.pythonhosted.org/packages/95/4d/77886bb1af8157907162c0ae0eacc1c1e7245154fef8cc25e53321ce32e7/circle_developer_controlled_wallets-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 17:49:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "circle-developer-controlled-wallets"
}