-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add another option to provide auth details (#25)
## Description Of Change Add an option to initialize client with the api key name and private key instead of completely relying on api-key file. This PR will enable these 2 styles of interacting with the API and make option 1 as the default in our examples and README. Option 1: Requires client initialize to pass the details such as API key name and private key. ``` const apiKeyName: string = 'your-api-key-name'; const apiPrivateKey: string = 'your-api-private-key'; const client = new StakingClient(apiKeyName, apiPrivateKey); client.Ethereum.stake(network, stakerAddress, amount); ``` Option 2: Need a api key of name `.coinbase_cloud_api_key.json` present in the root dir. ``` const client = new StakingClient(); client.Ethereum.stake(network, stakerAddress, amount); ``` ## Testing Procedure Manually ran through the README to execute and make sure all is good.
- Loading branch information
Showing
7 changed files
with
177 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.