Documentation ¶
Index ¶
- func Float64ToXMR(xmr float64) uint64
- func NewPaymentID256() string
- func NewPaymentID64() string
- func StringToXMR(xmr string) (uint64, error)
- func XMRToDecimal(xmr uint64) string
- func XMRToFloat64(xmr uint64) float64
- type Client
- type Destination
- type ErrorCode
- type GetTransferType
- type H
- type Priority
- type QueryKeyType
- type RequestAccuMultisig
- type RequestAddAddressBook
- type RequestChangeWalletPassword
- type RequestCheckReserveProof
- type RequestCheckSpendProof
- type RequestCheckTransaction
- type RequestCheckTxKey
- type RequestCheckTxProof
- type RequestCreateAccount
- type RequestCreateAddress
- type RequestCreateWallet
- type RequestDeleteAddressBook
- type RequestExchangeMultisigKeys
- type RequestFinalizeMultisig
- type RequestGetAccounts
- type RequestGetAddress
- type RequestGetAddressBook
- type RequestGetAddressIndex
- type RequestGetAttribute
- type RequestGetBalance
- type RequestGetBulkPayments
- type RequestGetPayments
- type RequestGetReserveProof
- type RequestGetSpendProof
- type RequestGetTransferByTxID
- type RequestGetTransfers
- type RequestGetTxKey
- type RequestGetTxNotes
- type RequestGetTxProof
- type RequestImportKeyImages
- type RequestImportMultisigInfo
- type RequestImportOutputs
- type RequestIncomingTransfers
- type RequestLabelAccount
- type RequestLabelAddress
- type RequestMakeIntegratedAddress
- type RequestMakeMultisig
- type RequestMakeURI
- type RequestOpenWallet
- type RequestParseURI
- type RequestPrepareMultisig
- type RequestQueryKey
- type RequestRefresh
- type RequestRelayTx
- type RequestRestoreDeterministicWallet
- type RequestSavedPoolWallet
- type RequestSetAccountTagDescription
- type RequestSetAttribute
- type RequestSetTxNotes
- type RequestSign
- type RequestSignMultisig
- type RequestSignMultisigParallel
- type RequestSignTransfer
- type RequestSplitIntegratedAddress
- type RequestStartMining
- type RequestSubmitMultisig
- type RequestSubmitTransfer
- type RequestSweepAll
- type RequestSweepDust
- type RequestSweepSingle
- type RequestTagAccounts
- type RequestTransfer
- type RequestTransferSplit
- type RequestUntagAccounts
- type RequestValidateAddress
- type RequestVerify
- type ResponseAccuMultisig
- type ResponseAddAddressBook
- type ResponseCheckReserveProof
- type ResponseCheckSpendProof
- type ResponseCheckTransaction
- type ResponseCheckTxKey
- type ResponseCheckTxProof
- type ResponseCreateAccount
- type ResponseCreateAddress
- type ResponseExchangeMultisig
- type ResponseExportKeyImages
- type ResponseExportMultisigInfo
- type ResponseExportOutputs
- type ResponseExportSigPubkey
- type ResponseFinalizeMultisig
- type ResponseGetAccountTags
- type ResponseGetAccounts
- type ResponseGetAddress
- type ResponseGetAddressBook
- type ResponseGetAddressIndex
- type ResponseGetAttribute
- type ResponseGetBalance
- type ResponseGetBulkPayments
- type ResponseGetHeight
- type ResponseGetLanguages
- type ResponseGetPayments
- type ResponseGetReserveProof
- type ResponseGetSpendProof
- type ResponseGetTransferByTxID
- type ResponseGetTransfers
- type ResponseGetTxKey
- type ResponseGetTxNotes
- type ResponseGetTxProof
- type ResponseGetVersion
- type ResponseImportKeyImages
- type ResponseImportMultisigInfo
- type ResponseImportOutputs
- type ResponseIncomingTransfers
- type ResponseIsMultisig
- type ResponseMakeIntegratedAddress
- type ResponseMakeMultisig
- type ResponseMakeURI
- type ResponseParseURI
- type ResponsePrepareMultisig
- type ResponseQueryKey
- type ResponseRefresh
- type ResponseRelayTx
- type ResponseRestoreDeterministicWallet
- type ResponseSavePoolWallet
- type ResponseSign
- type ResponseSignMultisig
- type ResponseSignMultisigParallel
- type ResponseSignTransfer
- type ResponseSplitIntegratedAddress
- type ResponseSubmitMultisig
- type ResponseSubmitTransfer
- type ResponseSweepAll
- type ResponseSweepDust
- type ResponseSweepSingle
- type ResponseTransfer
- type ResponseTransferSplit
- type ResponseValidateAddress
- type ResponseVerify
- type SignedKeyImage
- type Transfer
- type WalletError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64ToXMR ¶
Float64ToXMR converts a float64 to a raw atomic XMR
func NewPaymentID256 ¶
func NewPaymentID256() string
NewPaymentID256 generates a 256 bit payment ID (hex encoded).
func NewPaymentID64 ¶
func NewPaymentID64() string
NewPaymentID64 generates a 64 bit payment ID (hex encoded). With 64 bit IDs, there is a non-negligible chance of a collision if they are randomly generated. It is up to recipients generating them to sanity check for uniqueness.
1 million IDs at 64-bit (simplified): 1,000,000^2 / (2^64 * 2) = ~1/36,893,488 so there is a 50% chance a collision happens around 5.06 billion IDs generated.
func StringToXMR ¶
StringToXMR converts a string to a raw atomic XMR
func XMRToDecimal ¶
XMRToDecimal converts a raw atomic XMR balance to a more human readable format.
func XMRToFloat64 ¶
XMRToFloat64 converts raw atomic XMR to a float64
Types ¶
type Client ¶
type Client interface { // GetBalance Return the wallet's balance. GetBalance(*RequestGetBalance) (*ResponseGetBalance, error) // GetAddress Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses. GetAddress(*RequestGetAddress) (*ResponseGetAddress, error) // GetAddressIndex Get account and address indexes from a specific (sub)address GetAddressIndex(*RequestGetAddressIndex) (*ResponseGetAddressIndex, error) // CreateAddress Create a new address for an account. Optionally, label the new address. CreateAddress(*RequestCreateAddress) (*ResponseCreateAddress, error) // LabelAddress Label an address. LabelAddress(*RequestLabelAddress) error // ValidateAddress Validate an address. ValidateAddress(*RequestValidateAddress) (*ResponseValidateAddress, error) // GetAccounts Get all accounts for a wallet. Optionally filter accounts by tag. GetAccounts(*RequestGetAccounts) (*ResponseGetAccounts, error) // CreateAccount Create a new account with an optional label. CreateAccount(*RequestCreateAccount) (*ResponseCreateAccount, error) // LabelAccount Label an account. LabelAccount(*RequestLabelAccount) error // GetAccountTags Get a list of user-defined account tags. GetAccountTags() (*ResponseGetAccountTags, error) // TagAccounts Apply a filtering tag to a list of accounts. TagAccounts(*RequestTagAccounts) error // UntagAccounts Remove filtering tag from a list of accounts. UntagAccounts(*RequestUntagAccounts) error // SetAccountTagDescription Set description for an account tag. SetAccountTagDescription(*RequestSetAccountTagDescription) error // GetHeight Returns the wallet's current block height. GetHeight() (*ResponseGetHeight, error) // Transfer Send monero to a number of recipients. Transfer(*RequestTransfer) (*ResponseTransfer, error) // TransferSplit Same as transfer, but can split into more than one tx if necessary. TransferSplit(*RequestTransferSplit) (*ResponseTransferSplit, error) // SignTransfer Sign a transaction created on a read-only wallet (in cold-signing process) SignTransfer(*RequestSignTransfer) (*ResponseSignTransfer, error) // SubmitTransfer Submit a previously signed transaction on a read-only wallet (in cold-signing process). SubmitTransfer(*RequestSubmitTransfer) (*ResponseSubmitTransfer, error) // SweepDust Send all dust outputs back to the wallet's, to make them easier to spend (and mix). SweepDust(*RequestSweepDust) (*ResponseSweepDust, error) // SweepAll Send all unlocked balance to an address. SweepAll(*RequestSweepAll) (*ResponseSweepAll, error) // SweepSingle Send all of a specific unlocked output to an address. SweepSingle(*RequestSweepSingle) (*ResponseSweepSingle, error) // RelayTx Relay a transaction previously created with "do_not_relay":true. RelayTx(*RequestRelayTx) (*ResponseRelayTx, error) // Store Save the wallet file. Store() error // GetPayments Get a list of incoming payments using a given payment id. GetPayments(*RequestGetPayments) (*ResponseGetPayments, 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(*RequestGetBulkPayments) (*ResponseGetBulkPayments, error) // IncomingTransfers Return a list of incoming transfers to the wallet. IncomingTransfers(*RequestIncomingTransfers) (*ResponseIncomingTransfers, error) // QueryKey Return the spend or view private key. QueryKey(*RequestQueryKey) (*ResponseQueryKey, error) // MakeIntegratedAddress Make an integrated address from the wallet address and a payment id. MakeIntegratedAddress(*RequestMakeIntegratedAddress) (*ResponseMakeIntegratedAddress, error) // SplitIntegratedAddress Retrieve the standard address and payment id corresponding to an integrated address. SplitIntegratedAddress(*RequestSplitIntegratedAddress) (*ResponseSplitIntegratedAddress, 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(*RequestSetTxNotes) error // GetTxNotes Get string notes for transactions. GetTxNotes(*RequestGetTxNotes) (*ResponseGetTxNotes, error) // SetAttribute Set arbitrary attribute. SetAttribute(*RequestSetAttribute) error // GetAttribute Get attribute value by name. GetAttribute(*RequestGetAttribute) (*ResponseGetAttribute, error) // GetTxKey Get transaction secret key from transaction id. GetTxKey(*RequestGetTxKey) (*ResponseGetTxKey, error) // CheckTxKey Check a transaction in the blockchain with its secret key. CheckTxKey(*RequestCheckTxKey) (*ResponseCheckTxKey, error) // GetTxProof Get transaction signature to prove it. GetTxProof(*RequestGetTxProof) (*ResponseGetTxProof, error) // CheckTxProof Prove a transaction by checking its signature. CheckTxProof(*RequestCheckTxProof) (*ResponseCheckTxProof, error) // GetSpendProof Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address. GetSpendProof(*RequestGetSpendProof) (*ResponseGetSpendProof, error) // CheckSpendProof Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address. CheckSpendProof(*RequestCheckSpendProof) (*ResponseCheckSpendProof, error) // GetReserveProof Generate a signature to prove of an available amount in a wallet. GetReserveProof(*RequestGetReserveProof) (*ResponseGetReserveProof, error) // CheckReserveProof Proves a wallet has a disposable reserve using a signature. CheckReserveProof(*RequestCheckReserveProof) (*ResponseCheckReserveProof, error) // GetTransfers Returns a list of transfers. GetTransfers(*RequestGetTransfers) (*ResponseGetTransfers, error) // GetTransferByTxID Show information about a transfer to/from this address. GetTransferByTxID(*RequestGetTransferByTxID) (*ResponseGetTransferByTxID, error) // Sign a string. Sign(*RequestSign) (*ResponseSign, error) // Verify a signature on a string. Verify(*RequestVerify) (*ResponseVerify, error) // ExportOutputs Export all outputs in hex format. ExportOutputs() (*ResponseExportOutputs, error) // ImportOutputs Import outputs in hex format. ImportOutputs(*RequestImportOutputs) (*ResponseImportOutputs, error) // ExportKeyImages Export a signed set of key images. ExportKeyImages() (*ResponseExportKeyImages, error) // ImportKeyImages Import signed key images list and verify their spent status. ImportKeyImages(*RequestImportKeyImages) (*ResponseImportKeyImages, error) // MakeURI Create a payment URI using the official URI spec. MakeURI(*RequestMakeURI) (*ResponseMakeURI, error) // ParseURI Parse a payment URI to get payment information. ParseURI(*RequestParseURI) (*ResponseParseURI, error) // GetAddressBook Retrieves entries from the address book. GetAddressBook(*RequestGetAddressBook) (*ResponseGetAddressBook, error) // AddAddressBook Add an entry to the address book. AddAddressBook(*RequestAddAddressBook) (*ResponseAddAddressBook, error) // DeleteAddressBook Delete an entry from the address book. DeleteAddressBook(*RequestDeleteAddressBook) error // Refresh Refresh a wallet after openning. Refresh(*RequestRefresh) (*ResponseRefresh, error) // RescanSpent Rescan the blockchain for spent outputs. RescanSpent() error // StartMining Start mining in the Monero daemon. StartMining(*RequestStartMining) error // StopMining Stop mining in the Monero daemon. StopMining() error // GetLanguages Get a list of available languages for your wallet's seed. GetLanguages() (*ResponseGetLanguages, 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(*RequestCreateWallet) error // RestoreDeterministicWallet Create and open a wallet on the RPC server from an existing mnemonic phrase and close the currently open wallet. RestoreDeterministicWallet(*RequestRestoreDeterministicWallet) (*ResponseRestoreDeterministicWallet, error) // OpenWallet Open a wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work. OpenWallet(*RequestOpenWallet) error // CloseWallet Close the currently opened wallet, after trying to save it. CloseWallet() error // SavePoolWallet create the pool wallet SavePoolWallet(*RequestSavedPoolWallet) (*ResponseSavePoolWallet, error) // ChangeWalletPassword Change a wallet password. ChangeWalletPassword(*RequestChangeWalletPassword) error // IsMultisig Check if a wallet is a multisig one. IsMultisig() (*ResponseIsMultisig, error) // PrepareMultisig Prepare a wallet for multisig by generating a multisig string to share with peers. PrepareMultisig() (*ResponsePrepareMultisig, error) // MakeMultisig Make a wallet multisig by importing peers multisig string. MakeMultisig(*RequestMakeMultisig) (*ResponseMakeMultisig, error) // ExportMultisigInfo Export multisig info for other participants. ExportMultisigInfo() (*ResponseExportMultisigInfo, error) // ImportMultisigInfo Import multisig info from other participants. ImportMultisigInfo(*RequestImportMultisigInfo) (*ResponseImportMultisigInfo, error) // ExchangeMultiSigKeys exchange the share for multisig N-X/N wallet ExchangeMultiSigKeys(*RequestExchangeMultisigKeys) (*ResponseExchangeMultisig, error) // FinalizeMultisig Turn this wallet into a multisig wallet, extra step for N-1/N wallets. FinalizeMultisig(*RequestFinalizeMultisig) (*ResponseFinalizeMultisig, error) // SignMultisig Sign a transaction in multisig. SignMultisig(*RequestSignMultisig) (*ResponseSignMultisig, error) // ExportSigPubKey export the node's multisig pubkeys for signing ExportSigPubKey() (resp *ResponseExportSigPubkey, err error) // SignMultisigParallel sign the transaction in prarallel and return the share for accumulation SignMultisigParallel(*RequestSignMultisigParallel) (*ResponseSignMultisigParallel, error) // AccuMultisig accumulate the signatures AccuMultisig(req *RequestAccuMultisig) (resp *ResponseAccuMultisig, err error) // CheckTransaction check whether the transaction we received has the same destination and amount CheckTransaction(req *RequestCheckTransaction) (resp *ResponseCheckTransaction, err error) // SubmitMultisig Submit a signed multisig transaction. SubmitMultisig(*RequestSubmitMultisig) (*ResponseSubmitMultisig, error) // GetVersion Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits. GetVersion() (*ResponseGetVersion, error) }
Client is a monero-wallet-rpc client.
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 helper structs
type ErrorCode ¶
type ErrorCode int
ErrorCode is a monero-wallet-rpc error code. Copied from https://github.com/monero-project/monero/blob/release-v0.11.0.0/src/wallet/wallet_rpc_server_error_codes.h
const ( // ErrUnknown - E_UNKNOWN_ERROR ErrUnknown ErrorCode = -1 // ErrWrongAddress - E_WRONG_ADDRESS ErrWrongAddress ErrorCode = -2 // ErrDaemonIsBusy - E_DAEMON_IS_BUSY ErrDaemonIsBusy ErrorCode = -3 // ErrGenericTransferError - E_GENERIC_TRANSFER_ERROR ErrGenericTransferError ErrorCode = -4 // ErrWrongPaymentID - E_WRONG_PAYMENT_ID ErrWrongPaymentID ErrorCode = -5 // ErrTransferType - E_TRANSFER_TYPE ErrTransferType ErrorCode = -6 // ErrDenied - E_DENIED ErrDenied ErrorCode = -7 // ErrWrongTxID - E_WRONG_TXID ErrWrongTxID ErrorCode = -8 // ErrWrongSignature - E_WRONG_SIGNATURE ErrWrongSignature ErrorCode = -9 // ErrWrongKeyImage - E_WRONG_KEY_IMAGE ErrWrongKeyImage ErrorCode = -10 // ErrWrongURI - E_WRONG_URI ErrWrongURI ErrorCode = -11 // ErrWrongIndex - E_WRONG_INDEX ErrWrongIndex ErrorCode = -12 // ErrNotOpen - E_NOT_OPEN ErrNotOpen ErrorCode = -13 )
type GetTransferType ¶
type GetTransferType string
GetTransferType is a string that contains the possible types: "all": all the transfers; "available": only transfers which are not yet spent; "unavailable": only transfers which are already spent.
const ( // TransferAll - all the transfers TransferAll GetTransferType = "all" // TransferAvailable - only transfers which are not yet spent TransferAvailable GetTransferType = "available" TransferUnavailable GetTransferType = "unavailable" )
type QueryKeyType ¶
type QueryKeyType string
QueryKeyType is the parameter to send with client.QueryKey()
const ( // QueryKeyMnemonic is the mnemonic seed QueryKeyMnemonic QueryKeyType = "mnemonic" // QueryKeyView is the private view key QueryKeyView QueryKeyType = "view_key" // QueryKeySpend is the private spend key QueryKeySpend QueryKeyType = "spend_key" //TODO: test )
type RequestAccuMultisig ¶
type RequestAccuMultisig struct {
TxDataHex []string `json:"tx_data_hex"` // AccuMultisig transaction in hex format, as returned by transfer under multisig_txset.
}
RequestAccuMultisig request of AccuMultisig
type RequestAddAddressBook ¶
type RequestAddAddressBook struct { Address string `json:"address"` PaymentID string `json:"payment_id"` // (Optional) string, defaults to "0000000000000000000000000000000000000000000000000000000000000000"; Description string `json:"description"` // (Optional) string, defaults to ""; }
RequestAddAddressBook request of AddAddressBook (add_address_book) Add an entry to the address book.
type RequestChangeWalletPassword ¶
type RequestChangeWalletPassword struct { OldPassword string `json:"old_password"` // (Optional) Current wallet password, if defined. NewPassword string `json:"new_password"` // (Optional) New wallet password, if not blank. }
RequestChangeWalletPassword request of ChangeWalletPassword (change_wallet_password)
type RequestCheckReserveProof ¶
type RequestCheckReserveProof struct { Address string `json:"address"` // Public address of the wallet. Message string `json:"message"` // (Optional) Should be the same message used in get_reserve_proof. Signature string `json:"signature"` // Reserve signature to confirm. }
RequestCheckReserveProof request of CheckReserveProof (check_reserve_proof) Proves a wallet has a disposable reserve using a signature
type RequestCheckSpendProof ¶
type RequestCheckSpendProof struct { TxID string `json:"txid"` // Transaction id. Message string `json:"message"` // (Optional) Should be the same message used in get_spend_proof. Signature string `json:"signature"` // Spend signature to confirm. }
RequestCheckSpendProof request of CheckSpendProof (check_spend_proof)
type RequestCheckTransaction ¶
type RequestCheckTransaction struct { Destinations []*Destination `json:"destinations"` // Array of destinations to receive XMR: TxDataHex string `json:"tx_data_hex"` }
RequestCheckTransaction request of CheckTransaction
type RequestCheckTxKey ¶
type RequestCheckTxKey struct { TxID string `json:"txid"` // Transaction id. TxKey string `json:"tx_key"` // Transaction secret key. Address string `json:"address"` // Destination public address of the transaction. }
RequestCheckTxKey request of CheckTxKey (check_tx_key) Check a transaction in the blockchain with its secret key
type RequestCheckTxProof ¶
type RequestCheckTxProof struct { TxID string `json:"txid"` // Transaction id. Address string `json:"address"` // Destination public address of the transaction. Message string `json:"message"` // (Optional) Should be the same message used in get_tx_proof. Signature string `json:"signature"` // Transaction signature to confirm. }
RequestCheckTxProof request of CheckTxProof (check_tx_proof) Prove a transaction by checking its signature.
type RequestCreateAccount ¶
type RequestCreateAccount struct { // (Optional) Label for the account. Label string `json:"label"` }
RequestCreateAccount request of CreateAccount (create_account) Create a new account with an optional label.
type RequestCreateAddress ¶
type RequestCreateAddress struct { AccountIndex uint64 `json:"account_index"` // Create a new address for this account. Label string `json:"label"` // (Optional) Label for the new address. }
RequestCreateAddress used by CreateAddress Create a new address for an account. Optionally, label the new address.
type RequestCreateWallet ¶
type RequestCreateWallet struct { Filename string `json:"filename"` // Wallet file name. Password string `json:"password"` // (Optional) password to protect the wallet. Language string `json:"language"` // Language for your wallets' seed. }
RequestCreateWallet request of CreateWallet (create_wallet) Create a new wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work
type RequestDeleteAddressBook ¶
type RequestDeleteAddressBook struct {
Index uint64 `json:"index"` // The index of the address book entry.
}
RequestDeleteAddressBook request of DeleteAddressBook (delete_address_book) Delete an entry from the address book.
type RequestExchangeMultisigKeys ¶
type RequestExchangeMultisigKeys struct { MultisigInfo []string `json:"multisig_info"` // List of multisig string from peers. Password string `json:"password"` // Wallet password }
RequestExchangeMultisigKeys request of ExchangeMultisig (exchange_multisig)
type RequestFinalizeMultisig ¶
type RequestFinalizeMultisig struct { MultisigInfo []string `json:"multisig_info"` // List of multisig string from peers. Password string `json:"password"` // Wallet password }
RequestFinalizeMultisig request of FinalizeMultisig (finalize_multisig)
type RequestGetAccounts ¶
type RequestGetAccounts struct {
Tag string `json:"tag"` // (Optional) Tag for filtering accounts.
}
RequestGetAccounts request of GetAccounts (get_accounts) Get all accounts for a wallet. Optionally filter accounts by tag.
type RequestGetAddress ¶
type RequestGetAddress struct { AccountIndex uint64 `json:"account_index"` // Return subaddresses for this account. AddressIndex []uint64 `json:"address_index"` // (Optional) List of subaddresses to return from an account. }
RequestGetAddress used by GetAddress, return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
type RequestGetAddressBook ¶
type RequestGetAddressBook struct {
Entries []uint64 `json:"entries"` // Indices of the requested address book entries
}
RequestGetAddressBook request of GetAddressBook (get_address_book)
type RequestGetAddressIndex ¶
type RequestGetAddressIndex struct {
Address string `json:"address"` // (Sub)address to look for.
}
RequestGetAddressIndex used by GetAddressIndex , Get account and address indexes from a specific (sub)address
type RequestGetAttribute ¶
type RequestGetAttribute struct {
Key string `json:"key"` // Attribute name
}
RequestGetAttribute request of GetAttribute (get_attribute)
type RequestGetBalance ¶
type RequestGetBalance struct { AccountIndex uint64 `json:"account_index"` // Return balance for this account. AddressIndices []uint64 `json:"address_indices"` // (Optional) Return balance detail for those subaddresses. }
RequestGetBalance used by GetBalance
type RequestGetBulkPayments ¶
type RequestGetBulkPayments struct { PaymentIDs []string `json:"payment_ids"` // Payment IDs used to find the payments (16 characters hex). MinBlockHeight uint64 `json:"min_block_height"` // The block height at which to start looking for payments. }
RequestGetBulkPayments request of GetBulkPayments (get_bulk_payments) 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.
type RequestGetPayments ¶
type RequestGetPayments struct {
PaymentID string `json:"payment_id"` // Payment ID used to find the payments (16 characters hex).
}
RequestGetPayments request of GetPayments (get_payments) Get a list of incoming payments using a given payment id.
type RequestGetReserveProof ¶
type RequestGetReserveProof struct { All bool `json:"all"` // Proves all wallet balance to be disposable. AccountIndex uint64 `json:"account_index"` // Specify the account from witch to prove reserve. (ignored if all is set to true) Amount uint64 `json:"amount"` // Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true) Message string `json:"message"` // (Optional) add a message to the signature to further authenticate the proving process. If a message is added to get_reserve_proof (optional), this message will be required when using check_reserve_proof }
RequestGetReserveProof request of GetReserveProof (get_reserve_proof) Generate a signature to prove of an available amount in a wallet
type RequestGetSpendProof ¶
type RequestGetSpendProof struct { TxID string `json:"txid"` // Transaction id. Message string `json:"message"` // (Optional) add a message to the signature to further authenticate the prooving process. }
RequestGetSpendProof request of GetSpendProof (get_spend_proof) Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.
type RequestGetTransferByTxID ¶
type RequestGetTransferByTxID struct { TxID string `json:"txid"` // Transaction ID used to find the transfer. AccountIndex uint64 `json:"account_index,omitempty"` // (Optional) Index of the account to query for the transfer. }
RequestGetTransferByTxID request of GetTransferByTxID (get_transfer_by_txid) Show information about a transfer to/from this address.
type RequestGetTransfers ¶
type RequestGetTransfers struct { In bool `json:"in"` // (Optional) Include incoming transfers. Out bool `json:"out"` // (Optional) Include outgoing transfers. Pending bool `json:"pending"` // (Optional) Include pending transfers. Failed bool `json:"failed"` // (Optional) Include failed transfers. Pool bool `json:"pool"` // (Optional) Include transfers from the daemon's transaction pool. FilterByHeight bool `json:"filter_by_height"` // (Optional) Filter transfers by block height. MinHeight uint64 `json:"min_height"` // (Optional) Minimum block height to scan for transfers, if filtering by height is enabled. MaxHeight uint64 `json:"max_height,omitempty"` // (Opional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height). AccountIndex uint64 `json:"account_index"` // (Optional) Index of the account to query for transfers. (defaults to 0) SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) List of subaddress indices to query for transfers. (Defaults to empty - all indices) }
RequestGetTransfers request of GetTransfers (get_transfers) Returns a list of transfers.
type RequestGetTxKey ¶
type RequestGetTxKey struct {
TxID string `json:"txid"` // Transaction id
}
RequestGetTxKey request of GetTxKey (get_tx_key) Get transaction secret key from transaction id
type RequestGetTxNotes ¶
type RequestGetTxNotes struct {
TxIDs []string `json:"txids"` // Transaction ids
}
RequestGetTxNotes request of GetTxNotes (get_tx_notes)
type RequestGetTxProof ¶
type RequestGetTxProof struct { TxID string `json:"txid"` // Transaction id Address string `json:"address"` // Destination public address of the transaction. Message string `json:"message"` // (Optional) add a message to the signature to further authenticate the proving process. }
RequestGetTxProof request of GetTxProof (get_tx_proof) Get transaction signature to prove it
type RequestImportKeyImages ¶
type RequestImportKeyImages struct {
SignedKeyImages []*SignedKeyImage `json:"signed_key_images"` // Array of signed key images:
}
RequestImportKeyImages request of ImportKeyImages
type RequestImportMultisigInfo ¶
type RequestImportMultisigInfo struct {
Info []string `json:"info"` // List of multisig info in hex format from other participants.
}
RequestImportMultisigInfo request of ImportMultisigInfo(import_multisig_info) Import multisig info from other participants
type RequestImportOutputs ¶
type RequestImportOutputs struct {
OutputsDataHex string `json:"outputs_data_hex"` // Wallet outputs in hex format.
}
RequestImportOutputs request of ImportOutputs (import_outputs) Import outputs in hex format
type RequestIncomingTransfers ¶
type RequestIncomingTransfers struct { TransferType string `json:"transfer_type"` // "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent. AccountIndex uint64 `json:"account_index"` // (Optional) Return transfers for this account. (defaults to 0) SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Return transfers sent to these subaddresses. Verbose bool `json:"verbose"` // (Optional) Enable verbose output, return key image if true. }
RequestIncomingTransfers request of IncomingTransfers (incoming_transfers) Return a list of incoming transfers to the wallet.
type RequestLabelAccount ¶
type RequestLabelAccount struct { AccountIndex uint64 `json:"account_index"` // Apply label to account at this index. Label string `json:"label"` // Label for the account. }
RequestLabelAccount request of LabelAccount (label_account)
type RequestLabelAddress ¶
type RequestLabelAddress struct { Index struct { Major uint64 `json:"major"` // Account index for the subaddress. Minor uint64 `json:"minor"` // Index of the subaddress in the account. } `json:"index"` // Subaddress index; JSON Object containing the major & minor address Label string `json:"label"` // Label for the address. }
RequestLabelAddress request of LabelAddress (label_address) Label an address.
type RequestMakeIntegratedAddress ¶
type RequestMakeIntegratedAddress struct { StandardAddress string `json:"standard_address"` // (Optional, defaults to primary address) Destination public address. PaymentID string `json:"payment_id"` // (Optional, defaults to a random ID) 16 characters hex encoded. }
RequestMakeIntegratedAddress request of MakeIntegratedAddress (make_integrated_address) Make an integrated address from the wallet address and a payment id.
type RequestMakeMultisig ¶
type RequestMakeMultisig struct { MultisigInfo []string `json:"multisig_info"` // List of multisig string from peers. Threshold uint64 `json:"threshold"` // Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info. Password string `json:"password"` // Wallet password }
RequestMakeMultisig request of MakeMultisig(make_multisig)
type RequestMakeURI ¶
type RequestMakeURI struct { Address string `json:"address"` // Wallet address Amount uint64 `json:"amount"` // (Optional) the integer amount to receive, in atomic units PaymentID string `json:"payment_id"` // (Optional) 16 or 64 character hexadecimal payment id RecipientName string `json:"recipient_name"` // (Optional) name of the payment recipient TxDescription string `json:"tx_description"` // (Optional) Description of the reason for the tx }
RequestMakeURI request of MakeURI (make_uri) Create a payment URI using the official URI spec.
type RequestOpenWallet ¶
type RequestOpenWallet struct { Filename string `json:"filename"` // Wallet name stored in –wallet-dir. Password string `json:"password"` // (Optional) only needed if the wallet has a password defined. }
RequestOpenWallet request of OpenWallet (open_wallet) Open a wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work.
type RequestParseURI ¶
type RequestParseURI struct {
URI string `json:"uri"` // This contains all the payment input information as a properly formatted payment URI
}
RequestParseURI request of ParseURI (parse_uri)
type RequestPrepareMultisig ¶ added in v1.0.2
type RequestPrepareMultisig struct {
EnableMultiSigExperimental bool `json:"enable_multisig_experimental"` // enable multisig
}
RequestPrepareMultisig request prepare_multisig
type RequestQueryKey ¶
type RequestQueryKey struct {
KeyType string `json:"key_type"` // Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key
}
RequestQueryKey request of QueryKey (query_key) Return the spend or view private key.
type RequestRefresh ¶
type RequestRefresh struct {
StartHeight uint64 `json:"start_height,omitempty"` // (Optional) The block height from which to start refreshing.
}
RequestRefresh request of Refresh (refresh) Refresh a wallet after opening.
type RequestRelayTx ¶
type RequestRelayTx struct {
Hex string `json:"hex"` // Transaction metadata returned from a transfer method with get_tx_metadata set to true.
}
RequestRelayTx request of RelayTx (relay_tx) Relay a transaction previously created with "do_not_relay":true.
type RequestRestoreDeterministicWallet ¶
type RequestRestoreDeterministicWallet struct { FileName string `json:"filename"` // Name of the wallet. Password string `json:"password"` // Password of the wallet. Seed string `json:"seed"` // Mnemonic phrase of the wallet to restore. RestoreHeight int64 `json:"restore_height"` // (Optional) Block height to restore the wallet from (default = 0). Language string `json:"language"` // (Optional) Language of the mnemonic phrase in case the old language is invalid. SeedOffset string `json:"seed_offset"` // (Optional) Offset used to derive a new seed from the given mnemonic to recover a secret wallet from the mnemonic phrase. AutoSaveCurrent bool `json:"auto_save_current"` // Whether to save the currently open RPC wallet before closing it (Defaults to true). }
RequestRestoreDeterministicWallet request of restore_deterministic_wallet
type RequestSavedPoolWallet ¶
type RequestSavedPoolWallet struct { PoolAddress string `json:"pool_address"` // pool address name OldAddress string `json:"old_address"` // old wallet address Password string `json:"password"` // password of the pool wallet }
RequestSavedPoolWallet request of SavePoolWallet
type RequestSetAccountTagDescription ¶
type RequestSetAccountTagDescription struct { Tag string `json:"tag"` // Set a description for this tag. Description string `json:"description"` // Description for the tag. }
RequestSetAccountTagDescription request of SetAccountTagDescription (set_account_tag_description) Set description for an account tag
type RequestSetAttribute ¶
type RequestSetAttribute struct { Key string `json:"key"` // Attribute name Value string `json:"value"` // Attribute value }
RequestSetAttribute request of SetAttribute (set_attribute) Set arbitrary attribute.
type RequestSetTxNotes ¶
type RequestSetTxNotes struct { TxIDs []string `json:"txids"` // Transaction ids Notes []string `json:"notes"` // Notes for the transactions }
RequestSetTxNotes request of SetTxNotes (set_tx_notes) Set arbitrary string notes for transactions.
type RequestSign ¶
type RequestSign struct {
Data string `json:"data"` // Anything you need to sign.
}
RequestSign request of Sign (sign) Sign a string
type RequestSignMultisig ¶
type RequestSignMultisig struct {
TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format, as returned by transfer under multisig_txset.
}
RequestSignMultisig request of SignMultisig(sign_multisig)
type RequestSignMultisigParallel ¶
type RequestSignMultisigParallel struct { TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format, as returned by transfer under multisig_txset. PaymentID string `json:"payment_id"` PubKeys []string `json:"all_signer_pubkeys"` }
RequestSignMultisigParallel request of SignMultisigParallel
type RequestSignTransfer ¶
type RequestSignTransfer struct { UnsighnedxSet string `json:"unsigned_txset"` // Set of unsigned tx returned by "transfer" or "transfer_split" methods. ExportRaw bool `json:"export_raw,omitempty"` // (Optional) If true, return the raw transaction data. (Defaults to false) }
RequestSignTransfer request of SignTransfer (sign_transfer) Sign a transaction created on a read-only wallet (in cold-signing process)
type RequestSplitIntegratedAddress ¶
type RequestSplitIntegratedAddress struct {
IntegratedAddress string `json:"integrated_address"` // Integrated address
}
RequestSplitIntegratedAddress request of SplitIntegratedAddress (split_integrated_address) Retrieve the standard address and payment id corresponding to an integrated address.
type RequestStartMining ¶
type RequestStartMining struct { ThreadsCount uint64 `json:"threads_count"` // Number of threads created for mining. DoBackgroundMining bool `json:"do_background_mining"` // Allow to start the miner in smart mining mode. IgnoreBattery bool `json:"ignore_battery"` // Ignore battery status (for smart mining only) }
RequestStartMining request of StartMining (start_mining) Start mining in the Monero daemon.
type RequestSubmitMultisig ¶
type RequestSubmitMultisig struct {
TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex.
}
RequestSubmitMultisig request of SubmitMultisig (submit_multisig) Submit a signed multisig transaction.
type RequestSubmitTransfer ¶
type RequestSubmitTransfer struct {
TxDataHex string `json:"tx_data_hex"` // Set of signed tx returned by "sign_transfer"
}
RequestSubmitTransfer request of SubmitTransfer (submit_transfer) Submit a previously signed transaction on a read-only wallet (in cold-signing process)
type RequestSweepAll ¶
type RequestSweepAll struct { Address string `json:"address"` // Destination public address. AccountIndex uint64 `json:"account_index"` // Sweep transactions from this account. SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Sweep from this set of subaddresses in the account. SubaddrIndicesAll bool `json:"subaddr_indices_all"` // (Optional) Sweep from all subaddresses in the account (default: false). Priority Priority `json:"priority"` // (Optional) Priority for sending the sweep transfer, partially determines fee. Mixin uint64 `json:"mixin"` // Number of outputs from the blockchain to mix with (0 means no mixing). RingSize uint64 `json:"ring_size,omitempty"` // (Optional) Sets ringsize to n (mixin + 1). UnlockTime uint64 `json:"unlock_time"` // Number of blocks before the monero can be spent (0 to not add a lock). PaymentID string `json:"payment_id"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. GetTxKeys bool `json:"get_tx_keys"` // (Optional) Return the transaction keys after sending. BelowAmount uint64 `json:"below_amount"` // (Optional) Include outputs below this amount. DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) If true, do not relay this sweep transfer. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) return the transactions as hex encoded string. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` // (Optional) return the transaction metadata as a string. (Defaults to false) }
RequestSweepAll request of SweepAll (sweep_all) Send all unlocked balance to an address.
type RequestSweepDust ¶
type RequestSweepDust struct { GetTxKeys bool `json:"get_tx_keys"` // (Optional) Return the transaction keys after sending. DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) GetTxHey bool `json:"get_tx_hex,omitempty"` // (Optional) Return the transactions as hex string after sending. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` // (Optional) Return list of transaction metadata needed to relay the transfer later. (Defaults to false) }
RequestSweepDust request of SweepDust (sweep_dust) Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
type RequestSweepSingle ¶
type RequestSweepSingle struct { Address string `json:"address"` // Destination public address AccountIndex uint64 `json:"account_index"` // Sweep transactions from this account. SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Sweep from this set of subaddresses in the account.s Priority Priority `json:"priority"` // (Optional) Priority for sending the sweep transfer, partially determines fee. Mixin uint64 `json:"mixin"` // Number of outputs from the blockchain to mix with (0 means no mixing). RingSize uint64 `json:"ring_size,omitempty"` // (Optional) Sets ringsize to n (mixin + 1). UnlockTime uint64 `json:"unlock_time"` // Number of blocks before the monero can be spent (0 to not add a lock). PaymentID string `json:"payment_id"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. GetxKeys bool `json:"get_tx_keys"` // (Optional) Return the transaction keys after sending. KeyImage string `json:"key_image"` // Key image of specific output to sweep. BelowAmount uint64 `json:"below_amount"` // (Optional) Include outputs below this amount. DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) If true, do not relay this sweep transfer. (Defaults to false) GetTxHey bool `json:"get_tx_hex,omitempty"` // (Optional) return the transactions as hex encoded string. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` // (Optional) return the transaction metadata as a string. (Defaults to false) }
RequestSweepSingle request of SweepSingle (sweep_single) Send all of a specific unlocked output to an address
type RequestTagAccounts ¶
type RequestTagAccounts struct { Tag string `json:"tag"` // Tag for the accounts. Accounts []uint64 `json:"accounts"` // Tag this list of accounts. }
RequestTagAccounts request of TagAccounts (tag_accounts) Apply a filtering tag to a list of accounts.
type RequestTransfer ¶
type RequestTransfer struct { Destinations []*Destination `json:"destinations"` // Array of destinations to receive XMR AccountIndex uint64 `json:"account_index"` // (Optional) Transfer from this account index. (Defaults to 0) SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices) Priority Priority `json:"priority"` // Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority. Mixing uint64 `json:"mixin"` // Number of outputs from the blockchain to mix with (0 means no mixing). RingSize uint64 `json:"ring_size,omitempty"` // (Optional) Number of outputs to mix in the transaction (this output + N decoys from the blockchain). UnlockTime uint64 `json:"unlock_time"` // Number of blocks before the monero can be spent (0 to not add a lock). PaymentID string `json:"payment_id"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. GetTxKey bool `json:"get_tx_key"` // (Optional) Return the transaction key after sending. DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) Return the transaction as hex string after sending (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` // (Optional) Return the metadata needed to relay the transaction. (Defaults to false) }
RequestTransfer request of Transfer (transfer) Send monero to a number of recipients.
type RequestTransferSplit ¶
type RequestTransferSplit struct { Destinations []*Destination `json:"destinations"` // Array of destinations to receive XMR AccountIndex uint64 `json:"account_index"` // (Optional) Transfer from this account index. (Defaults to 0) SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices) Mixin uint64 `json:"mixin"` // Number of outputs from the blockchain to mix with (0 means no mixing). RingSize uint64 `json:"ring_size,omitempty"` // (Optional) Sets ringsize to n (mixin + 1). UnlockTime uint64 `json:"unlock_time"` // Number of blocks before the monero can be spent (0 to not add a lock). PaymendID string `json:"payment_id"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. GetxKeys bool `json:"get_tx_keys"` // (Optional) Return the transaction keys after sending. Priority Priority `json:"priority"` // Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority. DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) Return the transactions as hex string after sending NewAlgorithm bool `json:"new_algorithm"` // True to use the new transaction construction algorithm, defaults to false. GetTxMetadata bool `json:"get_tx_metadata,omitempty"` // (Optional) Return list of transaction metadata needed to relay the transfer later. }
RequestTransferSplit request of TransferSplit (transfer_split) Same as transfer, but can split into more than one tx if necessary
type RequestUntagAccounts ¶
type RequestUntagAccounts struct {
Accounts []uint64 `json:"accounts"` // Remove tag from this list of accounts.
}
RequestUntagAccounts request of UntagAccounts (untag_accounts) Remove filtering tag from a list of accounts.
type RequestValidateAddress ¶
type RequestValidateAddress struct { Address string `json:"address"` // The address to validate. AnyNetType bool `json:"any_net_type,omitempty"` // (Optional); 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). AllowOpenAlias bool `json:"allow_openalias,omitempty"` // (Optional); If true, consider OpenAlias-formatted addresses valid (Defaults to false). }
RequestValidateAddress request of ValidateAddress (validate_address) Analyzes a string to determine whether it is a valid monero wallet address and returns the result and the address specifications.
type RequestVerify ¶
type RequestVerify struct { Data string `json:"data"` // What should have been signed. Address string `json:"address"` // Public address of the wallet used to sign the data. Signature string `json:"signature"` // Signature generated by sign method. }
RequestVerify request of Verify (verify) Verify a signature on a string
type ResponseAccuMultisig ¶
type ResponseAccuMultisig struct { TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format. TxHashList []string `json:"tx_hash_list"` // List of transaction Hash. }
ResponseAccuMultisig response of AccuMultisig
type ResponseAddAddressBook ¶
type ResponseAddAddressBook struct {
Index uint64 `json:"index"` // The index of the address book entry.
}
ResponseAddAddressBook response of AddAddressBook
type ResponseCheckReserveProof ¶
type ResponseCheckReserveProof struct {
Good bool `json:"good"` // States if the inputs proves the reserve.
}
ResponseCheckReserveProof response of CheckReserveProof
type ResponseCheckSpendProof ¶
type ResponseCheckSpendProof struct {
Good bool `json:"good"` // States if the inputs proves the spend.
}
ResponseCheckSpendProof response of CheckSpendProof
type ResponseCheckTransaction ¶
type ResponseCheckTransaction struct {
CheckResult bool `json:"check_result"`
}
ResponseCheckTransaction response of CheckTransaction
type ResponseCheckTxKey ¶
type ResponseCheckTxKey struct { Confirmations uint64 `json:"confirmations"` // Number of block mined after the one with the transaction. InPool bool `json:"in_pool"` // States if the transaction is still in pool or has been added to a block.s Received uint64 `json:"received"` // Amount of the transaction. }
ResponseCheckTxKey response of CheckTxKey
type ResponseCheckTxProof ¶
type ResponseCheckTxProof struct { Confirmations uint64 `json:"confirmations"` // Number of block mined after the one with the transaction. Good bool `json:"good"` // States if the inputs proves the transaction. InPool bool `json:"in_pool"` // States if the transaction is still in pool or has been added to a block. Received uint64 `json:"received"` // Amount of the transaction. }
ResponseCheckTxProof response of CheckTxProof
type ResponseCreateAccount ¶
type ResponseCreateAccount struct { AccountIndex uint64 `json:"account_index"` // Index of the new account. Address string `json:"address"` // Address for this account. Base58 representation of the public keys. }
ResponseCreateAccount response of CreateAccount
type ResponseCreateAddress ¶
type ResponseCreateAddress struct { Address string `json:"address"` // Newly created address. Base58 representation of the public keys. AddressIndex uint64 `json:"address_index"` // Index of the new address under the input account. }
ResponseCreateAddress response of CreateAddress
type ResponseExchangeMultisig ¶
type ResponseExchangeMultisig struct { MultisigInfo string `json:"multisig_info"` // returned multisig info Address string `json:"address"` // wallet address }
ResponseExchangeMultisig response of ExchangeMultisig
type ResponseExportKeyImages ¶
type ResponseExportKeyImages struct { SignedKeyImages []struct { KeyImage string `json:"key_image"` Signature string `json:"signature"` } `json:"signed_key_images"` // Array of signed key images: }
ResponseExportKeyImages response of ExportKeyImages (export_key_images) Export a signed set of key images
type ResponseExportMultisigInfo ¶
type ResponseExportMultisigInfo struct {
Info string `json:"info"` // Multisig info in hex format for other participants.
}
ResponseExportMultisigInfo response of ExportMultisigInfo (export_multisig_info) Export multisig info for other participants
type ResponseExportOutputs ¶
type ResponseExportOutputs struct {
OutputsDataHex string `json:"outputs_data_hex"` // Wallet outputs in hex format.
}
ResponseExportOutputs response of ExportOutputs (export_outputs) Export outputs in hex format
type ResponseExportSigPubkey ¶
type ResponseExportSigPubkey struct {
PubKeys []string `json:"multisig_keys"`
}
ResponseExportSigPubkey response of ExportSigPubkey
type ResponseFinalizeMultisig ¶
type ResponseFinalizeMultisig struct {
Address string `json:"address"` // Multisig wallet address.
}
ResponseFinalizeMultisig response of FinalizeMultisig
type ResponseGetAccountTags ¶
type ResponseGetAccountTags struct { AccountTags []struct { Tag string `json:"tag"` // Filter tag. Label string `json:"label"` // Label for the tag. Accounts []uint64 `json:"accounts"` // List of tagged account indices. } `json:"account_tags"` // Array of account tag information }
ResponseGetAccountTags response of GetAccountTags (get_account_tags)
type ResponseGetAccounts ¶
type ResponseGetAccounts struct { SubaddressAccounts []struct { AccountIndex uint64 `json:"account_index"` // Index of the account. Balance uint64 `json:"balance"` // Balance of the account (locked or unlocked). BaseAddress string `json:"base_address"` // Base64 representation of the first subaddress in the account. Label string `json:"label"` // (Optional) Label of the account. Tag string `json:"tag"` // (Optional) Tag for filtering accounts. UnlockedBalance uint64 `json:"unlocked_balance"` // Unlocked balance for the account. } `json:"subaddress_accounts"` // Array of subaddress account information: TotalBalance uint64 `json:"total_balance"` // Total balance of the selected accounts (locked or unlocked). TotalUnlockedBalance uint64 `json:"total_unlocked_balance"` // Total unlocked balance of the selected accounts. }
ResponseGetAccounts response of GetAccounts
type ResponseGetAddress ¶
type ResponseGetAddress struct { Address string `json:"address"` // The 95-character hex address string of the monero-wallet-rpc in session. Addresses []struct { Address string `json:"address"` // The 95-character hex (sub)address string. Label string `json:"label"` // Label of the (sub)address AddressIndex uint64 `json:"address_index"` // Index of the subaddress Used bool `json:"used"` // States if the (sub)address has already received funds } `json:"addresses"` // Array of addresses information }
ResponseGetAddress response of GetAddress
type ResponseGetAddressBook ¶
type ResponseGetAddressBook struct { Entries []struct { Address string `json:"address"` // Public address of the entry Description string `json:"description"` // Description of this address entry Index uint64 `json:"index"` PaymentID string `json:"payment_id"` } `json:"entries"` // Array of entries: }
ResponseGetAddressBook response of GetAddressBook
type ResponseGetAddressIndex ¶
type ResponseGetAddressIndex struct { Index struct { Major uint64 `json:"major"` // Major - Account index. Minor uint64 `json:"minor"` // Minor - Address index. } `json:"index"` // Index Subaddress information }
ResponseGetAddressIndex response of GetAddressIndex
type ResponseGetAttribute ¶
type ResponseGetAttribute struct {
Value string `json:"value"` // Attribute value
}
ResponseGetAttribute response of GetAttribute
type ResponseGetBalance ¶
type ResponseGetBalance struct { Balance uint64 `json:"balance"` // The total balance of the current monero-wallet-rpc in session. UnlockedBalance uint64 `json:"unlocked_balance"` // Unlocked funds are those funds that are sufficiently deep enough in the Monero blockchain to be considered safe to spend. MultisigImportNeeded bool `json:"multisig_import_needed"` // True if importing multisig data is needed for returning a correct balance. PerSubaddress []struct { AddressIndex uint64 `json:"address_index"` // Index of the subaddress in the account. Address string `json:"address"` // Address at this index. Base58 representation of the public keys. Balance uint64 `json:"balance"` // Balance for the subaddress (locked or unlocked). UnlockedBalance uint64 `json:"unlocked_balance"` // Unlocked balance for the subaddress. Label string `json:"label"` // Label for the subaddress. NumUnspentOutputs uint64 `json:"num_unspent_outputs"` // Number of unspent outputs available for the subaddress. BlocksToUnlock int64 `json:"blocks_to_unlock"` // Blocks to unlock } `json:"per_subaddress"` // Array of subaddress information. Balance information for each subaddress in an account: }
ResponseGetBalance used by GetBalance
type ResponseGetBulkPayments ¶
type ResponseGetBulkPayments struct { Payments []struct { PaymentID string `json:"payment_id"` // Payment ID matching one of the input IDs. TxHash string `json:"tx_hash"` // Transaction hash used as the transaction ID. Amount uint64 `json:"amount"` // Amount for this payment. BlockHeight uint64 `json:"block_height"` // Height of the block that first confirmed this payment. UnlockTime uint64 `json:"unlock_time"` // Time (in block height) until this payment is safe to spend. SubaddrIndex struct { Major uint64 `json:"major"` // Account index for the subaddress. Minor uint64 `json:"minor"` // Index of the subaddress in the account. } `json:"subaddr_index"` // Subaddress index: Address string `json:"address"` // Address receiving the payment; Base58 representation of the public keys. } `json:"payments"` // List of payments }
ResponseGetBulkPayments response of GetBulkPayments
type ResponseGetHeight ¶
type ResponseGetHeight struct {
Height uint64 `json:"height"` // 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.
}
ResponseGetHeight response of GetHeight Returns the wallet's current block height.
type ResponseGetLanguages ¶
type ResponseGetLanguages struct {
Languages []string `json:"languages"` // List of available languages
}
ResponseGetLanguages response of GetLanguages (get_languages) Get a list of available languages for your wallet's seed
type ResponseGetPayments ¶
type ResponseGetPayments struct { Payments []struct { PaymentID string `json:"payment_id"` // Payment ID matching the input parameter. TxHash string `json:"tx_hash"` // Transaction hash used as the transaction ID. Amount uint64 `json:"amount"` // Amount for this payment. BlockHeight uint64 `json:"block_height"` // Height of the block that first confirmed this payment. UnlockTime uint64 `json:"unlock_time"` // Time (in block height) until this payment is safe to spend. SubaddrIndex struct { Major uint64 `json:"major"` // Account index for the subaddress. Minor uint64 `json:"minor"` // Index of the subaddress in the account. } `json:"subaddr_index"` // Subaddress index Address string `json:"address"` // Address receiving the payment; Base58 representation of the public keys. } `json:"payments"` // list of payments }
ResponseGetPayments response of GetPayments
type ResponseGetReserveProof ¶
type ResponseGetReserveProof struct {
Signature string `json:"signature"` // Reserve signature
}
ResponseGetReserveProof response of GetReserveProof
type ResponseGetSpendProof ¶
type ResponseGetSpendProof struct {
Signature string `json:"signature"` // Spend signature.
}
ResponseGetSpendProof response of GetSpendProof
type ResponseGetTransferByTxID ¶
type ResponseGetTransferByTxID struct {
Transfer Transfer `json:"transfer"` // JSON object containing payment information:
}
ResponseGetTransferByTxID response of GetTransferByTxID
type ResponseGetTransfers ¶
type ResponseGetTransfers struct { In []*Transfer `json:"in"` Out []*Transfer `json:"out"` Pending []*Transfer `json:"pending"` Failed []*Transfer `json:"failed"` Pool []*Transfer `json:"pool"` }
ResponseGetTransfers response of GetTransfers
type ResponseGetTxKey ¶
type ResponseGetTxKey struct {
TxKey string `json:"tx_key"` // Transaction secret key
}
ResponseGetTxKey response of GetTxKey
type ResponseGetTxNotes ¶
type ResponseGetTxNotes struct {
Notes []string `json:"notes"` // Notes for the transactions
}
ResponseGetTxNotes response of GetTxNotes
type ResponseGetTxProof ¶
type ResponseGetTxProof struct {
Signature string `json:"signature"` // Transaction signature.
}
ResponseGetTxProof response of GetTxProof
type ResponseGetVersion ¶
type ResponseGetVersion struct {
Version uint64 `json:"version"` // RPC version, formatted with Major * 2^16 + Minor (Major encoded over the first 16 bits, and Minor over the last 16 bits).
}
ResponseGetVersion response of GetVersion (get_version)
type ResponseImportKeyImages ¶
type ResponseImportKeyImages struct { Height uint64 `json:"height"` Spent uint64 `json:"spent"` // Amount (in atomic units) spent from those key images. Unspent uint64 `json:"unspent"` // Amount (in atomic units) still available from those key images. }
ResponseImportKeyImages response of ImportKeyImages
type ResponseImportMultisigInfo ¶
type ResponseImportMultisigInfo struct {
NOutputs uint64 `json:"n_outputs"` // Number of outputs signed with those multisig info.
}
ResponseImportMultisigInfo response of ImportMultisigInfo
type ResponseImportOutputs ¶
type ResponseImportOutputs struct {
NumImported uint64 `json:"num_imported"` // Number of outputs imported.
}
ResponseImportOutputs response of ImportOutputs
type ResponseIncomingTransfers ¶
type ResponseIncomingTransfers struct { Transfers []struct { Amount uint64 `json:"amount"` // Amount of this transfer. GlobalIndex uint64 `json:"global_index"` // Mostly internal use, can be ignored by most users. KeyImage string `json:"key_image"` // Key image for the incoming transfer's unspent output (empty unless verbose is true). Spent bool `json:"spent"` // Indicates if this transfer has been spent. SubaddrIndex struct { Major uint64 `json:"major"` // Account index for the subaddress. Minor uint64 `json:"minor"` // Index of the subaddress in the account. } `json:"subaddr_index"` TxHash string `json:"tx_hash"` // Several incoming transfers may share the same hash if they were in the same transaction. TxSize uint64 `json:"tx_size"` // Size of transaction in bytes. } `json:"transfers"` // list of transfers: }
ResponseIncomingTransfers response of IncomingTransfers
type ResponseIsMultisig ¶
type ResponseIsMultisig struct { Multisig bool `json:"multisig"` // States if the wallet is multisig Ready bool `json:"ready"` Threshold uint64 `json:"threshold"` // Amount of signature needed to sign a transfer. Total uint64 `json:"total"` // Total amount of signature in the multisig wallet. }
ResponseIsMultisig response of IsMultisig
type ResponseMakeIntegratedAddress ¶
type ResponseMakeIntegratedAddress struct { IntegratedAddress string `json:"integrated_address"` // The newly created integrated address PaymentID string `json:"payment_id"` // Hex encoded payment id }
ResponseMakeIntegratedAddress response of MakeIntegratedAddress
type ResponseMakeMultisig ¶
type ResponseMakeMultisig struct { Address string `json:"address"` // Multisig wallet address. MultisigInfo string `json:"multisig_info"` // Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets). }
ResponseMakeMultisig response of MakeMultisig
type ResponseMakeURI ¶
type ResponseMakeURI struct {
URI string `json:"uri"` // This contains all the payment input information as a properly formatted payment URI
}
ResponseMakeURI response of MakeURI
type ResponseParseURI ¶
type ResponseParseURI struct { URI struct { Address string `json:"address"` // Wallet address Amount uint64 `json:"amount"` // Integer amount to receive, in atomic units (0 if not provided) PaymentID string `json:"payment_id"` // 16 or 64 character hexadecimal payment id (empty if not provided) RecipientName string `json:"recipient_name"` // Name of the payment recipient (empty if not provided) TxDescription string `json:"tx_description"` // Description of the reason for the tx (empty if not provided) } `json:"uri"` // JSON object containing payment information: }
ResponseParseURI response of ParseURI
type ResponsePrepareMultisig ¶
type ResponsePrepareMultisig struct {
MultisigInfo string `json:"multisig_info"` // Multisig string to share with peers to create the multisig wallet.
}
ResponsePrepareMultisig response of PrepareMultisig
type ResponseQueryKey ¶
type ResponseQueryKey struct {
Key string `json:"key"` // The view key will be hex encoded, while the mnemonic will be a string of words.
}
ResponseQueryKey response of QueryKey
type ResponseRefresh ¶
type ResponseRefresh struct { BlocksFetched uint64 `json:"blocks_fetched"` // Number of new blocks scanned. ReceivedMoney bool `json:"received_money"` // States if transactions to the wallet have been found in the blocks. }
ResponseRefresh response of Refresh
type ResponseRelayTx ¶
type ResponseRelayTx struct {
TxHash string `json:"tx_hash"` // String for the publically searchable transaction hash.
}
ResponseRelayTx response of RelayTx
type ResponseRestoreDeterministicWallet ¶
type ResponseRestoreDeterministicWallet struct { Address string `json:"address"` // 95-character hexadecimal address of the restored wallet as a string. Info string `json:"info"` // Message describing the success or failure of the attempt to restore the wallet. Seed string `json:"seed"` // Mnemonic phrase of the restored wallet, which is updated if the wallet was restored from a deprecated-style mnemonic phrase. WasDeprecated bool `json:"was_deprecated"` // Indicates if the restored wallet was created from a deprecated-style mnemonic phrase. }
ResponseRestoreDeterministicWallet response of RestoreDeterministicWallet
type ResponseSavePoolWallet ¶
type ResponseSavePoolWallet struct {
SavePoolWalletResponse bool `json:"create_result"`
}
ResponseSavePoolWallet response of SavePoolWallet
type ResponseSign ¶
type ResponseSign struct {
Signature string `json:"signature"` // Signature generated against the "data" and the account public address.
}
ResponseSign response of Sign
type ResponseSignMultisig ¶
type ResponseSignMultisig struct { TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format. TxHashList []string `json:"tx_hash_list"` // List of transaction Hash. }
ResponseSignMultisig response of SignMultisig
type ResponseSignMultisigParallel ¶
type ResponseSignMultisigParallel struct { TxDataHex string `json:"tx_data_hex"` // Multisig transaction in hex format. TxHashList []string `json:"tx_hash_list"` // List of transaction Hash. }
ResponseSignMultisigParallel response of SignMultisigParallel
type ResponseSignTransfer ¶
type ResponseSignTransfer struct { SignedTxSet string `json:"signed_txset"` // Set of signed tx to be used for submitting transfer. TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction. TxRawList []string `json:"tx_raw_list"` // The tx raw data of every transaction. }
ResponseSignTransfer response of SignTransfer
type ResponseSplitIntegratedAddress ¶
type ResponseSplitIntegratedAddress struct { IsSubaddress bool `json:"is_subaddress"` // States if the address is a subaddress PaymentID string `json:"payment_id"` // Hex encoded payment id StandardAddress string `json:"standard_address"` // Address of integrated address }
ResponseSplitIntegratedAddress response of SplitIntegratedAddress
type ResponseSubmitMultisig ¶
type ResponseSubmitMultisig struct {
TxHashList []string `json:"tx_hash_list"` // List of transaction Hash.
}
ResponseSubmitMultisig response of SubmitMultisig
type ResponseSubmitTransfer ¶
type ResponseSubmitTransfer struct {
TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction.
}
ResponseSubmitTransfer response of SubmitTransfer
type ResponseSweepAll ¶
type ResponseSweepAll struct { TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction. TxKeyList []string `json:"tx_key_list"` // The transaction keys for every transaction. AmountList []uint64 `json:"amount_list"` // The amount transferred for every transaction. FeeList []uint64 `json:"fee_list"` // The amount of fees paid for every transaction. TxBlobList []string `json:"tx_blob_list"` // The tx as hex string for every transaction. TxMetadataList []string `json:"tx_metadata_list"` // List of transaction metadata needed to relay the transactions later. MultisigTxSet string `json:"multisig_txset"` // Set of signing keys used in a multisig transaction (empty for non-multisig). UnsignedTxSet string `json:"unsigned_txset"` // Set of unsigned tx for cold-signing purposes.s }
ResponseSweepAll response of SweepAll
type ResponseSweepDust ¶
type ResponseSweepDust struct { TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction. TxKeyList []string `json:"tx_key_list"` // The transaction keys for every transaction. AmountList []uint64 `json:"amount_list"` // The amount transferred for every transaction. FeeList []uint64 `json:"fee_list"` // The amount of fees paid for every transaction. TxBlobList []string `json:"tx_blob_list"` // The tx as hex string for every transaction. TxMetadataList []string `json:"tx_metadata_list"` // List of transaction metadata needed to relay the transactions later. MultisigTxSet string `json:"multisig_txset"` // The set of signing keys used in a multisig transaction (empty for non-multisig). UnsignedTxSet string `json:"unsigned_txset"` // Set of unsigned tx for cold-signing purposes. }
ResponseSweepDust response of SweepDust
type ResponseSweepSingle ¶
type ResponseSweepSingle struct { TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction. TxKeyList []string `json:"tx_key_list"` // The transaction keys for every transaction. AmountList []uint64 `json:"amount_list"` // The amount transferred for every transaction. FreeList []uint64 `json:"fee_list"` // The amount of fees paid for every transaction. TxBlobList []string `json:"tx_blob_list"` // The tx as hex string for every transaction. TxMetadataList []string `json:"tx_metadata_list"` // List of transaction metadata needed to relay the transactions later. MultisigTxSet string `json:"multisig_txset"` // The set of signing keys used in a multisig transaction (empty for non-multisig). UnsignedTxSet string `json:"unsigned_txset"` // Set of unsigned tx for cold-signing purposes. }
ResponseSweepSingle response of SweepSingle
type ResponseTransfer ¶
type ResponseTransfer struct { Amount uint64 `json:"amount"` // Amount transferred for the transaction. Fee uint64 `json:"fee"` // Integer value of the fee charged for the txn. MultisigTxset string `json:"multisig_txset"` // MultiTxSet multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig). TxBlob string `json:"tx_blob"` // Raw transaction represented as hex string, if get_tx_hex is true. TxHash string `json:"tx_hash"` // String for the publically searchable transaction hash. TxKey string `json:"tx_key"` // String for the transaction key if get_tx_key is true, otherwise, blank string. TxMetadata string `json:"tx_metadata"` // Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true. UnsignedTxSet string `json:"unsigned_txset"` // Set of unsigned tx for cold-signing purposes. }
ResponseTransfer response of Transfer
type ResponseTransferSplit ¶
type ResponseTransferSplit struct { TxHashList []string `json:"tx_hash_list"` // The tx hashes of every transaction. TxKeyList []string `json:"tx_key_list"` // The transaction keys for every transaction. AmountList []uint64 `json:"amount_list"` // The amount transferred for every transaction. FeeList []uint64 `json:"fee_list"` // The amount of fees paid for every transaction. TxBlobList []string `json:"tx_blob_list"` // The tx as hex string for every transaction. TxMetadataList []string `json:"tx_metadata_list"` // List of transaction metadata needed to relay the transactions later. MultisigTxSet string `json:"multisig_txset"` // The set of signing keys used in a multisig transaction (empty for non-multisig). UnsignedTxSet string `json:"unsigned_txset"` // Set of unsigned tx for cold-signing purposes. }
ResponseTransferSplit response of TransferSplit
type ResponseValidateAddress ¶
type ResponseValidateAddress struct { Valid bool `json:"valid"` // True if the input address is a valid Monero address. Integrated bool `json:"integrated"` // True if the given address is an integrated address. Subaddress bool `json:"subaddress"` // True if the given address is a subaddress NetType string `json:"nettype"` // Specifies which of the three Monero networks (mainnet, stagenet, and testnet) the address belongs to. OpenAliasAddress string `json:"openalias_address"` // True if the address is OpenAlias-formatted. }
ResponseValidateAddress response of ValidateAddress
type ResponseVerify ¶
type ResponseVerify struct {
Good bool `json:"good"` // True if signature is valid.
}
ResponseVerify response of Verify
type SignedKeyImage ¶
type Transfer ¶
type Transfer struct { Address string `json:"address"` // Public address of the transfer. Amount uint64 `json:"amount"` // Amount transferred. Confirmations uint64 `json:"confirmations"` // 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). Destinations []*Destination `json:"destinations"` // JSON objects containing transfer destinations: DoubleSpendSeen bool `json:"double_spend_seen"` // True if the key image(s) for the transfer have been seen before. Fee uint64 `json:"fee"` // Transaction fee for this transfer. Height uint64 `json:"height"` // Height of the first block that confirmed this transfer (0 if not mined yet). Note string `json:"note"` // Note about this transfer. PaymentID string `json:"payment_id"` // Payment ID for this transfer. SubaddrIndex struct { Major uint64 `json:"major"` // Account index for the subaddress. Minor uint64 `json:"minor"` // Index of the subaddress under the account. } `json:"subaddr_index"` // JSON object containing the major & minor subaddress index: SuggestedConfirmationsThreshold uint64 `json:"suggested_confirmations_threshold"` // Estimation of the confirmations needed for the transaction to be included in a block. Timestamp uint64 `json:"timestamp"` // POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet). TxID string `json:"txid"` // Transaction ID for this transfer. Type string `json:"type"` // Transfer type: "in/out/pending/failed/pool" UnlockTime uint64 `json:"unlock_time"` // Number of blocks until transfer is safely spendable. }
Transfer information
type WalletError ¶
WalletError is the error structured returned by the monero-wallet-rpc
func GetWalletError ¶
func GetWalletError(err error) (isWalletError bool, werr *WalletError)
GetWalletError checks if an erro interface is a wallet-rpc error.
func (*WalletError) Error ¶
func (we *WalletError) Error() string