summaryrefslogtreecommitdiff
path: root/impls/monero.rs/src
diff options
context:
space:
mode:
Diffstat (limited to 'impls/monero.rs/src')
-rw-r--r--impls/monero.rs/src/bindings.rs2732
-rw-r--r--impls/monero.rs/src/lib.rs223
-rw-r--r--impls/monero.rs/src/main.rs25
3 files changed, 2980 insertions, 0 deletions
diff --git a/impls/monero.rs/src/bindings.rs b/impls/monero.rs/src/bindings.rs
new file mode 100644
index 0000000..6ef0c8f
--- /dev/null
+++ b/impls/monero.rs/src/bindings.rs
@@ -0,0 +1,2732 @@
+/* automatically generated by rust-bindgen 0.70.1 */
+
+pub const _STDINT_H: u32 = 1;
+pub const _FEATURES_H: u32 = 1;
+pub const _DEFAULT_SOURCE: u32 = 1;
+pub const __GLIBC_USE_ISOC2X: u32 = 0;
+pub const __USE_ISOC11: u32 = 1;
+pub const __USE_ISOC99: u32 = 1;
+pub const __USE_ISOC95: u32 = 1;
+pub const __USE_POSIX_IMPLICITLY: u32 = 1;
+pub const _POSIX_SOURCE: u32 = 1;
+pub const _POSIX_C_SOURCE: u32 = 200809;
+pub const __USE_POSIX: u32 = 1;
+pub const __USE_POSIX2: u32 = 1;
+pub const __USE_POSIX199309: u32 = 1;
+pub const __USE_POSIX199506: u32 = 1;
+pub const __USE_XOPEN2K: u32 = 1;
+pub const __USE_XOPEN2K8: u32 = 1;
+pub const _ATFILE_SOURCE: u32 = 1;
+pub const __USE_MISC: u32 = 1;
+pub const __USE_ATFILE: u32 = 1;
+pub const __USE_FORTIFY_LEVEL: u32 = 0;
+pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
+pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
+pub const _STDC_PREDEF_H: u32 = 1;
+pub const __STDC_IEC_559__: u32 = 1;
+pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
+pub const __STDC_ISO_10646__: u32 = 201706;
+pub const __GNU_LIBRARY__: u32 = 6;
+pub const __GLIBC__: u32 = 2;
+pub const __GLIBC_MINOR__: u32 = 31;
+pub const _SYS_CDEFS_H: u32 = 1;
+pub const __glibc_c99_flexarr_available: u32 = 1;
+pub const __WORDSIZE: u32 = 64;
+pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
+pub const __SYSCALL_WORDSIZE: u32 = 64;
+pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
+pub const __HAVE_GENERIC_SELECTION: u32 = 1;
+pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
+pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
+pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
+pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
+pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
+pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
+pub const _BITS_TYPES_H: u32 = 1;
+pub const __TIMESIZE: u32 = 64;
+pub const _BITS_TYPESIZES_H: u32 = 1;
+pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
+pub const __INO_T_MATCHES_INO64_T: u32 = 1;
+pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
+pub const __STATFS_MATCHES_STATFS64: u32 = 1;
+pub const __FD_SETSIZE: u32 = 1024;
+pub const _BITS_TIME64_H: u32 = 1;
+pub const _BITS_WCHAR_H: u32 = 1;
+pub const _BITS_STDINT_INTN_H: u32 = 1;
+pub const _BITS_STDINT_UINTN_H: u32 = 1;
+pub const INT8_MIN: i32 = -128;
+pub const INT16_MIN: i32 = -32768;
+pub const INT32_MIN: i32 = -2147483648;
+pub const INT8_MAX: u32 = 127;
+pub const INT16_MAX: u32 = 32767;
+pub const INT32_MAX: u32 = 2147483647;
+pub const UINT8_MAX: u32 = 255;
+pub const UINT16_MAX: u32 = 65535;
+pub const UINT32_MAX: u32 = 4294967295;
+pub const INT_LEAST8_MIN: i32 = -128;
+pub const INT_LEAST16_MIN: i32 = -32768;
+pub const INT_LEAST32_MIN: i32 = -2147483648;
+pub const INT_LEAST8_MAX: u32 = 127;
+pub const INT_LEAST16_MAX: u32 = 32767;
+pub const INT_LEAST32_MAX: u32 = 2147483647;
+pub const UINT_LEAST8_MAX: u32 = 255;
+pub const UINT_LEAST16_MAX: u32 = 65535;
+pub const UINT_LEAST32_MAX: u32 = 4294967295;
+pub const INT_FAST8_MIN: i32 = -128;
+pub const INT_FAST16_MIN: i64 = -9223372036854775808;
+pub const INT_FAST32_MIN: i64 = -9223372036854775808;
+pub const INT_FAST8_MAX: u32 = 127;
+pub const INT_FAST16_MAX: u64 = 9223372036854775807;
+pub const INT_FAST32_MAX: u64 = 9223372036854775807;
+pub const UINT_FAST8_MAX: u32 = 255;
+pub const UINT_FAST16_MAX: i32 = -1;
+pub const UINT_FAST32_MAX: i32 = -1;
+pub const INTPTR_MIN: i64 = -9223372036854775808;
+pub const INTPTR_MAX: u64 = 9223372036854775807;
+pub const UINTPTR_MAX: i32 = -1;
+pub const PTRDIFF_MIN: i64 = -9223372036854775808;
+pub const PTRDIFF_MAX: u64 = 9223372036854775807;
+pub const SIG_ATOMIC_MIN: i32 = -2147483648;
+pub const SIG_ATOMIC_MAX: u32 = 2147483647;
+pub const SIZE_MAX: i32 = -1;
+pub const WINT_MIN: u32 = 0;
+pub const WINT_MAX: u32 = 4294967295;
+pub const true_: u32 = 1;
+pub const false_: u32 = 0;
+pub const __bool_true_false_are_defined: u32 = 1;
+pub const _UNISTD_H: u32 = 1;
+pub const _POSIX_VERSION: u32 = 200809;
+pub const __POSIX2_THIS_VERSION: u32 = 200809;
+pub const _POSIX2_VERSION: u32 = 200809;
+pub const _POSIX2_C_VERSION: u32 = 200809;
+pub const _POSIX2_C_BIND: u32 = 200809;
+pub const _POSIX2_C_DEV: u32 = 200809;
+pub const _POSIX2_SW_DEV: u32 = 200809;
+pub const _POSIX2_LOCALEDEF: u32 = 200809;
+pub const _XOPEN_VERSION: u32 = 700;
+pub const _XOPEN_XCU_VERSION: u32 = 4;
+pub const _XOPEN_XPG2: u32 = 1;
+pub const _XOPEN_XPG3: u32 = 1;
+pub const _XOPEN_XPG4: u32 = 1;
+pub const _XOPEN_UNIX: u32 = 1;
+pub const _XOPEN_ENH_I18N: u32 = 1;
+pub const _XOPEN_LEGACY: u32 = 1;
+pub const _BITS_POSIX_OPT_H: u32 = 1;
+pub const _POSIX_JOB_CONTROL: u32 = 1;
+pub const _POSIX_SAVED_IDS: u32 = 1;
+pub const _POSIX_PRIORITY_SCHEDULING: u32 = 200809;
+pub const _POSIX_SYNCHRONIZED_IO: u32 = 200809;
+pub const _POSIX_FSYNC: u32 = 200809;
+pub const _POSIX_MAPPED_FILES: u32 = 200809;
+pub const _POSIX_MEMLOCK: u32 = 200809;
+pub const _POSIX_MEMLOCK_RANGE: u32 = 200809;
+pub const _POSIX_MEMORY_PROTECTION: u32 = 200809;
+pub const _POSIX_CHOWN_RESTRICTED: u32 = 0;
+pub const _POSIX_VDISABLE: u8 = 0u8;
+pub const _POSIX_NO_TRUNC: u32 = 1;
+pub const _XOPEN_REALTIME: u32 = 1;
+pub const _XOPEN_REALTIME_THREADS: u32 = 1;
+pub const _XOPEN_SHM: u32 = 1;
+pub const _POSIX_THREADS: u32 = 200809;
+pub const _POSIX_REENTRANT_FUNCTIONS: u32 = 1;
+pub const _POSIX_THREAD_SAFE_FUNCTIONS: u32 = 200809;
+pub const _POSIX_THREAD_PRIORITY_SCHEDULING: u32 = 200809;
+pub const _POSIX_THREAD_ATTR_STACKSIZE: u32 = 200809;
+pub const _POSIX_THREAD_ATTR_STACKADDR: u32 = 200809;
+pub const _POSIX_THREAD_PRIO_INHERIT: u32 = 200809;
+pub const _POSIX_THREAD_PRIO_PROTECT: u32 = 200809;
+pub const _POSIX_THREAD_ROBUST_PRIO_INHERIT: u32 = 200809;
+pub const _POSIX_THREAD_ROBUST_PRIO_PROTECT: i32 = -1;
+pub const _POSIX_SEMAPHORES: u32 = 200809;
+pub const _POSIX_REALTIME_SIGNALS: u32 = 200809;
+pub const _POSIX_ASYNCHRONOUS_IO: u32 = 200809;
+pub const _POSIX_ASYNC_IO: u32 = 1;
+pub const _LFS_ASYNCHRONOUS_IO: u32 = 1;
+pub const _POSIX_PRIORITIZED_IO: u32 = 200809;
+pub const _LFS64_ASYNCHRONOUS_IO: u32 = 1;
+pub const _LFS_LARGEFILE: u32 = 1;
+pub const _LFS64_LARGEFILE: u32 = 1;
+pub const _LFS64_STDIO: u32 = 1;
+pub const _POSIX_SHARED_MEMORY_OBJECTS: u32 = 200809;
+pub const _POSIX_CPUTIME: u32 = 0;
+pub const _POSIX_THREAD_CPUTIME: u32 = 0;
+pub const _POSIX_REGEXP: u32 = 1;
+pub const _POSIX_READER_WRITER_LOCKS: u32 = 200809;
+pub const _POSIX_SHELL: u32 = 1;
+pub const _POSIX_TIMEOUTS: u32 = 200809;
+pub const _POSIX_SPIN_LOCKS: u32 = 200809;
+pub const _POSIX_SPAWN: u32 = 200809;
+pub const _POSIX_TIMERS: u32 = 200809;
+pub const _POSIX_BARRIERS: u32 = 200809;
+pub const _POSIX_MESSAGE_PASSING: u32 = 200809;
+pub const _POSIX_THREAD_PROCESS_SHARED: u32 = 200809;
+pub const _POSIX_MONOTONIC_CLOCK: u32 = 0;
+pub const _POSIX_CLOCK_SELECTION: u32 = 200809;
+pub const _POSIX_ADVISORY_INFO: u32 = 200809;
+pub const _POSIX_IPV6: u32 = 200809;
+pub const _POSIX_RAW_SOCKETS: u32 = 200809;
+pub const _POSIX2_CHAR_TERM: u32 = 200809;
+pub const _POSIX_SPORADIC_SERVER: i32 = -1;
+pub const _POSIX_THREAD_SPORADIC_SERVER: i32 = -1;
+pub const _POSIX_TRACE: i32 = -1;
+pub const _POSIX_TRACE_EVENT_FILTER: i32 = -1;
+pub const _POSIX_TRACE_INHERIT: i32 = -1;
+pub const _POSIX_TRACE_LOG: i32 = -1;
+pub const _POSIX_TYPED_MEMORY_OBJECTS: i32 = -1;
+pub const _POSIX_V7_LPBIG_OFFBIG: i32 = -1;
+pub const _POSIX_V6_LPBIG_OFFBIG: i32 = -1;
+pub const _XBS5_LPBIG_OFFBIG: i32 = -1;
+pub const _POSIX_V7_LP64_OFF64: u32 = 1;
+pub const _POSIX_V6_LP64_OFF64: u32 = 1;
+pub const _XBS5_LP64_OFF64: u32 = 1;
+pub const __ILP32_OFF32_CFLAGS: &[u8; 5] = b"-m32\0";
+pub const __ILP32_OFF32_LDFLAGS: &[u8; 5] = b"-m32\0";
+pub const __ILP32_OFFBIG_CFLAGS: &[u8; 48] = b"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\0";
+pub const __ILP32_OFFBIG_LDFLAGS: &[u8; 5] = b"-m32\0";
+pub const __LP64_OFF64_CFLAGS: &[u8; 5] = b"-m64\0";
+pub const __LP64_OFF64_LDFLAGS: &[u8; 5] = b"-m64\0";
+pub const STDIN_FILENO: u32 = 0;
+pub const STDOUT_FILENO: u32 = 1;
+pub const STDERR_FILENO: u32 = 2;
+pub const R_OK: u32 = 4;
+pub const W_OK: u32 = 2;
+pub const X_OK: u32 = 1;
+pub const F_OK: u32 = 0;
+pub const SEEK_SET: u32 = 0;
+pub const SEEK_CUR: u32 = 1;
+pub const SEEK_END: u32 = 2;
+pub const L_SET: u32 = 0;
+pub const L_INCR: u32 = 1;
+pub const L_XTND: u32 = 2;
+pub const _GETOPT_POSIX_H: u32 = 1;
+pub const _GETOPT_CORE_H: u32 = 1;
+pub const F_ULOCK: u32 = 0;
+pub const F_LOCK: u32 = 1;
+pub const F_TLOCK: u32 = 2;
+pub const F_TEST: u32 = 3;
+pub type __u_char = ::std::os::raw::c_uchar;
+pub type __u_short = ::std::os::raw::c_ushort;
+pub type __u_int = ::std::os::raw::c_uint;
+pub type __u_long = ::std::os::raw::c_ulong;
+pub type __int8_t = ::std::os::raw::c_schar;
+pub type __uint8_t = ::std::os::raw::c_uchar;
+pub type __int16_t = ::std::os::raw::c_short;
+pub type __uint16_t = ::std::os::raw::c_ushort;
+pub type __int32_t = ::std::os::raw::c_int;
+pub type __uint32_t = ::std::os::raw::c_uint;
+pub type __int64_t = ::std::os::raw::c_long;
+pub type __uint64_t = ::std::os::raw::c_ulong;
+pub type __int_least8_t = __int8_t;
+pub type __uint_least8_t = __uint8_t;
+pub type __int_least16_t = __int16_t;
+pub type __uint_least16_t = __uint16_t;
+pub type __int_least32_t = __int32_t;
+pub type __uint_least32_t = __uint32_t;
+pub type __int_least64_t = __int64_t;
+pub type __uint_least64_t = __uint64_t;
+pub type __quad_t = ::std::os::raw::c_long;
+pub type __u_quad_t = ::std::os::raw::c_ulong;
+pub type __intmax_t = ::std::os::raw::c_long;
+pub type __uintmax_t = ::std::os::raw::c_ulong;
+pub type __dev_t = ::std::os::raw::c_ulong;
+pub type __uid_t = ::std::os::raw::c_uint;
+pub type __gid_t = ::std::os::raw::c_uint;
+pub type __ino_t = ::std::os::raw::c_ulong;
+pub type __ino64_t = ::std::os::raw::c_ulong;
+pub type __mode_t = ::std::os::raw::c_uint;
+pub type __nlink_t = ::std::os::raw::c_ulong;
+pub type __off_t = ::std::os::raw::c_long;
+pub type __off64_t = ::std::os::raw::c_long;
+pub type __pid_t = ::std::os::raw::c_int;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __fsid_t {
+ pub __val: [::std::os::raw::c_int; 2usize],
+}
+#[allow(clippy::unnecessary_operation, clippy::identity_op)]
+const _: () = {
+ ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize];
+ ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize];
+ ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize];
+};
+pub type __clock_t = ::std::os::raw::c_long;
+pub type __rlim_t = ::std::os::raw::c_ulong;
+pub type __rlim64_t = ::std::os::raw::c_ulong;
+pub type __id_t = ::std::os::raw::c_uint;
+pub type __time_t = ::std::os::raw::c_long;
+pub type __useconds_t = ::std::os::raw::c_uint;
+pub type __suseconds_t = ::std::os::raw::c_long;
+pub type __daddr_t = ::std::os::raw::c_int;
+pub type __key_t = ::std::os::raw::c_int;
+pub type __clockid_t = ::std::os::raw::c_int;
+pub type __timer_t = *mut ::std::os::raw::c_void;
+pub type __blksize_t = ::std::os::raw::c_long;
+pub type __blkcnt_t = ::std::os::raw::c_long;
+pub type __blkcnt64_t = ::std::os::raw::c_long;
+pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
+pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
+pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
+pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
+pub type __fsword_t = ::std::os::raw::c_long;
+pub type __ssize_t = ::std::os::raw::c_long;
+pub type __syscall_slong_t = ::std::os::raw::c_long;
+pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
+pub type __loff_t = __off64_t;
+pub type __caddr_t = *mut ::std::os::raw::c_char;
+pub type __intptr_t = ::std::os::raw::c_long;
+pub type __socklen_t = ::std::os::raw::c_uint;
+pub type __sig_atomic_t = ::std::os::raw::c_int;
+pub type int_least8_t = __int_least8_t;
+pub type int_least16_t = __int_least16_t;
+pub type int_least32_t = __int_least32_t;
+pub type int_least64_t = __int_least64_t;
+pub type uint_least8_t = __uint_least8_t;
+pub type uint_least16_t = __uint_least16_t;
+pub type uint_least32_t = __uint_least32_t;
+pub type uint_least64_t = __uint_least64_t;
+pub type int_fast8_t = ::std::os::raw::c_schar;
+pub type int_fast16_t = ::std::os::raw::c_long;
+pub type int_fast32_t = ::std::os::raw::c_long;
+pub type int_fast64_t = ::std::os::raw::c_long;
+pub type uint_fast8_t = ::std::os::raw::c_uchar;
+pub type uint_fast16_t = ::std::os::raw::c_ulong;
+pub type uint_fast32_t = ::std::os::raw::c_ulong;
+pub type uint_fast64_t = ::std::os::raw::c_ulong;
+pub type intmax_t = __intmax_t;
+pub type uintmax_t = __uintmax_t;
+pub type wchar_t = ::std::os::raw::c_int;
+#[repr(C)]
+#[repr(align(16))]
+#[derive(Debug, Copy, Clone)]
+pub struct max_align_t {
+ pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
+ pub __bindgen_padding_0: u64,
+ pub __clang_max_align_nonce2: u128,
+}
+#[allow(clippy::unnecessary_operation, clippy::identity_op)]
+const _: () = {
+ ["Size of max_align_t"][::std::mem::size_of::<max_align_t>() - 32usize];
+ ["Alignment of max_align_t"][::std::mem::align_of::<max_align_t>() - 16usize];
+ ["Offset of field: max_align_t::__clang_max_align_nonce1"]
+ [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
+ ["Offset of field: max_align_t::__clang_max_align_nonce2"]
+ [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
+};
+pub type gid_t = __gid_t;
+pub type uid_t = __uid_t;
+pub type off_t = __off_t;
+pub type useconds_t = __useconds_t;
+pub type pid_t = __pid_t;
+pub type socklen_t = __socklen_t;
+extern "C" {
+ pub fn access(
+ __name: *const ::std::os::raw::c_char,
+ __type: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn faccessat(
+ __fd: ::std::os::raw::c_int,
+ __file: *const ::std::os::raw::c_char,
+ __type: ::std::os::raw::c_int,
+ __flag: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn lseek(
+ __fd: ::std::os::raw::c_int,
+ __offset: __off_t,
+ __whence: ::std::os::raw::c_int,
+ ) -> __off_t;
+}
+extern "C" {
+ pub fn close(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn read(
+ __fd: ::std::os::raw::c_int,
+ __buf: *mut ::std::os::raw::c_void,
+ __nbytes: usize,
+ ) -> isize;
+}
+extern "C" {
+ pub fn write(
+ __fd: ::std::os::raw::c_int,
+ __buf: *const ::std::os::raw::c_void,
+ __n: usize,
+ ) -> isize;
+}
+extern "C" {
+ pub fn pread(
+ __fd: ::std::os::raw::c_int,
+ __buf: *mut ::std::os::raw::c_void,
+ __nbytes: usize,
+ __offset: __off_t,
+ ) -> isize;
+}
+extern "C" {
+ pub fn pwrite(
+ __fd: ::std::os::raw::c_int,
+ __buf: *const ::std::os::raw::c_void,
+ __n: usize,
+ __offset: __off_t,
+ ) -> isize;
+}
+extern "C" {
+ pub fn pipe(__pipedes: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn alarm(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint;
+}
+extern "C" {
+ pub fn sleep(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint;
+}
+extern "C" {
+ pub fn ualarm(__value: __useconds_t, __interval: __useconds_t) -> __useconds_t;
+}
+extern "C" {
+ pub fn usleep(__useconds: __useconds_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn pause() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn chown(
+ __file: *const ::std::os::raw::c_char,
+ __owner: __uid_t,
+ __group: __gid_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fchown(
+ __fd: ::std::os::raw::c_int,
+ __owner: __uid_t,
+ __group: __gid_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn lchown(
+ __file: *const ::std::os::raw::c_char,
+ __owner: __uid_t,
+ __group: __gid_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fchownat(
+ __fd: ::std::os::raw::c_int,
+ __file: *const ::std::os::raw::c_char,
+ __owner: __uid_t,
+ __group: __gid_t,
+ __flag: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn chdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fchdir(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getcwd(__buf: *mut ::std::os::raw::c_char, __size: usize)
+ -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn getwd(__buf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn dup(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn dup2(__fd: ::std::os::raw::c_int, __fd2: ::std::os::raw::c_int)
+ -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub static mut __environ: *mut *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn execve(
+ __path: *const ::std::os::raw::c_char,
+ __argv: *const *mut ::std::os::raw::c_char,
+ __envp: *const *mut ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fexecve(
+ __fd: ::std::os::raw::c_int,
+ __argv: *const *mut ::std::os::raw::c_char,
+ __envp: *const *mut ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn execv(
+ __path: *const ::std::os::raw::c_char,
+ __argv: *const *mut ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn execle(
+ __path: *const ::std::os::raw::c_char,
+ __arg: *const ::std::os::raw::c_char,
+ ...
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn execl(
+ __path: *const ::std::os::raw::c_char,
+ __arg: *const ::std::os::raw::c_char,
+ ...
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn execvp(
+ __file: *const ::std::os::raw::c_char,
+ __argv: *const *mut ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn execlp(
+ __file: *const ::std::os::raw::c_char,
+ __arg: *const ::std::os::raw::c_char,
+ ...
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn nice(__inc: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn _exit(__status: ::std::os::raw::c_int) -> !;
+}
+pub const _PC_LINK_MAX: _bindgen_ty_1 = 0;
+pub const _PC_MAX_CANON: _bindgen_ty_1 = 1;
+pub const _PC_MAX_INPUT: _bindgen_ty_1 = 2;
+pub const _PC_NAME_MAX: _bindgen_ty_1 = 3;
+pub const _PC_PATH_MAX: _bindgen_ty_1 = 4;
+pub const _PC_PIPE_BUF: _bindgen_ty_1 = 5;
+pub const _PC_CHOWN_RESTRICTED: _bindgen_ty_1 = 6;
+pub const _PC_NO_TRUNC: _bindgen_ty_1 = 7;
+pub const _PC_VDISABLE: _bindgen_ty_1 = 8;
+pub const _PC_SYNC_IO: _bindgen_ty_1 = 9;
+pub const _PC_ASYNC_IO: _bindgen_ty_1 = 10;
+pub const _PC_PRIO_IO: _bindgen_ty_1 = 11;
+pub const _PC_SOCK_MAXBUF: _bindgen_ty_1 = 12;
+pub const _PC_FILESIZEBITS: _bindgen_ty_1 = 13;
+pub const _PC_REC_INCR_XFER_SIZE: _bindgen_ty_1 = 14;
+pub const _PC_REC_MAX_XFER_SIZE: _bindgen_ty_1 = 15;
+pub const _PC_REC_MIN_XFER_SIZE: _bindgen_ty_1 = 16;
+pub const _PC_REC_XFER_ALIGN: _bindgen_ty_1 = 17;
+pub const _PC_ALLOC_SIZE_MIN: _bindgen_ty_1 = 18;
+pub const _PC_SYMLINK_MAX: _bindgen_ty_1 = 19;
+pub const _PC_2_SYMLINKS: _bindgen_ty_1 = 20;
+pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
+pub const _SC_ARG_MAX: _bindgen_ty_2 = 0;
+pub const _SC_CHILD_MAX: _bindgen_ty_2 = 1;
+pub const _SC_CLK_TCK: _bindgen_ty_2 = 2;
+pub const _SC_NGROUPS_MAX: _bindgen_ty_2 = 3;
+pub const _SC_OPEN_MAX: _bindgen_ty_2 = 4;
+pub const _SC_STREAM_MAX: _bindgen_ty_2 = 5;
+pub const _SC_TZNAME_MAX: _bindgen_ty_2 = 6;
+pub const _SC_JOB_CONTROL: _bindgen_ty_2 = 7;
+pub const _SC_SAVED_IDS: _bindgen_ty_2 = 8;
+pub const _SC_REALTIME_SIGNALS: _bindgen_ty_2 = 9;
+pub const _SC_PRIORITY_SCHEDULING: _bindgen_ty_2 = 10;
+pub const _SC_TIMERS: _bindgen_ty_2 = 11;
+pub const _SC_ASYNCHRONOUS_IO: _bindgen_ty_2 = 12;
+pub const _SC_PRIORITIZED_IO: _bindgen_ty_2 = 13;
+pub const _SC_SYNCHRONIZED_IO: _bindgen_ty_2 = 14;
+pub const _SC_FSYNC: _bindgen_ty_2 = 15;
+pub const _SC_MAPPED_FILES: _bindgen_ty_2 = 16;
+pub const _SC_MEMLOCK: _bindgen_ty_2 = 17;
+pub const _SC_MEMLOCK_RANGE: _bindgen_ty_2 = 18;
+pub const _SC_MEMORY_PROTECTION: _bindgen_ty_2 = 19;
+pub const _SC_MESSAGE_PASSING: _bindgen_ty_2 = 20;
+pub const _SC_SEMAPHORES: _bindgen_ty_2 = 21;
+pub const _SC_SHARED_MEMORY_OBJECTS: _bindgen_ty_2 = 22;
+pub const _SC_AIO_LISTIO_MAX: _bindgen_ty_2 = 23;
+pub const _SC_AIO_MAX: _bindgen_ty_2 = 24;
+pub const _SC_AIO_PRIO_DELTA_MAX: _bindgen_ty_2 = 25;
+pub const _SC_DELAYTIMER_MAX: _bindgen_ty_2 = 26;
+pub const _SC_MQ_OPEN_MAX: _bindgen_ty_2 = 27;
+pub const _SC_MQ_PRIO_MAX: _bindgen_ty_2 = 28;
+pub const _SC_VERSION: _bindgen_ty_2 = 29;
+pub const _SC_PAGESIZE: _bindgen_ty_2 = 30;
+pub const _SC_RTSIG_MAX: _bindgen_ty_2 = 31;
+pub const _SC_SEM_NSEMS_MAX: _bindgen_ty_2 = 32;
+pub const _SC_SEM_VALUE_MAX: _bindgen_ty_2 = 33;
+pub const _SC_SIGQUEUE_MAX: _bindgen_ty_2 = 34;
+pub const _SC_TIMER_MAX: _bindgen_ty_2 = 35;
+pub const _SC_BC_BASE_MAX: _bindgen_ty_2 = 36;
+pub const _SC_BC_DIM_MAX: _bindgen_ty_2 = 37;
+pub const _SC_BC_SCALE_MAX: _bindgen_ty_2 = 38;
+pub const _SC_BC_STRING_MAX: _bindgen_ty_2 = 39;
+pub const _SC_COLL_WEIGHTS_MAX: _bindgen_ty_2 = 40;
+pub const _SC_EQUIV_CLASS_MAX: _bindgen_ty_2 = 41;
+pub const _SC_EXPR_NEST_MAX: _bindgen_ty_2 = 42;
+pub const _SC_LINE_MAX: _bindgen_ty_2 = 43;
+pub const _SC_RE_DUP_MAX: _bindgen_ty_2 = 44;
+pub const _SC_CHARCLASS_NAME_MAX: _bindgen_ty_2 = 45;
+pub const _SC_2_VERSION: _bindgen_ty_2 = 46;
+pub const _SC_2_C_BIND: _bindgen_ty_2 = 47;
+pub const _SC_2_C_DEV: _bindgen_ty_2 = 48;
+pub const _SC_2_FORT_DEV: _bindgen_ty_2 = 49;
+pub const _SC_2_FORT_RUN: _bindgen_ty_2 = 50;
+pub const _SC_2_SW_DEV: _bindgen_ty_2 = 51;
+pub const _SC_2_LOCALEDEF: _bindgen_ty_2 = 52;
+pub const _SC_PII: _bindgen_ty_2 = 53;
+pub const _SC_PII_XTI: _bindgen_ty_2 = 54;
+pub const _SC_PII_SOCKET: _bindgen_ty_2 = 55;
+pub const _SC_PII_INTERNET: _bindgen_ty_2 = 56;
+pub const _SC_PII_OSI: _bindgen_ty_2 = 57;
+pub const _SC_POLL: _bindgen_ty_2 = 58;
+pub const _SC_SELECT: _bindgen_ty_2 = 59;
+pub const _SC_UIO_MAXIOV: _bindgen_ty_2 = 60;
+pub const _SC_IOV_MAX: _bindgen_ty_2 = 60;
+pub const _SC_PII_INTERNET_STREAM: _bindgen_ty_2 = 61;
+pub const _SC_PII_INTERNET_DGRAM: _bindgen_ty_2 = 62;
+pub const _SC_PII_OSI_COTS: _bindgen_ty_2 = 63;
+pub const _SC_PII_OSI_CLTS: _bindgen_ty_2 = 64;
+pub const _SC_PII_OSI_M: _bindgen_ty_2 = 65;
+pub const _SC_T_IOV_MAX: _bindgen_ty_2 = 66;
+pub const _SC_THREADS: _bindgen_ty_2 = 67;
+pub const _SC_THREAD_SAFE_FUNCTIONS: _bindgen_ty_2 = 68;
+pub const _SC_GETGR_R_SIZE_MAX: _bindgen_ty_2 = 69;
+pub const _SC_GETPW_R_SIZE_MAX: _bindgen_ty_2 = 70;
+pub const _SC_LOGIN_NAME_MAX: _bindgen_ty_2 = 71;
+pub const _SC_TTY_NAME_MAX: _bindgen_ty_2 = 72;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: _bindgen_ty_2 = 73;
+pub const _SC_THREAD_KEYS_MAX: _bindgen_ty_2 = 74;
+pub const _SC_THREAD_STACK_MIN: _bindgen_ty_2 = 75;
+pub const _SC_THREAD_THREADS_MAX: _bindgen_ty_2 = 76;
+pub const _SC_THREAD_ATTR_STACKADDR: _bindgen_ty_2 = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE: _bindgen_ty_2 = 78;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: _bindgen_ty_2 = 79;
+pub const _SC_THREAD_PRIO_INHERIT: _bindgen_ty_2 = 80;
+pub const _SC_THREAD_PRIO_PROTECT: _bindgen_ty_2 = 81;
+pub const _SC_THREAD_PROCESS_SHARED: _bindgen_ty_2 = 82;
+pub const _SC_NPROCESSORS_CONF: _bindgen_ty_2 = 83;
+pub const _SC_NPROCESSORS_ONLN: _bindgen_ty_2 = 84;
+pub const _SC_PHYS_PAGES: _bindgen_ty_2 = 85;
+pub const _SC_AVPHYS_PAGES: _bindgen_ty_2 = 86;
+pub const _SC_ATEXIT_MAX: _bindgen_ty_2 = 87;
+pub const _SC_PASS_MAX: _bindgen_ty_2 = 88;
+pub const _SC_XOPEN_VERSION: _bindgen_ty_2 = 89;
+pub const _SC_XOPEN_XCU_VERSION: _bindgen_ty_2 = 90;
+pub const _SC_XOPEN_UNIX: _bindgen_ty_2 = 91;
+pub const _SC_XOPEN_CRYPT: _bindgen_ty_2 = 92;
+pub const _SC_XOPEN_ENH_I18N: _bindgen_ty_2 = 93;
+pub const _SC_XOPEN_SHM: _bindgen_ty_2 = 94;
+pub const _SC_2_CHAR_TERM: _bindgen_ty_2 = 95;
+pub const _SC_2_C_VERSION: _bindgen_ty_2 = 96;
+pub const _SC_2_UPE: _bindgen_ty_2 = 97;
+pub const _SC_XOPEN_XPG2: _bindgen_ty_2 = 98;
+pub const _SC_XOPEN_XPG3: _bindgen_ty_2 = 99;
+pub const _SC_XOPEN_XPG4: _bindgen_ty_2 = 100;
+pub const _SC_CHAR_BIT: _bindgen_ty_2 = 101;
+pub const _SC_CHAR_MAX: _bindgen_ty_2 = 102;
+pub const _SC_CHAR_MIN: _bindgen_ty_2 = 103;
+pub const _SC_INT_MAX: _bindgen_ty_2 = 104;
+pub const _SC_INT_MIN: _bindgen_ty_2 = 105;
+pub const _SC_LONG_BIT: _bindgen_ty_2 = 106;
+pub const _SC_WORD_BIT: _bindgen_ty_2 = 107;
+pub const _SC_MB_LEN_MAX: _bindgen_ty_2 = 108;
+pub const _SC_NZERO: _bindgen_ty_2 = 109;
+pub const _SC_SSIZE_MAX: _bindgen_ty_2 = 110;
+pub const _SC_SCHAR_MAX: _bindgen_ty_2 = 111;
+pub const _SC_SCHAR_MIN: _bindgen_ty_2 = 112;
+pub const _SC_SHRT_MAX: _bindgen_ty_2 = 113;
+pub const _SC_SHRT_MIN: _bindgen_ty_2 = 114;
+pub const _SC_UCHAR_MAX: _bindgen_ty_2 = 115;
+pub const _SC_UINT_MAX: _bindgen_ty_2 = 116;
+pub const _SC_ULONG_MAX: _bindgen_ty_2 = 117;
+pub const _SC_USHRT_MAX: _bindgen_ty_2 = 118;
+pub const _SC_NL_ARGMAX: _bindgen_ty_2 = 119;
+pub const _SC_NL_LANGMAX: _bindgen_ty_2 = 120;
+pub const _SC_NL_MSGMAX: _bindgen_ty_2 = 121;
+pub const _SC_NL_NMAX: _bindgen_ty_2 = 122;
+pub const _SC_NL_SETMAX: _bindgen_ty_2 = 123;
+pub const _SC_NL_TEXTMAX: _bindgen_ty_2 = 124;
+pub const _SC_XBS5_ILP32_OFF32: _bindgen_ty_2 = 125;
+pub const _SC_XBS5_ILP32_OFFBIG: _bindgen_ty_2 = 126;
+pub const _SC_XBS5_LP64_OFF64: _bindgen_ty_2 = 127;
+pub const _SC_XBS5_LPBIG_OFFBIG: _bindgen_ty_2 = 128;
+pub const _SC_XOPEN_LEGACY: _bindgen_ty_2 = 129;
+pub const _SC_XOPEN_REALTIME: _bindgen_ty_2 = 130;
+pub const _SC_XOPEN_REALTIME_THREADS: _bindgen_ty_2 = 131;
+pub const _SC_ADVISORY_INFO: _bindgen_ty_2 = 132;
+pub const _SC_BARRIERS: _bindgen_ty_2 = 133;
+pub const _SC_BASE: _bindgen_ty_2 = 134;
+pub const _SC_C_LANG_SUPPORT: _bindgen_ty_2 = 135;
+pub const _SC_C_LANG_SUPPORT_R: _bindgen_ty_2 = 136;
+pub const _SC_CLOCK_SELECTION: _bindgen_ty_2 = 137;
+pub const _SC_CPUTIME: _bindgen_ty_2 = 138;
+pub const _SC_THREAD_CPUTIME: _bindgen_ty_2 = 139;
+pub const _SC_DEVICE_IO: _bindgen_ty_2 = 140;
+pub const _SC_DEVICE_SPECIFIC: _bindgen_ty_2 = 141;
+pub const _SC_DEVICE_SPECIFIC_R: _bindgen_ty_2 = 142;
+pub const _SC_FD_MGMT: _bindgen_ty_2 = 143;
+pub const _SC_FIFO: _bindgen_ty_2 = 144;
+pub const _SC_PIPE: _bindgen_ty_2 = 145;
+pub const _SC_FILE_ATTRIBUTES: _bindgen_ty_2 = 146;
+pub const _SC_FILE_LOCKING: _bindgen_ty_2 = 147;
+pub const _SC_FILE_SYSTEM: _bindgen_ty_2 = 148;
+pub const _SC_MONOTONIC_CLOCK: _bindgen_ty_2 = 149;
+pub const _SC_MULTI_PROCESS: _bindgen_ty_2 = 150;
+pub const _SC_SINGLE_PROCESS: _bindgen_ty_2 = 151;
+pub const _SC_NETWORKING: _bindgen_ty_2 = 152;
+pub const _SC_READER_WRITER_LOCKS: _bindgen_ty_2 = 153;
+pub const _SC_SPIN_LOCKS: _bindgen_ty_2 = 154;
+pub const _SC_REGEXP: _bindgen_ty_2 = 155;
+pub const _SC_REGEX_VERSION: _bindgen_ty_2 = 156;
+pub const _SC_SHELL: _bindgen_ty_2 = 157;
+pub const _SC_SIGNALS: _bindgen_ty_2 = 158;
+pub const _SC_SPAWN: _bindgen_ty_2 = 159;
+pub const _SC_SPORADIC_SERVER: _bindgen_ty_2 = 160;
+pub const _SC_THREAD_SPORADIC_SERVER: _bindgen_ty_2 = 161;
+pub const _SC_SYSTEM_DATABASE: _bindgen_ty_2 = 162;
+pub const _SC_SYSTEM_DATABASE_R: _bindgen_ty_2 = 163;
+pub const _SC_TIMEOUTS: _bindgen_ty_2 = 164;
+pub const _SC_TYPED_MEMORY_OBJECTS: _bindgen_ty_2 = 165;
+pub const _SC_USER_GROUPS: _bindgen_ty_2 = 166;
+pub const _SC_USER_GROUPS_R: _bindgen_ty_2 = 167;
+pub const _SC_2_PBS: _bindgen_ty_2 = 168;
+pub const _SC_2_PBS_ACCOUNTING: _bindgen_ty_2 = 169;
+pub const _SC_2_PBS_LOCATE: _bindgen_ty_2 = 170;
+pub const _SC_2_PBS_MESSAGE: _bindgen_ty_2 = 171;
+pub const _SC_2_PBS_TRACK: _bindgen_ty_2 = 172;
+pub const _SC_SYMLOOP_MAX: _bindgen_ty_2 = 173;
+pub const _SC_STREAMS: _bindgen_ty_2 = 174;
+pub const _SC_2_PBS_CHECKPOINT: _bindgen_ty_2 = 175;
+pub const _SC_V6_ILP32_OFF32: _bindgen_ty_2 = 176;
+pub const _SC_V6_ILP32_OFFBIG: _bindgen_ty_2 = 177;
+pub const _SC_V6_LP64_OFF64: _bindgen_ty_2 = 178;
+pub const _SC_V6_LPBIG_OFFBIG: _bindgen_ty_2 = 179;
+pub const _SC_HOST_NAME_MAX: _bindgen_ty_2 = 180;
+pub const _SC_TRACE: _bindgen_ty_2 = 181;
+pub const _SC_TRACE_EVENT_FILTER: _bindgen_ty_2 = 182;
+pub const _SC_TRACE_INHERIT: _bindgen_ty_2 = 183;
+pub const _SC_TRACE_LOG: _bindgen_ty_2 = 184;
+pub const _SC_LEVEL1_ICACHE_SIZE: _bindgen_ty_2 = 185;
+pub const _SC_LEVEL1_ICACHE_ASSOC: _bindgen_ty_2 = 186;
+pub const _SC_LEVEL1_ICACHE_LINESIZE: _bindgen_ty_2 = 187;
+pub const _SC_LEVEL1_DCACHE_SIZE: _bindgen_ty_2 = 188;
+pub const _SC_LEVEL1_DCACHE_ASSOC: _bindgen_ty_2 = 189;
+pub const _SC_LEVEL1_DCACHE_LINESIZE: _bindgen_ty_2 = 190;
+pub const _SC_LEVEL2_CACHE_SIZE: _bindgen_ty_2 = 191;
+pub const _SC_LEVEL2_CACHE_ASSOC: _bindgen_ty_2 = 192;
+pub const _SC_LEVEL2_CACHE_LINESIZE: _bindgen_ty_2 = 193;
+pub const _SC_LEVEL3_CACHE_SIZE: _bindgen_ty_2 = 194;
+pub const _SC_LEVEL3_CACHE_ASSOC: _bindgen_ty_2 = 195;
+pub const _SC_LEVEL3_CACHE_LINESIZE: _bindgen_ty_2 = 196;
+pub const _SC_LEVEL4_CACHE_SIZE: _bindgen_ty_2 = 197;
+pub const _SC_LEVEL4_CACHE_ASSOC: _bindgen_ty_2 = 198;
+pub const _SC_LEVEL4_CACHE_LINESIZE: _bindgen_ty_2 = 199;
+pub const _SC_IPV6: _bindgen_ty_2 = 235;
+pub const _SC_RAW_SOCKETS: _bindgen_ty_2 = 236;
+pub const _SC_V7_ILP32_OFF32: _bindgen_ty_2 = 237;
+pub const _SC_V7_ILP32_OFFBIG: _bindgen_ty_2 = 238;
+pub const _SC_V7_LP64_OFF64: _bindgen_ty_2 = 239;
+pub const _SC_V7_LPBIG_OFFBIG: _bindgen_ty_2 = 240;
+pub const _SC_SS_REPL_MAX: _bindgen_ty_2 = 241;
+pub const _SC_TRACE_EVENT_NAME_MAX: _bindgen_ty_2 = 242;
+pub const _SC_TRACE_NAME_MAX: _bindgen_ty_2 = 243;
+pub const _SC_TRACE_SYS_MAX: _bindgen_ty_2 = 244;
+pub const _SC_TRACE_USER_EVENT_MAX: _bindgen_ty_2 = 245;
+pub const _SC_XOPEN_STREAMS: _bindgen_ty_2 = 246;
+pub const _SC_THREAD_ROBUST_PRIO_INHERIT: _bindgen_ty_2 = 247;
+pub const _SC_THREAD_ROBUST_PRIO_PROTECT: _bindgen_ty_2 = 248;
+pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
+pub const _CS_PATH: _bindgen_ty_3 = 0;
+pub const _CS_V6_WIDTH_RESTRICTED_ENVS: _bindgen_ty_3 = 1;
+pub const _CS_GNU_LIBC_VERSION: _bindgen_ty_3 = 2;
+pub const _CS_GNU_LIBPTHREAD_VERSION: _bindgen_ty_3 = 3;
+pub const _CS_V5_WIDTH_RESTRICTED_ENVS: _bindgen_ty_3 = 4;
+pub const _CS_V7_WIDTH_RESTRICTED_ENVS: _bindgen_ty_3 = 5;
+pub const _CS_LFS_CFLAGS: _bindgen_ty_3 = 1000;
+pub const _CS_LFS_LDFLAGS: _bindgen_ty_3 = 1001;
+pub const _CS_LFS_LIBS: _bindgen_ty_3 = 1002;
+pub const _CS_LFS_LINTFLAGS: _bindgen_ty_3 = 1003;
+pub const _CS_LFS64_CFLAGS: _bindgen_ty_3 = 1004;
+pub const _CS_LFS64_LDFLAGS: _bindgen_ty_3 = 1005;
+pub const _CS_LFS64_LIBS: _bindgen_ty_3 = 1006;
+pub const _CS_LFS64_LINTFLAGS: _bindgen_ty_3 = 1007;
+pub const _CS_XBS5_ILP32_OFF32_CFLAGS: _bindgen_ty_3 = 1100;
+pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: _bindgen_ty_3 = 1101;
+pub const _CS_XBS5_ILP32_OFF32_LIBS: _bindgen_ty_3 = 1102;
+pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: _bindgen_ty_3 = 1103;
+pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: _bindgen_ty_3 = 1104;
+pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1105;
+pub const _CS_XBS5_ILP32_OFFBIG_LIBS: _bindgen_ty_3 = 1106;
+pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1107;
+pub const _CS_XBS5_LP64_OFF64_CFLAGS: _bindgen_ty_3 = 1108;
+pub const _CS_XBS5_LP64_OFF64_LDFLAGS: _bindgen_ty_3 = 1109;
+pub const _CS_XBS5_LP64_OFF64_LIBS: _bindgen_ty_3 = 1110;
+pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: _bindgen_ty_3 = 1111;
+pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_3 = 1112;
+pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1113;
+pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: _bindgen_ty_3 = 1114;
+pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1115;
+pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: _bindgen_ty_3 = 1116;
+pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: _bindgen_ty_3 = 1117;
+pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: _bindgen_ty_3 = 1118;
+pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: _bindgen_ty_3 = 1119;
+pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: _bindgen_ty_3 = 1120;
+pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1121;
+pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: _bindgen_ty_3 = 1122;
+pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1123;
+pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: _bindgen_ty_3 = 1124;
+pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: _bindgen_ty_3 = 1125;
+pub const _CS_POSIX_V6_LP64_OFF64_LIBS: _bindgen_ty_3 = 1126;
+pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: _bindgen_ty_3 = 1127;
+pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_3 = 1128;
+pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1129;
+pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: _bindgen_ty_3 = 1130;
+pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1131;
+pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: _bindgen_ty_3 = 1132;
+pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: _bindgen_ty_3 = 1133;
+pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: _bindgen_ty_3 = 1134;
+pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: _bindgen_ty_3 = 1135;
+pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: _bindgen_ty_3 = 1136;
+pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1137;
+pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: _bindgen_ty_3 = 1138;
+pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1139;
+pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: _bindgen_ty_3 = 1140;
+pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: _bindgen_ty_3 = 1141;
+pub const _CS_POSIX_V7_LP64_OFF64_LIBS: _bindgen_ty_3 = 1142;
+pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: _bindgen_ty_3 = 1143;
+pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_3 = 1144;
+pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_3 = 1145;
+pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: _bindgen_ty_3 = 1146;
+pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_3 = 1147;
+pub const _CS_V6_ENV: _bindgen_ty_3 = 1148;
+pub const _CS_V7_ENV: _bindgen_ty_3 = 1149;
+pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
+extern "C" {
+ pub fn pathconf(
+ __path: *const ::std::os::raw::c_char,
+ __name: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_long;
+}
+extern "C" {
+ pub fn fpathconf(
+ __fd: ::std::os::raw::c_int,
+ __name: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_long;
+}
+extern "C" {
+ pub fn sysconf(__name: ::std::os::raw::c_int) -> ::std::os::raw::c_long;
+}
+extern "C" {
+ pub fn confstr(
+ __name: ::std::os::raw::c_int,
+ __buf: *mut ::std::os::raw::c_char,
+ __len: usize,
+ ) -> usize;
+}
+extern "C" {
+ pub fn getpid() -> __pid_t;
+}
+extern "C" {
+ pub fn getppid() -> __pid_t;
+}
+extern "C" {
+ pub fn getpgrp() -> __pid_t;
+}
+extern "C" {
+ pub fn __getpgid(__pid: __pid_t) -> __pid_t;
+}
+extern "C" {
+ pub fn getpgid(__pid: __pid_t) -> __pid_t;
+}
+extern "C" {
+ pub fn setpgid(__pid: __pid_t, __pgid: __pid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setpgrp() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setsid() -> __pid_t;
+}
+extern "C" {
+ pub fn getsid(__pid: __pid_t) -> __pid_t;
+}
+extern "C" {
+ pub fn getuid() -> __uid_t;
+}
+extern "C" {
+ pub fn geteuid() -> __uid_t;
+}
+extern "C" {
+ pub fn getgid() -> __gid_t;
+}
+extern "C" {
+ pub fn getegid() -> __gid_t;
+}
+extern "C" {
+ pub fn getgroups(__size: ::std::os::raw::c_int, __list: *mut __gid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setuid(__uid: __uid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setreuid(__ruid: __uid_t, __euid: __uid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn seteuid(__uid: __uid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setgid(__gid: __gid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setregid(__rgid: __gid_t, __egid: __gid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setegid(__gid: __gid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fork() -> __pid_t;
+}
+extern "C" {
+ pub fn vfork() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn ttyname(__fd: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn ttyname_r(
+ __fd: ::std::os::raw::c_int,
+ __buf: *mut ::std::os::raw::c_char,
+ __buflen: usize,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn isatty(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn ttyslot() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn link(
+ __from: *const ::std::os::raw::c_char,
+ __to: *const ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn linkat(
+ __fromfd: ::std::os::raw::c_int,
+ __from: *const ::std::os::raw::c_char,
+ __tofd: ::std::os::raw::c_int,
+ __to: *const ::std::os::raw::c_char,
+ __flags: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn symlink(
+ __from: *const ::std::os::raw::c_char,
+ __to: *const ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn readlink(
+ __path: *const ::std::os::raw::c_char,
+ __buf: *mut ::std::os::raw::c_char,
+ __len: usize,
+ ) -> isize;
+}
+extern "C" {
+ pub fn symlinkat(
+ __from: *const ::std::os::raw::c_char,
+ __tofd: ::std::os::raw::c_int,
+ __to: *const ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn readlinkat(
+ __fd: ::std::os::raw::c_int,
+ __path: *const ::std::os::raw::c_char,
+ __buf: *mut ::std::os::raw::c_char,
+ __len: usize,
+ ) -> isize;
+}
+extern "C" {
+ pub fn unlink(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn unlinkat(
+ __fd: ::std::os::raw::c_int,
+ __name: *const ::std::os::raw::c_char,
+ __flag: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn rmdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn tcgetpgrp(__fd: ::std::os::raw::c_int) -> __pid_t;
+}
+extern "C" {
+ pub fn tcsetpgrp(__fd: ::std::os::raw::c_int, __pgrp_id: __pid_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getlogin() -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn getlogin_r(
+ __name: *mut ::std::os::raw::c_char,
+ __name_len: usize,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setlogin(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub static mut optarg: *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub static mut optind: ::std::os::raw::c_int;
+}
+extern "C" {
+ pub static mut opterr: ::std::os::raw::c_int;
+}
+extern "C" {
+ pub static mut optopt: ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getopt(
+ ___argc: ::std::os::raw::c_int,
+ ___argv: *const *mut ::std::os::raw::c_char,
+ __shortopts: *const ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn gethostname(__name: *mut ::std::os::raw::c_char, __len: usize) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sethostname(
+ __name: *const ::std::os::raw::c_char,
+ __len: usize,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sethostid(__id: ::std::os::raw::c_long) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getdomainname(
+ __name: *mut ::std::os::raw::c_char,
+ __len: usize,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn setdomainname(
+ __name: *const ::std::os::raw::c_char,
+ __len: usize,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn vhangup() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn revoke(__file: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn profil(
+ __sample_buffer: *mut ::std::os::raw::c_ushort,
+ __size: usize,
+ __offset: usize,
+ __scale: ::std::os::raw::c_uint,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn acct(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getusershell() -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn endusershell();
+}
+extern "C" {
+ pub fn setusershell();
+}
+extern "C" {
+ pub fn daemon(
+ __nochdir: ::std::os::raw::c_int,
+ __noclose: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn chroot(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getpass(__prompt: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn fsync(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn gethostid() -> ::std::os::raw::c_long;
+}
+extern "C" {
+ pub fn sync();
+}
+extern "C" {
+ pub fn getpagesize() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn getdtablesize() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn truncate(
+ __file: *const ::std::os::raw::c_char,
+ __length: __off_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn ftruncate(__fd: ::std::os::raw::c_int, __length: __off_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn brk(__addr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sbrk(__delta: isize) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn syscall(__sysno: ::std::os::raw::c_long, ...) -> ::std::os::raw::c_long;
+}
+extern "C" {
+ pub fn lockf(
+ __fd: ::std::os::raw::c_int,
+ __cmd: ::std::os::raw::c_int,
+ __len: __off_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn fdatasync(__fildes: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn crypt(
+ __key: *const ::std::os::raw::c_char,
+ __salt: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn getentropy(
+ __buffer: *mut ::std::os::raw::c_void,
+ __length: usize,
+ ) -> ::std::os::raw::c_int;
+}
+pub const MONERO_wallet2_api_c_h_sha256: &[u8; 65] =
+ b"e8db0ef0324a153f5e3ecca4c0db23c54f4576e84988f04bd4f11c1142f9d7ad\0";
+pub const MONERO_wallet2_api_c_cpp_sha256 : & [u8 ; 106] = b"dca52ac9ee009fda9fb5726543a454885e61d8eb74fb33112288029ed625bec5-b089f9ee69924882c5d14dd1a6991deb05d9d1cd\0" ;
+pub const MONERO_wallet2_api_c_exp_sha256: &[u8; 65] =
+ b"c8913ac41068f67b57c9b0a3c7dd8973e3c1273b66c2ff0aadb0003931da748c\0";
+pub const NetworkType_MAINNET: ::std::os::raw::c_int = 0;
+pub const NetworkType_TESTNET: ::std::os::raw::c_int = 1;
+pub const NetworkType_STAGENET: ::std::os::raw::c_int = 2;
+pub const PendingTransactionStatus_Ok: ::std::os::raw::c_int = 0;
+pub const PendingTransactionStatus_Error: ::std::os::raw::c_int = 1;
+pub const PendingTransactionStatus_Critical: ::std::os::raw::c_int = 2;
+pub const Priority_Default: ::std::os::raw::c_int = 0;
+pub const Priority_Low: ::std::os::raw::c_int = 1;
+pub const Priority_Medium: ::std::os::raw::c_int = 2;
+pub const Priority_High: ::std::os::raw::c_int = 3;
+pub const Priority_Last: ::std::os::raw::c_int = 4;
+extern "C" {
+ pub fn MONERO_PendingTransaction_status(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_errorString(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_commit(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ filename: *const ::std::os::raw::c_char,
+ overwrite: bool,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_commitUR(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ max_fragment_length: ::std::os::raw::c_int,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_amount(pendingTx_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_dust(pendingTx_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_fee(pendingTx_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_txid(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_txCount(pendingTx_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_subaddrAccount(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_subaddrIndices(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_multisigSignData(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_signMultisigTx(pendingTx_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_signersKeys(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_PendingTransaction_hex(
+ pendingTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+pub const UnsignedTransactionStatus_Ok: ::std::os::raw::c_int = 0;
+pub const UnsignedTransactionStatus_Error: ::std::os::raw::c_int = 1;
+pub const UnsignedTransactionStatus_Critical: ::std::os::raw::c_int = 2;
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_status(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_errorString(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_amount(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_fee(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_mixin(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_confirmationMessage(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_paymentId(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_recipientAddress(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_minMixinCount(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_txCount(unsignedTx_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_sign(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ signedFileName: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_UnsignedTransaction_signUR(
+ unsignedTx_ptr: *mut ::std::os::raw::c_void,
+ max_fragment_length: ::std::os::raw::c_int,
+ ) -> *const ::std::os::raw::c_char;
+}
+pub const TransactionInfoDirection_In: ::std::os::raw::c_int = 0;
+pub const TransactionInfoDirection_Out: ::std::os::raw::c_int = 1;
+extern "C" {
+ pub fn MONERO_TransactionInfo_direction(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_isPending(txInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_isFailed(txInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_isCoinbase(txInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_amount(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_fee(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_blockHeight(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_description(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_subaddrIndex(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_subaddrAccount(txInfo_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_label(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_confirmations(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_unlockTime(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_hash(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_timestamp(txInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_paymentId(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_transfers_count(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_transfers_amount(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_TransactionInfo_transfers_address(
+ txInfo_ptr: *mut ::std::os::raw::c_void,
+ address: ::std::os::raw::c_int,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_TransactionHistory_count(
+ txHistory_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_TransactionHistory_transaction(
+ txHistory_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_TransactionHistory_transactionById(
+ txHistory_ptr: *mut ::std::os::raw::c_void,
+ id: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_TransactionHistory_refresh(txHistory_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_TransactionHistory_setTxNote(
+ txHistory_ptr: *mut ::std::os::raw::c_void,
+ txid: *const ::std::os::raw::c_char,
+ note: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_AddressBookRow_extra(
+ addressBookRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_AddressBookRow_getAddress(
+ addressBookRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_AddressBookRow_getDescription(
+ addressBookRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_AddressBookRow_getPaymentId(
+ addressBookRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_AddressBookRow_getRowId(addressBookRow_ptr: *mut ::std::os::raw::c_void)
+ -> usize;
+}
+pub const AddressBookErrorCodeStatus_Ok: ::std::os::raw::c_int = 0;
+pub const AddressBookErrorCodeGeneral_Error: ::std::os::raw::c_int = 1;
+pub const AddressBookErrorCodeInvalid_Address: ::std::os::raw::c_int = 2;
+pub const AddressBookErrorCodeInvalidPaymentId: ::std::os::raw::c_int = 3;
+extern "C" {
+ pub fn MONERO_AddressBook_getAll_size(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_getAll_byIndex(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_addRow(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ dst_addr: *const ::std::os::raw::c_char,
+ payment_id: *const ::std::os::raw::c_char,
+ description: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_deleteRow(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ rowId: usize,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_setDescription(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ rowId: usize,
+ description: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_refresh(addressBook_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_AddressBook_errorString(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_errorCode(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_AddressBook_lookupPaymentID(
+ addressBook_ptr: *mut ::std::os::raw::c_void,
+ payment_id: *const ::std::os::raw::c_char,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_blockHeight(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_hash(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_internalOutputIndex(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_globalOutputIndex(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_spent(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_frozen(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_spentHeight(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_amount(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_rct(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_keyImageKnown(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_pkIndex(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> usize;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_subaddrIndex(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_subaddrAccount(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_address(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_addressLabel(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_keyImage(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_unlockTime(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_unlocked(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_pubKey(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_coinbase(coinsInfo_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_CoinsInfo_description(
+ coinsInfo_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Coins_count(coins_ptr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Coins_coin(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Coins_getAll_size(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Coins_getAll_byIndex(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Coins_refresh(coins_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Coins_setFrozenByPublicKey(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ public_key: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Coins_setFrozen(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ );
+}
+extern "C" {
+ pub fn MONERO_Coins_thaw(coins_ptr: *mut ::std::os::raw::c_void, index: ::std::os::raw::c_int);
+}
+extern "C" {
+ pub fn MONERO_Coins_thawByPublicKey(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ public_key: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Coins_isTransferUnlocked(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ unlockTime: u64,
+ blockHeight: u64,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Coins_setDescription(
+ coins_ptr: *mut ::std::os::raw::c_void,
+ public_key: *const ::std::os::raw::c_char,
+ description: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_SubaddressRow_extra(
+ subaddressRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressRow_getAddress(
+ subaddressRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressRow_getLabel(
+ subaddressRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressRow_getRowId(subaddressRow_ptr: *mut ::std::os::raw::c_void) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Subaddress_getAll_size(
+ subaddress_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Subaddress_getAll_byIndex(
+ subaddress_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Subaddress_addRow(
+ subaddress_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Subaddress_setLabel(
+ subaddress_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ addressIndex: u32,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Subaddress_refresh(
+ subaddress_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ );
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_extra(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_getAddress(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_getLabel(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_getBalance(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_getUnlockedBalance(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccountRow_getRowId(
+ subaddressAccountRow_ptr: *mut ::std::os::raw::c_void,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccount_getAll_size(
+ subaddressAccount_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccount_getAll_byIndex(
+ subaddressAccount_ptr: *mut ::std::os::raw::c_void,
+ index: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccount_addRow(
+ subaddressAccount_ptr: *mut ::std::os::raw::c_void,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccount_setLabel(
+ subaddressAccount_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_SubaddressAccount_refresh(subaddressAccount_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_MultisigState_isMultisig(multisigState_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_MultisigState_isReady(multisigState_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_MultisigState_threshold(multisigState_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_MultisigState_total(multisigState_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_DeviceProgress_progress(deviceProgress_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_DeviceProgress_indeterminate(
+ deviceProgress_ptr: *mut ::std::os::raw::c_void,
+ ) -> bool;
+}
+pub const WalletDevice_Software: ::std::os::raw::c_int = 0;
+pub const WalletDevice_Ledger: ::std::os::raw::c_int = 1;
+pub const WalletDevice_Trezor: ::std::os::raw::c_int = 2;
+pub const WalletStatus_Ok: ::std::os::raw::c_int = 0;
+pub const WalletStatus_Error: ::std::os::raw::c_int = 1;
+pub const WalletStatus_Critical: ::std::os::raw::c_int = 2;
+pub const WalletConnectionStatus_Disconnected: ::std::os::raw::c_int = 0;
+pub const WalletConnectionStatus_Connected: ::std::os::raw::c_int = 1;
+pub const WalletConnectionStatus_WrongVersion: ::std::os::raw::c_int = 2;
+pub const WalletBackgroundSync_Off: ::std::os::raw::c_int = 0;
+pub const WalletBackgroundSync_ReusePassword: ::std::os::raw::c_int = 1;
+pub const BackgroundSync_CustomPassword: ::std::os::raw::c_int = 2;
+extern "C" {
+ pub fn MONERO_Wallet_seed(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ seed_offset: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getSeedLanguage(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setSeedLanguage(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ arg: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_status(wallet_ptr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_errorString(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setPassword(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ password: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getPassword(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setDevicePin(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ pin: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setDevicePassphrase(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ passphrase: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_address(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u64,
+ addressIndex: u64,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_path(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_nettype(wallet_ptr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_useForkRules(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ version: u8,
+ early_blocks: i64,
+ ) -> u8;
+}
+extern "C" {
+ pub fn MONERO_Wallet_integratedAddress(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ payment_id: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_secretViewKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_publicViewKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_secretSpendKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_publicSpendKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_publicMultisigSignerKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_stop(wallet_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Wallet_store(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_filename(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_keysFilename(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_init(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ daemon_address: *const ::std::os::raw::c_char,
+ upper_transaction_size_limit: u64,
+ daemon_username: *const ::std::os::raw::c_char,
+ daemon_password: *const ::std::os::raw::c_char,
+ use_ssl: bool,
+ lightWallet: bool,
+ proxy_address: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_createWatchOnly(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ language: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setRefreshFromBlockHeight(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ refresh_from_block_height: u64,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_getRefreshFromBlockHeight(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setRecoveringFromSeed(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ recoveringFromSeed: bool,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_setRecoveringFromDevice(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ recoveringFromDevice: bool,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_setSubaddressLookahead(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ major: u32,
+ minor: u32,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_connectToDaemon(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_connected(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setTrustedDaemon(wallet_ptr: *mut ::std::os::raw::c_void, arg: bool);
+}
+extern "C" {
+ pub fn MONERO_Wallet_trustedDaemon(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setProxy(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_balance(wallet_ptr: *mut ::std::os::raw::c_void, accountIndex: u32)
+ -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_unlockedBalance(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_viewOnlyBalance(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_watchOnly(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_isDeterministic(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_blockChainHeight(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_approximateBlockChainHeight(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_estimateBlockChainHeight(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_daemonBlockChainHeight(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_daemonBlockChainHeight_cached(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_daemonBlockChainHeight_runThread(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ seconds: ::std::os::raw::c_int,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_daemonBlockChainTargetHeight(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_synchronized(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_displayAmount(amount: u64) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_amountFromString(amount: *const ::std::os::raw::c_char) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_amountFromDouble(amount: f64) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_genPaymentId() -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_paymentIdValid(paiment_id: *const ::std::os::raw::c_char) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_addressValid(
+ str_: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_keyValid(
+ secret_key_string: *const ::std::os::raw::c_char,
+ address_string: *const ::std::os::raw::c_char,
+ isViewKey: bool,
+ nettype: ::std::os::raw::c_int,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_keyValid_error(
+ secret_key_string: *const ::std::os::raw::c_char,
+ address_string: *const ::std::os::raw::c_char,
+ isViewKey: bool,
+ nettype: ::std::os::raw::c_int,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_paymentIdFromAddress(
+ strarg: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_maximumAllowedAmount() -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_init3(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ argv0: *const ::std::os::raw::c_char,
+ default_log_base_name: *const ::std::os::raw::c_char,
+ log_path: *const ::std::os::raw::c_char,
+ console: bool,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_getPolyseed(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ passphrase: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_createPolyseed(
+ language: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_startRefresh(wallet_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Wallet_pauseRefresh(wallet_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Wallet_refresh(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_refreshAsync(wallet_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Wallet_rescanBlockchain(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_rescanBlockchainAsync(wallet_ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_Wallet_setAutoRefreshInterval(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ millis: ::std::os::raw::c_int,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_autoRefreshInterval(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_addSubaddressAccount(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_numSubaddressAccounts(wallet_ptr: *mut ::std::os::raw::c_void) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_numSubaddresses(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_addSubaddress(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_getSubaddressLabel(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ addressIndex: u32,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setSubaddressLabel(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ addressIndex: u32,
+ label: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_multisig(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getMultisigInfo(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_makeMultisig(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ info: *const ::std::os::raw::c_char,
+ info_separator: *const ::std::os::raw::c_char,
+ threshold: u32,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exchangeMultisigKeys(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ info: *const ::std::os::raw::c_char,
+ info_separator: *const ::std::os::raw::c_char,
+ force_update_use_with_caution: bool,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exportMultisigImages(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_importMultisigImages(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ info: *const ::std::os::raw::c_char,
+ info_separator: *const ::std::os::raw::c_char,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_hasMultisigPartialKeyImages(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_restoreMultisigTransaction(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ signData: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_createTransactionMultDest(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ dst_addr_list: *const ::std::os::raw::c_char,
+ dst_addr_list_separator: *const ::std::os::raw::c_char,
+ payment_id: *const ::std::os::raw::c_char,
+ amount_sweep_all: bool,
+ amount_list: *const ::std::os::raw::c_char,
+ amount_list_separator: *const ::std::os::raw::c_char,
+ mixin_count: u32,
+ pendingTransactionPriority: ::std::os::raw::c_int,
+ subaddr_account: u32,
+ preferredInputs: *const ::std::os::raw::c_char,
+ preferredInputs_separator: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_createTransaction(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ dst_addr: *const ::std::os::raw::c_char,
+ payment_id: *const ::std::os::raw::c_char,
+ amount: u64,
+ mixin_count: u32,
+ pendingTransactionPriority: ::std::os::raw::c_int,
+ subaddr_account: u32,
+ preferredInputs: *const ::std::os::raw::c_char,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_loadUnsignedTx(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ unsigned_filename: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_loadUnsignedTxUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ input: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_submitTransaction(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ fileName: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_submitTransactionUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ input: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_hasUnknownKeyImages(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exportKeyImages(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ filename: *const ::std::os::raw::c_char,
+ all: bool,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exportKeyImagesUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ max_fragment_length: usize,
+ all: bool,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_importKeyImages(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ filename: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_importKeyImagesUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ input: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exportOutputs(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ filename: *const ::std::os::raw::c_char,
+ all: bool,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_exportOutputsUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ max_fragment_length: usize,
+ all: bool,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_importOutputs(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ filename: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_importOutputsUR(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ input: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setupBackgroundSync(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ background_sync_type: ::std::os::raw::c_int,
+ wallet_password: *const ::std::os::raw::c_char,
+ background_cache_password: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getBackgroundSyncType(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_startBackgroundSync(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_stopBackgroundSync(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ wallet_password: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_isBackgroundSyncing(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_isBackgroundWallet(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_history(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_addressBook(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_coins(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_subaddress(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_subaddressAccount(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_Wallet_defaultMixin(wallet_ptr: *mut ::std::os::raw::c_void) -> u32;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setDefaultMixin(wallet_ptr: *mut ::std::os::raw::c_void, arg: u32);
+}
+extern "C" {
+ pub fn MONERO_Wallet_setCacheAttribute(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ key: *const ::std::os::raw::c_char,
+ val: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getCacheAttribute(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ key: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setUserNote(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ txid: *const ::std::os::raw::c_char,
+ note: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getUserNote(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ txid: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getTxKey(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ txid: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_signMessage(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ message: *const ::std::os::raw::c_char,
+ address: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_verifySignedMessage(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ message: *const ::std::os::raw::c_char,
+ address: *const ::std::os::raw::c_char,
+ signature: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_rescanSpent(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setOffline(wallet_ptr: *mut ::std::os::raw::c_void, offline: bool);
+}
+extern "C" {
+ pub fn MONERO_Wallet_isOffline(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_segregatePreForkOutputs(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ segregate: bool,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_segregationHeight(wallet_ptr: *mut ::std::os::raw::c_void, height: u64);
+}
+extern "C" {
+ pub fn MONERO_Wallet_keyReuseMitigation2(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ mitigation: bool,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_lockKeysFile(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_unlockKeysFile(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_isKeysFileLocked(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getDeviceType(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_Wallet_coldKeyImageSync(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ spent: u64,
+ unspent: u64,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_deviceShowAddress(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ accountIndex: u32,
+ addressIndex: u32,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_Wallet_reconnectDevice(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getBytesReceived(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getBytesSent(wallet_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getStateIsConnected(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getSendToDevice(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_uchar;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getSendToDeviceLength(wallet_ptr: *mut ::std::os::raw::c_void) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getReceivedFromDevice(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_uchar;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getReceivedFromDeviceLength(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> usize;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getWaitsForDeviceSend(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_getWaitsForDeviceReceive(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_Wallet_setDeviceReceivedData(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ data: *mut ::std::os::raw::c_uchar,
+ len: usize,
+ );
+}
+extern "C" {
+ pub fn MONERO_Wallet_setDeviceSendData(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ data: *mut ::std::os::raw::c_uchar,
+ len: usize,
+ );
+}
+extern "C" {
+ pub fn MONERO_WalletManager_createWallet(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ language: *const ::std::os::raw::c_char,
+ networkType: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_openWallet(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ networkType: ::std::os::raw::c_int,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_recoveryWallet(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ mnemonic: *const ::std::os::raw::c_char,
+ networkType: ::std::os::raw::c_int,
+ restoreHeight: u64,
+ kdfRounds: u64,
+ seedOffset: *const ::std::os::raw::c_char,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_createWalletFromKeys(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ language: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ restoreHeight: u64,
+ addressString: *const ::std::os::raw::c_char,
+ viewKeyString: *const ::std::os::raw::c_char,
+ spendKeyString: *const ::std::os::raw::c_char,
+ kdf_rounds: u64,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_createDeterministicWalletFromSpendKey(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ language: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ restoreHeight: u64,
+ spendKeyString: *const ::std::os::raw::c_char,
+ kdf_rounds: u64,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_createWalletFromDevice(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ deviceName: *const ::std::os::raw::c_char,
+ restoreHeight: u64,
+ subaddressLookahead: *const ::std::os::raw::c_char,
+ viewKeyString: *const ::std::os::raw::c_char,
+ spendKeyString: *const ::std::os::raw::c_char,
+ kdf_rounds: u64,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_createWalletFromPolyseed(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ nettype: ::std::os::raw::c_int,
+ mnemonic: *const ::std::os::raw::c_char,
+ passphrase: *const ::std::os::raw::c_char,
+ newWallet: bool,
+ restore_height: u64,
+ kdf_rounds: u64,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_closeWallet(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ store: bool,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_walletExists(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_verifyWalletPassword(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ keys_file_name: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ no_spend_key: bool,
+ kdf_rounds: u64,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_queryWalletDevice(
+ device_type: ::std::os::raw::c_int,
+ keys_file_name: *const ::std::os::raw::c_char,
+ password: *const ::std::os::raw::c_char,
+ kdf_rounds: u64,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_findWallets(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ path: *const ::std::os::raw::c_char,
+ separator: *const ::std::os::raw::c_char,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_errorString(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_setDaemonAddress(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ );
+}
+extern "C" {
+ pub fn MONERO_WalletManager_blockchainHeight(wm_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_blockchainTargetHeight(wm_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_networkDifficulty(wm_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_miningHashRate(wm_ptr: *mut ::std::os::raw::c_void) -> f64;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_blockTarget(wm_ptr: *mut ::std::os::raw::c_void) -> u64;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_isMining(wm_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_startMining(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ threads: u32,
+ backgroundMining: bool,
+ ignoreBattery: bool,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_stopMining(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_resolveOpenAlias(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ dnssec_valid: bool,
+ ) -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_WalletManager_setProxy(
+ wm_ptr: *mut ::std::os::raw::c_void,
+ address: *const ::std::os::raw::c_char,
+ ) -> bool;
+}
+pub const LogLevel_Silent: ::std::os::raw::c_int = -1;
+pub const LogLevel_0: ::std::os::raw::c_int = 0;
+pub const LogLevel_1: ::std::os::raw::c_int = 1;
+pub const LogLevel_2: ::std::os::raw::c_int = 2;
+pub const LogLevel_3: ::std::os::raw::c_int = 3;
+pub const LogLevel_4: ::std::os::raw::c_int = 4;
+pub const LogLevel_Min: ::std::os::raw::c_int = -1;
+pub const LogLevel_Max: ::std::os::raw::c_int = 4;
+extern "C" {
+ pub fn MONERO_WalletManagerFactory_getWalletManager() -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_WalletManagerFactory_setLogLevel(level: ::std::os::raw::c_int);
+}
+extern "C" {
+ pub fn MONERO_WalletManagerFactory_setLogCategories(categories: *const ::std::os::raw::c_char);
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test0();
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test1(x: bool) -> bool;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test2(x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test3(x: u64) -> u64;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test4(x: u64) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test5() -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_test5_std() -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_DEBUG_isPointerNull(wallet_ptr: *mut ::std::os::raw::c_void) -> bool;
+}
+extern "C" {
+ pub fn MONERO_cw_getWalletListener(
+ wallet_ptr: *mut ::std::os::raw::c_void,
+ ) -> *mut ::std::os::raw::c_void;
+}
+extern "C" {
+ pub fn MONERO_cw_WalletListener_resetNeedToRefresh(
+ cw_walletListener_ptr: *mut ::std::os::raw::c_void,
+ );
+}
+extern "C" {
+ pub fn MONERO_cw_WalletListener_isNeedToRefresh(
+ cw_walletListener_ptr: *mut ::std::os::raw::c_void,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_cw_WalletListener_isNewTransactionExist(
+ cw_walletListener_ptr: *mut ::std::os::raw::c_void,
+ ) -> bool;
+}
+extern "C" {
+ pub fn MONERO_cw_WalletListener_resetIsNewTransactionExist(
+ cw_walletListener_ptr: *mut ::std::os::raw::c_void,
+ );
+}
+extern "C" {
+ pub fn MONERO_cw_WalletListener_height(
+ cw_walletListener_ptr: *mut ::std::os::raw::c_void,
+ ) -> u64;
+}
+extern "C" {
+ pub fn MONERO_free(ptr: *mut ::std::os::raw::c_void);
+}
+extern "C" {
+ pub fn MONERO_checksum_wallet2_api_c_h() -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_checksum_wallet2_api_c_cpp() -> *const ::std::os::raw::c_char;
+}
+extern "C" {
+ pub fn MONERO_checksum_wallet2_api_c_exp() -> *const ::std::os::raw::c_char;
+}
diff --git a/impls/monero.rs/src/lib.rs b/impls/monero.rs/src/lib.rs
new file mode 100644
index 0000000..2175083
--- /dev/null
+++ b/impls/monero.rs/src/lib.rs
@@ -0,0 +1,223 @@
+use std::ffi::{CStr, CString};
+use std::os::raw::{c_char, c_int, c_void};
+use std::ptr::NonNull;
+use std::sync::Arc;
+
+use libloading::{Library, Symbol};
+
+pub const NETWORK_TYPE_MAINNET: c_int = 0;
+pub const NETWORK_TYPE_TESTNET: c_int = 1;
+pub const NETWORK_TYPE_STAGENET: c_int = 2;
+
+#[derive(Debug)]
+pub enum WalletError {
+ NullPointer,
+ FfiError(String),
+ WalletErrorCode(c_int, String),
+ LibraryLoadError(String),
+}
+
+pub type WalletResult<T> = Result<T, WalletError>;
+
+pub struct WalletManager {
+ ptr: NonNull<c_void>,
+ library: Arc<Library>,
+}
+
+impl WalletManager {
+ /// Create a new WalletManager, optionally specifying the path to the shared library.
+ pub fn new(lib_path: Option<&str>) -> WalletResult<Self> {
+ let lib = match lib_path {
+ Some(path) => {
+ unsafe {
+ Library::new(path).map_err(|e| WalletError::LibraryLoadError(e.to_string()))?
+ }
+ }
+ None => {
+ // Attempt to load from the same directory as the executable.
+ let exe_path = std::env::current_exe()
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?;
+ let exe_dir = exe_path.parent().ok_or_else(|| {
+ WalletError::LibraryLoadError("Failed to get executable directory".to_string())
+ })?;
+ let lib_path = exe_dir.join("libwallet2_api_c.so");
+
+ unsafe {
+ if lib_path.exists() {
+ Library::new(lib_path)
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?
+ } else {
+ // Fallback to standard locations.
+ Library::new("libwallet2_api_c.so")
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?
+ }
+ }
+ }
+ };
+
+ let library = Arc::new(lib);
+
+ unsafe {
+ let func: Symbol<unsafe extern "C" fn() -> *mut c_void> =
+ library.get(b"MONERO_WalletManagerFactory_getWalletManager\0")
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?;
+ let ptr = func();
+ NonNull::new(ptr)
+ .map(|nn_ptr| WalletManager { ptr: nn_ptr, library })
+ .ok_or(WalletError::NullPointer)
+ }
+ }
+
+ pub fn create_wallet(
+ &self,
+ path: &str,
+ password: &str,
+ language: &str,
+ network_type: c_int,
+ ) -> WalletResult<Wallet> {
+ let c_path = CString::new(path).expect("CString::new failed");
+ let c_password = CString::new(password).expect("CString::new failed");
+ let c_language = CString::new(language).expect("CString::new failed");
+
+ unsafe {
+ let func: Symbol<
+ unsafe extern "C" fn(
+ *mut c_void,
+ *const c_char,
+ *const c_char,
+ *const c_char,
+ c_int,
+ ) -> *mut c_void,
+ > = self
+ .library
+ .get(b"MONERO_WalletManager_createWallet\0")
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?;
+ let wallet_ptr = func(
+ self.ptr.as_ptr(),
+ c_path.as_ptr(),
+ c_password.as_ptr(),
+ c_language.as_ptr(),
+ network_type,
+ );
+
+ if wallet_ptr.is_null() {
+ Err(WalletError::NullPointer)
+ } else {
+ Ok(Wallet {
+ ptr: NonNull::new_unchecked(wallet_ptr),
+ manager_ptr: self.ptr,
+ library: Arc::clone(&self.library), // Keep the library alive.
+ })
+ }
+ }
+ }
+}
+
+impl Drop for WalletManager {
+ fn drop(&mut self) {
+ // The library will be dropped automatically when all references are gone.
+ }
+}
+
+#[derive(Clone)]
+pub struct Wallet {
+ ptr: NonNull<c_void>,
+ manager_ptr: NonNull<c_void>,
+ library: Arc<Library>,
+}
+
+impl Wallet {
+ pub fn get_seed(&self, seed_offset: &str) -> WalletResult<String> {
+ let c_seed_offset = CString::new(seed_offset).expect("CString::new failed");
+
+ unsafe {
+ let func: Symbol<unsafe extern "C" fn(*mut c_void, *const c_char) -> *const c_char> =
+ self.library
+ .get(b"MONERO_Wallet_seed\0")
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?;
+ let seed_ptr = func(self.ptr.as_ptr(), c_seed_offset.as_ptr());
+
+ if seed_ptr.is_null() {
+ Err(self.get_last_error())
+ } else {
+ let seed = CStr::from_ptr(seed_ptr)
+ .to_string_lossy()
+ .into_owned();
+ if seed.is_empty() {
+ Err(WalletError::FfiError("Received empty seed".to_string()))
+ } else {
+ Ok(seed)
+ }
+ }
+ }
+ }
+
+ pub fn get_address(&self, account_index: u64, address_index: u64) -> WalletResult<String> {
+ unsafe {
+ let func: Symbol<unsafe extern "C" fn(*mut c_void, u64, u64) -> *const c_char> =
+ self.library
+ .get(b"MONERO_Wallet_address\0")
+ .map_err(|e| WalletError::LibraryLoadError(e.to_string()))?;
+ let address_ptr = func(self.ptr.as_ptr(), account_index, address_index);
+
+ if address_ptr.is_null() {
+ Err(self.get_last_error())
+ } else {
+ let address = CStr::from_ptr(address_ptr)
+ .to_string_lossy()
+ .into_owned();
+ Ok(address)
+ }
+ }
+ }
+
+ pub fn is_deterministic(&self) -> bool {
+ unsafe {
+ let func: Symbol<unsafe extern "C" fn(*mut c_void) -> bool> = self
+ .library
+ .get(b"MONERO_Wallet_isDeterministic\0")
+ .expect("Failed to load MONERO_Wallet_isDeterministic");
+ func(self.ptr.as_ptr())
+ }
+ }
+
+ fn get_last_error(&self) -> WalletError {
+ unsafe {
+ let error_func: Symbol<unsafe extern "C" fn(*mut c_void) -> *const c_char> = self
+ .library
+ .get(b"MONERO_Wallet_errorString\0")
+ .expect("Failed to load MONERO_Wallet_errorString");
+ let status_func: Symbol<unsafe extern "C" fn(*mut c_void) -> c_int> = self
+ .library
+ .get(b"MONERO_Wallet_status\0")
+ .expect("Failed to load MONERO_Wallet_status");
+
+ let error_ptr = error_func(self.ptr.as_ptr());
+ let status = status_func(self.ptr.as_ptr());
+
+ let error_msg = if error_ptr.is_null() {
+ "Unknown error".to_string()
+ } else {
+ CStr::from_ptr(error_ptr)
+ .to_string_lossy()
+ .into_owned()
+ };
+
+ WalletError::WalletErrorCode(status, error_msg)
+ }
+ }
+}
+
+impl Drop for Wallet {
+ fn drop(&mut self) {
+ unsafe {
+ let func: Symbol<
+ unsafe extern "C" fn(*mut c_void, *mut c_void, bool) -> bool,
+ > = self
+ .library
+ .get(b"MONERO_WalletManager_closeWallet\0")
+ .expect("Failed to load MONERO_WalletManager_closeWallet");
+ func(self.manager_ptr.as_ptr(), self.ptr.as_ptr(), false);
+ }
+ }
+}
diff --git a/impls/monero.rs/src/main.rs b/impls/monero.rs/src/main.rs
new file mode 100644
index 0000000..aae688b
--- /dev/null
+++ b/impls/monero.rs/src/main.rs
@@ -0,0 +1,25 @@
+use monero_rust::{WalletError, WalletManager, NETWORK_TYPE_MAINNET};
+
+fn main() -> Result<(), WalletError> {
+ let wallet_manager = WalletManager::new(None)?;
+
+ let wallet = wallet_manager.create_wallet(
+ "wallet",
+ "password",
+ "English",
+ NETWORK_TYPE_MAINNET,
+ )?;
+
+ match wallet.get_seed("") {
+ Ok(seed) => println!("Seed: {}", seed),
+ Err(e) => {
+ eprintln!("Failed to get seed: {:?}", e);
+ return Err(e);
+ }
+ }
+
+ let address = wallet.get_address(0, 0)?;
+ println!("Wallet Address: {}", address);
+
+ Ok(())
+}