Documentation ¶
Index ¶
- type Builder
- func (s *Builder) AddDelegator(delegator *url.URL) *Builder
- func (s *Builder) ClearTimestamp() *Builder
- func (s *Builder) Copy() *Builder
- func (s *Builder) Import(sig protocol.Signature) (*Builder, error)
- func (s *Builder) Initiate(txn *protocol.Transaction) (protocol.Signature, error)
- func (s *Builder) InitiateSynthetic(txn *protocol.Transaction, dest *url.URL) (*protocol.PartitionSignature, error)
- func (s *Builder) SetKeyPageUrl(bookUrl *url.URL, pageIndex uint64) *Builder
- func (s *Builder) SetPrivateKey(privKey []byte) *Builder
- func (s *Builder) SetSigner(signer Signer) *Builder
- func (s *Builder) SetTimestamp(timestamp uint64) *Builder
- func (s *Builder) SetTimestampToNow() *Builder
- func (s *Builder) SetTimestampWithVar(timestamp *uint64) *Builder
- func (s *Builder) SetType(typ protocol.SignatureType) *Builder
- func (s *Builder) SetUrl(u *url.URL) *Builder
- func (s *Builder) SetVersion(version uint64) *Builder
- func (s *Builder) Sign(message []byte) (protocol.Signature, error)
- func (s *Builder) UseFaucet() *Builder
- func (s *Builder) UseMerkleHash() *Builderdeprecated
- func (s *Builder) UseSimpleHash() *Builder
- type InitHashMode
- type PrivateKey
- type Signer
- type Timestamp
- type TimestampFromValue
- type TimestampFromVariable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.6.0
type Builder struct { InitMode InitHashMode Type protocol.SignatureType Url *url.URL Delegators []*url.URL Signer Signer Version uint64 Vote protocol.VoteType Timestamp Timestamp Memo string Data []byte // Ignore64Byte (when set) stops the signature builder from automatically // correcting a transaction header or body that marshals to 64 bytes. Ignore64Byte bool }
func (*Builder) AddDelegator ¶ added in v0.6.0
func (*Builder) ClearTimestamp ¶ added in v1.0.0
func (*Builder) InitiateSynthetic ¶ added in v0.6.0
func (s *Builder) InitiateSynthetic(txn *protocol.Transaction, dest *url.URL) (*protocol.PartitionSignature, error)
func (*Builder) SetKeyPageUrl ¶ added in v0.6.0
func (*Builder) SetPrivateKey ¶ added in v0.6.0
func (*Builder) SetTimestamp ¶ added in v0.6.0
func (*Builder) SetTimestampToNow ¶ added in v0.6.0
func (*Builder) SetTimestampWithVar ¶ added in v0.6.0
func (*Builder) SetType ¶ added in v0.6.0
func (s *Builder) SetType(typ protocol.SignatureType) *Builder
func (*Builder) SetVersion ¶ added in v0.6.0
func (*Builder) UseMerkleHash
deprecated
added in
v0.6.0
UseMerkleHash initiate with a Merkle hash.
Deprecated: Use Builder.UseSimpleHash.
func (*Builder) UseSimpleHash ¶ added in v0.6.0
UseSimpleHash initiate with a simple hash.
type InitHashMode ¶ added in v0.6.0
type InitHashMode int
const ( // Initiate with a Merkle hash. // // Deprecated: Use [InitWithSimpleHash]. InitWithMerkleHash InitHashMode = iota // Initiate with a simple hash. InitWithSimpleHash )
type PrivateKey ¶ added in v0.6.0
type PrivateKey []byte
func (PrivateKey) SetPublicKey ¶ added in v0.6.0
func (k PrivateKey) SetPublicKey(sig protocol.Signature) error
type TimestampFromValue ¶ added in v1.0.0
type TimestampFromValue uint64
func (TimestampFromValue) Get ¶ added in v1.0.0
func (t TimestampFromValue) Get() (uint64, error)
type TimestampFromVariable ¶ added in v1.0.0
type TimestampFromVariable uint64
func (*TimestampFromVariable) Get ¶ added in v1.0.0
func (t *TimestampFromVariable) Get() (uint64, error)
Click to show internal directories.
Click to hide internal directories.