Documentation
¶
Index ¶
- type API
- func (api *API) Commit(ctx context.Context, blobs []da.Blob, ns da.Namespace) ([]da.Commitment, error)
- func (api *API) Get(ctx context.Context, ids []da.ID, ns da.Namespace) ([]da.Blob, error)
- func (api *API) GetIDs(ctx context.Context, height uint64, ns da.Namespace) (*da.GetIDsResult, error)
- func (api *API) GetProofs(ctx context.Context, ids []da.ID, ns da.Namespace) ([]da.Proof, error)
- func (api *API) MaxBlobSize(ctx context.Context) (uint64, error)
- func (api *API) Submit(ctx context.Context, blobs []da.Blob, gasPrice float64, ns da.Namespace) ([]da.ID, error)
- func (api *API) SubmitWithOptions(ctx context.Context, blobs []da.Blob, gasPrice float64, ns da.Namespace, ...) ([]da.ID, error)
- func (api *API) Validate(ctx context.Context, ids []da.ID, proofs []da.Proof, ns da.Namespace) ([]bool, error)
- type Client
- type Module
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Internal struct { MaxBlobSize func(ctx context.Context) (uint64, error) `perm:"read"` Get func(ctx context.Context, ids []da.ID, ns da.Namespace) ([]da.Blob, error) `perm:"read"` GetIDs func(ctx context.Context, height uint64, ns da.Namespace) (*da.GetIDsResult, error) `perm:"read"` GetProofs func(ctx context.Context, ids []da.ID, ns da.Namespace) ([]da.Proof, error) `perm:"read"` Commit func(ctx context.Context, blobs []da.Blob, ns da.Namespace) ([]da.Commitment, error) `perm:"read"` Validate func(context.Context, []da.ID, []da.Proof, da.Namespace) ([]bool, error) `perm:"read"` Submit func(context.Context, []da.Blob, float64, da.Namespace) ([]da.ID, error) `perm:"write"` SubmitWithOptions func(context.Context, []da.Blob, float64, da.Namespace, []byte) ([]da.ID, error) `perm:"write"` } }
API defines the jsonrpc service module API
func (*API) Commit ¶
func (api *API) Commit(ctx context.Context, blobs []da.Blob, ns da.Namespace) ([]da.Commitment, error)
Commit creates a Commitment for each given Blob.
func (*API) GetIDs ¶
func (api *API) GetIDs(ctx context.Context, height uint64, ns da.Namespace) (*da.GetIDsResult, error)
GetIDs returns IDs of all Blobs located in DA at given height.
func (*API) MaxBlobSize ¶
MaxBlobSize returns the max blob size
func (*API) Submit ¶
func (api *API) Submit(ctx context.Context, blobs []da.Blob, gasPrice float64, ns da.Namespace) ([]da.ID, error)
Submit submits the Blobs to Data Availability layer.
type Client ¶
type Client struct { DA API // contains filtered or unexported fields }
Client is the jsonrpc client
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a jsonrpc service that can serve the DA interface
func NewServer ¶
NewServer accepts the host address port and the DA implementation to serve as a jsonrpc service
func (*Server) RegisterService ¶
RegisterService registers a service onto the RPC server. All methods on the service will then be exposed over the RPC.
Click to show internal directories.
Click to hide internal directories.