wallet

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 0 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountTag

type AccountTag struct {
	// Filter tag.
	Tag string `json:"tag"`
	// Label for the tag.
	Label string `json:"label"`
	// List of tagged account indices.
	Accounts []int `json:"accounts"`
}

AccountTag model

type AddAddressBookRequest

type AddAddressBookRequest struct {
	Address string `json:"address"`
	// (Optional) string, defaults to "0000000000000000000000000000000000000000000000000000000000000000";
	PaymentID string `json:"payment_id,omitempty"`
	// (Optional) string, defaults to "";
	Description string `json:"description,omitempty"`
}

AddAddressBookRequest represents the request model for AddAddressBook

type AddAddressBookResponse

type AddAddressBookResponse struct {
	// The index of the address book entry.
	Index uint64 `json:"index"`
}

AddAddressBookResponse represents the response model for AddAddressBook

type Address

type Address struct {
	// The base58 (sub)address string.
	Address string `json:"address"`
	// Label of the (sub)address
	Label string `json:"label"`
	// index of the (sub)address
	AddressIndex uint32 `json:"address_index"`
	// states if the (sub)address has already received funds
	Used bool `json:"used"`
}

Address model

type AutoRefreshRequest

type AutoRefreshRequest struct {
	// Enable or disable automatic refreshing (default = true).
	Enable *bool `json:"enable,omitempty"`
	// The period of the wallet refresh cycle (i.e. time between refreshes) in seconds.
	Period uint64 `json:"period,omitempty"`
}

AutoRefreshRequest represents the request model for AutoRefresh

type ChangeWalletPasswordRequest

type ChangeWalletPasswordRequest struct {
	// (Optional) Current wallet password, if defined.
	OldPassword string `json:"old_password,omitempty"`
	// (Optional) New wallet password, if not blank.
	NewPassword string `json:"new_password,omitempty"`
}

ChangeWalletPasswordRequest represents the request model for ChangeWalletPassword

type CheckReserveProofRequest

type CheckReserveProofRequest struct {
	// Public address of the wallet.
	Address string `json:"address"`
	// (Optional) Should be the same message used in get_reserve_proof.
	Message string `json:"message,omitempty"`
	// Reserve signature to confirm.
	Signature string `json:"signature"`
}

CheckReserveProofRequest represents the request model for CheckReserveProof

type CheckReserveProofResponse

type CheckReserveProofResponse struct {
	// States if the inputs proves the reserve.
	Good bool `json:"good"`
}

CheckReserveProofResponse represents the response model for CheckReserveProof

type CheckSpendProofRequest

type CheckSpendProofRequest struct {
	// Transaction id.
	TxID string `json:"txid"`
	// (Optional) Should be the same message used in get_spend_proof.
	Message string `json:"message,omitempty"`
	// Spend signature to confirm.
	Signature string `json:"signature"`
}

CheckSpendProofRequest represents the request model for CheckSpendProof

type CheckSpendProofResponse

type CheckSpendProofResponse struct {
	// States if the inputs proves the spend.
	Good bool `json:"good"`
}

CheckSpendProofResponse represents the response model for CheckSpendProof

type CheckTxKeyRequest

type CheckTxKeyRequest struct {
	// transaction id
	Txid string `json:"txid"`
	// transaction secret key.
	TxKey string `json:"tx_key"`
	// destination public address of the transaction.
	Address string `json:"address"`
}

CheckTxKeyRequest represents the request model for CheckTxKey

type CheckTxKeyResponse

type CheckTxKeyResponse struct {
	// Number of block mined after the one with the transaction.
	Confirmations uint64 `json:"confirmations"`
	// States if the transaction is still in pool or has been added to a block.
	InPool bool `json:"in_pool"`
	// Amount of the transaction.
	Received uint64 `json:"received"`
}

CheckTxKeyResponse represents the response model for CheckTxKey

type CheckTxProofRequest

type CheckTxProofRequest struct {
	// Transaction id.
	TxID string `json:"txid"`
	// Destination public address of the transaction.
	Address string `json:"address"`
	// (Optional) Should be the same message used in get_tx_proof.
	Message string `json:"message,omitempty"`
	// Transaction signature to confirm.
	Signature string `json:"signature"`
}

CheckTxProofRequest represents the request model for CheckTxProof

type CheckTxProofResponse

type CheckTxProofResponse struct {
	Confirmations uint64 `json:"confirmations"`
	// States if the inputs proves the transaction.
	Good bool `json:"good"`
	// States if the transaction is still in pool or has been added to a block.
	InPool bool `json:"in_pool"`
	// Amount of the transaction.
	Received uint64 `json:"received"`
}

CheckTxProofResponse represents the response model for CheckTxProof

type CreateAccountRequest

type CreateAccountRequest struct {
	// Label for the account.
	Label string `json:"label,omitempty"`
}

CreateAccountRequest represents the request model for CreateAccount

type CreateAccountResponse

type CreateAccountResponse struct {
	// Index of the new account.
	AccountIndex uint32 `json:"account_index"`
	// Address for this account. Base58 representation of the public keys.
	Address string `json:"address"`
}

CreateAccountResponse represents the response model for CreateAccount

type CreateAddressRequest

type CreateAddressRequest struct {
	// Create the new subaddress(es) in this account.
	AccountIndex uint32 `json:"account_index"`
	// (Optional) Label for the new address(es).
	Label string `json:"label,omitempty"`
	// (Optional) Number of addresses to create (range: 1 to 64, defaults to 1).
	Count uint32 `json:"count,omitempty"`
}

CreateAddressRequest represents the request model for CreateAddress

type CreateAddressResponse

type CreateAddressResponse struct {
	// 1st newly created address. Base58 representation of the public keys.
	Address string `json:"address"`
	// Index of the first new address created in the requested account.
	AddressIndex uint32 `json:"address_index"`
	// List of all address indices created.
	AddressIndices []uint32 `json:"address_indices"`
	// List of all addresses created
	Addresses []string `json:"addresses"`
}

CreateAddressResponse represents the response model for CreateAddress

type CreateWalletRequest

type CreateWalletRequest struct {
	// Wallet file name.
	Filename string `json:"filename"`
	// (Optional) password to protect the wallet.
	Password string `json:"password,omitempty"`
	// Language for your wallets' seed.
	Language string `json:"language"`
}

CreateWalletRequest represents the request model for CreateWallet

type DeleteAddressBookRequest

type DeleteAddressBookRequest struct {
	// The index of the address book entry.
	Index uint64 `json:"index"`
}

DeleteAddressBookRequest represents the request model for DeleteAddressBook

type Desc

type Desc struct {
	// The sum of the inputs spent by the transaction in atomic units.
	AmountIn uint64 `json:"amount_in"`
	// The sum of the outputs created by the transaction in atomic units.
	AmountOut uint64 `json:"amount_out"`
	// list of:
	Recipients []Recipient `json:"recipients"`

	// The address of the change recipient.
	ChangeAddress string `json:"change_address"`
	// The amount sent to the change address in atomic units.
	ChangeAmount uint64 `json:"change_amount"`
	// The fee charged for the transaction in atomic units.
	Fee uint64 `json:"fee"`
	// payment ID for this transfer (empty if not provided.)
	PaymentID string `json:"payment_id"`
	// The number of inputs in the ring (1 real output + the number of decoys from the blockchain).
	RingSize uint64 `json:"ring_size"`
	// The number of blocks before the monero can be spent (0 for no lock).
	UnlockTime uint64 `json:"unlock_time"`
	// The number of fake outputs added to single-output transactions. Fake outputs have 0 amount and are sent to a random address.
	DummyOutputs uint64 `json:"dummy_outputs"`
	// Arbitrary transaction data in hexadecimal format.
	Extra string `json:"extra"`
}

Desc model

type DescribeTransferRequest

type DescribeTransferRequest struct {
	// A hexadecimal string representing a set of unsigned transactions (empty for multisig transactions; non-multisig signed transactions are not supported).
	UnsignedTxset string `json:"unsigned_txset,omitempty"`
	// A hexadecimal string representing the set of signing keys used in a multisig transaction (empty for unsigned transactions; non-multisig signed transactions are not supported).
	MultisigTxset string `json:"multisig_txset"`
}

DescribeTransferRequest represents the request model for DescribeTransfer

type DescribeTransferResponse

type DescribeTransferResponse struct {
	Desc []Desc `json:"desc"`
}

DescribeTransferResponse represents the response model for DescribeTransfer

type Destination

type Destination struct {
	// Amount to send to each destination, in atomic units.
	Amount uint64 `json:"amount"`
	// Destination public address.
	Address string `json:"address"`
}

Destination model

type EditAddressBookRequest

type EditAddressBookRequest struct {
	// Index of the address book entry to edit.
	Index uint64 `json:"index"`
	// If true, set the address for this entry to the value of "address".
	SetAddress bool `json:"set_address"`
	// (Optional) The 95-character public address to set.
	Address string `json:"address,omitempty"`
	// If true, set the description for this entry to the value of "description".
	SetDescription bool `json:"set_description"`
	// (Optional) Human-readable description for this entry.
	Description string `json:"description,omitempty"`
	// If true, set the payment ID for this entry to the value of "payment_id".
	SetPaymentID bool `json:"set_payment_id"`
	// (Optional) Payment ID for this address.
	PaymentID string `json:"payment_id,omitempty"`
}

EditAddressBookRequest represents the request model for EditAddressBook

type Entry

type Entry struct {
	// Public address of the entry
	Address string `json:"address"`
	// Description of this address entry
	Description string `json:"description"`
	Index       uint64 `json:"index"`
	PaymentID   string `json:"payment_id"`
}

Entry model

type ExportKeyImagesRequest added in v1.0.9

type ExportKeyImagesRequest struct {
	// If true, export all key images. Otherwise, export key images since the last export. (default = false)
	All bool `json:"all"`
}

ExportKeyImagesRequest represent the request model for ExportKeyImages

type ExportKeyImagesResponse added in v1.0.9

type ExportKeyImagesResponse struct {
	// Array of signed key images:
	SignedKeyImages []SignedImage `json:"signed_key_images"`
}

ExportKeyImagesResponse represent the response model for ExportKeyImages

type ExportMultisigInfoResponse

type ExportMultisigInfoResponse struct {
	// Multisig info in hex format for other participants.
	Info string `json:"info"`
}

ExportMultisigInfoResponse represents the response model for ExportMultisigInfo

type ExportOutputsRequest added in v1.0.9

type ExportOutputsRequest struct {
	// If true, export all outputs. Otherwise, export outputs since the last export. (default = false)
	All bool `json:"all"`
}

ExportOutputsRequest represents the request model for ExportOutputs

type ExportOutputsResponse added in v1.0.9

type ExportOutputsResponse struct {
	// Wallet outputs in hex format.
	OutputsDataHex string `json:"outputs_data_hex"`
}

ExportOutputsResponse represents the response model for ExportOutputs

type FinalizeMultisigRequest

type FinalizeMultisigRequest struct {
	// List of multisig string from peers.
	MultisigInfo []string `json:"multisig_info"`
	// Wallet password
	Password string `json:"password"`
}

FinalizeMultisigRequest represents the request model for FinalizeMultisig

type FinalizeMultisigResponse

type FinalizeMultisigResponse struct {
	// Multisig wallet address.
	Address string `json:"address"`
}

FinalizeMultisigResponse represents the response model for FinalizeMultisig

type GenerateFromKeysRequest

type GenerateFromKeysRequest struct {
	// (Optional; defaults to 0) The block height to restore the wallet from.
	RestoreHeight uint64 `json:"restore_height,omitempty"`
	// The wallet's file name on the RPC server.
	Filename string `json:"filename"`
	// The wallet's primary address.
	Address string `json:"address"`
	// (Optional; omit to create a view-only wallet) The wallet's private spend key.
	Spendkey string `json:"spendkey,omitempty"`
	// The wallet's private view key.
	Viewkey string `json:"viewkey"`
	// The wallet's password.
	Password string `json:"password"`
	//(Defaults to true) If true, save the current wallet before generating the new wallet.
	AutosaveCurrent *bool `json:"autosave_current,omitempty"`
}

GenerateFromKeysRequest represents the request model for GenerateFromKeys

type GenerateFromKeysResponse

type GenerateFromKeysResponse struct {
	// The wallet's address.
	Address string `json:"address"`
	// Verification message indicating that the wallet was generated successfully and whether or not it is a view-only wallet.
	Info string `json:"info"`
}

GenerateFromKeysResponse represents the response model for GenerateFromKeys

type GetAccountTagsResponse

type GetAccountTagsResponse struct {
	// array of account tag information
	AccountTags []AccountTag `json:"account_tags"`
}

GetAccountTagsResponse represents the response model for GetAccountTags

type GetAccountsRequest

type GetAccountsRequest struct {
	// Tag for filtering accounts.
	Tag string `json:"tag,omitempty"`
}

GetAccountsRequest represents the request model for GetAccounts

type GetAccountsResponse

type GetAccountsResponse struct {
	// array of subaddress account information
	SubaddressAccounts []SubaddressAcount `json:"subaddress_accounts"`
	// Total balance of the selected accounts (locked or unlocked).
	TotalBalance uint64 `json:"total_balance"`
	// Total unlocked balance of the selected accounts.
	TotalUnlockedBalance uint64 `json:"total_unlocked_balance"`
}

GetAccountsResponse represents the response model for GetAccounts

type GetAddressBookRequest

type GetAddressBookRequest struct {
	// Indices of the requested address book entries
	Entries []uint64 `json:"entries"`
}

GetAddressBookRequest represents the request model for GetAddressBook

type GetAddressBookResponse

type GetAddressBookResponse struct {
	// Array of entries:
	Entries []Entry `json:"entries"`
}

GetAddressBookResponse represents the response model for GetAddressBook

type GetAddressIndexRequest

type GetAddressIndexRequest struct {
	// (sub)address to look for.
	Address string `json:"address"`
}

GetAddressIndexRequest represents the request model for GetAddressIndex

type GetAddressIndexResponse

type GetAddressIndexResponse struct {
	// subaddress information
	Index Index `json:"index"`
}

GetAddressIndexResponse represents the response model for GetAddressIndex

type GetAddressRequest

type GetAddressRequest struct {
	// Return addresses for this account.
	AccountIndex uint32 `json:"account_index"`
	// (Optional, defaults to all) List of address indices to return from the
	// account. Index 0 is of account 0 is the primary address, all others
	// are subadddresses.
	AddressIndices []uint32 `json:"address_index,omitempty"`
}

GetAddressRequest represents the request model for GetAddress

type GetAddressResponse

type GetAddressResponse struct {
	// The primary address of the requested account index.
	Address string `json:"address"`
	// Array of address information entries
	Addresses []Address `json:"addresses"`
}

GetAddressResponse represents the response model for GetAddress

type GetAttributeRequest

type GetAttributeRequest struct {
	// attribute name
	Key string `json:"key"`
}

GetAttributeRequest represents the request model for GetAttribute

type GetAttributeResponse

type GetAttributeResponse struct {
	// attribute value
	Value string `json:"value"`
}

GetAttributeResponse represents the response model for GetAttribute

type GetBalanceRequest

type GetBalanceRequest struct {
	// Return balance for this account.
	AccountIndex uint32 `json:"account_index"`
	// Return balance detail for those subaddresses.
	AddressIndices uint32 `json:"address_indices,omitempty"`
}

GetBalanceRequest represents the request model for GetBalance

type GetBalanceResponse

type GetBalanceResponse struct {
	// The total balance of the current monero-wallet-rpc in session.
	Balance uint64 `json:"balance"`
	// Unlocked funds are those funds that are sufficiently deep enough in the Monero blockchain to be considered safe to spend.
	UnlockedBalance uint64 `json:"unlocked_balance"`
	// True if importing multisig data is needed for returning a correct balance.
	MultisigImportNeeded bool `json:"multisig_import_needed"`
	// Array of subaddress information; Balance information for each subaddress in an account.
	PerSubaddress  []PerSubaddress `json:"per_subaddress"`
	BlocksToUnlock uint64          `json:"blocks_to_unlock"`
	TimeToUnlock   uint64          `json:"time_to_unlock"`
}

GetBalanceResponse represents the response model for GetBalance

type GetBulkPaymentsRequest

type GetBulkPaymentsRequest struct {
	// Payment IDs used to find the payments (16 characters hex).
	PaymentID string `json:"payment_id"`
	// The block height at which to start looking for payments.
	MinBlockHeight uint64 `json:"min_block_height"`
}

GetBulkPaymentsRequest represents the request model for GetBulkPayments

type GetBulkPaymentsResponse

type GetBulkPaymentsResponse struct {
	// list of
	Payments []Payment `json:"payments"`
}

GetBulkPaymentsResponse represents the response model for GetBulkPayments

type GetHeightResponse

type GetHeightResponse struct {
	// The current monero-wallet-rpc's blockchain height.
	// If the wallet has been offline for a long time, it may need to catch up with the daemon.
	Height uint64 `json:"height"`
}

GetHeightResponse represents the response model for GetHeight

type GetLanguagesResponse

type GetLanguagesResponse struct {
	// List of available languages
	Languages []string `json:"languages"`
}

GetLanguagesResponse represents the response model for GetLanguages

type GetPaymentsRequest

type GetPaymentsRequest struct {
	// Payment ID used to find the payments (16 characters hex).
	PaymentID string `json:"payment_id"`
}

GetPaymentsRequest represents the request model for GetPayments

type GetPaymentsResponse

type GetPaymentsResponse struct {
	// list of
	Payments []Payment `json:"payments"`
}

GetPaymentsResponse represents the response model for GetPayments

type GetReserveProofRequest

type GetReserveProofRequest struct {
	// Proves all wallet balance to be disposable.
	All bool `json:"all"`
	// Specify the account from witch to prove reserve. (ignored if all is set to true)
	AccountIndex uint32 `json:"account_index"`
	// Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true)
	Amount uint64 `json:"amount"`
	// (Optional) add a message to the signature to further authenticate the prooving process.
	Message string `json:"message,omitempty"`
}

GetReserveProofRequest represents the request model for GetReserveProof

type GetReserveProofResponse

type GetReserveProofResponse struct {
	// Reserve signature.
	Signature string `json:"signature"`
}

GetReserveProofResponse represents the response model for GetReserveProof

type GetSpendProofRequest

type GetSpendProofRequest struct {
	// Transaction id.
	TxID string `json:"txid"`
	// (Optional) add a message to the signature to further authenticate the prooving process.
	Message string `json:"message,omitempty"`
}

GetSpendProofRequest represents the request model for GetSpendProof

type GetSpendProofResponse

type GetSpendProofResponse struct {
	// Spend signature.
	Signature string `json:"signature"`
}

GetSpendProofResponse represents the response model for GetSpendProof

type GetTransferByTxidRequest

type GetTransferByTxidRequest struct {
	// Transaction ID used to find the transfer.
	TxID string `json:"txid"`
	// (Optional) Index of the account to query for the transfer.
	AccountIndex uint32 `json:"account_index,omitempty"`
}

GetTransferByTxidRequest represents the request model for GetTransferByTxid

type GetTransferByTxidResponse

type GetTransferByTxidResponse struct {
	// JSON object containing payment information:
	Transfer Transfer `json:"transfer"`
	// If the list length is > 1 then multiple outputs where received in this transaction, each of which has its own transfer JSON object
	Transfers []Transfer `json:"transfers"`
}

GetTransferByTxidResponse represents the response model for GetTransferByTxid

type GetTransfersRequest

type GetTransfersRequest struct {
	// (Optional) Include incoming transfers.
	In bool `json:"in,omitempty"`
	// (Optional) Include outgoing transfers.
	Out bool `json:"out,omitempty"`
	// (Optional) Include pending transfers.
	Pending bool `json:"pending,omitempty"`
	// (Optional) Include failed transfers.
	Failed bool `json:"failed,omitempty"`
	// (Optional) Include transfers from the daemon's transaction pool.
	Pool bool `json:"pool,omitempty"`
	// (Optional) Filter transfers by block height.
	FilterByHeight bool `json:"filter_by_height,omitempty"`
	// (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.
	MinHeight uint64 `json:"min_height,omitempty"`
	// (Opional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).
	MaxHeight uint64 `json:"max_height,omitempty"`
	// (Optional) Index of the account to query for transfers. (defaults to 0)
	AccountIndex uint32 `json:"account_index,omitempty"`
	// (Optional) List of subaddress indices to query for transfers. (Defaults to empty - all indices)
	SubaddrIndices []uint32 `json:"subaddr_indices,omitempty"`
}

GetTransfersRequest represents the request model for GetTransfers

type GetTransfersResponse

type GetTransfersResponse struct {
	// Array of transfers:
	In      []*Transfer `json:"in"`
	Out     []*Transfer `json:"out"`
	Pending []*Transfer `json:"pending"`
	Failed  []*Transfer `json:"failed"`
	Pool    []*Transfer `json:"pool"`
}

GetTransfersResponse represents the response model for GetTransfers

type GetTxKeyRequest

type GetTxKeyRequest struct {
	// transaction id
	Txid string `json:"txid"`
}

GetTxKeyRequest represents the request model for GetTxKey

type GetTxKeyResponse

type GetTxKeyResponse struct {
	// transaction secret key.
	TxKey string `json:"tx_key"`
}

GetTxKeyResponse represents the response model for GetTxKey

type GetTxNotesRequest

type GetTxNotesRequest struct {
	// transaction ids
	Txids []string `json:"txids"`
}

GetTxNotesRequest represents the request model for GetTxNotes

type GetTxNotesResponse

type GetTxNotesResponse struct {
	// notes for the transactions
	Notes []string `json:"notes"`
}

GetTxNotesResponse represents the response model for GetTxNotes

type GetTxProofRequest

type GetTxProofRequest struct {
	// transaction id.
	Txid string `json:"txid"`
	// destination public address of the transaction.
	Address string `json:"address"`
	// add a message to the signature to further authenticate the prooving process.
	Message string `json:"messag,omitempty"`
}

GetTxProofRequest represents the request model for GetTxProof

type GetTxProofResponse

type GetTxProofResponse struct {
	// transaction signature.
	Signature string `json:"signature"`
}

GetTxProofResponse represents the response model for GetTxProof

type GetVersionResponse

type GetVersionResponse struct {
	// RPC version, formatted with Major * 2^16 + Minor (Major encoded over the first 16 bits, and Minor over the last 16 bits).
	Version uint64 `json:"version"`
}

GetVersionResponse represents the response model for GetVersion

type ImportKeyImagesRequest

type ImportKeyImagesRequest struct {
	// Array of signed key images:
	SignedKeyImages []SignedImage `json:"signed_key_images"`
}

ImportKeyImagesRequest represents the request model for ImportKeyImages

type ImportKeyImagesResponse

type ImportKeyImagesResponse struct {
	Height uint64 `json:"height"`
	// Amount (in atomic units) spent from those key images.
	Spent uint64 `json:"spent"`
	// Amount (in atomic units) still available from those key images.
	Unspent uint64 `json:"unspent"`
}

ImportKeyImagesResponse represents the response model for ImportKeyImages

type ImportMultisigInfoRequest

type ImportMultisigInfoRequest struct {
	// List of multisig info in hex format from other participants.
	Info []string `json:"info"`
}

ImportMultisigInfoRequest represents the request model for ImportMultisigInfo

type ImportMultisigInfoResponse

type ImportMultisigInfoResponse struct {
	// Number of outputs signed with those multisig info.
	NOutputs uint64 `json:"n_outputs"`
}

ImportMultisigInfoResponse represents the response model for ImportMultisigInfo

type ImportOutputsRequest

type ImportOutputsRequest struct {
	// Wallet outputs in hex format.
	OutputsDataHex string `json:"outputs_data_hex"`
}

ImportOutputsRequest represents the request model for ImportOutputs

type ImportOutputsResponse

type ImportOutputsResponse struct {
	// Number of outputs imported.
	NumImported uint64 `json:"num_imported"`
}

ImportOutputsResponse represents the response model for ImportOutputs

type IncomingTransfer

type IncomingTransfer struct {
	// Amount of this transfer.
	Amount uint64 `json:"amount"`
	// BlockHeight is the block height at which this transfer was confirmed.
	BlockHeight uint64 `json:"block_height"`
	// Frozen indicates whether the output key was frozen by freeze
	Frozen bool `json:"frozen"`
	// Mostly internal use, can be ignored by most users.
	GlobalIndex uint64 `json:"global_index"`
	// Key image for the incoming transfer's unspent output.
	KeyImage string `json:"key_image"`
	// Spent indicates if the output has been spent.
	Spent bool `json:"spent"`
	// Subaddress index for incoming transfer.
	SubaddrIndex Index `json:"subaddr_index"`
	// Several incoming transfers may share the same hash if they were in the same transaction.
	TxHash string `json:"tx_hash"`
	// Unlocked indicates if the output is spendable.
	Unlocked bool `json:"unlocked"`
}

IncomingTransfer model

type IncomingTransfersRequest

type IncomingTransfersRequest struct {
	// "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
	TransferType string `json:"transfer_type"`
	// Return transfers for this account. (defaults to 0)
	AccountIndex uint32 `json:"account_index,omitempty"`
	// Return transfers sent to these subaddresses.
	SubaddrIndices *Index `json:"subaddr_indices,omitempty"`
}

IncomingTransfersRequest represents the request model for IncomingTransfers

type IncomingTransfersResponse

type IncomingTransfersResponse struct {
	// list of
	Transfers []IncomingTransfer `json:"transfers"`
}

IncomingTransfersResponse represents the response model for IncomingTransfers

type Index

type Index struct {
	// Account index.
	Major uint32 `json:"major"`
	// Subaddress index.
	Minor uint32 `json:"minor"`
}

Index model

type IsMultisigResponse

type IsMultisigResponse struct {
	// States if the wallet is multisig
	Multisig bool `json:"multisig"`
	Ready    bool `json:"ready"`
	// Amount of signature needed to sign a transfer.
	Threshold uint64 `json:"threshold"`
	// Total amount of signature in the multisig wallet.
	Total uint64 `json:"total"`
}

IsMultisigResponse represents the response model for IsMultisig

type LabelAccountRequest

type LabelAccountRequest struct {
	// Apply label to account at this index.
	AccountIndex uint32 `json:"account_index"`
	// Label for the account.
	Label string `json:"label"`
}

LabelAccountRequest represents the request model for LabelAccount

type LabelAddressRequest

type LabelAddressRequest struct {
	// subaddress index; JSON Object containing the major & minor address
	Index Index  `json:"index"`
	Label string `json:"label"`
}

LabelAddressRequest represents the request model for LabelAddress

type MakeIntegratedAddressRequest

type MakeIntegratedAddressRequest struct {
	// (Optional, defaults to primary address) Destination public address.
	StandardAddress string `json:"standard_address,omitempty"`
	// (Optional, defaults to a random ID) 16 characters hex encoded.
	PaymentID string `json:"payment_id"`
}

MakeIntegratedAddressRequest represents the request model for MakeIntegratedAddress

type MakeIntegratedAddressResponse

type MakeIntegratedAddressResponse struct {
	IntegratedAddress string `json:"integrated_address"`
	// hex encoded
	PaymentID string `json:"payment_id"`
}

MakeIntegratedAddressResponse represents the response model for MakeIntegratedAddress

type MakeMultisigRequest

type MakeMultisigRequest struct {
	// List of multisig string from peers.
	MultisigInfo []string `json:"multisig_info"`
	// Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info.
	Threshold uint64 `json:"threshold"`
	// Wallet password
	Password string `json:"password"`
}

MakeMultisigRequest represents the request model for MakeMultisig

type MakeMultisigResponse

type MakeMultisigResponse struct {
	// Multisig wallet address.
	Address string `json:"address"`
	// Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets).
	MultisigInfo string `json:"multisig_info"`
}

MakeMultisigResponse represents the response model for MakeMultisig

type MakeURIRequest

type MakeURIRequest struct {
	// Wallet address
	Address string `json:"address"`
	// (Optional) the integer amount to receive, in atomic units
	Amount uint64 `json:"amount,omitempty"`
	// (Optional) 16 or 64 character hexadecimal payment id
	PaymentID string `json:"payment_id,omitempty"`
	// (Optional) name of the payment recipient
	RecipientName string `json:"recipient_name,omitempty"`
	// (Optional) Description of the reason for the tx
	TxDescription string `json:"tx_description,omitempty"`
}

MakeURIRequest represents the request model for MakeUri

type MakeURIResponse

type MakeURIResponse struct {
	// This contains all the payment input information as a properly formatted payment URI
	URI string `json:"uri"`
}

MakeURIResponse represents the response model for MakeUri

type MoneroRPC

type MoneroRPC interface {
	Do(method string, req interface{}, res interface{}) error
}

MoneroRPC interface for client

type OpenWalletRequest

type OpenWalletRequest struct {
	// Wallet name stored in –wallet-dir.
	Filename string `json:"filename"`
	// (Optional) only needed if the wallet has a password defined.
	Password string `json:"password,omitempty"`
}

OpenWalletRequest represents the request model for OpenWallet

type ParseURIRequest

type ParseURIRequest struct {
	// This contains all the payment input information as a properly formatted payment URI
	URI string `json:"uri"`
}

ParseURIRequest represents the request model for ParseUri

type ParseURIResponse

type ParseURIResponse struct {
	// JSON object containing payment information:
	URI URI `json:"uri"`
}

ParseURIResponse represents the response model for ParseUri

type Payment

type Payment struct {
	// Payment ID matching the input parameter.
	PaymentID string `json:"payment_id"`
	// ransaction hash used as the transaction ID.
	TxHash string `json:"tx_hash"`
	// Amount for this payment.
	Amount uint64 `json:"amount"`
	// Height of the block that first confirmed this payment.
	BlockHeight uint64 `json:"block_height"`
	// Time (in block height) until this payment is safe to spend.
	UnlockTime uint64 `json:"unlock_time"`
	// subaddress index
	SubaddrIndex Index `json:"subaddr_index"`
	// Address receiving the payment; Base58 representation of the public keys.
	Address string `json:"address"`
}

Payment model

type PerSubaddress

type PerSubaddress struct {
	AccountIndex uint32 `json:"account_index"`
	// Index of the subaddress in the account.
	AddressIndex uint32 `json:"address_index"`
	// Address at this index. Base58 representation of the public keys.
	Address string `json:"address"`
	// Balance for the subaddress (locked or unlocked).
	Balance uint64 `json:"balance"`
	// Unlocked balance for the subaddress.
	UnlockedBalance uint64 `json:"unlocked_balance"`
	// Label for the subaddress.
	Label string `json:"label"`
	// Number of unspent outputs available for the subaddress.
	NumUnspentOutputs uint64 `json:"num_unspent_outputs"`
	BlocksToUnlock    uint64 `json:"blocks_to_unlock"`
	TimeToUnlock      uint64 `json:"time_to_unlock"`
}

PerSubaddress model

type PrepareMultisigResponse

type PrepareMultisigResponse struct {
	// Multisig string to share with peers to create the multisig wallet.
	MultisigInfo string `json:"multisig_info"`
}

PrepareMultisigResponse represents the response model for PrepareMultisig

type QueryKeyRequest

type QueryKeyRequest struct {
	// Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key
	KeyType string `json:"key_type"`
}

QueryKeyRequest represents the request model for QueryKey

type QueryKeyResponse

type QueryKeyResponse struct {
	// The view key will be hex encoded, while the mnemonic will be a string of words.
	Key string `json:"key"`
}

QueryKeyResponse represents the response model for QueryKey

type Recipient

type Recipient struct {
	// The public address of the recipient.
	Address string `json:"address"`
	// The amount sent to the recipient in atomic units.
	Amount uint64 `json:"amount"`
}

Recipient model

type RefreshRequest

type RefreshRequest struct {
	// (Optional) The block height from which to start refreshing.
	StartHeight *uint64 `json:"start_height,omitempty"`
}

RefreshRequest represents the request model for Refresh

type RefreshResponse

type RefreshResponse struct {
	// Number of new blocks scanned.
	BlocksFetched uint64 `json:"blocks_fetched"`
	// States if transactions to the wallet have been found in the blocks.
	ReceivedMoney bool `json:"received_money"`
}

RefreshResponse represents the response model for Refresh

type RelayTxRequest

type RelayTxRequest struct {
	// transaction metadata returned from a transfer method with get_tx_metadata set to true.
	Hex string `json:"hex"`
}

RelayTxRequest represents the request model for RelayTx

type RelayTxResponse

type RelayTxResponse struct {
	// String for the publically searchable transaction hash.
	TxHash string `json:"tx_hash"`
}

RelayTxResponse represents the response model for RelayTx

type RestoreDeterministicWalletRequest

type RestoreDeterministicWalletRequest struct {
	// Name of the wallet.
	Name string `json:"name"`
	// Password of the wallet.
	Password string `json:"password"`
	// Mnemonic phrase of the wallet to restore.
	Seed string `json:"seed"`
	// Block height to restore the wallet from (default = 0).
	RestoreHeight uint64 `json:"restore_height,omitempty"`
	// Language of the mnemonic phrase in case the old language is invalid.
	Language string `json:"language,omitempty"`
	// Offset used to derive a new seed from the given mnemonic to recover a secret wallet from the mnemonic phrase.
	SeedOffset string `json:"seed_offset,omitempty"`
	//Whether to save the currently open RPC wallet before closing it (Defaults to true).
	AutosaveCurrent *bool `json:"autosave_current,omitempty"`
}

RestoreDeterministicWalletRequest represents the request model for RestoreDeterministicWallet

type RestoreDeterministicWalletResponse

type RestoreDeterministicWalletResponse struct {
	// 95-character hexadecimal address of the restored wallet as a string.
	Address string `json:"address"`
	// Message describing the success or failure of the attempt to restore the wallet.
	Info string `json:"info"`
	// Mnemonic phrase of the restored wallet, which is updated if the wallet was restored from a deprecated-style mnemonic phrase.
	Seed string `json:"seed"`
	// Indicates if the restored wallet was created from a deprecated-style mnemonic phrase.
	WasDeprecated bool `json:"was_deprecated"`
}

RestoreDeterministicWalletResponse represents the response model for RestoreDeterministicWallet

type SetAccountTagDescriptionRequest

type SetAccountTagDescriptionRequest struct {
	// Set a description for this tag.
	Tag string `json:"tag"`
	// Description for the tag.
	Description string `json:"description"`
}

SetAccountTagDescriptionRequest represents the request model for SetAccountTagDescription

type SetAttributeRequest

type SetAttributeRequest struct {
	// attribute name
	Key string `json:"key"`
	// attribute value
	Value string `json:"value"`
}

SetAttributeRequest represents the request model for SetAttribute

type SetDaemonRequest

type SetDaemonRequest struct {
	// The URL of the daemon to connect to.
	Address string `json:"address,omitempty"`
	// If false, some RPC wallet methods will be disabled.
	Trusted bool `json:"trusted,omitempty"`
	// Accepts: disabled, enabled, autodetect) Specifies whether the Daemon uses SSL encryption
	SSLSupport string `json:"ssl_support,omitempty"`
	// The file path location of the SSL key.
	SSLPrivateKeyPath string `json:"ssl_private_key_path,omitempty"`
	// The file path location of the SSL certificate.
	SSLCertificatePath string `json:"ssl_certificate_path,omitempty"`
	// The file path location of the certificate authority file.
	SSLCaFile string `json:"ssl_ca_file,omitempty"`
	// The SHA1 fingerprints accepted by the SSL certificate.
	SSLAllowedFingerprints string `json:"ssl_allowed_fingerprints,omitempty"`
	// If false, the certificate must be signed by a trusted certificate authority.
	SSLAllowAnyCert string `json:"ssl_allow_any_cert,omitempty"`
}

SetDaemonRequest represents the request model for SetDaemon

type SetTxNotesRequest

type SetTxNotesRequest struct {
	// transaction ids
	Txids []string `json:"txids"`
	// notes for the transactions
	Notes []string `json:"notes"`
}

SetTxNotesRequest represents the request model for SetTxNotes

type SignMultisigRequest

type SignMultisigRequest struct {
	// Multisig transaction in hex format, as returned by transfer under multisig_txset.
	TxDataHex string `json:"tx_data_hex"`
}

SignMultisigRequest represents the request model for SignMultisig

type SignMultisigResponse

type SignMultisigResponse struct {
	// Multisig transaction in hex format.
	TxDataHex string `json:"tx_data_hex"`
	// List of transaction Hash.
	TxHashList []string `json:"tx_hash_list"`
}

SignMultisigResponse represents the response model for SignMultisig

type SignRequest

type SignRequest struct {
	// Anything you need to sign.
	Data string `json:"data"`
}

SignRequest represents the request model for Sign

type SignResponse

type SignResponse struct {
	// Signature generated against the "data" and the account public address.
	Signature string `json:"signature"`
}

SignResponse represents the response model for Sign

type SignTransferRequest

type SignTransferRequest struct {
	// Set of unsigned tx returned by "transfer" or "transfer_split" methods.
	UnsignedTxset string `json:"unsigned_txset"`
	// If true, return the raw transaction data. (Defaults to false)
	ExportRaw bool `json:"export_raw,omitempty"`
}

SignTransferRequest represents the request model for SignTransfer

type SignTransferResponse

type SignTransferResponse struct {
	// Set of signed tx to be used for submitting transfer.
	SignedTxset string `json:"signed_txset"`
	// The tx hashes of every transaction.
	TxHashList []string `json:"tx_hash_list"`
	// The tx raw data of every transaction.
	TxRawList []string `json:"tx_raw_list"`
}

SignTransferResponse represents the response model for SignTransfer

type SignedImage

type SignedImage struct {
	KeyImage  string `json:"key_image"`
	Signature string `json:"signature"`
}

SignedImage model

type SplitIntegratedAddressRequest

type SplitIntegratedAddressRequest struct {
	IntegratedAddress string `json:"integrated_address"`
}

SplitIntegratedAddressRequest represents the request model for SplitIntegratedAddress

type SplitIntegratedAddressResponse

type SplitIntegratedAddressResponse struct {
	// States if the address is a subaddress
	IsSubaddress bool `json:"is_subaddress"`
	// hex encoded
	Payment         string `json:"payment"`
	StandardAddress string `json:"standard_address"`
}

SplitIntegratedAddressResponse represents the response model for SplitIntegratedAddress

type StartMiningRequest

type StartMiningRequest struct {
	// Number of threads created for mining.
	ThreadsCount uint64 `json:"threads_count"`
	// Allow to start the miner in smart mining mode.
	DoBackgroundMining bool `json:"do_background_mining"`
	// Ignore battery status (for smart mining only)
	IgnoreBattery bool `json:"ignore_battery"`
}

StartMiningRequest represents the response model for StartMining

type SubaddressAcount

type SubaddressAcount struct {
	// Index of the account.
	AccountIndex uint32 `json:"account_index"`
	// Balance of the account (locked or unlocked).
	Balance uint64 `json:"balance"`
	// Base64 representation of the first subaddress in the account.
	BaseAddress string `json:"base_address"`
	// Label of the account.
	Label string `json:"label"`
	// Tag for filtering accounts.
	Tag string `json:"tag"`
	// Unlocked balance for the account.
	UnlockedBalance uint64 `json:"unlocked_balance"`
}

SubaddressAcount model

type SubmitMultisigRequest

type SubmitMultisigRequest struct {
	// Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex.
	TxDataHex string `json:"tx_data_hex"`
}

SubmitMultisigRequest represents the request model for SubmitMultisig

type SubmitMultisigResponse

type SubmitMultisigResponse struct {
	// List of transaction Hash.
	TxHashList []string `json:"tx_hash_list"`
}

SubmitMultisigResponse represents the response model for SubmitMultisig

type SubmitTransferRequest

type SubmitTransferRequest struct {
	// Set of signed tx returned by "sign_transfer"
	TxDataHex string `json:"tx_data_hex"`
}

SubmitTransferRequest represents the request model for SubmitTransfer

type SubmitTransferResponse

type SubmitTransferResponse struct {
	// The tx hashes of every transaction.
	TxHashList []string `json:"tx_hash_list"`
}

SubmitTransferResponse represents the response model for SubmitTransfer

type SweepAllRequest

type SweepAllRequest struct {
	// Destination public address.
	Address string `json:"address"`
	// Sweep transactions from this account.
	AccountIndex uint32 `json:"account_index"`
	// Sweep from this set of subaddresses in the account.
	SubaddrIndices []uint32 `json:"subaddr_indices,omitempty"`
	// Priority for sending the sweep transfer, partially determines fee.
	Priority uint64 `json:"priority,omitempty"`
	// Number of outputs from the blockchain to mix with (0 means no mixing).
	Mixin uint64 `json:"mixin"`
	// Sets ringsize to n (mixin + 1).
	RingSize uint64 `json:"ring_size"`
	// Number of blocks before the monero can be spent (0 to not add a lock).
	UnlockTime uint64 `json:"unlock_time"`
	// Return the transaction keys after sending.
	GetTxKeys bool `json:"get_tx_keys,omitempty"`
	// Include outputs below this amount.
	BelowAmount uint64 `json:"below_amount,omitempty"`
	// If true, do not relay this sweep transfer. (Defaults to false)
	DoNotRelay bool `json:"do_not_relay,omitempty"`
	// return the transactions as hex encoded string. (Defaults to false)
	GetTxHex bool `json:"get_tx_hex,omitempty"`
	// return the transaction metadata as a string. (Defaults to false)
	GetTxMetadata bool `json:"get_tx_metadata,omitempty"`
}

SweepAllRequest represents the request model for SweepAll

type SweepAllResponse

type SweepAllResponse struct {
	TxHashList []string `json:"tx_hash_list"`
	// The transaction keys for every transaction.
	TxKeyList []string `json:"tx_key_list"`
	// The amount transferred for every transaction.
	AmountList []uint64 `json:"amount_list"`
	// The amount of fees paid for every transaction.
	FeeList []uint64 `json:"fee_list"`
	// The tx as hex string for every transaction.
	TxBlobList []string `json:"tx_blob_list"`
	// List of transaction metadata needed to relay the transactions later.
	TxMetadataList []string `json:"tx_metadata_list"`
	// The set of signing keys used in a multisig transaction (empty for non-multisig).
	MultisigTxset string `json:"multisig_txset"`
	// Set of unsigned tx for cold-signing purposes.
	UnsignedTxset string `json:"unsigned_txset"`
}

SweepAllResponse represents the response model for SweepAll

type SweepDustRequest

type SweepDustRequest struct {
	// Return the transaction keys after sending.
	GetTxKeys bool `json:"get_tx_keys,omitempty"`
	// If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
	DoNotRelay bool `json:"do_not_relay,omitempty"`
	// Return the transactions as hex string after sending. (Defaults to false)
	GetTxHex bool `json:"get_tx_hex,omitempty"`
	// Return list of transaction metadata needed to relay the transfer later. (Defaults to false)
	GetTxMetadata bool `json:"get_tx_metadata,omitempty"`
}

SweepDustRequest represents the request model for SweepDust

type SweepDustResponse

type SweepDustResponse struct {
	// The tx hashes of every transaction.
	TxHashList []string `json:"tx_hash_list"`
	// The transaction keys for every transaction.
	TxKeyList []string `json:"tx_key_list"`
	// The amount transferred for every transaction.
	AmountList []uint64 `json:"amount_list"`
	// The amount of fees paid for every transaction.
	FeeList []uint64 `json:"fee_list"`
	// The tx as hex string for every transaction.
	TxBlobList []string `json:"tx_blob_list"`
	// List of transaction metadata needed to relay the transactions later.
	TxMetadataList []string `json:"tx_metadata_list"`
	// The set of signing keys used in a multisig transaction (empty for non-multisig).
	MultisigTxset string `json:"multisig_txset"`
	// Set of unsigned tx for cold-signing purposes.
	UnsignedTxset string `json:"unsigned_txset"`
}

SweepDustResponse represents the response model for SweepDust

type SweepSingleRequest

type SweepSingleRequest struct {
	// Destination public address.
	Address string `json:"address"`
	// Sweep transactions from this account.
	AccountIndex uint32 `json:"account_index"`
	// Sweep from this set of subaddresses in the account.
	SubaddrIndices []uint32 `json:"subaddr_indices,omitempty"`
	// Priority for sending the sweep transfer, partially determines fee.
	Priority uint64 `json:"priority,omitempty"`
	// Number of outputs from the blockchain to mix with (0 means no mixing).
	Mixin uint64 `json:"mixin"`
	// Sets ringsize to n (mixin + 1).
	RingSize uint64 `json:"ring_size"`
	// Number of blocks before the monero can be spent (0 to not add a lock).
	UnlockTime uint64 `json:"unlock_time"`
	// Return the transaction keys after sending.
	GetTxKeys bool `json:"get_tx_keys,omitempty"`
	// Key image of specific output to sweep.
	KeyImage string `json:"key_image"`
	// Include outputs below this amount.
	BelowAmount uint64 `json:"below_amount,omitempty"`
	// If true, do not relay this sweep transfer. (Defaults to false)
	DoNotRelay bool `json:"do_not_relay,omitempty"`
	// return the transactions as hex encoded string. (Defaults to false)
	GetTxHex bool `json:"get_tx_hex,omitempty"`
	// return the transaction metadata as a string. (Defaults to false)
	GetTxMetadata bool `json:"get_tx_metadata,omitempty"`
}

SweepSingleRequest represents the request model for SweepSingle

type SweepSingleResponse

type SweepSingleResponse struct {
	TxHashList []string `json:"tx_hash_list"`
	// The transaction keys for every transaction.
	TxKeyList []string `json:"tx_key_list"`
	// The amount transferred for every transaction.
	AmountList []uint64 `json:"amount_list"`
	// The amount of fees paid for every transaction.
	FeeList []uint64 `json:"fee_list"`
	// The tx as hex string for every transaction.
	TxBlobList []string `json:"tx_blob_list"`
	// List of transaction metadata needed to relay the transactions later.
	TxMetadataList []string `json:"tx_metadata_list"`
	// The set of signing keys used in a multisig transaction (empty for non-multisig).
	MultisigTxset string `json:"multisig_txset"`
	// Set of unsigned tx for cold-signing purposes.
	UnsignedTxset string `json:"unsigned_txset"`
}

SweepSingleResponse represents the response model for SweepSingle

type TagAccountsRequest

type TagAccountsRequest struct {
	// Tag for the accounts.
	Tag string `json:"tag"`
	// Tag this list of accounts.
	Accounts []int `json:"accounts"`
}

TagAccountsRequest represents the request model for TagAccounts

type Transfer

type Transfer struct {
	// Public address of the transfer.
	Address string `json:"address"`
	// Amount transferred.
	Amount uint64 `json:"amount"`
	// Individual amounts if multiple where received
	Amounts []uint64 `json:"amounts"`
	// Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
	Confirmations uint64 `json:"confirmations"`
	// JSON objects containing transfer destinations:
	Destinations []Destination `json:"destinations"`
	// True if the key image(s) for the transfer have been seen before.
	DoubleSpendSeen bool `json:"double_spend_seen"`
	// Transaction fee for this transfer.
	Fee uint64 `json:"fee"`
	// Height of the first block that confirmed this transfer (0 if not mined yet).
	Height uint64 `json:"height"`
	Locked bool   `json:"locked"`
	// Note about this transfer.
	Note string `json:"note"`
	// Payment ID for this transfer.
	PaymentID string `json:"payment_id"`
	// JSON object containing the major & minor subaddress index:
	SubaddrIndex Index `json:"subaddr_index"`
	// Estimation of the confirmations needed for the transaction to be included in a block.
	SuggestedConfirmationsThreshold uint64 `json:"suggested_confirmations_threshold"`
	// POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
	Timestamp uint64 `json:"timestamp"`
	// Transaction ID for this transfer.
	TxID string `json:"txid"`
	// Transfer type: "in/out/pending/failed/pool"
	Type string `json:"type"`
	// Number of blocks until transfer is safely spendable.
	UnlockTime uint64 `json:"unlock_time"`
}

Transfer model

type TransferRequest

type TransferRequest struct {
	// array of destinations to receive XMR
	Destinations []Destination `json:"destinations"`
	// Transfer from this account index. (Defaults to 0)
	AccountIndex uint32 `json:"account_index,omitempty"`
	// Transfer from this set of subaddresses. (Defaults to empty - all indices)
	SubaddrIndices []uint32 `json:"subaddr_indices,omitempty"`
	// Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
	Priority uint64 `json:"priority,omitempty"`
	// Number of outputs from the blockchain to mix with (0 means no mixing).
	Mixin uint64 `json:"mixin"`
	// Number of outputs to mix in the transaction (this output + N decoys from the blockchain).
	RingSize uint64 `json:"ring_size"`
	// Number of blocks before the monero can be spent (0 to not add a lock).
	UnlockTime uint64 `json:"unlock_time"`
	// Return the transaction key after sending.
	GetTxKey bool `json:"get_tx_key,omitempty"`
	// If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
	DoNotRelay bool `json:"do_not_relay,omitempty"`
	// Return the transaction as hex string after sending (Defaults to false)
	GetTxHex bool `json:"get_tx_hex"`
	// Return the metadata needed to relay the transaction. (Defaults to false)
	GetTxMetadata bool `json:"get_tx_metadata"`
}

TransferRequest represents the request model for Transfer

type TransferResponse

type TransferResponse struct {
	// Amount transferred for the transaction.
	Amount uint64 `json:"amount"`
	// Integer value of the fee charged for the txn.
	Fee uint64 `json:"fee"`
	// Set of multisig transactions in the process of being signed (empty for non-multisig).
	MultisigTxset string `json:"multisig_txset"`
	// Raw transaction represented as hex string, if get_tx_hex is true.
	TxBlob string `json:"tx_blob"`
	// String for the publically searchable transaction hash.
	TxHash string `json:"tx_hash"`
	// String for the transaction key if get_tx_key is true, otherwise, blank string.
	TxKey string `json:"tx_key"`
	// Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.
	TxMetadata string `json:"tx_metadata"`
	// Set of unsigned tx for cold-signing purposes.
	UnsignedTxset string `json:"unsigned_txset"`
}

TransferResponse represents the response model for Transfer

type TransferSplitRequest

type TransferSplitRequest struct {
	// array of destinations to receive XMR
	Destinations []Destination `json:"destinations"`
	// Transfer from this account index. (Defaults to 0)
	AccountIndex uint32 `json:"account_index,omitempty"`
	// Transfer from this set of subaddresses. (Defaults to empty - all indices)
	SubaddrIndices []uint32 `json:"subaddr_indices,omitempty"`
	// Number of outputs from the blockchain to mix with (0 means no mixing).
	Mixin uint64 `json:"mixin"`
	// Sets ringsize to n (mixin + 1).
	RingSize uint64 `json:"ring_size"`
	// Number of blocks before the monero can be spent (0 to not add a lock).
	UnlockTime uint64 `json:"unlock_time"`
	// Return the transaction keys after sending.
	GetTxKey bool `json:"get_tx_key,omitempty"`
	//  Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
	Priority uint64 `json:"priority,omitempty"`
	// If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
	DoNotRelay bool `json:"do_not_relay,omitempty"`
	// Return the transactions as hex string after sending
	GetTxHex bool `json:"get_tx_hex"`
	// True to use the new transaction construction algorithm, defaults to false.
	NewAlgorithm bool `json:"new_algorithm"`
	// Return list of transaction metadata needed to relay the transfer later.
	GetTxMetadata bool `json:"get_tx_metadata"`
}

TransferSplitRequest represents the request model for TransferSplit

type TransferSplitResponse

type TransferSplitResponse struct {
	// The tx hashes of every transaction.
	TxHashList []string `json:"tx_hash_list"`
	// The transaction keys for every transaction.
	TxKeyList []string `json:"tx_key_list"`
	// The amount transferred for every transaction.
	AmountList []uint64 `json:"amount_list"`
	// The amount of fees paid for every transaction.
	FeeList []uint64 `json:"fee_list"`
	// The tx as hex string for every transaction.
	TxBlobList []string `json:"tx_blob_list"`
	// List of transaction metadata needed to relay the transactions later.
	TxMetadataList []string `json:"tx_metadata_list"`
	// The set of signing keys used in a multisig transaction (empty for non-multisig).
	MultisigTxset string `json:"multisig_txset"`
	// Set of unsigned tx for cold-signing purposes.
	UnsignedTxset string `json:"unsigned_txset"`
}

TransferSplitResponse represents the response model for TransferSplit

type URI

type URI struct {
	// Wallet address
	Address string `json:"address"`
	// Integer amount to receive, in atomic units (0 if not provided)
	Amount uint64 `json:"amount"`
	// 16 or 64 character hexadecimal payment id (empty if not provided)
	PaymentID string `json:"payment_id"`
	// Name of the payment recipient (empty if not provided)
	RecipientName string `json:"recipient_name"`
	// Description of the reason for the tx (empty if not provided)
	TxDescription string `json:"tx_description"`
}

URI model

type UntagAccountsRequest

type UntagAccountsRequest struct {
	// Remove tag from this list of accounts.
	Accounts []int `json:"accounts"`
}

UntagAccountsRequest represents the request model for UntagAccounts

type ValidateAddressRequest

type ValidateAddressRequest struct {
	// The address to validate.
	Address string `json:"address"`
	// If true, consider addresses belonging to any of the three Monero networks (mainnet, stagenet, and testnet) valid.
	// Otherwise, only consider an address valid if it belongs to the network on which the rpc-wallet's current daemon is running (Defaults to false).
	AnyNetType bool `json:"any_net_type,omitempty"`
	// If true, consider OpenAlias-formatted addresses valid (Defaults to false).
	AllowOpenalias bool `json:"allow_openalias,omitempty"`
}

ValidateAddressRequest represents the request model for ValidateAddress

type ValidateAddressResponse

type ValidateAddressResponse struct {
	// True if the input address is a valid Monero address.
	Valid bool `json:"valid"`
	// True if the given address is an integrated address.
	Integrated bool `json:"integrated"`
	// True if the given address is a subaddress
	Subaddress bool `json:"subaddress"`
	// Specifies which of the three Monero networks (mainnet, stagenet, and testnet) the address belongs to.
	Nettype string `json:"nettype"`
	// True if the address is OpenAlias-formatted.
	OpenaliasAddress string `json:"openalias_address"`
}

ValidateAddressResponse represents the response model for ValidateAddress

type VerifyRequest

type VerifyRequest struct {
	// What should have been signed.
	Data string `json:"data"`
	// Public address of the wallet used to sign the data.
	Address string `json:"address"`
	// Signature generated by sign method.
	Signature string `json:"signature"`
}

VerifyRequest represents the request model for Verify

type VerifyResponse

type VerifyResponse struct {
	// True if signature is valid.
	Good bool `json:"good"`
}

VerifyResponse represents the response model for Verify

type Wallet

type Wallet interface {
	// SetDaemon connects the RPC server to a Monero daemon.
	SetDaemon(req *SetDaemonRequest) error
	// GetBalance Return the wallet's balance.
	GetBalance(req *GetBalanceRequest) (*GetBalanceResponse, error)
	// GetAddress Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
	GetAddress(req *GetAddressRequest) (*GetAddressResponse, error)
	// GetAddressIndex Get account and address indexes from a specific (sub)address
	GetAddressIndex(req *GetAddressIndexRequest) (*GetAddressIndexResponse, error)
	// CreateAddress Create a new address for an account. Optionally, label the new address.
	CreateAddress(req *CreateAddressRequest) (*CreateAddressResponse, error)
	// LabelAddress Label an address.
	LabelAddress(req *LabelAddressRequest) error
	// ValidateAddress Analyzes a string to determine whether it is a valid monero wallet address and returns the result and the address specifications.
	ValidateAddress(req *ValidateAddressRequest) (*ValidateAddressResponse, error)
	// GetAccount Get all accounts for a wallet. Optionally filter accounts by tag.
	GetAccounts(req *GetAccountsRequest) (*GetAccountsResponse, error)
	// CreateAccount Create a new account with an optional label.
	CreateAccount(req *CreateAccountRequest) (*CreateAccountResponse, error)
	// LabelAccount Label an account.
	LabelAccount(req *LabelAccountRequest) error
	// GetAccountTags Get a list of user-defined account tags.
	GetAccountTags() (*GetAccountTagsResponse, error)
	// TagAccounts Apply a filtering tag to a list of accounts.
	TagAccounts(req *TagAccountsRequest) error
	// UntagAccount Remove filtering tag from a list of accounts.
	UntagAccounts(req *UntagAccountsRequest) error
	// SetAccountTagDescription Set description for an account tag.
	SetAccountTagDescription(req *SetAccountTagDescriptionRequest) error
	// GetHeight Returns the wallet's current block height.
	GetHeight() (*GetHeightResponse, error)
	// Transfer Send monero to a number of recipients.
	Transfer(req *TransferRequest) (*TransferResponse, error)
	// TransferSplit Same as transfer, but can split into more than one tx if necessary.
	TransferSplit(req *TransferSplitRequest) (*TransferSplitResponse, error)
	// SignTransfer Sign a transaction created on a read-only wallet (in cold-signing process)
	SignTransfer(req *SignTransferRequest) (*SignTransferResponse, error)
	// SubmitTransfer Submit a previously signed transaction on a read-only wallet (in cold-signing process)
	SubmitTransfer(req *SubmitTransferRequest) (*SubmitTransferResponse, error)
	// SweepDust Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
	SweepDust(req *SweepDustRequest) (*SweepDustResponse, error)
	// SweepAll Send all unlocked balance to an address.
	SweepAll(req *SweepAllRequest) (*SweepAllResponse, error)
	// SweepSingle Send all of a specific unlocked output to an address.
	SweepSingle(req *SweepSingleRequest) (*SweepSingleResponse, error)
	// RelaxTx Relay a transaction previously created with "do_not_relay":true.
	RelayTx(req *RelayTxRequest) (*RelayTxResponse, error)
	// Store Save the wallet file.
	Store() error
	// GetPayments Get a list of incoming payments using a given payment id.
	GetPayments(req *GetPaymentsRequest) (*GetPaymentsResponse, error)
	// GetBulkPayments Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height.
	// This method is the preferred method over get_payments because it has the same functionality but is more extendable.
	// Either is fine for looking up transactions by a single payment ID.
	GetBulkPayments(req *GetBulkPaymentsRequest) (*GetBulkPaymentsResponse, error)
	// IncomingTransfers Return a list of incoming transfers to the wallet.
	IncomingTransfers(req *IncomingTransfersRequest) (*IncomingTransfersResponse, error)
	// QueryKey Return the spend or view private key.
	QueryKey(req *QueryKeyRequest) (*QueryKeyResponse, error)
	// MakeIntegratedAddress Make an integrated address from the wallet address and a payment id.
	MakeIntegratedAddress(req *MakeIntegratedAddressRequest) (*MakeIntegratedAddressResponse, error)
	// SplitIntegratedAddress Retrieve the standard address and payment id corresponding to an integrated address.
	SplitIntegratedAddress(req *SplitIntegratedAddressRequest) (*SplitIntegratedAddressResponse, error)
	// StopWallet Stops the wallet, storing the current state.
	StopWallet() error
	// RescanBlockchain Rescan the blockchain from scratch, losing any information which can not be recovered from the blockchain itself.
	// This includes destination addresses, tx secret keys, tx notes, etc.
	RescanBlockchain() error
	// SetTxNotes Set arbitrary string notes for transactions.
	SetTxNotes(req *SetTxNotesRequest) error
	// GetTxNotes Get string notes for transactions.
	GetTxNotes(req *GetTxNotesRequest) (*GetTxNotesResponse, error)
	// SetAttribute Set arbitrary attribute.
	SetAttribute(req *SetAttributeRequest) error
	// GetAttribute Get attribute value by name.
	GetAttribute(req *GetAttributeRequest) (*GetAttributeResponse, error)
	// GetTxKey Get transaction secret key from transaction id.
	GetTxKey(req *GetTxKeyRequest) (*GetTxKeyResponse, error)
	// CheckTxKey Check a transaction in the blockchain with its secret key.
	CheckTxKey(req *CheckTxKeyRequest) (*CheckTxKeyResponse, error)
	// GetTxProof Get transaction signature to prove it.
	GetTxProof(req *GetTxProofRequest) (*GetTxProofResponse, error)
	// CheckTxProof Prove a transaction by checking its signature.
	CheckTxProof(req *CheckTxProofRequest) (*CheckTxProofResponse, error)
	// GetSpendProof Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.
	GetSpendProof(req *GetSpendProofRequest) (*GetSpendProofResponse, error)
	// CheckSpendProof Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.
	CheckSpendProof(req *CheckSpendProofRequest) (*CheckSpendProofResponse, error)
	// GetReserveProof Generate a signature to prove of an available amount in a wallet.
	GetReserveProof(req *GetReserveProofRequest) (*GetReserveProofResponse, error)
	// CheckReserveProof Proves a wallet has a disposable reserve using a signature.
	CheckReserveProof(req *CheckReserveProofRequest) (*CheckReserveProofResponse, error)
	// GetTransfers Returns a list of transfers.
	GetTransfers(req *GetTransfersRequest) (*GetTransfersResponse, error)
	// GetTransferByTxid Show information about a transfer to/from this address.
	GetTransferByTxid(req *GetTransferByTxidRequest) (*GetTransferByTxidResponse, error)
	// DescribeTransfer Returns details for each transaction in an unsigned or multisig transaction set.
	DescribeTransfer(req *DescribeTransferRequest) (*DescribeTransferResponse, error)
	// Sign a string.
	Sign(req *SignRequest) (*SignResponse, error)
	// Verify a signature on a string.
	Verify(req *VerifyRequest) (*VerifyResponse, error)
	// ExportOutputs Export all outputs in hex format.
	ExportOutputs(req *ExportOutputsRequest) (*ExportOutputsResponse, error)
	// ImportOutputs Import outputs in hex format.
	ImportOutputs(req *ImportOutputsRequest) (*ImportOutputsResponse, error)
	// ExportKeyImages Export a signed set of key images.
	ExportKeyImages(req *ExportKeyImagesRequest) (*ExportKeyImagesResponse, error)
	// ImportKeyImages Import signed key images list and verify their spent status.
	ImportKeyImages(req *ImportKeyImagesRequest) (*ImportKeyImagesResponse, error)
	// MakeURI Create a payment URI using the official URI spec.
	MakeURI(req *MakeURIRequest) (*MakeURIResponse, error)
	// ParseURI Parse a payment URI to get payment information.
	ParseURI(req *ParseURIRequest) (*ParseURIResponse, error)
	// GetAddressBook Retrieves entries from the address book.
	GetAddressBook(req *GetAddressBookRequest) (*GetAddressBookResponse, error)
	// AddAddressBook Add an entry to the address book.
	AddAddressBook(req *AddAddressBookRequest) (*AddAddressBookResponse, error)
	// EditAddressBook Edit an existing address book entry.
	EditAddressBook(req *EditAddressBookRequest) error
	// DeleteAddressBook Delete an entry from the address book
	DeleteAddressBook(req *DeleteAddressBookRequest) error
	// Refresh a wallet after openning.
	Refresh(req *RefreshRequest) (*RefreshResponse, error)
	// AutoRefresh Set whether and how often to automatically refresh the current wallet.
	AutoRefresh(req *AutoRefreshRequest) error
	// RescanSpent Rescan the blockchain for spent outputs.
	RescanSpent() error
	// StartMining Start mining in the Monero daemon.
	StartMining(req *StartMiningRequest) error
	// StopMining Stop mining in the Monero daemon.
	StopMining() error
	// GetLanguages Get a list of available languages for your wallet's seed.
	GetLanguages() (*GetLanguagesResponse, error)
	// CreateWallet Create a new wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work.
	CreateWallet(req *CreateWalletRequest) error
	// GenerateFromKeys Restores a wallet from a given wallet address, view key, and optional spend key.
	GenerateFromKeys(req *GenerateFromKeysRequest) (*GenerateFromKeysResponse, error)
	// OpenWallet Open a wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work.
	OpenWallet(req *OpenWalletRequest) error
	// RestoreDeterministicWallet Create and open a wallet on the RPC server from an existing mnemonic phrase and close the currently open wallet.
	RestoreDeterministicWallet(req *RestoreDeterministicWalletRequest) (*RestoreDeterministicWalletResponse, error)
	// CloseWallet Close the currently opened wallet, after trying to save it.
	CloseWallet() error
	// ChangeWalletPassword Change a wallet password.
	ChangeWalletPassword(req *ChangeWalletPasswordRequest) error
	// IsMultisig Check if a wallet is a multisig one.
	IsMultisig() (*IsMultisigResponse, error)
	// PrepareMultisig Prepare a wallet for multisig by generating a multisig string to share with peers.
	PrepareMultisig() (*PrepareMultisigResponse, error)
	// MakeMultisig Make a wallet multisig by importing peers multisig string.
	MakeMultisig(req *MakeMultisigRequest) (*MakeMultisigResponse, error)
	// ExportMultisigInfo Export multisig info for other participants.
	ExportMultisigInfo() (*ExportMultisigInfoResponse, error)
	// ImportMultisigInfo Import multisig info from other participants.
	ImportMultisigInfo(req *ImportMultisigInfoRequest) (*ImportMultisigInfoResponse, error)
	// FinalizeMultisig Turn this wallet into a multisig wallet, extra step for N-1/N wallets.
	FinalizeMultisig(req *FinalizeMultisigRequest) (*FinalizeMultisigResponse, error)
	// SignMultisig Sign a transaction in multisig.
	SignMultisig(req *SignMultisigRequest) (*SignMultisigResponse, error)
	// SubmitMultisig Submit a signed multisig transaction.
	SubmitMultisig(req *SubmitMultisigRequest) (*SubmitMultisigResponse, error)
	// GetVersion Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.
	GetVersion() (*GetVersionResponse, error)
}

Wallet interface is a list of the monero-wallet-rpc calls, their inputs and outputs, and examples of each.

func New

func New(client MoneroRPC) Wallet

New creates a new wallet client

Jump to

Keyboard shortcuts

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