cbitcoin
 All Data Structures Files Functions Variables Typedefs
src/structures/CBObject/CBMessage/CBTransactionOutput/CBTransactionOutput.h File Reference

Describes how the bitcoins can be spent from the output. Inherits CBObject. More...

#include "CBMessage.h"
#include "CBScript.h"

Go to the source code of this file.

Data Structures

struct  CBTransactionOutput
 Structure for CBTransactionOutput objects. More...

Functions

CBTransactionOutputCBNewTransactionOutput (uint64_t value, CBScript *script, void(*onErrorReceived)(CBError error, char *,...))
 Creates a new CBTransactionOutput object.
CBTransactionOutputCBNewTransactionOutputFromData (CBByteArray *data, void(*onErrorReceived)(CBError error, char *,...))
 Creates a new CBTransactionOutput object from byte data. Should be serialised for object data.
CBTransactionOutputCBGetTransactionOutput (void *self)
 Gets a CBTransactionOutput from another object. Use this to avoid casts.
bool CBInitTransactionOutput (CBTransactionOutput *self, uint64_t value, CBScript *script, void(*onErrorReceived)(CBError error, char *,...))
 Initialises a CBTransactionOutput object.
bool CBInitTransactionOutputFromData (CBTransactionOutput *self, CBByteArray *data, void(*onErrorReceived)(CBError error, char *,...))
 Initialises a CBTransactionOutput object.
void CBFreeTransactionOutput (void *self)
 Frees a CBTransactionOutput object.
uint32_t CBTransactionOutputDeserialise (CBTransactionOutput *self)
 Deserialises a CBTransactionOutput so that it can be used as an object.
uint32_t CBTransactionOutputSerialise (CBTransactionOutput *self)
 Serialises a CBTransactionOutput to the byte data.

Detailed Description

Describes how the bitcoins can be spent from the output. Inherits CBObject.


Function Documentation

void CBFreeTransactionOutput ( void *  self)

Frees a CBTransactionOutput object.

Parameters:
selfThe CBTransactionOutput object to free.

Gets a CBTransactionOutput from another object. Use this to avoid casts.

Parameters:
selfThe object to obtain the CBTransactionOutput from.
Returns:
The CBTransactionOutput object.
bool CBInitTransactionOutput ( CBTransactionOutput self,
uint64_t  value,
CBScript script,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Initialises a CBTransactionOutput object.

Parameters:
selfThe CBTransactionOutput object to initialise.
Returns:
true on success, false on failure.
bool CBInitTransactionOutputFromData ( CBTransactionOutput self,
CBByteArray data,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Initialises a CBTransactionOutput object.

Parameters:
selfThe CBTransactionOutput object to initialise.
Returns:
true on success, false on failure.
CBTransactionOutput* CBNewTransactionOutput ( uint64_t  value,
CBScript script,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Creates a new CBTransactionOutput object.

Returns:
A new CBTransactionOutput object.
CBTransactionOutput* CBNewTransactionOutputFromData ( CBByteArray data,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Creates a new CBTransactionOutput object from byte data. Should be serialised for object data.

Returns:
A new CBTransactionOutput object.

Deserialises a CBTransactionOutput so that it can be used as an object.

Parameters:
selfThe CBTransactionOutput object
Returns:
The length read on success, 0 on failure.

Serialises a CBTransactionOutput to the byte data.

Parameters:
selfThe CBTransactionOutput object
Returns:
The length written on success, 0 on failure.