Documentation ¶
Index ¶
- func FromMarshalUtil(mu *marshalutil.MarshalUtil) (iscp.Request, error)
- func RequestsInTransaction(chainID *iscp.ChainID, tx *ledgerstate.Transaction) []iscp.RequestID
- func SolidifyArgs(req iscp.Request, reg registry.BlobCache) (bool, error)
- type Metadata
- func (p *Metadata) Args() requestargs.RequestArgs
- func (p *Metadata) Bytes() []byte
- func (p *Metadata) Clone() *Metadata
- func (p *Metadata) EntryPoint() iscp.Hname
- func (p *Metadata) ParsedError() error
- func (p *Metadata) ParsedOk() bool
- func (p *Metadata) ReadFromMarshalUtil(mu *marshalutil.MarshalUtil) error
- func (p *Metadata) SenderContract() iscp.Hname
- func (p *Metadata) TargetContract() iscp.Hname
- func (p *Metadata) WithArgs(args requestargs.RequestArgs) *Metadata
- func (p *Metadata) WithEntryPoint(ep iscp.Hname) *Metadata
- func (p *Metadata) WithRequestNonce(nonce uint8) *Metadata
- func (p *Metadata) WithSender(s iscp.Hname) *Metadata
- func (p *Metadata) WithTarget(t iscp.Hname) *Metadata
- func (p *Metadata) WriteToMarshalUtil(mu *marshalutil.MarshalUtil)
- type OffLedger
- func (req *OffLedger) Args() requestargs.RequestArgs
- func (req *OffLedger) Bytes() []byte
- func (req *OffLedger) Hash() [32]byte
- func (req *OffLedger) ID() (requestID iscp.RequestID)
- func (req *OffLedger) IsFeePrepaid() bool
- func (req *OffLedger) IsOffLedger() bool
- func (req *OffLedger) Nonce() uint64
- func (req *OffLedger) Params() (dict.Dict, bool)
- func (req *OffLedger) SenderAccount() *iscp.AgentID
- func (req *OffLedger) SenderAddress() ledgerstate.Address
- func (req *OffLedger) SetParams(params dict.Dict)
- func (req *OffLedger) Sign(keyPair *ed25519.KeyPair)
- func (req *OffLedger) String() string
- func (req *OffLedger) Target() (iscp.Hname, iscp.Hname)
- func (req *OffLedger) Timestamp() time.Time
- func (req *OffLedger) Tokens() colored.Balances
- func (req *OffLedger) VerifySignature() bool
- func (req *OffLedger) WithNonce(nonce uint64) iscp.Request
- func (req *OffLedger) WithTransfer(transfer colored.Balances) *OffLedger
- type OnLedger
- func (req *OnLedger) Args() requestargs.RequestArgs
- func (req *OnLedger) Bytes() []byte
- func (req *OnLedger) FallbackAddress() ledgerstate.Address
- func (req *OnLedger) FallbackDeadline() time.Time
- func (req *OnLedger) GetMetadata() *Metadata
- func (req *OnLedger) Hash() [32]byte
- func (req *OnLedger) ID() iscp.RequestID
- func (req *OnLedger) IsFeePrepaid() bool
- func (req *OnLedger) IsOffLedger() bool
- func (req *OnLedger) MintedAmounts() colored.Balances
- func (req *OnLedger) Output() ledgerstate.Output
- func (req *OnLedger) Params() (dict.Dict, bool)
- func (req *OnLedger) SenderAccount() *iscp.AgentID
- func (req *OnLedger) SenderAddress() ledgerstate.Address
- func (req *OnLedger) SetMetadata(d *Metadata)
- func (req *OnLedger) SetParams(params dict.Dict)
- func (req *OnLedger) Short() string
- func (req *OnLedger) Target() (iscp.Hname, iscp.Hname)
- func (req *OnLedger) TimeLock() time.Time
- func (req *OnLedger) Timestamp() time.Time
- type SolidifiableRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromMarshalUtil ¶
func FromMarshalUtil(mu *marshalutil.MarshalUtil) (iscp.Request, error)
FromMarshalUtil re-creates request from bytes. First byte is treated as type of the request
func RequestsInTransaction ¶
func RequestsInTransaction(chainID *iscp.ChainID, tx *ledgerstate.Transaction) []iscp.RequestID
Types ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata represents content of the data payload of the output
func MetadataFromBytes ¶
func MetadataFromMarshalUtil ¶
func MetadataFromMarshalUtil(mu *marshalutil.MarshalUtil) *Metadata
func NewMetadata ¶
func NewMetadata() *Metadata
func (*Metadata) Args ¶
func (p *Metadata) Args() requestargs.RequestArgs
func (*Metadata) EntryPoint ¶
func (*Metadata) ParsedError ¶
func (*Metadata) ReadFromMarshalUtil ¶
func (p *Metadata) ReadFromMarshalUtil(mu *marshalutil.MarshalUtil) error
func (*Metadata) SenderContract ¶
func (*Metadata) TargetContract ¶
func (*Metadata) WithArgs ¶
func (p *Metadata) WithArgs(args requestargs.RequestArgs) *Metadata
func (*Metadata) WithRequestNonce ¶
func (*Metadata) WriteToMarshalUtil ¶
func (p *Metadata) WriteToMarshalUtil(mu *marshalutil.MarshalUtil)
type OffLedger ¶
type OffLedger struct {
// contains filtered or unexported fields
}
func NewOffLedger ¶
func NewOffLedger(contract, entryPoint iscp.Hname, args requestargs.RequestArgs) *OffLedger
NewOffLedger creates a basic request
func (*OffLedger) Args ¶
func (req *OffLedger) Args() requestargs.RequestArgs
func (*OffLedger) ID ¶
ID returns request id for this request index part of request id is always 0 for off ledger requests note that request needs to have been signed before this value is considered valid
func (*OffLedger) IsFeePrepaid ¶
IsFeePrepaid always true for off-ledger
func (*OffLedger) IsOffLedger ¶
func (*OffLedger) SenderAccount ¶
func (*OffLedger) SenderAddress ¶
func (req *OffLedger) SenderAddress() ledgerstate.Address
func (*OffLedger) VerifySignature ¶
VerifySignature verifies essence signature
type OnLedger ¶
type OnLedger struct {
// contains filtered or unexported fields
}
func OnLedgerFromOutput ¶
func OnLedgerFromOutput(output *ledgerstate.ExtendedLockedOutput, senderAddr ledgerstate.Address, txTimestamp time.Time, minted ...colored.Balances) *OnLedger
func OnLedgerFromTransaction ¶
func OnLedgerFromTransaction(tx *ledgerstate.Transaction, targetAddr ledgerstate.Address) ([]*OnLedger, error)
OnLedgerFromTransaction creates OnLedger object from transaction and output index
func (*OnLedger) Args ¶
func (req *OnLedger) Args() requestargs.RequestArgs
func (*OnLedger) FallbackAddress ¶
func (req *OnLedger) FallbackAddress() ledgerstate.Address
func (*OnLedger) FallbackDeadline ¶
func (*OnLedger) GetMetadata ¶
func (*OnLedger) IsFeePrepaid ¶
func (*OnLedger) IsOffLedger ¶
func (*OnLedger) MintedAmounts ¶
func (*OnLedger) Output ¶
func (req *OnLedger) Output() ledgerstate.Output
func (*OnLedger) SenderAccount ¶
func (*OnLedger) SenderAddress ¶
func (req *OnLedger) SenderAddress() ledgerstate.Address
func (*OnLedger) SetMetadata ¶
type SolidifiableRequest ¶
type SolidifiableRequest interface { Params() (dict.Dict, bool) SetParams(params dict.Dict) Args() requestargs.RequestArgs }
SolidifiableRequest is the minimal interface required for SolidifyArgs
Click to show internal directories.
Click to hide internal directories.