Documentation
¶
Index ¶
- func GenerateEd25519Key() ([]byte, error)
- func GenerateEd25519KeyFromString(secret string) ([]byte, error)
- type AssetsBalanceResponse
- type Client
- func (c *Client) AccountBalance(account string) ([]byte, error)
- func (c *Client) AccountCreate() ([]byte, error)
- func (c *Client) AccountExists(account string) ([]byte, error)
- func (c *Client) AccountFund(account string) ([]byte, error)
- func (c *Client) AssetsBalance(account string, assetId int, classId int) ([]byte, error)
- func (c *Client) BatchUploadManifest(cidsBytes []byte, poolID int, replicationFactor int) ([]byte, error)
- func (c *Client) BloxFreeSpace() ([]byte, error)
- func (c *Client) ChatWithAI(aiModel string, userMessage string) ([]byte, error)
- func (c *Client) ConnectToBlox() error
- func (c *Client) DeleteFulaConfig() ([]byte, error)
- func (c *Client) DeleteWifi(name string) ([]byte, error)
- func (c *Client) DisconnectWifi(name string) ([]byte, error)
- func (c *Client) EraseBlData() ([]byte, error)
- func (c *Client) FetchContainerLogs(ContainerName string, TailCount string) ([]byte, error)
- func (c *Client) FindBestAndTargetInLogs(NodeContainerName string, TailCount string) ([]byte, error)
- func (c *Client) Flush() error
- func (c *Client) GetAccount() ([]byte, error)
- func (c *Client) GetChatChunk(streamID string) (string, error)
- func (c *Client) GetClusterInfo() ([]byte, error)
- func (c *Client) GetDatastoreSize() ([]byte, error)
- func (c *Client) GetDockerImageBuildDates() ([]byte, error)
- func (c *Client) GetFolderSize(folderPath string) ([]byte, error)
- func (c *Client) GetInstallOutput(pluginName string, params string) ([]byte, error)
- func (c *Client) GetInstallStatus(pluginName string) ([]byte, error)
- func (c *Client) GetStreamIterator(streamID string) (*StreamIterator, error)
- func (c *Client) ID() string
- func (c *Client) InstallPlugin(pluginName string, params string) ([]byte, error)
- func (c *Client) ListActivePlugins() ([]byte, error)
- func (c *Client) ListPlugins() ([]byte, error)
- func (c *Client) ManifestAvailable(poolID int) ([]byte, error)
- func (c *Client) Partition() ([]byte, error)
- func (c *Client) Ping() ([]byte, error)
- func (c *Client) PoolCancelJoin(poolID int) ([]byte, error)
- func (c *Client) PoolJoin(poolID int) ([]byte, error)
- func (c *Client) PoolJoinWithChain(poolID int, chainName string) ([]byte, error)
- func (c *Client) PoolLeave(poolID int) ([]byte, error)
- func (c *Client) PoolLeaveWithChain(poolID int, chainName string) ([]byte, error)
- func (c *Client) PoolList() ([]byte, error)
- func (c *Client) PoolRequests(poolID int) ([]byte, error)
- func (c *Client) PoolUserList(poolID int) ([]byte, error)
- func (c *Client) Reboot() ([]byte, error)
- func (c *Client) ReplicateInPool(cidsBytes []byte, account string, poolID int) []byte
- func (c *Client) SetAuth(on string, subject string, allow bool) error
- func (c *Client) ShowPluginStatus(pluginName string, lines int) ([]byte, error)
- func (c *Client) Shutdown() error
- func (c *Client) TransferToFula(amountStr string, walletAccount string, chain string) ([]byte, error)
- func (c *Client) UninstallPlugin(pluginName string) ([]byte, error)
- func (c *Client) UpdatePlugin(pluginName string) ([]byte, error)
- func (c *Client) WifiRemoveall() ([]byte, error)
- type Config
- type PluginParam
- type StreamIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEd25519Key ¶ added in v0.5.2
GenerateEd25519Key generates a random Ed25519 libp2p private key.
func GenerateEd25519KeyFromString ¶ added in v1.0.0
Types ¶
type AssetsBalanceResponse ¶ added in v1.54.8
type AssetsBalanceResponse struct {
Amount uint64 `json:"amount"`
}
type Client ¶ added in v0.4.9
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AccountBalance ¶ added in v0.8.8
AccountBalance requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) AccountCreate ¶ added in v0.8.8
AccountCreate requests blox at Config.BloxAddr to create a account.
func (*Client) AccountExists ¶ added in v0.8.8
AccountExists requests blox at Config.BloxAddr to check if the account exists or not. the addr must be a valid multiaddr that includes peer ID.
func (*Client) AccountFund ¶ added in v0.8.8
AccountFund requests blox at Config.BloxAddr to fund the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) AssetsBalance ¶ added in v1.18.0
AssetsBalance requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) BatchUploadManifest ¶ added in v1.53.0
func (*Client) BloxFreeSpace ¶ added in v0.8.8
BloxFreeSpace requests the blox avail/used free space information.
func (*Client) ChatWithAI ¶ added in v1.55.1
func (*Client) ConnectToBlox ¶ added in v0.8.0
ConnectToBlox attempts to connect to blox via the configured address with direct → relay → DHT fallback. This function can be used to check if blox is currently accessible.
func (*Client) DeleteFulaConfig ¶ added in v1.14.0
DeleteFulaConfig deletes config.yaml file
func (*Client) DeleteWifi ¶ added in v1.17.0
Reboot requests the blox to reboot
func (*Client) DisconnectWifi ¶ added in v1.17.0
Reboot requests the blox to reboot
func (*Client) EraseBlData ¶ added in v1.30.0
EraseBlData requests the blox to erase the data related to blockchain
func (*Client) FetchContainerLogs ¶ added in v1.44.0
GetAccount requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) FindBestAndTargetInLogs ¶ added in v1.54.9
func (c *Client) FindBestAndTargetInLogs(NodeContainerName string, TailCount string) ([]byte, error)
GetAccount requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) Flush ¶ added in v0.8.1
Flush guarantees that all values stored locally are synced to the baking local storage.
func (*Client) GetAccount ¶ added in v1.18.0
GetAccount requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) GetChatChunk ¶ added in v1.55.1
func (*Client) GetClusterInfo ¶ added in v1.57.2
GetClusterInfo fetches the ipfs-cluster peer ID and peer name from the blox.
func (*Client) GetDatastoreSize ¶ added in v1.48.0
func (*Client) GetDockerImageBuildDates ¶ added in v1.57.2
GetDockerImageBuildDates fetches build dates of all Docker images running on the blox.
func (*Client) GetFolderSize ¶ added in v1.45.0
GetAccount requests blox at Config.BloxAddr to get the balance of the account. the addr must be a valid multiaddr that includes peer ID.
func (*Client) GetInstallOutput ¶ added in v1.54.15
InstallPlugin requests the blox to install a specific plugin
func (*Client) GetInstallStatus ¶ added in v1.54.15
InstallPlugin requests the blox to install a specific plugin
func (*Client) GetStreamIterator ¶ added in v1.55.1
func (c *Client) GetStreamIterator(streamID string) (*StreamIterator, error)
func (*Client) InstallPlugin ¶ added in v1.54.13
InstallPlugin requests the blox to install a specific plugin
func (*Client) ListActivePlugins ¶ added in v1.54.13
func (*Client) ListPlugins ¶ added in v1.54.13
ListPlugins requests the blox to list all available plugins
func (*Client) ManifestAvailable ¶ added in v0.8.8
ManifestAvailable requests blox at Config.BloxAddr to list manifests the addr must be a valid multiaddr that includes peer ID.
func (*Client) Ping ¶ added in v1.57.0
Ping sends libp2p pings to the blox peer and returns a JSON object with results. It first ensures connectivity (direct → relay → DHT fallback), then sends 3 pings. Returns JSON: {"success": true/false, "successes": N, "avg_rtt_ms": N, "errors": [...]} Success is true if at least one ping succeeded.
func (*Client) PoolCancelJoin ¶ added in v0.8.8
PoolJoin requests blox at Config.BloxAddr to cancel a join request for a pool with the id. the addr must be a valid multiaddr that includes peer ID. Note that this call is only allowed on a user's own blox
func (*Client) PoolJoin ¶ added in v0.8.8
PoolJoin requests blox at Config.BloxAddr to join a pool with the id. the addr must be a valid multiaddr that includes peer ID. Note that this call is only allowed on a user's own blox
func (*Client) PoolJoinWithChain ¶ added in v1.55.15
PoolJoinWithChain requests blox at Config.BloxAddr to join a pool with the id on a specific chain. the addr must be a valid multiaddr that includes peer ID. Note that this call is only allowed on a user's own blox
func (*Client) PoolLeave ¶ added in v0.8.8
PoolLeave requests blox at Config.BloxAddr to leave a pool with the id. the addr must be a valid multiaddr that includes peer ID. Note that this call is only allowed on a user's own blox
func (*Client) PoolLeaveWithChain ¶ added in v1.55.15
PoolLeaveWithChain requests blox at Config.BloxAddr to leave a pool with the id on a specific chain. the addr must be a valid multiaddr that includes peer ID. Note that this call is only allowed on a user's own blox
func (*Client) PoolList ¶ added in v0.8.8
PoolList requests blox at Config.BloxAddr to list the pools. the addr must be a valid multiaddr that includes peer ID.
func (*Client) PoolRequests ¶ added in v0.8.8
PoolListRequests requests blox at Config.BloxAddr to list the join request for a pool with the id. the addr must be a valid multiaddr that includes peer ID.
func (*Client) PoolUserList ¶ added in v0.8.8
PoolUserList requests blox at Config.BloxAddr to list the input pool users. the addr must be a valid multiaddr that includes peer ID.
func (*Client) ReplicateInPool ¶ added in v1.53.0
func (*Client) SetAuth ¶ added in v0.8.3
SetAuth sets authorization on the given peer ID for the given subject.
func (*Client) ShowPluginStatus ¶ added in v1.54.13
ShowPluginStatus requests the status of a specific plugin
func (*Client) Shutdown ¶ added in v0.4.9
Shutdown closes all resources used by Client. After calling this function Client must be discarded.
func (*Client) TransferToFula ¶ added in v1.33.0
func (*Client) UninstallPlugin ¶ added in v1.54.13
UninstallPlugin requests the blox to uninstall a specific plugin
func (*Client) UpdatePlugin ¶ added in v1.54.15
func (*Client) WifiRemoveall ¶ added in v1.0.0
WifiRemoveall requests the blox to remove all saved wifis
type Config ¶ added in v0.4.9
type Config struct {
Identity []byte
StorePath string
// Exchange specifies the DAG exchange protocol for Fula mobile client. If left unspecified,
// The default FxExchange protocol is used which will attempt to make remote connections
// when links are stored and retrieved.
//
// For testing purposes, the value may be set to `noop`, in which case, no remote connections
// will be made and the requested exchange is simply logged. When the value is set to `noop`
// the BloxAddr may also be left empty.
Exchange string
BloxAddr string
// StaticRelays specifies a list of static relays used by libp2p auto-relay.
// Defaults to fx.land managed relay if unspecified.
StaticRelays []string
// ForceReachabilityPrivate configures weather the libp2p should always think that it is behind
// NAT.
ForceReachabilityPrivate bool
// DisableResourceManger sets whether to disable the libp2p resource manager.
DisableResourceManger bool
// SyncWrites assures that writes to the local datastore are flushed to the backing store as
// soon as they are written. By default, writes are not synchronized to disk until either the
// client is shut down or Client.Flush is explicitly called.
SyncWrites bool
// AllowTransientConnection allows transient connectivity via relay when direct connection is
// not possible. Defaults to enabled if unspecified.
AllowTransientConnection bool
PoolName string
BlockchainEndpoint string
// IpfsDHTLookupDisabled disables IPFS DHT peer discovery fallback.
// When false (default), the client will query the standard IPFS DHT to discover
// kubo's current addresses if direct and relay connections fail.
IpfsDHTLookupDisabled bool
}
type PluginParam ¶ added in v1.54.13
type StreamIterator ¶ added in v1.55.1
type StreamIterator struct {
// contains filtered or unexported fields
}
func NewStreamIterator ¶ added in v1.55.1
func NewStreamIterator(buffer *blockchain.StreamBuffer) *StreamIterator
func (*StreamIterator) Close ¶ added in v1.55.1
func (i *StreamIterator) Close()
Close implements automatic cleanup in Go
func (*StreamIterator) HasNext ¶ added in v1.55.1
func (i *StreamIterator) HasNext() bool
func (*StreamIterator) IsComplete ¶ added in v1.55.1
func (i *StreamIterator) IsComplete() bool
func (*StreamIterator) Next ¶ added in v1.55.1
func (i *StreamIterator) Next() (string, error)