Documentation ¶
Index ¶
- func AccountCellRegisterCap(configCell *ConfigCell, account celltype.DasAccount) (uint64, error)
- func BindConfigCellDataFromTx(tx *types.Transaction, configCell *ConfigCell) error
- func CalAccountCellExpiredAt(param celltype.CalAccountCellExpiredAtParam, registerAt int64) (uint64, error)
- func CalAccountSpend(account celltype.DasAccount) uint64
- func CalBuyAccountYearSec(years uint) int64
- func CalDasAwardCap(cap uint64, rate float64) (uint64, error)
- func CalPreAccountCellCap(years uint, price, quote, discountRate uint64, configCell *ConfigCell, ...) (uint64, error)
- func GetDasLockScript(chainType celltype.ChainType, address Address) (*ckbTypes.Script, error)
- func GetOwnerArgsFromDasLockArgs(args []byte) (celltype.ChainType, string)
- func GetScriptTypeFromLockScript(ckbSysScript *utils.SystemScripts, lockScript *ckbTypes.Script) (celltype.LockScriptType, error)
- func IsCancelAccountAuctionTx(tx types.Transaction) bool
- func IsCancelAccountSaleTx(tx types.Transaction) bool
- func IsConfirmProposeTx(ctx context.Context, rpcClient rpc.Client, inputs []*types.CellInput) error
- func IsEditManagerTx(tx types.Transaction) bool
- func IsEditRecordsTx(tx types.Transaction) bool
- func IsRenewAccountTx(tx types.Transaction) bool
- func IsStartAccountAuctionTx(tx types.Transaction) bool
- func IsStartAccountSaleTx(tx types.Transaction) (bool, int)
- func IsTransferAccountTx(tx types.Transaction) bool
- func VersionCompatibleAccountCellDataFromSlice(cellData *celltype.DataEntity) (*celltype.VersionAccountCell, error)
- type AccountCell
- func (a *AccountCell) Bytes() ([]byte, error)
- func (a *AccountCell) CellDep() *types.CellDep
- func (a *AccountCell) CellInput() *types.CellInput
- func (a *AccountCell) DasLockManagerBytes() []byte
- func (a *AccountCell) DasLockOwnerBytes() []byte
- func (a *AccountCell) ExpiredAt() (int64, error)
- func (a *AccountCell) GetDepWitness() *celltype.CellDepWithWitness
- func (a *AccountCell) GetNewAccountCellData() (*celltype.VersionAccountCell, error)
- func (a *AccountCell) GetOldAccountCellData() (*celltype.VersionAccountCell, error)
- func (a *AccountCell) JudgeExpireStatus(expiredCheck, frozenCheck bool, frozenRange int64) (bool, bool, error)
- func (a *AccountCell) NextAccountId() (celltype.DasAccountId, error)
- func (a *AccountCell) ParseDasLockArgsIndexType() (celltype.DasLockCodeHashIndexType, celltype.DasLockCodeHashIndexType)
- func (a *AccountCell) SameManager(indexHashType celltype.DasLockCodeHashIndexType, args []byte) error
- func (a *AccountCell) SameOwner(indexHashType celltype.DasLockCodeHashIndexType, args []byte) error
- func (a *AccountCell) SameTx(target *AccountCell) bool
- func (a *AccountCell) SetNextAccountId(accountId celltype.DasAccountId)
- func (a *AccountCell) ToDasLockArgParam() *celltype.DasLockParam
- func (a *AccountCell) TypeInputCell(checkOwnerSign bool) *celltype.TypeInputCell
- func (a *AccountCell) TypeInputCellInConfirmPropose() *celltype.TypeInputCell
- func (a *AccountCell) UpdateAccountCellInfos(testNet bool, callback func(param *InOutputWitnessCallbackParam) bool, ...) (*UpdateAccountCellInfo, error)
- func (a *AccountCell) UpdateAccountCellNextId(testNet bool, nextAccountId celltype.DasAccountId) (*UpdateAccountCellInfo, error)
- type AccountCellList
- type Address
- func (r Address) BTCLockScript() (*types.Script, error)
- func (r Address) CKBLockScript(singleSigCellHash types.Hash) (*types.Script, error)
- func (r Address) DasLockScript(indexType celltype.DasLockCodeHashIndexType) (*types.Script, error)
- func (r Address) DasLockScript_CKB() (*types.Script, error)
- func (r Address) HexBys(singleSigCellHash types.Hash) ([]byte, error)
- func (r Address) OriginStr() string
- func (r Address) Str() string
- type ConfigCell
- func (c *ConfigCell) AccountCellBaseCap() (uint64, error)
- func (c *ConfigCell) AccountCellPrepareCap() (uint64, error)
- func (c *ConfigCell) AccountExpirationGracePeriod() (uint32, error)
- func (c *ConfigCell) AccountMaxLength() (uint32, error)
- func (c *ConfigCell) AccountTTL() (uint32, error)
- func (c *ConfigCell) ApplyMaxWaitingBlockNumber() (uint32, error)
- func (c *ConfigCell) ApplyMinWaitingBlockNumber() (uint32, error)
- func (c *ConfigCell) CKBMultiSoCellDepHash() types.Hash
- func (c *ConfigCell) CKBSingleSoCellDepHash() types.Hash
- func (c *ConfigCell) ETHSoCellDepHash() types.Hash
- func (c *ConfigCell) EditManagerFee() (uint64, error)
- func (c *ConfigCell) EditManagerThrottle() (uint32, error)
- func (c *ConfigCell) EditRecordsFee() (uint64, error)
- func (c *ConfigCell) EditRecordsThrottle() (uint32, error)
- func (c *ConfigCell) GetAccountPrice(account celltype.DasAccount, isRenew bool) (*celltype.PriceConfig, uint64, error)
- func (c *ConfigCell) GetAccountPriceConfig(account celltype.DasAccount) (*celltype.PriceConfig, error)
- func (c *ConfigCell) GetAccountRenewPrice(account celltype.DasAccount) (*celltype.PriceConfig, uint64, error)
- func (c *ConfigCell) GetProfitOfChannel() (decimal.Decimal, error)
- func (c *ConfigCell) GetProfitOfInviter() (decimal.Decimal, error)
- func (c *ConfigCell) GetRegisterProfitConfig() *celltype.ConfigCellProfitRate
- func (c *ConfigCell) GetWitnessCellDep(cfgType celltype.TableType) *celltype.CellDepWithWitness
- func (c *ConfigCell) IncomeCellBaseCap() (uint64, error)
- func (c *ConfigCell) IncomeCellMinTransferValue() (uint64, error)
- func (c *ConfigCell) InvitedDiscount() (uint32, error)
- func (c *ConfigCell) InvitedDiscountFormatDiscountObj() (float64, error)
- func (c *ConfigCell) InvitedDiscountFormatValue() (float64, error)
- func (c *ConfigCell) OpenStatus() (uint8, error)
- func (c *ConfigCell) PreparedFeeCapacity() (uint64, error)
- func (c *ConfigCell) ProposalMaxPreAccountContain() (uint32, error)
- func (c *ConfigCell) ProposalMinConfirmRequire() (uint8, error)
- func (c *ConfigCell) ProposalMinExtendInterval() (uint8, error)
- func (c *ConfigCell) ProposalMinRecycleInterval() (uint8, error)
- func (c *ConfigCell) Ready() bool
- func (c *ConfigCell) ReleaseRules() ([]ReleaseRuleItem, error)
- func (c *ConfigCell) RemoveConfigFromMap(tableType celltype.TableType)
- func (c *ConfigCell) StorePreservedAccountMap(xx *configcells.CfgPreservedAccountXX)
- func (c *ConfigCell) TRONSoCellDepHash() types.Hash
- func (c *ConfigCell) TransferAccountFee() (uint64, error)
- func (c *ConfigCell) TransferThrottle() (uint32, error)
- type FindTargetTypeScriptRet
- type InOutputWitnessCallbackParam
- type PayTypeLockScriptsRet
- type PreCurAccountCell
- type ProfitRate
- type QuoteCell
- type ReleaseRuleItem
- type ReqFindTargetTypeScriptParam
- type UpdateAccountCellInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountCellRegisterCap ¶
func AccountCellRegisterCap(configCell *ConfigCell, account celltype.DasAccount) (uint64, error)
func BindConfigCellDataFromTx ¶
func BindConfigCellDataFromTx(tx *types.Transaction, configCell *ConfigCell) error
func CalAccountCellExpiredAt ¶
func CalAccountCellExpiredAt(param celltype.CalAccountCellExpiredAtParam, registerAt int64) (uint64, error)
func CalAccountSpend ¶
func CalAccountSpend(account celltype.DasAccount) uint64
func CalBuyAccountYearSec ¶
func CalPreAccountCellCap ¶
func CalPreAccountCellCap(years uint, price, quote, discountRate uint64, configCell *ConfigCell, account celltype.DasAccount, isRenew bool) (uint64, error)
func GetDasLockScript ¶
func GetOwnerArgsFromDasLockArgs ¶
ckb argsHexStr, eth address
func GetScriptTypeFromLockScript ¶
func GetScriptTypeFromLockScript(ckbSysScript *utils.SystemScripts, lockScript *ckbTypes.Script) (celltype.LockScriptType, error)
func IsCancelAccountAuctionTx ¶
func IsCancelAccountAuctionTx(tx types.Transaction) bool
func IsCancelAccountSaleTx ¶
func IsCancelAccountSaleTx(tx types.Transaction) bool
func IsConfirmProposeTx ¶
func IsEditManagerTx ¶
func IsEditManagerTx(tx types.Transaction) bool
func IsEditRecordsTx ¶
func IsEditRecordsTx(tx types.Transaction) bool
func IsRenewAccountTx ¶
func IsRenewAccountTx(tx types.Transaction) bool
func IsStartAccountAuctionTx ¶
func IsStartAccountAuctionTx(tx types.Transaction) bool
func IsStartAccountSaleTx ¶
func IsStartAccountSaleTx(tx types.Transaction) (bool, int)
func IsTransferAccountTx ¶
func IsTransferAccountTx(tx types.Transaction) bool
func VersionCompatibleAccountCellDataFromSlice ¶
func VersionCompatibleAccountCellDataFromSlice(cellData *celltype.DataEntity) (*celltype.VersionAccountCell, error)
Types ¶
type AccountCell ¶
type AccountCell struct { CellCap uint64 `json:"cell_cap"` AccountId celltype.DasAccountId `json:"account_id"` Status uint8 `json:"status"` Point types.OutPoint `json:"point"` WitnessStatus celltype.AccountCellStatus `json:"witness_status"` Data []byte `json:"-"` WitnessData []byte `json:"-"` DasLockArgs []byte `json:"-"` }
func BytesToAccountCellTxValue ¶
func BytesToAccountCellTxValue(bys []byte) (*AccountCell, error)
func (*AccountCell) Bytes ¶
func (a *AccountCell) Bytes() ([]byte, error)
func (*AccountCell) CellDep ¶
func (a *AccountCell) CellDep() *types.CellDep
func (*AccountCell) CellInput ¶
func (a *AccountCell) CellInput() *types.CellInput
func (*AccountCell) DasLockManagerBytes ¶
func (a *AccountCell) DasLockManagerBytes() []byte
func (*AccountCell) DasLockOwnerBytes ¶
func (a *AccountCell) DasLockOwnerBytes() []byte
func (*AccountCell) ExpiredAt ¶
func (a *AccountCell) ExpiredAt() (int64, error)
func (*AccountCell) GetDepWitness ¶
func (a *AccountCell) GetDepWitness() *celltype.CellDepWithWitness
func (*AccountCell) GetNewAccountCellData ¶
func (a *AccountCell) GetNewAccountCellData() (*celltype.VersionAccountCell, error)
func (*AccountCell) GetOldAccountCellData ¶
func (a *AccountCell) GetOldAccountCellData() (*celltype.VersionAccountCell, error)
func (*AccountCell) JudgeExpireStatus ¶
func (*AccountCell) NextAccountId ¶
func (a *AccountCell) NextAccountId() (celltype.DasAccountId, error)
func (*AccountCell) ParseDasLockArgsIndexType ¶
func (a *AccountCell) ParseDasLockArgsIndexType() (celltype.DasLockCodeHashIndexType, celltype.DasLockCodeHashIndexType)
func (*AccountCell) SameManager ¶
func (a *AccountCell) SameManager(indexHashType celltype.DasLockCodeHashIndexType, args []byte) error
func (*AccountCell) SameOwner ¶
func (a *AccountCell) SameOwner(indexHashType celltype.DasLockCodeHashIndexType, args []byte) error
func (*AccountCell) SameTx ¶
func (a *AccountCell) SameTx(target *AccountCell) bool
func (*AccountCell) SetNextAccountId ¶
func (a *AccountCell) SetNextAccountId(accountId celltype.DasAccountId)
func (*AccountCell) ToDasLockArgParam ¶
func (a *AccountCell) ToDasLockArgParam() *celltype.DasLockParam
func (*AccountCell) TypeInputCell ¶
func (a *AccountCell) TypeInputCell(checkOwnerSign bool) *celltype.TypeInputCell
func (*AccountCell) TypeInputCellInConfirmPropose ¶
func (a *AccountCell) TypeInputCellInConfirmPropose() *celltype.TypeInputCell
func (*AccountCell) UpdateAccountCellInfos ¶
func (a *AccountCell) UpdateAccountCellInfos( testNet bool, callback func(param *InOutputWitnessCallbackParam) bool, setOwner func() (indexType celltype.DasLockCodeHashIndexType, args []byte), setManager func() (indexType celltype.DasLockCodeHashIndexType, args []byte)) (*UpdateAccountCellInfo, error)
callback method return 'true' means use the oldData to newData
func (*AccountCell) UpdateAccountCellNextId ¶
func (a *AccountCell) UpdateAccountCellNextId(testNet bool, nextAccountId celltype.DasAccountId) (*UpdateAccountCellInfo, error)
type AccountCellList ¶
type AccountCellList []AccountCell
func (AccountCellList) AccountCellExistMap ¶
func (a AccountCellList) AccountCellExistMap() map[types.Hash]bool
func (AccountCellList) Obj ¶
func (a AccountCellList) Obj(i int) interface{}
func (AccountCellList) Size ¶
func (a AccountCellList) Size() int
type Address ¶
type Address string
func PubkeyHashToAddress ¶
func (Address) CKBLockScript ¶
func (Address) DasLockScript ¶
type ConfigCell ¶
func NewDefaultConfigCell ¶
func NewDefaultConfigCell(neyType celltype.DasNetType) *ConfigCell
func (*ConfigCell) AccountCellBaseCap ¶
func (c *ConfigCell) AccountCellBaseCap() (uint64, error)
func (*ConfigCell) AccountCellPrepareCap ¶
func (c *ConfigCell) AccountCellPrepareCap() (uint64, error)
func (*ConfigCell) AccountExpirationGracePeriod ¶
func (c *ConfigCell) AccountExpirationGracePeriod() (uint32, error)
frozen
func (*ConfigCell) AccountMaxLength ¶
func (c *ConfigCell) AccountMaxLength() (uint32, error)
account_max_length
func (*ConfigCell) AccountTTL ¶
func (c *ConfigCell) AccountTTL() (uint32, error)
func (*ConfigCell) ApplyMaxWaitingBlockNumber ¶
func (c *ConfigCell) ApplyMaxWaitingBlockNumber() (uint32, error)
apply_max_waiting_time
func (*ConfigCell) ApplyMinWaitingBlockNumber ¶
func (c *ConfigCell) ApplyMinWaitingBlockNumber() (uint32, error)
apply_min_waiting_time
func (*ConfigCell) CKBMultiSoCellDepHash ¶
func (c *ConfigCell) CKBMultiSoCellDepHash() types.Hash
func (*ConfigCell) CKBSingleSoCellDepHash ¶
func (c *ConfigCell) CKBSingleSoCellDepHash() types.Hash
func (*ConfigCell) ETHSoCellDepHash ¶
func (c *ConfigCell) ETHSoCellDepHash() types.Hash
func (*ConfigCell) EditManagerFee ¶
func (c *ConfigCell) EditManagerFee() (uint64, error)
func (*ConfigCell) EditManagerThrottle ¶
func (c *ConfigCell) EditManagerThrottle() (uint32, error)
func (*ConfigCell) EditRecordsFee ¶
func (c *ConfigCell) EditRecordsFee() (uint64, error)
func (*ConfigCell) EditRecordsThrottle ¶
func (c *ConfigCell) EditRecordsThrottle() (uint32, error)
func (*ConfigCell) GetAccountPrice ¶
func (c *ConfigCell) GetAccountPrice(account celltype.DasAccount, isRenew bool) (*celltype.PriceConfig, uint64, error)
func (*ConfigCell) GetAccountPriceConfig ¶
func (c *ConfigCell) GetAccountPriceConfig(account celltype.DasAccount) (*celltype.PriceConfig, error)
func (*ConfigCell) GetAccountRenewPrice ¶
func (c *ConfigCell) GetAccountRenewPrice(account celltype.DasAccount) (*celltype.PriceConfig, uint64, error)
func (*ConfigCell) GetProfitOfChannel ¶
func (c *ConfigCell) GetProfitOfChannel() (decimal.Decimal, error)
func (*ConfigCell) GetProfitOfInviter ¶
func (c *ConfigCell) GetProfitOfInviter() (decimal.Decimal, error)
func (*ConfigCell) GetRegisterProfitConfig ¶
func (c *ConfigCell) GetRegisterProfitConfig() *celltype.ConfigCellProfitRate
func (*ConfigCell) GetWitnessCellDep ¶
func (c *ConfigCell) GetWitnessCellDep(cfgType celltype.TableType) *celltype.CellDepWithWitness
func (*ConfigCell) IncomeCellBaseCap ¶
func (c *ConfigCell) IncomeCellBaseCap() (uint64, error)
func (*ConfigCell) IncomeCellMinTransferValue ¶
func (c *ConfigCell) IncomeCellMinTransferValue() (uint64, error)
func (*ConfigCell) InvitedDiscount ¶
func (c *ConfigCell) InvitedDiscount() (uint32, error)
func (*ConfigCell) InvitedDiscountFormatDiscountObj ¶
func (c *ConfigCell) InvitedDiscountFormatDiscountObj() (float64, error)
func (*ConfigCell) InvitedDiscountFormatValue ¶
func (c *ConfigCell) InvitedDiscountFormatValue() (float64, error)
func (*ConfigCell) OpenStatus ¶
func (c *ConfigCell) OpenStatus() (uint8, error)
func (*ConfigCell) PreparedFeeCapacity ¶
func (c *ConfigCell) PreparedFeeCapacity() (uint64, error)
func (*ConfigCell) ProposalMaxPreAccountContain ¶
func (c *ConfigCell) ProposalMaxPreAccountContain() (uint32, error)
func (*ConfigCell) ProposalMinConfirmRequire ¶
func (c *ConfigCell) ProposalMinConfirmRequire() (uint8, error)
func (*ConfigCell) ProposalMinExtendInterval ¶
func (c *ConfigCell) ProposalMinExtendInterval() (uint8, error)
func (*ConfigCell) ProposalMinRecycleInterval ¶
func (c *ConfigCell) ProposalMinRecycleInterval() (uint8, error)
func (*ConfigCell) Ready ¶
func (c *ConfigCell) Ready() bool
func (*ConfigCell) ReleaseRules ¶
func (c *ConfigCell) ReleaseRules() ([]ReleaseRuleItem, error)
func (*ConfigCell) RemoveConfigFromMap ¶
func (c *ConfigCell) RemoveConfigFromMap(tableType celltype.TableType)
func (*ConfigCell) StorePreservedAccountMap ¶
func (c *ConfigCell) StorePreservedAccountMap(xx *configcells.CfgPreservedAccountXX)
func (*ConfigCell) TRONSoCellDepHash ¶
func (c *ConfigCell) TRONSoCellDepHash() types.Hash
func (*ConfigCell) TransferAccountFee ¶
func (c *ConfigCell) TransferAccountFee() (uint64, error)
func (*ConfigCell) TransferThrottle ¶
func (c *ConfigCell) TransferThrottle() (uint32, error)
type FindTargetTypeScriptRet ¶
type FindTargetTypeScriptRet struct { Output *ckbTypes.CellOutput Data []byte Tx *ckbTypes.Transaction PreviousIndex uint }
func FindTargetTypeScriptByInputList ¶
func FindTargetTypeScriptByInputList(p *ReqFindTargetTypeScriptParam) (*FindTargetTypeScriptRet, error)
type InOutputWitnessCallbackParam ¶
type InOutputWitnessCallbackParam struct { OldData *celltype.VersionAccountCell NewBuilder *celltype.AccountCellDataBuilder ExpiredAt *int64 }
type PayTypeLockScriptsRet ¶
type PayTypeLockScriptsRet struct { FeeCellScript *ckbTypes.Script UserScript *ckbTypes.Script ScriptType celltype.LockScriptType DasLockArgsParam celltype.DasLockArgsPairParam Err error }
func PayTypeLockScripts ¶
func PayTypeLockScripts(sysWallet *ckbTypes.Script, sysScripts *utils.SystemScripts, payType celltype.ChainType, address Address) PayTypeLockScriptsRet
type PreCurAccountCell ¶
type PreCurAccountCell struct { Pre *AccountCell `json:"pre"` Cur *AccountCell `json:"cur"` }
type ProfitRate ¶
type ProfitRate struct { Invite float64 Channel float64 ProposeCreate float64 ProposeConfirm float64 MergeRate float64 }
func ParseRegisterProfitConfig ¶
func ParseRegisterProfitConfig(configCell *ConfigCell) (*ProfitRate, error)
type ReleaseRuleItem ¶
type UpdateAccountCellInfo ¶
type UpdateAccountCellInfo struct { OldData *celltype.VersionAccountCell OutputAccountCell *celltype.AccountCell NewData *celltype.VersionAccountCell }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.