Closed benschac closed 6 months ago
The options for
const entropy = new Entropy({});
Will currently result in the sdk not working for end developers
interface EntropyOpts { seed?: string; endpoint?: string; adapters?: { [key: string | number]: Adapter; }; }
If there's not a specified endpoint, where is the client supposed to make an API request to?
Additionally, same goes for seed and adapters.
I'd assume we'd want type errors if developers don't provide values and then throw to let the developer know that we need the required options.
https://github.com/entropyxyz/entropy-js/blob/95eff6e043bd8876482dcc61bde6cd1bea6861c8/src/utils/index.ts#L37
is one of the few places I see a default value that would break if someone didn't have a local setup.
Maybe it could be a good idea to make a default to the test network?
Or just like
if (!endpoint) { throw Error("endpoint is required") // blah blah get the endpoint in docs here. }
old
The options for
Will currently result in the sdk not working for end developers
If there's not a specified endpoint, where is the client supposed to make an API request to?
Additionally, same goes for seed and adapters.
I'd assume we'd want type errors if developers don't provide values and then throw to let the developer know that we need the required options.
https://github.com/entropyxyz/entropy-js/blob/95eff6e043bd8876482dcc61bde6cd1bea6861c8/src/utils/index.ts#L37
is one of the few places I see a default value that would break if someone didn't have a local setup.
Maybe it could be a good idea to make a default to the test network?
Or just like