Categorygithub.com/project-illium/walletlib
modulepackage
0.0.0-20240712143237-d84a7da64587
Repository: https://github.com/project-illium/walletlib.git
Documentation: pkg.go.dev

# README

Go golangci-lint

walletlib

illium wallet library

This codebase provides wallet functionality for illium applications. It offers three different operating modes that offer different tradeoffs and different levels of privacy.

Internal Wallet

In this mode the wallet is used as an internal library for another application and the application passes blockchain data into the wallet package using internal APIs. The wallet then computes and maintains its internal state.

Ilxd uses this mode for its own internal wallet.

RPC Wallet

This mode is similar to the Internal Wallet in that it ingests blockchain data, computes and maintains states on the client side. However, it uses the gRPC API to connect to an instance of ilxd to fetch blockchain data allowing the wallet to be used as a standalone application.

This mode does require some degree of trust in the server that it will not lie about transactions. However, it does maximize privacy vis-à-vis server as the server will not be able to learn anything about the wallet's internal state.

The downside of this mode is the client must download metadata for every block in the chain to computer its internal state. This requires a fair amount of bandwidth usage and can take time to sync with the network.

Lite Wallet

The lite wallet also connects to an ilxd node using the gRPC API but allows the server to decrypt its transactions, sacrificing privacy vis-à-vis the server for less client bandwidth usage and a faster user experience.

The BlockchainClient interface is used to provide blockchain data to wallet and determine the operating mode. The three implementations can be found in the client package. They just need to be initialized by the application and passed in as a startup option to the wallet.

# Packages

No description provided by the author
No description provided by the author

# Functions

Birthday sets the birthday of this wallet.
BlockchainSource is an implementation of the BlockchainClient that provides access to blockchain data.
No description provided by the author
No description provided by the author
ComputeFee returns the fee for the estimated size of the transaction.
DataDir is the directory use for the wallet This option is required.
Datastore is an implementation of the repo.Datastore interface.
DecodeAddress decodes the bech32 address string and returns a new Address.
No description provided by the author
No description provided by the author
EstimateSerializedSize returns the estimated size of the transaction.
FeePerKB sets the fee per kilobyte to use for sending transactions.
IsDustInput returns true if the additional fee needed to attach the input onto a larger transaction would exceed the value of the input.
No description provided by the author
Logger sets a logger for the wallet if desired.
MnemonicSeed is an optional option that allows the user to set a custom seed.
NewBasicAddress returns a new BasicAddress.
NewExchangeAddress return a new ExchangeAddress.
No description provided by the author
NewPublicAddress returns a new PublicAddress.
NewPublicAddressFromCommitment builds a public address from the hash of the locking params.
NewTransactionScanner returns a new TransactionScanner.
NewTransactionScannerWithPublicAddrs returns a new TransactionScanner initialized with both view keys and public address scriptHashes.
No description provided by the author
Params identifies which chain parameters the chain is associated with.
Prover is an instance of the zk.Prover interface that is used to create the zk proofs.
UnmarshalWalletPrivateKey returns a private key from input bytes.
UseLogger uses a specified Logger to output package logging info.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BasicAddress is the default address type for illium.
ExchangeAddress functions almost identically to the PublicAddress but has a different version number.
No description provided by the author
No description provided by the author
PublicAddress is an optional address type which is designed to intentionally disclose the private output data to the public.
RawInput represents either a commitment or a private input Set one or the other fields but not both.
No description provided by the author
No description provided by the author
ScanMatch represents an output that has decrypted with one of our scan keys.
No description provided by the author
No description provided by the author
TransactionScanner is used to scan transaction outputs and attempt to decrypt each one.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Address is an interface designed to represent any kind of payment address.
BlockchainClient is an interfaced used by the wallet to fetch data about the blockchain.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
Option is configuration option function for the blockchain.
No description provided by the author