Documentation
¶
Overview ¶
Package soc provides the single-owner chunk implementation and validator.
Index ¶
- func CreateAddress(id ID, owner []byte) (swarm.Address, error)
- func UnwrapCAC(sch swarm.Chunk) (swarm.Chunk, error)
- func Valid(ch swarm.Chunk) bool
- type ID
- type SOC
- func (s *SOC) Address() (swarm.Address, error)
- func (s *SOC) Chunk() (swarm.Chunk, error)
- func (s *SOC) ID() []byte
- func (s *SOC) OwnerAddress() []byte
- func (s *SOC) OwnerPubKey() []byte
- func (s *SOC) Sign(signer crypto.Signer) (swarm.Chunk, error)
- func (s *SOC) Signature() []byte
- func (s *SOC) WrappedChunk() swarm.Chunk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAddress ¶
CreateAddress creates a new SOC address from the id and the ethereum address of the owner.
Types ¶
type SOC ¶
type SOC struct {
// contains filtered or unexported fields
}
SOC wraps a content-addressed chunk.
func (*SOC) OwnerAddress ¶
OwnerAddress returns the ethereum address of the SOC owner.
func (*SOC) OwnerPubKey ¶
OwnerPubKey returns the public key of the SOC owner.
func (*SOC) Sign ¶
Sign signs a SOC using the given signer. It returns a signed SOC chunk ready for submission to the network.
func (*SOC) WrappedChunk ¶
WrappedChunk returns the chunk wrapped by the SOC.
Click to show internal directories.
Click to hide internal directories.