1.0.3 • Published 1 month ago
@therootnetwork/api-types v1.0.3
@therootnetwork/api-types
A type package that supplements @therootnetwork/api
, and makes The Root Network specific types available from @polkadot/{api,types}/lookup
.
Install
yarn add -D @therootnetwork/api-types
Usage
- Add import
@therootnetwork/api-types
at the top to augument The Root Network specific types to the standard@polkadot/types
import "@therootnetwork/api-types";
// after import, TRN types are automatically augmented to the standard `@polkadot/types` package
import { type Option } from "@polkadot/types";
import { type PalletNftCollectionInformation } from "@polkadot/types/lookup";
import { ApiPromise } from "@polkadot/api";
import { getApiOptions, getPublicProvider } from "@therootnetwork/api";
const api = await ApiPromise.create({
...getApiOptions(),
...getPublicProvider("root"),
});
const info = (await api.query.nft.collectionInfo(1124)) as Option<PalletNftCollectionInformation>;
1.0.3
1 month ago
1.0.2
3 months ago
1.0.2-next.1
3 months ago
1.0.2-next.0
3 months ago
1.0.1
6 months ago
1.0.0
9 months ago