Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ dist
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode
.vscode-test

# yarn v2
Expand All @@ -136,4 +137,4 @@ dist
.idea

quickstart-template/node_modules
quickstart-template/wallet-array.csv
quickstart-template/wallet-array.csv
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Coinbase Node.js SDK Changelog

## Unreleased
## Unreleased

## [0.5.0] - 2024-09-11

- Add Arbitrum-Mainnet support for Native transfers.
- Add `Coinbase.configure` method to allow for configuration of the SDK and marked constructor as deprecated.
- Return correlation ID from APIError response
- Add optional fields to `CreateContractInvocationOptions` to set amount for payable contract method invocations
- Add a `StakingRewardFormat` enum to allow for specifying the format in which staking rewards should be returned.

## [0.4.0] - 2024-09-06

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ const apiKeyName = "Copy your API Key name here.";

const privateKey = "Copy your API Key's private key here.";

const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: privateKey });
Coinbase.configure({ apiKeyName: apiKeyName, privateKey: privateKey });
```

If you are using a CDP Server-Signer to manage your private keys, enable it with the constuctor option:
```typescript
const coinbase = new Coinbase({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true })
Coinbase.configure({ apiKeyName: apiKeyName, privateKey: apiKeyPrivateKey, useServerSigner: true })
```

Another way to initialize the SDK is by sourcing the API key from the json file that contains your API key, downloaded from CDP portal.

```typescript
const coinbase = Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" });
Coinbase.configureFromJson({ filePath: "path/to/your/api-key.json" });
```

This will allow you to authenticate with the Platform APIs.
Expand All @@ -99,7 +99,7 @@ CommonJs:

```javascript
const { Coinbase, Wallet } = require("@coinbase/coinbase-sdk");
const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json");
Coinbase.configureFromJson("path/to/your/api-key.json");

// List all Wallets for the CDP Project.
Wallet.listWallets().then(wallets => {
Expand All @@ -111,7 +111,7 @@ Or using ES modules and async/await:

```typescript
import { Coinbase, Wallet } from "@coinbase/coinbase-sdk";
const coinbase = Coinbase.configureFromJson("path/to/your/api-key.json");
Coinbase.configureFromJson("path/to/your/api-key.json");

// List all Wallets for the CDP Project.
const wallets = await Wallet.listWallets();
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

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

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

Loading