registries

package
v0.0.0-...-25c9f67 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentRegistry

type AgentRegistry struct {
	// contains filtered or unexported fields
}

func NewAgentRegistry

func NewAgentRegistry(agentRegistryAddr common.Address, client *ethclient.Client, log lib.ILogger) *AgentRegistry

func (*AgentRegistry) GetAllAgents

type Marketplace

type Marketplace struct {
	// contains filtered or unexported fields
}

func NewMarketplace

func NewMarketplace(marketplaceAddr common.Address, client *ethclient.Client, log lib.ILogger) *Marketplace

func (*Marketplace) GetBestBidByModelId

func (g *Marketplace) GetBestBidByModelId(ctx context.Context, modelId common.Hash) (common.Hash, *marketplace.Bid, error)

func (*Marketplace) GetBidById

func (g *Marketplace) GetBidById(ctx context.Context, bidId [32]byte) (*marketplace.Bid, error)

func (*Marketplace) GetBidsByModelAgent

func (g *Marketplace) GetBidsByModelAgent(ctx context.Context, modelAgentId common.Hash, offset *big.Int, limit uint8) ([][32]byte, []marketplace.Bid, error)

func (*Marketplace) GetBidsByProvider

func (g *Marketplace) GetBidsByProvider(ctx context.Context, provider common.Address, offset *big.Int, limit uint8) ([][32]byte, []marketplace.Bid, error)

type ModelRegistry

type ModelRegistry struct {
	// contains filtered or unexported fields
}

func NewModelRegistry

func NewModelRegistry(modelRegistryAddr common.Address, client *ethclient.Client, log lib.ILogger) *ModelRegistry

func (*ModelRegistry) GetAllModels

func (g *ModelRegistry) GetAllModels(ctx context.Context) ([][32]byte, []modelregistry.Model, error)

type MorToken

type MorToken struct {
	// contains filtered or unexported fields
}

func NewMorToken

func NewMorToken(morTokenAddr common.Address, client *ethclient.Client, log lib.ILogger) *MorToken

func (*MorToken) Approve

func (g *MorToken) Approve(ctx *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error)

func (*MorToken) GetAllowance

func (g *MorToken) GetAllowance(ctx context.Context, owner common.Address, spender common.Address) (*big.Int, error)

func (*MorToken) GetBalance

func (g *MorToken) GetBalance(ctx context.Context, account common.Address) (*big.Int, error)

func (*MorToken) GetTotalSupply

func (g *MorToken) GetTotalSupply(ctx context.Context) (*big.Int, error)

func (*MorToken) Transfer

func (g *MorToken) Transfer(ctx *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error)

type ProviderRegistry

type ProviderRegistry struct {
	// contains filtered or unexported fields
}

func NewProviderRegistry

func NewProviderRegistry(providerRegistryAddr common.Address, client *ethclient.Client, log lib.ILogger) *ProviderRegistry

func (*ProviderRegistry) GetAllProviders

func (g *ProviderRegistry) GetAllProviders(ctx context.Context) ([]common.Address, []providerregistry.Provider, error)

func (*ProviderRegistry) GetProviderById

func (g *ProviderRegistry) GetProviderById(ctx context.Context, id common.Address) (*providerregistry.Provider, error)

type SessionRouter

type SessionRouter struct {
	// contains filtered or unexported fields
}

func NewSessionRouter

func NewSessionRouter(sessionRouterAddr common.Address, client *ethclient.Client, log lib.ILogger) *SessionRouter

func (*SessionRouter) ClaimProviderBalance

func (g *SessionRouter) ClaimProviderBalance(ctx *bind.TransactOpts, sessionId [32]byte, amount *big.Int, to common.Address) (common.Hash, error)

func (*SessionRouter) CloseSession

func (g *SessionRouter) CloseSession(ctx *bind.TransactOpts, sessionID common.Hash, privateKeyHex lib.HexString) (common.Hash, error)

func (*SessionRouter) GetABI

func (g *SessionRouter) GetABI() *abi.ABI

func (*SessionRouter) GetContractAddress

func (g *SessionRouter) GetContractAddress() common.Address

func (*SessionRouter) GetProviderClaimableBalance

func (g *SessionRouter) GetProviderClaimableBalance(ctx context.Context, sessionId [32]byte) (*big.Int, error)

func (*SessionRouter) GetSession

func (g *SessionRouter) GetSession(ctx context.Context, sessionID common.Hash) (*sessionrouter.Session, error)

func (*SessionRouter) GetSessionsByProvider

func (g *SessionRouter) GetSessionsByProvider(ctx context.Context, providerAddr common.Address, offset *big.Int, limit uint8) ([]sessionrouter.Session, error)

func (*SessionRouter) GetSessionsByUser

func (g *SessionRouter) GetSessionsByUser(ctx context.Context, userAddr common.Address, offset *big.Int, limit uint8) ([]sessionrouter.Session, error)

func (*SessionRouter) GetTodaysBudget

func (g *SessionRouter) GetTodaysBudget(ctx context.Context) (*big.Int, error)

func (*SessionRouter) OpenSession

func (g *SessionRouter) OpenSession(ctx *bind.TransactOpts, approval []byte, approvalSig []byte, stake *big.Int, privateKeyHex lib.HexString) (sessionID common.Hash, providerID common.Address, userID common.Address, err error)

Jump to

Keyboard shortcuts

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