Create AinftToken instance. Do not use it directly; use the Ainft721Object.getToken() function instead.
The information about the AINFT.
The AINFT object ID of AINFT.
The metadata of AINFT.
The token ID of AINFT.
The token URI of AINFT's metadata.
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 AINFT object ID of AINFT.
The Ainize object for send request to AIN blockchain.
The base url of api server of AINFT Factory.
The metadata of AINFT.
The subpath of api server request url.
The token ID of AINFT.
The token URI of AINFT's metadata.
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.
Sets AINFT's metadata.
The value to be set as metadata for the 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 ainft = await ainftObject.getToken('YOUR-TOKEN-ID);
const metadata = {
image: '...',
}
const result = await ainft.setMetadata(metadata);
console.log(result) // result of transaction.
}
Sign the data with the private key that the user has registered.
The data to sign.
Returns signature string.
Generated using TypeDoc
The class of AINFT Token.