Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for API Key #8

Open
alexlmiller opened this issue Nov 8, 2024 · 0 comments · May be fixed by #18
Open

Add Support for API Key #8

alexlmiller opened this issue Nov 8, 2024 · 0 comments · May be fixed by #18
Assignees

Comments

@alexlmiller
Copy link

alexlmiller commented Nov 8, 2024

The CLI uses the Stacks API to build transactions which runs into the 50RPM limit when building big sets of transactions. Need to add the ability to set an API key and authenticate the API calls to get higher limits as it currently 429s once >35 transactions are in a file

trace from error

> start
> npm run cli -- create_tx --csv-inputs txs/ltt-1.csv --out-file txs/ltt-12-txs.json


> cli
> ts-node ./src/index.ts create_tx --csv-inputs txs/ltt-1.csv --out-file txs/ltt-12-txs.json

/Users/alex/Documents/GitHub/multisig-cli/node_modules/@stacks/transactions/src/builders.ts:92
    throw new Error(
          ^
Error: Error fetching nonce. Response 429: Too Many Requests. Attempted to fetch https://stacks-node-api.mainnet.stacks.co/v2/accounts/SM11M6VMKSSW7TCERW2WERT52A5VF95PSK3SS4JMR?proof=0 and failed with the message: "{
  "message":"API rate limit exceeded",
  "request_id":"c8901765bd40e84b2286201205d29c0d"
}"
    at Object.getNonce (/Users/alex/Documents/GitHub/multisig-cli/node_modules/@stacks/transactions/src/builders.ts:92:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
@jbencin jbencin linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants