1.0.10 • Published 8 months ago

4everland-pinning v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

4everland-sdk

Install

npm i 4everland-sdk

yarn add 4everland-sdk

Esmodule

import { Client } from '4everland-sdk'

const client = new Client({
  authServiceUrl: '',
  pinningServiceUrl: '',
  endpoint: '',
  storageType: 'IPFS'
})
let address = '' // metamask address

const signMessage = await client.getSignText(address)

// Use signMessage for signing
// ....

// Verification signature
// if expiration expired, you need Verification signature again
const { expiration } = await client.verifySign(address, signature)

// upload
const task = client.upload({
  Key: file.name,
  Body: file,
  ContentType: file.type
})
task.progress((e) => {
  // loaded , total
})
const { cid } = await task.done()

const { requestid } = await client.addPin({
  cid
})
// specified pin
await clinet.getPin(requestid)

// pin list
await clinet.listPin()

CommonJs

const { Client } = require('4everland-sdk')

Browser

<script src="../dist/4everland-sdk.umd.min.js"></script>

<script>

  const { Client } = Clientland

</script>
1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago