api
Index
Constructors
Properties
Methods
Constructors
constructor
Constructor for the API class
Parameters
jwt: string
The jwt token for authentication, get it at https://t.me/minanft_bot?start=auth
Returns api
Properties
endpoint
The endpoint of the serverless api
jwt
The jwt token for authentication, get it at https://t.me/minanft_bot?start=auth
Methods
publicindexName
Index the NFT using serverless api call The NFT mint transaction should be included in the block before calling this function otherwise it will fail and return isIndexed : false
Parameters
data: { name: string }
The data for the indexName call
Returns Promise<{ error?: string; isIndexed: boolean; reason?: string; success: boolean }>
publicjobResult
Gets the result of the job using serverless api call
Parameters
data: { jobId: string }
the data for the jobResult call
Returns Promise<{ error?: string; result?: any; success: boolean }>
where result is the result of the job if the job is not finished yet, the result will be undefined if the job failed, the result will be undefined and error will be set if the job is finished, the result will be set and error will be undefined if the job is not found, the result will be undefined and error will be set
publiclookupName
Gets the address (publicKey) of the NFT using serverless api call
Parameters
name: string
The name of the NFT
Returns Promise<{ address?: string; chain?: string; contract?: string; error?: string; found?: boolean; reason?: string; success: boolean }>
publicmint
Mints a new NFT using serverless api call
Parameters
data: { privateKey: string; signature: string; uri: string; useArweave?: boolean }
the data for the mint call
Returns Promise<{ error?: string; jobId?: string; success: boolean }>
where jonId is the jobId of the minting transaction
publicpost
Creates a new post for existing NFT using serverless api call
Parameters
data: { commitData: MinaNFTCommitData; nftName: string; ownerPublicKey: string; postName: string }
the data for the post call
Returns Promise<{ error?: string; jobId?: string; success: boolean }>
where jonId is the jobId of the minting transaction
publicproof
Starts a new job for the proof calculation using serverless api call The developer and name should correspond to the BackupPlugin of the API All other parameters should correspond to the parameters of the BackupPlugin
Parameters
data: { args: string[]; developer: string; name: string; task: string; transactions: string[] }
the data for the proof call
Returns Promise<{ error?: string; jobId?: string; success: boolean }>
where jonId is the jobId of the job
publicqueryBilling
Gets the billing report for the jobs sent using JWT
Returns Promise<{ error?: string; result?: any; success: boolean }>
where result is the billing report
publicreserveName
Reserves the name of the NFT using serverless api call
Parameters
data: { chain: blockchain; contract: string; name: string; publicKey: string }
The data for the reserveName call
Returns Promise<{ error?: string; isReserved: boolean; price: object; reason?: string; signature?: string; success: boolean }>
publicwaitForJobResult
Waits for the job to finish
Parameters
data: { interval?: number; jobId: string; maxAttempts?: number; maxErrors?: number }
the data for the waitForJobResult call
Returns Promise<{ error?: string; result?: any; success: boolean }>
where result is the result of the job
API class for interacting with the serverless api