Documentation
¶
Index ¶
- Constants
- func BytesToCompactBytes(bytes []byte) (res []byte)
- func CompactLength(data uint32) int
- func Encode(data uint64) string
- func ExtendLEBytes(input []byte, length int) []byte
- func GetEra(height uint64) []byte
- func SignTransaction(msgStr string, prikey []byte) ([]byte, error)
- func VerifyAndCombineTransaction(transferCode, emptyTrans, signature string) (string, bool)
- type MethodTransfer
- type TxPayLoad
- type TxStruct
- func (ts TxStruct) CreateEmptyTransactionAndMessage(transferCode string) (string, string, error)
- func (ts TxStruct) GetSignedTransaction(transfer_code, signature string) (string, error)
- func (tx TxStruct) NewTxPayLoad(transfer_code string) (*TxPayLoad, error)
- func (tx TxStruct) ToJSONString() string
Constants ¶
View Source
const ( KSM_Balannce_Transfer = "040000" DOT_Balannce_Transfer = "050000" Balannce_Transfer_name = "transfer" Default_Period = 50 SigningBitV4 = byte(0x84) Compact_U32 = "Compact<u32>" AccounntIDFollow = false )
Variables ¶
This section is empty.
Functions ¶
func BytesToCompactBytes ¶ added in v1.2.15
func CompactLength ¶ added in v1.2.15
func ExtendLEBytes ¶ added in v1.2.15
Types ¶
type MethodTransfer ¶
func NewMethodTransfer ¶
func NewMethodTransfer(pubkey string, amount uint64) (*MethodTransfer, error)
type TxPayLoad ¶
type TxPayLoad struct { Method []byte Era []byte Nonce []byte Fee []byte SpecVersion []byte GenesisHash []byte BlockHash []byte TxVersion []byte }
func (TxPayLoad) ToBytesString ¶
type TxStruct ¶
type TxStruct struct { //MethodName string `json:"method_name"` //Version int `json:"version"` SenderPubkey string `json:"sender_pubkey"` RecipientPubkey string `json:"recipient_pubkey"` Amount uint64 `json:"amount"` Nonce uint64 `json:"nonce"` Fee uint64 `json:"fee"` BlockHeight uint64 `json:"block_height"` BlockHash string `json:"block_hash"` GenesisHash string `json:"genesis_hash"` SpecVersion uint32 `json:"spec_version"` TxVersion uint32 `json:"txVersion"` }
func NewTxStructFromJSON ¶
func (TxStruct) CreateEmptyTransactionAndMessage ¶
func (TxStruct) GetSignedTransaction ¶
func (TxStruct) NewTxPayLoad ¶
func (TxStruct) ToJSONString ¶
Click to show internal directories.
Click to hide internal directories.