Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- type ClientOption
- func InitWalletWithPath(walletPath string) ClientOption
- func InitWalletWithPathAndNode(walletPath string, nodeURL string) ClientOption
- func InitWalletWithPrivateKey(privateKey []byte) ClientOption
- func InitWalletWithPrivateKeyAndNode(privateKey []byte, nodeURL string) ClientOption
- func WithCustomSpeedFactor(speedFactor int64) ClientOption
- func WithWalletInstance(wallet *goar.Wallet) ClientOption
Constants ¶
const (
// DefaultArweaveNodeURL is a default arweave node URL
DefaultArweaveNodeURL = "https://arweave.net"
)
Variables ¶
var ( ErrFailedToCalcPrice = errors.New("failed to calculate arweave transaction price") ErrFailedToUploadData = errors.New("failed to upload data to arweave") )
Predefined package errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for goar.Wallet
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
NewClient creates a new arweave client
type ClientOption ¶
type ClientOption func(*Client)
Client option function interface to configure the client.
func InitWalletWithPath ¶
func InitWalletWithPath(walletPath string) ClientOption
InitWalletWithPath initializes a wallet instance from a given path.
func InitWalletWithPathAndNode ¶
func InitWalletWithPathAndNode(walletPath string, nodeURL string) ClientOption
InitWalletWithPathAndNode initializes a wallet instance from a given path and custom node URL.
func InitWalletWithPrivateKey ¶
func InitWalletWithPrivateKey(privateKey []byte) ClientOption
InitWalletWithPrivateKey initializes a wallet instance from a given private key.
func InitWalletWithPrivateKeyAndNode ¶
func InitWalletWithPrivateKeyAndNode(privateKey []byte, nodeURL string) ClientOption
InitWalletWithPrivateKeyAndNode initializes a wallet instance from a given private key and custom node URL.
func WithCustomSpeedFactor ¶
func WithCustomSpeedFactor(speedFactor int64) ClientOption
WithCustomSpeedFactor sets the speed factor to be used for transactions. Default is 0.
func WithWalletInstance ¶
func WithWalletInstance(wallet *goar.Wallet) ClientOption
WithWalletInstance sets the wallet instance to be used for transactions.