Documentation ¶
Index ¶
- Variables
- func Init()
- type BlockInfo
- type Client
- func (c *Client) Close()
- func (c *Client) GetConn() *websocket.Conn
- func (c *Client) GetNodeInfo() *NodeInfo
- func (c *Client) IsClosed() bool
- func (c *Client) Publish(topic string, offset, limit uint32, txPool bool, payload []byte, ...) error
- func (c *Client) Send(dests []string, payload []byte, MaxHoldingSeconds ...uint32) error
- type ClientConfig
- type HeaderInfo
- type NanoPay
- type NanoPayClaimer
- func (npc *NanoPayClaimer) Address() string
- func (npc *NanoPayClaimer) Amount() common.Fixed64
- func (npc *NanoPayClaimer) Claim(tx *transaction.Transaction) (common.Fixed64, error)
- func (npc *NanoPayClaimer) Close() error
- func (npc *NanoPayClaimer) Flush() error
- func (npc *NanoPayClaimer) IsClosed() bool
- type NodeInfo
- type ProgramInfo
- type SetClientResult
- type Subscription
- type TxnInfo
- type WalletConfig
- type WalletSDK
- func (w *WalletSDK) Balance() (common.Fixed64, error)
- func (w *WalletSDK) BalanceByAddress(address string) (common.Fixed64, error)
- func (w *WalletSDK) DeleteName(name string, fee ...string) (string, error)
- func (w *WalletSDK) GetAddressByName(name string) (string, error)
- func (w *WalletSDK) GetSubscribers(topic string, offset, limit uint32, meta, txPool bool) (map[string]string, map[string]string, error)
- func (w *WalletSDK) GetSubscribersCount(topic string) (uint32, error)
- func (w *WalletSDK) GetSubscription(topic string, subscriber string) (*Subscription, error)
- func (w *WalletSDK) NewNanoPay(address string, fee string, duration ...uint32) (*NanoPay, error)
- func (w *WalletSDK) NewNanoPayClaimer(claimInterval time.Duration, errChan chan error, address ...string) (*NanoPayClaimer, error)
- func (w *WalletSDK) RegisterName(name string, fee ...string) (string, error)
- func (w *WalletSDK) SendRawTransaction(tx *transaction.Transaction) (string, error, int32)
- func (w *WalletSDK) Subscribe(identifier string, topic string, duration uint32, meta string, fee ...string) (string, error)
- func (w *WalletSDK) Transfer(address string, value string, fee ...string) (string, error)
- func (w *WalletSDK) Unsubscribe(identifier string, topic string, fee ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadySubscribed = errors.New("already subscribed to this topic")
Functions ¶
Types ¶
type BlockInfo ¶
type BlockInfo struct { Header HeaderInfo `json:"header"` Transactions []TxnInfo `json:"transactions"` Size int `json:"size"` Hash string `json:"hash"` }
type Client ¶
type Client struct { Address string OnConnect chan struct{} OnMessage chan *pb.InboundMessage OnBlock chan *BlockInfo sync.RWMutex // contains filtered or unexported fields }
func (*Client) GetNodeInfo ¶
type ClientConfig ¶
type HeaderInfo ¶
type HeaderInfo struct { Version uint32 `json:"version"` PrevBlockHash string `json:"prevBlockHash"` TransactionsRoot string `json:"transactionsRoot"` StateRoot string `json:"stateRoot"` Timestamp int64 `json:"timestamp"` Height uint32 `json:"height"` RandomBeacon string `json:"randomBeacon"` WinnerHash string `json:"winnerHash"` WinnerType string `json:"winnerType"` SignerPk string `json:"signerPk"` SignerId string `json:"signerId"` Signature string `json:"signature"` Hash string `json:"hash"` }
type NanoPay ¶
func NewNanoPay ¶
func (*NanoPay) IncrementAmount ¶
func (np *NanoPay) IncrementAmount(delta string) (*transaction.Transaction, error)
type NanoPayClaimer ¶
func NewNanoPayClaimer ¶
func (*NanoPayClaimer) Address ¶
func (npc *NanoPayClaimer) Address() string
func (*NanoPayClaimer) Amount ¶
func (npc *NanoPayClaimer) Amount() common.Fixed64
func (*NanoPayClaimer) Claim ¶
func (npc *NanoPayClaimer) Claim(tx *transaction.Transaction) (common.Fixed64, error)
func (*NanoPayClaimer) Close ¶
func (npc *NanoPayClaimer) Close() error
func (*NanoPayClaimer) Flush ¶
func (npc *NanoPayClaimer) Flush() error
func (*NanoPayClaimer) IsClosed ¶
func (npc *NanoPayClaimer) IsClosed() bool
type ProgramInfo ¶
type SetClientResult ¶
type Subscription ¶
type WalletConfig ¶
type WalletConfig struct {
SeedRPCServerAddr string
}
type WalletSDK ¶
type WalletSDK struct {
// contains filtered or unexported fields
}
func NewWalletSDK ¶
func NewWalletSDK(account *vault.Account, config ...WalletConfig) *WalletSDK
func (*WalletSDK) BalanceByAddress ¶
func (*WalletSDK) DeleteName ¶
func (*WalletSDK) GetAddressByName ¶
func (*WalletSDK) GetSubscribers ¶
func (*WalletSDK) GetSubscribersCount ¶
func (*WalletSDK) GetSubscription ¶
func (w *WalletSDK) GetSubscription(topic string, subscriber string) (*Subscription, error)
func (*WalletSDK) NewNanoPay ¶
func (*WalletSDK) NewNanoPayClaimer ¶
func (*WalletSDK) RegisterName ¶
func (*WalletSDK) SendRawTransaction ¶
func (w *WalletSDK) SendRawTransaction(tx *transaction.Transaction) (string, error, int32)
Click to show internal directories.
Click to hide internal directories.