Skip to content

Contains wrapper code for creating proper native bindings to the IOTA SDK.

Notifications You must be signed in to change notification settings

iotaledger/iota-sdk-native-bindings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IOTA SDK Native

TODO

This binding wraps the IOTA SDK into a native, shared library.

It can be referenced by other languages such as Go, C/C++ or C#.

It exports the following functions:

init_logger
binding_get_last_error

call_client_method
call_secret_manager_method
call_utils_method
call_wallet_method

create_client
create_secret_manager
create_wallet
listen_wallet

destroy_client
destroy_secret_manager
destroy_string
destroy_wallet

get_client_from_wallet
get_secret_manager_from_wallet

Generated C/C++ headers can be found under bindings/native/headers.

Headers can be regenerated by running bindings/native/bindgen.sh. This requires cbindgen.

An example implementation in Go can be found here.

Usage

All strings need to be null terminated.

All strings coming from the library need to be free'd by calling destroy_string after receiving and copying them.

Any function that either returns a NULL pointer or false might have catched an error.

This error can be obtained via get_last_error.