Skip to content

Latest commit

 

History

History
executable file
·
599 lines (376 loc) · 44 KB

API.md

File metadata and controls

executable file
·
599 lines (376 loc) · 44 KB

Summary

Members Descriptions
define GO_CGO_EXPORT_PROLOGUE_H
define GO_CGO_PROLOGUE_H
define SKY_OK
define SKY_ERROR
define LIBSKY_TESTING_H
public GoUint32 SKY_cli_CreateRawTxFromWallet(Handle p0,GoString p1,GoString p2,GoSlice p3,Transaction * p4)
public GoUint32 SKY_cli_CreateRawTxFromAddress(Handle p0,GoString p1,GoString p2,GoString p3,GoSlice p4,Transaction * p5)
public void SKY_cli_CreateRawTx(Handle p0,Wallet * p1,GoSlice p2,GoString p3,GoSlice p4,Transaction * p5)
public void SKY_cli_NewTransaction(GoSlice p0,GoSlice p1,GoSlice p2,Transaction * p3)
public GoUint32 SKY_cipher_DecodeBase58Address(GoString p0,Address * p1)
public void SKY_cipher_AddressFromPubKey(PubKey * p0,Address * p1)
public void SKY_cipher_AddressFromSecKey(SecKey * p0,Address * p1)
public GoUint32 SKY_cipher_BitcoinDecodeBase58Address(GoString p0,Address * p1)
public void SKY_cipher_Address_Bytes(Address * p0,PubKeySlice * p1)
public void SKY_cipher_Address_BitcoinBytes(Address * p0,PubKeySlice * p1)
public GoUint32 SKY_cipher_Address_Verify(Address * p0,PubKey * p1)
public void SKY_cipher_Address_String(Address * p0,GoString_ * p1)
public void SKY_cipher_Address_BitcoinString(Address * p0,GoString_ * p1)
public void SKY_cipher_Address_Checksum(Address * p0,Checksum * p1)
public void SKY_cipher_Address_BitcoinChecksum(Address * p0,Checksum * p1)
public void SKY_cipher_BitcoinAddressFromPubkey(PubKey * p0,GoString_ * p1)
public void SKY_cipher_BitcoinWalletImportFormatFromSeckey(SecKey * p0,GoString_ * p1)
public GoUint32 SKY_cipher_BitcoinAddressFromBytes(GoSlice p0,Address * p1)
public GoUint32 SKY_cipher_SecKeyFromWalletImportFormat(GoString p0,SecKey * p1)
public GoInt SKY_cipher_PubKeySlice_Len(PubKeySlice * p0)
public GoUint8 SKY_cipher_PubKeySlice_Less(PubKeySlice * p0,GoInt p1,GoInt p2)
public void SKY_cipher_PubKeySlice_Swap(PubKeySlice * p0,GoInt p1,GoInt p2)
public void SKY_cipher_RandByte(GoInt p0,PubKeySlice * p1)
public GoUint32 SKY_cipher_NewPubKey(GoSlice p0,PubKey * p1)
public GoUint32 SKY_cipher_PubKeyFromHex(GoString p0,PubKey * p1)
public GoUint32 SKY_cipher_PubKeyFromSecKey(SecKey * p0,PubKey * p1)
public GoUint32 SKY_cipher_PubKeyFromSig(Sig * p0,SHA256 * p1,PubKey * p2)
public GoUint32 SKY_cipher_PubKey_Verify(PubKey * p0)
public void SKY_cipher_PubKey_Hex(PubKey * p0,GoString_ * p1)
public void SKY_cipher_PubKey_ToAddressHash(PubKey * p0,Ripemd160 * p1)
public GoUint32 SKY_cipher_NewSecKey(GoSlice p0,SecKey * p1)
public GoUint32 SKY_cipher_SecKeyFromHex(GoString p0,SecKey * p1)
public GoUint32 SKY_cipher_SecKey_Verify(SecKey * p0)
public void SKY_cipher_SecKey_Hex(SecKey * p0,GoString_ * p1)
public void SKY_cipher_ECDH(PubKey * p0,SecKey * p1,PubKeySlice * p2)
public GoUint32 SKY_cipher_NewSig(GoSlice p0,Sig * p1)
public GoUint32 SKY_cipher_SigFromHex(GoString p0,Sig * p1)
public void SKY_cipher_Sig_Hex(Sig * p0,GoString_ * p1)
public void SKY_cipher_SignHash(SHA256 * p0,SecKey * p1,Sig * p2)
public GoUint32 SKY_cipher_ChkSig(Address * p0,SHA256 * p1,Sig * p2)
public GoUint32 SKY_cipher_VerifySignedHash(Sig * p0,SHA256 * p1)
public GoUint32 SKY_cipher_VerifySignature(PubKey * p0,Sig * p1,SHA256 * p2)
public void SKY_cipher_GenerateKeyPair(PubKey * p0,SecKey * p1)
public void SKY_cipher_GenerateDeterministicKeyPair(GoSlice p0,PubKey * p1,SecKey * p2)
public void SKY_cipher_DeterministicKeyPairIterator(GoSlice p0,PubKeySlice * p1,PubKey * p2,SecKey * p3)
public void SKY_cipher_GenerateDeterministicKeyPairs(GoSlice p0,GoInt p1,PubKeySlice * p2)
public void SKY_cipher_GenerateDeterministicKeyPairsSeed(GoSlice p0,GoInt p1,PubKeySlice * p2,PubKeySlice * p3)
public GoUint32 SKY_cipher_TestSecKey(SecKey * p0)
public GoUint32 SKY_cipher_TestSecKeyHash(SecKey * p0,SHA256 * p1)
public GoUint32 SKY_cipher_Ripemd160_Set(Ripemd160 * p0,GoSlice p1)
public void SKY_cipher_HashRipemd160(GoSlice p0,Ripemd160 * p1)
public GoUint32 SKY_cipher_SHA256_Set(SHA256 * p0,GoSlice p1)
public void SKY_cipher_SHA256_Hex(SHA256 * p0,GoString_ * p1)
public void SKY_cipher_SHA256_Xor(SHA256 * p0,SHA256 * p1,SHA256 * p2)
public GoUint32 SKY_cipher_SumSHA256(GoSlice p0,SHA256 * p1)
public GoUint32 SKY_cipher_SHA256FromHex(GoString p0,SHA256 * p1)
public void SKY_cipher_DoubleSHA256(GoSlice p0,SHA256 * p1)
public void SKY_cipher_AddSHA256(SHA256 * p0,SHA256 * p1,SHA256 * p2)
public void SKY_cipher_Merkle(GoSlice * p0,SHA256 * p1)
public int cr_user_Address_eq(Address * addr1,Address * addr2)
public char * cr_user_Address_tostr(Address * addr1)
public int cr_user_Address_noteq(Address * addr1,Address * addr2)
public int cr_user_GoString_eq(GoString * string1,GoString * string2)
public int cr_user_GoString__eq(GoString_ * string1,GoString_ * string2)
public char * cr_user_GoString_tostr(GoString * string)
public char * cr_user_GoString__tostr(GoString_ * string)
public int cr_user_SecKey_eq(SecKey * seckey1,SecKey * seckey2)
public char * cr_user_SecKey_tostr(SecKey * seckey1)
public int cr_user_Ripemd160_noteq(Ripemd160 * rp1,Ripemd160 * rp2)
public int cr_user_Ripemd160_eq(Ripemd160 * rp1,Ripemd160 * rp2)
public char * cr_user_Ripemd160_tostr(Ripemd160 * rp1)
public int cr_user_GoSlice_eq(GoSlice * slice1,GoSlice * slice2)
public char * cr_user_GoSlice_tostr(GoSlice * slice1)
public int cr_user_GoSlice_noteq(GoSlice * slice1,GoSlice * slice2)
public int cr_user_SHA256_noteq(SHA256 * sh1,SHA256 * sh2)
public int cr_user_SHA256_eq(SHA256 * sh1,SHA256 * sh2)
public char * cr_user_SHA256_tostr(SHA256 * sh1)
public void randBytes(GoSlice * bytes,size_t n)
public void strnhex(unsigned char * buf,char * str,int n)
public void strhex(unsigned char * buf,char * str)
public void * registerMemCleanup(void * p)
public void fprintbuff(FILE * f,void * buff,size_t n)
public void toGoString(GoString_ * s,GoString * r)
struct _GoString_
struct Address Addresses of SKY accounts
struct Entry Wallet entry.
struct GoInterface
struct GoInterface_ Instances of Go interface types.
struct GoSlice
struct GoSlice_ Instances of Go slices
struct GoString_ Instances of Go string type.
struct SendAmount Structure used to specify amounts transferred in a transaction.
struct Transaction Skycoin transaction.
struct TransactionOutput Skycoin transaction output.
struct UxBalance Intermediate representation of a UxOut for sorting and spend choosing.
struct Wallet Internal representation of a Skycoin wallet.

Members

define SKY_OK

define SKY_ERROR

public GoUint32 SKY_cli_CreateRawTxFromWallet(Handle p0,GoString p1,GoString p2,GoSlice p3,Transaction * p4)

public GoUint32 SKY_cli_CreateRawTxFromAddress(Handle p0,GoString p1,GoString p2,GoString p3,GoSlice p4,Transaction * p5)

public void SKY_cli_CreateRawTx(Handle p0,Wallet * p1,GoSlice p2,GoString p3,GoSlice p4,Transaction * p5)

public void SKY_cipher_AddressFromPubKey(PubKey * p0,Address * p1)

public void SKY_cipher_AddressFromSecKey(SecKey * p0,Address * p1)

public GoUint32 SKY_cipher_Address_Verify(Address * p0,PubKey * p1)

public void SKY_cipher_Address_Checksum(Address * p0,Checksum * p1)

public void SKY_cipher_Address_BitcoinChecksum(Address * p0,Checksum * p1)

public void SKY_cipher_BitcoinAddressFromPubkey(PubKey * p0,GoString_ * p1)

public GoUint32 SKY_cipher_SecKeyFromWalletImportFormat(GoString p0,SecKey * p1)

public GoUint8 SKY_cipher_PubKeySlice_Less(PubKeySlice * p0,GoInt p1,GoInt p2)

public void SKY_cipher_PubKeySlice_Swap(PubKeySlice * p0,GoInt p1,GoInt p2)

public void SKY_cipher_RandByte(GoInt p0,PubKeySlice * p1)

public GoUint32 SKY_cipher_NewPubKey(GoSlice p0,PubKey * p1)

public GoUint32 SKY_cipher_PubKeyFromHex(GoString p0,PubKey * p1)

public GoUint32 SKY_cipher_PubKeyFromSecKey(SecKey * p0,PubKey * p1)

public GoUint32 SKY_cipher_PubKeyFromSig(Sig * p0,SHA256 * p1,PubKey * p2)

public GoUint32 SKY_cipher_PubKey_Verify(PubKey * p0)

public void SKY_cipher_PubKey_Hex(PubKey * p0,GoString_ * p1)

public void SKY_cipher_PubKey_ToAddressHash(PubKey * p0,Ripemd160 * p1)

public GoUint32 SKY_cipher_NewSecKey(GoSlice p0,SecKey * p1)

public GoUint32 SKY_cipher_SecKeyFromHex(GoString p0,SecKey * p1)

public GoUint32 SKY_cipher_SecKey_Verify(SecKey * p0)

public void SKY_cipher_SecKey_Hex(SecKey * p0,GoString_ * p1)

public void SKY_cipher_ECDH(PubKey * p0,SecKey * p1,PubKeySlice * p2)

public GoUint32 SKY_cipher_NewSig(GoSlice p0,Sig * p1)

public GoUint32 SKY_cipher_SigFromHex(GoString p0,Sig * p1)

public void SKY_cipher_Sig_Hex(Sig * p0,GoString_ * p1)

public void SKY_cipher_SignHash(SHA256 * p0,SecKey * p1,Sig * p2)

public GoUint32 SKY_cipher_ChkSig(Address * p0,SHA256 * p1,Sig * p2)

public GoUint32 SKY_cipher_VerifySignedHash(Sig * p0,SHA256 * p1)

public GoUint32 SKY_cipher_VerifySignature(PubKey * p0,Sig * p1,SHA256 * p2)

public void SKY_cipher_GenerateKeyPair(PubKey * p0,SecKey * p1)

public void SKY_cipher_GenerateDeterministicKeyPair(GoSlice p0,PubKey * p1,SecKey * p2)

public void SKY_cipher_DeterministicKeyPairIterator(GoSlice p0,PubKeySlice * p1,PubKey * p2,SecKey * p3)

public GoUint32 SKY_cipher_TestSecKey(SecKey * p0)

public GoUint32 SKY_cipher_TestSecKeyHash(SecKey * p0,SHA256 * p1)

public GoUint32 SKY_cipher_Ripemd160_Set(Ripemd160 * p0,GoSlice p1)

public void SKY_cipher_HashRipemd160(GoSlice p0,Ripemd160 * p1)

public GoUint32 SKY_cipher_SHA256_Set(SHA256 * p0,GoSlice p1)

public void SKY_cipher_SHA256_Hex(SHA256 * p0,GoString_ * p1)

public void SKY_cipher_SHA256_Xor(SHA256 * p0,SHA256 * p1,SHA256 * p2)

public GoUint32 SKY_cipher_SumSHA256(GoSlice p0,SHA256 * p1)

public GoUint32 SKY_cipher_SHA256FromHex(GoString p0,SHA256 * p1)

public void SKY_cipher_DoubleSHA256(GoSlice p0,SHA256 * p1)

public void SKY_cipher_AddSHA256(SHA256 * p0,SHA256 * p1,SHA256 * p2)

public void SKY_cipher_Merkle(GoSlice * p0,SHA256 * p1)

public int cr_user_Address_eq(Address * addr1,Address * addr2)

public char * cr_user_Address_tostr(Address * addr1)

public int cr_user_Address_noteq(Address * addr1,Address * addr2)

public int cr_user_GoString_eq(GoString * string1,GoString * string2)

public int cr_user_GoString__eq(GoString_ * string1,GoString_ * string2)

public char * cr_user_GoString_tostr(GoString * string)

public char * cr_user_GoString__tostr(GoString_ * string)

public int cr_user_SecKey_eq(SecKey * seckey1,SecKey * seckey2)

public char * cr_user_SecKey_tostr(SecKey * seckey1)

public int cr_user_Ripemd160_noteq(Ripemd160 * rp1,Ripemd160 * rp2)

public int cr_user_Ripemd160_eq(Ripemd160 * rp1,Ripemd160 * rp2)

public char * cr_user_Ripemd160_tostr(Ripemd160 * rp1)

public int cr_user_GoSlice_eq(GoSlice * slice1,GoSlice * slice2)

public char * cr_user_GoSlice_tostr(GoSlice * slice1)

public int cr_user_GoSlice_noteq(GoSlice * slice1,GoSlice * slice2)

public int cr_user_SHA256_noteq(SHA256 * sh1,SHA256 * sh2)

public int cr_user_SHA256_eq(SHA256 * sh1,SHA256 * sh2)

public char * cr_user_SHA256_tostr(SHA256 * sh1)

public void randBytes(GoSlice * bytes,size_t n)

public void strnhex(unsigned char * buf,char * str,int n)

public void strhex(unsigned char * buf,char * str)

public void * registerMemCleanup(void * p)

public void fprintbuff(FILE * f,void * buff,size_t n)

public void toGoString(GoString_ * s,GoString * r)

struct _GoString_

Summary

Members Descriptions
public const char * p
public ptrdiff_t n

Members

public const char * p

public ptrdiff_t n

struct Address

Addresses of SKY accounts

Summary

Members Descriptions
public unsigned char Version Address version identifier. Used to differentiate testnet vs mainnet addresses, for instance.
public Ripemd160 Key Address hash identifier.

Members

public unsigned char Version

Address version identifier. Used to differentiate testnet vs mainnet addresses, for instance.

public Ripemd160 Key

Address hash identifier.

struct Entry

Wallet entry.

Summary

Members Descriptions
public Address Address Wallet address.
public PubKey Public Public key used to generate address.
public SecKey Secret Secret key used to generate address.

Members

Wallet address.

public PubKey Public

Public key used to generate address.

public SecKey Secret

Secret key used to generate address.

struct GoInterface

Summary

Members Descriptions
public void * t
public void * v

Members

public void * t

public void * v

struct GoInterface_

Instances of Go interface types.

Summary

Members Descriptions
public void * t Pointer to the information of the concrete Go type bound to this interface reference.
public void * v Pointer to the data corresponding to the value bound to this interface type.

Members

public void * t

Pointer to the information of the concrete Go type bound to this interface reference.

public void * v

Pointer to the data corresponding to the value bound to this interface type.

struct GoSlice

Summary

Members Descriptions
public void * data
public GoInt len
public GoInt cap

Members

public void * data

public GoInt len

public GoInt cap

struct GoSlice_

Instances of Go slices

Summary

Members Descriptions
public void * data Pointer to buffer containing slice data.
public GoInt_ len Number of items stored in slice buffer.
public GoInt_ cap Maximum number of items that fits in this slice considering allocated memory and item type's size.

Members

public void * data

Pointer to buffer containing slice data.

public GoInt_ len

Number of items stored in slice buffer.

public GoInt_ cap

Maximum number of items that fits in this slice considering allocated memory and item type's size.

struct GoString_

Instances of Go string type.

Summary

Members Descriptions
public const char * p Pointer to string characters buffer.
public GoInt_ n String size not counting trailing \0 char if at all included.

Members

public const char * p

Pointer to string characters buffer.

public GoInt_ n

String size not counting trailing \0 char if at all included.

struct SendAmount

Structure used to specify amounts transferred in a transaction.

Summary

Members Descriptions
public GoString_ Addr Sender / receipient address.
public GoInt64_ Coins Amount transferred (e.g. measured in SKY)

Members

Sender / receipient address.

public GoInt64_ Coins

Amount transferred (e.g. measured in SKY)

struct Transaction

Skycoin transaction.

Instances of this struct are included in blocks.

Summary

Members Descriptions
public GoInt32_ Length Current transaction's length expressed in bytes.
public GoInt8_ Type Transaction's version. When a node tries to process a transaction, it must verify whether it supports the transaction's type. This is intended to provide a way to update skycoin clients and servers without crashing the network. If the transaction is not compatible with the node, it should not process it.
public SHA256 InnerHash It's a SHA256 hash of the inputs and outputs of the transaction. It is used to protect against transaction mutability. This means that the transaction cannot be altered after its creation.
public GoSlice_ Sigs A list of digital signiatures generated by the skycoin client using the private key. It is used by Skycoin servers to verify the authenticy of the transaction. Each input requires a different signature.
public GoSlice_ In A list of references to unspent transaction outputs. Unlike other cryptocurrencies, such as Bitcoin, Skycoin unspent transaction outputs (UX) and Skycoin transactions (TX) are separated in the blockchain protocol, allowing for lighter transactions, thus reducing the broadcasting costs across the network.
public GoSlice_ Out Outputs: A list of outputs created by the client, that will be recorded in the blockchain if transactions are confirmed. An output consists of a data structure representing an UTXT, which is composed by a Skycoin address to be sent to, the amount in Skycoin to be sent, and the amount of Coin Hours to be sent, and the SHA256 hash of the previous fields.

Members

public GoInt32_ Length

Current transaction's length expressed in bytes.

public GoInt8_ Type

Transaction's version. When a node tries to process a transaction, it must verify whether it supports the transaction's type. This is intended to provide a way to update skycoin clients and servers without crashing the network. If the transaction is not compatible with the node, it should not process it.

public SHA256 InnerHash

It's a SHA256 hash of the inputs and outputs of the transaction. It is used to protect against transaction mutability. This means that the transaction cannot be altered after its creation.

public GoSlice_ Sigs

A list of digital signiatures generated by the skycoin client using the private key. It is used by Skycoin servers to verify the authenticy of the transaction. Each input requires a different signature.

public GoSlice_ In

A list of references to unspent transaction outputs. Unlike other cryptocurrencies, such as Bitcoin, Skycoin unspent transaction outputs (UX) and Skycoin transactions (TX) are separated in the blockchain protocol, allowing for lighter transactions, thus reducing the broadcasting costs across the network.

public GoSlice_ Out

Outputs: A list of outputs created by the client, that will be recorded in the blockchain if transactions are confirmed. An output consists of a data structure representing an UTXT, which is composed by a Skycoin address to be sent to, the amount in Skycoin to be sent, and the amount of Coin Hours to be sent, and the SHA256 hash of the previous fields.

struct TransactionOutput

Skycoin transaction output.

Instances are integral part of transactions included in blocks.

Summary

Members Descriptions
public Address Address Receipient address.
public GoInt64_ Coins Amount sent to the receipient address.
public GoInt64_ Hours Amount of Coin Hours sent to the receipient address.

Members

Receipient address.

public GoInt64_ Coins

Amount sent to the receipient address.

public GoInt64_ Hours

Amount of Coin Hours sent to the receipient address.

struct UxBalance

Intermediate representation of a UxOut for sorting and spend choosing.

Summary

Members Descriptions
public SHA256 Hash Hash of underlying UxOut.
public GoInt64_ BkSeq moment balance calculation is performed at.
public Address Address Account holder address.
public GoInt64_ Coins Coins amount (e.g. in SKY).
public GoInt64_ Hours Balance of Coin Hours generated by underlying UxOut, depending on UxOut's head time.

Members

public SHA256 Hash

Hash of underlying UxOut.

public GoInt64_ BkSeq

moment balance calculation is performed at.

Block height corresponding to the

Account holder address.

public GoInt64_ Coins

Coins amount (e.g. in SKY).

public GoInt64_ Hours

Balance of Coin Hours generated by underlying UxOut, depending on UxOut's head time.

struct Wallet

Internal representation of a Skycoin wallet.

Summary

Members Descriptions
public GoMap_ Meta Records items that are not deterministic, like filename, lable, wallet type, secrets, etc.
public GoSlice_ Entries Entries field stores the address entries that are deterministically generated from seed.

Members

public GoMap_ Meta

Records items that are not deterministic, like filename, lable, wallet type, secrets, etc.

Entries field stores the address entries that are deterministically generated from seed.

Generated by Moxygen