Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CacheManager

Hierarchy

  • CacheManager

Index

Constructors

constructor

  • Parameters

    • indexer: Indexer
    • publicKey: HexString
    • chainCode: HexString
    • Default value infos: LockScriptMappingInfo[] = getDefaultInfos()
    • __namedParameters: { TransactionCollector: TransactionCollector; livenessCheckIntervalSeconds: number; logger: (level: string, message: string) => void; pollIntervalSeconds: number; rpc: CKBRPC }
      • TransactionCollector: TransactionCollector
      • livenessCheckIntervalSeconds: number
      • logger: (level: string, message: string) => void
          • (level: string, message: string): void
          • Parameters

            • level: string
            • message: string

            Returns void

      • pollIntervalSeconds: number
      • rpc: CKBRPC
    • Optional masterPublicKey: HexString

    Returns CacheManager

Methods

getChangeKeys

  • Returns PublicKeyInfo[]

getLiveCellsCache

  • getLiveCellsCache(): Map<string, Cell>
  • Returns Map<string, Cell>

getMasterPublicKeyInfo

  • Returns PublicKeyInfo | undefined

getNextChangePublicKeyInfo

  • Returns PublicKeyInfo

getNextReceivingPublicKeyInfo

  • Returns PublicKeyInfo

getReceivingKeys

  • Returns PublicKeyInfo[]

loop

  • loop(): Promise<void>
  • Returns Promise<void>

running

  • running(): boolean
  • Returns boolean

scheduleLoop

  • scheduleLoop(): void
  • Returns void

start

  • start(): void
  • Returns void

startForever

  • startForever(): void
  • Returns void

stop

  • stop(): void
  • Returns void

Static fromMnemonic

  • fromMnemonic(indexer: Indexer, mnemonic: string, infos?: LockScriptMappingInfo[], options: { TransactionCollector: typeof BaseTransactionCollector; livenessCheckIntervalSeconds?: undefined | number; logger?: undefined | ((level: string, message: string) => void); needMasterPublicKey?: undefined | false | true; pollIntervalSeconds?: undefined | number; rpc?: RPC }): CacheManager
  • Parameters

    • indexer: Indexer
    • mnemonic: string
    • Default value infos: LockScriptMappingInfo[] = getDefaultInfos()
    • options: { TransactionCollector: typeof BaseTransactionCollector; livenessCheckIntervalSeconds?: undefined | number; logger?: undefined | ((level: string, message: string) => void); needMasterPublicKey?: undefined | false | true; pollIntervalSeconds?: undefined | number; rpc?: RPC }
      • TransactionCollector: typeof BaseTransactionCollector
      • Optional livenessCheckIntervalSeconds?: undefined | number
      • Optional logger?: undefined | ((level: string, message: string) => void)
      • Optional needMasterPublicKey?: undefined | false | true
      • Optional pollIntervalSeconds?: undefined | number
      • Optional rpc?: RPC

    Returns CacheManager

Static loadFromKeystore

  • loadFromKeystore(indexer: Indexer, path: string, password: string, infos?: LockScriptMappingInfo[], options: { TransactionCollector: typeof BaseTransactionCollector; livenessCheckIntervalSeconds?: undefined | number; logger?: undefined | ((level: string, message: string) => void); needMasterPublicKey?: undefined | false | true; pollIntervalSeconds?: undefined | number; rpc?: RPC }): CacheManager
  • Load from keystore, if needMasterPublicKey set to true or origin = "ckb-cli", will enable masterPublicKey

    Parameters

    • indexer: Indexer
    • path: string
    • password: string
    • Default value infos: LockScriptMappingInfo[] = getDefaultInfos()
    • options: { TransactionCollector: typeof BaseTransactionCollector; livenessCheckIntervalSeconds?: undefined | number; logger?: undefined | ((level: string, message: string) => void); needMasterPublicKey?: undefined | false | true; pollIntervalSeconds?: undefined | number; rpc?: RPC }
      • TransactionCollector: typeof BaseTransactionCollector
      • Optional livenessCheckIntervalSeconds?: undefined | number
      • Optional logger?: undefined | ((level: string, message: string) => void)
      • Optional needMasterPublicKey?: undefined | false | true
      • Optional pollIntervalSeconds?: undefined | number
      • Optional rpc?: RPC

    Returns CacheManager

Generated using TypeDoc