0.1.3 • Published 10 months ago

arseeding-js-esm v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

arseeding-js

Install

npm i arseeding-js

example

import { genAPI, getTokenTagByEver } from 'arseeding-js'
const instance = await genAPI(window.ethereum)

const arseedUrl = 'https://arseed.web3infra.dev'
const data = Buffer.from('........')
const tokenTags = await getTokenTagByEver('usdc')  // everpay supported all tokens
const payCurrencyTag = tokenTags[0]
const ops = {
    tags: [{name: "Content-Type",value:'data type'}]
}
const res = await instance.sendAndPay(arseedUrl, data, payCurrencyTag, ops)
console.log('res',res)

// review data
curl --location --request GET 'https://arseed.web3infra.dev/{{res.order.itemId}}'

example2 - node

import { genNodeAPI } from 'arseeding-js'

const instance = await genNodeAPI('YOUR PRIVATE KEY')
const tokenTags = await getTokenTagByEver('usdc')  // everpay supported all tokens
const payCurrencyTag = tokenTags[0]

instance.sendAndPay('https://arseed.web3infra.dev', Buffer.from('aa bb cc'), payCurrencyTag, {})

example3 - upload folder

import {batchPayOrders, uploadFolder, uploadFolderAndPay} from "arseeding-js/cjs/uploadFolder";

const path = './src/nft'
const priv = '9d8bdd0d2f1e73dffe9252ee6f38325b7e195669541f76559760ef615a588be8'
const url = 'https://arseed.web3infra.dev'
const tokenTags = await getTokenTagByEver('usdc')  // everpay supported all tokens
const payCurrencyTag = tokenTags[0]
const indexFile = ''

uploadFolderAndPay(path,priv,url,payCurrencyTag, indexFile).then((res)=>{
  console.log(res)
}).catch((err)=>{
  console.log(err)
})

// review manifest Data
curl --location --request GET 'https://arseed.web3infra.dev/{res.maniId}'

uploadFolderAndPay can be divided by uploadFolder and batchPayOrders

0.0.10

11 months ago

0.0.11

11 months ago

0.1.0

11 months ago

0.1.2

10 months ago

0.1.1

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.5

11 months ago

0.1.3

10 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago