wallet

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddCmd added in v0.9.0

func NewAddCmd(f *cmdutil.Factory) *cobra.Command

NewAddCmd returns the `kh wallet add` subcommand -- a thin wrapper around `npx @keeperhub/wallet add` that provisions a new agentic wallet.

func NewBalanceCmd

func NewBalanceCmd(f *cmdutil.Factory) *cobra.Command

func NewFeedbackCmd added in v0.10.0

func NewFeedbackCmd(f *cmdutil.Factory) *cobra.Command

NewFeedbackCmd returns the `kh wallet feedback` subcommand -- a thin wrapper around `npx @keeperhub/wallet feedback` that submits ERC-8004 ReputationRegistry feedback for a workflow execution this wallet paid for.

Signing + broadcast happens server-side in the npm package; the wallet's Turnkey policy gates what can be signed (only giveFeedback() on the ReputationRegistry on Ethereum mainnet). Caller wallet pays gas natively.

func NewFundCmd added in v0.9.0

func NewFundCmd(f *cmdutil.Factory) *cobra.Command

NewFundCmd returns the `kh wallet fund` subcommand -- a thin wrapper around `npx @keeperhub/wallet fund` that prints funding instructions for the agentic wallet.

func NewInfoCmd added in v0.9.0

func NewInfoCmd(f *cmdutil.Factory) *cobra.Command

NewInfoCmd returns the `kh wallet info` subcommand -- a thin wrapper around `npx @keeperhub/wallet info` that prints the local agentic wallet identity.

func NewLinkCmd added in v0.9.0

func NewLinkCmd(f *cmdutil.Factory) *cobra.Command

NewLinkCmd returns the `kh wallet link` subcommand -- a thin wrapper around `npx @keeperhub/wallet link` that links an agentic wallet to a KeeperHub account.

Requires KH_SESSION_COOKIE to be set (v0.1.0 env-var contract from Phase 34 Plan 06).

func NewTokensCmd

func NewTokensCmd(f *cmdutil.Factory) *cobra.Command

func NewWalletCmd

func NewWalletCmd(f *cmdutil.Factory) *cobra.Command

Types

type BalancesResponse

type BalancesResponse struct {
	WalletAddress string         `json:"walletAddress"`
	Balances      []ChainBalance `json:"balances"`
}

BalancesResponse is the API response from GET /api/user/wallet/balances.

type ChainBalance

type ChainBalance struct {
	ChainID       FlexibleString `json:"chainId"`
	ChainName     string         `json:"chainName"`
	NativeBalance string         `json:"nativeBalance"`
	Tokens        []TokenBalance `json:"tokens"`
}

ChainBalance holds the balance for a single chain.

type FlexibleString added in v0.14.1

type FlexibleString string

FlexibleString holds a value the API has returned as either a JSON string or a JSON number, normalising both to string.

func (FlexibleString) MarshalJSON added in v0.15.0

func (f FlexibleString) MarshalJSON() ([]byte, error)

MarshalJSON emits the value as a bare JSON number when it holds one, so --json output matches kh chain list --json instead of diverging from it. Value receiver, so it applies to non-pointer struct fields.

func (*FlexibleString) UnmarshalJSON added in v0.14.1

func (f *FlexibleString) UnmarshalJSON(b []byte) error

type Token

type Token struct {
	ChainID      FlexibleString `json:"chainId"`
	TokenAddress string         `json:"tokenAddress"`
	Symbol       string         `json:"symbol"`
	Name         string         `json:"name"`
	Decimals     int            `json:"decimals"`
}

Token holds metadata for a single supported token.

type TokenBalance

type TokenBalance struct {
	Symbol   string `json:"symbol"`
	Balance  string `json:"balance"`
	Decimals int    `json:"decimals"`
}

TokenBalance holds the balance for a single token.

type TokensResponse

type TokensResponse struct {
	Tokens []Token `json:"tokens"`
}

TokensResponse is the API response from GET /api/user/wallet/tokens.

Jump to

Keyboard shortcuts

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