1.8.9 • Published 12 months ago

certhis v1.8.9

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

CERTHIS-SDK

The Certhis-SDK is a JavaScript library that enables developers to interact with the Certhis API, create accounts, deploy NFT collections, and mint NFTs.

Documentation

✅ Get Data From API

✅ Creating Account (label)

✅ Create NFT Collection From SDK

✅ Mint NFT (2.94 s/NFT)

Installation

$ npm i certhis

Using CommonJS

Requirements (Node.js >= 8.0.0) , WEBJS V4.0.1 .

const { Web3 } = require("web3");
const Certhis = require("certhis").init(Web3);

Usage

(async () => {
  const getLabel = await Certhis.label.one(470);

  console.log(getLabel);
})();

API

Web3 Connector

Create web3 connection

await Certhis.wallet.connect(rpc_url, wallet_passphrase);

Account (Label)

GET

Get single Label object by label_index

await Certhis.label.one(label_index);

Get List of Label Object

await Certhis.label.many(params);

CREATE

Create Label with Web3 (wallet loaded), contract id and label object

await Certhis.label.create({
  web3: web3Inject,
  label_object: {
    creator_address: "0x883f9048236a7Ab0DB1e352fe27760830BcC53B9",
  },
  mulParam: 2,
});

Collection

GET

Get single Collection object by collection_index

await Certhis.collection.one(collection_index);

Get List of Collection Object

await Certhis.collection.many(params);

Get Attributes Collection List by collection_index

await Certhis.collection.attributes(collection_index);

Get number of minted NFT on Collection by collection_index

await Certhis.collection.minted(collection_index);

DEPLOY

Deploy NFT collection on label

await Certhis.collection.create({
  web3: Web3,
  collection_object: {
    collection_name: "Test Collection",
    collection_symbol: "TEST",
    collection_type: true,
  },
  whitelist: ["0x883f9048236a7Ab0DB1e352fe27760830BcC53B9"],
});

Transfer Ownership

await Certhis.collection.transferOwnership({
  web3: Web3,
  collection_index: 979,
  new_owner: "0x883f9048236a7Ab0DB1e352fe27760830BcC53B9",
});

Contract

Get Single Contract Object by contract_id

await Certhis.contract.one(contract_id);

Get Full List of Available Contracts Object

await Certhis.contract.many();

NFT

GET

Get Single NFT Object by nft_id , collection_address and chain_id

await Certhis.nft.one(nft_id, collection_address, chain_id);

Get List of NFT Object

await Certhis.nft.many(params);

MINT

Mint NFT with collection index

await await certhis.nft.mint({
  web3: web3Inject,
  to_wallet: mint_wallet,
  collection_index: 979,
  nft: {
    owner_address: mint_wallet,
    token_uri:
      "https://certhis.mypinata.cloud/ipfs/QmSRE5iGJCnNMti5t6RukoUxPccX3ouDRwKx7Sy5jupcNR/28.json",
  },
  price_value: 0,
  mulParam: 2,
  disable_nonce:false,
  custom_nonce:false,,
  mulParamGasPrice:1
});

User

Get Single User Object by wallet_address

await Certhis.user.one(wallet_address);

Statistic

Get Label Statistics object by label_index

await Certhis.stat.label(label_index);

Get Collection Statistics object by collection_index

await Certhis.stat.collection(collection_index);

Get User Statistics object by wallet_address

await Certhis.stat.user(wallet_address);

Transaction

Get Label Transaction object by label_index

await Certhis.transaction.label(label_index);

Get User Transaction object by wallet_address

await Certhis.transaction.user(wallet_address);

Get Collection Transaction object by collection_index

await Certhis.transaction.collection(collection_index);

Get NFT Transaction object by nft_id and collection_address

await Certhis.transaction.nft(nft_id, collection_address, chain_id, offset_id);

Signature

Generate message signature from Certhis api

await Certhis.sign.sign(wallet_address, sign_header);

Generate safe message signature from Certhis api

await Certhis.sign.SafeSign(wallet_address, sign_header);

Check signature from Certhis api

( sign_id is optional )

await Certhis.sign.check(wallet_address, sign_message, sign_id);
1.8.9

12 months ago

1.8.7

12 months ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.9

1 year ago

1.7.8

1 year ago

1.7.7

1 year ago

1.7.6

1 year ago

1.7.5

1 year ago

1.7.4

1 year ago

1.7.3

1 year ago

1.7.2

2 years ago

1.7.1

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.7.0

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.6.9

2 years ago

1.6.8

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.4.6

2 years ago

1.3.7

2 years ago

1.4.5

2 years ago

1.3.6

2 years ago

1.4.4

2 years ago

1.3.5

2 years ago

1.4.3

2 years ago

1.3.4

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.3.9

2 years ago

1.4.7

2 years ago

1.3.8

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.2.8

2 years ago

1.1.9

2 years ago

1.2.7

2 years ago

1.1.8

2 years ago

1.2.6

2 years ago

1.1.7

2 years ago

1.2.5

2 years ago

1.1.6

2 years ago

1.2.4

2 years ago

1.1.5

2 years ago

1.2.3

2 years ago

1.1.4

2 years ago

1.3.1

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.9

2 years ago

1.1.3

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.2

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago