Documentation
¶
Index ¶
- Constants
- func Bytes32ToPeerID(digestBytes32 string) (peer.ID, error)
- func GetChainConfigs() map[string]ChainConfig
- func PeerIDToBytes32(peerID peer.ID) (string, error)
- func ValidatePeerIDConversion(peerID peer.ID) error
- type AccountBalanceRequest
- type AccountBalanceResponse
- type AccountCreateRequest
- type AccountCreateResponse
- type AccountExistsRequest
- type AccountExistsResponse
- type AccountFundRequest
- type AccountFundResponse
- type AssetsBalanceRequest
- type AssetsBalanceResponse
- type AvailableAllaccountsBatchRequest
- type BatchManifest
- type BatchManifestAllaccounts
- type BatchManifestAllaccountsResponse
- type BigInt
- type Blockchain
- type ChainConfig
- type Config
- type EVMPool
- type EVMPoolListRequest
- type EVMPoolListResponse
- type FxBlockchain
- func (bl *FxBlockchain) AccountBalance(ctx context.Context, to peer.ID, r AccountBalanceRequest) ([]byte, error)
- func (bl *FxBlockchain) AccountCreate(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) AccountExists(ctx context.Context, to peer.ID, r AccountExistsRequest) ([]byte, error)
- func (bl *FxBlockchain) AccountFund(ctx context.Context, to peer.ID, r AccountFundRequest) ([]byte, error)
- func (bl *FxBlockchain) AssetsBalance(ctx context.Context, to peer.ID, r AssetsBalanceRequest) ([]byte, error)
- func (bl *FxBlockchain) BloxFreeSpace(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) ChatWithAI(ctx context.Context, to peer.ID, r wifi.ChatWithAIRequest) (*StreamBuffer, error)
- func (bl *FxBlockchain) DeleteFulaConfig(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) DeleteWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
- func (bl *FxBlockchain) DisconnectWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
- func (bl *FxBlockchain) EraseBlData(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) FetchContainerLogs(ctx context.Context, to peer.ID, r wifi.FetchContainerLogsRequest) ([]byte, error)
- func (bl *FxBlockchain) FetchUsersAndPopulateSets(ctx context.Context, topicString string, initiate bool, timeout time.Duration) error
- func (bl *FxBlockchain) FindBestAndTargetInLogs(ctx context.Context, to peer.ID, r wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
- func (bl *FxBlockchain) GetAccount(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) GetDatastoreSize(ctx context.Context, to peer.ID, r wifi.GetDatastoreSizeRequest) ([]byte, error)
- func (bl *FxBlockchain) GetFolderSize(ctx context.Context, to peer.ID, r wifi.GetFolderSizeRequest) ([]byte, error)
- func (bl *FxBlockchain) GetInstallOutput(ctx context.Context, to peer.ID, pluginName string, paramsString string) ([]byte, error)
- func (bl *FxBlockchain) GetInstallStatus(ctx context.Context, to peer.ID, pluginName string) ([]byte, error)
- func (bl *FxBlockchain) GetMemberStatus(id peer.ID) (common.MemberStatus, bool)
- func (bl *FxBlockchain) GetMembers() map[peer.ID]common.MemberStatus
- func (bl *FxBlockchain) GetPoolCreatorPeerID(ctx context.Context, poolID uint32, chainName string) (string, error)
- func (bl *FxBlockchain) HandleEVMPoolList(ctx context.Context, chainName string) (EVMPoolListResponse, error)
- func (bl *FxBlockchain) HandleGetInstallOutput(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleGetInstallStatus(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleInstallPlugin(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleIsMemberOfPool(ctx context.Context, req IsMemberOfPoolRequest) (IsMemberOfPoolResponse, error)
- func (bl *FxBlockchain) HandleListActivePlugins(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleListPlugins(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleManifestAvailableAllaccountsBatch(ctx context.Context, poolIDString string, links []ipld.Link) ([]ipld.Link, error)
- func (bl *FxBlockchain) HandleManifestBatchStore(ctx context.Context, poolIDString string, links []ipld.Link) ([]string, error)
- func (bl *FxBlockchain) HandleManifestsAvailable(ctx context.Context, poolIDString string, limit int) ([]LinkWithLimit, error)
- func (bl *FxBlockchain) HandlePoolCancelJoin(method string, action string, from peer.ID, w http.ResponseWriter, ...)
- func (bl *FxBlockchain) HandlePoolJoin(method string, action string, from peer.ID, w http.ResponseWriter, ...)
- func (bl *FxBlockchain) HandlePoolJoinRequest(ctx context.Context, from peer.ID, account string, topicString string, ...) error
- func (bl *FxBlockchain) HandlePoolLeave(method string, action string, from peer.ID, w http.ResponseWriter, ...)
- func (bl *FxBlockchain) HandlePoolList(ctx context.Context) (PoolListResponse, error)
- func (bl *FxBlockchain) HandleUninstallPlugin(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleUpdatePlugin(w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) InstallPlugin(ctx context.Context, to peer.ID, pluginName string, paramsString string) ([]byte, error)
- func (bl *FxBlockchain) IsMembersEmpty() bool
- func (bl *FxBlockchain) ListActivePlugins(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) ListPlugins(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) ManifestAvailable(ctx context.Context, to peer.ID, r ManifestAvailableRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestBatchStore(ctx context.Context, to peer.ID, r ManifestBatchStoreRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestBatchUpload(ctx context.Context, to peer.ID, r ManifestBatchUploadMobileRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemove(ctx context.Context, to peer.ID, r ManifestRemoveRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemoveStored(ctx context.Context, to peer.ID, r ManifestRemoveStoredRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemoveStorer(ctx context.Context, to peer.ID, r ManifestRemoveStorerRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestStore(ctx context.Context, to peer.ID, r ManifestStoreRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestUpload(ctx context.Context, to peer.ID, r ManifestUploadRequest) ([]byte, error)
- func (bl *FxBlockchain) Partition(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) PlugSeedIfNeeded(ctx context.Context, action string, req interface{}) interface{}
- func (bl *FxBlockchain) PoolCancelJoin(ctx context.Context, to peer.ID, r PoolCancelJoinRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolCreate(ctx context.Context, to peer.ID, r PoolCreateRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolJoin(ctx context.Context, to peer.ID, r PoolJoinRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolLeave(ctx context.Context, to peer.ID, r PoolLeaveRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolList(ctx context.Context, to peer.ID, r PoolListRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolRequests(ctx context.Context, to peer.ID, r PoolRequestsRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolUserList(ctx context.Context, to peer.ID, r PoolUserListRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolVote(ctx context.Context, to peer.ID, r PoolVoteRequest) ([]byte, error)
- func (bl *FxBlockchain) Reboot(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) ReplicateInPool(ctx context.Context, to peer.ID, r ReplicateRequest) ([]byte, error)
- func (bl *FxBlockchain) Seeded(ctx context.Context, to peer.ID, r SeededRequest) ([]byte, error)
- func (bl *FxBlockchain) SetAuth(ctx context.Context, on peer.ID, subject peer.ID, allow bool) error
- func (bl *FxBlockchain) ShowPluginStatus(ctx context.Context, pluginName string, lines int) ([]byte, error)
- func (bl *FxBlockchain) Shutdown(ctx context.Context) error
- func (bl *FxBlockchain) Start(ctx context.Context) error
- func (bl *FxBlockchain) StartPingServer(ctx context.Context) error
- func (bl *FxBlockchain) StopPingServer(ctx context.Context) error
- func (bl *FxBlockchain) TransferToFula(ctx context.Context, to peer.ID, r TransferToFulaRequest) ([]byte, error)
- func (bl *FxBlockchain) UninstallPlugin(ctx context.Context, to peer.ID, pluginName string) ([]byte, error)
- func (bl *FxBlockchain) UpdatePlugin(ctx context.Context, to peer.ID, pluginName string) ([]byte, error)
- func (bl *FxBlockchain) WifiRemoveall(ctx context.Context, to peer.ID) ([]byte, error)
- type GetAccountRequest
- type GetAccountResponse
- type GetInstallOutputRequest
- type GetInstallOutputResponse
- type GetInstallStatusRequest
- type GetInstallStatusResponse
- type InstallPluginRequest
- type InstallPluginResponse
- type IsMemberOfPoolRequest
- type IsMemberOfPoolResponse
- type KeyStorer
- type LinkWithLimit
- type ListActivePluginsRequest
- type ListActivePluginsResponse
- type ListPluginsRequest
- type ListPluginsResponse
- type Manifest
- type ManifestAvailableRequest
- type ManifestAvailableResponse
- type ManifestBatchStoreRequest
- type ManifestBatchStoreResponse
- type ManifestBatchUploadMobileRequest
- type ManifestBatchUploadRequest
- type ManifestBatchUploadResponse
- type ManifestData
- type ManifestJob
- type ManifestMetadata
- type ManifestRemoveRequest
- type ManifestRemoveResponse
- type ManifestRemoveStoredRequest
- type ManifestRemoveStoredResponse
- type ManifestRemoveStorerRequest
- type ManifestRemoveStorerResponse
- type ManifestStoreRequest
- type ManifestStoreResponse
- type ManifestUploadRequest
- type ManifestUploadResponse
- type MobileAssetsBalanceResponse
- type Option
- func WithAllowTransientConnection(t bool) Option
- func WithAuthorizedPeers(l []peer.ID) Option
- func WithAuthorizer(a peer.ID) Option
- func WithBlockchainEndPoint(b string) Option
- func WithChainName(n string) Option
- func WithFetchFrequency(t time.Duration) Option
- func WithGetChainName(getChainName func() string) Option
- func WithGetPoolName(getPoolName func() string) Option
- func WithIpfsClient(n *rpc.HttpApi) Option
- func WithIpfsClusterAPI(n ipfsCluster.Client) Option
- func WithMaxPingTime(t int) Option
- func WithMinSuccessPingCount(sr int) Option
- func WithRelays(r []string) Option
- func WithSecretsPath(b string) Option
- func WithTimeout(to int) Option
- func WithTopicName(n string) Option
- func WithUpdateChainName(updateChainName func(string) error) Option
- func WithUpdatePoolName(updatePoolName func(string) error) Option
- func WithWg(wg *sync.WaitGroup) Option
- type PingResponse
- type PluginInfo
- type PluginParam
- type Pool
- type PoolCancelJoinRequest
- type PoolCancelJoinResponse
- type PoolCreateRequest
- type PoolCreateResponse
- type PoolJoinRequest
- type PoolJoinResponse
- type PoolLeaveRequest
- type PoolLeaveResponse
- type PoolListRequest
- type PoolListRequestWithPoolId
- type PoolListResponse
- type PoolRequest
- type PoolRequestsRequest
- type PoolRequestsResponse
- type PoolUserListRequest
- type PoolUserListResponse
- type PoolVoteRequest
- type PoolVoteResponse
- type ReplicateRequest
- type ReplicateResponse
- type SeededRequest
- type SeededResponse
- type ShowPluginStatusRequest
- type ShowPluginStatusResponse
- type SimpleKeyStorer
- type StreamBuffer
- type TransferToFulaRequest
- type TransferToFulaResponse
- type UninstallPluginRequest
- type UninstallPluginResponse
- type UpdatePluginRequest
- type UpdatePluginResponse
- type User
Constants ¶
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
const (
FxBlockchainProtocolID = "/fx.land/blockchain/0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
func Bytes32ToPeerID ¶ added in v1.55.15
Bytes32ToPeerID is the public wrapper for bytes32ToPeerId that returns a peer.ID
func GetChainConfigs ¶ added in v1.55.15
func GetChainConfigs() map[string]ChainConfig
GetChainConfigs returns the available chain configurations
func PeerIDToBytes32 ¶ added in v1.55.15
PeerIDToBytes32 is the public wrapper for peerIdToBytes32
func ValidatePeerIDConversion ¶ added in v1.55.15
ValidatePeerIDConversion validates that a PeerID can be converted to bytes32 and back
Types ¶
type AccountBalanceRequest ¶
type AccountBalanceRequest struct {
Account string `json:"account"`
}
type AccountBalanceResponse ¶
type AccountBalanceResponse struct {
Amount string `json:"amount"`
}
type AccountCreateRequest ¶
type AccountCreateRequest struct {
Account string `json:"account"`
}
type AccountCreateResponse ¶
type AccountCreateResponse struct {
Account string `json:"account"`
}
type AccountExistsRequest ¶
type AccountExistsRequest struct {
Account string `json:"account"`
}
type AccountExistsResponse ¶
type AccountFundRequest ¶
type AccountFundResponse ¶
type AssetsBalanceRequest ¶ added in v1.18.0
type AssetsBalanceResponse ¶ added in v1.18.0
type AssetsBalanceResponse struct {
Amount uint64 `json:"amount"`
}
type AvailableAllaccountsBatchRequest ¶ added in v1.54.9
type BatchManifest ¶ added in v1.53.0
type BatchManifestAllaccounts ¶ added in v1.54.9
type BatchManifestAllaccounts struct {
Cid string `json:"cid"`
}
type BatchManifestAllaccountsResponse ¶ added in v1.54.9
type BatchManifestAllaccountsResponse struct {
Manifests []BatchManifestAllaccounts `json:"manifests"`
}
type Blockchain ¶
type Blockchain interface {
Seeded(context.Context, peer.ID, SeededRequest) ([]byte, error)
AccountExists(context.Context, peer.ID, AccountExistsRequest) ([]byte, error)
AccountCreate(context.Context, peer.ID) ([]byte, error)
AccountFund(context.Context, peer.ID, AccountFundRequest) ([]byte, error)
AccountBalance(context.Context, peer.ID, AccountBalanceRequest) ([]byte, error)
AssetsBalance(context.Context, peer.ID, AssetsBalanceRequest) ([]byte, error)
TransferToFula(context.Context, peer.ID, TransferToFulaRequest) ([]byte, error)
PoolCreate(context.Context, peer.ID, PoolCreateRequest) ([]byte, error)
PoolJoin(context.Context, peer.ID, PoolJoinRequest) ([]byte, error)
PoolCancelJoin(context.Context, peer.ID, PoolCancelJoinRequest) ([]byte, error)
PoolRequests(context.Context, peer.ID, PoolRequestsRequest) ([]byte, error)
PoolList(context.Context, peer.ID, PoolListRequest) ([]byte, error)
PoolUserList(context.Context, peer.ID, PoolUserListRequest) ([]byte, error)
PoolVote(context.Context, peer.ID, PoolVoteRequest) ([]byte, error)
PoolLeave(context.Context, peer.ID, PoolLeaveRequest) ([]byte, error)
ManifestUpload(context.Context, peer.ID, ManifestUploadRequest) ([]byte, error)
ManifestBatchStore(context.Context, peer.ID, ManifestBatchStoreRequest) ([]byte, error)
ManifestBatchUpload(context.Context, peer.ID, ManifestBatchUploadMobileRequest) ([]byte, error)
ReplicateInPool(context.Context, peer.ID, ReplicateRequest) ([]byte, error)
ManifestStore(context.Context, peer.ID, ManifestStoreRequest) ([]byte, error)
ManifestAvailable(context.Context, peer.ID, ManifestAvailableRequest) ([]byte, error)
ManifestRemove(context.Context, peer.ID, ManifestRemoveRequest) ([]byte, error)
ManifestRemoveStorer(context.Context, peer.ID, ManifestRemoveStorerRequest) ([]byte, error)
ManifestRemoveStored(context.Context, peer.ID, ManifestRemoveStoredRequest) ([]byte, error)
SetAuth(context.Context, peer.ID, peer.ID, bool) error
//Hardware
BloxFreeSpace(context.Context, peer.ID) ([]byte, error)
EraseBlData(context.Context, peer.ID) ([]byte, error)
WifiRemoveall(context.Context, peer.ID) ([]byte, error)
Reboot(context.Context, peer.ID) ([]byte, error)
DeleteWifi(context.Context, peer.ID, wifi.DeleteWifiRequest) ([]byte, error)
DisconnectWifi(context.Context, peer.ID, wifi.DeleteWifiRequest) ([]byte, error)
Partition(context.Context, peer.ID) ([]byte, error)
DeleteFulaConfig(context.Context, peer.ID) ([]byte, error)
GetAccount(context.Context, peer.ID) ([]byte, error)
FetchContainerLogs(context.Context, peer.ID, wifi.FetchContainerLogsRequest) ([]byte, error)
FindBestAndTargetInLogs(context.Context, peer.ID, wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
GetFolderSize(context.Context, peer.ID, wifi.GetFolderSizeRequest) ([]byte, error)
GetDatastoreSize(context.Context, peer.ID, wifi.GetDatastoreSizeRequest) ([]byte, error)
//Plugins
ListPlugins(context.Context, peer.ID) ([]byte, error)
ListActivePlugins(context.Context, peer.ID) ([]byte, error)
InstallPlugin(context.Context, peer.ID, string, string) ([]byte, error)
UninstallPlugin(context.Context, peer.ID, string) ([]byte, error)
ShowPluginStatus(context.Context, string, int) ([]byte, error)
GetInstallOutput(context.Context, peer.ID, string, string) ([]byte, error)
GetInstallStatus(context.Context, peer.ID, string) ([]byte, error)
UpdatePlugin(context.Context, peer.ID, string) ([]byte, error)
// AI
ChatWithAI(context.Context, peer.ID, wifi.ChatWithAIRequest) (*StreamBuffer, error)
}
type ChainConfig ¶ added in v1.55.15
ChainConfig represents the configuration for an EVM chain
type EVMPool ¶ added in v1.55.15
type EVMPool struct {
Creator string `json:"creator"`
ID uint32 `json:"id"`
MaxChallengeResponsePeriod uint32 `json:"maxChallengeResponsePeriod"`
MemberCount uint32 `json:"memberCount"`
MaxMembers uint32 `json:"maxMembers"`
RequiredTokens string `json:"requiredTokens"` // Using string for big numbers
MinPingTime string `json:"minPingTime"` // Using string for big numbers
Name string `json:"name"`
Region string `json:"region"`
ChainName string `json:"chainName"`
}
type EVMPoolListRequest ¶ added in v1.55.15
type EVMPoolListRequest struct {
ChainName string `json:"chain_name"`
}
EVM Chain specific structures
type EVMPoolListResponse ¶ added in v1.55.15
type EVMPoolListResponse struct {
Pools []EVMPool `json:"pools"`
}
type FxBlockchain ¶
type FxBlockchain struct {
// contains filtered or unexported fields
}
func NewFxBlockchain ¶
func NewFxBlockchain(h host.Host, p *ping.FxPing, a *announcements.FxAnnouncements, keyStorer KeyStorer, o ...Option) (*FxBlockchain, error)
func NewTestBlockchain ¶ added in v1.55.17
func NewTestBlockchain(timeout int) *FxBlockchain
NewTestBlockchain creates a minimal FxBlockchain instance for testing EVM calls. This instance can be used to test HandleEVMPoolList and HandleIsMemberOfPool without requiring a full libp2p host.
func (*FxBlockchain) AccountBalance ¶
func (bl *FxBlockchain) AccountBalance(ctx context.Context, to peer.ID, r AccountBalanceRequest) ([]byte, error)
func (*FxBlockchain) AccountCreate ¶
func (*FxBlockchain) AccountExists ¶
func (bl *FxBlockchain) AccountExists(ctx context.Context, to peer.ID, r AccountExistsRequest) ([]byte, error)
func (*FxBlockchain) AccountFund ¶
func (bl *FxBlockchain) AccountFund(ctx context.Context, to peer.ID, r AccountFundRequest) ([]byte, error)
func (*FxBlockchain) AssetsBalance ¶ added in v1.18.0
func (bl *FxBlockchain) AssetsBalance(ctx context.Context, to peer.ID, r AssetsBalanceRequest) ([]byte, error)
func (*FxBlockchain) BloxFreeSpace ¶
func (*FxBlockchain) ChatWithAI ¶ added in v1.55.1
func (bl *FxBlockchain) ChatWithAI(ctx context.Context, to peer.ID, r wifi.ChatWithAIRequest) (*StreamBuffer, error)
func (*FxBlockchain) DeleteFulaConfig ¶ added in v1.14.0
func (*FxBlockchain) DeleteWifi ¶ added in v1.17.0
func (bl *FxBlockchain) DeleteWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
func (*FxBlockchain) DisconnectWifi ¶ added in v1.17.0
func (bl *FxBlockchain) DisconnectWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
func (*FxBlockchain) EraseBlData ¶ added in v1.30.0
func (*FxBlockchain) FetchContainerLogs ¶ added in v1.44.0
func (bl *FxBlockchain) FetchContainerLogs(ctx context.Context, to peer.ID, r wifi.FetchContainerLogsRequest) ([]byte, error)
func (*FxBlockchain) FetchUsersAndPopulateSets ¶ added in v1.15.0
func (bl *FxBlockchain) FetchUsersAndPopulateSets(ctx context.Context, topicString string, initiate bool, timeout time.Duration) error
FetchUsersAndPopulateSets fetches pool members and updates the local members map This method is optimized for production use with EVM chains and no voting logic
func (*FxBlockchain) FindBestAndTargetInLogs ¶ added in v1.54.9
func (bl *FxBlockchain) FindBestAndTargetInLogs(ctx context.Context, to peer.ID, r wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
func (*FxBlockchain) GetAccount ¶ added in v1.18.0
func (*FxBlockchain) GetDatastoreSize ¶ added in v1.48.0
func (bl *FxBlockchain) GetDatastoreSize(ctx context.Context, to peer.ID, r wifi.GetDatastoreSizeRequest) ([]byte, error)
func (*FxBlockchain) GetFolderSize ¶ added in v1.45.0
func (bl *FxBlockchain) GetFolderSize(ctx context.Context, to peer.ID, r wifi.GetFolderSizeRequest) ([]byte, error)
func (*FxBlockchain) GetInstallOutput ¶ added in v1.54.15
func (*FxBlockchain) GetInstallStatus ¶ added in v1.54.15
func (*FxBlockchain) GetMemberStatus ¶ added in v1.15.0
func (bl *FxBlockchain) GetMemberStatus(id peer.ID) (common.MemberStatus, bool)
func (*FxBlockchain) GetMembers ¶ added in v1.15.0
func (bl *FxBlockchain) GetMembers() map[peer.ID]common.MemberStatus
func (*FxBlockchain) GetPoolCreatorPeerID ¶ added in v1.55.15
func (bl *FxBlockchain) GetPoolCreatorPeerID(ctx context.Context, poolID uint32, chainName string) (string, error)
GetPoolCreatorPeerID retrieves the creator's peer ID for a specific pool on a specific chain
func (*FxBlockchain) HandleEVMPoolList ¶ added in v1.55.15
func (bl *FxBlockchain) HandleEVMPoolList(ctx context.Context, chainName string) (EVMPoolListResponse, error)
HandleEVMPoolList retrieves pool list from EVM chains (Base/Skale)
func (*FxBlockchain) HandleGetInstallOutput ¶ added in v1.54.15
func (bl *FxBlockchain) HandleGetInstallOutput(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleGetInstallStatus ¶ added in v1.54.15
func (bl *FxBlockchain) HandleGetInstallStatus(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleInstallPlugin ¶ added in v1.54.13
func (bl *FxBlockchain) HandleInstallPlugin(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleIsMemberOfPool ¶ added in v1.55.15
func (bl *FxBlockchain) HandleIsMemberOfPool(ctx context.Context, req IsMemberOfPoolRequest) (IsMemberOfPoolResponse, error)
HandleIsMemberOfPool checks if a peer is a member of a specific pool on a specific chain
func (*FxBlockchain) HandleListActivePlugins ¶ added in v1.54.13
func (bl *FxBlockchain) HandleListActivePlugins(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleListPlugins ¶ added in v1.54.13
func (bl *FxBlockchain) HandleListPlugins(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleManifestAvailableAllaccountsBatch ¶ added in v1.54.9
func (*FxBlockchain) HandleManifestBatchStore ¶ added in v1.16.0
func (*FxBlockchain) HandleManifestsAvailable ¶ added in v1.16.0
func (bl *FxBlockchain) HandleManifestsAvailable(ctx context.Context, poolIDString string, limit int) ([]LinkWithLimit, error)
func (*FxBlockchain) HandlePoolCancelJoin ¶ added in v1.41.0
func (bl *FxBlockchain) HandlePoolCancelJoin(method string, action string, from peer.ID, w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandlePoolJoin ¶ added in v1.41.0
func (bl *FxBlockchain) HandlePoolJoin(method string, action string, from peer.ID, w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandlePoolJoinRequest ¶ added in v1.15.0
func (*FxBlockchain) HandlePoolLeave ¶ added in v1.55.15
func (bl *FxBlockchain) HandlePoolLeave(method string, action string, from peer.ID, w http.ResponseWriter, r *http.Request)
HandlePoolLeave handles pool leave requests with chain support
func (*FxBlockchain) HandlePoolList ¶ added in v1.54.8
func (bl *FxBlockchain) HandlePoolList(ctx context.Context) (PoolListResponse, error)
func (*FxBlockchain) HandleUninstallPlugin ¶ added in v1.54.13
func (bl *FxBlockchain) HandleUninstallPlugin(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleUpdatePlugin ¶ added in v1.54.15
func (bl *FxBlockchain) HandleUpdatePlugin(w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) InstallPlugin ¶ added in v1.54.13
func (*FxBlockchain) IsMembersEmpty ¶ added in v1.15.0
func (bl *FxBlockchain) IsMembersEmpty() bool
func (*FxBlockchain) ListActivePlugins ¶ added in v1.54.13
func (*FxBlockchain) ListPlugins ¶ added in v1.54.13
func (*FxBlockchain) ManifestAvailable ¶
func (bl *FxBlockchain) ManifestAvailable(ctx context.Context, to peer.ID, r ManifestAvailableRequest) ([]byte, error)
func (*FxBlockchain) ManifestBatchStore ¶ added in v1.53.0
func (bl *FxBlockchain) ManifestBatchStore(ctx context.Context, to peer.ID, r ManifestBatchStoreRequest) ([]byte, error)
func (*FxBlockchain) ManifestBatchUpload ¶ added in v1.53.0
func (bl *FxBlockchain) ManifestBatchUpload(ctx context.Context, to peer.ID, r ManifestBatchUploadMobileRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemove ¶
func (bl *FxBlockchain) ManifestRemove(ctx context.Context, to peer.ID, r ManifestRemoveRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemoveStored ¶
func (bl *FxBlockchain) ManifestRemoveStored(ctx context.Context, to peer.ID, r ManifestRemoveStoredRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemoveStorer ¶
func (bl *FxBlockchain) ManifestRemoveStorer(ctx context.Context, to peer.ID, r ManifestRemoveStorerRequest) ([]byte, error)
func (*FxBlockchain) ManifestStore ¶
func (bl *FxBlockchain) ManifestStore(ctx context.Context, to peer.ID, r ManifestStoreRequest) ([]byte, error)
func (*FxBlockchain) ManifestUpload ¶
func (bl *FxBlockchain) ManifestUpload(ctx context.Context, to peer.ID, r ManifestUploadRequest) ([]byte, error)
func (*FxBlockchain) PlugSeedIfNeeded ¶
func (bl *FxBlockchain) PlugSeedIfNeeded(ctx context.Context, action string, req interface{}) interface{}
func (*FxBlockchain) PoolCancelJoin ¶
func (bl *FxBlockchain) PoolCancelJoin(ctx context.Context, to peer.ID, r PoolCancelJoinRequest) ([]byte, error)
func (*FxBlockchain) PoolCreate ¶
func (bl *FxBlockchain) PoolCreate(ctx context.Context, to peer.ID, r PoolCreateRequest) ([]byte, error)
func (*FxBlockchain) PoolJoin ¶
func (bl *FxBlockchain) PoolJoin(ctx context.Context, to peer.ID, r PoolJoinRequest) ([]byte, error)
func (*FxBlockchain) PoolLeave ¶
func (bl *FxBlockchain) PoolLeave(ctx context.Context, to peer.ID, r PoolLeaveRequest) ([]byte, error)
func (*FxBlockchain) PoolList ¶
func (bl *FxBlockchain) PoolList(ctx context.Context, to peer.ID, r PoolListRequest) ([]byte, error)
func (*FxBlockchain) PoolRequests ¶
func (bl *FxBlockchain) PoolRequests(ctx context.Context, to peer.ID, r PoolRequestsRequest) ([]byte, error)
func (*FxBlockchain) PoolUserList ¶
func (bl *FxBlockchain) PoolUserList(ctx context.Context, to peer.ID, r PoolUserListRequest) ([]byte, error)
func (*FxBlockchain) PoolVote ¶
func (bl *FxBlockchain) PoolVote(ctx context.Context, to peer.ID, r PoolVoteRequest) ([]byte, error)
func (*FxBlockchain) ReplicateInPool ¶ added in v1.53.0
func (bl *FxBlockchain) ReplicateInPool(ctx context.Context, to peer.ID, r ReplicateRequest) ([]byte, error)
func (*FxBlockchain) Seeded ¶
func (bl *FxBlockchain) Seeded(ctx context.Context, to peer.ID, r SeededRequest) ([]byte, error)
func (*FxBlockchain) ShowPluginStatus ¶ added in v1.54.13
func (*FxBlockchain) StartPingServer ¶ added in v1.15.0
func (bl *FxBlockchain) StartPingServer(ctx context.Context) error
func (*FxBlockchain) StopPingServer ¶ added in v1.15.0
func (bl *FxBlockchain) StopPingServer(ctx context.Context) error
func (*FxBlockchain) TransferToFula ¶ added in v1.33.0
func (bl *FxBlockchain) TransferToFula(ctx context.Context, to peer.ID, r TransferToFulaRequest) ([]byte, error)
func (*FxBlockchain) UninstallPlugin ¶ added in v1.54.13
func (*FxBlockchain) UpdatePlugin ¶ added in v1.54.15
func (*FxBlockchain) WifiRemoveall ¶ added in v1.0.0
type GetAccountRequest ¶ added in v1.18.0
type GetAccountRequest struct {
}
type GetAccountResponse ¶ added in v1.18.0
type GetAccountResponse struct {
Account string `json:"account"`
}
type GetInstallOutputRequest ¶ added in v1.54.15
type GetInstallOutputRequest struct {
PluginName string `json:"plugin_name"`
Params string `json:"params"`
}
GetInstallOutput
type GetInstallOutputResponse ¶ added in v1.54.15
type GetInstallStatusRequest ¶ added in v1.54.15
type GetInstallStatusRequest struct {
PluginName string `json:"plugin_name"`
}
GetInstallStatus
type GetInstallStatusResponse ¶ added in v1.54.15
type GetInstallStatusResponse struct {
Status string `json:"status"`
}
type InstallPluginRequest ¶ added in v1.54.13
type InstallPluginRequest struct {
PluginName string `json:"plugin_name"`
Params string `json:"params"`
}
InstallPlugin
type InstallPluginResponse ¶ added in v1.54.13
type IsMemberOfPoolRequest ¶ added in v1.55.15
type IsMemberOfPoolResponse ¶ added in v1.55.15
type KeyStorer ¶
type KeyStorer interface {
SaveKey(ctx context.Context, key string) error
LoadKey(ctx context.Context) (string, error)
}
Implementations for this interface should be responsible for saving/loading a single key.
type LinkWithLimit ¶ added in v1.16.0
type ListActivePluginsRequest ¶ added in v1.54.13
type ListActivePluginsRequest struct{}
type ListActivePluginsResponse ¶ added in v1.54.13
type ListActivePluginsResponse struct {
ActivePlugins []string `json:"active_plugins"`
}
type ListPluginsResponse ¶ added in v1.54.13
type ListPluginsResponse struct {
Plugins []PluginInfo `json:"plugins"`
}
type Manifest ¶
type Manifest struct {
PoolID int `json:"pool_id"`
ReplicationAvailable int `json:"replication_available"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
}
type ManifestAvailableRequest ¶
type ManifestAvailableRequest struct {
PoolID int `json:"pool_id"`
}
type ManifestAvailableResponse ¶
type ManifestAvailableResponse struct {
Manifests []Manifest `json:"manifests"`
}
type ManifestBatchStoreRequest ¶ added in v1.16.0
type ManifestBatchStoreResponse ¶ added in v1.16.0
type ManifestBatchUploadMobileRequest ¶ added in v1.53.0
type ManifestBatchUploadRequest ¶ added in v1.53.0
type ManifestBatchUploadRequest struct {
Cid []string `json:"cid"`
PoolID int `json:"pool_id"`
ReplicationFactor []int `json:"replication_factor"`
ManifestMetadata []ManifestMetadata `json:"manifest_metadata"`
}
type ManifestBatchUploadResponse ¶ added in v1.53.0
type ManifestData ¶
type ManifestData struct {
Uploader string `json:"uploader"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
}
type ManifestJob ¶
type ManifestMetadata ¶
type ManifestMetadata struct {
Job ManifestJob `json:"job"`
}
type ManifestRemoveRequest ¶
type ManifestRemoveResponse ¶
type ManifestStoreRequest ¶
type ManifestStoreResponse ¶
type ManifestUploadRequest ¶
type ManifestUploadRequest struct {
PoolID int `json:"pool_id"`
ReplicationFactor int `json:"replication_factor"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
Cid string `json:"cid"`
}
type ManifestUploadResponse ¶
type ManifestUploadResponse struct {
Uploader string `json:"uploader"`
Storage []string `json:"storage"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
PoolID int `json:"pool_id"`
}
type MobileAssetsBalanceResponse ¶ added in v1.54.8
type MobileAssetsBalanceResponse struct {
Amount string `json:"amount"`
}
type Option ¶
type Option func(*options) error
func WithAuthorizedPeers ¶ added in v1.14.0
func WithAuthorizer ¶
func WithBlockchainEndPoint ¶
func WithChainName ¶ added in v1.55.15
func WithFetchFrequency ¶ added in v1.15.0
func WithGetChainName ¶ added in v1.55.15
func WithGetPoolName ¶ added in v1.54.8
func WithIpfsClient ¶ added in v1.48.0
func WithIpfsClusterAPI ¶ added in v1.53.0
func WithIpfsClusterAPI(n ipfsCluster.Client) Option
func WithMaxPingTime ¶ added in v1.15.0
func WithMinSuccessPingCount ¶ added in v1.15.0
func WithRelays ¶ added in v1.15.0
WithStoreDir sets a the store directory we are using for datastore Required.
func WithSecretsPath ¶ added in v1.41.0
func WithTimeout ¶
func WithTopicName ¶ added in v1.15.0
func WithUpdateChainName ¶ added in v1.55.15
func WithUpdatePoolName ¶ added in v1.15.0
type PingResponse ¶ added in v1.53.0
type PluginInfo ¶ added in v1.54.13
type PluginInfo struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Usage struct {
Storage string `json:"storage"`
Compute string `json:"compute"`
Bandwidth string `json:"bandwidth"`
RAM string `json:"ram"`
GPU string `json:"gpu"`
} `json:"usage"`
Rewards []map[string]string `json:"rewards"`
Socials []map[string]string `json:"socials"`
Approved bool `json:"approved"`
Installed bool `json:"installed"`
}
type PluginParam ¶ added in v1.54.13
type PoolCancelJoinRequest ¶
type PoolCancelJoinRequest struct {
PoolID int `json:"pool_id"`
}
type PoolCancelJoinResponse ¶
type PoolCreateRequest ¶
type PoolCreateResponse ¶
type PoolJoinRequest ¶
type PoolJoinResponse ¶
type PoolLeaveRequest ¶
type PoolLeaveResponse ¶
type PoolListRequest ¶
type PoolListRequest struct {
}
type PoolListRequestWithPoolId ¶ added in v1.53.0
type PoolListRequestWithPoolId struct {
PoolID int `json:"pool_id"`
}
type PoolListResponse ¶
type PoolListResponse struct {
Pools []Pool `json:"pools"`
}
type PoolRequest ¶
type PoolRequestsRequest ¶
type PoolRequestsRequest struct {
PoolID int `json:"pool_id"`
}
type PoolRequestsResponse ¶
type PoolRequestsResponse struct {
PoolRequests []PoolRequest `json:"poolrequests"`
}
type PoolUserListRequest ¶
type PoolUserListResponse ¶
type PoolUserListResponse struct {
Users []User `json:"users"`
}
type PoolVoteRequest ¶
type PoolVoteResponse ¶
type ReplicateRequest ¶ added in v1.53.0
type ReplicateResponse ¶ added in v1.53.0
type ReplicateResponse struct {
Manifests []BatchManifest `json:"manifests"`
}
type SeededRequest ¶
type SeededRequest struct {
}
type SeededResponse ¶
type ShowPluginStatusRequest ¶ added in v1.54.13
type ShowPluginStatusRequest struct {
PluginName string `json:"plugin_name"`
Lines int `json:"lines"`
Follow bool `json:"follow"`
}
ShowPluginStatus
type ShowPluginStatusResponse ¶ added in v1.54.13
type ShowPluginStatusResponse struct {
Status []string `json:"status"`
}
type SimpleKeyStorer ¶
type SimpleKeyStorer struct {
// contains filtered or unexported fields
}
func NewSimpleKeyStorer ¶
func NewSimpleKeyStorer(dbPath string) *SimpleKeyStorer
type StreamBuffer ¶ added in v1.55.1
type StreamBuffer struct {
Chunks chan string
// contains filtered or unexported fields
}
func NewStreamBuffer ¶ added in v1.55.1
func NewStreamBuffer() *StreamBuffer
func (*StreamBuffer) AddChunk ¶ added in v1.55.1
func (b *StreamBuffer) AddChunk(chunk string)
func (*StreamBuffer) Close ¶ added in v1.55.1
func (b *StreamBuffer) Close(err error)
func (*StreamBuffer) GetChunk ¶ added in v1.55.1
func (b *StreamBuffer) GetChunk() (string, error)
func (*StreamBuffer) IsClosed ¶ added in v1.55.1
func (b *StreamBuffer) IsClosed() bool
type TransferToFulaRequest ¶ added in v1.33.0
type TransferToFulaResponse ¶ added in v1.33.0
type UninstallPluginRequest ¶ added in v1.54.13
type UninstallPluginRequest struct {
PluginName string `json:"plugin_name"`
}
UninstallPlugin
type UninstallPluginResponse ¶ added in v1.54.13
type UpdatePluginRequest ¶ added in v1.54.15
type UpdatePluginRequest struct {
PluginName string `json:"plugin_name"`
}