Mpool

The Mpool methods are for interacting with the message pool. The message pool manages all incoming and outgoing 'messages' going over the network.

mpoolBatchPush

mpoolBatchPush (signedMessage: Array<SignedMessage>): Promise<Array<Cid>>

Batch pushes a signed message to mempool.

Parameters:

Returns:

Promise<Array<Cid>>

Source: index.d.ts, line 380, character 16

mpoolBatchPushMessage

mpoolBatchPushMessage (message: Array<Message>, messageSendSpec: MessageSendSpec): Promise<Array<SignedMessage>>

Batch pushes a unsigned message to mempool.

Parameters:

Returns:

Promise<Array<SignedMessage>>

Source: index.d.ts, line 384, character 23

mpoolBatchPushUntrusted

mpoolBatchPushUntrusted (signedMessage: Array<SignedMessage>): Promise<Array<Cid>>

Batch pushes a signed message to mempool from untrusted sources.

Parameters:

Returns:

Promise<Array<Cid>>

Source: index.d.ts, line 388, character 25

mpoolClear

mpoolClear (bool: boolean): Promise<void>

Clears pending messages from the mpool

Parameters:

  • bool: boolean

Returns:

Promise<void>

Source: index.d.ts, line 392, character 12

mpoolGetConfig

mpoolGetConfig (): Promise<MpoolConfig>

Returns (a copy of) the current mpool config

Returns:

Promise<MpoolConfig>

Source: index.d.ts, line 396, character 16

mpoolGetNonce

mpoolGetNonce (address: string): Promise<number>

Gets next nonce for the specified sender. Note that this method may not be atomic. Use MpoolPushMessage instead.

Parameters:

  • address: string

Returns:

Promise<number>

Source: index.d.ts, line 401, character 15

mpoolPending

mpoolPending (tipSetKey: Cid[]): Promise<Array<SignedMessage>>

Returns pending mempool messages.

Parameters:

  • tipSetKey: Cid[]

Returns:

Promise<Array<SignedMessage>>

Source: index.d.ts, line 405, character 14

mpoolPush

mpoolPush (signedMessage: SignedMessage): Promise<Cid>

Pushes a signed message to mempool.

Parameters:

Returns:

Promise<Cid>

Source: index.d.ts, line 409, character 11

mpoolPushMessage

mpoolPushMessage (message: Message, messageSendSpec: MessageSendSpec): Promise<SignedMessage>

Atomically assigns a nonce, signs, and pushes a message to mempool. maxFee is only used when GasFeeCap/GasPremium fields aren't specified

Parameters:

Returns:

Promise<SignedMessage>

Source: index.d.ts, line 418, character 18

mpoolPushUntrusted

mpoolPushUntrusted (signedMessage: SignedMessage): Promise<Cid>

Pushes a signed message to mempool from untrusted sources.

Parameters:

Returns:

Promise<Cid>

Source: index.d.ts, line 422, character 20

mpoolSelect

mpoolSelect (tipSetKey: Cid[], num: number): Promise<Array<SignedMessage>>

Returns a list of pending messages for inclusion in the next block

Parameters:

  • tipSetKey: Cid[]
  • num: number

Returns:

Promise<Array<SignedMessage>>

Source: index.d.ts, line 426, character 13

mpoolSetConfig

mpoolSetConfig (mpoolConfig: MpoolConfig): Promise<void>

Sets the mpool config to (a copy of) the supplied config

Parameters:

Returns:

Promise<void>

Source: index.d.ts, line 430, character 16

mpoolSub

mpoolSub (handler: (data: MpoolUpdate) => void): [() => void, Promise<void>]

Parameters:

Returns:

[() => void, Promise<void>]

Source: index.d.ts, line 431, character 10