Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VSP URL to walletinfo result #2306

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/rpc/jsonrpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ import (

// API version constants
const (
jsonrpcSemverString = "9.0.0"
jsonrpcSemverString = "9.1.0"
jsonrpcSemverMajor = 9
jsonrpcSemverMinor = 0
jsonrpcSemverMinor = 1
jsonrpcSemverPatch = 0
)

Expand Down Expand Up @@ -5344,6 +5344,7 @@ func (s *Server) walletInfo(ctx context.Context, icmd any) (any, error) {
VoteBitsExtended: hex.EncodeToString(voteBits.ExtendedBits),
VoteVersion: voteVersion,
Voting: voting,
VSP: s.cfg.VSPHost,
ManualTickets: w.ManualTickets(),
}, nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/rpc/jsonrpc/rpcserverhelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func helpDescsEnUS() map[string]string {
"validatepredcp0005cf": "validatepredcp0005cf\n\nValidate whether all stored cfilters from before DCP0005 activation are correct according to the expected hardcoded hash\n\nArguments:\nNone\n\nResult:\ntrue|false (boolean) Whether the cfilters are valid\n",
"verifymessage": "verifymessage \"address\" \"signature\" \"message\"\n\nVerify a message was signed with the associated private key of some address.\n\nArguments:\n1. address (string, required) Address used to sign message\n2. signature (string, required) The signature to verify\n3. message (string, required) The message to verify\n\nResult:\ntrue|false (boolean) Whether the message was signed with the private key of 'address'\n",
"version": "version\n\nReturns application and API versions (semver) keyed by their names\n\nArguments:\nNone\n\nResult:\n{\n \"Program or API name\": Object containing the semantic version, (object) Version objects keyed by the program or API name\n ...\n}\n",
"walletinfo": "walletinfo\n\nReturns global information about the wallet\n\nArguments:\nNone\n\nResult:\n{\n \"daemonconnected\": true|false, (boolean) Whether or not the wallet is currently connected to the daemon RPC\n \"spv\": true|false, (boolean) Whether or not wallet is syncing in SPV mode\n \"unlocked\": true|false, (boolean) Whether or not the wallet is unlocked\n \"cointype\": n, (numeric) Active coin type. Not available for watching-only wallets.\n \"txfee\": n.nnn, (numeric) Transaction fee per kB of the serialized tx size in coins\n \"votebits\": n, (numeric) Vote bits setting\n \"votebitsextended\": \"value\", (string) Extended vote bits setting\n \"voteversion\": n, (numeric) Version of votes that will be generated\n \"voting\": true|false, (boolean) Whether or not the wallet is currently voting tickets\n \"manualtickets\": true|false, (boolean) Whether or not the wallet is only accepting tickets manually\n} \n",
"walletinfo": "walletinfo\n\nReturns global information about the wallet\n\nArguments:\nNone\n\nResult:\n{\n \"daemonconnected\": true|false, (boolean) Whether or not the wallet is currently connected to the daemon RPC\n \"spv\": true|false, (boolean) Whether or not wallet is syncing in SPV mode\n \"unlocked\": true|false, (boolean) Whether or not the wallet is unlocked\n \"cointype\": n, (numeric) Active coin type. Not available for watching-only wallets.\n \"txfee\": n.nnn, (numeric) Transaction fee per kB of the serialized tx size in coins\n \"votebits\": n, (numeric) Vote bits setting\n \"votebitsextended\": \"value\", (string) Extended vote bits setting\n \"voteversion\": n, (numeric) Version of votes that will be generated\n \"voting\": true|false, (boolean) Whether or not the wallet is currently voting tickets\n \"vsp\": \"value\", (string) VSP URL used when purchasing tickets\n \"manualtickets\": true|false, (boolean) Whether or not the wallet is only accepting tickets manually\n} \n",
"walletislocked": "walletislocked\n\nReturns whether or not the wallet is locked.\n\nArguments:\nNone\n\nResult:\ntrue|false (boolean) Whether the wallet is locked\n",
"walletlock": "walletlock\n\nLock the wallet.\n\nArguments:\nNone\n\nResult:\nNothing\n",
"walletpassphrase": "walletpassphrase \"passphrase\" timeout\n\nUnlock the wallet.\n\nArguments:\n1. passphrase (string, required) The wallet passphrase\n2. timeout (numeric, required) The number of seconds to wait before the wallet automatically locks. 0 leaves the wallet unlocked indefinitely.\n\nResult:\nNothing\n",
Expand Down
1 change: 1 addition & 0 deletions internal/rpchelp/helpdescs_en_US.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ var helpDescsEnUS = map[string]string{
"walletinforesult-votebitsextended": "Extended vote bits setting",
"walletinforesult-voteversion": "Version of votes that will be generated",
"walletinforesult-voting": "Whether or not the wallet is currently voting tickets",
"walletinforesult-vsp": "VSP URL used when purchasing tickets",
"walletinforesult-manualtickets": "Whether or not the wallet is only accepting tickets manually",

// WalletIsLockedCmd help.
Expand Down
1 change: 1 addition & 0 deletions rpc/jsonrpc/types/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ type WalletInfoResult struct {
VoteBitsExtended string `json:"votebitsextended"`
VoteVersion uint32 `json:"voteversion"`
Voting bool `json:"voting"`
VSP string `json:"vsp"`
ManualTickets bool `json:"manualtickets"`
}

Expand Down
Loading