wallet

package
v0.0.0-...-cd62ce9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 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 {
	Address   string
	Key       *gojwk.Key
	PublicKey string
	PubKey    *rsa.PublicKey
}

Wallet struct

func GenerateWallet

func GenerateWallet() *Wallet

GenerateWallet generates a new JWK wallet.

func NewWallet

func NewWallet() *Wallet

NewWallet creates a new wallet instance

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