Generate a challenge for signing the transaction from a specific user-controlled wallet.
NOTE: This endpoint supports the following blockchains: SOL, SOL-DEVNET, EVM, EVM-TESTNET. Each chain defines its own standard. For more details, see Signing APIs.
System-generated unique identifier of the resource.
Raw transaction string that needs to be signed. Excluded with transaction
. Required without transaction
.
Required to be base64 encoded for NEAR, Solana chains. Required to be hex encoded for EVM chains.
Transaction object in JSON that needs to be signed. Excluded with rawTransaction
. Required without rawTransaction
.
NOTE: This field is only supported by EVM
chains.
The human readable explanation for this sign action. Useful for presenting with extra information.
Unique system generated JWT session token for specific user.
Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.
1from circle.web3 import user_controlled_wallets
2from circle.web3 import utils
3
4client = utils.init_user_controlled_wallets_client(api_key=key)
5
6api_instance = user_controlled_wallets.SigningApi(client)
7request = user_controlled_wallets.SignUserTransactionRequest.from_dict({
8 "walletId": "290926b7-3790-5789-a7a9-594a9b99f1cc",
9 "rawTransaction": "0x02f283aa36a780830f4240841571d6868252089467df4bc369de8686e0fa53f7e1c3c6fd371ae13c8609184e72a00080c0808080",
10 "memo": "test",
11})
12response = api_instance.sign_user_transaction(x_user_token=user_token, sign_user_transaction_request=request)
13print(response.json())
14
1{
2 "data": {
3 "challenge_id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5"
4 }
5}