Documentation ¶
Index ¶
- Constants
- func ChequeCellArgs(senderLock, receiverLock *types.Script) ([]byte, error)
- func GenerateSudtAmount(amount *big.Int) []byte
- func GetMaxMatureBlockNumber(client rpc.Client, ctx context.Context) (uint64, error)
- func IsChequeCell(o *types.CellOutput, systemScripts *SystemScripts) bool
- func IsMature(cell *indexer.LiveCell, maxMatureBlockNumber uint64) bool
- func ParseSudtAmount(outputData []byte) (*big.Int, error)
- func RemoveCellOutput(cellOutputs []*types.CellOutput, index int) []*types.CellOutput
- func RemoveCellOutputData(cellOutputData [][]byte, index int) [][]byte
- func SinceFromAbsoluteBlockNumber(blockNumber uint64) uint64
- func SinceFromAbsoluteEpochNumber(epochNumber uint64) uint64
- func SinceFromAbsoluteTimestamp(timestamp uint64) uint64
- func SinceFromRelativeBlockNumber(blockNumber uint64) uint64
- func SinceFromRelativeEpochNumber(epochNumber uint64) uint64
- func SinceFromRelativeTimestamp(timestamp uint64) uint64
- type Option
- func ACPCell(acpCell *SystemScriptCell) Option
- func ChequeCell(chequeCell *SystemScriptCell) Option
- func DaoCell(daoCell *SystemScriptCell) Option
- func SUDTCell(sudtCell *SystemScriptCell) Option
- func SecpMultiSigCell(secpMultiSigCell *SystemScriptCell) Option
- func SecpSingleSigCell(secpSingleSigCell *SystemScriptCell) Option
- type SystemScriptCell
- type SystemScripts
Constants ¶
View Source
const ( FlagSinceRelative = 0x8000000000000000 FlagSinceEpochNumber = 0x2000000000000000 FlagSinceBlockNumber = 0x0 FlagSinceTimestamp = 0x4000000000000000 )
define some useful const https://github.com/nervosnetwork/ckb/blob/35392279150fe4e61b7904516be91bda18c46f05/test/src/utils.rs#L24
View Source
const ( AnyoneCanPayCodeHashOnLina = "0xd369597ff47f29fbc0d47d2e3775370d1250b85140c670e4718af712983a2354" AnyoneCanPayCodeHashOnAggron = "0x3419a1c09eb2567f6552ee7a8ecffd64155cffe0f1796e6e61ec088d740c1356" )
Variables ¶
This section is empty.
Functions ¶
func ChequeCellArgs ¶ added in v0.3.0
func GenerateSudtAmount ¶ added in v0.2.0
func GetMaxMatureBlockNumber ¶ added in v0.41.0
GetMaxMatureBlockNumber return max mature block number
func IsChequeCell ¶ added in v0.3.0
func IsChequeCell(o *types.CellOutput, systemScripts *SystemScripts) bool
func RemoveCellOutput ¶ added in v0.3.0
func RemoveCellOutput(cellOutputs []*types.CellOutput, index int) []*types.CellOutput
func RemoveCellOutputData ¶ added in v0.3.0
func SinceFromAbsoluteBlockNumber ¶ added in v0.3.0
func SinceFromAbsoluteEpochNumber ¶ added in v0.3.0
func SinceFromAbsoluteTimestamp ¶ added in v0.3.0
func SinceFromRelativeBlockNumber ¶ added in v0.3.0
func SinceFromRelativeEpochNumber ¶ added in v0.3.0
func SinceFromRelativeTimestamp ¶ added in v0.3.0
Types ¶
type Option ¶ added in v0.3.0
type Option func(*SystemScripts)
func ACPCell ¶ added in v0.3.0
func ACPCell(acpCell *SystemScriptCell) Option
ACPCell set a custom acp system script cell to SystemScripts
func ChequeCell ¶ added in v0.3.0
func ChequeCell(chequeCell *SystemScriptCell) Option
ChequeCell set a custom cheque script cell to SystemScripts
func DaoCell ¶ added in v0.3.0
func DaoCell(daoCell *SystemScriptCell) Option
DaoCell set a custom dao cell to SystemScripts
func SUDTCell ¶ added in v0.3.0
func SUDTCell(sudtCell *SystemScriptCell) Option
SUDTCell set a custom sudt system script cell to SystemScripts
func SecpMultiSigCell ¶ added in v0.3.0
func SecpMultiSigCell(secpMultiSigCell *SystemScriptCell) Option
SecpMultiSigCell set a custom secp mutisig cell to SystemScripts
func SecpSingleSigCell ¶ added in v0.3.0
func SecpSingleSigCell(secpSingleSigCell *SystemScriptCell) Option
SecpSingleSigCell set a custom secp single sig cell to SystemScripts
type SystemScriptCell ¶
type SystemScripts ¶
type SystemScripts struct { SecpSingleSigCell *SystemScriptCell SecpMultiSigCell *SystemScriptCell DaoCell *SystemScriptCell ACPCell *SystemScriptCell SUDTCell *SystemScriptCell ChequeCell *SystemScriptCell }
func NewSystemScripts ¶
func NewSystemScripts(client rpc.Client, options ...Option) (*SystemScripts, error)
NewSystemScripts returns a SystemScripts object
Click to show internal directories.
Click to hide internal directories.