Skip to content

Commit

Permalink
Merge pull request #10 from coinbase/main-1703116975
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
drohit-cb authored Dec 21, 2023
2 parents 28b7d49 + 77dd0af commit 729056e
Show file tree
Hide file tree
Showing 11 changed files with 429 additions and 42 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Staking API Typescript Client Library

[![npm version](https://badge.fury.io/js/@coinbase%2Fstaking-client-library-ts.svg)](https://badge.fury.io/js/@coinbase%2Fstaking-client-library-ts)

This repository contains the Protocol Buffer definitions for the Coinbase **Staking API**, as well as the Typescript client libraries generated from them.

## Overview
Expand Down Expand Up @@ -64,16 +66,16 @@ To test that your API Key gives you access as expected to the Staking APIs:

## Running example from your application

1. Build the packages in this repo with `npm install && npm run build`
2. Install this package in your application - `npm install <path/to/staking-client-library-ts>`
3. Add your API key to the root of your application as `.coinbase_cloud_api_key.json`
4. Run example code:
1. Install this package in your application - `npm install @coinbase/staking-client-library-ts`
2. Add your API key to the root of your application as `.coinbase_cloud_api_key.json`
3. Run example code:

```typescript
import { StakingServiceClient } from "../staking-client-library-ts";
import { StakingServiceClient } from "@coinbase/staking-client-library-ts";

const client = new StakingServiceClient();

const exampleFunction = () => {
const client = new StakingServiceClient();
client.listProtocols().then((response) => {
console.log(response);
});
Expand Down
173 changes: 154 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"name": "@coinbase/staking-client-library-ts",
"version": "0.3.2",
"version": "0.4.0",
"description": "Coinbase Cloud Staking API Typescript Library",
"repository": "https://github.com/coinbase/staking-client-library-ts.git",
"license": "Apache-2.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"clean": "rimraf ./dist",
"build": "npm run clean && tsc",
Expand All @@ -22,7 +20,8 @@
"dist/"
],
"dependencies": {
"node-jose": "^2.2.0"
"node-jose": "^2.2.0",
"@ethereumjs/tx": "^5.1.0"
},
"devDependencies": {
"@types/node-jose": "^1.1.10",
Expand All @@ -34,5 +33,7 @@
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"rimraf": "^3.0.2"
}
},
"main": "dist/index.js",
"types": "dist/index.d.ts"
}
Loading

0 comments on commit 729056e

Please sign in to comment.