Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@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
<script src="https://unpkg.com/@unique-nft/sdk/bundles/index.js"></script>
<script src="https://unpkg.com/@unique-nft/sdk/bundles/evm.js"></script>
<script src="https://unpkg.com/@unique-nft/sdk/bundles/full.js"></script>
<script src="https://unpkg.com/@unique-nft/sdk/bundles/subscriptions.js"></script>
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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.