Go API Reference

Below are the Go API reference for the Sia serialization library.

Constructor

Creates a new Sia instance.

Attributes

NameDescription
ContentThe current content of the Sia instance.
IndexThe current offset of the Sia instance pointer.

Methods

NameDescription
SeekChanges the offset of the Sia instance pointer.
BytesReturns the current content of the Sia instance.
OffsetReturns the current offset of the Sia instance pointer.
EmbedSiaAdds the content of the provided Sia instance to the current content.
EmbedBytesAdds the provided bytes to the current content.
AddBigIntAdds the provided big integer to the current content.
AddBoolAdds the provided boolean to the current content.
AddUInt8Adds the provided unsigned 8-bit integer to the current content.
AddUInt16Adds the provided unsigned 16-bit integer to the current content.
AddUInt32Adds the provided unsigned 32-bit integer to the current content.
AddUInt64Adds the provided unsigned 64-bit integer to the current content.
AddInt8Adds the provided signed 8-bit integer to the current content.
AddInt16Adds the provided signed 16-bit integer to the current content.
AddInt32Adds the provided signed 32-bit integer to the current content.
AddInt64Adds the provided signed 64-bit integer to the current content.
AddStringNAdds the provided null-terminated UTF-8 string to the current content.
AddString8Adds the provided ASCII string to the current content.
AddString16Adds the provided UTF-16 string to the current content.
AddString32Adds the provided UTF-32 string to the current content.
AddString64Adds the provided UTF-64 string to the current content.
AddByteArrayNAdds the provided byte array to the current content.
AddByteArray8Adds the provided byte array to the current content.
AddByteArray16Adds the provided byte array to the current content.
AddByteArray32Adds the provided byte array to the current content.
AddByteArray64Adds the provided byte array to the current content.
ReadBigIntReads a big integer from the current content.
ReadBoolReads a boolean from the current content.
ReadUInt8Reads an unsigned 8-bit integer from the current content.
ReadUInt16Reads an unsigned 16-bit integer from the current content.
ReadUInt32Reads an unsigned 32-bit integer from the current content.
ReadUInt64Reads an unsigned 64-bit integer from the current content.
ReadInt8Reads a signed 8-bit integer from the current content.
ReadInt16Reads a signed 16-bit integer from the current content.
ReadInt32Reads a signed 32-bit integer from the current content.
ReadInt64Reads a signed 64-bit integer from the current content.
ReadStringNReads a null-terminated UTF-8 string from the current content.
ReadString8Reads an ASCII string from the current content.
ReadString16Reads a UTF-16 string from the current content.
ReadString32Reads a UTF-32 string from the current content.
ReadString64Reads a UTF-64 string from the current content.
ReadByteArrayNReads a byte array from the current content.
ReadByteArray8Reads an 8-bit byte array from the current content.
ReadByteArray16Reads a 16-bit byte array from the current content.
ReadByteArray32Reads a 32-bit byte array from the current content.
ReadByteArray64Reads a 64-bit byte array from the current content.

Utility Methods

Seek

Changes the offset of the Sia instance pointer.

Bytes

Returns the current content of the Sia instance.

Offset

Returns the current offset of the Sia instance pointer.

EmbedSia

Adds the content of the provided Sia instance to the current content.

EmbedBytes

Adds the provided bytes to the current content.

Add Methods

AddBigInt

Adds the provided big integer to the current content.

AddBool

Adds the provided boolean to the current content.

AddUInt8

Adds the provided unsigned 8-bit integer to the current content.

AddUInt16

Adds the provided unsigned 16-bit integer to the current content.

AddUInt32

Adds the provided unsigned 32-bit integer to the current content.

AddUInt64

Adds the provided unsigned 64-bit integer to the current content.

AddInt8

Adds the provided signed 8-bit integer to the current content.

AddInt16

Adds the provided signed 16-bit integer to the current content.

AddInt32

Adds the provided signed 32-bit integer to the current content.

AddInt64

Adds the provided signed 64-bit integer to the current content.

AddStringN

Adds the provided null-terminated UTF-8 string to the current content.

AddString8

Adds the provided ASCII string to the current content.

AddString16

Adds the provided UTF-16 string to the current content.

AddString32

Adds the provided UTF-32 string to the current content.

AddString64

Adds the provided UTF-64 string to the current content.

AddByteArrayN

Adds the provided byte array to the current content.

AddByteArray8

Adds the provided byte array to the current content.

AddByteArray16

Adds the provided byte array to the current content.

AddByteArray32

Adds the provided byte array to the current content.

AddByteArray64

Adds the provided byte array to the current content.

Read Methods

ReadBigInt

Reads a big integer from the current content.

ReadBool

Reads a boolean from the current content.

ReadUInt8

Reads an unsigned 8-bit integer from the current content.

ReadUInt16

Reads an unsigned 16-bit integer from the current content.

ReadUInt32

Reads an unsigned 32-bit integer from the current content.

ReadUInt64

Reads an unsigned 64-bit integer from the current content.

ReadInt8

Reads a signed 8-bit integer from the current content.

ReadInt16

Reads a signed 16-bit integer from the current content.

ReadInt32

Reads a signed 32-bit integer from the current content.

ReadInt64

Reads a signed 64-bit integer from the current content.

ReadStringN

Reads a null-terminated UTF-8 string from the current content.

ReadString8

Reads an ASCII string from the current content.

ReadString16

Reads a UTF-16 string from the current content.

ReadString32

Reads a UTF-32 string from the current content.

ReadString64

Reads a UTF-64 string from the current content.

ReadByteArrayN

Reads a byte array from the current content.

ReadByteArray8

Reads a byte array from the current content.

ReadByteArray16

Reads a byte array from the current content.

ReadByteArray32

Reads a byte array from the current content.

ReadByteArray64

Reads a byte array from the current content.

How was this page?

Timeleap SA.

Pl. de l'Industrie 2, 1180 Rolle, Switzerland

Logo

Social Media

Tokenomics

Info