-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e70a0fe
commit 4ffa28f
Showing
9 changed files
with
5,443 additions
and
102 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# Generate the protos. | ||
protoc -I/usr/local/include -I. \ | ||
-I$GOPATH/src \ | ||
--go_out=plugins=grpc:. \ | ||
btcrpc.proto | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package btcrpc | ||
|
||
import "github.com/btcsuite/btcd/chaincfg/chainhash" | ||
|
||
func NewBlockLocatorHash(hash *chainhash.Hash) *BlockLocator { | ||
return &BlockLocator{ | ||
Locator: &BlockLocator_Hash{ | ||
Hash: hash[:], | ||
}, | ||
} | ||
} | ||
|
||
func NewBlockLocatorHeight(height int32) *BlockLocator { | ||
return &BlockLocator{ | ||
Locator: &BlockLocator_Height{ | ||
Height: height, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
|
||
All current methods and the new methods that cover them: | ||
(`+` means not yet implemented, but in the proto file) | ||
|
||
- addnode: ConnectPeer | ||
- createrawtransaction: deprecated | ||
- debuglevel: SetDebugLevel | ||
- decoderawtransaction: deprecated | ||
- decodescript: deprecated | ||
- generate: GenerateBlocks | ||
- getaddednodeinfo: GetPeers | ||
- getbestblock: GetBestBlockInfo | ||
- getbestblockhash: GetBestBlockInfo | ||
- getblock: GetBlock | ||
- **getblockchaininfo: could add to GetNetworkInfo** | ||
- getblockcount: GetBestBlockInfo | ||
- getblockhash: GetBlockInfo | ||
- getblockheader: GetBlockInfo | ||
- **getblocktemplate** | ||
- getconnectioncount: GetSystemInfo | ||
- getcurrentnet: GetNetworkInfo | ||
- getdifficulty: GetNetworkInfo or GetMiningInfo | ||
- getgenerate: GetGenerate | ||
- gethashespersec: GetHashRate (or GetNetworkInfo or GetMiningInfo for network HR) | ||
- **getheaders** | ||
- getinfo: GetSystemInfo and GetNetworkInfo | ||
- getmempoolinfo: GetMempoolInfo | ||
- getmininginfo: GetMiningInfo | ||
- getnettotals: GetSystemInfo | ||
- getnetworkhashps: GetNetworkInfo or GetMiningInfo | ||
- getpeerinfo: GetPeers | ||
- getrawmempool: GetMempool and GetRawMempool | ||
- getrawtransaction: GetRawTransactions | ||
- **gettxout** | ||
- help: deprecated | ||
- node: ConnectPeer, DisconnectPeer, GetPeers | ||
- ping: deprecated | ||
- **searchrawtransactions** | ||
- sendrawtransaction: SubmitTransactions | ||
- setgenerate: SetGenerate | ||
- stop: StopDaemon | ||
- submitblock: SubmitBlock | ||
- uptime: GetSystemInfoo | ||
- validateaddress: deprecated | ||
- **verifychain** | ||
- **verifymessage** | ||
- version: GetSystemInfo | ||
|
||
There are WebSocket-only commands: | ||
- **loadtxfilter** | ||
- **notifyblocks: +SubscsribeBlocks** | ||
- **notifynewtransactions: +SubscribeTransactions** | ||
- **notifyreceived: potentially +SubscribeTransactions** | ||
- **notifyspent: potentially +SubscribeTransactions** | ||
- rescan: RescanTransactions | ||
- **rescanblocks: why is this useful?** | ||
- session: deprecated | ||
- **stopnotifyblocks: +SubscribeBlocks** | ||
- **stopnotifynewtransactions: +SubscribeTransaction** | ||
- **stopnotifyspent: potentially +SubscribeTransaction** | ||
- **stopnotifyreceived: potentially +SubscribeTransaction** | ||
|
||
These are mentioned in the code as not implemented, but desired: | ||
- estimatefee | ||
- estimatepriority | ||
- getchaintips | ||
- getmempoolentry | ||
- getnetworkinfo: GetNetworkInfo | ||
- getwork | ||
- invalidateblock | ||
- preciousblock | ||
- reconsiderblock | ||
|
Oops, something went wrong.