Documentation ¶
Index ¶
- Constants
- type MoneyBackendClient
- func (c *MoneyBackendClient) GetBalance(ctx context.Context, pubKey []byte, includeDCBills bool) (uint64, error)
- func (c *MoneyBackendClient) GetBills(ctx context.Context, pubKey []byte) ([]*sdk.Bill, error)
- func (c *MoneyBackendClient) GetFeeCreditBill(ctx context.Context, unitID types.UnitID) (*sdk.Bill, error)
- func (c *MoneyBackendClient) GetInfo(ctx context.Context) (*sdk.InfoResponse, error)
- func (c *MoneyBackendClient) GetRoundNumber(ctx context.Context) (*sdk.RoundNumber, error)
- func (c *MoneyBackendClient) GetTxHistory(ctx context.Context, pubKey sdk.PubKey, offset string, limit int) ([]*sdk.TxHistoryRecord, string, error)
- func (c *MoneyBackendClient) GetTxProof(ctx context.Context, unitID types.UnitID, txHash sdk.TxHash) (*sdk.Proof, error)
- func (c *MoneyBackendClient) ListBills(ctx context.Context, pubKey []byte, includeDCBills bool, offsetKey string, ...) (*backend.ListBillsResponse, error)
- func (c *MoneyBackendClient) PostTransactions(ctx context.Context, pubKey sdk.PubKey, txs *sdk.Transactions) error
- type Observability
Constants ¶
View Source
const ( BalancePath = "api/v1/balance" ListBillsPath = "api/v1/list-bills" TxHistoryPath = "api/v1/tx-history" UnitsPath = "api/v1/units" RoundNumberPath = "api/v1/round-number" FeeCreditPath = "api/v1/fee-credit-bills" TransactionsPath = "api/v1/transactions" InfoPath = "api/v1/info" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MoneyBackendClient ¶
type MoneyBackendClient struct { BaseUrl *url.URL HttpClient http.Client // contains filtered or unexported fields }
func New ¶
func New(baseUrl string, observe Observability) (*MoneyBackendClient, error)
func (*MoneyBackendClient) GetBalance ¶
func (*MoneyBackendClient) GetFeeCreditBill ¶
func (*MoneyBackendClient) GetInfo ¶
func (c *MoneyBackendClient) GetInfo(ctx context.Context) (*sdk.InfoResponse, error)
func (*MoneyBackendClient) GetRoundNumber ¶
func (c *MoneyBackendClient) GetRoundNumber(ctx context.Context) (*sdk.RoundNumber, error)
func (*MoneyBackendClient) GetTxHistory ¶
func (*MoneyBackendClient) GetTxProof ¶
func (c *MoneyBackendClient) GetTxProof(ctx context.Context, unitID types.UnitID, txHash sdk.TxHash) (*sdk.Proof, error)
GetTxProof wrapper for GetProof method to satisfy txsubmitter interface, also verifies txHash
func (*MoneyBackendClient) ListBills ¶
func (c *MoneyBackendClient) ListBills(ctx context.Context, pubKey []byte, includeDCBills bool, offsetKey string, limit int) (*backend.ListBillsResponse, error)
func (*MoneyBackendClient) PostTransactions ¶
func (c *MoneyBackendClient) PostTransactions(ctx context.Context, pubKey sdk.PubKey, txs *sdk.Transactions) error
type Observability ¶
type Observability interface {
TracerProvider() trace.TracerProvider
}
Click to show internal directories.
Click to hide internal directories.