NEAR
Last updated
Last updated
NEAR is a user-friendly, scalable layer-1 blockchain platform that uses a sharded proof-of-stake consensus mechanism. It features human-readable account names, supports smart contracts in Rust and AssemblyScript, and offers low transaction fees.
Use the to create a Near account. Then go to Settings > Security and Recovery > Export Private Key
to copy your private key.
Use the to airdrop fund your testnet wallet.
Import the SDK and create a new instance:
You can then use the instance to do a read operation on near.
To perform token transfers or other transactions, you need to connect your wallet to the SDK. You also need to provide the accountId to be associated with your private key.
You can view the address of your connected wallet using the getAddress
method.
To create a transaction to transfer Ⓝ on near, you can use the preparePay
or prepareTranfer
methods:
The signed tx is a Uint8Array
that can be used in a XM work step.
You can call the createAccount
method to create an account, passing the accountId and the Ⓝ amount to deposit to the created account. You can optionally specify the curve to use when generating the key pair for the new account.
The method returns the signed transaction for creating the new account on Near, and its key pair.
You can delete the connected account by calling the deleteAccount
method and passing the NEAR account that will receive the remaining Ⓝ balance from the account being deleted.
To create custom transactions for the Near blockchain using the Demos Near SDK, you can access the underlying API to create transactions.
instance.actions
Transaction Actions
instance.provider
instance.wallet
instance.signer
instance.signTransaction(s)
Sign transactions
Here's the converted list with markdown links:
The provided by near-api-js
Your connected
The for your connected