Documentation ¶
Index ¶
- Constants
- type ABClient
- type AlphabillClient
- func (c *AlphabillClient) Close() error
- func (c *AlphabillClient) GetBlock(ctx context.Context, blockNumber uint64) ([]byte, error)
- func (c *AlphabillClient) GetBlocks(ctx context.Context, blockNumber uint64, blockCount uint64) (res *alphabill.GetBlocksResponse, err error)
- func (c *AlphabillClient) GetRoundNumber(ctx context.Context) (uint64, error)
- func (c *AlphabillClient) SendTransaction(ctx context.Context, tx *types.TransactionOrder) error
- func (c *AlphabillClient) SendTransactionWithRetry(ctx context.Context, tx *types.TransactionOrder, maxTries int) error
- type AlphabillClientConfig
Constants ¶
View Source
const ( ErrFailedToBroadcastTx = "failed to broadcast transaction" ErrTxBufferFull = "tx buffer is full" ErrTxRetryCanceled = "user canceled tx retry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABClient ¶
type ABClient interface { SendTransaction(ctx context.Context, tx *types.TransactionOrder) error SendTransactionWithRetry(ctx context.Context, tx *types.TransactionOrder, maxTries int) error GetBlock(ctx context.Context, blockNumber uint64) ([]byte, error) GetBlocks(ctx context.Context, blockNumber, blockCount uint64) (*alphabill.GetBlocksResponse, error) GetRoundNumber(ctx context.Context) (uint64, error) Close() error }
ABClient manages connection to alphabill node and implements RPC methods
type AlphabillClient ¶
type AlphabillClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(config AlphabillClientConfig) *AlphabillClient
New creates instance of AlphabillClient
func (*AlphabillClient) Close ¶ added in v0.2.0
func (c *AlphabillClient) Close() error
func (*AlphabillClient) GetBlocks ¶ added in v0.1.1
func (c *AlphabillClient) GetBlocks(ctx context.Context, blockNumber uint64, blockCount uint64) (res *alphabill.GetBlocksResponse, err error)
func (*AlphabillClient) GetRoundNumber ¶ added in v0.2.0
func (c *AlphabillClient) GetRoundNumber(ctx context.Context) (uint64, error)
func (*AlphabillClient) SendTransaction ¶
func (c *AlphabillClient) SendTransaction(ctx context.Context, tx *types.TransactionOrder) error
func (*AlphabillClient) SendTransactionWithRetry ¶ added in v0.2.0
func (c *AlphabillClient) SendTransactionWithRetry(ctx context.Context, tx *types.TransactionOrder, maxTries int) error
type AlphabillClientConfig ¶
Click to show internal directories.
Click to hide internal directories.