walletsvrcmds.go raw

   1  package btcjson
   2  
   3  // AddMultisigAddressCmd defines the addmutisigaddress JSON-RPC command.
   4  type AddMultisigAddressCmd struct {
   5  	NRequired int
   6  	Keys      []string
   7  	Account   *string
   8  }
   9  
  10  // NewAddMultisigAddressCmd returns a new instance which can be used to issue a addmultisigaddress JSON-RPC command. The
  11  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
  12  // value.
  13  func NewAddMultisigAddressCmd(nRequired int, keys []string, account *string) *AddMultisigAddressCmd {
  14  	return &AddMultisigAddressCmd{
  15  		NRequired: nRequired,
  16  		Keys:      keys,
  17  		Account:   account,
  18  	}
  19  }
  20  
  21  // AddWitnessAddressCmd defines the addwitnessaddress JSON-RPC command.
  22  type AddWitnessAddressCmd struct {
  23  	Address string
  24  }
  25  
  26  // NewAddWitnessAddressCmd returns a new instance which can be used to issue a
  27  // addwitnessaddress JSON-RPC command.
  28  func NewAddWitnessAddressCmd(address string) *AddWitnessAddressCmd {
  29  	return &AddWitnessAddressCmd{
  30  		Address: address,
  31  	}
  32  }
  33  
  34  // CreateMultisigCmd defines the createmultisig JSON-RPC command.
  35  type CreateMultisigCmd struct {
  36  	NRequired int
  37  	Keys      []string
  38  }
  39  
  40  // NewCreateMultisigCmd returns a new instance which can be used to issue a createmultisig JSON-RPC command.
  41  func NewCreateMultisigCmd(nRequired int, keys []string) *CreateMultisigCmd {
  42  	return &CreateMultisigCmd{
  43  		NRequired: nRequired,
  44  		Keys:      keys,
  45  	}
  46  }
  47  
  48  // DropWalletHistoryCmd defines the restart JSON-RPC command.
  49  type DropWalletHistoryCmd struct{}
  50  
  51  // NewDropWalletHistoryCmd returns a new instance which can be used to issue a stop JSON-RPC command.
  52  func NewDropWalletHistoryCmd() *DropWalletHistoryCmd {
  53  	return &DropWalletHistoryCmd{}
  54  }
  55  
  56  // DumpPrivKeyCmd defines the dumpprivkey JSON-RPC command.
  57  type DumpPrivKeyCmd struct {
  58  	Address string
  59  }
  60  
  61  // NewDumpPrivKeyCmd returns a new instance which can be used to issue a dumpprivkey JSON-RPC command.
  62  func NewDumpPrivKeyCmd(address string) *DumpPrivKeyCmd {
  63  	return &DumpPrivKeyCmd{
  64  		Address: address,
  65  	}
  66  }
  67  
  68  // EncryptWalletCmd defines the encryptwallet JSON-RPC command.
  69  type EncryptWalletCmd struct {
  70  	Passphrase string
  71  }
  72  
  73  // NewEncryptWalletCmd returns a new instance which can be used to issue a encryptwallet JSON-RPC command.
  74  func NewEncryptWalletCmd(passphrase string) *EncryptWalletCmd {
  75  	return &EncryptWalletCmd{
  76  		Passphrase: passphrase,
  77  	}
  78  }
  79  
  80  // EstimateFeeCmd defines the estimatefee JSON-RPC command.
  81  type EstimateFeeCmd struct {
  82  	NumBlocks int64
  83  }
  84  
  85  // NewEstimateFeeCmd returns a new instance which can be used to issue a estimatefee JSON-RPC command.
  86  func NewEstimateFeeCmd(numBlocks int64) *EstimateFeeCmd {
  87  	return &EstimateFeeCmd{
  88  		NumBlocks: numBlocks,
  89  	}
  90  }
  91  
  92  // EstimatePriorityCmd defines the estimatepriority JSON-RPC command.
  93  type EstimatePriorityCmd struct {
  94  	NumBlocks int64
  95  }
  96  
  97  // NewEstimatePriorityCmd returns a new instance which can be used to issue a estimatepriority JSON-RPC command.
  98  func NewEstimatePriorityCmd(numBlocks int64) *EstimatePriorityCmd {
  99  	return &EstimatePriorityCmd{
 100  		NumBlocks: numBlocks,
 101  	}
 102  }
 103  
 104  // GetAccountCmd defines the getaccount JSON-RPC command.
 105  type GetAccountCmd struct {
 106  	Address string
 107  }
 108  
 109  // NewGetAccountCmd returns a new instance which can be used to issue a getaccount JSON-RPC command.
 110  func NewGetAccountCmd(address string) *GetAccountCmd {
 111  	return &GetAccountCmd{
 112  		Address: address,
 113  	}
 114  }
 115  
 116  // GetAccountAddressCmd defines the getaccountaddress JSON-RPC command.
 117  type GetAccountAddressCmd struct {
 118  	Account string
 119  }
 120  
 121  // NewGetAccountAddressCmd returns a new instance which can be used to issue a getaccountaddress JSON-RPC command.
 122  func NewGetAccountAddressCmd(account string) *GetAccountAddressCmd {
 123  	return &GetAccountAddressCmd{
 124  		Account: account,
 125  	}
 126  }
 127  
 128  // GetAddressesByAccountCmd defines the getaddressesbyaccount JSON-RPC command.
 129  type GetAddressesByAccountCmd struct {
 130  	Account string
 131  }
 132  
 133  // NewGetAddressesByAccountCmd returns a new instance which can be used to issue a getaddressesbyaccount JSON-RPC
 134  // command.
 135  func NewGetAddressesByAccountCmd(account string) *GetAddressesByAccountCmd {
 136  	return &GetAddressesByAccountCmd{
 137  		Account: account,
 138  	}
 139  }
 140  
 141  // GetBalanceCmd defines the getbalance JSON-RPC command.
 142  type GetBalanceCmd struct {
 143  	Account *string
 144  	MinConf *int `jsonrpcdefault:"1"`
 145  }
 146  
 147  // NewGetBalanceCmd returns a new instance which can be used to issue a getbalance JSON-RPC command. The parameters that
 148  // are pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 149  func NewGetBalanceCmd(account *string, minConf *int) *GetBalanceCmd {
 150  	return &GetBalanceCmd{
 151  		Account: account,
 152  		MinConf: minConf,
 153  	}
 154  }
 155  
 156  // GetNewAddressCmd defines the getnewaddress JSON-RPC command.
 157  type GetNewAddressCmd struct {
 158  	Account *string
 159  }
 160  
 161  // NewGetNewAddressCmd returns a new instance which can be used to issue a getnewaddress JSON-RPC command. The
 162  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 163  // value.
 164  func NewGetNewAddressCmd(account *string) *GetNewAddressCmd {
 165  	return &GetNewAddressCmd{
 166  		Account: account,
 167  	}
 168  }
 169  
 170  // GetRawChangeAddressCmd defines the getrawchangeaddress JSON-RPC command.
 171  type GetRawChangeAddressCmd struct {
 172  	Account *string
 173  }
 174  
 175  // NewGetRawChangeAddressCmd returns a new instance which can be used to issue a getrawchangeaddress JSON-RPC command.
 176  // The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the
 177  // default value.
 178  func NewGetRawChangeAddressCmd(account *string) *GetRawChangeAddressCmd {
 179  	return &GetRawChangeAddressCmd{
 180  		Account: account,
 181  	}
 182  }
 183  
 184  // GetReceivedByAccountCmd defines the getreceivedbyaccount JSON-RPC command.
 185  type GetReceivedByAccountCmd struct {
 186  	Account string
 187  	MinConf *int `jsonrpcdefault:"1"`
 188  }
 189  
 190  // NewGetReceivedByAccountCmd returns a new instance which can be used to issue a getreceivedbyaccount JSON-RPC command.
 191  // The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the
 192  // default value.
 193  func NewGetReceivedByAccountCmd(account string, minConf *int) *GetReceivedByAccountCmd {
 194  	return &GetReceivedByAccountCmd{
 195  		Account: account,
 196  		MinConf: minConf,
 197  	}
 198  }
 199  
 200  // GetReceivedByAddressCmd defines the getreceivedbyaddress JSON-RPC command.
 201  type GetReceivedByAddressCmd struct {
 202  	Address string
 203  	MinConf *int `jsonrpcdefault:"1"`
 204  }
 205  
 206  // NewGetReceivedByAddressCmd returns a new instance which can be used to issue a getreceivedbyaddress JSON-RPC command.
 207  // The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the
 208  // default value.
 209  func NewGetReceivedByAddressCmd(address string, minConf *int) *GetReceivedByAddressCmd {
 210  	return &GetReceivedByAddressCmd{
 211  		Address: address,
 212  		MinConf: minConf,
 213  	}
 214  }
 215  
 216  // GetTransactionCmd defines the gettransaction JSON-RPC command.
 217  type GetTransactionCmd struct {
 218  	Txid             string
 219  	IncludeWatchOnly *bool `jsonrpcdefault:"false"`
 220  }
 221  
 222  // NewGetTransactionCmd returns a new instance which can be used to issue a gettransaction JSON-RPC command. The
 223  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 224  // value.
 225  func NewGetTransactionCmd(txHash string, includeWatchOnly *bool) *GetTransactionCmd {
 226  	return &GetTransactionCmd{
 227  		Txid:             txHash,
 228  		IncludeWatchOnly: includeWatchOnly,
 229  	}
 230  }
 231  
 232  // GetWalletInfoCmd defines the getwalletinfo JSON-RPC command.
 233  type GetWalletInfoCmd struct{}
 234  
 235  // NewGetWalletInfoCmd returns a new instance which can be used to issue a getwalletinfo JSON-RPC command.
 236  func NewGetWalletInfoCmd() *GetWalletInfoCmd {
 237  	return &GetWalletInfoCmd{}
 238  }
 239  
 240  // ImportPrivKeyCmd defines the importprivkey JSON-RPC command.
 241  type ImportPrivKeyCmd struct {
 242  	PrivKey string
 243  	Label   *string
 244  	Rescan  *bool `jsonrpcdefault:"true"`
 245  }
 246  
 247  // NewImportPrivKeyCmd returns a new instance which can be used to issue a importprivkey JSON-RPC command. The
 248  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 249  // value.
 250  func NewImportPrivKeyCmd(privKey string, label *string, rescan *bool) *ImportPrivKeyCmd {
 251  	return &ImportPrivKeyCmd{
 252  		PrivKey: privKey,
 253  		Label:   label,
 254  		Rescan:  rescan,
 255  	}
 256  }
 257  
 258  // KeyPoolRefillCmd defines the keypoolrefill JSON-RPC command.
 259  type KeyPoolRefillCmd struct {
 260  	NewSize *uint `jsonrpcdefault:"100"`
 261  }
 262  
 263  // NewKeyPoolRefillCmd returns a new instance which can be used to issue a keypoolrefill JSON-RPC command. The
 264  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 265  // value.
 266  func NewKeyPoolRefillCmd(newSize *uint) *KeyPoolRefillCmd {
 267  	return &KeyPoolRefillCmd{
 268  		NewSize: newSize,
 269  	}
 270  }
 271  
 272  // ListAccountsCmd defines the listaccounts JSON-RPC command.
 273  type ListAccountsCmd struct {
 274  	MinConf *int `jsonrpcdefault:"1"`
 275  }
 276  
 277  // NewListAccountsCmd returns a new instance which can be used to issue a listaccounts JSON-RPC command. The parameters
 278  // which are pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 279  func NewListAccountsCmd(minConf *int) *ListAccountsCmd {
 280  	return &ListAccountsCmd{
 281  		MinConf: minConf,
 282  	}
 283  }
 284  
 285  // ListAddressGroupingsCmd defines the listaddressgroupings JSON-RPC command.
 286  type ListAddressGroupingsCmd struct{}
 287  
 288  // NewListAddressGroupingsCmd returns a new instance which can be used to issue a listaddressgroupings JSON-RPC
 289  // command.
 290  func NewListAddressGroupingsCmd() *ListAddressGroupingsCmd {
 291  	return &ListAddressGroupingsCmd{}
 292  }
 293  
 294  // ListLockUnspentCmd defines the listlockunspent JSON-RPC command.
 295  type ListLockUnspentCmd struct{}
 296  
 297  // NewListLockUnspentCmd returns a new instance which can be used to issue a listlockunspent JSON-RPC command.
 298  func NewListLockUnspentCmd() *ListLockUnspentCmd {
 299  	return &ListLockUnspentCmd{}
 300  }
 301  
 302  // ListReceivedByAccountCmd defines the listreceivedbyaccount JSON-RPC command.
 303  type ListReceivedByAccountCmd struct {
 304  	MinConf          *int  `jsonrpcdefault:"1"`
 305  	IncludeEmpty     *bool `jsonrpcdefault:"false"`
 306  	IncludeWatchOnly *bool `jsonrpcdefault:"false"`
 307  }
 308  
 309  // NewListReceivedByAccountCmd returns a new instance which can be used to issue a listreceivedbyaccount JSON-RPC
 310  // command. The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use
 311  // the default value.
 312  func NewListReceivedByAccountCmd(minConf *int, includeEmpty, includeWatchOnly *bool) *ListReceivedByAccountCmd {
 313  	return &ListReceivedByAccountCmd{
 314  		MinConf:          minConf,
 315  		IncludeEmpty:     includeEmpty,
 316  		IncludeWatchOnly: includeWatchOnly,
 317  	}
 318  }
 319  
 320  // ListReceivedByAddressCmd defines the listreceivedbyaddress JSON-RPC command.
 321  type ListReceivedByAddressCmd struct {
 322  	MinConf          *int  `jsonrpcdefault:"1"`
 323  	IncludeEmpty     *bool `jsonrpcdefault:"false"`
 324  	IncludeWatchOnly *bool `jsonrpcdefault:"false"`
 325  }
 326  
 327  // NewListReceivedByAddressCmd returns a new instance which can be used to issue a listreceivedbyaddress JSON-RPC
 328  // command. The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use
 329  // the default value.
 330  func NewListReceivedByAddressCmd(minConf *int, includeEmpty, includeWatchOnly *bool) *ListReceivedByAddressCmd {
 331  	return &ListReceivedByAddressCmd{
 332  		MinConf:          minConf,
 333  		IncludeEmpty:     includeEmpty,
 334  		IncludeWatchOnly: includeWatchOnly,
 335  	}
 336  }
 337  
 338  // ListSinceBlockCmd defines the listsinceblock JSON-RPC command.
 339  type ListSinceBlockCmd struct {
 340  	BlockHash           *string
 341  	TargetConfirmations *int  `jsonrpcdefault:"1"`
 342  	IncludeWatchOnly    *bool `jsonrpcdefault:"false"`
 343  }
 344  
 345  // NewListSinceBlockCmd returns a new instance which can be used to issue a listsinceblock JSON-RPC command. The
 346  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 347  // value.
 348  func NewListSinceBlockCmd(blockHash *string, targetConfirms *int, includeWatchOnly *bool) *ListSinceBlockCmd {
 349  	return &ListSinceBlockCmd{
 350  		BlockHash:           blockHash,
 351  		TargetConfirmations: targetConfirms,
 352  		IncludeWatchOnly:    includeWatchOnly,
 353  	}
 354  }
 355  
 356  // ListTransactionsCmd defines the listtransactions JSON-RPC command.
 357  type ListTransactionsCmd struct {
 358  	Account          *string
 359  	Count            *int  `jsonrpcdefault:"10"`
 360  	From             *int  `jsonrpcdefault:"0"`
 361  	IncludeWatchOnly *bool `jsonrpcdefault:"false"`
 362  }
 363  
 364  // NewListTransactionsCmd returns a new instance which can be used to issue a listtransactions JSON-RPC command.
 365  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 366  // value.
 367  func NewListTransactionsCmd(account *string, count, from *int, includeWatchOnly *bool) *ListTransactionsCmd {
 368  	return &ListTransactionsCmd{
 369  		Account:          account,
 370  		Count:            count,
 371  		From:             from,
 372  		IncludeWatchOnly: includeWatchOnly,
 373  	}
 374  }
 375  
 376  // ListUnspentCmd defines the listunspent JSON-RPC command.
 377  type ListUnspentCmd struct {
 378  	MinConf   *int `jsonrpcdefault:"1"`
 379  	MaxConf   *int `jsonrpcdefault:"9999999"`
 380  	Addresses *[]string
 381  }
 382  
 383  // NewListUnspentCmd returns a new instance which can be used to issue a listunspent JSON-RPC command. The parameters
 384  // which are pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 385  func NewListUnspentCmd(minConf, maxConf *int, addresses *[]string) *ListUnspentCmd {
 386  	return &ListUnspentCmd{
 387  		MinConf:   minConf,
 388  		MaxConf:   maxConf,
 389  		Addresses: addresses,
 390  	}
 391  }
 392  
 393  // LockUnspentCmd defines the lockunspent JSON-RPC command.
 394  type LockUnspentCmd struct {
 395  	Unlock       bool
 396  	Transactions []TransactionInput
 397  }
 398  
 399  // NewLockUnspentCmd returns a new instance which can be used to issue a lockunspent JSON-RPC command.
 400  func NewLockUnspentCmd(unlock bool, transactions []TransactionInput) *LockUnspentCmd {
 401  	return &LockUnspentCmd{
 402  		Unlock:       unlock,
 403  		Transactions: transactions,
 404  	}
 405  }
 406  
 407  // MoveCmd defines the move JSON-RPC command.
 408  type MoveCmd struct {
 409  	FromAccount string
 410  	ToAccount   string
 411  	Amount      float64 // In DUO
 412  	MinConf     *int    `jsonrpcdefault:"1"`
 413  	Comment     *string
 414  }
 415  
 416  // NewMoveCmd returns a new instance which can be used to issue a move JSON-RPC command. The parameters which are
 417  // pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 418  func NewMoveCmd(fromAccount, toAccount string, amount float64, minConf *int, comment *string) *MoveCmd {
 419  	return &MoveCmd{
 420  		FromAccount: fromAccount,
 421  		ToAccount:   toAccount,
 422  		Amount:      amount,
 423  		MinConf:     minConf,
 424  		Comment:     comment,
 425  	}
 426  }
 427  
 428  // SendFromCmd defines the sendfrom JSON-RPC command.
 429  type SendFromCmd struct {
 430  	FromAccount string
 431  	ToAddress   string
 432  	Amount      float64 // In DUO
 433  	MinConf     *int    `jsonrpcdefault:"1"`
 434  	Comment     *string
 435  	CommentTo   *string
 436  }
 437  
 438  // NewSendFromCmd returns a new instance which can be used to issue a sendfrom JSON-RPC command. The parameters which
 439  // are pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 440  func NewSendFromCmd(fromAccount, toAddress string, amount float64, minConf *int, comment, commentTo *string,
 441  ) *SendFromCmd {
 442  	return &SendFromCmd{
 443  		FromAccount: fromAccount,
 444  		ToAddress:   toAddress,
 445  		Amount:      amount,
 446  		MinConf:     minConf,
 447  		Comment:     comment,
 448  		CommentTo:   commentTo,
 449  	}
 450  }
 451  
 452  // SendManyCmd defines the sendmany JSON-RPC command.
 453  type SendManyCmd struct {
 454  	FromAccount string
 455  	Amounts     map[string]float64 `jsonrpcusage:"{\"address\":amount,...}"` // In DUO
 456  	MinConf     *int               `jsonrpcdefault:"1"`
 457  	Comment     *string
 458  }
 459  
 460  // NewSendManyCmd returns a new instance which can be used to issue a sendmany JSON-RPC command. The parameters which
 461  // are pointers indicate they are optional. Passing nil for optional parameters will use the default value.
 462  func NewSendManyCmd(fromAccount string, amounts map[string]float64, minConf *int, comment *string) *SendManyCmd {
 463  	return &SendManyCmd{
 464  		FromAccount: fromAccount,
 465  		Amounts:     amounts,
 466  		MinConf:     minConf,
 467  		Comment:     comment,
 468  	}
 469  }
 470  
 471  // SendToAddressCmd defines the sendtoaddress JSON-RPC command.
 472  type SendToAddressCmd struct {
 473  	Address   string
 474  	Amount    float64
 475  	Comment   *string
 476  	CommentTo *string
 477  }
 478  
 479  // NewSendToAddressCmd returns a new instance which can be used to issue a sendtoaddress JSON-RPC command. The
 480  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 481  // value.
 482  func NewSendToAddressCmd(address string, amount float64, comment, commentTo *string) *SendToAddressCmd {
 483  	return &SendToAddressCmd{
 484  		Address:   address,
 485  		Amount:    amount,
 486  		Comment:   comment,
 487  		CommentTo: commentTo,
 488  	}
 489  }
 490  
 491  // SetAccountCmd defines the setaccount JSON-RPC command.
 492  type SetAccountCmd struct {
 493  	Address string
 494  	Account string
 495  }
 496  
 497  // NewSetAccountCmd returns a new instance which can be used to issue a setaccount JSON-RPC command.
 498  func NewSetAccountCmd(address, account string) *SetAccountCmd {
 499  	return &SetAccountCmd{
 500  		Address: address,
 501  		Account: account,
 502  	}
 503  }
 504  
 505  // SetTxFeeCmd defines the settxfee JSON-RPC command.
 506  type SetTxFeeCmd struct {
 507  	Amount float64 // In DUO
 508  }
 509  
 510  // NewSetTxFeeCmd returns a new instance which can be used to issue a settxfee JSON-RPC command.
 511  func NewSetTxFeeCmd(amount float64) *SetTxFeeCmd {
 512  	return &SetTxFeeCmd{
 513  		Amount: amount,
 514  	}
 515  }
 516  
 517  // SignMessageCmd defines the signmessage JSON-RPC command.
 518  type SignMessageCmd struct {
 519  	Address string
 520  	Message string
 521  }
 522  
 523  // NewSignMessageCmd returns a new instance which can be used to issue a signmessage JSON-RPC command.
 524  func NewSignMessageCmd(address, message string) *SignMessageCmd {
 525  	return &SignMessageCmd{
 526  		Address: address,
 527  		Message: message,
 528  	}
 529  }
 530  
 531  // RawTxInput models the data needed for raw transaction input that is used in the SignRawTransactionCmd struct.
 532  type RawTxInput struct {
 533  	Txid         string `json:"txid"`
 534  	Vout         uint32 `json:"vout"`
 535  	ScriptPubKey string `json:"scriptPubKey"`
 536  	RedeemScript string `json:"redeemScript"`
 537  }
 538  
 539  // SignRawTransactionCmd defines the signrawtransaction JSON-RPC command.
 540  type SignRawTransactionCmd struct {
 541  	RawTx    string
 542  	Inputs   *[]RawTxInput
 543  	PrivKeys *[]string
 544  	Flags    *string `jsonrpcdefault:"\"ALL\""`
 545  }
 546  
 547  // NewSignRawTransactionCmd returns a new instance which can be used to issue a signrawtransaction JSON-RPC command. The
 548  // parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default
 549  // value.
 550  func NewSignRawTransactionCmd(hexEncodedTx string, inputs *[]RawTxInput, privKeys *[]string, flags *string,
 551  ) *SignRawTransactionCmd {
 552  	return &SignRawTransactionCmd{
 553  		RawTx:    hexEncodedTx,
 554  		Inputs:   inputs,
 555  		PrivKeys: privKeys,
 556  		Flags:    flags,
 557  	}
 558  }
 559  
 560  // WalletLockCmd defines the walletlock JSON-RPC command.
 561  type WalletLockCmd struct{}
 562  
 563  // NewWalletLockCmd returns a new instance which can be used to issue a walletlock JSON-RPC command.
 564  func NewWalletLockCmd() *WalletLockCmd {
 565  	return &WalletLockCmd{}
 566  }
 567  
 568  // WalletPassphraseCmd defines the walletpassphrase JSON-RPC command.
 569  type WalletPassphraseCmd struct {
 570  	Passphrase string
 571  	Timeout    int64
 572  }
 573  
 574  // NewWalletPassphraseCmd returns a new instance which can be used to issue a walletpassphrase JSON-RPC command.
 575  func NewWalletPassphraseCmd(passphrase string, timeout int64) *WalletPassphraseCmd {
 576  	return &WalletPassphraseCmd{
 577  		Passphrase: passphrase,
 578  		Timeout:    timeout,
 579  	}
 580  }
 581  
 582  // WalletPassphraseChangeCmd defines the walletpassphrase JSON-RPC command.
 583  type WalletPassphraseChangeCmd struct {
 584  	OldPassphrase string
 585  	NewPassphrase string
 586  }
 587  
 588  // NewWalletPassphraseChangeCmd returns a new instance which can be used to issue a walletpassphrasechange JSON-RPC
 589  // command.
 590  func NewWalletPassphraseChangeCmd(oldPassphrase, newPassphrase string) *WalletPassphraseChangeCmd {
 591  	return &WalletPassphraseChangeCmd{
 592  		OldPassphrase: oldPassphrase,
 593  		NewPassphrase: newPassphrase,
 594  	}
 595  }
 596  func init() {
 597  	
 598  	// The commands in this file are only usable with a wallet server.
 599  	flags := UFWalletOnly
 600  	MustRegisterCmd("addmultisigaddress", (*AddMultisigAddressCmd)(nil), flags)
 601  	MustRegisterCmd("addwitnessaddress", (*AddWitnessAddressCmd)(nil), flags)
 602  	MustRegisterCmd("createmultisig", (*CreateMultisigCmd)(nil), flags)
 603  	MustRegisterCmd("dropwallethistory", (*DropWalletHistoryCmd)(nil), flags)
 604  	MustRegisterCmd("dumpprivkey", (*DumpPrivKeyCmd)(nil), flags)
 605  	MustRegisterCmd("encryptwallet", (*EncryptWalletCmd)(nil), flags)
 606  	MustRegisterCmd("estimatefee", (*EstimateFeeCmd)(nil), flags)
 607  	MustRegisterCmd("estimatepriority", (*EstimatePriorityCmd)(nil), flags)
 608  	MustRegisterCmd("getaccount", (*GetAccountCmd)(nil), flags)
 609  	MustRegisterCmd("getaccountaddress", (*GetAccountAddressCmd)(nil), flags)
 610  	MustRegisterCmd("getaddressesbyaccount", (*GetAddressesByAccountCmd)(nil), flags)
 611  	MustRegisterCmd("getbalance", (*GetBalanceCmd)(nil), flags)
 612  	MustRegisterCmd("getnewaddress", (*GetNewAddressCmd)(nil), flags)
 613  	MustRegisterCmd("getrawchangeaddress", (*GetRawChangeAddressCmd)(nil), flags)
 614  	MustRegisterCmd("getreceivedbyaccount", (*GetReceivedByAccountCmd)(nil), flags)
 615  	MustRegisterCmd("getreceivedbyaddress", (*GetReceivedByAddressCmd)(nil), flags)
 616  	MustRegisterCmd("gettransaction", (*GetTransactionCmd)(nil), flags)
 617  	MustRegisterCmd("getwalletinfo", (*GetWalletInfoCmd)(nil), flags)
 618  	MustRegisterCmd("importprivkey", (*ImportPrivKeyCmd)(nil), flags)
 619  	MustRegisterCmd("keypoolrefill", (*KeyPoolRefillCmd)(nil), flags)
 620  	MustRegisterCmd("listaccounts", (*ListAccountsCmd)(nil), flags)
 621  	MustRegisterCmd("listaddressgroupings", (*ListAddressGroupingsCmd)(nil), flags)
 622  	MustRegisterCmd("listlockunspent", (*ListLockUnspentCmd)(nil), flags)
 623  	MustRegisterCmd("listreceivedbyaccount", (*ListReceivedByAccountCmd)(nil), flags)
 624  	MustRegisterCmd("listreceivedbyaddress", (*ListReceivedByAddressCmd)(nil), flags)
 625  	MustRegisterCmd("listsinceblock", (*ListSinceBlockCmd)(nil), flags)
 626  	MustRegisterCmd("listtransactions", (*ListTransactionsCmd)(nil), flags)
 627  	MustRegisterCmd("listunspent", (*ListUnspentCmd)(nil), flags)
 628  	MustRegisterCmd("lockunspent", (*LockUnspentCmd)(nil), flags)
 629  	MustRegisterCmd("move", (*MoveCmd)(nil), flags)
 630  	MustRegisterCmd("sendfrom", (*SendFromCmd)(nil), flags)
 631  	MustRegisterCmd("sendmany", (*SendManyCmd)(nil), flags)
 632  	MustRegisterCmd("sendtoaddress", (*SendToAddressCmd)(nil), flags)
 633  	MustRegisterCmd("setaccount", (*SetAccountCmd)(nil), flags)
 634  	MustRegisterCmd("settxfee", (*SetTxFeeCmd)(nil), flags)
 635  	MustRegisterCmd("signmessage", (*SignMessageCmd)(nil), flags)
 636  	MustRegisterCmd("signrawtransaction", (*SignRawTransactionCmd)(nil), flags)
 637  	MustRegisterCmd("walletlock", (*WalletLockCmd)(nil), flags)
 638  	MustRegisterCmd("walletpassphrase", (*WalletPassphraseCmd)(nil), flags)
 639  	MustRegisterCmd("walletpassphrasechange", (*WalletPassphraseChangeCmd)(nil), flags)
 640  }
 641