POST
/
#particle_aa_getBTCAccount
curl --request POST \
  --url 'https://rpc.particle.network/evm-chain/#particle_aa_getBTCAccount' \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "particle_aa_getBTCAccount",
  "params": [
    {
      "name": "BTC",
      "version": "2.0.0",
      "btcPublicKey": "<string>",
      "btcAddress": "<string>"
    }
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {
    "chainId": 123,
    "isDeployed": true,
    "eoaAddress": "<string>",
    "factoryAddress": "<string>",
    "entryPointAddress": "<string>",
    "smartAccountAddress": "<string>",
    "owner": "<string>",
    "name": "<string>",
    "version": "<string>",
    "index": 123,
    "btcPublicKey": "<string>"
  }
}

Understanding getBTCAccount

  • getBTCAccountcalculates and return the information of smart account tied to an account address from btc public key. It takes:
    Account config object:
    • name- string. only BTC
    • version - string. Either 1.0.0 or 2.0.0.
    • btcPublicKey - string.
    • btcAddress - string. optional

Query example

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "particle_aa_getBTCAccount",
  "params": [
    {
      "name": "BTC",
      "version": "2.0.0",
      "btcPublicKey": "02f2ac735d9a0d1e5db8f6a6878ffb2a67d8415871c34df930cc2c03676f3a4eaa",
      "btcAddress": "bc1qlyv3djgklwe0lm02a0265u4y8gg252cmut3j2u"
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
Request to calculate and return information of a smart account tied to a BTC public key.

Defines the structure for BTC account request data.

jsonrpc
string
default:
2.0
required

JSON-RPC protocol version, should be 2.0.

id
integer
default:
1
required

Identifier for the request.

method
string
default:
particle_aa_getBTCAccount
required

The method to be invoked on the RPC server.

params
object[]
required

Array containing parameters for the method.

Response

200 - application/json
Successful response with the smart account details.

Response schema for getBTCAccount.

jsonrpc
string

JSON-RPC protocol version used in the response.

id
integer

Identifier matching the request.

result
object

Contains the smart account information derived from the BTC public key.