ipfs-grpc-client

A client library for the IPFS gRPC API

Apache-2.0 OR MIT 230 个版本
安装
npm install ipfs-grpc-client
yarn add ipfs-grpc-client
pnpm add ipfs-grpc-client
bun add ipfs-grpc-client
README

⛔️ DEPRECATED: js-IPFS has been superseded by Helia

📚 Learn more about this deprecation or how to migrate

⚠️ If you continue using this repo, please note that security fixes will not be provided

ipfs-grpc-client

ipfs.tech Discuss codecov CI

A client library for the IPFS gRPC API

Table of contents

Install

$ npm i ipfs-grpc-client

Browser <script> tag

Loading this module through a script tag will make it's exports available as IpfsGrpcClient in the global namespace.

<script src="https://unpkg.com/ipfs-grpc-client/dist/index.min.js"></script>

This module implements part of the IPFS Core API using gRPC over websockets to achieve the bidirectional streaming necessary to have full duplex streams running in the browser.

It's not recommended you use this directly, instead use the ipfs-client to combine this with the ipfs-http-client in order to have HTTP fallback for the missing parts of the API.

Why?

The fetch and XHR APIs do not allow for full-duplex streaming, that is, allowing the client to receive bytes from the response while also adding more bytes to the outgoing request.

This limits what we can do in browsers in terms of the API, for example streaming arbitrarily sized payloads or exposing libp2p duplex streams.

gPRC over websockets has no such limitations so allows us to harness the full power of a remote IPFS node in the browser without the need to work around browser behaviour.

API

create([options])

Parameters

None

Options

An optional object which may have the following keys:

Name Type Default Description
url Multiaddr or string or URL undefined The address of a ipfs-grpc-server to connect to
agent http.Agent undefined A http.Agent used to control HTTP client behaviour (node.js only)

Returns

Type Description
object An instance of the client

Example

import { create } from 'ipfs-gprc-client'

const client = create({
  url: '/ipv4/127.0.0.1/tcp/1234/ws'
})

const id = await client.id()

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

版本列表
0.13.1 2023-05-25
0.13.0 2023-01-12
0.13.0-e64813f6 2023-05-24
0.13.0-b64d4af0 2023-02-01
0.13.0-ab02e8f8 2023-01-17
0.13.0-7b79c1b8 2023-05-25
0.13.0-6eeb1be5 2023-01-13
0.13.0-6d95ce08 2023-05-25
0.13.0-4694e806 2023-05-25
0.13.0-3bcabe38 2023-01-17
0.12.1-a77e40cc.0 2022-10-25
0.12.1-6be59068.0 2022-11-17
0.12.1-6ae5eb7d.0 2022-10-28
0.12.1-58e6f468.0 2022-10-25
0.12.0 2022-10-24
0.12.0-fa578bac 2023-01-11
0.12.0-d1c3abb3 2023-01-11
0.12.0-789ee585 2023-01-11
0.12.0-5f73ecad 2023-01-10
0.12.0-4b4c124c 2023-01-11
0.11.2-dfc43d4e.0 2022-09-26
0.11.2-d75e0a39.0 2022-09-22
0.11.2-d1b0a8a7.0 2022-09-22
0.11.2-acbc1c62.0 2022-09-22
0.11.2-0cee4a4c.0 2022-10-24
0.11.1 2022-09-21
0.11.1-b5456882.0 2022-09-16
0.11.1-7c676f63.0 2022-09-21
0.11.1-7304a0f4.0 2022-09-21
0.11.1-2a830bf5.0 2022-09-21
0.11.0 2022-09-07
0.10.3-a05695fc.0 2022-07-20
0.10.3-8f351a89.0 2022-08-17
0.10.3-83f9882e.0 2022-09-06
0.10.3-39dbf708.0 2022-08-17
0.10.3-051da161.0 2022-09-07
0.10.2 2022-06-24
0.10.2-00bd3dd0.0 2022-06-24
0.10.1 2022-06-23
0.10.1-ddfb899f.0 2022-05-30
0.10.1-be025c89.0 2022-06-01
0.10.1-87e00a69.0 2022-06-01
0.10.1-7be50bd1.0 2022-06-22
0.10.1-764b4adc.0 2022-06-01
0.10.1-70e142ac.0 2022-06-13
0.10.0 2022-05-30
0.9.5-919b27a8.0 2022-05-27
0.9.5-7165bf71.0 2022-05-16
0.9.5-4e93dd5d.0 2022-05-27
0.9.4 2022-04-26
0.9.4-e90b8f13.0 2022-04-05
0.9.4-8f7ce23c.0 2022-04-20
0.9.3 2022-04-05
0.9.3-df1bd1bb.0 2022-03-01
0.9.3-125d42ba.0 2022-03-01
0.9.3-1082fce9.0 2022-02-18
0.9.2 2022-02-07
0.9.2-8d260215.0 2022-01-27
0.9.2-709831f6.0 2022-02-06
0.9.2-3a74c110.0 2022-02-04
0.9.2-3a5d61d4.0 2022-01-27
0.9.2-383dc07d.0 2022-02-04
0.9.2-2c8ec080.0 2022-01-28
0.9.2-2afef2eb.0 2022-01-27
0.9.1-rc.5 2022-01-21
0.9.1-rc.4 2022-01-20
0.9.1-rc.3 2022-01-13
0.9.1-rc.2 2021-12-17
0.9.1-rc.1 2021-12-16
0.9.1-rc.0 2021-12-15
0.9.1 2022-01-27
0.9.1-fbe14923.0 2022-01-27
0.9.1-cca6e321.0 2022-01-27
0.9.1-a6b201af.0 2022-01-27
0.9.1-7fe0da57f.0 2022-01-26
0.9.1-6cb3a87e.0 2022-01-27
0.9.1-5439a0e.0 2022-01-26
0.9.0 2021-12-15
0.8.3-rc.13 2021-12-15
0.8.3-rc.12 2021-12-15
0.8.3-rc.11 2021-12-15
0.8.3-rc.10 2021-12-15
0.8.3-rc.9 2021-12-13
0.8.3-rc.8 2021-12-13
0.8.3-rc.7 2021-12-06
0.8.3-rc.6 2021-12-06
0.8.3-rc.5 2021-12-06
0.8.3-rc.4 2021-12-03
0.8.3-rc.3 2021-12-03
0.8.3-rc.2 2021-12-03
0.8.3-rc.1 2021-12-03
0.8.3-rc.0 2021-11-24
0.8.2-rc.3 2021-11-24
0.8.2-rc.2 2021-11-22
0.8.2-rc.1 2021-11-19
0.8.2-rc.0 2021-11-19
0.8.2 2021-11-24
0.8.1-rc.1 2021-11-19
0.8.1-rc.0 2021-11-12
0.8.1 2021-11-19
0.8.0 2021-11-12
0.7.2-rc.6 2021-11-12
0.7.2-rc.5 2021-11-04
0.7.2-rc.4 2021-10-08
0.7.2-rc.3 2021-10-02
0.7.2-rc.2 2021-09-30
0.7.2-rc.1 2021-09-30
0.7.2-rc.0 2021-09-28
0.7.1-rc.5 2021-09-28
0.7.1-rc.3 2021-09-27
0.7.1-rc.2 2021-09-25
0.7.1-rc.1 2021-09-25
0.7.1-rc.0 2021-09-24
0.7.1 2021-09-28
0.7.0 2021-09-24
0.6.6-rc.18 2021-09-24
0.6.6-rc.17 2021-09-24
0.6.6-rc.16 2021-09-23
0.6.6-rc.15 2021-09-23
0.6.6-rc.14 2021-09-23
0.6.6-rc.13 2021-09-23
0.6.6-rc.12 2021-09-23
0.6.6-rc.1 2021-09-21
0.6.6-rc.0 2021-09-17
0.6.5-rc.0 2021-09-17
0.6.5 2021-09-17
0.6.4-rc.11 2021-09-17
0.6.4-rc.8 2021-09-14
0.6.4-rc.5 2021-09-08
0.6.4-rc.4 2021-09-07
0.6.4-rc.2 2021-09-06
0.6.4-rc.1 2021-09-06
0.6.4 2021-09-17
0.6.3-rc.8 2021-09-02
0.6.3-rc.7 2021-09-02
0.6.3-rc.6 2021-08-31
0.6.3-rc.5 2021-08-26
0.6.3-rc.4 2021-08-26
0.6.3-rc.3 2021-08-26
0.6.3-rc.2 2021-08-26
0.6.3 2021-09-02
0.6.2-rc.4 2021-08-25
0.6.2-rc.3 2021-08-25
0.6.2-rc.1 2021-08-17
0.6.2 2021-08-25
0.6.1-rc.1 2021-08-17
0.6.1 2021-08-17
0.6.0 2021-08-17
0.5.1-rc.10 2021-08-17
0.5.1-rc.9 2021-08-17
0.5.1-rc.7 2021-08-16
0.5.1-rc.6 2021-08-12
0.5.1-rc.5 2021-08-12
0.5.1-rc.4 2021-08-12
0.5.0 2021-08-11
0.4.2-rc.11 2021-08-11
0.4.2-rc.10 2021-08-10
0.4.2-rc.8 2021-08-10
0.4.2-rc.6 2021-08-09
0.4.2-rc.3 2021-08-05
0.4.2-rc.2 2021-08-04
0.4.2-rc.1 2021-07-30
0.4.1-rc.7 2021-07-30
0.4.1-rc.5 2021-07-28
0.4.1-rc.2 2021-07-28
0.4.1-rc.1 2021-07-28
0.4.1 2021-07-30
0.4.0 2021-07-27
0.3.4-rc.17 2021-07-27
0.3.4-rc.14 2021-07-27
0.3.4-rc.11 2021-07-27
0.3.4-rc.9 2021-07-27
0.3.4-rc.8 2021-07-27
0.3.4-rc.6 2021-07-19
0.3.4-rc.3 2021-07-01
0.3.4-rc.2 2021-06-25
0.3.4-rc.1 2021-06-18
0.3.3-rc.4 2021-06-18
0.3.3-rc.3 2021-06-18
0.3.3-rc.2 2021-06-15
0.3.3-rc.1 2021-06-10
0.3.3 2021-06-18
0.3.2-rc.4 2021-06-05
0.3.2-rc.3 2021-06-01
0.3.2-rc.1 2021-05-26
0.3.2 2021-06-05
0.3.1-rc.11 2021-05-25
0.3.1-rc.7 2021-05-25
0.3.1-rc.6 2021-05-13
0.3.1-rc.5 2021-05-11
0.3.1-rc.1 2021-05-11
0.3.1 2021-05-26
0.3.0 2021-05-10
0.2.5-rc.32 2021-05-10
0.2.5-rc.31 2021-05-10
0.2.5-rc.30 2021-05-07
0.2.5-rc.29 2021-05-07
0.2.5-rc.28 2021-05-06
0.2.5-rc.27 2021-05-06
0.2.5-rc.26 2021-05-04
0.2.5-rc.25 2021-05-04
0.2.5-rc.24 2021-05-04
0.2.5-rc.22 2021-05-04
0.2.5-rc.21 2021-05-02
0.2.5-rc.20 2021-05-01
0.2.5-rc.19 2021-04-30
0.2.5-rc.18 2021-04-30
0.2.5-rc.17 2021-04-29
0.2.5-rc.14 2021-04-28
0.2.5-rc.11 2021-04-28
0.2.5-rc.3 2021-03-31
0.2.5 2021-05-07
0.2.4 2021-03-10
0.2.3-rc.5 2021-02-22
0.2.3-rc.4 2021-02-21
0.2.3 2021-03-09
0.2.2 2021-02-08
0.2.1 2021-02-02
0.2.0 2021-02-01
0.1.3-rc.3 2021-01-30
0.1.2 2021-01-22
0.1.1 2021-01-20
0.1.0 2021-01-15
0.0.1-rc.5959 2021-01-15
0.0.1-rc.5958 2021-01-13
0.0.1-rc.5957 2020-12-18
0.0.1-e85e5b6e.0 2023-01-09
0.0.1-563806f1.0 2023-01-09
0.0.1-2a6fede5.0 2023-01-10
0.0.0 2020-11-02