55
66 sdktypes "github.com/cosmos/cosmos-sdk/types"
77
8+ appfibre "github.com/celestiaorg/celestia-app/v8/fibre"
89 libshare "github.com/celestiaorg/go-square/v4/share"
910
1011 "github.com/celestiaorg/celestia-node/fibre"
@@ -20,32 +21,34 @@ var _ Module = (*API)(nil)
2021//
2122//go:generate mockgen -destination=mocks/api.go -package=mocks . Module
2223type Module interface {
23- // Submit submits a blob via the Fibre network.
24+ // Submit submits a v0 Fibre blob via the Fibre network.
2425 // It performs the full Fibre flow: uploads blob data to FSPs, aggregates validator
2526 // availability signatures, and submits MsgPayForFibre on-chain.
2627 // Returns the submission result including the on-chain height and transaction hash.
2728 // Requires the node to be connected to a core endpoint with Fibre support.
28- Submit (_ context.Context , _ libshare.Namespace , _ []byte , _ * txclient.TxConfig ) (* SubmitResult , error )
29- // Upload performs the off-chain portion of Fibre blob submission only.
29+ // NOTE: Currently only v0 Fibre blobs are supported.
30+ Submit (context.Context , libshare.Namespace , []byte , * txclient.TxConfig ) (* SubmitResult , error )
31+ // Upload performs the off-chain portion of v0 Fibre blob submission only.
3032 // It encodes the blob, constructs a payment promise, uploads encoded rows to FSPs,
3133 // and aggregates validator availability signatures. It does NOT submit MsgPayForFibre on-chain.
32- // Use blob.SubmitFibreBlob for the full submit flow.
33- Upload (_ context.Context , _ libshare.Namespace , _ []byte , _ * txclient.TxConfig ) (* UploadResult , error )
34- // Get retrieves a Fibre blob from FSPs by blobID.
34+ // Use fibre.Submit for the full submit flow.
35+ // NOTE: Currently only v0 Fibre blobs are supported.
36+ Upload (context.Context , libshare.Namespace , []byte , * txclient.TxConfig ) (* UploadResult , error )
37+ // Download retrieves a Fibre blob from FSPs by blobID.
3538 // It reconstructs the original blob data from the encoded rows stored off-chain.
36- Get ( ctx context.Context , blobID [] byte ) (* GetBlobResult , error )
39+ Download ( context.Context , appfibre. BlobID ) (* GetBlobResult , error )
3740 // QueryEscrowAccount returns the escrow account details for the given signer address,
3841 // including total balance and available (spendable) balance.
39- QueryEscrowAccount (ctx context.Context , signer string ) (* fibre.EscrowAccount , error )
42+ QueryEscrowAccount (_ context.Context , signer string ) (* fibre.EscrowAccount , error )
4043 // Deposit adds funds to the node's Fibre escrow account.
4144 // The signer is resolved from cfg (SignerAddress or KeyName) or the node's default account.
42- Deposit (ctx context.Context , amount sdktypes.Coin , cfg * txclient.TxConfig ) error
45+ Deposit (context.Context , sdktypes.Coin , * txclient.TxConfig ) error
4346 // Withdraw requests a withdrawal from the node's Fibre escrow account.
4447 // The signer is resolved from cfg (SignerAddress or KeyName) or the node's default account.
4548 // The withdrawal enters an unbonding period before funds become claimable.
46- Withdraw (ctx context.Context , amount sdktypes.Coin , cfg * txclient.TxConfig ) error
49+ Withdraw (context.Context , sdktypes.Coin , * txclient.TxConfig ) error
4750 // PendingWithdrawals returns all pending (not yet claimable) withdrawals for the given signer.
48- PendingWithdrawals (ctx context.Context , signer string ) ([]fibre.PendingWithdrawal , error )
51+ PendingWithdrawals (_ context.Context , signer string ) ([]fibre.PendingWithdrawal , error )
4952}
5053
5154// API is a wrapper around Module for the RPC.
@@ -63,9 +66,9 @@ type API struct {
6366 data []byte ,
6467 config * txclient.TxConfig ,
6568 ) (* UploadResult , error ) `perm:"write"`
66- Get func (
69+ Download func (
6770 ctx context.Context ,
68- blobID [] byte ,
71+ blobID appfibre. BlobID ,
6972 ) (* GetBlobResult , error ) `perm:"read"`
7073 QueryEscrowAccount func (
7174 ctx context.Context ,
@@ -106,8 +109,8 @@ func (api *API) Upload(
106109 return api .Internal .Upload (ctx , ns , data , options )
107110}
108111
109- func (api * API ) Get (ctx context.Context , blobID [] byte ) (* GetBlobResult , error ) {
110- return api .Internal .Get (ctx , blobID )
112+ func (api * API ) Download (ctx context.Context , blobID appfibre. BlobID ) (* GetBlobResult , error ) {
113+ return api .Internal .Download (ctx , blobID )
111114}
112115
113116func (api * API ) QueryEscrowAccount (ctx context.Context , signer string ) (* fibre.EscrowAccount , error ) {
0 commit comments