Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@unique-nft/sdk
Advanced tools
The @unique-nft/sdk package implements the SDK methods via the REST API. The package implements all the basic methods for working with the Unique Network SDK.
The @unique-nft/sdk package implements the SDK methods via the REST API. The package implements all the basic methods for working with the SDK:
The package is under construction. Check the SDK package methods list to learn more about the methods, that will be implemented in the @unique-nft/sdk package.
npm install @unique-nft/sdk
import { Sdk, Options } from '@unique-nft/sdk';
const options: Options = {
baseUrl: '<REST API URL>'
};
const sdk = new Sdk(options);
In the baseUrl
parameter, you must pass one of the paths to the Unique Network
https://rest.unique.network/opal/v1
https://rest.unique.network/quartz/v1
https://rest.unique.network/unique/v1
To be able to sign extrinsics, you need to install the Accounts
package
npm install @unique-nft/accounts
Pass the singer
in the parameters when creating the Client
object
import { KeyringOptions } from "@polkadot/keyring/types";
import { KeyringProvider } from '@unique-nft/accounts/keyring';
import { Sdk } from "@unique-nft/sdk";
const options: KeyringOptions = {
type: 'sr25519',
};
const provider = new KeyringProvider(options);
await provider.init();
const signer = provider.addSeed('<seed of account>');
const clientOptions = {
baseUrl: 'REST API URL',
signer
};
const sdk = new Sdk(clientOptions);
const balanceResponse = await sdk.balance.get({ address: '<address>' });
const { parsed } = await sdk.balance.transfer.submitWaitResult(
{
address: '<address from>',
destination: '<address to>',
amount: 0.01
});
FAQs
This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.
The npm package @unique-nft/sdk receives a total of 425 weekly downloads. As such, @unique-nft/sdk popularity was classified as not popular.
We found that @unique-nft/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.