Module 0x1::permissioned_signer

The permissioned signer feature has been removed. This module remains as a shell for upgrade compatibility: all type definitions are unchanged and every public function aborts with EPERMISSION_SIGNER_DISABLED, except is_permissioned_signer which returns false.

use 0x1::big_ordered_map;
use 0x1::copyable_any;
use 0x1::error;

Struct RevokePermissionHandlePermission

If a permissioned signer has this permission, it would be able to revoke other granted permission handles in the same signer.

#[deprecated]
struct RevokePermissionHandlePermission has copy, drop, store
Fields
dummy_field: bool

Resource GrantedPermissionHandles

Stores the list of granted permission handles for a given account.

#[deprecated]
struct GrantedPermissionHandles has key
Fields
active_handles: vector<address>
Each address refers to a permissions_storage_addr that stores the PermissionStorage.

Enum PermissionedHandle

A ephermeral permission handle that can be used to generate a permissioned signer with permission configuration stored within.

#[deprecated]
enum PermissionedHandle
Variants
V1
Fields
master_account_addr: address
Address of the signer that creates this handle.
permissions_storage_addr: address
Address that stores PermissionStorage.

Enum StorablePermissionedHandle

A permission handle that can be used to generate a permissioned signer.

This handle is storable and thus should be treated very carefully as it serves similar functionality as signer delegation.

#[deprecated]
enum StorablePermissionedHandle has store
Variants
V1
Fields
master_account_addr: address
Address of the signer that creates this handle.
permissions_storage_addr: address
Address that stores PermissionStorage.
expiration_time: u64
Permissioned signer can no longer be generated from this handle after expiration_time.

Enum Resource PermissionStorage

The actual permission configuration stored on-chain.

The address that holds PermissionStorage will be generated freshly every time a permission handle gets created.

#[deprecated]
enum PermissionStorage has key
Variants
V1
Fields
perms: big_ordered_map::BigOrderedMap<copyable_any::Any, permissioned_signer::StoredPermission>
A hetherogenous map from Permission structs defined by each different modules to its permission capacity.

Enum StoredPermission

Types of permission capacity stored on chain.

#[deprecated]
enum StoredPermission has copy, drop, store
Variants
Unlimited
Fields
Capacity
Fields
0: u256

Constants

Permissioned signer feature is not activated.

const EPERMISSION_SIGNER_DISABLED: u64 = 9;

Function create_permissioned_handle

#[deprecated]
public fun create_permissioned_handle(_master: &signer): permissioned_signer::PermissionedHandle
Implementation
public fun create_permissioned_handle(_master: &signer): PermissionedHandle {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function destroy_permissioned_handle

#[deprecated]
public fun destroy_permissioned_handle(_p: permissioned_signer::PermissionedHandle)
Implementation
public fun destroy_permissioned_handle(_p: PermissionedHandle) {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function signer_from_permissioned_handle

#[deprecated]
public fun signer_from_permissioned_handle(_p: &permissioned_signer::PermissionedHandle): signer
Implementation
public fun signer_from_permissioned_handle(_p: &PermissionedHandle): signer {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function is_permissioned_signer

Permissioned signers no longer exist, so this always returns false.

#[deprecated]
public fun is_permissioned_signer(_s: &signer): bool
Implementation
public fun is_permissioned_signer(_s: &signer): bool {
    false
}

Function grant_revoke_permission

#[deprecated]
public fun grant_revoke_permission(_master: &signer, _permissioned: &signer)
Implementation
public fun grant_revoke_permission(_master: &signer, _permissioned: &signer) {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function revoke_permission_storage_address

#[deprecated]
public entry fun revoke_permission_storage_address(_s: &signer, _permissions_storage_addr: address)
Implementation
public entry fun revoke_permission_storage_address(
    _s: &signer, _permissions_storage_addr: address
) {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function revoke_all_handles

#[deprecated]
public entry fun revoke_all_handles(_s: &signer)
Implementation
public entry fun revoke_all_handles(_s: &signer) {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function address_of

#[deprecated]
public fun address_of(_s: &signer): address
Implementation
public fun address_of(_s: &signer): address {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}

Function borrow_address

#[deprecated]
public fun borrow_address(_s: &signer): &address
Implementation
public fun borrow_address(_s: &signer): &address {
    abort error::permission_denied(EPERMISSION_SIGNER_DISABLED)
}