Constructor of Ainft721Object. Do not use it directly; use the nft.get() function instead.
The information about the AINFT object.
The ID of AINFT object.
The metadata of AINFT object.
The name of AINFT object.
The owner of AINFT object.
The URL slug of AINFT object.
The symbol of AINFT object.
Ain instance to sign and send transaction to AIN blockchain.
The base url to request api to AINFT factory server.
The Ain object for sign and send transaction to AIN blockchain.
The Ainize object for send request to AIN blockchain.
The ID of app in AIN blockchain.
The base url of api server of AINFT Factory.
The ID of AINFT object.
The metadata of AINFT object.
The name of AINFT object.
Owner of AINFT object.
The subpath of api server request url.
The URL slug of AINFT object.
The symbol of AINFT object.
Gets specific token object.
Token ID of AINFT.
Returns AINFT token instance.
import AinftJs from '@ainft-team/ainft-js';
const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
async function main() {
const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
const ainft = await ainftObject.getToken('YOUR-TOKEN-ID);
}
Gets transaction body to mint token.
The address of the AINFT object owner.
The address the AINFT will be send.
Token ID of AINFT.
Returns transaction body without signature.
import AinftJs from '@ainft-team/ainft-js';
const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
async function main() {
const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
const result = await ainftObject.getTxBodyForMint('RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
console.log(result); // trasacntion body for mint.
}
Gets transaction body to transfer token.
The address the AINFT will be send from.
The address the AINFT will be send to.
Token ID of AINFT.
Returns transaction body without signature.
import AinftJs from '@ainft-team/ainft-js';
const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
async function main() {
const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
const result = await ainftObject.getTxBodyForTransfer('SENDER-ADDRESS', 'RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
console.log(result); // trasacntion body for transfer.
}
Mints new token.
The address the AINFT will be minted.
Token ID of AINFT.
Returns transaction result.
import AinftJs from '@ainft-team/ainft-js';
const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
async function main() {
const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
const result = await ainftObject.mint('RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
console.log(result); // result of transaction.
}
Sends request that include form to api server of AINFT Factory. Used to upload asset data.
The method of Http request.
The suffix of request url.
The string fields of form.
The file fields of form.
Returns response of api request.
Sends request to api server of AINFT Factory. Authenticate by signing data.
The method of Http request.
The suffix of request url.
The data to be included in the api request.
Returns response of api request.
Sends request to api server of AINFT Factory. Used when authentication is not required.
The method of Http request.
The suffix of request url.
The data to be included in the api request.
The headers of Http api request.
Returns response of api request.
Sets base url.
New base url to be set to base url of api server of AINFT Factory.
Sign the data with the private key that the user has registered.
The data to sign.
Returns signature string.
Transfers token to other account.
The address the AINFT will be send from.
The address the AINFT will be send to.
Token ID of AINFT.
Returns transaction result.
import AinftJs from '@ainft-team/ainft-js';
const ainftJs = new AinftJs('YOUR-PRIVATE-KEY');
async function main() {
const ainftObject = await ainftJs.nft.get('YOUR-AINFT-OBJECT-ID');
const result = await ainftObject.transfer('SENDER-ADDRESS', 'RECEIVER-ADDRESS', 'TARGET-TOKEN-ID');
console.log(result); // result of transaction.
}
Gets app ID by AINFT object ID.
Generated using TypeDoc
The class of AINFT 721 object.