wallet

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

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

Wallet struct

func NewWallet

func NewWallet() *Wallet

NewWallet creates a new wallet instance

func (*Wallet) Address

func (w *Wallet) Address() string

Address returns the address of the account

func (*Wallet) LoadKey

func (w *Wallet) LoadKey(rsaKeyBytes []byte) error

LoadKey loads an Arweave RSA key into our wallet

func (*Wallet) LoadKeyFromFile

func (w *Wallet) LoadKeyFromFile(path string) error

LoadKeyFromFile loads and Arweave RSA key from a file to our wallet

func (*Wallet) PubKeyModulus

func (w *Wallet) PubKeyModulus() *big.Int

PubKeyModulus returns the modulus of the RSA public key

func (*Wallet) Sign

func (w *Wallet) Sign(msg []byte) ([]byte, error)

Sign signs a message using the RSA-PSS scheme with an MGF SHA256 masking function

func (*Wallet) Verify

func (w *Wallet) Verify(msg []byte, sig []byte) error

Verify verifies the signature for the specific message

Jump to

Keyboard shortcuts

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