| Sign the EIP-712 typed structured data from a specified developer-controlled wallet.
You must provide either a walletId or a walletAddress and blockchain pair in the request body.
This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all apps currently support Smart Contract Accounts (SCA); the difference between Ethereum's EOA and SCA can be found in the account types guide. You can also check the list of Ethereum apps that support SCA: https://eip1271.io/.
System-generated unique identifier of the resource.
A string represents the typed structured data in EIP-712
The human readable explanation for this sign action. Useful for presenting with extra information.
A base64 string expression of the entity secret ciphertext. The entity secret should be encrypted by the entity public key. Circle mandates that the entity secret ciphertext is unique for each API request.
The blockchain network that the resource is to be created on or is currently on.
Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.
1from circle.web3 import developer_controlled_wallets
2from circle.web3 import utils
3import json
4
5client = utils.init_developer_controlled_wallets_client(api_key=key, entity_secret=entitySecret)
6
7api_instance = developer_controlled_wallets.SigningApi(client)
8typed_data = json.dumps({
9 "types": {
10 "EIP712Domain": [
11 {"name": "name", "type": "string"},
12 {"name": "version", "type": "string"},
13 {"name": "chainId", "type": "uint256"},
14 {"name": "verifyingContract", "type": "address"},
15 ],
16 "Person": [
17 {"name": "name", "type": "string"},
18 {"name": "wallet", "type": "address"},
19 ],
20 "Mail": [
21 {"name": "from", "type": "Person"},
22 {"name": "to", "type": "Person"},
23 {"name": "contents", "type": "string"},
24 ],
25 },
26 "primaryType": "Mail",
27 "domain": {
28 "name": "Ether Mail",
29 "version": "1",
30 "chainId": "11155111",
31 "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
32 },
33 "message": {
34 "from": {
35 "name": "Cow",
36 "wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826",
37 },
38 "to": {
39 "name": "Bob",
40 "wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB",
41 },
42 "contents": "Hello, Bob!",
43 },
44})
45request = developer_controlled_wallets.SignTypedDataRequest.from_dict({
46 "walletId": "301e9038-e4c3-5a77-a9fe-95fd644f4c85",
47 "data": typed_data,
48 "memo": "test",
49})
50response = api_instance.sign_typed_data(sign_typed_data_request=request)
51print(response.json())
521{
2 "data": {
3 "signature": "3W6r38STvZuBSmk2bbbct132SjEsYSARo3CJi3JQvNUaFoYu..."
4 }
5}