163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
.I args
.in -2m
.B work::
.in +2m
.B fromWorkData
.I blockHashOrPublicKey
.br
.B fromBlock
.I blockData
.br
.B validate
.I workData
.I work
|
>
|
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
.I args
.in -2m
.B work::
.in +2m
.B fromWorkData
.I blockHashOrPublicKey
.RB ? -hex | -binary ?
.br
.B fromBlock
.I blockData
.br
.B validate
.I workData
.I work
|
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
|
.BR previous .
.JB
.SS Work Generation
.TP
.B ::nano::work::fromWorkData
.I blockHashOrPublicKey
.RI " -> " work
Create proof-of-work (PoW) from a block hash or public key. Which one is used
depends on whether or not there are any other blocks in this account's chain.
If this is the first block in this account's chain then the public key of the
account is used, otherwise the hash of the blocks predecessor
.RI ( previous )
is used. The specific value needed should be accessible from the
.B _workData
member of a JSON object or Tcl dictionary. Note that this attribute (and all
attributes that begin with an underscore) should be discarded when
sending the block outside of the Tcl process.
.TP
.B ::nano::work::fromBlock
.I blockData
.RI " -> " work
This is a convenience procedure which computes work data (either a block hash
|
>
>
|
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
|
.BR previous .
.JB
.SS Work Generation
.TP
.B ::nano::work::fromWorkData
.I blockHashOrPublicKey
.RB ? -hex | -binary ?
.RI " -> " work
Create proof-of-work (PoW) from a block hash or public key. Which one is used
depends on whether or not there are any other blocks in this account's chain.
If this is the first block in this account's chain then the public key of the
account is used, otherwise the hash of the blocks predecessor
.RI ( previous )
is used. The specific value needed should be accessible from the
.B _workData
member of a JSON object or Tcl dictionary. Note that this attribute (and all
attributes that begin with an underscore) should be discarded when
sending the block outside of the Tcl process.
.HB
.TP
.B ::nano::work::fromBlock
.I blockData
.RI " -> " work
This is a convenience procedure which computes work data (either a block hash
|