github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/std/msg.go (about)

     1  package std
     2  
     3  import (
     4  	"github.com/gnolang/gno/tm2/pkg/crypto"
     5  )
     6  
     7  // Transactions messages must fulfill the Msg.
     8  type Msg interface {
     9  	// Return the message type.
    10  	// Must be alphanumeric or empty.
    11  	Route() string
    12  
    13  	// Returns a human-readable string for the message, intended for utilization
    14  	// within tags
    15  	Type() string
    16  
    17  	// ValidateBasic does a simple validation check that
    18  	// doesn't require access to any other information.
    19  	ValidateBasic() error
    20  
    21  	// Get the canonical byte representation of the Msg.
    22  	GetSignBytes() []byte
    23  
    24  	// Signers returns the addrs of signers that must sign.
    25  	// CONTRACT: All signatures must be present to be valid.
    26  	// CONTRACT: Returns addrs in some deterministic order.
    27  	GetSigners() []crypto.Address
    28  }