libraries/eosiolib/capi/eosio/permission.h
Functions
Name | |
---|---|
attribute((eosio_wasm_import) ) const |
Attributes
Name | |
---|---|
uint32_t | trx_size |
uint32_t const char * | pubkeys_data |
uint32_t const char uint32_t | pubkeys_size |
uint32_t const char uint32_t const char * | perms_data |
uint32_t const char uint32_t const char uint32_t | perms_size |
capi_name | permission |
capi_name const char uint32_t const char uint32_t uint64_t | delay_us |
Detailed Description
Copyright: defined in eos/LICENSE
Functions Documentation
function attribute
__attribute__(
(eosio_wasm_import)
) const
Parameters:
- trx_data - pointer to the start of the serialized transaction
- trx_size - size (in bytes) of the serialized transaction
- pubkeys_data - pointer to the start of the serialized vector of provided public keys
- pubkeys_size - size (in bytes) of serialized vector of provided public keys (can be 0 if no public keys are to be provided)
- perms_data - pointer to the start of the serialized vector of provided permissions (empty permission name acts as wildcard)
- perms_size - size (in bytes) of the serialized vector of provided permissions
- account - the account owner of the permission
- permission - the name of the permission to check for authorization
- pubkeys_data - pointer to the start of the serialized vector of provided public keys
- pubkeys_size - size (in bytes) of serialized vector of provided public keys (can be 0 if no public keys are to be provided)
- perms_data - pointer to the start of the serialized vector of provided permissions (empty permission name acts as wildcard)
- perms_size - size (in bytes) of the serialized vector of provided permissions
- delay_us - the provided delay in microseconds (cannot exceed INT64_MAX)
- account - the account owner of the permission
- permission - the name of the permission
- account - the account
Return:
- 1 if the transaction is authorized, 0 otherwise
- 1 if the permission is authorized, 0 otherwise
- the last used time (in microseconds since Unix epoch) of the permission
- the creation time (in microseconds since Unix epoch) of the account
Checks if a transaction is authorized by a provided set of keys and permissions
Checks if a permission is authorized by a provided delay and a provided set of keys and permissions
Returns the last used time of a permission
Returns the creation time of an account
Attributes Documentation
variable trx_size
uint32_t trx_size;
variable pubkeys_data
uint32_t const char * pubkeys_data;
variable pubkeys_size
uint32_t const char uint32_t pubkeys_size;
variable perms_data
uint32_t const char uint32_t const char * perms_data;
variable perms_size
uint32_t const char uint32_t const char uint32_t perms_size;
variable permission
capi_name permission;
variable delay_us
capi_name const char uint32_t const char uint32_t uint64_t delay_us;
Source code
#pragma once
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
__attribute__((eosio_wasm_import))
int32_t
check_transaction_authorization( const char* trx_data, uint32_t trx_size,
const char* pubkeys_data, uint32_t pubkeys_size,
const char* perms_data, uint32_t perms_size
);
__attribute__((eosio_wasm_import))
int32_t
check_permission_authorization( capi_name account,
capi_name permission,
const char* pubkeys_data, uint32_t pubkeys_size,
const char* perms_data, uint32_t perms_size,
uint64_t delay_us
);
__attribute__((eosio_wasm_import))
int64_t get_permission_last_used( capi_name account, capi_name permission );
__attribute__((eosio_wasm_import))
int64_t get_account_creation_time( capi_name account );
#ifdef __cplusplus
}
#endif
Updated on 2022-12-05 at 15:38:08 +0000