3.0.2 • Published 3 months ago

@glif/filecoin-message-confirmer v3.0.2

Weekly downloads
35
License
(Apache-2.0 OR MI...
Repository
github
Last release
3 months ago

filecoin-message

Install

npm i @glif/filecoin-message-confirmer

Usage

const confirmMessage = require('@glif/filecoin-message-confirmer')

const messageCid =
  'bafy2bzacebnyjf5oxzvts5f4ifqgee2yrqb7epdepnw3y2yk25ju5su2episg'
const optionalConfig = {}
const confirmed = await confirmMessage(messageCid, optionalConfig)
// > true if message is confirmed
// > false if message happened far in the past (just use a block explorer) or if the message isn't yet confirmed after ~7-8 minutes after sending

The confirmer takes an optional config:

interface ConfirmerConfig {
  apiAddress: string
  token?: string
  // the amount of time to timeout the request
  timeoutAfter?: number
  // the number of times this function calls itself, recursively
  totalRetries?: number
}

It's recommended to stick with the default values for timeoutAfter (90000 ms) and totalRetries (5 times)

Test

npm i npm run test

License

This repository is dual-licensed under Apache 2.0 and MIT terms.

3.0.2

3 months ago

3.0.0

4 months ago

2.0.44

1 year ago

2.0.43

1 year ago

2.0.7

2 years ago

2.0.8

2 years ago

2.0.1

2 years ago

2.0.0-beta.12

2 years ago

2.0.0-beta.8

2 years ago

2.0.0-beta.7

2 years ago

2.0.0-beta.4

2 years ago

2.0.0-alpha.9

2 years ago

2.0.0-alpha.11

2 years ago

2.0.0-alpha.10

2 years ago

2.0.0-beta.0

2 years ago

2.0.0-alpha.13

2 years ago

1.1.1

3 years ago

1.1.1-alpha.5

3 years ago

1.1.1-alpha.0

3 years ago

1.1.0

3 years ago

1.1.0-beta.19

3 years ago

1.1.0-beta.17

3 years ago

1.1.0-beta.16

3 years ago

1.1.0-beta.14

3 years ago

1.1.0-beta.11

3 years ago

1.1.0-beta.10

3 years ago

1.1.0-beta.7

3 years ago

1.1.0-beta.1

3 years ago

1.1.0-beta.0

3 years ago

1.0.0-beta.5

4 years ago

1.0.0-beta.4

4 years ago

1.0.0-beta.3

4 years ago

1.0.0-beta.2

4 years ago

1.0.0-beta.1

4 years ago

1.0.0-beta.0

4 years ago