Documentation ¶
Index ¶
- func EthereumHash(data []byte) []byte
- type ArweaveSigner
- func (self *ArweaveSigner) GetOwner() ([]byte, error)
- func (self *ArweaveSigner) GetOwnerLength() int
- func (self *ArweaveSigner) GetSignatureLength() int
- func (self *ArweaveSigner) GetType() SignatureType
- func (self *ArweaveSigner) Sign(data []byte) (signature []byte, err error)
- func (self *ArweaveSigner) Verify(data []byte, signature []byte) (err error)
- type EthereumSigner
- func (self *EthereumSigner) GetOwner() ([]byte, error)
- func (self *EthereumSigner) GetOwnerLength() int
- func (self *EthereumSigner) GetSignatureLength() int
- func (self *EthereumSigner) GetType() SignatureType
- func (self *EthereumSigner) Sign(data []byte) (signature []byte, err error)
- func (self *EthereumSigner) Verify(data []byte, signature []byte) (err error)
- type SignatureType
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EthereumHash ¶
Types ¶
type ArweaveSigner ¶
type ArweaveSigner struct { PrivateKey *rsa.PrivateKey Owner []byte }
func NewArweaveSigner ¶
func NewArweaveSigner(privateKeyJWK string) (self *ArweaveSigner, err error)
func (*ArweaveSigner) GetOwner ¶
func (self *ArweaveSigner) GetOwner() ([]byte, error)
func (*ArweaveSigner) GetOwnerLength ¶
func (self *ArweaveSigner) GetOwnerLength() int
func (*ArweaveSigner) GetSignatureLength ¶
func (self *ArweaveSigner) GetSignatureLength() int
func (*ArweaveSigner) GetType ¶
func (self *ArweaveSigner) GetType() SignatureType
type EthereumSigner ¶
type EthereumSigner struct { PrivateKey *ecdsa.PrivateKey Owner []byte }
func NewEthereumSigner ¶
func NewEthereumSigner(privateKeyHex string) (self *EthereumSigner, err error)
func (*EthereumSigner) GetOwner ¶
func (self *EthereumSigner) GetOwner() ([]byte, error)
func (*EthereumSigner) GetOwnerLength ¶
func (self *EthereumSigner) GetOwnerLength() int
func (*EthereumSigner) GetSignatureLength ¶
func (self *EthereumSigner) GetSignatureLength() int
func (*EthereumSigner) GetType ¶
func (self *EthereumSigner) GetType() SignatureType
type SignatureType ¶
type SignatureType int
const ( SignatureTypeArweave SignatureType = 1 SignatureTypeEthereum SignatureType = 3 )
Values are taken from bundlr library https://github.com/Bundlr-Network/arbundles/blob/5413fe576098355f7502a5fa9456f8db6a861492/src/constants.ts#L4
func (SignatureType) Bytes ¶
func (self SignatureType) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.