Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fission-suite/client

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fission-suite/client - npm Package Compare versions

Comparing version 1.0.0-rc to 2.0.0-rc

dist/index.cjs.js

10

package.json
{
"name": "@fission-suite/client",
"version": "1.0.0-rc",
"version": "2.0.0-rc",
"description": "Fission Web API TypeScript Client ",
"keywords": [],
"main": "dist/client.cjs.js",
"module": "dist/client.esm.js",
"browser": "dist/client.umd.js",
"typings": "dist/types/client.d.ts",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"browser": "dist/index.umd.js",
"typings": "dist/types/index.d.ts",
"files": [

@@ -11,0 +11,0 @@ "dist"

@@ -16,3 +16,3 @@ ![](https://github.com/fission-suite/web-api/raw/master/assets/logo.png?sanitize=true)

```
$ npm install --save @fission-suit/client
$ npm install --save @fission-suite/client
```

@@ -22,4 +22,50 @@

### Utility
`getContentURL`
Returns the url to access the given CID on our service.
Params:
- cid: CID (string) **required**
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```js
import { getContentURL } from '@fission-suite/client'
const formattedURL = getContentURL("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u")
// "https://runfission.com/ipfs/QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u"
```
### Unauthenticated
`register`
Registers a user for the Fission service.
Params:
- username: string **required**
- password: string **required**
- email: string
Example:
```js
import { register } from '@fission-suite/client'
await register("username", "password", "email@email.com")
```
`peers`
Gets the address for all IPFS nodes in the Fission Network.
Example:
```js
import { peers } from '@fission-suite/client'
await peers()
// [
// '/ip4/3.215.160.238/tcp/4001/ipfs/QmVLEz2SxoNiFnuyLpbXsH6SvjPTrHNMU88vCQZyhgBzgw',
// '/ip4/184.68.124.102/tcp/64417/ipfs/QmQ2Jo91xQyVjhw1kmpk9eeHj6A4W1u5BYdh5xjfC5h11g'
// ]
```
`content`

@@ -31,27 +77,44 @@

- cid: CID (string) **required**
- baseURL: string *defaults to fission web-api at `https://hostless.dev`*
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```
```js
import { content } from '@fission-suite/client'
const helloWorld = await content("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u")
// "Hello World"
```
`url`
### Authenticated
*These methods require a username/password from the fission webserver. These can be provisioned through our [Fission CLI](https://github.com/fission-suite/cli).*
Returns a formatted url for a given CID.
`verify`
Verifies the given credentialls.
Params:
- cid: CID (string) **required**
- baseURL: string *defaults to fission web-api at `https://hostless.dev`*
- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```js
import { verify } from '@fission-suite/client'
await verify({ username: "username", password: "password" })
// true
```
import { url } from '@fission-suite/client'
const formattedURL = url("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u")
`resetPassword`
Verifies the given credentialls.
Params:
- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```js
import { resetPassword } from '@fission-suite/client'
await resetPassword("newPassword", { username: "username", password: "password" })
// "newPassword"
```
### Authenticated
*These methods require a username/password from the fission webserver. These can be provisioned by the [Heroku addon](https://elements.heroku.com/addons/interplanetary-fission).*
`add`

@@ -64,7 +127,7 @@

- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://hostless.dev`*
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
- name: string *optional name for your file, defaults to `undefined`*
Example:
```
```js
import { add } from '@fission-suite/client'

@@ -77,2 +140,3 @@ const auth = { username: "username", password: "password" }

const cid = await add(content, auth)
// "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u"
```

@@ -87,9 +151,10 @@

- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://hostless.dev`*
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```
```js
import { remove } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
await remove("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u", auth)
// undefined
```

@@ -104,15 +169,52 @@

- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://hostless.dev`*
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```
```js
import { pin } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
await pin("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u", auth)
// undefined
```
`cids`
Gets all CIDs associated with the given user.
Params:
- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```js
import { cids } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
await cids(auth)
// [
// "QmYwXpFw1QGAWxEnQWFwLuVpdbupaBcEz2DTTRRRsCt9WR",
// "QmYp9d8BC2HhDCUVH7JEUZAd6Hbxrc5wBRfUs8TqazJJP9",
// ]
```
`updateDNS`
Updates the users associated subdomain to point at the given CID
Params:
- cid: CID (string) **required**
- auth: Auth ({username: string, password: string}) **required**
- baseURL: string *defaults to fission web-api at `https://runfission.com`*
Example:
```js
import { updateDNS } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
await updateDNS("QmYwXpFw1QGAWxEnQWFwLuVpdbupaBcEz2DTTRRRsCt9WR", auth)
// "username.runfission.com"
```
### Fission objects
For repeated calls, instantiate a fission object:
```
```js
import Fission, { FissionUser } from '@fission-suite/client'

@@ -119,0 +221,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc