1.0.7 • Published 4 months ago
@therootnetwork/api-types v1.0.7
@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.7
4 months ago
1.0.6
5 months ago
1.0.5
5 months ago
1.0.4-next.0
11 months ago
1.0.4
10 months ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.2-next.1
1 year ago
1.0.2-next.0
1 year ago
1.0.1
2 years ago
1.0.0
2 years ago