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 Config
- type Destination
- type ErrorCode
- type GetTransferType
- type H
- type Priority
- type QueryKeyType
- type RequestAddAddressBook
- type RequestChangeWalletPassword
- type RequestCheckReserveProof
- type RequestCheckSpendProof
- type RequestCheckTxKey
- type RequestCheckTxProof
- type RequestCreateAccount
- type RequestCreateAddress
- type RequestCreateWallet
- type RequestDeleteAddressBook
- type RequestFinalizeMultisig
- type RequestGenerateFromKeys
- 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 RequestQueryKey
- type RequestRefresh
- type RequestRelayTx
- type RequestSetAccountTagDescription
- type RequestSetAttribute
- type RequestSetTxNotes
- type RequestSign
- type RequestSignMultisig
- 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 ResponseAddAddressBook
- type ResponseCheckReserveProof
- type ResponseCheckSpendProof
- type ResponseCheckTxKey
- type ResponseCheckTxProof
- type ResponseCreateAccount
- type ResponseCreateAddress
- type ResponseExportKeyImages
- type ResponseExportMultisigInfo
- type ResponseExportOutputs
- type ResponseFinalizeMultisig
- type ResponseGenerateFromKeys
- 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 ResponseSign
- type ResponseSignMultisig
- 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 { // Return the wallet's balance. GetBalance(*RequestGetBalance) (*ResponseGetBalance, error) // Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses. GetAddress(*RequestGetAddress) (*ResponseGetAddress, error) // Get account and address indexes from a specific (sub)address GetAddressIndex(*RequestGetAddressIndex) (*ResponseGetAddressIndex, error) // Create a new address for an account. Optionally, label the new address. CreateAddress(*RequestCreateAddress) (*ResponseCreateAddress, error) // Label an address. LabelAddress(*RequestLabelAddress) error // Validate an address. ValidateAddress(*RequestValidateAddress) (*ResponseValidateAddress, error) // Get all accounts for a wallet. Optionally filter accounts by tag. GetAccounts(*RequestGetAccounts) (*ResponseGetAccounts, error) // Create a new account with an optional label. CreateAccount(*RequestCreateAccount) (*ResponseCreateAccount, error) // Label an account. LabelAccount(*RequestLabelAccount) error // Get a list of user-defined account tags. GetAccountTags() (*ResponseGetAccountTags, error) // Apply a filtering tag to a list of accounts. TagAccounts(*RequestTagAccounts) error // Remove filtering tag from a list of accounts. UntagAccounts(*RequestUntagAccounts) error // Set description for an account tag. SetAccountTagDescription(*RequestSetAccountTagDescription) error // Returns the wallet's current block height. GetHeight() (*ResponseGetHeight, error) // Send monero to a number of recipients. Transfer(*RequestTransfer) (*ResponseTransfer, error) // Same as transfer, but can split into more than one tx if necessary. TransferSplit(*RequestTransferSplit) (*ResponseTransferSplit, error) // Sign a transaction created on a read-only wallet (in cold-signing process) SignTransfer(*RequestSignTransfer) (*ResponseSignTransfer, error) // Submit a previously signed transaction on a read-only wallet (in cold-signing process). SubmitTransfer(*RequestSubmitTransfer) (*ResponseSubmitTransfer, error) // Send all dust outputs back to the wallet's, to make them easier to spend (and mix). SweepDust(*RequestSweepDust) (*ResponseSweepDust, error) // Send all unlocked balance to an address. SweepAll(*RequestSweepAll) (*ResponseSweepAll, error) // Send all of a specific unlocked output to an address. SweepSingle(*RequestSweepSingle) (*ResponseSweepSingle, error) // Relay a transaction previously created with "do_not_relay":true. RelayTx(*RequestRelayTx) (*ResponseRelayTx, error) // Save the wallet file. Store() error // Get a list of incoming payments using a given payment id. GetPayments(*RequestGetPayments) (*ResponseGetPayments, error) // 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) // Return a list of incoming transfers to the wallet. IncomingTransfers(*RequestIncomingTransfers) (*ResponseIncomingTransfers, error) // Return the spend or view private key. QueryKey(*RequestQueryKey) (*ResponseQueryKey, error) // Make an integrated address from the wallet address and a payment id. MakeIntegratedAddress(*RequestMakeIntegratedAddress) (*ResponseMakeIntegratedAddress, error) // Retrieve the standard address and payment id corresponding to an integrated address. SplitIntegratedAddress(*RequestSplitIntegratedAddress) (*ResponseSplitIntegratedAddress, error) // Stops the wallet, storing the current state. StopWallet() error // 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 // Set arbitrary string notes for transactions. SetTxNotes(*RequestSetTxNotes) error // Get string notes for transactions. GetTxNotes(*RequestGetTxNotes) (*ResponseGetTxNotes, error) // Set arbitrary attribute. SetAttribute(*RequestSetAttribute) error // Get attribute value by name. GetAttribute(*RequestGetAttribute) (*ResponseGetAttribute, error) // Get transaction secret key from transaction id. GetTxKey(*RequestGetTxKey) (*ResponseGetTxKey, error) // Check a transaction in the blockchain with its secret key. CheckTxKey(*RequestCheckTxKey) (*ResponseCheckTxKey, error) // Get transaction signature to prove it. GetTxProof(*RequestGetTxProof) (*ResponseGetTxProof, error) // Prove a transaction by checking its signature. CheckTxProof(*RequestCheckTxProof) (*ResponseCheckTxProof, error) // Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address. GetSpendProof(*RequestGetSpendProof) (*ResponseGetSpendProof, error) // Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address. CheckSpendProof(*RequestCheckSpendProof) (*ResponseCheckSpendProof, error) // Generate a signature to prove of an available amount in a wallet. GetReserveProof(*RequestGetReserveProof) (*ResponseGetReserveProof, error) // Proves a wallet has a disposable reserve using a signature. CheckReserveProof(*RequestCheckReserveProof) (*ResponseCheckReserveProof, error) // Returns a list of transfers. GetTransfers(*RequestGetTransfers) (*ResponseGetTransfers, error) // 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) // Export all outputs in hex format. ExportOutputs() (*ResponseExportOutputs, error) // Import outputs in hex format. ImportOutputs(*RequestImportOutputs) (*ResponseImportOutputs, error) // Export a signed set of key images. ExportKeyImages() (*ResponseExportKeyImages, error) // Import signed key images list and verify their spent status. ImportKeyImages(*RequestImportKeyImages) (*ResponseImportKeyImages, error) // Create a payment URI using the official URI spec. MakeURI(*RequestMakeURI) (*ResponseMakeURI, error) // Parse a payment URI to get payment information. ParseURI(*RequestParseURI) (*ResponseParseURI, error) // Retrieves entries from the address book. GetAddressBook(*RequestGetAddressBook) (*ResponseGetAddressBook, error) // Add an entry to the address book. AddAddressBook(*RequestAddAddressBook) (*ResponseAddAddressBook, error) // Delete an entry from the address book. DeleteAddressBook(*RequestDeleteAddressBook) error // Refresh a wallet after openning. Refresh(*RequestRefresh) (*ResponseRefresh, error) // Rescan the blockchain for spent outputs. RescanSpent() error // Start mining in the Monero daemon. StartMining(*RequestStartMining) error // Stop mining in the Monero daemon. StopMining() error // Get a list of available languages for your wallet's seed. GetLanguages() (*ResponseGetLanguages, error) // 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 // Restores a wallet from a given wallet address, view key, and optional spend key. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work. GenerateFromKeys(*RequestGenerateFromKeys) (*ResponseGenerateFromKeys, error) // Open a wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work. OpenWallet(*RequestOpenWallet) error // Close the currently opened wallet, after trying to save it. CloseWallet() error // Change a wallet password. ChangeWalletPassword(*RequestChangeWalletPassword) error // Check if a wallet is a multisig one. IsMultisig() (*ResponseIsMultisig, error) // Prepare a wallet for multisig by generating a multisig string to share with peers. PrepareMultisig() (*ResponsePrepareMultisig, error) // Make a wallet multisig by importing peers multisig string. MakeMultisig(*RequestMakeMultisig) (*ResponseMakeMultisig, error) // Export multisig info for other participants. ExportMultisigInfo() (*ResponseExportMultisigInfo, error) // Import multisig info from other participants. ImportMultisigInfo(*RequestImportMultisigInfo) (*ResponseImportMultisigInfo, error) // Turn this wallet into a multisig wallet, extra step for N-1/N wallets. FinalizeMultisig(*RequestFinalizeMultisig) (*ResponseFinalizeMultisig, error) // Sign a transaction in multisig. SignMultisig(*RequestSignMultisig) (*ResponseSignMultisig, error) // Submit a signed multisig transaction. SubmitMultisig(*RequestSubmitMultisig) (*ResponseSubmitMultisig, error) // 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 Config ¶
type Config struct { Address string CustomHeaders map[string]string Transport http.RoundTripper }
Config holds the configuration of a monero 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"` }
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 RequestAddAddressBook ¶
type RequestAddAddressBook struct { Address string `json:"address"` // (Optional) string, defaults to "0000000000000000000000000000000000000000000000000000000000000000"; PaymentID string `json:"payment_id"` // (Optional) string, defaults to ""; Description string `json:"description"` }
AddAddressBook()
type RequestChangeWalletPassword ¶
type RequestChangeWalletPassword struct { // (Optional) Current wallet password, if defined. OldPassword string `json:"old_password"` // (Optional) New wallet password, if not blank. NewPassword string `json:"new_password"` }
ChangeWalletPassword()
type RequestCheckReserveProof ¶
type RequestCheckReserveProof 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"` // Reserve signature to confirm. Signature string `json:"signature"` }
CheckReserveProof()
type RequestCheckSpendProof ¶
type RequestCheckSpendProof struct { // Transaction id. TxID string `json:"txid"` // (Optional) Should be the same message used in get_spend_proof. Message string `json:"message"` // Spend signature to confirm. Signature string `json:"signature"` }
CheckSpendProof()
type RequestCheckTxKey ¶
type RequestCheckTxKey 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"` }
CheckTxKey()
type RequestCheckTxProof ¶
type RequestCheckTxProof 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"` // Transaction signature to confirm. Signature string `json:"signature"` }
CheckTxProof()
type RequestCreateAccount ¶
type RequestCreateAccount struct { // (Optional) Label for the account. Label string `json:"label"` }
CreateAccount()
type RequestCreateAddress ¶
type RequestCreateAddress struct { // Create a new address for this account. AccountIndex uint64 `json:"account_index"` // (Optional) Label for the new address. Label string `json:"label"` }
CreateAddress()
type RequestCreateWallet ¶
type RequestCreateWallet struct { // Wallet file name. Filename string `json:"filename"` // (Optional) password to protect the wallet. Password string `json:"password"` // Language for your wallets' seed. Language string `json:"language"` }
CreateWallet()
type RequestDeleteAddressBook ¶
type RequestDeleteAddressBook struct { // The index of the address book entry. Index uint64 `json:"index"` }
DeleteAddressBook()
type RequestFinalizeMultisig ¶
type RequestFinalizeMultisig struct { // List of multisig string from peers. MultisigInfo []string `json:"multisig_info"` // Wallet password Password string `json:"password"` }
FinalizeMultisig()
type RequestGenerateFromKeys ¶
type RequestGenerateFromKeys struct { // (Optional) The block height to restore the wallet from. (Defaults to 0) RestoreHeight int64 `json:"restore_height"` // 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"` // The wallet's private view key. ViewKey string `json:"viewkey"` // The wallet's password. Password string `json:"password"` // (Optional) If true, save the current wallet before generating the new wallet. (Defaults to true) AutoSaveCurrent bool `json:"autosave_current"` // (Optional) Language for your wallets' seed. (Defaults to "English") Language string `json:"language"` }
GenerateFromKeys()
type RequestGetAccounts ¶
type RequestGetAccounts struct { // (Optional) Tag for filtering accounts. Tag string `json:"tag"` }
GetAccounts()
type RequestGetAddress ¶
type RequestGetAddress struct { // Return subaddresses for this account. AccountIndex uint64 `json:"account_index"` // (Optional) List of subaddresses to return from an account. AddressIndex []uint64 `json:"address_index"` }
GetAddress()
type RequestGetAddressBook ¶
type RequestGetAddressBook struct { // Indices of the requested address book entries Entries []uint64 `json:"entries"` }
GetAddressBook()
type RequestGetAddressIndex ¶
type RequestGetAddressIndex struct { // (Sub)address to look for. Address string `json:"address"` }
GetAddressIndex()
type RequestGetAttribute ¶
type RequestGetAttribute struct { // Attribute name Key string `json:"key"` }
GetAttribute()
type RequestGetBalance ¶
type RequestGetBalance struct { // Return balance for this account. AccountIndex uint64 `json:"account_index"` // (Optional) Return balance detail for those subaddresses. AddressIndices []uint64 `json:"address_indices"` }
*** RPC STRUCTS *** GetBalance()
type RequestGetBulkPayments ¶
type RequestGetBulkPayments struct { // Payment IDs used to find the payments (16 characters hex). PaymentIDs []string `json:"payment_ids"` // The block height at which to start looking for payments. MinBlockHeight uint64 `json:"min_block_height"` }
GetBulkPayments()
type RequestGetPayments ¶
type RequestGetPayments struct { // Payment ID used to find the payments (16 characters hex). PaymentID string `json:"payment_id"` }
GetPayments()
type RequestGetReserveProof ¶
type RequestGetReserveProof 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 uint64 `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"` }
GetReserveProof()
type RequestGetSpendProof ¶
type RequestGetSpendProof struct { // Transaction id. TxID string `json:"txid"` // (Optional) add a message to the signature to further authenticate the prooving process. Message string `json:"message"` }
GetSpendProof()
type RequestGetTransferByTxID ¶
type RequestGetTransferByTxID struct { // Transaction ID used to find the transfer. TxID string `json:"txid"` // (Optional) Index of the account to query for the transfer. AccountIndex uint64 `json:"account_index,omitempty"` }
GetTransferByTxID()
type RequestGetTransfers ¶
type RequestGetTransfers struct { // (Optional) Include incoming transfers. In bool `json:"in"` // (Optional) Include outgoing transfers. Out bool `json:"out"` // (Optional) Include pending transfers. Pending bool `json:"pending"` // (Optional) Include failed transfers. Failed bool `json:"failed"` // (Optional) Include transfers from the daemon's transaction pool. Pool bool `json:"pool"` // (Optional) Filter transfers by block height. FilterByHeight bool `json:"filter_by_height"` // (Optional) Minimum block height to scan for transfers, if filtering by height is enabled. MinHeight uint64 `json:"min_height"` // (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 uint64 `json:"account_index"` // (Optional) List of subaddress indices to query for transfers. (Defaults to empty - all indices) SubaddrIndices []uint64 `json:"subaddr_indices"` }
GetTransfers()
type RequestGetTxKey ¶
type RequestGetTxKey struct { // Transaction id. TxID string `json:"txid"` }
GetTxKey()
type RequestGetTxNotes ¶
type RequestGetTxNotes struct { // Transaction ids TxIDs []string `json:"txids"` }
GetTxNotes()
type RequestGetTxProof ¶
type RequestGetTxProof struct { // Transaction id. TxID string `json:"txid"` // Destination public address of the transaction. Address string `json:"address"` // (Optional) add a message to the signature to further authenticate the prooving process. Message string `json:"message"` }
GetTxProof()
type RequestImportKeyImages ¶
type RequestImportKeyImages struct { // Array of signed key images: SignedKeyImages []*SignedKeyImage `json:"signed_key_images"` }
ImportKeyImages()
type RequestImportMultisigInfo ¶
type RequestImportMultisigInfo struct { // List of multisig info in hex format from other participants. Info []string `json:"info"` }
ImportMultisigInfo()
type RequestImportOutputs ¶
type RequestImportOutputs struct { // Wallet outputs in hex format. OutputsDataHex string `json:"outputs_data_hex"` }
ImportOutputs()
type RequestIncomingTransfers ¶
type RequestIncomingTransfers 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"` // (Optional) Return transfers for this account. (defaults to 0) AccountIndex uint64 `json:"account_index"` // (Optional) Return transfers sent to these subaddresses. SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Enable verbose output, return key image if true. Verbose bool `json:"verbose"` }
IncomingTransfers()
type RequestLabelAccount ¶
type RequestLabelAccount struct { // Apply label to account at this index. AccountIndex uint64 `json:"account_index"` // Label for the account. Label string `json:"label"` }
LabelAccount()
type RequestLabelAddress ¶
type RequestLabelAddress struct { // Subaddress index; JSON Object containing the major & minor address Index struct { // Account index for the subaddress. Major uint64 `json:"major"` // Index of the subaddress in the account. Minor uint64 `json:"minor"` } `json:"index"` // Label for the address. Label string `json:"label"` }
LabelAddress()
type RequestMakeIntegratedAddress ¶
type RequestMakeIntegratedAddress struct { // (Optional, defaults to primary address) Destination public address. StandardAddress string `json:"standard_address"` // (Optional, defaults to a random ID) 16 characters hex encoded. PaymentID string `json:"payment_id"` }
MakeIntegratedAddress()
type RequestMakeMultisig ¶
type RequestMakeMultisig 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"` }
MakeMultisig()
type RequestMakeURI ¶
type RequestMakeURI struct { // Wallet address Address string `json:"address"` // (Optional) the integer amount to receive, in atomic units Amount uint64 `json:"amount"` // (Optional) 16 or 64 character hexadecimal payment id PaymentID string `json:"payment_id"` // (Optional) name of the payment recipient RecipientName string `json:"recipient_name"` // (Optional) Description of the reason for the tx TxDescription string `json:"tx_description"` }
MakeURI()
type RequestOpenWallet ¶
type RequestOpenWallet 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"` }
OpenWallet()
type RequestParseURI ¶
type RequestParseURI struct { // This contains all the payment input information as a properly formatted payment URI URI string `json:"uri"` }
ParseURI()
type RequestQueryKey ¶
type RequestQueryKey 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"` }
QueryKey()
type RequestRefresh ¶
type RequestRefresh struct { // (Optional) The block height from which to start refreshing. StartHeight uint64 `json:"start_height,omitempty"` }
Refresh()
type RequestRelayTx ¶
type RequestRelayTx struct { // Transaction metadata returned from a transfer method with get_tx_metadata set to true. Hex string `json:"hex"` }
RelayTx()
type RequestSetAccountTagDescription ¶
type RequestSetAccountTagDescription struct { // Set a description for this tag. Tag string `json:"tag"` // Description for the tag. Description string `json:"description"` }
SetAccountTagDescription()
type RequestSetAttribute ¶
type RequestSetAttribute struct { // Attribute name Key string `json:"key"` // Attribute value Value string `json:"value"` }
SetAttribute()
type RequestSetTxNotes ¶
type RequestSetTxNotes struct { // Transaction ids TxIDs []string `json:"txids"` // Notes for the transactions Notes []string `json:"notes"` }
SetTxNotes()
type RequestSign ¶
type RequestSign struct { // Anything you need to sign. Data string `json:"data"` }
Sign()
type RequestSignMultisig ¶
type RequestSignMultisig struct { // Multisig transaction in hex format, as returned by transfer under multisig_txset. TxDataHex string `json:"tx_data_hex"` }
SignMultisig()
type RequestSignTransfer ¶
type RequestSignTransfer struct { // Set of unsigned tx returned by "transfer" or "transfer_split" methods. UnsighnedxSet string `json:"unsigned_txset"` // (Optional) If true, return the raw transaction data. (Defaults to false) ExportRaw bool `json:"export_raw,omitempty"` }
SignTransfer()
type RequestSplitIntegratedAddress ¶
type RequestSplitIntegratedAddress struct { // Integrated address IntegratedAddress string `json:"integrated_address"` }
SplitIntegratedAddress()
type RequestStartMining ¶
type RequestStartMining 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"` }
StartMining()
type RequestSubmitMultisig ¶
type RequestSubmitMultisig struct { // Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex. TxDataHex string `json:"tx_data_hex"` }
SubmitMultisig()
type RequestSubmitTransfer ¶
type RequestSubmitTransfer struct { // Set of signed tx returned by "sign_transfer" TxDataHex string `json:"tx_data_hex"` }
SubmitTransfer()
type RequestSweepAll ¶
type RequestSweepAll struct { // Destination public address. Address string `json:"address"` // Sweep transactions from this account. AccountIndex uint64 `json:"account_index"` // (Optional) Sweep from this set of subaddresses in the account. SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Sweep from all subaddresses in the account (default: false). SubaddrIndicesAll bool `json:"subaddr_indices_all"` // (Optional) Priority for sending the sweep transfer, partially determines fee. Priority Priority `json:"priority"` // Number of outputs from the blockchain to mix with (0 means no mixing). Mixin uint64 `json:"mixin"` // (Optional) Sets ringsize to n (mixin + 1). RingSize uint64 `json:"ring_size,omitempty"` // Number of blocks before the monero can be spent (0 to not add a lock). UnlockTime uint64 `json:"unlock_time"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. PaymentID string `json:"payment_id"` // (Optional) Return the transaction keys after sending. GetTxKeys bool `json:"get_tx_keys"` // (Optional) Include outputs below this amount. BelowAmount uint64 `json:"below_amount"` // (Optional) If true, do not relay this sweep transfer. (Defaults to false) DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) return the transactions as hex encoded string. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) return the transaction metadata as a string. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` }
SweepAll()
type RequestSweepDust ¶
type RequestSweepDust struct { // (Optional) Return the transaction keys after sending. GetTxKeys bool `json:"get_tx_keys"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) Return the transactions as hex string after sending. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) Return list of transaction metadata needed to relay the transfer later. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` }
SweepDust()
type RequestSweepSingle ¶
type RequestSweepSingle struct { // Destination public address. Address string `json:"address"` // Sweep transactions from this account. AccountIndex uint64 `json:"account_index"` // (Optional) Sweep from this set of subaddresses in the account. SubaddrIndices []uint64 `json:"subaddr_indices"` // (Optional) Priority for sending the sweep transfer, partially determines fee. Priority Priority `json:"priority"` // Number of outputs from the blockchain to mix with (0 means no mixing). Mixin uint64 `json:"mixin"` // (Optional) Sets ringsize to n (mixin + 1). RingSize uint64 `json:"ring_size,omitempty"` // Number of blocks before the monero can be spent (0 to not add a lock). UnlockTime uint64 `json:"unlock_time"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. PaymentID string `json:"payment_id"` // (Optional) Return the transaction keys after sending. GetxKeys bool `json:"get_tx_keys"` // Key image of specific output to sweep. KeyImage string `json:"key_image"` // (Optional) Include outputs below this amount. BelowAmount uint64 `json:"below_amount"` // (Optional) If true, do not relay this sweep transfer. (Defaults to false) DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) return the transactions as hex encoded string. (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) return the transaction metadata as a string. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` }
SweepSingle()
type RequestTagAccounts ¶
type RequestTagAccounts struct { // Tag for the accounts. Tag string `json:"tag"` // Tag this list of accounts. Accounts []uint64 `json:"accounts"` }
TagAccounts()
type RequestTransfer ¶
type RequestTransfer struct { // Array of destinations to receive XMR: Destinations []*Destination `json:"destinations"` // (Optional) Transfer from this account index. (Defaults to 0) AccountIndex uint64 `json:"account_index"` // (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices) SubaddrIndices []uint64 `json:"subaddr_indices"` // Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority. Priority Priority `json:"priority"` // Number of outputs from the blockchain to mix with (0 means no mixing). Mixing uint64 `json:"mixin"` // (Optional) Number of outputs to mix in the transaction (this output + N decoys from the blockchain). RingSize uint64 `json:"ring_size,omitempty"` // Number of blocks before the monero can be spent (0 to not add a lock). UnlockTime uint64 `json:"unlock_time"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. PaymentID string `json:"payment_id"` // (Optional) Return the transaction key after sending. GetTxKey bool `json:"get_tx_key"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) Return the transaction as hex string after sending (Defaults to false) GetTxHex bool `json:"get_tx_hex,omitempty"` // (Optional) Return the metadata needed to relay the transaction. (Defaults to false) GetTxMetadata bool `json:"get_tx_metadata,omitempty"` }
Transfer()
type RequestTransferSplit ¶
type RequestTransferSplit struct { // Array of destinations to receive XMR: Destinations []*Destination `json:"destinations"` // (Optional) Transfer from this account index. (Defaults to 0) AccountIndex uint64 `json:"account_index"` // (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices) SubaddrIndices []uint64 `json:"subaddr_indices"` // Number of outputs from the blockchain to mix with (0 means no mixing). Mixin uint64 `json:"mixin"` // (Optional) Sets ringsize to n (mixin + 1). RingSize uint64 `json:"ring_size,omitempty"` // Number of blocks before the monero can be spent (0 to not add a lock). UnlockTime uint64 `json:"unlock_time"` // (Optional) Random 32-byte/64-character hex string to identify a transaction. PaymendID string `json:"payment_id"` // (Optional) Return the transaction keys after sending. GetxKeys bool `json:"get_tx_keys"` // Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority. Priority Priority `json:"priority"` // (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false) DoNotRelay bool `json:"do_not_relay,omitempty"` // (Optional) Return the transactions as hex string after sending GetTxHex bool `json:"get_tx_hex,omitempty"` // True to use the new transaction construction algorithm, defaults to false. NewAlgorithm bool `json:"new_algorithm"` // (Optional) Return list of transaction metadata needed to relay the transfer later. GetTxMetadata bool `json:"get_tx_metadata,omitempty"` }
TransferSplit()
type RequestUntagAccounts ¶
type RequestUntagAccounts struct { // Remove tag from this list of accounts. Accounts []uint64 `json:"accounts"` }
UntagAccounts()
type RequestValidateAddress ¶
type RequestValidateAddress struct { Address string `json:"address"` AnyNetType bool `json:"any_net_type,omitempty"` AllowOpenAlias bool `json:"allow_openalias,omitempty"` }
ValidateAddress()
type RequestVerify ¶
type RequestVerify 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"` }
Verify()
type ResponseAddAddressBook ¶
type ResponseAddAddressBook struct { // The index of the address book entry. Index uint64 `json:"index"` }
type ResponseCheckReserveProof ¶
type ResponseCheckReserveProof struct { // States if the inputs proves the reserve. Good bool `json:"good"` }
type ResponseCheckSpendProof ¶
type ResponseCheckSpendProof struct { // States if the inputs proves the spend. Good bool `json:"good"` }
type ResponseCheckTxKey ¶
type ResponseCheckTxKey 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"` }
type ResponseCheckTxProof ¶
type ResponseCheckTxProof struct { // Number of block mined after the one with the transaction. 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"` }
type ResponseCreateAccount ¶
type ResponseCreateAddress ¶
type ResponseExportKeyImages ¶
type ResponseExportKeyImages struct { // Array of signed key images: SignedKeyImages []struct { KeyImage string `json:"key_image"` Signature string `json:"signature"` } `json:"signed_key_images"` }
ExportKeyImages()
type ResponseExportMultisigInfo ¶
type ResponseExportMultisigInfo struct { // Multisig info in hex format for other participants. Info string `json:"info"` }
ExportMultisigInfo()
type ResponseExportOutputs ¶
type ResponseExportOutputs struct { // Wallet outputs in hex format. OutputsDataHex string `json:"outputs_data_hex"` }
ExportOutputs()
type ResponseFinalizeMultisig ¶
type ResponseFinalizeMultisig struct { // Multisig wallet address. Address string `json:"address"` }
type ResponseGenerateFromKeys ¶
type ResponseGenerateFromKeys 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"` }
GenerateFromKeys()
type ResponseGetAccountTags ¶
type ResponseGetAccountTags struct { // Array of account tag information: AccountTags []struct { // Filter tag. Tag string `json:"tag"` // Label for the tag. Label string `json:"label"` // List of tagged account indices. Accounts []uint64 `json:"accounts"` } `json:"account_tags"` }
GetAccountTags()
type ResponseGetAccounts ¶
type ResponseGetAccounts struct { // Array of subaddress account information: SubaddressAccounts []struct { // Index of the account. AccountIndex uint64 `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"` // (Optional) Label of the account. Label string `json:"label"` // (Optional) Tag for filtering accounts. Tag string `json:"tag"` // Unlocked balance for the account. UnlockedBalance uint64 `json:"unlocked_balance"` } `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"` }
type ResponseGetAddress ¶
type ResponseGetAddress struct { // The 95-character hex address string of the monero-wallet-rpc in session. Address string `json:"address"` // Array of addresses informations Addresses []struct { // The 95-character hex (sub)address string. Address string `json:"address"` // Label of the (sub)address Label string `json:"label"` // Index of the subaddress AddressIndex uint64 `json:"address_index"` // States if the (sub)address has already received funds Used bool `json:"used"` } `json:"addresses"` }
type ResponseGetAddressBook ¶
type ResponseGetAddressBook struct { // Array of entries: Entries []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"` } `json:"entries"` }
type ResponseGetAddressIndex ¶
type ResponseGetAttribute ¶
type ResponseGetAttribute struct { // Attribute value Value string `json:"value"` }
type ResponseGetBalance ¶
type ResponseGetBalance 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 []struct { // Index of the subaddress in the account. AddressIndex uint64 `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"` // Blocks to unlock BlocksToUnlock int64 `json:"blocks_to_unlock"` } `json:"per_subaddress"` }
type ResponseGetBulkPayments ¶
type ResponseGetBulkPayments struct { // List of payments Payments []struct { // Payment ID matching one of the input IDs. PaymentID string `json:"payment_id"` // Transaction 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 struct { // Account index for the subaddress. Major uint64 `json:"major"` // Index of the subaddress in the account. Minor uint64 `json:"minor"` } `json:"subaddr_index"` // Address receiving the payment; Base58 representation of the public keys. Address string `json:"address"` } `json:"payments"` }
type ResponseGetHeight ¶
type ResponseGetHeight 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"` }
GetHeight()
type ResponseGetLanguages ¶
type ResponseGetLanguages struct { // List of available languages Languages []string `json:"languages"` }
GetLanguages()
type ResponseGetPayments ¶
type ResponseGetPayments struct { // list of payments Payments []struct { // Payment ID matching the input parameter. PaymentID string `json:"payment_id"` // Transaction 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 struct { // Account index for the subaddress. Major uint64 `json:"major"` // Index of the subaddress in the account. Minor uint64 `json:"minor"` } `json:"subaddr_index"` // Address receiving the payment; Base58 representation of the public keys. Address string `json:"address"` } `json:"payments"` }
type ResponseGetReserveProof ¶
type ResponseGetReserveProof struct { // Reserve signature. Signature string `json:"signature"` }
type ResponseGetSpendProof ¶
type ResponseGetSpendProof struct { // Spend signature. Signature string `json:"signature"` }
type ResponseGetTransferByTxID ¶
type ResponseGetTransferByTxID struct { // JSON object containing payment information: Transfer Transfer `json:"transfer"` }
type ResponseGetTransfers ¶
type ResponseGetTxKey ¶
type ResponseGetTxKey struct { // Transaction secret key. TxKey string `json:"tx_key"` }
type ResponseGetTxNotes ¶
type ResponseGetTxNotes struct { // Notes for the transactions Notes []string `json:"notes"` }
type ResponseGetTxProof ¶
type ResponseGetTxProof struct { // Transaction signature. Signature string `json:"signature"` }
type ResponseGetVersion ¶
type ResponseGetVersion 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"` }
GetVersion()
type ResponseImportKeyImages ¶
type ResponseImportMultisigInfo ¶
type ResponseImportMultisigInfo struct { // Number of outputs signed with those multisig info. NOutputs uint64 `json:"n_outputs"` }
type ResponseImportOutputs ¶
type ResponseImportOutputs struct { // Number of outputs imported. NumImported uint64 `json:"num_imported"` }
type ResponseIncomingTransfers ¶
type ResponseIncomingTransfers struct { // list of transfers: Transfers struct { // Amount of this transfer. Amount uint64 `json:"amount"` // Mostly internal use, can be ignored by most users. GlobalIndex uint64 `json:"global_index"` // Key image for the incoming transfer's unspent output (empty unless verbose is true). KeyImage string `json:"key_image"` // Indicates if this transfer has been spent. Spent bool `json:"spent"` // Subaddress index for incoming transfer. SubaddrIndex uint64 `json:"subaddr_index"` // Several incoming transfers may share the same hash if they were in the same transaction. TxHash string `json:"tx_hash"` // Size of transaction in bytes. TxSize uint64 `json:"tx_size"` } `json:"transfers"` }
type ResponseIsMultisig ¶
type ResponseIsMultisig 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"` }
IsMultisig()
type ResponseMakeMultisig ¶
type ResponseMakeURI ¶
type ResponseMakeURI struct { // This contains all the payment input information as a properly formatted payment URI URI string `json:"uri"` }
type ResponseParseURI ¶
type ResponseParseURI struct { // JSON object containing payment information: 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"` } `json:"uri"` }
type ResponsePrepareMultisig ¶
type ResponsePrepareMultisig struct { // Multisig string to share with peers to create the multisig wallet. MultisigInfo string `json:"multisig_info"` }
PrepareMultisig()
type ResponseQueryKey ¶
type ResponseQueryKey struct { // The view key will be hex encoded, while the mnemonic will be a string of words. Key string `json:"key"` }
type ResponseRefresh ¶
type ResponseRelayTx ¶
type ResponseRelayTx struct { // String for the publically searchable transaction hash. TxHash string `json:"tx_hash"` }
type ResponseSign ¶
type ResponseSign struct { // Signature generated against the "data" and the account public address. Signature string `json:"signature"` }
type ResponseSignMultisig ¶
type ResponseSignTransfer ¶
type ResponseSubmitMultisig ¶
type ResponseSubmitMultisig struct { // List of transaction Hash. TxHashList []string `json:"tx_hash_list"` }
type ResponseSubmitTransfer ¶
type ResponseSubmitTransfer struct { // The tx hashes of every transaction. TxHashList []string `json:"tx_hash_list"` }
type ResponseSweepAll ¶
type ResponseSweepAll 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"` // 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"` }
type ResponseSweepDust ¶
type ResponseSweepDust 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"` }
type ResponseSweepSingle ¶
type ResponseSweepSingle 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. FreeList []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"` }
type ResponseTransfer ¶
type ResponseTransfer struct { // Amount transferred for the transaction. Amount uint64 `json:"amount"` // Integer value of the fee charged for the txn. Fee uint64 `json:"fee"` // 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"` TxMetadata string `json:"tx_metadata"` // TxMetadata tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true. // String. Set of unsigned tx for cold-signing purposes. UnsignedTxSet string `json:"unsigned_txset"` }
type ResponseTransferSplit ¶
type ResponseTransferSplit 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"` }
type ResponseValidateAddress ¶
type ResponseVerify ¶
type ResponseVerify struct { // True if signature is valid. Good bool `json:"good"` }
type SignedKeyImage ¶
type Transfer ¶
type Transfer struct { // Public address of the transfer. Address string `json:"address"` // Amount transferred. Amount uint64 `json:"amount"` // 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"` // 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 struct { // Account index for the subaddress. Major uint64 `json:"major"` // Index of the subaddress under the account. Minor uint64 `json:"minor"` } `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"` }
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