-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathbuilder.go
37 lines (32 loc) · 1.01 KB
/
builder.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package tx
import (
"cosmossdk.io/client/v2/offchain"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
typestx "github.com/cosmos/cosmos-sdk/types/tx"
)
type ExtendedTxBuilder interface {
SetExtensionOptions(...*codectypes.Any)
}
// TxBuilder defines an interface which an application-defined concrete transaction
// type must implement. Namely, it must be able to set messages, generate
// signatures, and provide canonical bytes to sign over. The transaction must
// also know how to encode itself.
type TxBuilder interface {
GetTx() typestx.Tx
GetSigningTxData() offchain.TxData
SetMsgs(...sdk.Msg) error
SetMemo(string)
SetFeeAmount([]sdk.Coin)
SetFeePayer(string)
SetGasLimit(uint64)
SetTimeoutHeight(uint64)
SetFeeGranter(string)
SetUnordered(bool)
SetSignatures(...offchain.OffchainSignature) error
SetAuxSignerData(typestx.AuxSignerData) error
}
type TxBuilderProvider interface {
NewTxBuilder() TxBuilder
WrapTxBuilder(typestx.Tx) (TxBuilder, error)
}