forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5513927
commit b38d3ae
Showing
8 changed files
with
250 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package client | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
type ( | ||
// ClientMarshaler defines an interface that REST and CLI handler will use to | ||
// create application-specific transactions and be able to serialize types | ||
// specific to the application including transactions. | ||
ClientMarshaler interface { | ||
TxGenerator | ||
codec.Marshaler | ||
} | ||
|
||
// TxGenerator defines an interface a client can utilize to generate an | ||
// application-defined concrete transaction type. The type returned must | ||
// implement ClientTx. | ||
TxGenerator interface { | ||
NewTx() ClientTx | ||
} | ||
|
||
// ClientTx 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. | ||
ClientTx interface { | ||
sdk.Tx | ||
codec.ProtoMarshaler | ||
|
||
SetMsgs(...sdk.Msg) error | ||
GetSignatures() []sdk.Signature | ||
SetSignatures(...sdk.Signature) | ||
GetFee() sdk.Fee | ||
SetFee(sdk.Fee) | ||
GetMemo() string | ||
SetMemo(string) | ||
|
||
CanonicalSignBytes(cid string, num, seq uint64) ([]byte, error) | ||
} | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters