EGD发展历程

产品 事件

2014

推出兴运来臻酒红盒、兴运来臻酒黄盒(精品) 、兴运来臻酒五十年、网络黄金未来酒、网络黄金会员酒、网络黄金酒等同时上架并赠送EGD。

9月5日

网络黄金EGD推出裸眼3D平板电脑。

11月 28日

上海造币厂发行网络黄金
EGD纪念金条

12月 18日

私人订制未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月) 纪念U盘商城上架。

网络黄金水问世,正式供应超市购物网站等商家。

12月 22日

私人订制网络黄金钥匙扣商城上架。

12月 27日

保利•梵净山茶产业复式基金发行。

12月 29日

网络黄金大道藏红花茶,生产出库供应超市购物网站等商家。

2015
1月 12日

网络黄金积分宝刷卡器,全国首发震撼登场。

1月 23日

商城上架阳光庄园干红葡萄酒、橡山干红葡萄酒赠送EGD积分。

2月 2日

网络黄金绿色食品礼盒,正式供应超市购物网站等商家。

2月 3日

网络黄金EGD纪念徽章
全球同步发售。

将网络黄金EGD装进钱包:网络黄金EGD礼品银行卡诞生!

未来世界全球兑换券兑换泰国房地产开启。

日坛店开始兑换三大通讯运营商充值卡。

12月 18日

未来世界中粮我买卡、酒仙网礼品卡正式上线全球兑咖啡厅。

未来世界时光电影卡上线全球兑咖啡厅。

未来世界1号店礼品卡正式上线。

未来世界京东e卡上线

未来世界资和信百礼挑一购物卡上线

日坛店可兑换未来世界香港八达通卡

1月 1日

多国创始团队,联合发明网络黄金协议推出网络黄金。全球网民公社网络黄金商业化应用独立运营。

3月

EGD创始团队与投资公司达成共识,推出独立的交易平台 www.egdmarket.com。

5月 16日

EGD全球同步发行。

7月 10日

万利宝软件推出全球网络黄金财富增值计划。

8月

未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月)电商平台正式上线http://shop.futurecity4u.com。

11月 1日

石家庄市庆祝 美国未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月) 上市庆典。

11月 9日

未来财富领袖峰会暨全球未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月)控股公司美国上市成功庆典。

11月 29日

重庆网民公社招商大会

12月 12日

泰国于2014年12月12日未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月) 团队全球新视野 · 心境界盛大召开。

12月 中旬

网络黄金EGD已得到Master Card银行卡的开通许可。

12月 28日

中国首届全球EGD加密数字资产高峰论坛在深圳召开。

12月 30日

网民公社全球注册用户数突破30000。

1月 12日

2015 年 1月 12日 全球EGD用户节点数量突破5000。

1月 22日

第十届中国国际金融品牌创新峰会于 1月 22日 在钓鱼台召开,加密数字资产共赢商业模式代表参加并获奖。

1月 30日

香港——全球最具创新性的加密数字资产交易平台ANX宣布,其平台将增加网络黄金EGD的交易。

1月 31日- 2月 1日

2015年2月1日,泰国会员中心落成。

泰国曼谷华润大厦52层,迎来全球100多名代表参加全球未来城(EGD全球运营团队授权未来城运营日期截止到2015年10月) 控股有限公司亚太会员服务中心启动仪式暨全球未来世界2015战略规划发布会。

2月 2日

全球网民公社社员通过网民公社平台总消费金额达到400万人民币。

2月 6日

加密数字资产共赢商业模式加盟商家突破200家,其中包含大连电信EGD合作营业厅、大连兰谷会所、北京日坛咖啡厅等商家的加入。

中国国际商会前往美国旧金山巴拿马太平洋万国博览会中国参展团与加密数字资产共赢商业模式达成战略合作。

4月

锁屏分享广告费-APP”E划“上线

曼谷成立 JCFC 合资公司 进军国际地产业

5月

餐饮美食平台APP“EGD金美食”上线

6月 12日

全球加密数字资产法律权威专家马克•桑托利出具网络黄金EGD法律意见书。

6月 27日

全球加密数字资产培训集团控股有限公司第一期培训课程成功举办。

7月 1日

利购商盟正式成立,致力于全球兑实体商业落地推广服务。

8月 20日

“EGD 大爱无疆 卫爱募捐”为天津祈福取得圆满成功。

9月 1日

大幕开启,网络黄金积分进入商家定制时代。

9月 12日

利众惠广 携手共赢 “普惠工程 无界商盟”合作签约仪式隆重召开。

9月 17日

无界商盟"网络黄金积分"投资全面打造中国元宝枫产业链。

10月

EGD运营团队正式授权未来世界集团(Future World Group, Inc.股票代码EGDS)在世界范围内进行EGD商业模式的推广

兑换券与海外房产无缝对接。

10月 2日

无界商盟携手内蒙古航母羊羊农牧业有限公司 共创有机循环生态产业链。

10月28日

“全球兑”手机APP正式上线,迎来第一位注册用户。

11月 10日

EGD文化爱心平台正式开通。

11月 17日

日坛店兑换沃尔玛、携程消费充值卡,未来领域迈入空前盛世全球兑时代。

11月 25日

全球兑APP下载安装人数已达11836人。

未来国际股份有限公司香港办公室落成开业!

12月 23日

未来世界全球市场启动大会在香港隆重举行。

12月 30日

“全球兑”手机APP注册用户数量达到60000。

2016
1月 11日

利购商盟荣获“重质守信—3•15满意单位”。

1月 16日

利购商盟荣获”中国经济新模式创新与发展峰会“多项权威奖项。

2月22日

EGD香港工作会议召开

3月 2日

未来世界海洋量子号韩国之旅首航

Hash Byte Order

AddMultiSigAddress

需要钱包的支持

addmultisigaddress RPC 添加一个 P2SH 多重信号的地址到手机钱包。

参数#1—要求签名的数量

Name Type Presence Description
Required number (int) Required
(exactly 1)
The minimum (m) number of signatures required to spend this m-of-n multisig script

参数#2—完整的公钥,或者已知公钥的地址

Name Type Presence Description
Keys Or Addresses array Required
(exactly 1)
An array of strings with each string being a public key or address

Key Or Address
string Required
(1 or more)
A public key against which signatures will be checked. Alternatively, this may be a P2PKH address belonging to the wallet—the corresponding public key will be substituted. There must be at least as many keys as specified by the Required parameter, and there may be more keys

参数#3—账户名称

Name Type Presence Description
Account string Optional
(0 or 1)
The account name in which the address should be stored. Default is the default account, “” (an empty string)

结果—一个P2SH 地址添加并存储到了钱包里

Name Type Presence Description
result string ( Required
(exactly 1)
The P2SH multisig address. The address will also be added to the wallet, and outputs paying that address will be tracked by the wallet

Example from Egdcoin Core 0.10.0

Adding a 2-of-3 P2SH multisig address to the “test account” by mixing two P2PKH addresses and one full public key:

Egdcoin-cli -testnet addmultisigaddress \
  2 \
                    '''
    [
      "mjbLRSidW1MY8oubvs4SMEnHNFXxCcoehQ",
      "02ecd2d250a76d204011de6bc365a56033b9b3a149f679bc17205555d3c2b2854f",
      "mt17cV37fBqZsnMmrHnGCm9pM28R1kQdMG"
    ]
  ''' \
                    'test account'

Result:

2MyVxxgNBk5zHRPRY2iVjGRJHYZEp1pMCSq

(New P2SH multisig address also stored in wallet.)

See also

  • CreateMultiSig: creates a P2SH multi- signature address.
  • DecodeScript: decodes a hex-encoded P2SH redeem script.
  • Pay-To-Script-Hash (P2SH)
BackupWallet

需要钱包的支持

backupwallet RPC 安全的复制 wallet.dat到一个指定的文件当中, 可以是一个目录或者一个带有文件名的路径。

参数#1—目标目录或文件名

Name Type Presence Description
Destination string Required
(exactly 1)
A filename or directory name. If a filename, it will be created or overwritten. If a directory name, the file wallet.dat will be created or overwritten within that directory

结果—null或错误

Name Type Presence Description
result null Required
(exactly 1)
Always null whether success or failure. The JSON- RPC error and message fields will be set if a failure occurred

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet backupwallet /tmp/backup.dat

See also

  • DumpWallet: creates or overwrites a file with all wallet keys in a human-readable format.
  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.
CreateMultiSig

createmultisig RPC 创建了一个 P2SH 多重签名的地址。

参数#1—要求签名的数量

Name Type Presence Description
Required number (int) Required
(exactly 1)
The minimum (m) number of signatures required to spend this m-of-n multisig script

参数#2—完整的公钥,或者已知公钥的地址

Name Type Presence Description
Keys Or Addresses array Required
(exactly 1)
An array of strings with each string being a public key or address

Key Or Address
string Required
(1 or more)
A public key against which signatures will be checked. If wallet support is enabled, this may be a P2PKH address belonging to the wallet—the corresponding public key will be substituted. There must be at least as many keys as specified by the Required parameter, and there may be more keys

结果— P2SH 地址和十六进制编码赎回脚本

Name Type Presence Description
result object Required
(exactly 1)
An object describing the multisig address

address
string ( base58) Required
(exactly 1)
The P2SH address for this multisig redeem script

redeemScript
string (hex) Required
(exactly 1)
The multisig redeem script encoded as hex

Egdcoin Core 0.10.0的例子

通过结合两个P2PKH地址和一个完整的公钥来创建一个2-of-3 P2SH 多重签名的地址

Egdcoin-cli -testnet createmultisig 2 '''
  [
    "mjbLRSidW1MY8oubvs4SMEnHNFXxCcoehQ",
    "02ecd2d250a76d204011de6bc365a56033b9b3a149f679bc17205555d3c2b2854f",
    "mt17cV37fBqZsnMmrHnGCm9pM28R1kQdMG"
  ]
'''

Result:

{
                    "address" : "2MyVxxgNBk5zHRPRY2iVjGRJHYZEp1pMCSq",
                    "redeemScript" : "522103ede722780d27b05f0b1169efc90fa15a601a32fc6c3295114500c586831b6aaf2102ecd2d250a76d204011de6bc365a56033b9b3a149f679bc17205555d3c2b2854f21022d609d2f0d359e5bc0e5d0ea20ff9f5d3396cb5b1906aa9c56a0e7b5edc0c5d553ae"
}

See also

  • AddMultiSigAddress: adds a P2SH multisig address to the wallet.
  • DecodeScript: decodes a hex-encoded P2SH redeem script.
  • Pay-To-Script-Hash (P2SH)
CreateRawTransaction

The createrawtransaction RPC 创建了一个未签名的序列化的交易,使用一个P2PKH 或者P2SH地址来花费之前的支出到一个新的支出。 交易不是存储在钱包或传播到网络上的。

参数#1—引用以前的输出

Name Type Presence Description
Outpoints array Required
(exactly 1)
An array of objects, each one being an unspent outpoint
→ Outpoint object Required
(1 or more)
An object describing a particular unspent
→ →
txid
string (hex) Required
(exactly 1)
The TXID of the outpoint encoded as hex in RPC byte order
→ →
vout
number (int) Required
(exactly 1)
The output index number (vout) of the outpoint; the firstoutput in a transaction is index 0

参数#2—P2PKH 或者P2SH 地址与数量

Name Type Presence Description
Outputs object Required
(exactly 1)
The addresses and amounts to pay

Address/Amount
string : number (Egdcoins) Required
(1 or more)
A key/value pair with the address to pay as a string (key) and the amount to pay that address (value) in Egdcoins

结果—十六进制的未签名的原始交易

Name Type Presence Description
result string Required
(Exactly 1)
The resulting unsigned raw transaction in serialized transaction format encoded as hex. If the transaction couldn’t be generated, this will be set to JSON null and the JSON-RPC error field may contain an error message

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet createrawtransaction '''
  [
    {
      "txid": "1eb590cd06127f78bf38ab4140c4cdce56ad9eb8886999eb898ddf4d3b28a91d",
      "vout" : 0
    }
  ]''' '{ "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe": 0.13 }'

Result (wrapped):

01000000011da9283b4ddf8d89eb996988b89ead56cecdc44041ab38bf787f12\
06cd90b51e0000000000ffffffff01405dc600000000001976a9140dfc8bafc8\
419853b34d5e072ad37d1a5159f58488ac00000000

See also

  • DecodeRawTransaction: decodes a serialized transaction hex string into a JSON object describing the transaction.
  • SignRawTransaction: signs a transaction in the serialized transaction format usingprivate keys stored in the wallet or provided in the call.
  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.
  • Serialized Transaction Format
DecodeRawTransaction

The decoderawtransactionDecodeRawTransaction

参数#1—十六进制序列化交易

Name Type Presence Description
Serialized Transaction string (hex) Required
(exactly 1)
The transaction to decode in serialized transaction format

结果—解码的交易

Name Type Presence Description
result object Required
(exactly 1)
An object describing the decoded transaction, or JSON null if the transaction could not be decoded

txid
string (hex) Required
(exactly 1)
The transaction’s TXID encoded as hex inRPC byte order

version
number (int) Required
(exactly 1)
The transaction format version number

locktime
number (int) Required
(exactly 1)
The transaction’s locktime: either a Unix epoch date or block height; see the Locktime parsing rules

vin
array Required
(exactly 1)
An array of objects with each object being an input vector (vin) for this transaction. Input objects will have the same order within the array as they have in the transaction, so the first input listed will be input 0
→ →
Input
object Required
(1 or more)
An object describing one of this transaction’s inputs. May be a regular input or a coinbase
→ → →
txid
string Optional
(0 or 1)
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction
→ → →
vout
number (int) Optional
(0 or 1)
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of 0. Not present if this is a coinbase transaction
→ → →
scriptSig
object Optional
(0 or 1)
An object describing the signature script of this input. Not present if this is a coinbase transaction
→ → → →
asm
string Required
(exactly 1)
The signature script in decoded form with non-data-pushing op codes listed
→ → → →
hex
string (hex) Required
(exactly 1)
The signature script encoded as hex
→ → →
coinbase
string (hex) Optional
(0 or 1)
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction
→ → →
sequence
number (int) Required
(exactly 1)
The input sequence number

vout
array Required
(exactly 1)
An array of objects each describing an output vector (vout) for this transaction. Output objects will have the same order within the array as they have in the transaction, so the first output listed will be output 0
→ →
Output
object Required
(1 or more)
An object describing one of this transaction’s outputs
→ → →
value
number (Egdcoins) Required
(exactly 1)
The number of Egdcoins paid to this output. May be 0
→ → →
n
number (int) Required
(exactly 1)
The output index number of this output within this transaction
→ → →
scriptPubKey
object Required
(exactly 1)
An object describing the pubkey script
→ → → →
asm
string Required
(exactly 1)
The pubkey script in decoded form with non-data-pushing op codes listed
→ → → →
hex
string (hex) Required
(exactly 1)
The pubkey script encoded as hex
→ → → →
reqSigs
number (int) Optional
(0 or 1)
The number of signatures required; this is always 1 for P2PK, P2PKH, and P2SH (including P2SH multisig because the redeem script is not available in the pubkey script). It may be greater than 1 for bare multisig. This value will not be returned for nulldata or nonstandard script types (see the type key below)
→ → → →
type
string Optional
(0 or 1)
The type of script. This will be one of the following:
pubkey for a P2PK script
pubkeyhash for a P2PKH script
scripthash for a P2SH script
multisig for a bare multisig script
nulldata for nulldata scripts
nonstandard for unknown scripts
→ → → →
addresses
string : array Optional
(0 or 1)
Thep2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of anypubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types
→ → → → →
Address
string Required
(1 or more)
A P2PKH or P2SH address

Egdcoin Core 0.10.0的例子

解码一个带签名的一个输入,三个输出的交易:

Egdcoin-cli -testnet decoderawtransaction 0100000001268a9ad7bfb2\
1d3c086f0ff28f73a064964aa069ebb69a9e437da85c7e55c7d7000000006b48\
3045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560f\
eb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd4\
5a4c3d0041acc0012103a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b\
3118f3db16cbbcf8f326ffffffff0350ac6002000000001976a91456847befbd\
2360df0e35b4e3b77bae48585ae06888ac80969800000000001976a9142b1495\
0b8d31620c6cc923c5408a701b1ec0a02088ac002d3101000000001976a9140d\
fc8bafc8419853b34d5e072ad37d1a5159f58488ac00000000

Result:

{
                    "txid" : "ef7c0cbf6ba5af68d2ea239bba709b26ff7b0b669839a63bb01c2cb8e8de481e",
                    "version" : 1,
                    "locktime" : 0,
                    "vin" : [
                    {
                    "txid" : "d7c7557e5ca87d439e9ab6eb69a04a9664a0738ff20f6f083c1db2bfd79a8a26",
                    "vout" : 0,
                    "scriptSig" : {
                    "asm" : "3045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd45a4c3d0041acc001 03a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326",
                    "hex" : "483045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd45a4c3d0041acc0012103a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326"
                    },
                    "sequence" : 4294967295
                    }
                    ],
                    "vout" : [
                    {
                    "value" : 0.39890000,
                    "n" : 0,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 56847befbd2360df0e35b4e3b77bae48585ae068 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a91456847befbd2360df0e35b4e3b77bae48585ae06888ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "moQR7i8XM4rSGoNwEsw3h4YEuduuP6mxw7"
                    ]
                    }
                    },
                    {
                    "value" : 0.10000000,
                    "n" : 1,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 2b14950b8d31620c6cc923c5408a701b1ec0a020 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN"
                    ]
                    }
                    },
                    {
                    "value" : 0.20000000,
                    "n" : 2,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 0dfc8bafc8419853b34d5e072ad37d1a5159f584 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe"
                    ]
                    }
                    }
                    ]
}

See also

  • CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address. The transaction is not stored in the wallet or transmitted to the network.
  • SignRawTransaction: signs a transaction in the serialized transaction format using private keys stored in the wallet or provided in the call.
  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.
DecodeScript

decodescript RPC 解码一个十六进制的编码的P2SH 赎回脚本.

参数#1—一个十六进制的赎回脚本

Name Type Presence Description
Redeem Script string (hex) Required
(exactly 1)
The redeem script to decode as a hex-encoded serialized script

结果—解码脚本

Name Type Presence Description
result object Required
(exactly 1)
An object describing the decoded script, or JSON null if the script could not be decoded

asm
string Required
(exactly 1)
The redeem script in decoded form with non-data-pushing op codes listed. May be empty

type
string Optional
(0 or 1)
The type of script. This will be one of the following:
pubkey for a P2PK script inside P2SH
pubkeyhash for a P2PKH script inside P2SH
multisig for a multisig script inside P2SH
nonstandard for unknown scripts

reqSigs
number (int) Optional
(0 or 1)
The number of signatures required; this is always 1 for P2PK or P2PKH within P2SH. It may be greater than 1 for P2SH multisig. This value will not be returned for nonstandard script types (see the type key above)

addresses
array Optional
(0 or 1)
A P2PKH addresses used in this script, or the computed P2PKH addresses of any pubkeys in this script. This array will not be returned for nonstandard script types
→ →
Address
string Required
(1 or more)
A P2PKH address

p2sh
string (hex) Required
(exactly 1)
The P2SH address of this redeem script

Egdcoin Core 0.10.0的例子

一个2-of-3 P2SH 多重签名的公钥脚本:

Egdcoin-cli -testnet decodescript 522103ede722780d27b05f0b1169ef\
c90fa15a601a32fc6c3295114500c586831b6aaf2102ecd2d250a76d204011de\
6bc365a56033b9b3a149f679bc17205555d3c2b2854f21022d609d2f0d359e5b\
c0e5d0ea20ff9f5d3396cb5b1906aa9c56a0e7b5edc0c5d553ae

Result:

{
                    "asm" : "2 03ede722780d27b05f0b1169efc90fa15a601a32fc6c3295114500c586831b6aaf 02ecd2d250a76d204011de6bc365a56033b9b3a149f679bc17205555d3c2b2854f 022d609d2f0d359e5bc0e5d0ea20ff9f5d3396cb5b1906aa9c56a0e7b5edc0c5d5 3 OP_CHECKMULTISIG",
                    "reqSigs" : 2,
                    "type" : "multisig",
                    "addresses" : [
                    "mjbLRSidW1MY8oubvs4SMEnHNFXxCcoehQ",
                    "mo1vzGwCzWqteip29vGWWW6MsEBREuzW94",
                    "mt17cV37fBqZsnMmrHnGCm9pM28R1kQdMG"
                    ],
                    "p2sh" : "2MyVxxgNBk5zHRPRY2iVjGRJHYZEp1pMCSq"
}

See also

  • CreateMultiSig: creates a P2SH multi-signature address.
  • Pay-To-Script-Hash (P2SH)
DumpPrivKey

需要钱包的支持。需要一个未上锁的钱包或未加密的钱包。

dumpprivkey RPC回到钱包-输入-格式私钥对应的一个地址。(但不从钱包中移除)

参数#1—地址对应的私钥来获得

Name Type Presence Description
P2PKH Address string (base58) Required
(exactly 1)
The P2PKH address corresponding to the private key you want returned. Must be the address corresponding to a private key in this wallet

结果—私钥

Name Type Presence Description
result string (base58) Required
(exactly 1)
The private key encoded as base58check using wallet import format

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet dumpprivkey moQR7i8XM4rSGoNwEsw3h4YEuduuP6mxw7

Result:

cTVNtBK7mBi2yc9syEnwbiUpnpGJKohDWzXMeF4tGKAQ7wvomr95

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC.
  • DumpWallet: creates or overwrites a file with all wallet keys in a human-readable format.
EncryptWallet

需要钱包的支持。

encryptwalletRPC使用密码将钱包进行加密。 这只对第一次登录时启用加密,加密启用之后,你需要键入密码来使用私钥。

警告: 如果在命令行里使用这个RPC, 请记住你的壳可能会保存你的命令行(包括密码参数的价值)。 另外,没有RPC能够完全禁用加密。如果你想回到一个未加密的钱包,你必须创建一个新钱包和从RPC备份中恢复你的数据。

参数#1—一个密码

Name Type Presence Description
Passphrase string Required
(exactly 1)
The passphrase to use for the encryptedwallet. Must be at least one character

结果— 一个公告 (程序关闭)

Name Type Presence Description
result string Required
(exactly 1)
A notice that the server is stopping and that you need to make a new backup. The wallet is now encrypted

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet encryptwallet "test"

Result:

wallet encrypted; Egdcoin server stopping, restart to run with encrypted
wallet. The keypool has been flushed, you need to make a new backup.

See also

  • WalletPassphrase: stores the wallet decryption key in memory for the indicated number of seconds. Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one.
  • WalletLock: removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.
  • WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.
GetAccountAddress

需要钱包的支持。

getaccountaddress RPC 返回到现在的 Egdcoin 地址,用来接收付到此账户的款项。如果账户不存在,它会创建一个账户和一个新地址用以接收付款。

参数#1— 一个账户名称

Name Type Presence Description
Account string Required
(exactly 1)
The name of an account. Use an empty string (“”) for the default account. If the account doesn’t exist, it will be created

结果— 一个 Egdcoin 地址

Name Type Presence Description
result string (base58) Required
(exactly 1)
An address, belonging to the account specified, which has not yet received any payments

Egdcoin Core 0.10.0的例子

为默认账户得到一个地址:

Egdcoin-cli -testnet getaccountaddress ""

Result:

msQyFNYHkFUo4PG3puJBbpesvRCyRQax7r

See also

  • GetNewAddress: returns a new Egdcoin address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
  • GetRawChangeAddress: returns a new Egdcoin address for receiving change. This is for use withraw transactions, not normal use.
  • GetAddressesByAccount: returns a list of every address assigned to a particular account.
GetAccount

需要钱包的支持。

getaccountRPC返回与给定的相关联账户的名称地址。

参数#1—一个 Egdcoin 地址

Name Type Presence Description
Address string (base58) Required
(exactly 1)
A P2PKH or P2SH Egdcoin address belonging either to a specific account or the default account (“”)

结果— 一个账户名称

Name Type Presence Description
result string Required
(exactly 1)
The name of an account, or an empty string (“”, the default account)

Egdcoin Core 0.10.0的例子

Egdcoin-cli -testnet getaccount mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN

Result:

doc test

See also

  • GetAddressesByAccount: returns a list of everyaddress assigned to a particular account.
GetAddressesByAccount

需要钱包的支持。

getaddressesbyaccountRPC 返回到一个指定账户列表里的所有地址。

参数#1—账户名称

Name Type Presence Description
Account string Required
(exactly 1)
The name of the account containing the addresses to get. To get addresses from the default account, pass an empty string (“”)

Result— 一个地址的列表

Name Type Presence Description
result array Required
(exactly 1)
An array containing all addresses belonging to the specified account. If the account has no addresses, the array will be empty
Address string (base58) Optional
(1 or more)
A P2PKH or P2SH address belonging to the account

Egdcoin Core 0.10.0的例子

获得指定账户“doc test”的地址:

Egdcoin-cli -testnet getaddressesbyaccount "doc test"

Result:

[
                    "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
                    "mft61jjkmiEJwJ7Zw3r1h344D6aL1xwhma",
                    "mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6"
]

See also

  • GetAccount: returns the name of the account associated with the given address.
  • GetBalance: gets the balance in decimal Egdcoins across all accounts or for a particular account.
GetBalance

需要钱包的支持。

getbalanceRPC得到所有账户或某一指定账户的余额,以EGDCOIN小数点计算。

参数#1— 一个账户名称

Name Type Presence Description
Account string Optional
(0 or 1)
The name of an account to get the balance for. An empty string (“”) is the default account. The string * will get the balance for all accounts (this is the default behavior)

参数#2—最低的确认数量

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to thiswallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1

参数#3—是否包括只看地址

Name Type Presence Description
Include Watch-Only bool Optional
(0 or 1)
Added in Egdcoin Core 0.10.0

If set to true, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to false (the default), treat watch-only addresses as if they didn’t belong to this wallet

结果— Egdcoins余额

Name Type Presence Description
result number (Egdcoins) Required
(exactly 1)
The balance of the account (or all accounts) in Egdcoins

Egdcoin Core 0.10.0的例子

获得账户 “test1” 的余额, 包括至少一个确认的交易和花费到那个账户里只看的地址。

Egdcoin-cli -testnet getbalance "test1" 1 true

Result:

1.99900000

See also

  • ListAccounts: lists accounts and their balances.
  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions.
  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.
GetBestBlockHash

已添加到 Egdcoin Core 0.9.0里了

getbestblockhash RPC 回到一个最好的区块链上最近的区块上的区块头的哈希值。

参数: 无

结果—最好的区块链中的哈希的提示

Name Type Presence Description
result string (hex) Required
(exactly 1)
The hash of the block header from the most recent block on the best block chain, encoded as hex in RPC byte order

Example fromEgdcoin Core 0.10.0

Egdcoin-cli -testnet getbestblockhash

Result:

0000000000075c58ed39c3e50f99b32183d090aefa0cf8c324a82eea9b01a887

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
GetBlock

getblockRPC 通过一个指定的区块头的哈希值来从当地区块数据库中获得一个区块, 作为一个JSON 对象或一个序列化区块。

参数#1—区块头的哈希值

Name Type Presence Description
Header Hash string (hex) Required
(exactly 1)
The hash of the header of the block to get, encoded as hex in RPC byte order

参数#2—JSON 或十六进制输出

Name Type Presence Description
Format bool Optional
(0 or 1)
结果(如果格式是false)—一个序列化区块

结果(如果格式是false或忽略的)—一个 JSON 块

Name Type Presence Description
result string (hex)/null Required
(exactly 1)
The requested block as a serialized block, encoded as hex, or JSON null if an error occurred

Result (if format was true or omitted)—a JSON block

Name Type Presence Description
result object/null Required
(exactly 1)
An object containing the requested block, or JSON null if an error occurred

hash
string (hex) Required
(exactly 1)
The hash of this block’s block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1

confirmations
number (int) Required
(exactly 1)
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain

size
number (int) Required
(exactly 1)
The size of this block in serialized block format, counted in bytes

height
number (int) Required
(exactly 1)
The height of this block on its block chain

version
number (int) Required
(exactly 1)
This block’s version number. See block version numbers

merkleroot
string (hex) Required
(exactly 1)
The merkle root for this block, encoded as hex in RPC byte order

tx
array Required
(exactly 1)
An array containing the TXIDs of all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block
→ →
TXID
string (hex) Required
(1 or more)
The TXID of a transaction in this block, encoded as hex in RPC byte order

time
number (int) Required
(exactly 1)
The value of the time field in the block header, indicating approximately when the block was created

nonce
number (int) Required
(exactly 1)
The nonce which was successful at turning this particular block into one that could be added to the best block chain

bits
string (hex) Required
(exactly 1)
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass

difficulty
number (real) Required
(exactly 1)
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0

chainwork
string (hex) Required
(exactly 1)
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex

previousblockhash
string (hex) Required
(exactly 1)
The hash of the header of the previous block, encoded as hex in RPC byte order

nextblockhash
string (hex) Optional
(0 or 1)
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order

Egdcoin Core 0.10.0的例子

从原始的十六进制得到一个块:

Egdcoin-cli -testnet getblock \
            000000000fe549a89848c76070d4132872cfb6efe5315d01d7ef77e4900f2d39 \
                    false

结果(覆盖):

02000000df11c014a8d798395b5059c722ebdf3171a4217ead71bf6e0e99f4c7\
000000004a6f6a2db225c81e77773f6f0457bcb05865a94900ed11356d0b7522\
8efb38c7785d6053ffff001d005d437001010000000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff0d03b4770301\
64062f503253482fffffffff0100f9029500000000232103adb7d8ef6b63de74\
313e0cd4e07670d09a169b13e4eda2d650f529332c47646dac00000000

在JSON得到相同的区块:

Egdcoin-cli -testnet getblock \
            000000000fe549a89848c76070d4132872cfb6efe5315d01d7ef77e4900f2d39 \
                    true

Result:

{
                    "hash" : "000000000fe549a89848c76070d4132872cfb6efe5315d01d7ef77e4900f2d39",
                    "confirmations" : 88029,
                    "size" : 189,
                    "height" : 227252,
                    "version" : 2,
                    "merkleroot" : "c738fb8e22750b6d3511ed0049a96558b0bc57046f3f77771ec825b22d6a6f4a",
                    "tx" : [
                    "c738fb8e22750b6d3511ed0049a96558b0bc57046f3f77771ec825b22d6a6f4a"
                    ],
                    "time" : 1398824312,
                    "nonce" : 1883462912,
                    "bits" : "1d00ffff",
                    "difficulty" : 1.00000000,
                    "chainwork" : "000000000000000000000000000000000000000000000000083ada4a4009841a",
                    "previousblockhash" : "00000000c7f4990e6ebf71ad7e21a47131dfeb22c759505b3998d7a814c011df",
                    "nextblockhash" : "00000000afe1928529ac766f1237657819a11cfcc8ca6d67f119e868ed5b6188"
}

See also

  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBestBlockHash: returns the header hash of the most recent block on the bestblock chain.
GetBlockChainInfo

添加到 Egdcoin Core 0.9.2

getblockchaininfo RPC 提供区块链当前状态的信息。

参数: 无

Egdcoin Core 0.10.0的例子

Name Type Presence Description
result object Required
(exactly 1)
Information about the current state of the local block chain

chain
string Required
(exactly 1)
The name of the block chain. One of main for mainnet, test for testnet, or regtest for regtest

blocks
number (int) Required
(exactly 1)
The number of validated blocks in the local best block chain. For a new node with just the hardcoded genesis block, this will be 0

headers
number (int) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The number of validated headers in the local best headers chain. For a new node with just the hardcoded genesis block, this will be zero. This number may be higher than the number of blocks

bestblockhash
string (hex) Required
(exactly 1)
The hash of the header of the highest validated block in the bestblock chain, encoded as hex in RPC byte order. This is identical to the string returned by thegetbestblockhash RPC

difficulty
number (real) Required
(exactly 1)
The difficulty of the highest-height block in the bestblock chain

verificationprogress
number (real) Required (exactly 1) Estimate of what percentage of the block chain transactions have been verified so far, starting at 0.0 and increasing to 1.0 for fully verified. May slightly exceed 1.0 when fully synced to account for transactions in the memory pool which have been verified before being included in a block

chainwork
string (hex) Required
(exactly 1)
The estimated number of block header hashes checked from the genesis block to this block, encoded as big-endian hex

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getblockchaininfo

Result:

{
                    "chain" : "test",
                    "blocks" : 315280,
                    "headers" : 315280,
                    "bestblockhash" : "000000000ebb17fb455e897b8f3e343eea1b07d926476d00bc66e2c0342ed50f",
                    "difficulty" : 1.00000000,
                    "verificationprogress" : 1.00000778,
                    "chainwork" : "0000000000000000000000000000000000000000000000015e984b4fb9f9b350"
}

See also

  • GetMiningInfo: returns variousmining-related information.
  • GetNetworkInfo: returns information about the node’s connection to the network.
  • GetWalletInfo: provides information about the wallet.
GetBlockCount

getblockcountRPC 将一些区块返回到当地最好的区块链中。

参数: 无

结果—当地最好的区块链中的一些区块

Name Type Presence Description
result number (int) Required
(exactly 1)
The number of blocks in the local best block chain. For a new node with only the hardcoded genesis block, this number will be 0

Egdcoin Core 0.10.0的例子

Egdcoin-cli -testnet getblockcount

Result:

315280

See also

  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
GetBlockHash

getblockhashRPC将一个区块链中的区块头的哈希值返回到当地最好区块链中的已给出的高度。

参数—一个区块的高度

Name Type Presence Description
Block Height number (int) Required
(exactly 1)
The height of the block whose header hash should be returned. The height of the hardcoded genesis block is 0

结果—区块头的哈希值

Name Type Presence Description
result string (hex)/null Required
(exactly 1)
The hash of theblock at the requested height, encoded as hex in RPC byte order, or JSON null if an error occurred

Egdcoin Core 0.10.0的例子

Egdcoin-cli -testnet getblockhash 240886

Result:

00000000a0faf83ab5799354ae9c11da2a2bd6db44058e03c528851dee0a3fff

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.
GetBlockTemplate

getblocktemplateRPC获得一个区块模板,用于挖矿软件的应用。获得更多信息,请浏览下列资源:

  • Egdcoin Wiki GetBlockTemplate
  • BIP22
  • BIP23

See also

  • SetGenerate: enables or disables hashing to attempt to find the next block.
  • GetMiningInfo: returns variousmining-related information.
  • SubmitBlock: accepts ablock, verifies it is a valid addition to the block chain, and broadcasts it to the network. Extra parameters are ignored by Egdcoin Core but may be used by mining pools or other programs.
  • PrioritiseTransaction: adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)
GetConnectionCount

getconnectioncountRPC 返回到其他节点的连接数量。

参数: 无

结果—其他节点的连接数量

Name Type Presence Description
result number (int) Required
(exactly 1)
The total number of connections to other nodes (both inbound and outbound)

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getconnectioncount

Result:

14

See also

  • GetNetTotals: returns information about network traffic, including bytes in, bytes out, and the current time.
  • GetPeerInfo: returns data about each connected network node.
  • GetNetworkInfo: returns information about the node’s connection to the network.
GetDifficulty

getdifficulty RPC

参数: 无

结果—当前的困难

Name Type Presence Description
result number (real) Required
(exactly 1)
The difficulty of creating ablock with the same target threshold (nBits) as the highest-height block in the local best block chain. The number is a a multiple of the minimumdifficulty

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getdifficulty

Result:

1.00000000

See also

  • GetNetworkHashPS: returns the estimated current or historical network hashes per second based on the last n blocks.
  • GetMiningInfo: returns various mining-related information.
GetInfo

getinfoRPC 复制节点和网络的各种信息。

警告: getinfo 将会从Egdcoin Core中最新的版本中移除。 用See Also的分段中的RPC来代替。

参数: 无

结果—节点和网络的各种信息

Name Type Presence Description
result object Required
(exactly 1)
Information about this node and the network

version
number (int) Required
(exactly 1)
This node’s version of Egdcoin Core in its internal integer format. For example, Egdcoin Core 0.9.2 has the integer version number 90200

protocolversion
number (int) Required
(exactly 1)
The protocol version number used by this node. See the protocol versions section for more information

walletversion
number (int) Optional
(0 or 1)
The version number of the wallet. Only returned ifwallet support is enabled

balance
number (Egdcoins) Optional
(0 or 1)
The balance of the wallet in Egdcoins. Only returned if wallet support is enabled

blocks
number (int) Required
(exactly 1)
The number of blocks in the local best block chain. A new node with only the hardcoded genesis block will return 0

timeoffset
number (int) Required
(exactly 1)
The offset of the node’s clock from the computer’s clock (both in UTC) in seconds. The offset may be up to 4200 seconds (70 minutes)

connections
number (int) Required
(exactly 1)
The total number of open connections (both outgoing and incoming) between this node and other nodes

proxy
string Required
(exactly 1)
The hostname/IP address and port number of the proxy, if set, or an empty string if unset

difficulty
number (real) Required
(exactly 1)
The difficulty of the highest-heightblock in the local best block chain

testnet
bool Required
(exactly 1)
Added in Egdcoin Core 0.10.0

Set to true if this node is on testnet; set to false if this node is on mainnet or a regtest

keypoololdest
number (int) Optional
(0 or 1)
The date asUnix epoch time when the oldest key in the wallet key pool was created; useful for only scanning blocks created since this date for transactions. Only returned if wallet support is enabled

keypoolsize
number (int) Optional
(0 or 1)
The number of keys in the wallet keypool. Only returned if wallet support is enabled

paytxfee
Optional
(0 or 1)
Theminimum fee to pay per kilobyte of transaction; may be 0. Only returned if wallet suuport is enabled

relayfee
number (Egdcoins) Required
(exactly 1)
The minimum fee a low-priority transaction must pay in order for this node to accept it into its memory pool

unlocked_until
number (int) Optional
(0 or 1)
The Unix epoch time when thewallet will automatically re-lock. Only displayed if wallet encryption is enabled. Set to 0 if wallet is currently locked

errors
string Required
(exactly 1)
A plain-text description of any errors this node has encountered or detected. If there are no errors, an empty string will be returned. This is not related to the JSON-RPC error field

Egdcoin Core 0.10.0 的例子带钱包的支持

Egdcoin-cli -testnet getinfo

Result:

{
                    "version" : 100000,
                    "protocolversion" : 70002,
                    "walletversion" : 60000,
                    "balance" : 1.27007770,
                    "blocks" : 315281,
                    "timeoffset" : 0,
                    "connections" : 9,
                    "proxy" : "",
                    "difficulty" : 1.00000000,
                    "testnet" : true,
                    "keypoololdest" : 1418924649,
                    "keypoolsize" : 101,
                    "paytxfee" : 0.00000000,
                    "relayfee" : 0.00001000,
                    "errors" : ""
}

See also

  • GetBlockChainInfo: provides information about the current state of the block chain.
  • GetMemPoolInfo: returns information about the node’s current transaction memory pool.
  • GetMiningInfo: returns various mining-related information.
  • GetNetworkInfo: returns information about the node’s connection to the network.
  • GetWalletInfo: provides information about the wallet.
GetMemPoolInfo

添加到 Egdcoin Core 0.10.0

getmempoolinfoRPC 返回到节点的当前的交易内存池的信息中。

参数: 无

结果—交易内存池的信息

Name Type Presence Description
result object Required
(exactly 1)
A object containing information about the memory pool

size
number (int) Required
(exactly 1)
The number of transactions currently in the memory pool

bytes
number (int) Required
(exactly 1)
The total number of bytes in the transactions in the memory pool

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getmempoolinfo

Result:

{
                    "size" : 37,
                    "bytes" : 9423
}

See also

  • GetBlockChainInfo: provides information about the current state of the block chain.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
  • GetTxOutSetInfo: returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions—it does not count outputs from the memory pool.
GetMiningInfo

getmininginfo RPC 返回到各种与挖矿相关的信息。

参数: 无

结果—各种与挖矿相关的信息

Name Type Presence Description
result object Required
(exactly 1)
Various mining-related information

blocks
number (int) Required
(exactly 1)
The height of the highest block on the local bestblock chain

currentblocksize
number (int) Required
(exactly 1)
If generation was enabled since the last time this node was restarted, this is the size in bytes of the last block built by this node for header hash checking. Otherwise, the value 0

currentblocktx
number (int) Required
(exactly 1)
If generation was enabled since the last time this node was restarted, this is the number of transactions in the last block built by this node for header hash checking. Otherwise, this is the value 0

difficulty
number (real) Required
(exactly 1)
If generation was enabled since the last time this node was restarted, this is the difficulty of the highest-height block in the local best block chain. Otherwise, this is the value 0

errors
string Required
(exactly 1)
A plain-text description of any errors this node has encountered or detected. If there are no errors, an empty string will be returned. This is not related to the JSON-RPC error field

genproclimit
number (int) Required
(exactly 1)
The limit on the number of processors to use for generation. If generation was enabled since the last time this node was restarted, this is the number used in the second parameter of the setgenerate RPC (or the default). Otherwise, it is -1

networkhashps
number (int) Required
(exactly 1)
An estimate of the number of hashes per second the network is generating to maintain the current difficulty. See the getnetworkhashps RPC for configurable access to this data

pooledtx
number (int) Required
(exactly 1)
The number of transactions in the memory pool

testnet
bool Required
(exactly 1)
Set to true if this node is running on testnet. Set to false if this node is on mainnet or a regtest

chain
string Required
(exactly 1)
Set to main for mainnet, test for testnet, and regtest for regtest

generate
bool Optional
(0 or 1)
Set to true if generation is currently enabled; set to false if generation is currently disabled. Only returned if the node haswallet support enabled

hashespersec
number (int) Optional
(0 or 1)
The approximate number of hashes per second this node is generating across all CPUs, if generation is enabled. Otherwise 0. Only returned if the node haswallet support enabled

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getmininginfo

Result:

{
                    "blocks" : 313168,
                    "currentblocksize" : 1819,
                    "currentblocktx" : 3,
                    "difficulty" : 1.00000000,
                    "errors" : "",
                    "genproclimit" : 1,
                    "networkhashps" : 5699977416637,
                    "pooledtx" : 8,
                    "testnet" : true,
                    "chain" : "test",
                    "generate" : true,
                    "hashespersec" : 921200
}

See also

  • GetMemPoolInfo: returns information about the node’s current transaction memory pool.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
  • GetBlockTemplate: gets a block template or proposal for use with mining software.
  • SetGenerate: enables or disables hashing to attempt to find the next block.
GetNetworkInfo

添加到 Egdcoin Core 0.9.2.

getnetworkinfoRPC 返回到节点的网络连接的信息

参数: 无

结果—节点的网络连接的信息

Name Type Presence Description
result object Required
(exactly 1)
Information about this node’s connection to the network

version
number Required
(exactly 1)
This node’s version of Egdcoin Core in its internal integer format. For example, Egdcoin Core 0.9.2 has the integer version number 90200

subversion
string Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The user agent this node sends in its version message

protocolversion
number (int) Required
(exactly 1)
The protocol version number used by this node. See the protocol versions section for more information

timeoffset
number (int) Required
(exactly 1)
The offset of the node’s clock from the computer’s clock (both in UTC) in seconds. The offset may be up to 4200 seconds (70 minutes)

connections
number (int) Required
(exactly 1)
The total number of open connections (both outgoing and incoming) between this node and other nodes

proxy
string Required
(exactly 1)
The hostname/IP address and port number of the proxy, if set, or an empty string if unset

relayfee
number (Egdcoins) Required
(exactly 1)
The minimum fee a low-priority transaction must pay in order for this node to accept it into its memory pool

localservices
string (hex) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The services supported by this node as advertised in its version message

networks
array Required
(exactly 1)
Added in Egdcoin Core 0.10.0

An array with three objects: one describing the IPv4 connection, one describing the IPv6 connection, and one describing the Tor hidden service (onion) connection
→ →
Network
object Optional
(0 to 3)
An object describing a network. If the network is unroutable, it will not be returned
→ → →
name
string Required
(exactly 1)
The name of the network. Either ipv4, ipv6, or onion
→ → →
limited
bool Required
(exactly 1)
Set to true if only connections to this network are allowed according to the -onlynet Egdcoin Core command-line/configuration-file parameter. Otherwise set to false
→ → →
reachable
bool Required
(exactly 1)
Set to true if connections can be made to or from this network. Otherwise set to false
→ → →
proxy
string Required
(exactly 1)
The hostname and port of any proxy being used for this network. If a proxy is not in use, an empty string
→ → →
localaddresses
array Required
(exactly 1)
An array of objects each describing the local addresses this node believes it listens on
→ → → →
Address
object Optional
(0 or more)
An object describing a particular address this node believes it listens on
→ → → → →
address
string Required
(exactly 1)
An IP address or .onion address this node believes it listens on. This may be manually configured, auto detected, or based on version messages this node received from its peers
→ → → → →
port
number (int) Required
(exactly 1)
The port number this node believes it listens on for the associated address. This may be manually configured, auto detected, or based on version messages this node received from its peers
→ → → → →
score
number (int) Required
(exactly 1)
The self-assigned score this node gives to this connection; higher scores means the node thinks this connection is better

Example fromEgdcoin Core 0.10.0

Egdcoin-cli -testnet getnetworkinfo

结果(实际的地址已经替换为保留的地址):

{
                    "version" : 100000,
                    "subversion" : "/Satoshi:0.10.0/",
                    "protocolversion" : 70002,
                    "localservices" : "0000000000000001",
                    "timeoffset" : 0,
                    "connections" : 51,
                    "networks" : [
                    {
                    "name" : "ipv4",
                    "limited" : false,
                    "reachable" : true,
                    "proxy" : ""
                    },
                    {
                    "name" : "ipv6",
                    "limited" : false,
                    "reachable" : true,
                    "proxy" : ""
                    },
                    {
                    "name" : "onion",
                    "limited" : false,
                    "reachable" : false,
                    "proxy" : ""
                    }
                    ],
                    "relayfee" : 0.00001000,
                    "localaddresses" : [
                    {
                    "address" : "192.0.2.113",
                    "port" : 18333,
                    "score" : 6470
                    },
                    {
                    "address" : "0600:3c03::f03c:91ff:fe89:dfc4",
                    "port" : 18333,
                    "score" : 2029
                    }
                    ]
}

See also

  • GetPeerInfo: returns data about each connectednetwork node.
  • GetNetTotals: returns information about network traffic, including bytes in, bytes out, and the current time.
GetPeerInfo

getpeerinfoRPC 返回到每个连接到网络的节点的信息上去。

参数: 无

结果—每个当前正在连接到网络的节点的信息

Name Type Presence Description
result array Required
(exactly 1)
An array of objects each describing one connected node. If there are no connections, the array will be empty

Node
object Optional
(0 or more)
An object describing a particular connected node
→ →
id
number (int) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The node’s index number in the local node address database
→ →
addr
string Required
(exactly 1)
The IP address and port number used for the connection to the remote node
→ →
addrlocal
string Optional
(0 or 1)
Our IP address and port number according to the remote node. May be incorrect due to error or lying. Many SPV nodes set this to 127.0.0.1:8333
→ →
services
string (hex) Required
(exactly 1)
The services advertised by the remote node in its version message
→ →
lastsend
number (int) Required
(exactly 1)
The Unix epoch time when we last successfully sent data to the TCP socket for this node
→ →
lastrecv
number (int) Required
(exactly 1)
The Unix epoch time when we last received data from this node
→ →
bytessent
number (int) Required
(exactly 1)
The total number of bytes we’ve sent to this node
→ →
bytesrecv
number (int) Required
(exactly 1)
The total number of bytes we’ve received from this node
→ →
conntime
number (int) Required
(exactly 1)
The Unix epoch time when we connected to this node
→ →
pingtime
number (real) Required
(exactly 1)
The number of seconds this node took to respond to our last P2P ping message
→ →
pingwait
number (real) Optional
(0 or 1)
The number of seconds we’ve been waiting for this node to respond to a P2P ping message. Only shown if there’s an outstanding ping message
→ →
version
number (int) Required
(exactly 1)
The protocol version number used by this node. See the protocol versions section for more information
→ →
subver
string Required
(exactly 1)
The user agent this node sends in its version message. This string will have been sanitized to prevent corrupting the JSON results. May be an empty string
→ →
inbound
bool Required
(exactly 1)
Set to true if this node connected to us; set to false if we connected to this node
→ →
startingheight
number (int) Required
(exactly 1)
The height of the remote node’s block chain when it connected to us as reported in its version message
→ →
banscore
number (int) Required
(exactly 1)
The ban score we’ve assigned the node based on any misbehavior it’s made. By default, Egdcoin Core disconnects when the ban score reaches 100
→ →
synced_headers
number (int) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The highest-height header we have in common with this node based the last P2P headers message it sent us. If a headers message has not been received, this will be set to -1
→ →
synced_blocks
number (int) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

The highest-height block we have in common with this node based on P2P inv messages this node sent us. If no block inv messages have been received from this node, this will be set to -1
→ →
syncnode
bool Required
(exactly 1)
Removed in Egdcoin Core 0.10.0

Whether we’re using this node as our syncnode during initial block download
→ →
inflight
array Required
(exactly 1)
Added in Egdcoin Core 0.10.0

An array of blocks which have been requested from this peer. May be empty
→ → →
Blocks
number (int) Optional
(0 or more)
The height of a block being requested from the remote peer
→ →
whitelisted
bool Required
(exactly 1)
Added in Egdcoin Core 0.10.0

Set to true if the remote peer has been whitelisted; otherwise, set to false. Whitelisted peers will not be banned if their ban score exceeds the maximum (100 by default). By default, peers connecting from localhost are whitelisted

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet getpeerinfo

结果(编辑过的内容显示只有一个入口, IP地址也改成了预留的RFC5737):

[
                    {
                    "id" : 9,
                    "addr" : "192.0.2.113:18333",
                    "addrlocal" : "192.0.2.51:18333",
                    "services" : "0000000000000002",
                    "lastsend" : 1419277992,
                    "lastrecv" : 1419277992,
                    "bytessent" : 4968,
                    "bytesrecv" : 105078,
                    "conntime" : 1419265985,
                    "pingtime" : 0.05617800,
                    "version" : 70001,
                    "subver" : "/Satoshi:0.8.6/",
                    "inbound" : false,
                    "startingheight" : 315280,
                    "banscore" : 0,
                    "synced_headers" : -1,
                    "synced_blocks" : -1,
                    "inflight" : [
                    ],
                    "whitelisted" : false
                    }
]

See also

  • GetAddedNodeInfo: returns information about the given added node, or all added nodes (except onetry nodes). Only nodes which have been manually added using the addnode RPC will have their information displayed.
  • GetNetTotals: returns information about network traffic, including bytes in, bytes out, and the current time.
  • GetNetworkInfo: returns information about the node’s connection to the network.
GetRawMemPool

getrawmempoolRPC返回到所有记忆池里的交易标记符作为一个JSON数组,或者交易池里每笔交易的详细信息作为一个JSON目标。

参数—期望的输出格式

Name Type Presence Description
Format bool Optional
(0 or 1)
Set to true to get verbose output describing each transaction in the memory pool; set to false (the default) to only get an array of TXIDs for transactions in the memory pool

结果(格式false)—一系列的TXIDs

Name Type Presence Description
result array Required
(exactly 1)
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool

string Optional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

结果(格式: true

Name Type Presence Description
result object Required
(exactly 1)
A object containing transactions currently in the memory pool. May be empty

TXID
string : object Optional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order
→ →
size
number (int) Required
(exactly 1)
The size of the serialized transaction in bytes
→ →
fee
number (Egdcoins) Required
(exactly 1)
The transaction fee paid by the transaction in decimal Egdcoins
→ →
time
number (int) Required
(exactly 1)
The time the transaction entered the memory pool,Unix epoch time format
→ →
height
number (int) Required
(exactly 1)
The block height when the transaction entered the memory pool
→ →
startingpriority
number (int) Required
(exactly 1)
The priority of the transaction when it first entered the memory pool
→ →
currentpriority
number (int) Required
(exactly 1)
The current priority of the transaction
→ →
depends
array Required
(exactly 1)
An array holding TXIDs of unconfirmed transactions this transaction depends upon. Those transactions must be part of a block before this transaction can be added to ablock, although all transactions may be included in the same block. The array may be empty
→ → →
Depends TXID
string Optional (0 or more) TheTXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex inRPC byte order

Examples from Egdcoin Core 0.10.0

The default (false):

Egdcoin-cli -testnet getrawmempool

Result:

[
                    "2b1f41d6f1837e164d6d6811d3d8dad2e66effbd1058cd9ed7bdbe1cab20ae03",
                    "2baa1f49ac9b951fa781c4c95814333a2f3eda71ed3d0245cd76c2829b3ce354"
]

详细输出 (true):

Egdcoin-cli -testnet getrawmempool true

Result:

{
                    "2baa1f49ac9b951fa781c4c95814333a2f3eda71ed3d0245cd76c2829b3ce354" : {
                    "size" : 191,
                    "fee" : 0.00020000,
                    "time" : 1398867772,
                    "height" : 227310,
                    "startingpriority" : 54545454.54545455,
                    "currentpriority" : 54545454.54545455,
                    "depends" : [
                    ]
                    }
}

See also

  • GetMemPoolInfo: returns information about the node’s current transaction memory pool.
  • GetTxOutSetInfo: returns statistics about theconfirmed unspent transactionoutput (UTXO) set. Note that this call may take some time and that
    it only counts outputs from confirmed transactions—it does not count outputs from the memory pool.
GetRawTransaction

getrawtransactionRPC 获得一个十六进制编码的序列化交易或者一个JSON目标描述的交易。根据默认, Egdcoin Core 只存储完全是UTXO和你自己的交易的数据,
所以RPC可能会历史交易存储失败,除非你在Egdcoin Core设置里面选择非默认形式。

参数#1—获得交易的识别码

Name Type Presence Description
TXID string (hex) Required
(exactly 1)
The TXID of the transaction to get, encoded as hex in RPC byte order

参数#2—是否获得序列化或解码的交易

Name Type Presence Description
Verbose number (int) Optional
(0 or 1)
Set to 0 (the default) to return the serialized transaction as hex. Set to 1 to return a decoded transaction

结果(如果交易未找到)—null

Name Type Presence Description
result null Required
(exactly 1)
If the transaction wasn’t found, the result will be JSON null. This can occur because the transaction doesn’t exist in the block chain or memory pool, or because it isn’t part of the transaction index. See the Egdcoin Core -help entry for -txindex

结果(如果详细=0)—序列化的交易

Name Type Presence Description
result string (hex) Required
(exactly 1)
If the transaction was found, this will be the serialized transaction encoded as hex

结果(如果详细=1)—解码的交易

Name Type Presence Description
result object Required
(exactly 1)
If the transaction was found, this will be an object describing it

txid
string (hex) Required
(exactly 1)
The transaction’s TXID encoded as hex in RPC byte order

version
number (int) Required
(exactly 1)
The transaction format version number

locktime
number (int) Required
(exactly 1)
The transaction’s locktime: either a Unix epoch date or block height; see the Locktime parsing rules

vin
array Required
(exactly 1)
An array of objects with each object being an input vector (vin) for this transaction. Input objects will have the same order within the array as they have in the transaction, so the firstinput listed will be input 0
→ →
Input
object Required
(1 or more)
An object describing one of this transaction’s inputs. May be a regular input or a coinbase
→ → →
txid
string Optional
(0 or 1)
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction
→ → →
vout
number (int) Optional
(0 or 1)
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of 0. Not present if this is acoinbase transaction
→ → →
scriptSig
object Optional
(0 or 1)
An object describing the signature script of thisinput. Not present if this is a coinbase transaction
→ → → →
asm
string Required
(exactly 1)
The signature script in decoded form with non-data-pushing op codes listed
→ → → →
hex
string (hex) Required
(exactly 1)
The signature script encoded as hex
→ → →
coinbase
string (hex) Optional
(0 or 1)
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction
→ → →
sequence
number (int) Required
(exactly 1)
The input sequence number

vout
array Required
(exactly 1)
An array of objects each describing an output vector (vout) for this transaction. Output objects will have the same order within the array as they have in the transaction, so the firstoutput listed will be output 0
→ →
Output
object Required
(1 or more)
An object describing one of this transaction’s outputs
→ → →
value
number (Egdcoins) Required
(exactly 1)
The number of Egdcoins paid to this output. May be 0
→ → →
n
number (int) Required
(exactly 1)
Theoutput index number of this output within this transaction
→ → →
scriptPubKey
object Required
(exactly 1)
An object describing the pubkey script
→ → → →
asm
string Required
(exactly 1)
Thepubkey script in decoded form with non-data-pushing op codes listed
→ → → →
hex
string (hex) Required
(exactly 1)
The pubkey script encoded as hex
→ → → →
reqSigs
number (int) Optional
(0 or 1)
The number of signatures required; this is always 1 for P2PK,P2PKH, and P2SH (including P2SH multisig because the redeem script is not available in the pubkey script). It may be greater than 1 for bare multisig. This value will not be returned for nulldata or nonstandard script types (see the type key below)
→ → → →
type
string Optional
(0 or 1)
The type of script. This will be one of the following:
pubkey for a P2PK script
pubkeyhash for a P2PKH script
scripthash for a P2SH script
multisig for a bare multisig script
nulldata for nulldata scripts
nonstandard for unknown scripts
→ → → →
addresses
string : array Optional
(0 or 1)
The P2PKH orP2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types
→ → → → →
Address
string Required
(1 or more)
A P2PKH or P2SH address

blockhash
string (hex) Optional
(0 or 1)
If the transaction has been included in a block on the local best block chain, this is the hash of thatblock encoded as hex in RPC byte order

confirmations
number (int) Required
(exactly 1)
If the transaction has been included in a block on the local best block chain, this is how manyconfirmations it has. Otherwise, this is 0

time
number (int) Optional
(0 or 1)
If the transaction has been included in a block on the local bestblock chain, this is the block header time of that block (may be in the future)

blocktime
number (int) Optional
(0 or 1)
This field is currently identical to the time field described above

Egdcoin Core 0.10.0的例子

一个序列化交易格式的交易:

Egdcoin-cli -testnet getrawtransaction \
  ef7c0cbf6ba5af68d2ea239bba709b26ff7b0b669839a63bb01c2cb8e8de481e

Result (wrapped):

0100000001268a9ad7bfb21d3c086f0ff28f73a064964aa069ebb69a9e437da8\
5c7e55c7d7000000006b483045022100ee69171016b7dd218491faf6e13f53d4\
0d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed28\
8d374397d30dff541b2dd45a4c3d0041acc0012103a7c1fd1fdec50e1cf3f0cc\
8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326ffffffff0350ac60020000\
00001976a91456847befbd2360df0e35b4e3b77bae48585ae06888ac80969800\
000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac002d\
3101000000001976a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac\
00000000

通过JSON获得相同的交易:

Egdcoin-cli -testnet getrawtransaction \
ef7c0cbf6ba5af68d2ea239bba709b26ff7b0b669839a63bb01c2cb8e8de481e \
1

Result:

{
                    "hex" : "0100000001268a9ad7bfb21d3c086f0ff28f73a064964aa069ebb69a9e437da85c7e55c7d7000000006b483045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd45a4c3d0041acc0012103a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326ffffffff0350ac6002000000001976a91456847befbd2360df0e35b4e3b77bae48585ae06888ac80969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac002d3101000000001976a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac00000000",
                    "txid" : "ef7c0cbf6ba5af68d2ea239bba709b26ff7b0b669839a63bb01c2cb8e8de481e",
                    "version" : 1,
                    "locktime" : 0,
                    "vin" : [
                    {
                    "txid" : "d7c7557e5ca87d439e9ab6eb69a04a9664a0738ff20f6f083c1db2bfd79a8a26",
                    "vout" : 0,
                    "scriptSig" : {
                    "asm" : "3045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd45a4c3d0041acc001 03a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326",
                    "hex" : "483045022100ee69171016b7dd218491faf6e13f53d40d64f4b40123a2de52560feb95de63b902206f23a0919471eaa1e45a0982ed288d374397d30dff541b2dd45a4c3d0041acc0012103a7c1fd1fdec50e1cf3f0cc8cb4378cd8e9a2cee8ca9b3118f3db16cbbcf8f326"
                    },
                    "sequence" : 4294967295
                    }
                    ],
                    "vout" : [
                    {
                    "value" : 0.39890000,
                    "n" : 0,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 56847befbd2360df0e35b4e3b77bae48585ae068 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a91456847befbd2360df0e35b4e3b77bae48585ae06888ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "moQR7i8XM4rSGoNwEsw3h4YEuduuP6mxw7"
                    ]
                    }
                    },
                    {
                    "value" : 0.10000000,
                    "n" : 1,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 2b14950b8d31620c6cc923c5408a701b1ec0a020 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN"
                    ]
                    }
                    },
                    {
                    "value" : 0.20000000,
                    "n" : 2,
                    "scriptPubKey" : {
                    "asm" : "OP_DUP OP_HASH160 0dfc8bafc8419853b34d5e072ad37d1a5159f584 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex" : "76a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac",
                    "reqSigs" : 1,
                    "type" : "pubkeyhash",
                    "addresses" : [
                    "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe"
                    ]
                    }
                    }
                    ],
                    "blockhash" : "00000000103e0091b7d27e5dc744a305108f0c752be249893c749e19c1c82317",
                    "confirmations" : 88192,
                    "time" : 1398734825,
                    "blocktime" : 1398734825
}

See also

  • wallet transaction.
GetReceivedByAccount

需要钱包的支持

The getreceivedbyaccountRPC 返回到一个指定账户的地址的总量,其交易必须带有一定数量的确认。创世交易不被计算在内。

参数#1—账户名称

Name Type Presence Description
Account string Required
(exactly 1)
The name of the account containing the addresses to get. For the default account, use an empty string (“”)

参数#2—最小数量的确认

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number ofconfirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1

结果—收到的Egdcoins的数量

Name Type Presence Description
result number (Egdcoins) Required
(exactly 1)
The number of Egdcoins received by the account. May be 0

Egdcoin Core 0.10.0的例子

得到“doc test”账户的Egdcoins需要6个或更多的确认:

Egdcoin-cli -testnet getreceivedbyaccount "doc test" 6

Result:

0.30000000

See also

  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations.
  • GetAddressesByAccount: returns a list of every address assigned to a particular account.
  • ListAccounts: lists accounts and their balances.
GetReceivedByAddress

需要钱包的支持

getreceivedbyaddress RPC返回到一个指定的地址的总量,其交易必须带有一定数量的确认。创世交易不被计算在内。

参数#1—地址

Name Type Presence Description
Address string Required
(exactly 1)
The address whose transactions should be tallied

参数#2—最小数量的确认

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to otherwallets. Use 0 to count unconfirmed transactions. Default is 1

结果—收到的Egdcoins的数量

Name Type Presence Description
result number (Egdcoins) Required
(exactly 1)
The number of Egdcoins received by the address, excludingcoinbase transactions. May be 0

Egdcoin Core 0.10.0的例子

Get the 从一个指定地址处得到Egdcoins,只算带有6个或更多确认的交易:

Egdcoin-cli -testnet getreceivedbyaddress mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN 6

Result:

0.30000000

See also

  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of
    confirmations. It does not countcoinbase transactions.
  • GetAddressesByAccount: returns a list of everyaddress assigned to a particular account.
  • ListAccounts: lists accounts and their balances.
GetTransaction

需要钱包的支持

gettransaction RPC 获得钱包内的交易的详细信息。

参数#1—一个交易识别符 (TXID)

Name Type Presence Description
TXID string (hex) Required
(exactly 1)
The TXID of the transaction to get details about. The TXID must be encoded as hex in RPC byte order

参数#2—在细节和计算方面是否包括只看地址

Name Type Presence Description
Include Watch-Only bool Optional
(0 or 1)
Added inEgdcoin Core 0.10.0

If set to true, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to false (the default), treat watch-only addresses as if they didn’t belong to this wallet

结果—一个交易的描述

Name Type Presence Description
result object Required
(exactly 1)
An object describing how the transaction affects the wallet

amount
number (Egdcoins) Required
(exactly 1)
A positive number of Egdcoins if this transaction increased the total wallet balance; a negative number of Egdcoins if this transaction decreased the total wallet balance, or 0 if the transaction had no net effect on wallet balance

fee
number (Egdcoins) Optional
(0 or 1)
If an outgoing transaction, this is the fee paid by the transaction reported as negative Egdcoins

confirmations
number (int) Required
(exactly 1)
The number ofconfirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted

generated
bool Optional
(0 or 1)
Set to true if the transaction is a coinbase. Not returned for regular transactions

blockhash
string (hex) Optional
(0 or 1)
Only returned for confirmed transactions. The hash of the block on the local best block chain which includes this transaction, encoded as hex inRPC byte order

blockindex
number (int) Optional
(0 or 1)
Only returned forconfirmed transactions. The block height of the block on the local best block chain which includes this transaction

blocktime
number (int) Optional
(0 or 1)
Only returned for confirmed transactions. The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction

txid
string (hex) Required
(exactly 1)
The TXID of the transaction, encoded as hex inRPC byte order

walletconflicts
array Required
(exactly 1)
An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty
→ →
TXID
string (hex) Optional
(0 or more)
The TXID of a conflicting transaction, encoded as hex in RPC byte order

time
number (int) Required
(exactly 1)
A Unix epoch time when the transaction was added to the wallet

timerecived
number (int) Required
(exactly 1)
AUnix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction

comment
string Optional
(0 or 1)
For transaction originating with thiswallet, a locally-stored comment added to the transaction. Only returned if a comment was added

to
string Optional
(0 or 1)
For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added

details
array Required
(exactly 1)
An array containing one object for each input or output in the transaction which affected the wallet
→ →
involvesWatchonly
bool Optional
(0 or 1)
Added in Egdcoin Core 0.10.0

Set to true if the input oroutput involves a watch-only address. Otherwise not returned
→ →
account
string Required
(exactly 1)
The account which the payment was credited to or debited from. May be an empty string (“”) for the default account
→ →
address
string (base58) Optional
(0 or 1)
If an output, the address paid (may be someone else’saddress not belonging to this wallet). If an input, theaddress paid in the previous output. May be empty if theaddress is unknown, such as when paying to a non-standardpubkey script
→ →
category
string Required
(exactly 1)
Set to one of the following values:
send if sending payment
receive if this wallet received payment in a regular transaction
generate if a matured and spendable coinbase
immature if a coinbase that is not spendable yet
orphan if a coinbase from a block that’s not in the local best block chain
→ →
amount
number (Egdcoins) Required
(exactly 1)
A negative Egdcoin amount if sending payment; a positive Egdcoin amount if receiving payment (including coinbases)
→ →
vout
number (int) Required
(exactly 1)
Added in Egdcoin Core 0.10.0

For anoutput, the output index (vout) for this output in this transaction. For an input, the output index for theoutput being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index
→ →
fee
number (Egdcoins)=(Egdcoins) Optional
(0 or 1)
If sending payment, the fee paid as a negative Egdcoins value. May be 0.
Not returned if receiving payment

hex
string (hex) Required
(exactly 1)
The transaction in serialized transaction format

Example from Egdcoin Core 0.10.0

Egdcoin-cli -testnet gettransaction \
  5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589

Result:

{
                    "amount" : 0.00000000,
                    "fee" : 0.00000000,
                    "confirmations" : 106670,
                    "blockhash" : "000000008b630b3aae99b6fe215548168bed92167c47a2f7ad4df41e571bcb51",
                    "blockindex" : 1,
                    "blocktime" : 1396321351,
                    "txid" : "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
                    "walletconflicts" : [
                    ],
                    "time" : 1396321351,
                    "timereceived" : 1418924711,
                    "details" : [
                    {
                    "account" : "",
                    "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
                    "category" : "send",
                    "amount" : -0.10000000,
                    "vout" : 0,
                    "fee" : 0.00000000
                    },
                    {
                    "account" : "doc test",
                    "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
                    "category" : "receive",
                    "amount" : 0.10000000,
                    "vout" : 0
                    }
                    ],
                    "hex" : "0100000001cde58f2e37d000eabbb60d9cf0b79ddf67cede6dba58732539983fa341dd5e6c010000006a47304402201feaf12908260f666ab369bb8753cdc12f78d0c8bdfdef997da17acff502d321022049ba0b80945a7192e631c03bafd5c6dc3c7cb35ac5c1c0ffb9e22fec86dd311c01210321eeeb46fd878ce8e62d5e0f408a0eab41d7c3a7872dc836ce360439536e423dffffffff0180969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac00000000"
}

See also

  • GetRawTransaction: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Egdcoin Core only stores complete transaction data forUTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default txindex=1 in your Egdcoin Core startup settings.
GetWork

getwork RPC被移到了Egdcoin Core 0.10.0.. 如果你有一个旧版本的Egdcoin Core, 使用 help RPC 来获取帮助。例如: help getwork

See also

  • GetBlockTemplate: gets ablock template or proposal for use with mining software.
  • SubmitBlock: accepts a block, verifies it is a valid addition to the block chain, and broadcasts it to the network. Extra parameters are ignored by Egdcoin Core but may be used by mining pools or other programs.
  • SetGenerate: enables or disables hashing to attempt to find the next block.
Help

helphelp RPC列出了所有可用的公共RPC 指令, 或为特定的RPC寻求帮助. 如果钱包支持瘫痪的话,不可用的指令将不会列出,如钱包RPCs。

参数—需要帮助的RPC 名称

Name Type Presence Description
RPC string Optional
(0 or 1)
The name of theRPC to get help for. If omitted, Egdcoin Core 0.9x will display an alphabetical list of commands; Egdcoin Core 0.10.0 will display a categorized list of commands

结果--RPCs列表或 特定RPC的帮助详情

Name Type Presence Description
result string Required
(exactly 1)
The help text for the specified RPC or the list of commands. The Egdcoin-cli command will parse this text and format it as human-readable text

请看Egdcoin Core 0.10.0中的示例

有关help RPC寻求帮助的指令:

Egdcoin-cli -testnet help help

Result:

help ( "command" )
List all commands, or get help for a specified command.
Arguments:
1. "command"     (string, optional) The command to get help on
Result:
"text"     (string) The help text

See also

  • TheRPC Quick Reference
ImportAddress

需要钱包支持. 加入Egdcoin Core 0.10.0.

importaddressRPC将不带关联密匙的地址或公钥脚本加入到钱包, 允许你在不用消费任何输出金额就可以浏览影响该地址或公钥脚本的交易。

参数1—要查看的地址或公钥脚本

Name Type Presence Description
Address or Script string (base58 or hex) Required
(exactly 1)
Either a P2PKH or P2SH address encoded in base58check, or a pubkey script encoded as hex

参数2—放入地址或公钥脚本的账户

Name Type Presence Description
Account string Optional
(0 or 1)
An account name into which the address should be placed. Default is the default account, an empty string(“”)

参数3—是否重新扫描区块链

Name Type Presence Description
Rescan bool Optional
(0 or 1)
Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address or pubkey script). Set to false to not rescan the block database (rescanning can be performed at any time by restarting Egdcoin Core with the -rescan command-line argument). Rescanning may take several minutes. Notes: if the address orpubkey script is already in the wallet, the block database will not be rescanned even if this parameter is set

结果—null操作成功

Name Type Presence Description
result null Required
(exactly 1)
If the address or pubkey script is added to the wallet (or is already part of the wallet), JSON null will be returned

请看Egdcoin Core 0.10.0中的一个示例

添加地址,对当地所有匹配的交易块数据库进行重新扫描。

Egdcoin-cli -testnet importaddress \
  muhtvdmsnbQEPFuEmxcChX58fGvXaaUoVt "watch-only test" true

结果:

(没有输出; 成功.)

说明地址已添加

Egdcoin-cli -testnet getaccount muhtvdmsnbQEPFuEmxcChX58fGvXaaUoVt

Result:

watch-only test

See also

  • ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by thedumpprivkey RPC.
  • ListReceivedByAddress: lists the total number of Egdcoins received by each address.
ImportPrivKey

需要钱包支持,钱包必须是加密的。

importprivkeyRPC会给你的钱包增加一个私匙. 该密匙的格式应该是与钱包的重要格式一致,这个重要的格式是由dumpprivkey RPC创建的.

参数1—要导入的私匙

Name Type Presence Description
string (base58) Required
(exactly 1)
The private key to import into thewallet encoded in base58check using wallet import format (WIF)

参数2—秘钥应放入的账户

Name Type Presence Description
Account string Optional
(0 or 1)
The name of an account to which transactions involving the key should be assigned. The default is the default account, an empty string (“”)

参数3—是否重新扫描区块链

Name Type Presence Description
Rescan bool Optional
(0 or 1)
Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-addedaddress for this private key). Set to false to not rescan the block database (rescanning can be performed at any time by restarting Egdcoin Core with the -rescan command-line argument). Rescanning may take several minutes. Notes: if the address for this key is already in the wallet, the block database will not be rescanned even if this parameter is set

结果—null操作成功

Name Type Presence Description
result null Required
(exactly 1)
If the private key is added to the wallet (or is already part of the wallet), JSON null will be returned

请看Egdcoin Core 0.10.0中的一个示例

将密匙导入地址: mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe, 注上说明并扫描全部区块链:

Egdcoin-cli -testnet importprivkey \
              cU8Q2jGeX3GNKNa5etiC8mgEgFSeVUTRQfWE2ZCzszyqYNK4Mepy \
                    "test label" \
                    true

(成功: 无可显示结果。)

See also

  • DumpPrivKey: returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.)
  • ImportAddress: adds an address or pubkey script to the wallet without the associated private key, allowing you to watch for
    transactions affecting that address or pubkey script without being able to spend any of its outputs.
  • ImportWallet: imports private keys from a file in wallet dump file format (see the dumpwallet RPC). These keys
    will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting
    the newly-added keys, which may take several minutes.
KeyPoolRefill

需要钱包支持。需要解密的钱包或未加密的钱包.

keypoolrefill RPC完成未动用的先前生成的密匙缓存(密匙池)

参数1—新密匙池的规模

Name Type Presence Description
Key Pool Size number (int) Optional
(0 or 1)
The new size of the keypool; if the number of keys in the keypool is less than this number, new keys will be generated. Default is 100. The value 0 also equals the default. The value specified is for this call only—the default keypool size is not changed

结果—null操作成功

Name Type Presence Description
result null Required
(exactly 1)
If the keypool is successfully filled, JSON null will be returned

请看Egdcoin Core 0.10.0中的一个示例

生成另一个密匙,而不是默认值

Egdcoin-cli -testnet keypoolrefill 101

(无可显示结果: 成功)

See also

  • GetNewAddress: returns a new Egdcoin address for receiving payments. If an account is specified, payments received with the address will be
    credited to that account.
  • GetAccountAddress: returns the current Egdcoin address for receiving payments to this account. If the account doesn’t exist, it creates both
    the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same
    account will return a different address.
  • GetWalletInfo: provides information about the wallet.
ListAccounts

需要钱包支持.

listaccountsRPC 列出了账户和账户余额.

参数1—单笔交易必须有的最少确认次数

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1

参数2—是否包括结果中的只读地址

Name Type Presence Description
Include Watch-Only bool Optional
(0 or 1)
Added in Egdcoin Core 0.10.0

If set to true, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to false (the default), treat watch-only addresses as if they didn’t belong to this wallet

结果—账户和余额一览表

Name Type Presence Description
result object Required
(exactly 1)
A JSON array containing key/value pairs with account names and values. Must include, at the very least, the default account (“”)

Account : Balance
string : number (Egdcoins) Required
(1 or more)
The name of an account as a string paired with the balance of the account as a number of Egdcoins. The number of Egdcoins may be negative if the account has spent more Egdcoins than it received. Accounts with zero balances and zero transactions will be displayed

请看Egdcoin Core 0.10.0中的示例

显示账户余额,确认一次并显示只读地址

Egdcoin-cli -testnet listaccounts 1 true

Result:

{
                    "" : -2.73928803,
                    "Refund from example.com" : 0.00000000,
                    "doc test" : -498.45900000,
                    "someone else's address" : 0.00000000,
                    "someone else's address2" : 0.00050000,
                    "test" : 499.97975293,
                    "test account" : 0.00000000,
                    "test label" : 0.48961280,
                    "test1" : 1.99900000
}

See also

  • GetAccount: returns the name of the account associated with the given address.
  • GetAddressesByAccount: returns a list of every address assigned to a particular account.
  • Egdcoins received by each account.
ListAddressGroupings

需要钱包支持.

可能拥有属于自己所有权的地址通过普通的输入使用公布于众,可以是在同一笔交易或者被用于之前交易的改变。

参数: 无

结果—说明分组的一串阵列

Name Type Presence Description
result array Required
(exactly 1)
An array containing the groupings. May be empty

Groupings
array Optional
(0 or more)
An array containing arrays of addresses which can be associated with each other
→ →
Address Details
array Required
(1 or more)
An array containing information about a particular address
→ → →
Address
string ( Required
(exactly 1)
The address inbase58check format
→ → →
Balance
number (Egdcoins) Required
(exactly 1)
The current spendable balance of the address, not counting unconfirmed transactions
→ → →
Account
string Optional
(0 or 1)
The account the address belongs to, if any. This field will not be returned for change addresses. The default account is an empty string (“”)

请看Egdcoin Core 0.10.0中的示例

Egdcoin-cli -testnet listaddressgroupings

结果 (只编辑前两个结果):

[
                    [
                    [
                    "mgKgzJ7HR64CrB3zm1B4FUUCLtaSqUKfDb",
                    0.00000000
                    ],
                    [
                    "mnUbTmdAFD5EAg3348Ejmonub7JcWtrMck",
                    0.00000000,
                    "test1"
                    ]
                    ]
]

See also

  • address assigned to a particular account.
  • GetTransaction: gets detailed information about an in-wallet transaction.
ListTransactions

需要钱包支持.

listtransactionsRPC会传回影响钱包的最近交易记录

参数1—接收交易的账户名

Name Type Presence Description
Account string Optional
(0 or 1)
The name of an account to get transactinos from. Use an empty string (“”) to get transactions for the default account. Default is * to get transactions for all accounts

参数2—获取的交易数

Name Type Presence Description
Count number (int) Optional
(0 or 1)
The number of the most recent transactions to list. Default is 10

参数3—跳过的交易数

Name Type Presence Description
Skip number (int) Optional
(0 or 1)
The number of the most recent transactions which should not be returned. Allows for pagination of results. Default is 0

参数4—是否包括详细的只读地址以及计算

Name Type Presence Description
Include Watch-Only bool Optional
(0 or 1)
Added inEgdcoin Core 0.10.0

If set to true, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to false (the default), treat watch-only addresses as if they didn’t belong to this wallet

结果—支付详情

Name Type Presence Description
result array Required
(exactly 1)
An array containing objects, with each object describing a payment or internal accounting entry (not a transaction). More than one object in this array may come from a single transaction. Array may be empty

Payment
object Optional
(0 or more)
A payment or internal accounting entry
→ →
account
string Required
(exactly 1)
The account which the payment was credited to or debited from. May be an empty string (“”) for the default account
→ →
address
string (base58) Optional
(0 or 1)
The address paid in this payment, which may be someone else’s address not belonging to this wallet. May be empty if the address is unknown, such as when paying to a non-standard pubkey script or if this is in the move category
→ →
category
string Required
(exactly 1)
Set to one of the following values:
send if sending payment
receive if this wallet received payment in a regular transaction
generate if a matured and spendable coinbase
immature if a coinbase that is not spendable yet
orphan if a coinbase from a block that’s not in the local best block chain
move if an off-block-chain move made with the move RPC
→ →
amount
number (Egdcoins) Required
(exactly 1)
A negative Egdcoin amount if sending payment; a positive Egdcoin amount if receiving payment (including coinbases)
→ →
vout
number (int) Optional
(0 or 1)
Added in Egdcoin Core 0.10.0

For an output, the output index (vout) for this output in this transaction. For an input, the output index for theoutput being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index. Not returned for move category payments
→ →
fee
number (Egdcoins) Optional
(0 or 1)
If sending payment, the fee paid as a negative Egdcoins value. May be 0. Not returned if receiving payment or for move category payments
→ →
confirmations
number (int) Optional
(0 or 1)
The number of confirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted. Not returned for move category payments
→ →
generated
bool Optional
(0 or 1)
Set to true if the transaction is a coinbase. Not returned for regular transactions or move category payments
→ →
blockhash
string (hex) Optional
(0 or 1)
Only returned for confirmed transactions. The hash of the block on the local best block chain which includes this transaction, encoded as hex inRPC byte order
→ →
blockindex
number (int) Optional
(0 or 1)
Only returned for confirmed transactions. The block height of the block on the local best block chain which includes this transaction
→ →
blocktime
number (int) Optional
(0 or 1)
Only returned for confirmed transactions. The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction
→ →
txid
string (hex) Optional
(0 or 1)
The TXID of the transaction, encoded as hex inRPC byte order. Not returned for move category payments
→ →
walletconflicts
array Optional
(0 or 1)
An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty. Not returned for move category payments
→ → →
TXID
string (hex) Optional
(0 or more)
The TXID of a conflicting transaction, encoded as hex in RPC byte order
→ →
time
number (int) Required
(exactly 1)
A Unix epoch time when the transaction was added to the wallet
→ →
timerecived
number (int) Optional
(0 or 1)
A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction. Not returned for move category payments
→ →
comment
string Optional
(0 or 1)
For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned in regular payments if a comment was added. Always returned in move category payments. May be an empty string
→ →
to
string Optional
(0 or 1)
For transaction originating with thiswallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added. Never returned by move category payments. May be an empty string
→ →
otheraccount
string Optional
(0 or 1)
Only returned by move category payments. This is the account the Egdcoins were moved from or moved to, as indicated by a negative or positive amount field in this payment

请看Egdcoin Core 0.10.0中的示例

列出账户“someone else’s address2”中的最近交易记录,包括只读地址。

Egdcoin-cli -testnet listtransactions \
                    "someone else's address2" 1 0 true

Result:

[
                    {
                    "involvesWatchonly" : true,
                    "account" : "someone else's address2",
                    "address" : "n3GNqMveyvaPvUbH469vDRadqpJMPc84JA",
                    "category" : "receive",
                    "amount" : 0.00050000,
                    "vout" : 0,
                    "confirmations" : 34714,
                    "blockhash" : "00000000bd0ed80435fc9fe3269da69bb0730ebb454d0a29128a870ea1a37929",
                    "blockindex" : 11,
                    "blocktime" : 1411051649,
                    "txid" : "99845fd840ad2cc4d6f93fafb8b072d188821f55d9298772415175c456f3077d",
                    "walletconflicts" : [
                    ],
                    "time" : 1418695703,
                    "timereceived" : 1418925580
                    }
]

See also

  • GetTransaction: gets detailed information about an in-wallet transaction.
  • ListSinceBlock: gets all transactions affecting the wallet which have occurred since a particular block, plus the header hash of a block at
    a particular depth.
ListUnspent

需要钱包支持

listunspentRPC会传回一些属于该钱包的未用过的交易输出记录。 备注: 像 Egdcoin Core 0.10.0,一样,影响只读地址的输出记录将会传回; 请在下方结果
中查看可支付的域。

参数1—输出必须具备的最少确认次数

Name Type Presence Description
Minimum Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations the transaction containing an output must have in order to be returned. Use 0 to return outputs from unconfirmed transactions. Default is 1

参数2—输出必须具备的最多确认次数

Name Type Presence Description
MaximumConfirmations number (int) Optional
(0 or 1)
The maximum number of confirmations the transaction containing an output may have in order to be returned. Default is 9999999 (~10 million)

参数3—输出必须支付的接收地址

Name Type Presence Description
array Optional
(0 or 1)
If present, only outputs which pay anaddress in this array will be returned

Address
string (base58) Required
(1 or more)
A P2PKH orP2SH address

结果—仍有效的输出列表

Name Type Presence Description
result array Required
(exactly 1)
An array of objects each describing an unspent output. May be empty

Unspent Output
object Optional
(0 or more)
An object describing a particular unspent output belonging to this wallet
→ →
txid
string (hex) Required
(exactly 1)
The TXID of the transaction containing the output, encoded as hex in RPC byte order
→ →
vout
number (int) Required
(exactly 1)
The output index number (vout) of the output within its containing transaction
→ →
address
string (base58) Optional
(0 or 1)
The P2PKH or P2SH address the output paid. Only returned for P2PKH or P2SH output scripts
→ →
account
string Optional
(0 or 1)
If the address returned belongs to an account, this is the account. Otherwise not returned
→ →
scriptPubKey
string (hex) Required
(exactly 1)
The output script paid, encoded as hex
→ →
redeemScript
string (hex) Optional
(0 or 1)
If the output is a P2SH whose script belongs to this wallet, this is the redeem script
→ →
amount
number (int) Required
(exactly 1)
The amount paid to the output in Egdcoins
→ →
confirmations
number (int) Required
(exactly 1)
The number of confirmations received for the transaction containing this output
→ →
spendable
bool Required
(exactly 1)
Added in Egdcoin Core 0.10.0

Set to true if the private key or keys needed to spend this output are part of thewallet. Set to false if not (such as for watch-only addresses)

请看Egdcoin Core 0.10.0中的一个示例

对于一个特定的地址需要将输出确认至少六次

Egdcoin-cli -testnet listunspent 6 99999999 '''
  [
    "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe"
  ]
'''

Result:

[
                    {
                    "txid" : "d54994ece1d11b19785c7248868696250ab195605b469632b7bd68130e880c9a",
                    "vout" : 1,
                    "address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe",
                    "account" : "test label",
                    "scriptPubKey" : "76a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac",
                    "amount" : 0.00010000,
                    "confirmations" : 6210,
                    "spendable" : true
                    }
]

See also

  • ListTransactions: returns the most recent transactions that affect the wallet.
  • LockUnspent: temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin
    selection when spending Egdcoins. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is
    always cleared when a node stops or fails.
Move

需要钱包支持

moveRPC使用非区块链交易将一定的金额从你钱包的一个账户转移到另一个账户。

警告: 允许将更多的资金转移到多个账户而不是只在一个账户,会使支付账户呈现负余额,而使得接收账户中的余额超出钱包中Egdcoins
的数量(或超出现存的Egdcoins 数量).

参数1—支付账户

Name Type Presence Description
From Account string Required
(exactly 1)
The name of the account to move the funds from

参数2—接收账户

Name Type Presence Description
To Account string Required
(exactly 1)
The name of the account to move the funds to

参数3—转账金额

Name Type Presence Description
Amount number (Egdcoins) Required
(exactly 1)
The amount of Egdcoins to move

参数4—未使用过的参数

Name Type Presence Description
Unused number (int) Optional
(0 or 1)
This parameter is no longer used. If parameter #5 needs to be specified, this can be any integer

参数5—说明

Name Type Presence Description
Comment string Optional
(0 or 1)
A comment to assign to this move payment

结果—true操作成功

Name Type Presence Description
result bool Required
(exactly 1)
Set to true if the move was successful

请看Egdcoin Core 0.10.0中的示例

从“doc test”中转出0.1 Egdcoins 到test1”, 并为该笔交易注明“Example move”:

Egdcoin-cli -testnet move "doc test" "test1" 0.1 0 "Example move"

Result:

true

See also

  • ListAccounts: lists accounts and their balances.
  • SendFrom: spends an amount from a local account to a Egdcoin address.
  • SendToAddress: spends an amount to a given address.
Ping

ping RPC给所有关联的节点发送一个P2P ping 信息以测试ping时间. 测试结果将由getpeerinfo RPC提供, pingtime和 pingwait领域为十秒。

P2P ping 信息将会与其他所有的命令等候处理 , 所以它会检测处理待办,而不只是网络ping.

参数: 无

结果—null

Name Type Presence Description
result null Required Always JSON null

请看Egdcoin Core 0.10.0中的示例

Egdcoin-cli -testnet ping

(成功: 无打印结果.)

使用getpeerinfo RPC得出结果:

Egdcoin-cli -testnet getpeerinfo | grep ping

Results:

        "pingtime" : 0.11790800,
                    "pingtime" : 0.22673400,
                    "pingtime" : 0.16451900,
                    "pingtime" : 0.12465200,
                    "pingtime" : 0.13267900,
                    "pingtime" : 0.23983300,
                    "pingtime" : 0.16764700,
                    "pingtime" : 0.11337300,

See also

  • GetPeerInfo: returns data about each connected network node.
  • P2P Ping Message
SendFrom

需要钱包支持。 需要解锁的钱包或未加密的钱包。

sendfromRPC从本地账户向Egdcoin地址转一定的金额。

参数1—从账户

Name Type Presence Description
From Account string Required
(exactly 1)
The name of the account from which the Egdcoins should be spent. Use an empty string (“”) for the default account

参数2—发送到的地址

Name Type Presence Description
To Address string Required
(exactly 1)
A P2PKH or P2SH address to which the Egdcoins should be sent

参数3—要消费的金额

Name Type Presence Description
Amount number (Egdcoins) Required
(exactly 1)
The amount to spend in Egdcoins. Egdcoin Core will ensure the account has sufficient Egdcoins to pay this amount (but the transaction fee paid is not included in the calculation, so an account can spend a total of its balance plus the transaction fee)

参数4—极小确认

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an incoming transaction must have for its outputs to be credited to this account’s balance. Outgoing transactions are always counted, as are move transactions made with the move RPC. If an account doesn’t have a balance high enough to pay for this transaction, the payment will be rejected. Use 0 to spend unconfirmed incoming payments. Default is 1

警告:如果账户1收到未确认的付款并将其转账至账户2,那么即使参数被设置为1或更高,账户2也可以消费egdcoins。

参数5—说明

Name Type Presence Description
Comment string Optional
(0 or 1)
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

参数6—关于收款人的说明

Name Type Presence Description
Comment To string Optional
(0 or 1)
A locally-stored (not broadcast) comment assigned to this transaction. Meant to be used for describing who the payment was sent to. Default is no comment

结果—已发送交易的TXID

Name Type Presence Description
result string Required
(exactly 1)
The TXID of the sent transaction, encoded as hex in RPC byte order

请看Egdcoin Core 0.10.0中的示例

仅使用UTXOs 从测试账户向下方指明的地址打入0.1 Egdcoins,至少确认六次, 并说明该交易为“示例消费”并为消费人标记Example.com

Egdcoin-cli -testnet sendfrom "test" \
            mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe \
            0.1 \
            6 \
                    "Example spend" \
                    "Example.com"

Result:

f14ee5368c339644d3037d929bbe1f1544a532f8826c7b7288cb994b0b0ff5d8

See also

  • SendToAddress: spends an amount to a given address.
  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.
SendMany

需要钱包支持。需要解锁的钱包或未加密钱包

sendmany RPC 创建并播发交易,该交易会将输入信息发送到多重地址。

参数1—来自账户

Name Type Presence Description
From Account string Required
(exactly 1)
The name of the account from which the Egdcoins should be spent. Use an empty string (“”) for the default account. Egdcoin Core will ensure the account has sufficient Egdcoins to pay the total amount in the outputs field described below (but the transaction fee paid is not included in the calculation, so an account can spend a total of its balance plus the transaction fee)

参数2—要付款的地址和金额

Name Type Presence Description
Outputs object Required
(exactly 1)
An object containing key/value pairs corresponding to the addresses and amounts to pay

Address/Amount
string (base58) : number (Egdcoins) Required
(1 or more)
A key/value pair with a base58check-encoded string containing theP2PKH orP2SH address to pay as the key, and an amount of Egdcoins to pay as the value

参数3—极小确认

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an incoming transaction must have for its outputs to be credited to this account’s balance. Outgoing transactions are always counted, as are move transactions made with the move RPC. If an account doesn’t have a balance high enough to pay for this transaction, the payment will be rejected. Use 0 to spend unconfirmed incoming payments. Default is 1

警告: 如果账户1收到未确认的付款并将其转账至账户2,那么即使参数被设置为1或更高,账户2也可以消费egdcoins。

参数4—说明

Name Type Presence Description
Comment string Optional
(0 or 1)
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

结果—已发送交易的TXID

Name Type Presence Description
result string Required
(exactly 1)
The TXID of the sent transaction, encoded as hex in RPC byte order

请看Egdcoin Core 0.10.0中的实例

从账户测试1向第一个地址发送0.1Egdcoins,向第二个地址发送0.2 Egdcoins ,并加上说明“示例交易”.

Egdcoin-cli -testnet sendmany \
                    "test1" \
                    '''
    {
      "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN": 0.1,
      "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe": 0.2
    } ''' \
  6       \
                    "Example Transaction"

Result:

ec259ab74ddff199e61caa67a26e29b13b5688dc60f509ce0df4d044e8f4d63d

See also

  • SendFrom: spends an amount from a local account to a Egdcoin address.
  • SendToAddress: spends an amount to a given address.
  • Move: moves a specified amount from one account in your wallet to another using an off-block-chain transaction.
SendRawTransaction

sendrawtransactionRPC验证交易并播发至对等网。

参数1—播发序列化交易

Name Type Presence Description
Transaction string (hex) Required
(exactly 1)
The serialized transaction to broadcast encoded as hex

参数2–是否允许高额费用

Name Type Presence Description
Allow High Fees bool Optional
(0 or 1)
Set to true to allow the transaction to pay a high transaction fee. Set to false (the default) to prevent Egdcoin Core from broadcasting the transaction if it includes a high fee. Transaction fees are the sum of the inputs minus the sum of the outputs, so this high fees check helps ensures user including achange address to return most of the difference back to themselves

结果—TXID 或错误信息

Name Type Presence Description
result null/string (hex) Required
(exactly 1)
If the transaction was accepted by the node for broadcast, this will be the TXID of the transaction encoded as hex in RPC byte order. If the transaction was rejected by the node, this will set to null, the JSON-RPC error field will be set to a code, and the JSON-RPC message field may contain an informative error message

请看Egdcoin Core 0.10.0中的事例

播发已签署的交易

Egdcoin-cli -testnet sendrawtransaction 01000000011da9283b4ddf8d\
89eb996988b89ead56cecdc44041ab38bf787f1206cd90b51e000000006a4730\
4402200ebea9f630f3ee35fa467ffc234592c79538ecd6eb1c9199eb23c4a16a\
0485a20220172ecaf6975902584987d295b8dddf8f46ec32ca19122510e22405\
ba52d1f13201210256d16d76a49e6c8e2edc1c265d600ec1a64a45153d45c29a\
2fd0228c24c3a524ffffffff01405dc600000000001976a9140dfc8bafc84198\
53b34d5e072ad37d1a5159f58488ac00000000

Result:

f5a5ce5988cc72b9b90e8d1d6c910cda53c88d2175177357cc2f2cf0899fbaad

See also

  • CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with aP2PKH or P2SH address.
    The transaction is not stored in the wallet or transmitted to the network.
  • DecodeRawTransaction: decodes a serialized transaction hex string into a JSON object describing the transaction.
  • SignRawTransaction: signs a transaction in the serialized transaction format using private keys stored in the wallet or provided in the call.
SendToAddress

需要钱包支持. 需要解密的钱包或未加密的钱包

sendtoaddressRPC往指定的地址注入金额。

参数1—指定的地址

Name Type Presence Description
To Address string Required
(exactly 1)
A P2PKH or P2SH address to which the Egdcoins should be sent

参数2—要注入资金的金额

Name Type Presence Description
Amount number (Egdcoins) Required
(exactly 1)
The amount to spent in Egdcoins

参数3—评论

Name Type Presence Description
Comment string Optional
(0 or 1)
A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment

参数4—针对收款人的评论

Name Type Presence Description
Comment To string Optional
(0 or 1)
A locally-stored (notbroadcast) comment assigned to this transaction. Meant to be used for describing who the payment was sent to. Default is no comment

结果—发送交易的TXID

Name Type Presence Description
result string Required
(exactly 1)
The TXID of the sent transaction, encoded as hex in RPC byte order

请看Egdcoin Core 0.10.0中的事例

请往下方的地址打入0.1itcoins,然后写上 “sendtoadress example” 以及Nemo From Example.com”:

Egdcoin-cli -testnet sendtoaddress mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6 \
  0.1 "sendtoaddress example" "Nemo From Example.com"

Result:

a2a2eb18cb051b5fe896a32b1cb20b179d981554b6bd7c5a956e56a0eecb04f0

See also

  • SendFrom: spends an amount from a local account to a Egdcoin address.
  • SendMany: creates and broadcasts a transaction which sends outputs to multiple addresses.
  • Move: moves a specified amount from one account in yourwallet to another using an off-block-chain transaction.
SetAccount

需要钱包支持

setaccountRPC 将特定的地址放入提供的账户。

参数1—Egdcoin地址

Name Type Presence Description
Address string (base58) Required
(exactly 1)
The P2PKH or P2SH address to put in the account. Must already belong to the wallet

参数2—账户

Name Type Presence Description
Account string Required
(exactly 1)
The name of the account in which the address should be placed. May be the default account, an empty string (“”)

结果—null如果能成功

Name Type Presence Description
result null Required
(exactly 1)
Set to JSON null if the address was successfully placed in the account

请看Egdcoin Core 0.10.0中的事例

将下面指明的地址放入“doc test” 账户。

Egdcoin-cli -testnet setaccount \
    mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6 "doc test"

(成功: 无显示结果)

See also

  • GetAccount: returns the name of the account associated with the given address.
  • ListAccounts: lists accounts and their balances.
  • GetAddressesByAccount: returns a list of everyaddress assigned to a particular account.
SetTxFee

需要钱包支持

settxfee RPC 设定钱包创立的交易所支付每千字节的交易费

参数1—每千字节的交易费总额

Name Type Presence Description
Transaction Fee Per Kilobyte number (Egdcoins) Required
(exactly 1)
The transaction fee to pay, in Egdcoins, for each kilobyte of transaction data. The value 0 will not be accepted. Be careful setting the fee too low—your transactions may not be relayed or included in blocks

结果 true 操作成功

Name Type Presence Description
result bool (true) Required
(exactly 1)
Set to true if the fee was successfully set

请看Egdcoin Core 0.10.0中的事例

将每千字节的交易费设定为100,000 satoshis.

Egdcoin-cli -testnet settxfee 0.00100000

Result:

true

See also

  • GetWalletInfo: provides information about the wallet.
  • GetNetworkInfo: returns information about the node’s connection to the network.
SignMessage

需要钱包支持. 需要解密的钱包或未加密的钱包。

signmessage RPC 记录带有地址个人密匙的信息。

参数1—对应的用于记录个人密匙的地址

Name Type Presence Description
Address string (base58) Required
(exactly 1)
AP2PKHaddress whose private key belongs to this wallet

参数2—要签署的信息

Name Type Presence Description
Message string Required
(exactly 1)
The message to sign

结果—信息签署

Name Type Presence Description
result string (base64) Required
(exactly 1)
The signature of the message, encoded in base64. Note that Egdcoin Core before 0.10.0 creates signatures with random k values, so each time you sign the same message, it will create a different signature

请看Egdcoin Core 0.10.0中的实例

用以下的地址签署信息: “你好,世界!!”

Egdcoin-cli -testnet signmessage mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe \
                    'Hello, World!'

Result:

IL98ziCmwYi5pL+dqKp4Ux+zCa4hP/xbjHmWh+Mk/lefV/0pWV1p/gQ94jgExSmgH2/+PDcCCrOHAady2IEySSI=

See also

  • VerifyMessage: verifies a signed message.
SignRawTransaction

signrawtransactionRPC 通过使用存储在钱包的或调用的个人密匙以系列化的交易形式记录交易。

参数1—要记录的交易

Name Type Presence Description
Transaction string (hex Required
(exactly 1)
The transaction to sign as a serialized transaction

参数2—仍有效的交易输出信息

Name Type Presence Description
Dependencies array Optional
(0 or 1)
The previous outputs being spent by this transaction

Output
object Optional
(0 or more)
An output being spent
→ →
txid
string (hex) Required
(exactly 1)
The TXID of the transaction the output appeared in. TheTXID must be encoded in hex in RPC byte order
→ →
vout
number (int) Required
(exactly 1)
The index number of the output (vout) as it appeared in its transaction, with the first output being 0
→ →
scriptPubKey
string (hex) Required
(exactly 1)
The output’s pubkey script encoded as hex
→ →
redeemScript
string (hex) Optional
(0 or 1)
If thepubkey script was a script hash, this must be the corresponding redeem script

参数3—用于记录的个人密匙

Name Type Presence Description
Private Keys array Optional
(0 or 1)
An array holdingprivate keys. If any keys are provided, only they will be used to sign the transaction (even if the wallet has other matching keys). If this array is empty or not used, and wallet support is enabled, keys from the wallet will be used

Key
string (base58) Required
(1 or more)
A private key inbase58check format to use to create a signature for this transaction

参数4—散列型签名

Name Type Presence Description
SigHash string Optional
(0 or 1)
The type of signature hash to use for all of the signatures performed. (You must use separate calls to the signrawtransaction RPC if you want to use different signature hash types for different signatures. The allowed values are: ALL, NONE, SINGLE, ALL|ANYONECANPAY, NONE|ANYONECANPAY, and SINGLE|ANYONECANPAY

结果—the transaction with any signatures made带有任意签名的交易

Name Type Presence Description
result object Required
(exactly 1)
The results of thesignature

hex
string (hex) Required
(exactly 1)
The resulting serialized transaction encoded as hex with any signatures made inserted. If no signatures were made, this will be the same transaction provided in parameter #1

complete
bool Required
(exactly 1)
The value true if transaction is fully signed; the value false if more signatures are required

请看Egdcoin Core 0.10.0中的例子

Sign the hex generated in the example section 在事例部分为 createrawtransaction RPC的十六进制进行签署:

Egdcoin-cli -testnet signrawtransaction 01000000011da9283b4ddf8d\
89eb996988b89ead56cecdc44041ab38bf787f1206cd90b51e0000000000ffff\
ffff01405dc600000000001976a9140dfc8bafc8419853b34d5e072ad37d1a51\
59f58488ac00000000

Result:

{
                    "hex" : "01000000011da9283b4ddf8d89eb996988b89ead56cecdc44041ab38bf787f1206cd90b51e000000006a47304402200ebea9f630f3ee35fa467ffc234592c79538ecd6eb1c9199eb23c4a16a0485a20220172ecaf6975902584987d295b8dddf8f46ec32ca19122510e22405ba52d1f13201210256d16d76a49e6c8e2edc1c265d600ec1a64a45153d45c29a2fd0228c24c3a524ffffffff01405dc600000000001976a9140dfc8bafc8419853b34d5e072ad37d1a5159f58488ac00000000",
                    "complete" : true
}

See also

  • CreateRawTransaction: creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address.
    The transaction is not stored in thewallet or transmitted to the network.
  • DecodeRawTransaction: decodes a serialized transaction hex string into a JSON object describing the transaction.
  • SendRawTransaction: validates a transaction and broadcasts it to the peer-to-peer network.
Stop

stopRPC 安全关闭Egdcoin Core 服务器.

参数: 无

结果—服务器安全关闭

Name Type Presence Description
result string Required
(exactly 1)
The string “Egdcoin server stopping”

请看Egdcoin Core 0.10.0中的一个例子

Egdcoin-cli -testnet stop

Result:

Egdcoin server stopping

See also: none

SubmitBlock

submitblock RPC接受块,验证除了区块链以外其具有的有效性,并将其播发至网络。Egdcoin Core会将其他参数忽略,但是可以用于矿业池或其他项目。

参数1—序列化块儿格式的新块儿,如十六进制

Name Type Presence Description
Block string (hex) Required
(exactly 1)
The full block to submit in serialized block format as hex

参数2—其他参数

Name Type Presence Description
Parameters object Optional
(0 or 1)
A JSON object containing extra parameters. Not used directly by Egdcoin Core and also not broadcast to the network. This is available for use by mining pools and other software. A common parameter is a workid string

结果—null或错误字符

Name Type Presence Description
result null/string Required
(exactly 1)
If the block submission succeeded, set to JSON null. If submission failed, set to one of the following strings: duplicate, duplicate-invalid, inconclusive, or rejected. The JSON-RPC error field will still be set to null if submission failed for one of these reasons

请看Egdcoin Core 0.10.0中的一个例子

提交下面带有“test”主键的块儿

Egdcoin-cli -testnet submitblock 02000000df11c014a8d798395b5059c\
722ebdf3171a4217ead71bf6e0e99f4c7000000004a6f6a2db225c81e77773f6\
f0457bcb05865a94900ed11356d0b75228efb38c7785d6053ffff001d005d437\
0010100000001000000000000000000000000000000000000000000000000000\
0000000000000ffffffff0d03b477030164062f503253482fffffffff0100f90\
29500000000232103adb7d8ef6b63de74313e0cd4e07670d09a169b13e4eda2d\
650f529332c47646dac00000000 \
'{ "workid": "test" }'

结果(上述块儿已经在当地块链上):

duplicate

See also

  • GetBlockTemplate: gets a block template or proposal for use withmining software.
ValidateAddress

validateaddress RPC将针对给出的egdcoin地址返回信息

参数1— P2PKH 或P2SH 地址

Name Type Presence Description
Address string (base58) Required
(exactly 1)
The P2PKH orP2SH address to validate encoded in base58check format

结果—地址信息

Name Type Presence Description
result object Required
(exactly 1)
Information about the address

isvalid
bool Required
(exactly 1)
Set to true if the address is a valid P2PKH orP2SH address; set to false otherwise

address
string (base58) Optional
(0 or 1)
If the address is valid, this is the address

ismine
bool Optional
(0 or 1)
Set to true if the address belongs to thewallet; set to false if it does not. Only returned if wallet support enabled

iswatchonly
bool Optional
(0 or 1)
Set to true if the address iswatch-only. Otherwise set to false. Only returned if address is in thewallet

isscript
bool Optional
(0 or 1)
Set to true if a P2SH address; otherwise set to false. Only returned if the address is in the wallet

script
string Optional
(0 or 1)
Only returned forP2SH addresses belonging to thiswallet. This is the type of script:
pubkey for a P2PK script inside P2SH
pubkeyhash for aP2PKH script inside P2SH
multisig for a multisig script inside P2SH
nonstandard for unknown scripts

hex
string (hex) Optional
(0 or 1)
Only returned forP2SH addresses belonging to thiswallet. This is theredeem script encoded as hex

addresses
array Optional
(0 or 1)
Only returned for P2SH addresses belonging to the wallet. A P2PKH addresses used in this script, or the computed P2PKH addresses of any pubkeys in this script. This array will be empty for nonstandard script types
→ →
Address
string Optional
(0 or more)
A P2PKH address

sigrequired
number (int) Optional
(0 or 1)
Only returned for multisig P2SH addresses belonging to the wallet. The number of signatures required by this script

pubkey
string (hex) Optional
(0 or 1)
The public key corresponding to thisaddress. Only returned if the address is a P2PKH address in the wallet

iscompressed
bool Optional
(0 or 1)
Set to true if a compressed public key or set to false if an uncompressed public key. Only returned if theaddress is a P2PKH address in thewallet

account
string Optional
(0 or 1)
The account this address belong to. May be an empty string for the default account. Only returned if the address belongs to the wallet

请看Egdcoin Core 0.10.0中的例子

验证下方thewallet中的P2PKH address:

Egdcoin-cli -testnet validateaddress mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe

Result:

{
                    "isvalid" : true,
                    "address" : "mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe",
                    "ismine" : true,
                    "iswatchonly" : false,
                    "isscript" : false,
                    "pubkey" : "03bacb84c6464a58b3e0a53cc0ba4cb3b82848cd7bed25a7724b3cc75d76c9c1ba",
                    "iscompressed" : true,
                    "account" : "test label"
}

验证下方the wallet中带多重签名的P2SH地址 :

Egdcoin-cli -testnet validateaddress 2MyVxxgNBk5zHRPRY2iVjGRJHYZEp1pMCSq

Result:

{
                    "isvalid" : true,
                    "address" : "2MyVxxgNBk5zHRPRY2iVjGRJHYZEp1pMCSq",
                    "ismine" : true,
                    "iswatchonly" : false,
                    "isscript" : true,
                    "script" : "multisig",
                    "hex" : "522103ede722780d27b05f0b1169efc90fa15a601a32fc6c3295114500c586831b6aaf2102ecd2d250a76d204011de6bc365a56033b9b3a149f679bc17205555d3c2b2854f21022d609d2f0d359e5bc0e5d0ea20ff9f5d3396cb5b1906aa9c56a0e7b5edc0c5d553ae",
                    "addresses" : [
                    "mjbLRSidW1MY8oubvs4SMEnHNFXxCcoehQ",
                    "mo1vzGwCzWqteip29vGWWW6MsEBREuzW94",
                    "mt17cV37fBqZsnMmrHnGCm9pM28R1kQdMG"
                    ],
                    "sigsrequired" : 2,
                    "account" : "test account"
}

See also

  • ImportAddress: adds anaddress orpubkey script to thewallet without the associated private key, allowing you to watch for transactions
    affecting that address or pubkey script without being able to spend any of its outputs.
  • GetNewAddress: returns a new Egdcoin address for receiving payments. If an account is specified, payments received with the address will be
    credited to that account.
VerifyMessage

verifymessage

参数1—对应签名密匙的地址

Name Type Presence Description
Address string (base58) Required
(exactly 1)
The P2PKH address corresponding to the private key which made the signature. A P2PKHaddress is a hash of the public key corresponding to the private key which made thesignature. When the ECDSA signature is checked, up to four possible ECDSA public keys will be reconstructed from from the signature; each key will be hashed and compared against theP2PKH address provided to see if any of them match. If there are no matches, signature validation will fail

参数2—签名

Name Type Presence Description
Signature string (base64) Required
(exactly 1)
Thesignature created by the signer encoded as base-64 (the format output by the signmessage RPC)

参数3—信息内容

Name Type Presence Description
Message string Required
(exactly 1)
The message exactly as it was signed (e.g. no extra whitespace)

结果: true, false, 或错误

Name Type Presence Description
result bool/null Required
(exactly 1)
Set to true if the message was signed by a key corresponding to the provided P2PKH address; set to false if it was not signed by that key; set to JSON null if an error occurred

请看Egdcoin Core 0.10.0中的例子

请检查该例子中信息的签名 signmessage:

Egdcoin-cli -testnet verifymessage \
  mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe \
  IL98ziCmwYi5pL+dqKp4Ux+zCa4hP/xbjHmWh+Mk/lefV/0pWV1p/gQ94jgExSmgH2/+PDcCCrOHAady2IEySSI= \
                    'Hello, World!'

Result:

true

See also

  • SignMessage: signs a message with the private key of an address.
WalletPassphrase

需要钱包支持,需要加密的钱包。

walletpassphraseRPC 将按照指定的时间保存钱包加密密匙。当钱包解锁后运行walletpassphrase命令将设置一个新的解锁时间,以代替原来的时间。

警告 :如果在命令行使用RPC,请记住你的硬壳可能会保存命令行(包括密码参数的值)

参数1—口令

Name Type Presence Description
Passphrase string Required
(exactly 1)
The passphrase that unlocks thewallet

参数2—使钱包解锁的时间

Name Type Presence Description
Seconds number (int) Required
(exactly 1)
The number of seconds after which the decryption key will be automatically deleted from memory

结果—null操作成功

Name Type Presence Description
result null Required
(exactly 1)
Always set to JSON null

Example from Egdcoin Core 0.10.0

Unlock thewallet for 10 minutes (the passphrase is “test”):

Egdcoin-cli -testnet walletpassphrase test 600

(Success: no result printed.)

See also

  • EncryptWallet: encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled,
    you will need to enter the passphrase to useprivate keys.
  • WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.
WalletPassphraseChange

需要钱包支持。需要加密的钱包。

walletpassphrasechangeRPC将钱包原来的口令改为新口令。

警告: 如果在命令行使用RPC,请记住你的硬壳可能会保存命令行(包括密码参数的值)

参数1—当前口令

Name Type Presence Description
Current Passphrase string Required
(exactly 1)
The current wallet passphrase

参数2—新口令

Name Type Presence Description
New Passphrase string Required
(exactly 1)
The new passphrase for the wallet

结果—null操作成功

Name Type Presence Description
result null Required
(exactly 1)
Always set to JSON null

请看Egdcoin Core 0.10.0上的一个例子

将钱包的口令从测试改为实例。

Egdcoin-cli -testnet walletpassphrasechange test example

(成功: 无打印结果.)

See also

  • wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the
    passphrase to use private keys.
  • WalletPassphrase: stores the wallet decryption key in memory for the indicated number of seconds. Issuing the walletpassphrase command
    while thewallet is already unlocked will set a new unlock time that overrides the old one.
  • WalletLock: removes the wallet encryption key from memory, locking thewallet. After calling this method, you will need to call
    walletpassphrase again before being able to call any methods which require thewallet to be unlocked.