A configuration object for requests to the server, including API key, extra headers, and cookie handling options.
Security Note: Consider implementing client-side rate limiting in your application to prevent
accidental API abuse. You can use libraries like 'bottleneck' or 'p-queue' to limit request rates.
Example
importBottleneckfrom'bottleneck';
// Create a limiter that allows 10 requests per second constlimiter = newBottleneck({ minTime:100, maxConcurrent:5 });
// Wrap your Aptos calls with the limiter constresult = awaitlimiter.schedule(() =>aptos.getAccountInfo({ accountAddress }));
A configuration object for requests to the server, including API key, extra headers, and cookie handling options.
Security Note: Consider implementing client-side rate limiting in your application to prevent accidental API abuse. You can use libraries like 'bottleneck' or 'p-queue' to limit request rates.