Documentation ¶
Index ¶
- Constants
- func CreateCrossChainRedeemScript(genesisHash common.Uint256) []byte
- func CreateMultiSigRedeemScript(m int, pubkeys []*crypto.PublicKey) ([]byte, error)
- func CreateStandardRedeemScript(pubKey *crypto.PublicKey) ([]byte, error)
- func IsMultiSig(code []byte) bool
- func IsStandard(code []byte) bool
- func PublicKeyToDepositProgramHash(pubKey []byte) (*common.Uint168, error)
- func PublicKeyToStandardCodeHash(pubKey []byte) (*common.Uint160, error)
- func PublicKeyToStandardProgramHash(pubKey []byte) (*common.Uint168, error)
- type Contract
- func CreateCRDIDContractByCode(code []byte) (*Contract, error)
- func CreateDepositContractByCode(code []byte) (*Contract, error)
- func CreateDepositContractByPubKey(pubkey *crypto.PublicKey) (*Contract, error)
- func CreateMultiSigContract(m int, pubkeys []*crypto.PublicKey) (*Contract, error)
- func CreateMultiSigContractByCode(code []byte) (*Contract, error)
- func CreateStandardContract(pubKey *crypto.PublicKey) (*Contract, error)
- type ContractType
- type PrefixType
Constants ¶
View Source
const (
CROSSCHAIN = 0xAF
)
Extension OP_CODE
Variables ¶
This section is empty.
Functions ¶
func CreateCrossChainRedeemScript ¶ added in v0.3.0
func CreateMultiSigRedeemScript ¶ added in v0.3.0
func CreateStandardRedeemScript ¶ added in v0.3.0
func IsMultiSig ¶ added in v0.2.2
func IsStandard ¶ added in v0.2.2
func PublicKeyToDepositProgramHash ¶ added in v0.2.2
func PublicKeyToStandardCodeHash ¶ added in v0.2.2
Types ¶
type Contract ¶
type Contract struct { Code []byte Prefix PrefixType }
Contract include the redeem script and hash prefix
func CreateCRDIDContractByCode ¶ added in v0.4.0
func CreateDepositContractByCode ¶ added in v0.2.2
func CreateDepositContractByPubKey ¶ added in v0.2.2
func CreateMultiSigContract ¶ added in v0.3.0
func CreateMultiSigContractByCode ¶ added in v0.2.2
func CreateStandardContract ¶ added in v0.3.0
func (*Contract) ToCodeHash ¶ added in v0.2.2
func (*Contract) ToProgramHash ¶ added in v0.2.2
type ContractType ¶ added in v0.2.2
type ContractType byte
const ( Signature ContractType = iota MultiSig Custom )
func GetCodeType ¶ added in v0.2.2
func GetCodeType(code []byte) ContractType
type PrefixType ¶ added in v0.2.2
type PrefixType byte
const ( PrefixStandard PrefixType = 0x21 PrefixMultiSig PrefixType = 0x12 PrefixCrossChain PrefixType = 0x4B PrefixDeposit PrefixType = 0x1F PrefixCRDID PrefixType = 0x67 )
func GetPrefixType ¶ added in v0.2.2
func GetPrefixType(programHash common.Uint168) PrefixType
Source Files ¶
Click to show internal directories.
Click to hide internal directories.