1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
|
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
|
-
-
-
-
+
+
+
+
+
-
+
+
+
+
-
+
|
setFrontier $account $newFrontierHash $balance $representative
return $block
}
# RPC Client
proc ::nano::rpc::client::init args {
dict with args {}
if {![info exists url]} {
set url {http://localhost:7076/}
if {![info exists ::nano::rpc::client::config]} {
set ::nano::rpc::client::config [dict create \
url {http://localhost:7076/} \
]
}
if {[llength $args] > 0} {
set ::nano::rpc::client::url $url
set ::nano::rpc::client::config [dict merge $::nano::rpc::client::config $args]
}
return true
}
proc ::nano::rpc::client {action args} {
::nano::rpc::client::init
set rpcURL $::nano::rpc::client::url
set rpcURL [dict get $::nano::rpc::client::config "url"]
set jsonArgs [list]
foreach {key value} $args {
switch -exact -- $key {
"-count" {}
"-accounts" {
set valueAsStrings [lmap valueItem $value { json::write string $valueItem }]
|