RecordsKeeperRubyLib 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -1
  3. data/CODE_OF_CONDUCT.md +0 -8
  4. data/Gemfile +0 -1
  5. data/Gemfile.lock +4 -62
  6. data/LICENSE.txt +2 -2
  7. data/README.md +92 -1
  8. data/{RecordsKeeperRuby.gemspec → RecordsKeeperRubyLib.gemspec} +4 -5
  9. data/bin/console +1 -1
  10. data/config.yaml +8 -0
  11. data/docs/{addressdoc.rb → address_doc.rb} +105 -116
  12. data/docs/{assetsdoc.rb → asset_doc.rb} +54 -65
  13. data/docs/block_doc.rb +63 -0
  14. data/docs/blockchain_doc.rb +77 -0
  15. data/docs/{permissionsdoc.rb → permissions_doc.rb} +54 -65
  16. data/docs/{streamdoc.rb → stream_doc.rb} +79 -84
  17. data/docs/{transactiondoc.rb → transaction_doc.rb} +110 -121
  18. data/docs/{walletdoc.rb → wallet_doc.rb} +122 -133
  19. data/lib/RecordsKeeperRubyLib.rb +9 -0
  20. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/address.rb +198 -186
  21. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/assets.rb +99 -87
  22. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/block.rb +94 -89
  23. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/blockchain.rb +148 -135
  24. data/lib/RecordsKeeperRubyLib/config.yaml +8 -0
  25. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/permissions.rb +77 -77
  26. data/lib/RecordsKeeperRubyLib/stream.rb +220 -0
  27. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/transaction.rb +213 -182
  28. data/lib/RecordsKeeperRubyLib/version.rb +3 -0
  29. data/lib/{RecordsKeeperRuby → RecordsKeeperRubyLib}/wallet.rb +263 -252
  30. data/lib/config.yaml +8 -0
  31. metadata +27 -41
  32. data/docs/blockchaindoc.rb +0 -77
  33. data/docs/blockdoc.rb +0 -76
  34. data/lib/RecordsKeeperRuby.rb +0 -9
  35. data/lib/RecordsKeeperRuby/sample_config.yaml +0 -60
  36. data/lib/RecordsKeeperRuby/stream.rb +0 -169
  37. data/lib/RecordsKeeperRuby/version.rb +0 -3
  38. data/lib/sample_config.yaml +0 -60
  39. data/sample_config.yaml +0 -60
@@ -1,121 +1,110 @@
1
- # = Transaction Class Usage
2
- # This is a library to work with RecordsKeeper transactions.
3
- # You can send transaction, create raw transaction, sign raw transaction, send raw transaction, send signed transaction, retrieve transaction information and calculate transaction’s fees by using transaction class. You just have to pass parameters to invoke the pre-defined functions.
4
- # ---------
5
- # == Libraries
6
- # Require these ruby libraries first to get started with the functionality.
7
- # require 'rubygems'
8
- # require 'httparty'
9
- # require 'json'
10
- # require 'binary_parser'
11
- # require 'yaml'
12
- # require 'hex_string'
13
- # -----------------
14
- # == Create Connection
15
- # Entry point for accessing Blockchain class resources.
16
- # * URL: Url to connect to the chain ([RPC Host]:[RPC Port])
17
- # * Chain-name: Name of the chain
18
- # cfg = YAML::load(File.open('sample_config.yaml','r')) # Loads the configuration file
19
- # * Set a *network* value to change the network-type
20
- # network = cfg['testnet'] # Network variable to store the network that you want to access
21
- # **NOTE:* Default network is *Test-net* ( i.e., you can set it to either testnet or mainnet).
22
- # Check the network type for url and chain name:
23
- # if @network==cfg['testnet']
24
- # @url = cfg['testnet']['url']
25
- # @chain = cfg['testnet']['chain']
26
- # else
27
- # @url = cfg['mainnet']['url']
28
- # @chain = cfg['mainnet']['chain']
29
- # end
30
- # -------------------
31
- # == Node Authentication
32
- # Import values from config file.
33
- # * User name: The rpc user is used to call the APIs.
34
- # * Password: The rpc password is used to authenticate the APIs.
35
- # * Check the network type for username and password:
36
- # if @network==cfg['testnet']
37
- # @user = cfg['testnet']['rkuser']
38
- # @password = cfg['testnet']['passwd']
39
- # else
40
- # @user = cfg['mainnet']['rkuser']
41
- # @password = cfg['mainnet']['passwd']
42
- # end
43
- # Now we have node authentication credentials.
44
- # ------------
45
- # = class Transaction
46
- # Transaction class is used to call transaction related functions like create raw transaction, sign transaction, send transaction , retrieve transaction and verify transaction functions which are used to create raw transactions, send transactions, sign transactions, retrieve transactions and verify transactions on the RecordsKeeeper Blockchain.
47
- # === 1. sendTransaction sender_address, reciever_address, amount
48
- # This function is used to send transaction by passing reciever’s address, sender’s address and amount.
49
- #
50
- # You have to pass these three arguments to the sendTransaction function call:
51
- # * Transaction’s sender address
52
- # * Transaction’s reciever address
53
- # * Amount to be sent in transaction
54
- #
55
- # txid = sendTransaction sender_address, reciever_address, amount # Function call
56
- #
57
- # puts txid # prints transaction id of the sent transaction
58
- # === 2. sendSignedTransaction
59
- # This function is used to send transaction by passing reciever’s address, sender’s address, private key of sender and amount. In this function private key is required to sign transaction.
60
- #
61
- # You have to pass these four arguments to the sendSignedTransaction function call:
62
- # * Transaction’s sender address
63
- # * Transaction’s reciever address
64
- # * Amount to be sent in transaction
65
- # * Private key of the sender’s address
66
- #
67
- # transaction_id = sendSignedTransaction # Function call
68
- #
69
- # puts transaction_id # prints transaction id of the signed transaction
70
- # === 3. createRawTransaction sender_address, reciever_address, amount
71
- # This function is used to create raw transaction by passing reciever’s address, sender’s address and amount.
72
- #
73
- # You have to pass these three arguments to the sendTransaction function call:
74
- # * Transaction’s sender address
75
- # * Transaction’s reciever address
76
- # * Amount to be sent in transaction
77
- #
78
- # tx_hex = createRawTransaction sender_address, reciever_address, amount # Function call
79
- #
80
- # puts tx_hex # prints transaction hex of the raw transaction
81
- # === 4. signRawTransaction tx_hex, private_key
82
- # This function retrieves is used to sign raw transaction by passing transaction hex of the raw transaction and the private key to sign the raw transaction.
83
- #
84
- # You have to pass these three arguments to the signRawTransaction function call:
85
- # * Transaction hex of the raw transaction
86
- # * Private key to sign raw transaction
87
- #
88
- # signed_hex = signRawTransaction txHex, private_key # Function call
89
- #
90
- # puts signed_hex # prints signed transaction hex of the raw transaction
91
- # === 5. sendRawTransaction signed_txHex
92
- # This function is used to send raw transaction by passing signed transaction hex of the raw transaction.
93
- #
94
- # You have to pass the signed transaction hex of the raw transaction.
95
- #
96
- # tx_id = sendRawTransaction signed_txHex # Function call
97
- #
98
- # puts tx_id # prints transaction id of the raw transaction
99
- # === 6. retrieveTransaction tx_id
100
- # This function is used to retrieve transaction’s information by passing transaction id to the function.
101
- #
102
- # You have to pass the transaction id of the transaction you want to retrieve.
103
- #
104
- # sent_data, sent_amount, reciever_address = retrieveTransaction tx_id # Function call
105
- #
106
- # puts sent_data #prints sent data
107
- # puts sent_amount #prints sent amount
108
- # puts reciever_address #prints reciever's address
109
- # === 7. getFee address, tx_id
110
- # This function is used to calculate transaction’s fee by passing transaction id and sender’s address to the function.
111
- #
112
- # You have to pass these two arguments to the getFee function call:
113
- # * Transaction id of the transaction you want to calculate fee for
114
- # * Sender’s address
115
- #
116
- # Fees = getFee address, tx_id # Function call
117
- #
118
- # puts Fees #prints fees consumed in the verified transaction
119
-
120
- class Transaction
121
- end
1
+ # = Transaction Class Usage
2
+ # This is a library to work with RecordsKeeper transactions.
3
+ # You can send transaction, create raw transaction, sign raw transaction, send raw transaction, send signed transaction, retrieve transaction information and calculate transaction’s fees by using transaction class. You just have to pass parameters to invoke the pre-defined functions.
4
+ # ---------
5
+ # == Libraries
6
+ # Require these ruby libraries first to get started with the functionality.
7
+ # require 'rubygems'
8
+ # require 'httparty'
9
+ # require 'json'
10
+ # require 'binary_parser'
11
+ # require 'yaml'
12
+ # require 'hex_string'
13
+ # -----------------
14
+ # == Create Connection
15
+ # Entry point for accessing Address class resources.
16
+ # * URL: Url to connect to the chain ([RPC Host]:[RPC Port])
17
+ # * Chain-name: chain name
18
+ # cfg = YAML::load(File.open('sample_config.yaml','r')) # Loads the configuration file
19
+ # * Set a *network* value.
20
+ # network = cfg['network'] # Network variable to store the network that you want to access
21
+ # * Set url and chain name:
22
+ # @url = cfg['network']['url']
23
+ # @chain = cfg['network']['chain']
24
+ # -------------------
25
+ # == Node Authentication
26
+ # Import values from config file.
27
+ # * User name: The rpc user is used to call the APIs.
28
+ # * Password: The rpc password is used to authenticate the APIs.
29
+ # * Set the rpc username and password:
30
+ # @user = cfg['network']['rkuser']
31
+ # @password = cfg['network']['passwd']
32
+ # Now we have node authentication credentials.
33
+ # ------------
34
+ # = class Transaction
35
+ # Transaction class is used to call transaction related functions like create raw transaction, sign transaction, send transaction , retrieve transaction and verify transaction functions which are used to create raw transactions, send transactions, sign transactions, retrieve transactions and verify transactions on the RecordsKeeeper Blockchain.
36
+ # === 1. sendTransaction sender_address, reciever_address, amount
37
+ # This function is used to send transaction by passing reciever’s address, sender’s address and amount.
38
+ #
39
+ # You have to pass these three arguments to the sendTransaction function call:
40
+ # * Transaction’s sender address
41
+ # * Transaction’s reciever address
42
+ # * Amount to be sent in transaction
43
+ #
44
+ # txid = sendTransaction sender_address, reciever_address, amount # Function call
45
+ #
46
+ # puts txid # prints transaction id of the sent transaction
47
+ # === 2. sendSignedTransaction
48
+ # This function is used to send transaction by passing reciever’s address, sender’s address, private key of sender and amount. In this function private key is required to sign transaction.
49
+ #
50
+ # You have to pass these four arguments to the sendSignedTransaction function call:
51
+ # * Transaction’s sender address
52
+ # * Transaction’s reciever address
53
+ # * Amount to be sent in transaction
54
+ # * Private key of the sender’s address
55
+ #
56
+ # transaction_id = sendSignedTransaction # Function call
57
+ #
58
+ # puts transaction_id # prints transaction id of the signed transaction
59
+ # === 3. createRawTransaction sender_address, reciever_address, amount
60
+ # This function is used to create raw transaction by passing reciever’s address, sender’s address and amount.
61
+ #
62
+ # You have to pass these three arguments to the sendTransaction function call:
63
+ # * Transaction’s sender address
64
+ # * Transaction’s reciever address
65
+ # * Amount to be sent in transaction
66
+ #
67
+ # tx_hex = createRawTransaction sender_address, reciever_address, amount # Function call
68
+ #
69
+ # puts tx_hex # prints transaction hex of the raw transaction
70
+ # === 4. signRawTransaction tx_hex, private_key
71
+ # This function retrieves is used to sign raw transaction by passing transaction hex of the raw transaction and the private key to sign the raw transaction.
72
+ #
73
+ # You have to pass these three arguments to the signRawTransaction function call:
74
+ # * Transaction hex of the raw transaction
75
+ # * Private key to sign raw transaction
76
+ #
77
+ # signed_hex = signRawTransaction txHex, private_key # Function call
78
+ #
79
+ # puts signed_hex # prints signed transaction hex of the raw transaction
80
+ # === 5. sendRawTransaction signed_txHex
81
+ # This function is used to send raw transaction by passing signed transaction hex of the raw transaction.
82
+ #
83
+ # You have to pass the signed transaction hex of the raw transaction.
84
+ #
85
+ # tx_id = sendRawTransaction signed_txHex # Function call
86
+ #
87
+ # puts tx_id # prints transaction id of the raw transaction
88
+ # === 6. retrieveTransaction tx_id
89
+ # This function is used to retrieve transaction’s information by passing transaction id to the function.
90
+ #
91
+ # You have to pass the transaction id of the transaction you want to retrieve.
92
+ #
93
+ # retrievedinfo = JSON.parse retrieveTransaction tx_id # Function call
94
+ #
95
+ # puts retrievedinfo['sent_data'] #prints sent data
96
+ # puts retrievedinfo['sent_amount'] #prints sent amount
97
+ # puts retrievedinfo['reciever_address'] #prints reciever's address
98
+ # === 7. getFee address, tx_id
99
+ # This function is used to calculate transaction’s fee by passing transaction id and sender’s address to the function.
100
+ #
101
+ # You have to pass these two arguments to the getFee function call:
102
+ # * Transaction id of the transaction you want to calculate fee for
103
+ # * Sender’s address
104
+ #
105
+ # fees = getFee address, tx_id # Function call
106
+ #
107
+ # puts fees #prints fees consumed in the verified transaction
108
+
109
+ class Transaction
110
+ end
@@ -1,133 +1,122 @@
1
- # = Wallet Class Usage
2
- # Library to work with RecordsKeeper wallet functionalities.
3
- # You can create wallet, dump wallet into a file, backup wallet into a file, import wallet from a file, lock wallet, unlock wallet, change wallet’s password, retrieve private key, retrieve wallet’s information, sign and verify message by using wallet class. You just have to pass parameters to invoke the pre-defined functions.
4
- # ---------
5
- # == Libraries
6
- # Require these ruby libraries first to get started with the functionality.
7
- # require 'rubygems'
8
- # require 'httparty'
9
- # require 'json'
10
- # require 'binary_parser'
11
- # require 'yaml'
12
- # require 'hex_string'
13
- # -----------------
14
- # == Create Connection
15
- # Entry point for accessing Blockchain class resources.
16
- # * URL: Url to connect to the chain ([RPC Host]:[RPC Port])
17
- # * Chain-name: Name of the chain
18
- # cfg = YAML::load(File.open('sample_config.yaml','r')) # Loads the configuration file
19
- # * Set a *network* value to change the network-type
20
- # network = cfg['testnet'] # Network variable to store the network that you want to access
21
- # **NOTE:* Default network is *Test-net* ( i.e., you can set it to either testnet or mainnet).
22
- # Check the network type for url and chain name:
23
- # if @network==cfg['testnet']
24
- # @url = cfg['testnet']['url']
25
- # @chain = cfg['testnet']['chain']
26
- # else
27
- # @url = cfg['mainnet']['url']
28
- # @chain = cfg['mainnet']['chain']
29
- # end
30
- # -------------------
31
- # == Node Authentication
32
- # Import values from config file.
33
- # * User name: The rpc user is used to call the APIs.
34
- # * Password: The rpc password is used to authenticate the APIs.
35
- # * Check the network type for username and password:
36
- # if @network==cfg['testnet']
37
- # @user = cfg['testnet']['rkuser']
38
- # @password = cfg['testnet']['passwd']
39
- # else
40
- # @user = cfg['mainnet']['rkuser']
41
- # @password = cfg['mainnet']['passwd']
42
- # end
43
- # Now we have node authentication credentials.
44
- # ------------
45
- # = class Wallet
46
- # Wallet class is used to call wallet related functions like create wallet, retrieve private key of wallet address, retrieve wallet’s information, dump wallet, lock wallet, unlock wallet, change wallet’s password, create wallet’s backup, import wallet’s backup, sign message and verify message functions on RecordsKeeeper Blockchain.
47
- # === 1. createWallet
48
- # This function is used to create wallet on RecordsKeeper blockchain
49
- # publicaddress, privatekey, publickey = createWallet
50
- #
51
- # puts publicaddress # prints public address of the wallet
52
- # puts privatekey # prints private key of the wallet
53
- # puts publickey # prints public key of the wallet
54
- # === 2. getPrivateKey
55
- # This function is used to retrieve private key of the given address.
56
- # privkey = getPrivateKey
57
- #
58
- # puts privkey # prints private key of the given address
59
- # === 3. retrieveWalletinfo
60
- # This function is used to retrieve node wallet’s information.
61
- # balance, tx_count, unspent_tx = retrieveWalletinfo
62
- #
63
- # puts balance # prints wallet's balance
64
- # puts tx_count # prints wallet transaction count
65
- # puts unspent_tx # prints unspent wallet transactions
66
- # === 4. backupWallet filename
67
- # This function is used to create backup of the wallet.dat file.
68
- #
69
- # You have to pass filename; wallet’s backup file name
70
- # result = backupWallet filename
71
- #
72
- # puts result # prints result
73
- # It will return the response of the backup wallet function. The backup of the wallet is created in your chain’s directory and you can simply access your file by using same filename that you have passed with the backupwallet function. Creates a backup of the wallet.dat file in which the node’s private keys and watch-only addresses are stored. The backup is created in file filename. Use with caution – any node with access to this file can perform any action restricted to this node’s addresses.
74
- # === 5. importWallet filename
75
- # This function is used to import wallet’s backup file.
76
- #
77
- # You have to pass the filename; wallet’s backup file name.
78
- # result = importWallet filename
79
- #
80
- # puts result # prints result
81
- # It will return the response of the import wallet function. It will import the entire set of private keys which were dumped (using dumpwallet) into file filename.
82
- # === 6. dumpWallet filename
83
- # This function is used to retrieve transaction’s information by passing transaction id to the function.
84
- #
85
- # You have to pass the filename; file name to dump wallet in.
86
- # result = dumpWallet filename
87
- #
88
- # puts result # prints result
89
- # === 7. lockWallet password
90
- # This function is used to verify transaction’s information by passing transaction id and sender’s address to the function.
91
- #
92
- # You have to pass password; password to lock the wallet.
93
- # result = lockWallet password
94
- #
95
- # puts result # prints result
96
- # === 8. unlockWallet password, unlock_time
97
- # This function is used to verify transaction’s information by passing transaction id and sender’s address to the function.
98
- #
99
- # You have to pass these two arguments to the unlockWallet function call:
100
- # * Password: password to unlock the wallet
101
- # * unlocktime: seconds for which wallet remains unlock
102
- # result = unlockWallet password, unlock_time
103
- #
104
- # puts result # prints result
105
- # === 9. changeWalletPassword old_password, new_password
106
- # This function is used to change wallet’s password and set new password.
107
- #
108
- # You have to pass these two arguments to the changeWalletPassword function call:
109
- # * Old Password: old password of the wallet
110
- # * New Password: new password of the wallet
111
- # result = changeWalletPassword password, new_password
112
- #
113
- # puts result # prints result
114
- # === 10. signMessage private_key, message
115
- # This function is used to change wallet’s password and set new password.
116
- #
117
- # You have to pass these two arguments to the signMessage function call:
118
- # * Message: message to send
119
- # * Private Key: private key of the sender’s wallet address
120
- # signedMessage = signMessage private_key, message
121
- #
122
- # puts signedMessage # prints signed message
123
- # === 11. verifyMessage address, signedMessage, message
124
- # This function is used to change wallet’s password and set new password.
125
- #
126
- # You have to pass these three arguments to the verifyMessage function call:
127
- # * Message: message to send
128
- # * Private Key: private key of the sender’s wallet address
129
- # validity = verifyMessage address, signedMessage, message
130
- #
131
- # puts validity # prints validity of the message
132
- class Wallet
133
- end
1
+ # = Wallet Class Usage
2
+ # Library to work with RecordsKeeper wallet functionalities.
3
+ # You can create wallet, dump wallet into a file, backup wallet into a file, import wallet from a file, lock wallet, unlock wallet, change wallet’s password, retrieve private key, retrieve wallet’s information, sign and verify message by using wallet class. You just have to pass parameters to invoke the pre-defined functions.
4
+ # ---------
5
+ # == Libraries
6
+ # Require these ruby libraries first to get started with the functionality.
7
+ # require 'rubygems'
8
+ # require 'httparty'
9
+ # require 'json'
10
+ # require 'binary_parser'
11
+ # require 'yaml'
12
+ # require 'hex_string'
13
+ # -----------------
14
+ # == Create Connection
15
+ # Entry point for accessing Address class resources.
16
+ # * URL: Url to connect to the chain ([RPC Host]:[RPC Port])
17
+ # * Chain-name: chain name
18
+ # cfg = YAML::load(File.open('sample_config.yaml','r')) # Loads the configuration file
19
+ # * Set a *network* value.
20
+ # network = cfg['network'] # Network variable to store the network that you want to access
21
+ # * Set url and chain name:
22
+ # @url = cfg['network']['url']
23
+ # @chain = cfg['network']['chain']
24
+ # -------------------
25
+ # == Node Authentication
26
+ # Import values from config file.
27
+ # * User name: The rpc user is used to call the APIs.
28
+ # * Password: The rpc password is used to authenticate the APIs.
29
+ # * Set the rpc username and password:
30
+ # @user = cfg['network']['rkuser']
31
+ # @password = cfg['network']['passwd']
32
+ # Now we have node authentication credentials.
33
+ # ------------
34
+ # = class Wallet
35
+ # Wallet class is used to call wallet related functions like create wallet, retrieve private key of wallet address, retrieve wallet’s information, dump wallet, lock wallet, unlock wallet, change wallet’s password, create wallet’s backup, import wallet’s backup, sign message and verify message functions on RecordsKeeeper Blockchain.
36
+ # === 1. createWallet
37
+ # This function is used to create wallet on RecordsKeeper blockchain
38
+ # newwallet = JSON.parse createWallet
39
+ #
40
+ # puts newwallet['publicaddress'] # prints public address of the wallet
41
+ # puts newwallet['privatekey'] # prints private key of the wallet
42
+ # puts newwallet['publickey'] # prints public key of the wallet
43
+ # === 2. getPrivateKey
44
+ # This function is used to retrieve private key of the given address.
45
+ # privkey = getPrivateKey
46
+ #
47
+ # puts privkey # prints private key of the given address
48
+ # === 3. retrieveWalletinfo
49
+ # This function is used to retrieve node wallet’s information.
50
+ # walletinfo = JSON.parse retrieveWalletinfo
51
+ #
52
+ # puts walletinfo['balance'] # prints wallet's balance
53
+ # puts walletinfo['tx_count'] # prints wallet transaction count
54
+ # puts walletinfo['unspent_tx'] # prints unspent wallet transactions
55
+ # === 4. backupWallet filename
56
+ # This function is used to create backup of the wallet.dat file.
57
+ #
58
+ # You have to pass filename; wallet’s backup file name
59
+ # result = backupWallet filename
60
+ #
61
+ # puts result # prints result
62
+ # It will return the response of the backup wallet function. The backup of the wallet is created in your chain’s directory and you can simply access your file by using same filename that you have passed with the backupwallet function. Creates a backup of the wallet.dat file in which the node’s private keys and watch-only addresses are stored. The backup is created in file filename. Use with caution – any node with access to this file can perform any action restricted to this node’s addresses.
63
+ # === 5. importWallet filename
64
+ # This function is used to import wallet’s backup file.
65
+ #
66
+ # You have to pass the filename; wallet’s backup file name.
67
+ # result = importWallet filename
68
+ #
69
+ # puts result # prints result
70
+ # It will return the response of the import wallet function. It will import the entire set of private keys which were dumped (using dumpwallet) into file filename.
71
+ # === 6. dumpWallet filename
72
+ # This function is used to retrieve transaction’s information by passing transaction id to the function.
73
+ #
74
+ # You have to pass the filename; file name to dump wallet in.
75
+ # result = dumpWallet filename
76
+ #
77
+ # puts result # prints result
78
+ # === 7. lockWallet password
79
+ # This function is used to verify transaction’s information by passing transaction id and sender’s address to the function.
80
+ #
81
+ # You have to pass password; password to lock the wallet.
82
+ # result = lockWallet password
83
+ #
84
+ # puts result # prints result
85
+ # === 8. unlockWallet password, unlock_time
86
+ # This function is used to verify transaction’s information by passing transaction id and sender’s address to the function.
87
+ #
88
+ # You have to pass these two arguments to the unlockWallet function call:
89
+ # * Password: password to unlock the wallet
90
+ # * unlocktime: seconds for which wallet remains unlock
91
+ # result = unlockWallet password, unlock_time
92
+ #
93
+ # puts result # prints result
94
+ # === 9. changeWalletPassword old_password, new_password
95
+ # This function is used to change wallet’s password and set new password.
96
+ #
97
+ # You have to pass these two arguments to the changeWalletPassword function call:
98
+ # * Old Password: old password of the wallet
99
+ # * New Password: new password of the wallet
100
+ # result = changeWalletPassword password, new_password
101
+ #
102
+ # puts result # prints result
103
+ # === 10. signMessage private_key, message
104
+ # This function is used to change wallet’s password and set new password.
105
+ #
106
+ # You have to pass these two arguments to the signMessage function call:
107
+ # * Message: message to send
108
+ # * Private Key: private key of the sender’s wallet address
109
+ # signedMessage = signMessage private_key, message
110
+ #
111
+ # puts signedMessage # prints signed message
112
+ # === 11. verifyMessage address, signedMessage, message
113
+ # This function is used to change wallet’s password and set new password.
114
+ #
115
+ # You have to pass these three arguments to the verifyMessage function call:
116
+ # * Message: message to send
117
+ # * Private Key: private key of the sender’s wallet address
118
+ # validity = verifyMessage address, signedMessage, message
119
+ #
120
+ # puts validity # prints validity of the message
121
+ class Wallet
122
+ end