The createNetwork function (v7.2.0) is the recommended way to configure custom network URLs and API keys, but lacks documentation. The apiKey option (auto-attaches x-api-key headers) is undocumented. Common gotcha: configuring apiKey with createNetwork but passing a string to broadcastTransaction silently loses the key. Suggest adding a section to @stacks/network README covering createNetwork usage, apiKey/url options, and when to use createNetwork vs string names. Sample project: github.com/ClaraDevRel/stacks-network-config
The createNetwork function (v7.2.0) is the recommended way to configure custom network URLs and API keys, but lacks documentation. The apiKey option (auto-attaches x-api-key headers) is undocumented. Common gotcha: configuring apiKey with createNetwork but passing a string to broadcastTransaction silently loses the key. Suggest adding a section to @stacks/network README covering createNetwork usage, apiKey/url options, and when to use createNetwork vs string names. Sample project: github.com/ClaraDevRel/stacks-network-config