![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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/client 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/client package.
npm install @unique-nft/client
import { Client, Options } from '@unique-nft/client';
const options: Options = {
baseUrl: '<REST API URL>'
};
const client = new Client(options);
In the baseUrl
parameter, you must pass one of the paths to the Unique Network
https://rest.unique.network/opal
https://rest.unique.network/quartz
https://rest.unique.network/unique
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 { Client } from "@unique-nft/client";
const options: KeyringOptions = {
type: 'sr25519',
};
const provider = new KeyringProvider(options);
await provider.init();
const account = provider.addSeed('<seed of account>');
const signer = account.getSigner();
const clientOptions = {
baseUrl: 'REST API URL',
signer
};
const client = new Client(clientOptions);
const balanceResponse = await client.balance.get({ address: '<address>' });
const { parsed } = await client.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 628 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.