@unique-nft/sapphire-mainnet-types
TypeScript icon, indicating that this package has built-in type declarations

1003.70.0 • Public • Published

@unique-nft/sapphire-mainnet-types

Unique network api types

Do not edit by hand, those types are generated automatically, and definitions are located in chain repo

Using types

Install library:

yarn add --dev @unique-nft/sapphire-mainnet-types

Replace polkadot.js types with our chain types adding corresponding path override to the tsconfig compilerOptions.paths section:

// in tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@polkadot/types/lookup": ["node_modules/@unique-nft/sapphire-mainnet-types/types-lookup"]
    }
  }
}

Since polkadot v7 api augmentations not loaded by default, in every file, where you need to access api.tx, api.query, api.rpc, etc; you should explicitly import corresponding augmentation before any other polkadot.js related import:

import '@unique-nft/sapphire-mainnet-types/augment-api';

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @unique-nft/sapphire-mainnet-types

    Weekly Downloads

    6,218

    Version

    1003.70.0

    License

    MIT

    Unpacked Size

    2.46 MB

    Total Files

    125

    Last publish

    Collaborators

    • ashkuc
    • fend25
    • ut-akuznetsov
    • lach
    • nonfungible