Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CacheManager

Hierarchy

  • CacheManager

Index

Constructors

constructor

  • Parameters

    • indexer: Indexer
    • publicKey: HexString
    • chainCode: HexString
    • infos: LockScriptMappingInfo[] | undefined
    • __namedParameters: { TransactionCollector: TransactionCollector; livenessCheckIntervalSeconds: undefined | number; logger: undefined | ((level: string, message: string) => void); pollIntervalSeconds: undefined | number; rpc: undefined | CKBRPC }
      • TransactionCollector: TransactionCollector
      • livenessCheckIntervalSeconds: undefined | number
      • logger: undefined | ((level: string, message: string) => void)
      • pollIntervalSeconds: undefined | number
      • rpc: undefined | 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[] | undefined, 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
    • infos: LockScriptMappingInfo[] | undefined
    • 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[] | undefined, 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
    • infos: LockScriptMappingInfo[] | undefined
    • 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