Skip to main content

Crate eosio_cdt_sys

Crate eosio_cdt_sys 

Source
Expand description

This crate provides low-level FFI bindings for EOSIO smart contract development. Bindings are automatically generated with bindgen from header files in the EOSIO/eosio.cdt repository.

For more idiomatic Rust wrappers please see the eosio and eosio_cdt crates.

Structs§

capi_checksum160
160-bit hash
capi_checksum256
256-bit hash
capi_checksum512
512-bit hash
capi_public_key
EOSIO Public Key. K1 and R1 keys are 34 bytes. Newer keys can be variable-sized
capi_signature
EOSIO Signature. K1 and R1 signatures are 66 bytes. Newer signatures can be variable-sized

Enums§

c_void
Equivalent to C’s void type when used as a pointer.

Functions§

action_data_size
Get the length of the current action’s data field. This method is useful for dynamically sized actions
assert_recover_key
Tests a given public key with the generated key from digest and the signature.
assert_ripemd160
Tests if the ripemod160 hash generated from data matches the provided checksum.
assert_sha1
Tests if the sha1 hash generated from data matches the provided checksum.
assert_sha256
Tests if the sha256 hash generated from data matches the provided checksum.
assert_sha512
Tests if the sha512 hash generated from data matches the provided checksum.
cancel_deferred
Cancels a deferred transaction.
check_permission_authorization
Checks if a permission is authorized by a provided delay and a provided set of keys and permissions
check_transaction_authorization
Checks if a transaction is authorized by a provided set of keys and permissions
current_receiver
Get the current receiver of the action @brief Get the current receiver of the action @return the account which specifies the current receiver of the action
current_time
Returns the time in microseconds from 1970 of the current block
db_end_i64
Get an iterator representing just-past-the-end of the last table row of a primary 64-bit integer index table
db_find_i64
Find a table row in a primary 64-bit integer index table by primary key
db_get_i64
Get a record in a primary 64-bit integer index table
db_idx64_end
Get an end iterator representing just-past-the-end of the last table row of a secondary 64-bit integer index table
db_idx64_find_primary
Find a table row in a secondary 64-bit integer index table by primary key
db_idx64_find_secondary
Find a table row in a secondary 64-bit integer index table by secondary key
db_idx64_lowerbound
Find the table row in a secondary 64-bit integer index table that matches the lowerbound condition for a given secondary key The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key
db_idx64_next
Find the table row following the referenced table row in a secondary 64-bit integer index table
db_idx64_previous
Find the table row preceding the referenced table row in a secondary 64-bit integer index table
db_idx64_remove
Remove a table row from a secondary 64-bit integer index table
db_idx64_store
Store an association of a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table
db_idx64_update
Update an association for a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table
db_idx64_upperbound
Find the table row in a secondary 64-bit integer index table that matches the upperbound condition for a given secondary key The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key
db_idx128_end
Get an end iterator representing just-past-the-end of the last table row of a secondary 128-bit integer index table
db_idx128_find_primary
Find a table row in a secondary 128-bit integer index table by primary key
db_idx128_find_secondary
Find a table row in a secondary 128-bit integer index table by secondary key
db_idx128_lowerbound
Find the table row in a secondary 128-bit integer index table that matches the lowerbound condition for a given secondary key The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key
db_idx128_next
Find the table row following the referenced table row in a secondary 128-bit integer index table
db_idx128_previous
Find the table row preceding the referenced table row in a secondary 128-bit integer index table
db_idx128_remove
Remove a table row from a secondary 128-bit integer index table
db_idx128_store
Store an association of a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table
db_idx128_update
Update an association for a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table
db_idx128_upperbound
Find the table row in a secondary 128-bit integer index table that matches the upperbound condition for a given secondary key The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key
db_idx256_end
Get an end iterator representing just-past-the-end of the last table row of a secondary 256-bit index table
db_idx256_find_primary
Find a table row in a secondary 256-bit index table by primary key
db_idx256_find_secondary
Find a table row in a secondary 256-bit index table by secondary key
db_idx256_lowerbound
Find the table row in a secondary 256-bit index table that matches the lowerbound condition for a given secondary key The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key (uses lexicographical ordering on the 256-bit keys)
db_idx256_next
Find the table row following the referenced table row in a secondary 256-bit index table
db_idx256_previous
Find the table row preceding the referenced table row in a secondary 256-bit index table
db_idx256_remove
Remove a table row from a secondary 256-bit index table
db_idx256_store
Store an association of a 256-bit secondary key to a primary key in a secondary 256-bit index table
db_idx256_update
Update an association for a 256-bit secondary key to a primary key in a secondary 256-bit index table
db_idx256_upperbound
Find the table row in a secondary 256-bit index table that matches the upperbound condition for a given secondary key The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key (uses lexicographical ordering on the 256-bit keys)
db_idx_double_end
Get an end iterator representing just-past-the-end of the last table row of a secondary double-precision floating-point index table
db_idx_double_find_primary
Find a table row in a secondary double-precision floating-point index table by primary key
db_idx_double_find_secondary
Find a table row in a secondary double-precision floating-point index table by secondary key
db_idx_double_lowerbound
Find the table row in a secondary double-precision floating-point index table that matches the lowerbound condition for a given secondary key The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key
db_idx_double_next
Find the table row following the referenced table row in a secondary double-precision floating-point index table
db_idx_double_previous
Find the table row preceding the referenced table row in a secondary double-precision floating-point index table
db_idx_double_remove
Remove a table row from a secondary double-precision floating-point index table
db_idx_double_store
Store an association of a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table
db_idx_double_update
Update an association for a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table
db_idx_double_upperbound
Find the table row in a secondary double-precision floating-point index table that matches the upperbound condition for a given secondary key The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key
db_idx_long_double_end
Get an end iterator representing just-past-the-end of the last table row of a secondary quadruple-precision floating-point index table
db_idx_long_double_find_primary
Find a table row in a secondary quadruple-precision floating-point index table by primary key
db_idx_long_double_find_secondary
Find a table row in a secondary quadruple-precision floating-point index table by secondary key
db_idx_long_double_lowerbound
Find the table row in a secondary quadruple-precision floating-point index table that matches the lowerbound condition for a given secondary key The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key
db_idx_long_double_next
Find the table row following the referenced table row in a secondary quadruple-precision floating-point index table
db_idx_long_double_previous
Find the table row preceding the referenced table row in a secondary quadruple-precision floating-point index table
db_idx_long_double_remove
Remove a table row from a secondary quadruple-precision floating-point index table
db_idx_long_double_store
Store an association of a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table
db_idx_long_double_update
Update an association for a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table
db_idx_long_double_upperbound
Find the table row in a secondary quadruple-precision floating-point index table that matches the upperbound condition for a given secondary key The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key
db_lowerbound_i64
Find the table row in a primary 64-bit integer index table that matches the lowerbound condition for a given primary key The table row that matches the lowerbound condition is the first table row in the table with the lowest primary key that is >= the given key
db_next_i64
Find the table row following the referenced table row in a primary 64-bit integer index table
db_previous_i64
Find the table row preceding the referenced table row in a primary 64-bit integer index table
db_remove_i64
Remove a record from a primary 64-bit integer index table
db_store_i64
Store a record in a primary 64-bit integer index table
db_update_i64
Update a record in a primary 64-bit integer index table
db_upperbound_i64
Find the table row in a primary 64-bit integer index table that matches the upperbound condition for a given primary key The table row that matches the upperbound condition is the first table row in the table with the lowest primary key that is > the given key
eosio_assert
Aborts processing of this action and unwinds all pending changes if the test condition is true
eosio_assert_code
Aborts processing of this action and unwinds all pending changes if the test condition is true
eosio_assert_message
Aborts processing of this action and unwinds all pending changes if the test condition is true
eosio_exit
This method will abort execution of wasm without failing the contract. This is used to bypass all cleanup / destructors that would normally be called.
expiration
Gets the expiration of the currently executing transaction.
get_account_creation_time
Returns the creation time of an account
get_action
Retrieves the indicated action from the active transaction.
get_active_producers
Gets the set of active producers.
get_blockchain_parameters_packed
Retrieve the blolckchain parameters
get_context_free_data
Retrieve the signed_transaction.context_free_data[index].
get_permission_last_used
Returns the last used time of a permission
get_resource_limits
Get the resource limits of an account
get_sender
Return name of account that sent current inline action
has_auth
Verifies that name has auth.
is_account
Verifies that @ref name is an existing account.
is_feature_activated
Check if specified protocol feature has been activated
is_privileged
Check if an account is privileged
preactivate_feature
Pre-activate protocol feature
printdf
Prints value as double-precision floating point number
printhex
Prints hexidecimal data of length datalen
printi
Prints value as a 64 bit signed integer
printi128
Prints value as a 128 bit signed integer
printn
Prints a 64 bit names as base32 encoded string
printqf
Prints value as quadruple-precision floating point number
prints
Prints string
prints_l
Prints string up to given length
printsf
Prints value as single-precision floating point number
printui
Prints value as a 64 bit unsigned integer
printui128
Prints value as a 128 bit unsigned integer
publication_time
Returns the time in microseconds from 1970 of the publication_time @brief Get the publication time @return the time in microseconds from 1970 of the publication_time
read_action_data
Copy up to length bytes of current action data to the specified location
read_transaction
Access a copy of the currently executing transaction.
recover_key
Calculates the public key used for a given signature and hash used to create a message.
require_auth
Verifies that name exists in the set of provided auths on a action. Throws if not found.
require_auth2
Verifies that name exists in the set of provided auths on a action. Throws if not found.
require_recipient
Add the specified account to set of accounts to be notified
ripemd160
Hashes data using ripemod160 and stores result in memory pointed to by hash.
send_context_free_inline
/function Send an inline context free action in the context of this action’s parent transaction
send_deferred
Sends a deferred transaction.
send_inline
Send an inline action in the context of this action’s parent transaction
set_blockchain_parameters_packed
Set the blockchain parameters
set_privileged
Set the privileged status of an account
set_proposed_producers
Proposes a schedule change
set_resource_limits
Set the resource limits of an account
sha1
Hashes data using sha1 and stores result in memory pointed to by hash.
sha256
Hashes data using sha256 and stores result in memory pointed to by hash.
sha512
Hashes data using sha512 and stores result in memory pointed to by hash.
tapos_block_num
Gets the block number used for TAPOS on the currently executing transaction.
tapos_block_prefix
Gets the block prefix used for TAPOS on the currently executing transaction.
transaction_size
Gets the size of the currently executing transaction.

Type Aliases§

c_char
c_int
capi_name
int128_t
uint128_t