Creates a new middleware from an API key.
Creates a new network fetching function, which combines an optional fetch-compatible library with optional middlware.
Get fetch options
Sets global fetch options for stacks.js network calls.
global fetch options after merging with previous options (or defaults)
Generated using TypeDoc
@stacks/network
Network and API library for working with Stacks blockchain nodes.
Installation
Usage
Create a Stacks mainnet, testnet or mocknet network
Set a custom node URL
Check if network is mainnet
Network usage in transaction building
Use the built-in API key middleware
Some Stacks APIs make use API keys to provide less rate-limited plans.
Use custom middleware
Middleware can be used to hook into network calls before sending a request or after receiving a response.
Get various API URLs