W3Block Docs
  • 🚀Start here
    • Welcome to the Docs
    • Integrated Blockchains
  • 👨‍💻Dev Docs
    • API
      • Getting Started
      • Authentication
      • Commerce API services
        • Company Administration
          • Companies (Admin)
          • Assets (Admin)
          • Tags (Admin)
          • Products (Admin)
            • Order Rules (Admin)
          • Orders (Admin)
          • Faq (Admin)
          • Webhooks (Admin)
        • Products
        • Orders
        • Webhooks
        • Faq
        • Globals
      • Key API Services
        • Authentication
        • Companies
        • Tokens
          • Contracts
            • External Contacts
            • Royalty Eligible
          • Categories
            • Subcategories
          • Token Collections
            • Token Editions
          • Metadata
        • Blockchain
        • Cloudinary
        • Integration
          • Ecommerce
            • Associate Tokens
            • Hooks
        • Users
        • Vouchers
  • 📘Knowledge Base
    • First Steps
    • FAQ
    • Glossary
Powered by GitBook
On this page
  • How can i use the key services?
  • How to instantiate the Key SDK
  1. Dev Docs
  2. API

Key API Services

PreviousGlobalsNextAuthentication

Last updated 2 years ago

The Key API Services are the core of what you will need to create new contracts, and mint and transfer tokens.

Some Examples of what you can do with the key API Services:

  • Create a contract to mint tokens

  • Create your own token collections

  • mint your own tokens

  • transfer tokens between wallets

How can i use the key services?

Here is how you can mint your first token:

  1. Check if your wallet has some balance and if not transfer some to it

  2. Contracts Create your first contract draft and then publish it

  3. Categories Subcategories Check if the existing categories and subcategories are what you need to create your token, if not, then create your own!

  4. Token CollectionsCreate a token collection draft describing the details you want your tokens to have

  5. Token Collections Publish the collection!!!

How to instantiate the Key SDK

// Some codeimport { W3blockIdSDK } from '@w3block/sdk-id';
import { W3blockKeySDK } from '@w3block/sdk-key';

const idSdk = new W3blockIdSDK({
    baseURL: 'https://api-id.pixway.io',
    autoRefresh: true,
});

// Authenticate using idSdk with your credentials
// example: idSdk.authenticate({email: ..., password: ..., tenantId: ...})

const sdk = new W3blockKeySDK({
    idSdk,
    baseUrl: 'https://api.pixway.io'
});

To instantiate the you must create the before and pass it as argument into the Key SDK instantiation. Because of this accomplishment, you don't need to worry about the authentication layer using commerce SDK. The ID SDK will do this job for you and send the credentials to each request if you're authenticated - specially if autoRefresh is set as true.

👨‍💻
Key SDK,
ID SDK