diff --git a/include/cli.check_balance.go.h b/include/cli.check_balance.go.h new file mode 100644 index 000000000..08aa587bb --- /dev/null +++ b/include/cli.check_balance.go.h @@ -0,0 +1,16 @@ +typedef struct{create_rawtx.go.h + GoString_ Coins; + GoString_ Hours; +} cli__Balance; +typedef struct{ + cli__Balance Confirmed; + cli__Balance Spendable; + cli__Balance Expected; + GoString_ Address; +} cli__AddressBalances; +typedef struct{ + cli__Balance Confirmed; + cli__Balance Spendable; + cli__Balance Expected; + GoSlice_ Addresses; +} cli__BalanceResult; \ No newline at end of file diff --git a/lib/cgo/cli.check_balance.go b/lib/cgo/cli.check_balance.go index 7237f846f..bac8e5df5 100644 --- a/lib/cgo/cli.check_balance.go +++ b/lib/cgo/cli.check_balance.go @@ -12,18 +12,37 @@ import ( #include #include "skytypes.h" + #include "skyfee.h" */ import "C" +//export SKY_cli_CheckWalletBalance +func SKY_cli_CheckWalletBalance(_c *C.GetOutputser__Handle, _walletFile string, _arg2 *C.BalanceResult__Handle) (____error_code uint32) { + __c, okc := lookupGetOutputserHandle(*_c) + if !okc { + ____error_code = SKY_BAD_HANDLE + return + } + c := *__c + walletFile := _walletFile + __arg2, ____return_err := cli.CheckWalletBalance(c, walletFile) + ____error_code = libErrorCode(____return_err) + if ____return_err == nil { + *_arg2 = registerBalanceResultHandle(__arg2) + } + return +} + //export SKY_cli_GetBalanceOfAddresses -func SKY_cli_GetBalanceOfAddresses(_c C.GetOutputser__Handle, _addrs []string, _arg2 *C.BalanceResult_Handle) (____error_code uint32) { - c, okc := lookupGetOutputserHandle(_c) +func SKY_cli_GetBalanceOfAddresses(_c *C.GetOutputser__Handle, _addrs []string, _arg2 *C.BalanceResult__Handle) (____error_code uint32) { + __c, okc := lookupGetOutputserHandle(*_c) if !okc { ____error_code = SKY_BAD_HANDLE return } + c := *__c addrs := *(*[]string)(unsafe.Pointer(&_addrs)) - __arg2, ____return_err := cli.GetBalanceOfAddresses(*c, addrs) + __arg2, ____return_err := cli.GetBalanceOfAddresses(c, addrs) ____error_code = libErrorCode(____return_err) if ____return_err == nil { *_arg2 = registerBalanceResultHandle(__arg2)