0.3.9 • Published 9 months ago

@decent.xyz/sdk v0.3.9

Weekly downloads
-
License
GNU GPL V3.0
Repository
github
Last release
9 months ago

Welcome to the Decent SDK

Core Resources

Protocol Documentation: includes module descriptions, available functions for each contract, and protocol deployment addresses.

Protocol Repository: you can find community discussions about new PR's and issues in the Discussions panel of this repository.

SDK Repository

Starter Repo: the fastest way to publish your first application using Decent is to fork this repository (NextJS, Tailwind, RainbowKit, DecentSDK).

Getting Started

npm i @decent.xyz/sdk

Example deployment of Decent's 721A contract
import { DecentSDK, edition, ipfs } from '@decent.xyz/sdk';
// wagmi is a core dependency to deploy contracts; DecentSDK get functions can be used without
 import { useSigner, useNetwork } from 'wagmi';

// Define your metadata schema before deploying contract
  const deployFunction = async () => {
        const ipfsHash = await ipfs.createMetadata(metadata).then((res: any) => {
          return res
        });

        Decent's defaults to storing metadata on-chain on L2's and on IPFS for Ethereum mainnet
        let onChainMetadata = null;
        let offChainMetadata = '';

        if ( chain.id === 1 || chain.id == 5 ) {
          offChainMetadata = `${ipfsHash.url}?`;
        } else {
          onChainMetadata = {
            metadata: ipfsHash?.data?.metadata || "",
          }
        }

        const sdk = new DecentSDK(chain.id, signer);

        let nft;
        try {
          nft = await edition.deploy(
            sdk,
            collectionName,
            symbol,
            editionSize,
            tokenPrice,
            maxTokenPurchase,
            creatorRoyalty,
            offChainMetadata,
            onChainMetadata,
          );
        } 
      }
    

For the artists of every industry 🤝

0.3.9

9 months ago

0.3.8

10 months ago

0.3.7

11 months ago

0.3.6

12 months ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.1

1 year ago

0.2.0

2 years ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago