Versions in this module Expand all Collapse all v0 v0.2.0 Sep 8, 2022 Changes in this version + const CotaIdLen + var ErrInvalidClassInfo = errors.New("class info is invalid") + var ProviderSet = wire.NewSet(NewData, NewDBMigration, NewCheckInfoRepo, NewRegisterCotaKvPairRepo, ...) + func GenerateLockHash(entry biz.Entry) (lockHashStr string, lockHashCRC32 uint32, err error) + func GenerateReceiverLock(slice []byte) biz.Script + func GenerateSenderLock(entry biz.Entry) (lockScript biz.Script, err error) + func NewCheckInfoRepo(data *Data, logger *logger.Logger) biz.CheckInfoRepo + func NewClaimedCotaNftKvPairRepo(data *Data, logger *logger.Logger) biz.ClaimedCotaNftKvPairRepo + func NewClassInfoRepo(data *Data, logger *logger.Logger) biz.ClassInfoRepo + func NewDefineCotaNftKvPairRepo(data *Data, logger *logger.Logger) biz.DefineCotaNftKvPairRepo + func NewHoldCotaNftKvPairRepo(data *Data, logger *logger.Logger) biz.HoldCotaNftKvPairRepo + func NewInvalidDateRepo(data *Data, logger *logger.Logger) biz.InvalidDataRepo + func NewIssuerInfoRepo(data *Data, logger *logger.Logger) biz.IssuerInfoRepo + func NewKvPairRepo(data *Data, logger *logger.Logger) biz.KvPairRepo + func NewMintCotaKvPairRepo(data *Data, logger *logger.Logger) biz.MintCotaKvPairRepo + func NewRegisterCotaKvPairRepo(data *Data, logger *logger.Logger) biz.RegisterCotaKvPairRepo + func NewTransferCotaKvPairRepo(data *Data, logger *logger.Logger) biz.TransferCotaKvPairRepo + func NewWithdrawCotaNftKvPairRepo(data *Data, logger *logger.Logger) biz.WithdrawCotaNftKvPairRepo + func NewWithdrawExtraInfoRepo(data *Data, logger *logger.Logger) biz.WithdrawExtraInfoRepo + type BlockSyncer struct + func NewBlockSyncer(claimedCotaUsecase *biz.ClaimedCotaNftKvPairUsecase, ...) BlockSyncer + func (bp BlockSyncer) Rollback(ctx context.Context, blockNumber uint64) error + func (bp BlockSyncer) Sync(ctx context.Context, block *ckbTypes.Block, checkInfo biz.CheckInfo, ...) error + type CheckInfo struct + BlockHash string + BlockNumber uint64 + CheckType biz.CheckType + CreatedAt time.Time + ID uint + UpdatedAt time.Time + type CkbNodeClient struct + Mode string + Rpc rpc.Client + func NewCkbNodeClient(conf *config.CkbNode, logger *logger.Logger) (*CkbNodeClient, error) + type ClaimedCotaNftKvPair struct + BlockNumber uint64 + CotaId string + CotaIdCRC uint32 + CreatedAt time.Time + ID uint + LockHash string + LockHashCrc uint32 + OutPoint string + OutPointCrc uint32 + TokenIndex uint32 + UpdatedAt time.Time + type ClassInfo struct + Audio string + BlockNumber uint64 + Characteristic string + CotaId string + CreatedAt time.Time + Description string + ID uint + Image string + Localization string + Model string + Name string + Properties string + Symbol string + UpdatedAt time.Time + Version string + Video string + type ClassInfoVersion struct + ActionType uint8 + Audio string + BlockNumber uint64 + Characteristic string + CotaId string + CreatedAt time.Time + Description string + ID uint + Image string + Localization string + Model string + Name string + OldAudio string + OldBlockNumber uint64 + OldCharacteristic string + OldDescription string + OldImage string + OldLocalization string + OldModel string + OldName string + OldProperties string + OldSymbol string + OldVersion string + OldVideo string + Properties string + Symbol string + TxIndex uint32 + UpdatedAt time.Time + Version string + Video string + type CotaWitnessArgsParser struct + func NewCotaWitnessArgsParser(client *CkbNodeClient) CotaWitnessArgsParser + func (c CotaWitnessArgsParser) Parse(tx *ckbTypes.Transaction, txIndex uint32, cotaType SystemScript) ([]biz.Entry, error) + type DBMigration struct + func NewDBMigration(data *Data, logger *logger.Logger) *DBMigration + func (m *DBMigration) Down() error + func (m *DBMigration) Up() error + type Data struct + func NewData(conf *config.Database, logger *logger.Logger) (*Data, func(), error) + type DefineCotaNftKvPair struct + BlockNumber uint64 + Configure uint8 + CotaId string + CreatedAt time.Time + ID uint + Issued uint32 + LockHash string + LockHashCRC uint32 + Total uint32 + UpdatedAt time.Time + type DefineCotaNftKvPairVersion struct + ActionType uint8 + BlockNumber uint64 + Configure uint8 + CotaId string + CreatedAt time.Time + ID uint + Issued uint32 + LockHash string + OldBlockNumber uint64 + OldIssued uint32 + Total uint32 + TxIndex uint32 + UpdatedAt time.Time + type HoldCotaNftKvPair struct + BlockNumber uint64 + Characteristic string + Configure uint8 + CotaId string + CreatedAt time.Time + ID uint + LockHash string + LockHashCRC uint32 + State uint8 + TokenIndex uint32 + UpdatedAt time.Time + type HoldCotaNftKvPairVersion struct + ActionType uint8 + BlockNumber uint64 + Characteristic string + Configure uint8 + CotaId string + CreatedAt time.Time + ID uint + LockHash string + OldBlockNumber uint64 + OldCharacteristic string + OldLockHash string + OldState uint8 + State uint8 + TokenIndex uint32 + TxIndex uint32 + UpdatedAt time.Time + type IssuerInfo struct + Avatar string + BlockNumber uint64 + CreatedAt time.Time + Description string + ID uint + Localization string + LockHash string + Name string + UpdatedAt time.Time + Version string + type IssuerInfoVersion struct + ActionType uint8 + Avatar string + BlockNumber uint64 + CreatedAt time.Time + Description string + ID uint + Localization string + LockHash string + Name string + OldAvatar string + OldBlockNumber uint64 + OldDescription string + OldLocalization string + OldName string + OldVersion string + TxIndex uint32 + UpdatedAt time.Time + Version string + type MetadataSyncer struct + func NewMetadataSyncer(kvPairUsecase *biz.SyncKvPairUsecase, ...) MetadataSyncer + func (bp MetadataSyncer) Rollback(ctx context.Context, blockNumber uint64) error + func (bp MetadataSyncer) Sync(ctx context.Context, block *ckbTypes.Block, checkInfo biz.CheckInfo, ...) error + type Option func(*Data) + type RegisterCotaKvPair struct + BlockNumber uint64 + CreatedAt time.Time + ID uint + LockHash string + UpdatedAt time.Time + type Script struct + Args string + ArgsCrc uint32 + CodeHash string + CodeHashCrc uint32 + CreatedAt time.Time + HashType int64 + ID uint + UpdatedAt time.Time + type SystemScript struct + Args []byte + CodeHash ckbTypes.Hash + DepType ckbTypes.DepType + HashType ckbTypes.ScriptHashType + OutPoint ckbTypes.OutPoint + type SystemScriptOption func(o *SystemScripts) + type SystemScripts struct + CotaRegistryType SystemScript + CotaType SystemScript + func NewSystemScripts(client *CkbNodeClient, logger *logger.Logger) SystemScripts + type WithdrawCotaNftKvPair struct + BlockNumber uint64 + Characteristic string + Configure uint8 + CotaId string + CotaIdCRC uint32 + CreatedAt time.Time + ID uint + LockHash string + LockHashCrc uint32 + LockScriptId uint + OutPoint string + OutPointCrc uint32 + ReceiverLockScriptId uint + State uint8 + TokenIndex uint32 + TxHash string + UpdatedAt time.Time + Version uint8