Skip to content

add more info on the different sighash flags to docs #384

@mr-zwets

Description

@mr-zwets

add info on all the different sighash flags to docs, related to #310

currently the docs only have the following info under sdk/signature-templates

Advanced Usage

HashType

The default hashtype is HashType.SIGHASH_ALL | HashType.SIGHASH_UTXOS because this is the most secure option for smart contract use cases.

export enum HashType {
  SIGHASH_ALL = 0x01,
  SIGHASH_NONE = 0x02,
  SIGHASH_SINGLE = 0x03,
  SIGHASH_UTXOS = 0x20,
  SIGHASH_ANYONECANPAY = 0x80,
}

the sig type does not include any of this info

Transaction Signature

sig: Byte sequence representing a transaction signature. Generally 65 bytes long.

and neither does checksig

checkSig()

bool checksig(sig s, pubkey pk)

Checks that transaction signature s is valid for the current transaction and matches with public key pk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions