Documentation ¶
Index ¶
- Constants
- type AcceptTermsAndConditions
- type Client
- func (c *Client) AcceptTermsAndConditions(ctx context.Context, conState jsonrpc.State, args AcceptTermsAndConditions) error
- func (c *Client) Address(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) AwaitTransactionOnTfchainBridge(ctx context.Context, conState jsonrpc.State, memo string) error
- func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
- func (c *Client) BatchCancelContract(ctx context.Context, conState jsonrpc.State, contract_ids []uint64) error
- func (c *Client) CancelContract(ctx context.Context, conState jsonrpc.State, contract_id uint64) error
- func (c *Client) CreateAccount(ctx context.Context, conState jsonrpc.State, network string) (string, error)
- func (c *Client) CreateFarm(ctx context.Context, conState jsonrpc.State, args CreateFarm) error
- func (c *Client) CreateNameContract(ctx context.Context, conState jsonrpc.State, name string) (uint64, error)
- func (c *Client) CreateNodeContract(ctx context.Context, conState jsonrpc.State, args CreateNodeContract) (uint64, error)
- func (c *Client) CreateRentContract(ctx context.Context, conState jsonrpc.State, args CreateRentContract) (uint64, error)
- func (c *Client) CreateTwin(ctx context.Context, conState jsonrpc.State, args CreateTwin) (uint32, error)
- func (c *Client) GetContract(ctx context.Context, conState jsonrpc.State, contract_id uint64) (*substrate.Contract, error)
- func (c *Client) GetContractIDByNameRegistration(ctx context.Context, conState jsonrpc.State, name string) (uint64, error)
- func (c *Client) GetContractWithHash(ctx context.Context, conState jsonrpc.State, args GetContractWithHash) (uint64, error)
- func (c *Client) GetFarm(ctx context.Context, conState jsonrpc.State, id uint32) (*substrate.Farm, error)
- func (c *Client) GetFarmByName(ctx context.Context, conState jsonrpc.State, name string) (uint32, error)
- func (c *Client) GetNode(ctx context.Context, conState jsonrpc.State, id uint32) (*substrate.Node, error)
- func (c *Client) GetNodeContracts(ctx context.Context, conState jsonrpc.State, node_id uint32) ([]types.U64, error)
- func (c *Client) GetNodes(ctx context.Context, conState jsonrpc.State, farm_id uint32) ([]uint32, error)
- func (c *Client) GetTwin(ctx context.Context, conState jsonrpc.State, id uint32) (*substrate.Twin, error)
- func (c *Client) GetTwinByPubKey(ctx context.Context, conState jsonrpc.State, address string) (uint32, error)
- func (c *Client) GetZosVersion(ctx context.Context, conState jsonrpc.State) (string, error)
- func (c *Client) Height(ctx context.Context, conState jsonrpc.State) (uint32, error)
- func (c *Client) Load(ctx context.Context, conState jsonrpc.State, args Load) error
- func (c *Client) ServiceContractApprove(ctx context.Context, conState jsonrpc.State, contract_id uint64) error
- func (c *Client) ServiceContractBill(ctx context.Context, conState jsonrpc.State, args ServiceContractBill) error
- func (c *Client) ServiceContractCancel(ctx context.Context, conState jsonrpc.State, contract_id uint64) error
- func (c *Client) ServiceContractCreate(ctx context.Context, conState jsonrpc.State, args ServiceContractCreate) (uint64, error)
- func (c *Client) ServiceContractReject(ctx context.Context, conState jsonrpc.State, contract_id uint64) error
- func (c *Client) ServiceContractSetFees(ctx context.Context, conState jsonrpc.State, args SetServiceContractFees) error
- func (c *Client) ServiceContractSetMetadata(ctx context.Context, conState jsonrpc.State, args ServiceContractSetMetadata) error
- func (c *Client) SwapToStellar(ctx context.Context, conState jsonrpc.State, args SwapToStellar) error
- func (c *Client) Transfer(ctx context.Context, conState jsonrpc.State, args Transfer) error
- type CreateFarm
- type CreateNodeContract
- type CreateRentContract
- type CreateTwin
- type ErrUnknownNetwork
- type GetContractWithHash
- type Load
- type ServiceContractBill
- type ServiceContractCreate
- type ServiceContractSetMetadata
- type SetServiceContractFees
- type SwapToStellar
- type TfchainState
- type Transfer
Constants ¶
View Source
const (
TfchainID = "tfchain"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client exposing stellar methods
func (*Client) AcceptTermsAndConditions ¶
func (c *Client) AcceptTermsAndConditions(ctx context.Context, conState jsonrpc.State, args AcceptTermsAndConditions) error
func (*Client) AwaitTransactionOnTfchainBridge ¶
func (*Client) Balance ¶
func (c *Client) Balance(ctx context.Context, conState jsonrpc.State, address string) (string, error)
Balance of an account for TFT on stellar.
func (*Client) BatchCancelContract ¶
func (*Client) CancelContract ¶
func (*Client) CreateAccount ¶
func (*Client) CreateFarm ¶
func (c *Client) CreateFarm(ctx context.Context, conState jsonrpc.State, args CreateFarm) error
func (*Client) CreateNameContract ¶
func (*Client) CreateNodeContract ¶
func (*Client) CreateRentContract ¶
func (*Client) CreateTwin ¶
func (*Client) GetContract ¶
func (*Client) GetContractIDByNameRegistration ¶
func (*Client) GetContractWithHash ¶
func (*Client) GetFarmByName ¶
func (*Client) GetNodeContracts ¶
func (*Client) GetTwinByPubKey ¶
func (*Client) GetZosVersion ¶
func (*Client) Load ¶
Load a client, connecting to the rpc endpoint at the given URL and loading a keypair from the given mnemonic
func (*Client) ServiceContractApprove ¶
func (*Client) ServiceContractBill ¶
func (c *Client) ServiceContractBill(ctx context.Context, conState jsonrpc.State, args ServiceContractBill) error
func (*Client) ServiceContractCancel ¶
func (*Client) ServiceContractCreate ¶
func (*Client) ServiceContractReject ¶
func (*Client) ServiceContractSetFees ¶
func (c *Client) ServiceContractSetFees(ctx context.Context, conState jsonrpc.State, args SetServiceContractFees) error
func (*Client) ServiceContractSetMetadata ¶
func (c *Client) ServiceContractSetMetadata(ctx context.Context, conState jsonrpc.State, args ServiceContractSetMetadata) error
func (*Client) SwapToStellar ¶
func (c *Client) SwapToStellar(ctx context.Context, conState jsonrpc.State, args SwapToStellar) error
type CreateFarm ¶
type CreateFarm struct { Name string `json:"name"` PublicIPs []substrate.PublicIPInput `json:"public_ips"` }
type CreateNodeContract ¶
type CreateRentContract ¶
type CreateTwin ¶
type ErrUnknownNetwork ¶
type ErrUnknownNetwork struct{}
ErrUnknownNetwork indicates a client was requested for an unknown network
func (ErrUnknownNetwork) Error ¶
func (e ErrUnknownNetwork) Error() string
Error implements the error interface
type GetContractWithHash ¶
type ServiceContractBill ¶
type ServiceContractCreate ¶
type SetServiceContractFees ¶
type SwapToStellar ¶
type TfchainState ¶
type TfchainState struct {
// contains filtered or unexported fields
}
func State ¶
func State(conState jsonrpc.State) *TfchainState
State from a connection. If no state is present, it is initialized
Click to show internal directories.
Click to hide internal directories.