Diff

Differences From Artifact [07230d0ca8]:

To Artifact [59acc08d34]:


723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
723
724
725
726
727
728
729











730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748













749
750
751
752
753
754
755
756
757
758
759
760
761
762
763












764
765
766
767
768
769
770







-
-
-
-
-
-
-
-
-
-
-



















-
-
-
-
-
-
-
-
-
-
-
-
-















-
-
-
-
-
-
-
-
-
-
-
-







Validate the proof-of-work (PoW) in the object specified as
.I blockRepresentation
with the attribute
.B work
is valid for the block passed in.
.RR

.TP
.B ::nano::block::hash
.I blockData
.RB ? -hex | -binary ?
.RI " -> " blockHash

Compute the cryptographic hash of a block.  The cryptographic hashing
algorithm used for Nano is Blake2b.  Blocks are typically identified
by their hash (i.e., content addressable).
.HB

.TP
.B ::nano::block::signBlockHash
.I blockHash
.I privateKey
.RB ? -hex | -binary ?
.RI " -> " signature

Compute an Ed25519-with-Blake2b signature of a given block hash specified as
.I blockHash
with the private key specified as
.IR privateKey .
In Nano, signed blocks are signed by signing the block's hash thus all that is
needed to sign a block is its hash and the private key that corresponds to the
account.
.B NOTE:  Ensure that the
.I privateKey
.B specified matches the account the block belongs to.
.HB

.TP
.B ::nano::block::sign
.I blockData
.I privateKey
.RB ? -hex | -binary ?
.RI " -> " signature

This is a convenience procedure which computes the hash of a block given as
.IR blockData ,
and then calls
.BR signBlockHash .
.HB

.TP
.B ::nano::block::verifyBlockHash
.I blockHash
.I signature
.I publicKey
.RI " -> " boolean

Verify that a block hash
.RI ( blockHash )
was signed
.RI ( signature )
by an account holding the private key that
corresponds to the public key specified as
.IR publicKey .

.TP
.B ::nano::block::verify
.I blockData
.I signature
.I publicKey
.RI " -> " boolean

This is a convenience procedure which computes the hash of a block given as
.IR blockData ,
and then calls
.BR verifyBlockHash .

.TP
.B ::nano::block::create::send
.BI "from "            address
.BI "to "              address
.BI "previous "        blockHash
.BI "representative "  address
.BI "previousBalance " integer