Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canton ¶
type Canton struct {
// contains filtered or unexported fields
}
Canton implements token.Provider using the Canton token client.
func NewCanton ¶
func NewCanton(client cantontoken.Token) *Canton
NewCanton creates a Canton-backed token provider.
func (*Canton) GetBalance ¶
GetBalance returns token balance by token symbol and Canton party ID.
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Indexer implements token.Provider using the indexer's HTTP client.
Unlike the Canton provider — which issues live gRPC ACS scans for every balanceOf/totalSupply call — the Indexer provider reads from pre-materialized PostgreSQL tables kept current by the indexer's streaming processor.
It is a thin adapter: symbol → admin lookup is handled here; all HTTP concerns live in the indexer client.
func NewIndexer ¶
func NewIndexer(client indexerclient.Client, instruments map[string]string) *Indexer
NewIndexer creates an Indexer-backed token provider.
instruments maps each supported token symbol to its Canton instrument admin party string, e.g. map[string]string{"DEMO": "admin::abc123@domain"}.
func (*Indexer) GetBalance ¶
GetBalance returns the token balance for the given Canton party ID. The partyID is resolved upstream in the service layer (from the user record), so no additional lookup is needed here. A not-found response from the indexer means the party holds zero of this token.