Documentation ¶
Index ¶
- Constants
- Variables
- func IsFaucetReq(blk *tangleold.Block) bool
- type Payload
- func (p *Payload) AccessManaPledgeID() identity.ID
- func (p *Payload) Address() devnetvm.Address
- func (p *Payload) ConsensusManaPledgeID() identity.ID
- func (p *Payload) SetAccessManaPledgeID(id identity.ID)
- func (p *Payload) SetConsensusManaPledgeID(id identity.ID)
- func (p *Payload) Type() payload.Type
Constants ¶
const (
// ObjectName defines the name of the faucet object (payload).
ObjectName = "faucet"
)
Variables ¶
var (
RequestType = payload.NewType(payloadType, ObjectName)
)
RequestType represents the identifier for the faucet Payload type.
Functions ¶
func IsFaucetReq ¶
IsFaucetReq checks if the block is faucet payload.
Types ¶
type Payload ¶
Payload represents a faucet request which contains an address for the faucet to send funds to.
func FromBytes ¶
FromBytes parses the marshaled version of a Payload into a Go object. It either returns a new Payload or fills an optionally provided Payload with the parsed information.
func NewRequest ¶
func NewRequest(addr devnetvm.Address, accessManaPledgeID, consensusManaPledgeID identity.ID, nonce uint64) *Payload
NewRequest is the constructor of a Payload and creates a new Payload object from the given details.
func (*Payload) AccessManaPledgeID ¶
AccessManaPledgeID returns the access mana pledge ID of the faucet request.
func (*Payload) ConsensusManaPledgeID ¶
ConsensusManaPledgeID returns the consensus mana pledge ID of the faucet request.
func (*Payload) SetAccessManaPledgeID ¶
SetAccessManaPledgeID sets the access mana pledge ID of the faucet request.
func (*Payload) SetConsensusManaPledgeID ¶
SetConsensusManaPledgeID sets the consensus mana pledge ID of the faucet request.