Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoe committed Oct 5, 2023
0 parents commit c503cd5
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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](https://github.com/mozilla/cbindgen/).

An example implementation in Go can be found [here](https://github.com/iotaledger/wasp-wallet-sdk/blob/main/wrapper.go).

# 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`.

0 comments on commit c503cd5

Please sign in to comment.