Library bitcoin
This library implements a minimal subset of the BitCoin protocol It currently supports the version handshake and processing Addr responses.
The library contains the following classes:
- NetworkAddress - Contains functionality for encoding and decoding the
- Request - Classs containing BitCoin client requests
- Response - Class containing BitCoin server responses
- BCSocket - A buffering socket class
- Helper - The primary interface to scripts
Authors:
| Patrik Karlsson <patrik@cqure.net> |
| Andrew Orr <andrew@andreworr.ca> |
Copyright© Same as Nmap--See http://nmap.org/book/man-legal.html
Source: http://nmap.org/svn/nselib/bitcoin.lua
Functions
| close (self) |
Closes an open connection. |
| connect (self) |
Establishes a connection. |
| recv (self, count) |
Opposed to the |
| send (self, data) |
Sends data over the socket |
Functions
- close (self)
-
Closes an open connection.
Parameters
- self:
Return values:
- Status (true or false).
- Error code (if status is false).
- connect (self)
-
Establishes a connection.
Parameters
- self:
Return values:
- Status (true or false).
- Error code (if status is false).
- recv (self, count)
-
Opposed to the
socket:receive_bytesfunction, that returns at least x bytes, this function returns the amount of bytes requested.Parameters
- self:
- count: of bytes to read
Return values:
- true on success, false on failure
- data containing bytes read from the socket err containing error message if status is false
- send (self, data)
-
Sends data over the socket
Parameters
- self:
- data:
Return values:
- Status (true or false).
- Error code (if status is false).


