Documentation ¶
Index ¶
- func GetOwnerAuditInfo(raw []byte, s AuditInfoProvider) ([]byte, error)
- func GetScriptSenderAndRecipient(ro *identity.RawOwner) (sender, recipient view.Identity, err error)
- func MetadataClaimKeyCheck(action Action, script *htlc.Script, op OperationType, sig []byte) (string, error)
- func MetadataLockKeyCheck(action Action, script *htlc.Script) (string, error)
- type Action
- type AuditInfoProvider
- type Deserializer
- type OperationType
- type ScriptInfo
- type VerifierDES
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOwnerAuditInfo ¶
func GetOwnerAuditInfo(raw []byte, s AuditInfoProvider) ([]byte, error)
GetOwnerAuditInfo returns the audit info of the owner
func GetScriptSenderAndRecipient ¶
func GetScriptSenderAndRecipient(ro *identity.RawOwner) (sender, recipient view.Identity, err error)
GetScriptSenderAndRecipient returns the script's sender and recipient according to the type of the given owner
func MetadataClaimKeyCheck ¶
func MetadataClaimKeyCheck(action Action, script *htlc.Script, op OperationType, sig []byte) (string, error)
MetadataClaimKeyCheck checks that the claim key is in place
Types ¶
type AuditInfoProvider ¶
type Deserializer ¶
type Deserializer struct {
OwnerDeserializer VerifierDES
}
func NewDeserializer ¶
func NewDeserializer(ownerDeserializer VerifierDES) *Deserializer
func (*Deserializer) DeserializeVerifier ¶
type OperationType ¶
type OperationType int
const ( None OperationType = iota Claim Reclaim )
func VerifyOwner ¶
func VerifyOwner(senderRawOwner []byte, outRawOwner []byte, now time.Time) (*htlc.Script, OperationType, error)
VerifyOwner validates the owners of the transfer in the htlc script
type ScriptInfo ¶
ScriptInfo includes info about the sender and the recipient
func (*ScriptInfo) Marshal ¶
func (si *ScriptInfo) Marshal() ([]byte, error)
func (*ScriptInfo) Unarshal ¶
func (si *ScriptInfo) Unarshal(raw []byte) error
Click to show internal directories.
Click to hide internal directories.