Hierarchy

  • RPCBase
  • Wallet
  • Mining
  • Developer
  • Network
  • Voting
    • GridcoinRPC

Constructors

Properties

Methods

addKey addMultisigAddress addNode addPoll addRedeemScript advertiseBeacon archiveLog askForOutstandingBlocks auditSnapshotAccrual auditSnapshotAccruals backupPrivateKeys backupWallet beaconConvergence beaconReport beaconStatus burn call checkWallet clearBanned compareSnapshotAccrual createRawTransaction currentContractAverage currentTime debug decodeRawTransaction decodeScript explainMagnitude getAccount getAccountAddress getAddedNodeInfo getAddressesByAccount getBalance getBalanceDetail getBestBlockhash getBlock getBlockByNumber getBlockCount getBlockHash getBlockStats getBlockchainInfo getBurnReport getCheckpoint getConnectionCount getDifficulty getInfo getLastStake getMiningInfo getNetTotals getNetworkInfo getNewAddress getNewPubkey getPeerInfo getPollResults getRawMemPool getRawTransaction getRawWalletTransaction getReceivedByAccount getReceivedByAddress getSuperVotes getTransaction getUnconfirmedBalance getVotingClaim getWalletInfo keyPoolRefill lifetime listAccounts listAddressGroupings listBanned listManifests listPolls listProjects listReceivedByAddress listResearcherAccounts listSinceBlock listStakes listTransactions listUnspent logging magnitude makeKeyPair memoryPool network networkTime pendingBeaconReport ping projects rainByMagnitude readConfig repairWallet resendTx reserveBalance resetCPIDs revokeBeacon scanForUnspent scrapeReport sendFrom sendMany sendRawTransaction sendToAddress setAccount setBan setTXfee showBlock signMessage signRawTransaction superBlocks superblockAge superblockAverage validateAddress validatePubkey verifyMessage versionReport voteById voteDetails walletLock walletPassPhrase walletPassPhraseChange

Constructors

  • Creates an instance of GridcoinRPC

    Memberof

    GridcoinRPC

    Parameters

    • config: IParameters
    • Optional rpc: IJsonRPC

      Dependency injection for the client class

    Returns GridcoinRPC

Properties

client: IJsonRPC

Methods

  • Send a transaction that contains an administrative contract.

    Description

    Before invoking this command, import the master key used to sign and verify transactions that contain administrative contracts. The label is optional: importprivkey private_key_hex master Send some coins to the master key address if necessary: sendtoaddress address To whitelist a project: addkey add project projectname url To de-whitelist a project: addkey delete project projectname 1 Key examples: addkey add project milkyway@home http://milkyway.cs.rpi.edu/milkyway/@ addkey delete project milkyway@home 1 GRC will only memorize the last value it finds for a key in the highest block. @todo: check return values as I am guessing here

    Returns

    Memberof

    Developer

    Parameters

    • action: "add" | "delete"
    • keyType: string
    • keyName: string
    • keyValue: string | number | boolean

    Returns Promise<{
        contract: Contract;
        txid: string;
    }>

  • Add a nrequired-to-sign multisignature address to the wallet.

    Description

    Adds a multisignature address to the wallet. Returns the address addeded. Requires to tell the number of keys needed for a transaction and list of keys (keys are either addresses or a hexadecimal public key). If an account is given, the address will go into that account. Multisignature addresses make it so that you can share a wallet with multiple people and require nrequired people to approve of a transaction. The maximum number keys is 16.

    Example

    grcRPC.addmultisigaddress(2, ['SBqubTKufqwpupnZsvzC3kSv9MCLrFXEUz', 'mhE9F4Cixhx9Dn8cB4Uf2EXLMCJR7muAFZ']);
    

    Returns

    Memberof

    Wallet

    Parameters

    • nrequired: number

      The minimum (m) number of signatures required to spend this m-of-n multisig script.

    • keys: string[]

      A public key against which signatures will be checked.

    • Optional account: string

      The account name in which the address should be stored. Leave blank for the default account.

    Returns Promise<string>

  • Attempts add or remove node from the addnode list or try a connection to node once

    RPC command will always return { result: 'ok' }

    Returns

    Memberof

    Network

    Parameters

    • node: string
    • command: addNodeCommand

    Returns Promise<{
        result: "ok";
    }>

  • Add a poll to the network. Requires 100K GRC balance. Costs 50 GRC. Provide an empty string for answers when choosing "yes/no/abstain" for responsetype.

    Returns

    Memberof

    Voting

    Parameters

    • title: string

      Title for the poll

    • days: number

      Number of days that the poll will run

    • question: string

      Prompt that voters shall answer

    • answers: string[]

      Answers for voters to choose from.

    • weightType: WeightType

      Weighing method for the poll: 1 = Balance, 2 = Magnitude + Balance

    • responseType: ResponseType

      1 = yes/no/abstain, 2 = single-choice, 3 = multiple-choice

    • url: string

      Discussion web page URL for the poll

    Returns Promise<Poll>

  • Adds a reedemscript specified in hex to the wallet. Will return the address generated. If account is given, the pay to script hash will go into that account.

    Returns

    Memberof

    Wallet

    Parameters

    • redeemScript: string
    • Optional account: string

    Returns Promise<string>

  • Sends out a beacon (only applicable to solo mining).

    Requires the wallet to be fully unlocked

    Returns

    Memberof

    Mining

    Parameters

    • Optional force: boolean

      If true, generate new beacon keys and send a new beacon even when an active or pending beacon exists for your CPID. This is useful if you lose a wallet with your original beacon keys but not necessary otherwise

    Returns Promise<AdvertiseBeacon>

  • Immediately archives the specified log. Currently valid values are debug and scraper.

    Returns

    Memberof

    Developer

    Parameters

    • log: "debug" | "scraper"

    Returns Promise<boolean>

  • Requests network for outstanding blocks

    Returns

    Memberof

    Network

    Returns Promise<{
        sent: boolean;
    }>

  • Report accrual snapshot deltas for the specified CPID.

    Returns

    Memberof

    Developer

    Parameters

    • cpid: string
    • detailed: false

    Returns Promise<AuditSnapshot>

  • Report accrual snapshot deltas for the specified CPID.

    Returns

    Memberof

    Developer

    Parameters

    • cpid: string
    • detailed: true

    Returns Promise<AuditSnapshotDetailed>

  • Report accrual audit for entire population of CPIDs.

    Returns

    Memberof

    Developer

    Parameters

    • Optional mismatchedOnly: boolean

    Returns Promise<AuditSnapshotAccurals>

  • Creates a backup of the private keys and creates a keys.dat files (also includes the date in the filename). The data in the file is formatted like this: Address: ADDRESS, Secret: PRIVATE KEY. File location and "result": true will be given if it successes, otherwise it will show an error message. Requires the wallet to be fully unlocked

    Returns

    Memberof

    Wallet

    Returns Promise<BackupPrivateKeys>

  • Creates a backup of the wallet.dat and gridcoinresearch.conf files (it also adds dates in the backup files’ names). Returns if it was successful for each file The files will be created in the walletbackups folder. See the Config Wiki Page to find the location for your operating system of the walletbackups folder and other Gridcoin files

    See

    https://gridcoin.us/wiki/config-file

    Returns

    Memberof

    Wallet

    Returns Promise<BackupWallet>

  • Displays verified and pending beacons from the scraper or subscriber viewpoint.

    Description

    There are three output sections:

    • verified_beacons_from_scraper_global: Comes directly from the scraper global map for verified beacons. This is for scraper monitoring of an individual scraper and will be empty if not run on an actual scraper nod
    • verified_beacons_from_latest_convergence: From the latest convergence formed from all of the scrapers. This list is what will be activated in the next superblock.
    • pending_beacons_from_GetConsensusBeaconList: This is a list of pending beacons. Note that it is subject to a one hour ladder, so it will lag the information from the pendingbeaconreport rpc call.

    Returns

    Memberof

    Mining

    Returns Promise<BeaconConvergence>

  • Returns a JSON list of all valid beacons on the network (as of where the wallet is synced to).

    Returns

    Memberof

    Mining

    Parameters

    • Optional activeOnly: boolean

      Boolean specifying whether only active beacons should be returned. Defaults to false which also includes expired beacons.

    Returns Promise<BeaconReport[]>

  • Displays information about your beacon or the beacon for cpid.

    Returns

    Memberof

    Mining

    Parameters

    • Optional cpid: string

    Returns Promise<BeaconStatusCollection>

  • Creates a transaction that will send the given amount (rounded to 0.00000001) to no one making the coins disappear permanently. No one can get back the coins spent by this command. If hex string is specified, it will add on to the script used in the transaction.

    Requires the wallet to be fully unlocked

    Returns

    Memberof

    Wallet

    Parameters

    • amount: number

      Amount to be burned down

    • Optional hexString: string

    Returns Promise<string>

  • Protected

    Send command to the rpc server, get response Transform response field to the camelcase

    Returns

    Throws

    Memberof

    RPCBase

    Type Parameters

    • T

    Parameters

    Returns Promise<T>

  • Checks that the wallet is reporting the correct balance and is not missing any transactions. Returns { walletCheckPassed: true } if it finds no issues. On error it will return: { mismatchedSpentCoins: nMismatchSpent, amountInQuestion: nBalanceInQuestion } with nMismatchSpent numbers showing the number of transactions missed (either counted when it shouldn’t be or not counted when it should) and nBalanceInQuestion showing the amount involved in those transactions (absolute value, does not subtract)

    Returns

    Memberof

    Wallet

    Returns Promise<WalletSuccessStatus | WalletFailStatus>

  • Clear all banned IPs.

    Returns

    Memberof

    Network

    Returns Promise<void>

  • Compare snapshot and legacy accrual for active CPIDs.

    Returns

    Memberof

    Developer

    Returns Promise<CompareSnapshotAccural>

  • Create a transaction spending the given inputs and creating new outputs.

    Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.

    Example

    [
    {
    "txid":"id", (string, required) The transaction id
    "vout":n (numeric, required) The output number
    }
    ,...
    ]

    Example

    {
    * "address": x.xxx (numeric, required) The key is the bitcoin address, the value is the CURRENCY_UNIT amount
    * "data\": "hex", (string, required) The key is "data", the value is hex encoded data
    * ...
    * }
    * @returns {Promise<{ transaction: string }>}
    * @memberof Wallet

    Parameters

    • transactions: RawTransaction[]

      A json array of json objects

    • outputs: Output

      a json object with outputs

    Returns Promise<{
        transaction: string;
    }>

  • Displays information on your current contract average with regards to superblock contract

    Returns

    Memberof

    Developer

    Returns Promise<ContractAverage>

  • Displays UTC Unix time as well as date and time in UTC

    Returns

    Memberof

    Network

    Returns Promise<CurrentTime>

  • Enable or disable VERBOSE logging category (aka old debug) on the fly

    Deprecated

    See

    logging

    Returns

    Memberof

    Developer

    Parameters

    • enable: boolean

    Returns Promise<{
        Logging category VERBOSE (aka old debug) : boolean;
    }>

  • Return a JSON object representing the serialized, hex-encoded transaction

    Returns

    Memberof

    Wallet

    Parameters

    • rawTransaction: string

      hex string

    Returns Promise<Transaction>

  • Decode a hex-encoded script

    Returns

    Memberof

    Wallet

    Parameters

    • script: string

      hex string

    Returns Promise<Script>

  • Shows what your magnitude is per project. On success returns JSON containing every project and the magnitude recorded on the network from your CPID.

    Returns

    Memberof

    Mining

    Parameters

    • Optional cpid: string

      Optional CPID to explain magnitude for

    Returns Promise<ProjectMagnitude>

  • Returns the account associated with the given address.

    Returns

    • an account name

    Memberof

    Wallet

    Parameters

    • gridcoinAddress: string

    Returns Promise<string>

  • Returns the current Gridcoin address for receiving payments to this account.

    Description

    If account does not exist, it will be created along with an associated new address that will be returned.

    Returns

    • GRC address

    Memberof

    Wallet

    Parameters

    • account: string

      an account name

    Returns Promise<string>

  • Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here) If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available

    Returns

    Memberof

    Network

    Parameters

    • dns: boolean
    • node: string

    Returns Promise<{
        addednode: string;
    }>

  • Returns the list of addresses for the given account.

    Returns

    • a list of addresses

    Memberof

    Wallet

    Parameters

    • account: string

      the account name

    Returns Promise<string[]>

  • Get current balance

    Description

    If account is not specified, returns the server's total available balance If account is specified, returns the balance in the account Note that the account "" is not the same as leaving the parameter out The server total may be different to the balance in the default "" account.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional account: string = '*'

      The selected account, or "*" for entire wallet. It may be the default account using

    • Optional minConf: number = 1

      Only include transactions confirmed at least this many times.

    • Optional includeWatchOnly: boolean = false

      Also include balance in watchonly addresses (@see importAddress)

    Returns Promise<number>

  • Lists outputs similar to listtransactions that compose the entire balance

    Returns

    Memberof

    Wallet

    Parameters

    • Optional minConf: number = 1

      Only include transactions confirmed at least this many times

    • Optional includeWatchOnly: boolean = false

      Also include balance in watchonly addresses (@see importAddress)

    Returns Promise<BalanceDetail>

  • Returns the hash of the best block in the longest block chain

    Returns

    Memberof

    Network

    Returns Promise<string>

  • Returns information about the block with the given hash.

    Returns

    Memberof

    Network

    Type Parameters

    • Type extends boolean

    Parameters

    • hash: string
    • Optional txinfo: Type

      optional to print more detailed tx info

    Returns Promise<Type extends true ? BlockWithTX : Block>

  • Returns details of a block with given block-number

    Returns

    Memberof

    Network

    Type Parameters

    • Type extends boolean

    Parameters

    • number: number
    • txinfo: Type

      optional to print more detailed tx info

    Returns Promise<Type extends true ? BlockWithTX : Block>

  • Returns the number of blocks in the longest block chain

    Returns

    Memberof

    Network

    Returns Promise<number>

  • Returns hash of block in best-block-chain at index

    Returns

    Memberof

    Network

    Parameters

    • index: number

    Returns Promise<string>

  • Show stats on what wallets and cpids staked recent blocks

    Description

    Mode 0: Startheight is the starting height, endheight is the chain head if not specified. Mode 1: Startheight is actually the number of blocks back from endheight or the chain head if not specified.

    Returns

    Memberof

    Developer

    Parameters

    • mode: 0 | 1
    • Optional startHeight: number
    • Optional endHeight: number

    Returns Promise<BlockStats>

  • Displays data on current blockchain

    Returns

    Memberof

    Network

    Returns Promise<BlockchainInfo>

  • Scan for and aggregate network-wide amounts for provably-destroyed outputs.

    Returns

    Memberof

    Network

    Returns Promise<BurnReport>

  • Show info of synchronized checkpoint.

    Returns

    Memberof

    Network

    Returns Promise<Checkpoint>

  • Returns the number of connections to other node

    Returns

    Memberof

    Network

    Returns Promise<number>

  • Returns the difficulty as a multiple of the minimum difficulty

    Returns

    Memberof

    Network

    Returns Promise<BlockchainDifficulty>

  • Returns an object containing various state info.

    Returns

    Memberof

    Network

    Returns Promise<Info>

  • Fetch information about this wallet's last staked block.

    Returns

    Memberof

    Mining

    Returns Promise<Stake>

  • Returns information about network traffic, including bytes in, bytes out and current time

    Returns

    Memberof

    Network

    Returns Promise<NetTotals>

  • Displays network related information

    Returns

    Memberof

    Network

    Returns Promise<NetworkInfo>

  • Returns a new Gridcoin address for receiving payments.

    Description

    If [account] is specified, it is added to the address book so payments received with the address will be credited to account.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional account: string

    Returns Promise<string>

  • Returns new public key for coinbase generation.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional account: string

    Returns Promise<string>

  • Returns data about each connected network node.

    Returns

    Memberof

    Network

    Returns Promise<Peer[]>

  • Display the results for the specified poll

    Returns

    Memberof

    Voting

    Parameters

    • voteIdOrTitle: string

      Title or ID of the poll.

    Returns Promise<PollResults[]>

  • Returns all transaction ids in memory pool

    Returns

    Memberof

    Network

    Returns Promise<string[]>

  • returns an Object with information about txid

    Returns

    Memberof

    Wallet

    Type Parameters

    • Type extends boolean

    Parameters

    • txid: string
    • verbose: Type

    Returns Promise<Type extends true ? DetailedRawTransaction : string>

  • Get a string that is serialized, hex-encoded data for txid from the wallet.

    Returns

    Memberof

    Wallet

    Parameters

    • txid: string

    Returns Promise<string>

  • Returns the total amount received by addresses with account in transactions with at least minconf confirmations. If account not provided return will include all transactions to all accounts.

    Returns

    • the number of coins received

    Deprecated

    Memberof

    Wallet

    Parameters

    • account: string

      the account name

    • Optional minconf: number = 1

      the minimum number of confirmations

    Returns Promise<number>

  • Returns the amount received by gridcoinaddress in transactions with at least minconf confirmations.

    Description

    It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0.

    Returns

    • the number of coins received

    Memberof

    Wallet

    Parameters

    • gridcoinAddress: string

      the address

    • Optional minconf: number = 1

      the minimum number of confirmations

    Returns Promise<number>

  • Report votes for specified superblock.

    Returns

    Memberof

    Network

    Parameters

    • mode: 0

      mode: 0=text, 1,2=json

    • superBlock: string

      block hash or last= currently active, now= ongoing sb votes.

    Returns Promise<SuperVotesModeText>

  • Report votes for specified superblock.

    Returns

    Memberof

    Network

    Parameters

    • mode: 1

      mode: 0=text, 1,2=json

    • superBlock: string

      block hash or last= currently active, now= ongoing sb votes.

    Returns Promise<SuperVotesModeJson1>

  • Report votes for specified superblock.

    Returns

    Memberof

    Network

    Parameters

    • mode: 2

      mode: 0=text, 1,2=json

    • superBlock: string

      block hash or last= currently active, now= ongoing sb votes.

    Returns Promise<SuperVotesModeJson2>

  • Get detailed information about in-wallet transaction txid

    Returns

    Memberof

    Wallet

    Parameters

    • txid: string

      The transaction id

    • Optional includeWatchOnly: boolean = false

      Whether to include watchonly addresses in balance calculation and details

    Returns Promise<Transaction>

  • returns the unconfirmed balance in the wallet

    Returns

    Memberof

    Wallet

    Returns Promise<number>

  • Display the claim for the specified poll or vote.

    Returns

    Memberof

    Voting

    Parameters

    • pollIdOrVoteId: string

      Transaction hash of the poll or vote.

    Returns Promise<VotingClaim>

  • Returns useful information about current wallet state.

    Returns

    Memberof

    Wallet

    Returns Promise<WalletInfo>

  • Fills the keypool.

    Returns

    Memberof

    Wallet

    Parameters

    • newSize: number

    Returns Promise<null>

  • Displays research rewards for the lifetime of a CPID

    Returns

    Memberof

    Mining

    Parameters

    • cpid: string

    Returns Promise<Lifetime>

  • Returns UniValue that has account names as keys, account balances as values.

    Deprecated

    Returns

    • The property name is the account name, and the value is the total balance for the account

    Memberof

    Wallet

    Parameters

    • Optional minConf: number = 1

      Only include transactions with at least this many confirmations

    • Optional includeWatchOnly: boolean = false

      Include balances in watchonly addresses (@see importaddress)

    Returns Promise<{
        [key: string]: number;
    }>

  • Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions

    Returns

    Memberof

    Wallet

    Returns Promise<[string, number][][]>

  • List all banned IPs/subnets.

    Returns

    Memberof

    Network

    Returns Promise<Banned>

  • @todo: implement writedata

    Parameters

    • details: false
    • Optional manifestHash: string

    Returns Promise<Manifests>

  • Show list of known ScraperManifest objects.

    Returns

    Memberof

    Developer

    Parameters

    • details: true

      to show details of manifests

    • Optional manifestHash: string

      hash of specific manifest (Not provided returns all.)

    Returns Promise<ManifestsDetailed>

  • Lists poll details

    Returns

    Memberof

    Voting

    Parameters

    • Optional showFinished: boolean

      If true, show finished polls as well.

    Returns Promise<Poll[]>

  • Displays information about whitelisted projects.

    Returns

    Memberof

    Developer

    Returns Promise<Projects>

  • List balances by receiving address.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional minConf: number = 1

      The minimum number of confirmations before payments are included.

    • Optional includeEmpty: boolean = false

      Whether to include addresses that haven't received any payments.

    • Optional includeWatchOnly: boolean = false

      Whether to include watchonly addresses (see 'importaddress').

    Returns Promise<Receivement[]>

  • List researcher accounts in the accrual system and their current accruals.

    Returns

    Memberof

    Developer

    Returns Promise<ResearcherAccounts>

  • Get all transactions in blocks since block blockhash, or all transactions if omitted

    Returns

    Memberof

    GridcoinRPC

    Parameters

    • Optional blockHash: string

      The block hash to list transactions since

    • Optional targetConfirmations: number

      The confirmations required, must be 1 or more

    • Optional includeWatchonly: boolean

      Include transactions to watchonly addresses (@see importaddress)

    Returns Promise<ListSinceBlock>

  • Returns count most recent stakes.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional count: number = 10

    Returns Promise<StakeListing[]>

  • Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional account: string = '*'

      The account name. If not included, it will list all transactions for all accounts.

    • Optional count: number = 10

      The number of transactions to return

    • Optional from: number = 0

      The number of transactions to skip

    • Optional includeWatchonly: boolean = false

      Include transactions to watchonly addresses (@see importaddress) If is set true, it will list sent transactions as well

    Returns Promise<TransactionShort[]>

  • Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations Optionally filtered to only include txouts paid to specified addresses Results are an array of Objects, each of which has {txid, vout, scriptPubKey, amount, confirmations}

    Returns

    Memberof

    Wallet

    Parameters

    • Optional minConf: number
    • Optional maxConf: number
    • Rest ...addresses: string[]

    Returns Promise<TransactionUnspent[]>

  • logging json array category adds json array category removes Gets and sets the logging configuration. When called without an argument, returns the list of categories with status that are currently being debug logged or not. When called with arguments, adds or removes categories from debug logging and return the lists above. The arguments are evaluated in order "include", "exclude". If an item is both included and excluded, it will thus end up being excluded. The valid logging categories are: " + ListLogCategories() + ". In addition, the following are available as category names with special meanings: all or 1: represent all logging categories. none or 0: even if other logging categories are specified, ignore all of them.

    Example

    logging all net: enables all and disables net.
    logging "" all: disables all.
    Note that unlike Bitcoin, we don't process JSON arrays correctly as arguments yet for the command line,
    so, for the rpc cli, it is limited to one enable and/or one disable category. Using CURL works with the full arrays.

    Returns

    Memberof

    Developer

    Parameters

    • Optional enable: "" | "all" | keyof LoggingCategories
    • Optional disable: "all" | keyof LoggingCategories

    Returns Promise<LoggingCategories>

  • Displays information for the magnitude of the specified CPID in the network

    Returns

    Memberof

    Mining

    Parameters

    • cpid: string

    Returns Promise<Magnitude>

  • Make a public/private key pair.

    Returns

    Memberof

    Wallet

    Parameters

    • Optional prefix: string

      is optional preferred prefix for the public key

    Returns Promise<KeysPair>

  • Displays included and excluded memory pool txs

    Returns

    Memberof

    Network

    Returns Promise<MemoryPool>

  • Display information about the network health

    Returns

    Memberof

    Developer

    Returns Promise<NetworkHealth>

  • Displays current network time

    Returns

    Memberof

    Network

    Returns Promise<{
        networkTime: number;
    }>

  • Displays pending beacons directly from the beacon registry.

    Returns

    Memberof

    Mining

    Returns Promise<Beacon[]>

  • Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.

    Returns

    Memberof

    Network

    Returns Promise<null>

  • Show the status of locally attached BOINC projects.

    Returns

    Memberof

    Developer

    Returns Promise<LocalProject[]>

  • rain coins by magnitude on network

    Returns

    Memberof

    Wallet

    Parameters

    • project: string

      Required: If a project is specified, rain will be limited to that project. Use * for network-wide.

    • amount: number

      Required: Specify amount of coins to be rained in double precision float

    • Optional message: string

      Optional: Provide a message rained to all rainees

    Returns Promise<RainByMagnitude>

  • Re-reads config file; Does not overwrite pre-existing loaded values

    Returns

    Memberof

    Developer

    Returns Promise<{
        readconfig: 1;
    }>

  • Repair wallet if checkwallet reports any problem.

    Returns

    Memberof

    Wallet

    Returns Promise<WalletSuccessStatus | WalletFailStatus>

  • Resend any failed or unsent transactions. Requires unlocked wallet

    Returns

    Memberof

    Wallet

    Returns Promise<null>

  • Reserved amount secures a balance in wallet that can be spendable at anytime. However reserve will secure utxo(s) of any size to respect this setting. If no parameters provided current setting is printed

    Returns

    Memberof

    Wallet

    Parameters

    • Optional reserve: boolean

      is true or false to turn balance reserve on or off.

    • Optional amount: number

      is a real and rounded to cent

    Returns Promise<Reserve>

  • Reloads cpids

    Returns

    Memberof

    Mining

    Returns Promise<{
        reset: 1;
    }>

  • Advertise a beacon (Requires wallet to be fully unlocked)

    Returns

    Memberof

    Mining

    Parameters

    • cpid: string

      CPID associated with the beacon to revoke.

    Returns Promise<BeaconRevoke>

  • Searches a block range for a specified address with unspent utxos and displays them in a json response with the option of exporting to file

    Returns

    Memberof

    Wallet

    Parameters

    • address: string

      Multi-signature address

    • blockStart: number

      Block number to start search from

    • blockEnd: number

      Block number to end search on

    • Optional exports: boolean

      Exports to a file in backup-dir/rpc in format of multisigaddress-datetime.type

    • Optional type: string

      Export to a file with file type (xml, txt or json -- Required if export true)

    Returns Promise<[UTXO[], UnspentReport]>

  • Report containing various statistics about the scraper.

    Returns

    Memberof

    Developer

    Returns Promise<ScrapeReport>

  • Sends amount of Gridcoin from account to gridcoinaddress.

    Returns

    Memberof

    Wallet

    Parameters

    • account: string

      Account FROM

    • address: string

      Address TO

    • amount: number

      Amount to send

    • Optional minConf: number

      is the minimum number of confirmations for a UTXO to be used.

    • Optional comment: string

      is a personal comment about what the transaction is for (doesn’t go into the transaction, it is only stored locally).

    • Optional commentTo: string

      is also a personal comment about who you are sending to (also only local).

    • Optional message: string

      is a message/comment that is sent publicly on the transaction.

    Returns Promise<string>

  • Send from fromaccount to a list of addresses. Use '' if you don’t want to limit to one account label. Addresses should be listed in JSON format.

    Returns

    Memberof

    Wallet

    Parameters

    • account: string

      Account FROM

    • recipients: {
          [key: string]: number;
      }

      { Address1: amount1, Address2: amount2, ... }

      • [key: string]: number
    • Optional minConf: number = 1

      is the minimum number of confirmations for a UTXO to be used.

    • Optional comment: string

      is a personal comment about what the transaction is for (doesn’t go into the transaction, it is only stored locally).

    Returns Promise<string>

  • Submits raw transaction (serialized, hex-encoded) to local node and network

    Returns

    Memberof

    Wallet

    Parameters

    • rawTransaction: string

      raw transaction (serialized, hex-encoded)

    Returns Promise<string>

  • Sends amount of Gridcoin to gridcoinaddress.

    Returns

    Memberof

    Wallet

    Parameters

    • address: string

      Recipient address

    • amount: number

      is a real and is rounded to the nearest 0.000001

    • Optional comment: string

      a comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.

    • Optional commentTo: string

      a comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet

    • Optional message: string

      Optional message to add to the receiver.

    Returns Promise<string>

  • Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account.

    Returns

    Memberof

    Wallet

    Parameters

    • address: string
    • account: string

    Returns Promise<null>

  • add or remove an IP/Subnet from the banned list.

    Returns

    Memberof

    Network

    Parameters

    • subnet: string

      The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)

    • command: "add" | "remove"

      'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list

    • Optional banTime: number

      time in seconds how long (or until when if absolute is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)

    • Optional absolute: number | false

      Defaults to false. If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT).

    Returns Promise<null>

  • Set the transaction fee per kilobyte paid by transactions created by this wallet.

    Returns

    Memberof

    Wallet

    Parameters

    • amount: number

      TX fee, rounds to 0.00000001 GRC

    Returns Promise<boolean>

  • Returns all information about the block at index

    Returns

    Memberof

    Network

    Parameters

    • index: number

      Block number

    Returns Promise<Block>

  • Returns a signed a message using the private key from Gridcoinaddress. Lets you prove that this message came from the owner of an address. You can verify a signed message with the verify message command. (It will not send this message anywhere. You have to do that)

    Returns

    • Base64 signature

    Memberof

    Wallet

    Parameters

    • address: string
    • message: string

    Returns Promise<string>

  • Sign inputs for raw transaction (serialized, hex-encoded).

    Returns

    Memberof

    Wallet

    Parameters

    • rawTransaction: string

      raw transaction (serialized, hex-encoded)

    • transactionDependencies: TransactionDependencies[]

      is an array of previous transaction outputs that this transaction depends on but may not yet be in the blockchain.

    • privateKeys: string[]

      is an array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction

    • sigHashType: SigHashType

      is a string that is one of six values; ALL, NONE, SINGLE or ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.

    Returns Promise<TransactionSigned>

  • Display data on recent superblocks

    Returns

    Memberof

    Mining

    Parameters

    • Optional lookback: number

      number of superblocks to show (default 14)

    • Optional displayContract: boolean

      display superblock contract (default false)

    • Optional cpid: string

      Shows magnitude for a cpid for recent superblocks

    Returns Promise<Superblock[]>

  • Display information regarding superblock age

    Returns

    Memberof

    Mining

    Returns Promise<SuperblockAge>

  • Displays average information for current superblock

    Returns

    Memberof

    Developer

    Returns Promise<SuperblockAverage>

  • Return information about gridcoinaddress.

    Description

    The validateaddress RPC accepts a block verifies it is a valid addition to the block chain and broadcasts it to the network.

    Returns

    Memberof

    GridcoinRPC

    Parameters

    • gridcoinAddress: string

    Returns Promise<AddressValidation>

  • Return information about gridcoinpubkey.

    Returns

    Memberof

    GridcoinRPC

    Parameters

    • gridcoinPubkey: string

    Returns Promise<PubKeyValidation>

  • Verify a signed message.

    Description

    The P2PKH address corresponding to the private key which made the signature. A P2PKH address is a hash of the public key corresponding to the private key which made the signature. When the ECDSA signature is checked, up to four possible ECDSA public keys will be reconstructed from the signature; each key will be hashed and compared against the P2PKH address provided to see if any of them match. If there are no matches, signature validation will fail.

    Returns

    Memberof

    GridcoinRPC

    See

    signmessage

    Parameters

    • gridcoinAddress: string

      The gridcoin address to use for the signature.

    • signature: string

      The signature provided by the signer in base 64 encoding.

    • message: string

      The message that was signed.

    Returns Promise<boolean>

  • Display the software versions of nodes that recently staked.

    Returns

    Memberof

    Developer

    Parameters

    • Optional lookBack: number

      Number of blocks to tally from the chain head

    • Optional full: boolean

      Classify by commit suffix (default: false)

    Returns Promise<Version[]>

  • Cast a vote for a poll.

    Returns

    Memberof

    Voting

    Parameters

    • pollId: string

      ID of the poll to vote for.

    • Rest ...choices: number[]

      Numeric IDs of the choices to vote for.

    Returns Promise<VoteResult>

  • Display the vote details for the specified poll

    Returns

    Memberof

    Voting

    Parameters

    • voteIdOrTitle: string

      Title or ID of the poll

    Returns Promise<Vote[]>

  • Removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call

    See

    walletPassPhrase again before being able to call any methods which require the wallet to be unlocked.

    Returns

    Memberof

    Wallet

    Returns Promise<null>

  • Stores the wallet decryption key in memory for timeout seconds. if stakingonly is true sending functions are disabled.

    Returns

    Memberof

    Wallet

    Parameters

    • passphrase: string
    • timeout: number
    • isStakingOnly: boolean

    Returns Promise<null>

  • Changes the wallet passphrase from oldpassphrase to newpassphrase

    Returns

    Memberof

    Wallet

    Parameters

    • oldPassphrase: string
    • newPassphrase: string

    Returns Promise<null>

Generated using TypeDoc