Documentation ¶
Index ¶
- Constants
- func MustParseID(str string) *cells.BinaryCell
- func NewAddrOpFromPubkey(bytes []byte) *cells.BinaryCell
- func NewAssignPowerOp(nonce cells.ID, quantity uint64, addr *cells.CID) *cells.BinaryCell
- func NewCIDOp(c *cells.CID) *cells.BinaryCell
- func NewDelegatePowerOp(nonce cells.ID, quantity uint64, addrs ...*cells.CID) *cells.BinaryCell
- func NewHeaderOp(height uint64, prev, exec, state *cells.CID, t time.Time) *cells.BinaryCell
- func NewID(num cells.ID) *cells.BinaryCell
- func NewIDFromString(body string) *cells.BinaryCell
- func NewMultihash(mhash mh.Multihash) *cells.BinaryCell
- func NewNonceOp(nonce cells.ID) *cells.BinaryCell
- func NewPubkeyOp(pubkey *btcec.PublicKey) *cells.BinaryCell
- func NewPubkeyOpFromBytes(pubkey []byte) *cells.BinaryCell
- func NewRootOp(ops ...cells.Cell) *cells.BinaryCell
- func NewSignatureOp(body []byte, pk *btcec.PrivateKey) (_ *cells.BinaryCell, err error)
- func NewSignatureOpFromBytes(sig []byte) *cells.BinaryCell
- func NewSignedOp(op *cells.BinaryCell, pk *btcec.PrivateKey) (_ *cells.BinaryCell, err error)
- func ParseID(src string) (_ *cells.BinaryCell, err error)
Constants ¶
const ( // OpRoot - Offset of chain operation code (60). OpRoot cells.ID = 0x3c // OpMultihash - Multihash native operation code. OpMultihash = OpRoot + 1 // OpID - ID operation. OpID = OpRoot + 2 // OpCID - Contentn ID native operation code. OpCID = OpRoot + 3 // OpHeader - Header operation. OpHeader = OpRoot + 4 // OpNonce - Nonce op (noop). OpNonce = OpRoot + 5 // OpClaim - Address claim operation. OpClaim = OpRoot + 6 // OpAssignPower - Allocation of power operation. OpAssignPower = OpRoot + 7 // OpDelegatePower - Investment of power operation. OpDelegatePower = OpRoot + 8 // OpPubkey - Public key operation. OpPubkey = OpRoot + 9 // OpPubkeyAddr - Public key hash operation. OpPubkeyAddr = OpRoot + 10 // OpSignature - Signature operation. OpSignature = OpRoot + 11 // OpSigned - Signed operation. OpSigned = OpRoot + 12 // OpAddress - Address native operation code. OpAddress = OpRoot + 13 // OpTransfer - Transfer of an asset. OpTransfer = OpRoot + 14 // OpNoop - Signalizes operation finish. OpNoop = OpRoot + 15 )
Variables ¶
This section is empty.
Functions ¶
func MustParseID ¶
func MustParseID(str string) *cells.BinaryCell
MustParseID - Creates new uint64 cell from string.
func NewAddrOpFromPubkey ¶
func NewAddrOpFromPubkey(bytes []byte) *cells.BinaryCell
NewAddrOpFromPubkey - Creates public key hash cell from public key.
func NewAssignPowerOp ¶
func NewAssignPowerOp(nonce cells.ID, quantity uint64, addr *cells.CID) *cells.BinaryCell
NewAssignPowerOp - Creates assign power operation.
func NewDelegatePowerOp ¶
func NewDelegatePowerOp(nonce cells.ID, quantity uint64, addrs ...*cells.CID) *cells.BinaryCell
NewDelegatePowerOp - Creates delegate power operation.
func NewHeaderOp ¶
NewHeaderOp - Creates new header cell. Following format is used: `[height][prev-hash][exec-hash][state-hash][timestamp]`.
func NewIDFromString ¶
func NewIDFromString(body string) *cells.BinaryCell
NewIDFromString - Creates new uint64 cell.
func NewMultihash ¶
func NewMultihash(mhash mh.Multihash) *cells.BinaryCell
NewMultihash - Creates multihash binary cell.
func NewNonceOp ¶
func NewNonceOp(nonce cells.ID) *cells.BinaryCell
NewNonceOp - Creates new uint64 cell.
func NewPubkeyOp ¶
NewPubkeyOp - Creates public key cell.
func NewPubkeyOpFromBytes ¶
func NewPubkeyOpFromBytes(pubkey []byte) *cells.BinaryCell
NewPubkeyOpFromBytes - Creates public key cell.
func NewRootOp ¶
func NewRootOp(ops ...cells.Cell) *cells.BinaryCell
NewRootOp - Creates root operation.
func NewSignatureOp ¶
func NewSignatureOp(body []byte, pk *btcec.PrivateKey) (_ *cells.BinaryCell, err error)
NewSignatureOp - Signs bytes and creates signature operation.
func NewSignatureOpFromBytes ¶
func NewSignatureOpFromBytes(sig []byte) *cells.BinaryCell
NewSignatureOpFromBytes - Creates signature binary cell.
func NewSignedOp ¶
func NewSignedOp(op *cells.BinaryCell, pk *btcec.PrivateKey) (_ *cells.BinaryCell, err error)
NewSignedOp - Signs binary cell and creates signed operation.
Types ¶
This section is empty.