For AI agents: a documentation index is available at /llms.txt. Markdown versions of pages are available by appending .md to any documentation URL.
Skip to main content

PERM methods

The PERM API methods provide permissioning functionality. Use these methods for local permissioning only.

note

The PERM API is not enabled by default for JSON-RPC. Enable it using the --rpc-http-api or --rpc-ws-api option.

perm_addAccountsToAllowlist​

Adds accounts (participants) to the accounts permission list.

Parameters​

  • addresses: array of strings - List of account addresses.

    note

    The parameters list contains a list, which is why the account addresses are enclosed by double square brackets.

Returns​

  • Success, or error if the request fails (for example, if you attempt to add accounts already on the allowlist, or include invalid account addresses).

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_addAccountsToAllowlist",
"params": [
[
"0xb9b81ee349c3807e46bc71aa2632203c5b462032",
"0xb9b81ee349c3807e46bc71aa2632203c5b462034"
]
],
"id": 1
}'

perm_addNodesToAllowlist​

Adds nodes to the nodes allowlist.

To use domain names in enode URLs, enable DNS support to avoid receiving a request contains an invalid node error.

warning

Enode URL domain name support is an early access feature.

Parameters​

  • enodes: array of strings - List of enode URLs.

    note

    The parameters list contains a list, which is why the enode URLs are enclosed by double square brackets.

Returns​

  • Success, or error if the request fails (for example, if you attempt to add nodes already on the allowlist, or include invalid enode URLs).

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_addNodesToAllowlist",
"params": [
[
"enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303",
"enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"
]
],
"id": 1
}'

perm_getAccountsAllowlist​

Lists accounts (participants) in the accounts permissions list.

Parameters​

  • None

Returns​

  • List of accounts (participants) in the accounts allowlist.

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_getAccountsAllowlist",
"params": [],
"id": 1
}'

perm_getNodesAllowlist​

Lists nodes in the nodes allowlist.

Parameters​

  • None

Returns​

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_getNodesAllowlist",
"params": [],
"id": 1
}'

perm_reloadPermissionsFromFile​

Reloads the accounts and nodes allowlists from the permissions configuration file.

Parameters​

  • None

Returns​

  • Success, or error if the permissions configuration file is not valid.

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_reloadPermissionsFromFile",
"params": [],
"id": 1
}'

perm_removeAccountsFromAllowlist​

Removes accounts (participants) from the accounts permissions list.

Parameters​

  • addresses: array of strings - List of account addresses.

    note

    The parameters list contains a list, which is why the account addresses are enclosed by double square brackets.

Returns​

  • Success, or error if the request fails (for example, if you attempt to remove accounts not on the allowlist, or include invalid account addresses).

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_removeAccountsFromAllowlist",
"params": [
[
"0xb9b81ee349c3807e46bc71aa2632203c5b462032",
"0xb9b81ee349c3807e46bc71aa2632203c5b462034"
]
],
"id": 1
}'

perm_removeNodesFromAllowlist​

Removes nodes from the nodes allowlist.

Parameters​

  • enodes: array of strings - List of enode URLs.

    note

    The parameters list contains a list, which is why the enode URLs are enclosed by double square brackets.

Returns​

  • Success, or error if the request fails (for example, if you attempt to remove nodes not on the allowlist, or include invalid enode URLs).

Example​

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "perm_removeNodesFromAllowlist",
"params": [
[
"enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303",
"enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"
]
],
"id": 1
}'