Skip to main content

User-Controlled Wallets

Project description

circle-user-controlled-wallets

User-Controlled Wallets API documentation.

  • API version: 1.0
  • Package version: 5.3.0

Requirements.

Python 3.7+

Installation

pip install

pip install circle-user-controlled-wallets

Then import the package:

from circle.web3 import user_controlled_wallets

Usage

  1. Generate an API key, if you haven't already, in the Web3 Services Console. This API key will be used for authentication and authorization when making requests to Circle's APIs. API key can be set by environment variable or function parameter
export CIRCLE_WEB3_API_KEY="Your API KEY"
  1. Follow our User-Controlled QuickStart. This step ensures that you fully grasp the concept of Circle's User-Controlled Wallets.

  2. Initiate API client

from circle.web3 import utils

client = utils.init_user_controlled_wallets_client(api_key="Your API KEY")
  1. Interact with the client:
import uuid
from circle.web3 import user_controlled_wallets

# generate a user id
user_id = str(uuid.uuid4())

# create user
api_instance = user_controlled_wallets.UsersApi(client)
try:
    request = user_controlled_wallets.CreateUserRequest(user_id=user_id)
    api_instance.create_user(request)
except user_controlled_wallets.ApiException as e:
    print("Exception when calling UsersApi->create_user: %s\n" % e)

# get user
try:
    response = api_instance.get_user(id=user_id)
    print(response.data)
except user_controlled_wallets.ApiException as e:
    print("Exception when calling UsersApi->get_user: %s\n" % e)

# get user token
try:
    auth_api_instance = user_controlled_wallets.PINAuthenticationApi(client)
    request = user_controlled_wallets.UserTokenRequest.from_dict({"userId": user_id})
    response = auth_api_instance.get_user_token(request)
    print(response)
except user_controlled_wallets.ApiException as e:
    print("Exception when calling PINAuthenticationApi->get_user_token: %s\n" % e)

We recommend reading through the official documentation and QuickStart guides 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.
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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circle_user_controlled_wallets-5.3.0.tar.gz (88.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

circle_user_controlled_wallets-5.3.0-py3-none-any.whl (175.3 kB view details)

Uploaded Python 3

File details

Details for the file circle_user_controlled_wallets-5.3.0.tar.gz.

File metadata

File hashes

Hashes for circle_user_controlled_wallets-5.3.0.tar.gz
Algorithm Hash digest
SHA256 6a32dca65105b47e48e9fc1b00fe6a27f834499f9b2e660dd5c63796d79ffb25
MD5 d313f546d23ce47cfd4a2b927ba2670e
BLAKE2b-256 9ef69e9885300af0094d36e9a790e9185230adfaaeb5d40f0a5cae170fa2e2bb

See more details on using hashes here.

File details

Details for the file circle_user_controlled_wallets-5.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for circle_user_controlled_wallets-5.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13318f8d24591944d89e97af652c3b2c765e218762dc7bad3ab91be88b7a8817
MD5 437480fe2d66bd358c1ad1c90a49f72f
BLAKE2b-256 5801688dd9872c5f9672436bde891e70fe51ae45a32c100b6506cd4a09fc6d0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page