client

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 (c *MoneyBackendClient) GetBalance(ctx context.Context, pubKey []byte, includeDCBills bool) (uint64, error)

func (*MoneyBackendClient) GetBills

func (c *MoneyBackendClient) GetBills(ctx context.Context, pubKey []byte) ([]*sdk.Bill, error)

func (*MoneyBackendClient) GetFeeCreditBill

func (c *MoneyBackendClient) GetFeeCreditBill(ctx context.Context, unitID types.UnitID) (*sdk.Bill, error)

func (*MoneyBackendClient) GetInfo

func (*MoneyBackendClient) GetRoundNumber

func (c *MoneyBackendClient) GetRoundNumber(ctx context.Context) (*sdk.RoundNumber, error)

func (*MoneyBackendClient) GetTxHistory

func (c *MoneyBackendClient) GetTxHistory(ctx context.Context, pubKey sdk.PubKey, offset string, limit int) ([]*sdk.TxHistoryRecord, string, error)

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL