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 GenerateSudtAmount ¶
func GetMaxMatureBlockNumber ¶
GetMaxMatureBlockNumber return max mature block number
func IsChequeCell ¶
func IsChequeCell(o *types.CellOutput, systemScripts *SystemScripts) bool
func RemoveCellOutput ¶
func RemoveCellOutput(cellOutputs []*types.CellOutput, index int) []*types.CellOutput
func RemoveCellOutputData ¶
Types ¶
type Option ¶
type Option func(*SystemScripts)
func ACPCell ¶
func ACPCell(acpCell *SystemScriptCell) Option
ACPCell set a custom acp system script cell to SystemScripts
func ChequeCell ¶
func ChequeCell(chequeCell *SystemScriptCell) Option
ChequeCell set a custom cheque script cell to SystemScripts
func DaoCell ¶
func DaoCell(daoCell *SystemScriptCell) Option
DaoCell set a custom dao cell to SystemScripts
func SUDTCell ¶
func SUDTCell(sudtCell *SystemScriptCell) Option
SUDTCell set a custom sudt system script cell to SystemScripts
func SecpMultiSigCell ¶
func SecpMultiSigCell(secpMultiSigCell *SystemScriptCell) Option
SecpMultiSigCell set a custom secp mutisig cell to SystemScripts
func SecpSingleSigCell ¶
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.