Documentation ¶
Index ¶
- Constants
- func C58Encode(input []byte) string
- func CheckDecodeWithCheckSumLast(input string) (result []byte, err error)
- func NewAddress(chainId string, hrp string, publicKey *btcec.PublicKey) (string, error)
- func NewTransferTransaction(netWorkId uint32, blockchainId string, inputs *[]TransferInput, ...) (string, error)
- func ParseAddress(address string) ([]byte, string, string, error)
- type Credential
- type Serializer
- func (c *Serializer) Add(errors ...error)
- func (c *Serializer) AddCap(bytes int)
- func (c *Serializer) Check(bytes int)
- func (c *Serializer) Errored() bool
- func (c *Serializer) Payload() []byte
- func (c *Serializer) ReadBytes() []byte
- func (c *Serializer) ReadFixedBytes(size int) []byte
- func (c *Serializer) ReadInt() uint32
- func (c *Serializer) ReadLong() uint64
- func (c *Serializer) ReadShort() uint16
- func (c *Serializer) WriteBytes(bytes []byte)
- func (c *Serializer) WriteFixedBytes(bytes []byte)
- func (c *Serializer) WriteInt(val uint32)
- func (c *Serializer) WriteLong(val uint64)
- func (c *Serializer) WriteShort(val uint16, bigEndian bool)
- type Transaction
- type TransferInput
- type TransferOutPut
- type TransferableInput
- type TransferableOutput
- type TxInput
- type TxOutput
Constants ¶
View Source
const ( ShortLen = 2 IntLen = 4 LongLen = 8 )
View Source
const ( BASETX = 0 SECPINPUTID = 5 SECPOUTPUTID = 7 SECPCREDENTIAL = 9 CHAINID_X = "X" HRP_FUJI = "fuji" NETWORK_FUJI = 5 BLOCKCHAIN_FUJI = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm" ASSET_AVAX_FUJI = "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" )
Variables ¶
This section is empty.
Functions ¶
func CheckDecodeWithCheckSumLast ¶
CheckDecodeWithCheckSumLast decodes a string that was encoded with CheckEncode and verifies the checksum.
func NewAddress ¶
func NewTransferTransaction ¶
func NewTransferTransaction(netWorkId uint32, blockchainId string, inputs *[]TransferInput, outputs *[]TransferOutPut) (string, error)
Types ¶
type Credential ¶
type Serializer ¶
type Serializer struct { MaxLen int Body []byte Offset int // contains filtered or unexported fields }
func NewSerializer ¶
func NewSerializer() *Serializer
func (*Serializer) Add ¶
func (c *Serializer) Add(errors ...error)
func (*Serializer) AddCap ¶
func (c *Serializer) AddCap(bytes int)
func (*Serializer) Check ¶
func (c *Serializer) Check(bytes int)
func (*Serializer) Errored ¶
func (c *Serializer) Errored() bool
func (*Serializer) Payload ¶
func (c *Serializer) Payload() []byte
func (*Serializer) ReadBytes ¶
func (c *Serializer) ReadBytes() []byte
func (*Serializer) ReadFixedBytes ¶
func (c *Serializer) ReadFixedBytes(size int) []byte
func (*Serializer) ReadInt ¶
func (c *Serializer) ReadInt() uint32
func (*Serializer) ReadLong ¶
func (c *Serializer) ReadLong() uint64
func (*Serializer) ReadShort ¶
func (c *Serializer) ReadShort() uint16
func (*Serializer) WriteBytes ¶
func (c *Serializer) WriteBytes(bytes []byte)
func (*Serializer) WriteFixedBytes ¶
func (c *Serializer) WriteFixedBytes(bytes []byte)
func (*Serializer) WriteInt ¶
func (c *Serializer) WriteInt(val uint32)
func (*Serializer) WriteLong ¶
func (c *Serializer) WriteLong(val uint64)
func (*Serializer) WriteShort ¶
func (c *Serializer) WriteShort(val uint16, bigEndian bool)
type Transaction ¶
type Transaction struct { Codecid uint32 TypeId uint32 NetworkID uint32 BlockchainID []byte Outs outputSlices Ins inputSlices Memo [4]byte Credentials []Credential }
func (*Transaction) AddOutput ¶
func (t *Transaction) AddOutput(address string, value uint64, assetId string) error
func (*Transaction) SerializeToBytes ¶
func (t *Transaction) SerializeToBytes(sl *Serializer) error
type TransferInput ¶
type TransferOutPut ¶
type TransferableInput ¶
type TransferableInput struct { TxID []byte UtxoIndex uint32 AssetID []byte Input TxInput PrivateKey string }
func (*TransferableInput) SerializeToBytes ¶
func (t *TransferableInput) SerializeToBytes(sl *Serializer) error
type TransferableOutput ¶
func (*TransferableOutput) SerializeToBytes ¶
func (t *TransferableOutput) SerializeToBytes(sl *Serializer) error
type TxInput ¶
func (*TxInput) SerializeToBytes ¶
func (t *TxInput) SerializeToBytes(sl *Serializer)
Click to show internal directories.
Click to hide internal directories.