Role Based Permissions API
API Calls for Role Based Permissions (RBPs)

Operations

Create Custom Permission

1
p.custom_permission_create(
2
permission_name,
3
owner_account=None,
4
weight_threshold=[],
5
account_auths=[],
6
key_auths=[],
7
address_auths=[],
8
)
Copied!
For example
1
p.custom_permission_create(
2
testperm1,
3
owner_account="1.2.7",
4
weight_threshold=1,
5
account_auths=[["1.2.8", 1]])
Copied!

Custom Permission Update

1
p.custom_permission_update(
2
permission_id,
3
owner_account=None,
4
weight_threshold=[],
5
account_auths=[],
6
key_auths=[],
7
address_auths=[],
8
)
Copied!
For example
1
p.custom_permission_update(
2
permission_id,
3
weight_threshold=1,
4
account_auths=[["1.2.9", 2]],
5
owner_account="1.2.7"
6
)
Copied!

Custom Permission Delete

1
p.custom_permission_delete(
2
permission_id,
3
owner_account=None,
4
)
Copied!
For example
1
p.custom_permission_delete(
2
permission_id,
3
owner_account="1.2.7"
4
)
Copied!

Custom Account Authority Create

1
p.custom_account_authority_create(
2
permission_id,
3
operation_type,
4
valid_from,
5
valid_to,
6
owner_account=None,
7
)
Copied!
For example
1
p.custom_account_authority_create(
2
permission_id,
3
0,
4
"2020-07-27T00:00:00",
5
"2030-07-27T00:00:00",
6
owner_account="1.2.7")
Copied!

Custom Account Authority Update

1
p.custom_account_authority_update(
2
auth_id,
3
new_valid_from,
4
new_valid_to,
5
owner_account=None,
6
)
Copied!
For example
1
p.custom_account_authority_update(
2
authority_id,
3
"2020-07-27T00:00:00",
4
"2040-07-27T00:00:00",
5
owner_account="1.2.7")
Copied!

Custom Account Authority Delete

1
p.custom_account_authority_delete(
2
auth_id,
3
owner_account=None,
4
)
Copied!
For example
1
p.custom_account_authority_delete(
2
authority_id,
3
owner_account="1.2.7")
Copied!

RPC Info calls

1
get_custom_permissions(account)
2
get_custom_permission_by_name(account, permission_name)
3
get_custom_account_authorities(account)
4
get_custom_account_authorities_by_permission_id(permission_id)
5
get_custom_account_authorities_by_permission_name(account, permission_name)
6
get_active_custom_account_authorities_by_operation(account, int operation_type)
Copied!