Documentation ¶
Index ¶
- Constants
- Variables
- func PublicKeyToAddress(bytes []byte, network byte) string
- type BlockRequest
- type CallData
- type Client
- type Extrinsic
- type Platform
- func (p *Platform) Coin() coin.Coin
- func (p *Platform) CurrentBlockNumber() (int64, error)
- func (p *Platform) GetBlockByNumber(num int64) (*types.Block, error)
- func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)
- func (p *Platform) NormalizeAddress(valueRaw string) string
- func (p *Platform) NormalizeExtrinsic(srcTx *Extrinsic) *types.Tx
- func (p *Platform) NormalizeExtrinsics(extrinsics []Extrinsic) types.Txs
- func (p *Platform) NormalizeTransfer(srcTx *Transfer) types.Tx
- type SubscanResponse
- type SubscanResponseData
- type Transfer
- type TransfersRequest
Constants ¶
View Source
const ( FeeTransfer string = "100000000" ModuleBalances string = "balances" ModuleStaking string = "staking" ModuleFunctionTransfer string = "transfer" )
Variables ¶
View Source
var NetworkByteMap = map[string]byte{
"DOT": 0x00,
"KSM": 0x02,
}
Functions ¶
func PublicKeyToAddress ¶
PublicKeyToAddress returns an ss58 address string given public key bytes see: https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58)
Types ¶
type BlockRequest ¶
type BlockRequest struct {
BlockNumber int64 `json:"block_num"`
}
type Client ¶
func (*Client) GetBlockByNumber ¶
func (*Client) GetCurrentBlock ¶
func (*Client) GetExtrinsicsOfAddress ¶
type Extrinsic ¶
type Extrinsic struct { Timestamp uint64 `json:"block_timestamp"` BlockNumber uint64 `json:"block_num"` CallModuleFunction string `json:"call_module_function"` CallModule string `json:"call_module"` Params string `json:"params"` AccountId string `json:"account_id"` Nonce uint64 `json:"nonce"` Hash string `json:"extrinsic_hash"` Success bool `json:"success"` Fee string `json:"fee"` }
type Platform ¶
type Platform struct { CoinIndex uint // contains filtered or unexported fields }
func (*Platform) CurrentBlockNumber ¶
func (*Platform) GetBlockByNumber ¶
func (*Platform) GetTxsByAddress ¶
func (*Platform) NormalizeAddress ¶
func (*Platform) NormalizeExtrinsic ¶
func (*Platform) NormalizeExtrinsics ¶
type SubscanResponse ¶
type SubscanResponse struct { Code int `json:"code"` Message string `json:"message"` Data SubscanResponseData `json:"data"` }
type SubscanResponseData ¶
type TransfersRequest ¶
Click to show internal directories.
Click to hide internal directories.