Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc.cjs , rpc.d.ts, rpc.js -> rpc.ts #368

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dist/
docs/
.nyc_output/coverage-final.json
.vscode/settings.json
.vscode/launch.json
benchmark_data/
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
* chore: update cd action by @mpetrunic in https://github.com/ChainSafe/js-libp2p-gossipsub/pull/245


## [5.1.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v5.0.0...v5.1.0) (2022-10-28)


### Features

* Add stream option to limit inbound message size ([#349](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/349)) ([3475242](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/3475242ed254f7647798ab7f36b21909f6cb61da))


### Bug Fixes

* mark import as type ([#365](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/365)) ([19507d9](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/19507d9da5e11702182cfc97300642c5fb78f964))

## [5.0.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v4.2.0...v5.0.0) (2022-10-22)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chainsafe/libp2p-gossipsub",
"version": "5.0.0",
"version": "5.1.0",
"description": "A typescript implementation of gossipsub",
"leadMaintainer": "Cayman Nava <caymannava@gmail.com>",
"files": [
Expand Down Expand Up @@ -152,4 +152,4 @@
"Franck Royer <franck@royer.one>",
"ChainSafe <superadmin@chainsafe.io>"
]
}
}
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { PeerId } from '@libp2p/interface-peer-id'
import { CustomEvent, EventEmitter } from '@libp2p/interfaces/events'

import { MessageCache } from './message-cache.js'
import { RPC, IRPC } from './message/rpc.js'
import { IRPC, RPC } from './message/rpc.js'
import * as constants from './constants.js'
import { shuffle, messageIdToString } from './utils/index.js'
import {
Expand Down Expand Up @@ -196,14 +196,14 @@ enum GossipStatusCode {

type GossipStatus =
| {
code: GossipStatusCode.started
registrarTopologyIds: string[]
heartbeatTimeout: ReturnType<typeof setTimeout>
hearbeatStartMs: number
}
code: GossipStatusCode.started
registrarTopologyIds: string[]
heartbeatTimeout: ReturnType<typeof setTimeout>
hearbeatStartMs: number
}
| {
code: GossipStatusCode.stopped
}
code: GossipStatusCode.stopped
}

interface GossipOptions extends GossipsubOpts {
scoreParams: PeerScoreParams
Expand Down
5 changes: 3 additions & 2 deletions src/message/decodeRpc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { IRPC, RPC } from './rpc'
import { IRPC, RPC } from './rpc.js'

import protobuf from 'protobufjs/minimal.js'

export type DecodeRPCLimits = {
Expand Down Expand Up @@ -244,4 +245,4 @@ function decodePeerInfo(r: protobuf.Reader, l: number) {
}
}
return m
}
}
Loading