signers

package
v0.0.0-...-9b281af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArweaveSigner

type ArweaveSigner struct {
	// contains filtered or unexported fields
}

func Arweave

func Arweave(privateKey []byte, publicKey []byte) (*ArweaveSigner, error)

Arweave creates an instance of the Arweave signer

func (*ArweaveSigner) Sign

func (a *ArweaveSigner) Sign(data []byte) ([]byte, error)

Sign calculated the signature of a digest

func (*ArweaveSigner) Verify

func (a *ArweaveSigner) Verify(data []byte, sig []byte) bool

Verify verifies a signature

type Ed25519Signer

type Ed25519Signer struct {
	// contains filtered or unexported fields
}

func Ed25519

func Ed25519(privateKey []byte, publicKey []byte) *Ed25519Signer

func (*Ed25519Signer) Sign

func (e *Ed25519Signer) Sign(data []byte) ([]byte, error)

Sign calculated the signature of a digest

func (*Ed25519Signer) Verify

func (e *Ed25519Signer) Verify(data []byte, sig []byte) bool

Verify verifies a signature

type EthereumSigner

type EthereumSigner struct {
	// contains filtered or unexported fields
}

func Ethereum

func Ethereum(privateKey string) (*EthereumSigner, error)

func (*EthereumSigner) PublicKey

func (e *EthereumSigner) PublicKey() wallet.PublicKey

PublicKey ...

func (*EthereumSigner) Sign

func (e *EthereumSigner) Sign(data []byte) ([]byte, error)

Sign ...

func (*EthereumSigner) Verify

func (e *EthereumSigner) Verify(data []byte, sig []byte) bool

Verify ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL