Skip to content

Commit

Permalink
Release v0.13.0 (#352)
Browse files Browse the repository at this point in the history
Release v0.13.0
  • Loading branch information
0xRAG authored Dec 19, 2024
1 parent e9ccb2c commit 343e123
Show file tree
Hide file tree
Showing 25 changed files with 2,284 additions and 591 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# Coinbase Node.js SDK Changelog

## Unreleased
## [0.13.0] - 2024-12-19

### Added
- Add support for registering, updating, and listing smart contracts that are
deployed external to CDP.
- Add support for fetching address reputation
- Add `reputation` method to `Address` to fetch the reputation of the address
- Add `networkId` to `WalletData` so that it is saved with the seed data and surfaced via the export function
- Add ability to import external wallets into CDP via a BIP-39 mnemonic phrase, as a 1-of-1 wallet
- Add ability to import WalletData files exported by the Python CDP SDK
- Add getters for `Validator` object to expose more data to users.
- Add test file for `Validator` object.

### Deprecated
- Deprecate `Wallet.loadSeed()` method in favor of `Wallet.loadSeedFromFile()`
- Deprecate `Wallet.saveSeed()` method in favor of `Wallet.saveSeedToFile()`

## [0.12.0] - Skipped

### [0.11.3] - 2024-12-10

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ For convenience during testing, we provide a `saveSeed` method that stores the w

```typescript
const seedFilePath = "";
wallet.saveSeed(seedFilePath);
wallet.saveSeedToFile(seedFilePath);
```

To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveSeed` and `loadSeed`.

```typescript
wallet.saveSeed(seedFilePath, true);
wallet.saveSeedToFile(seedFilePath, true);
```

The below code demonstrates how to re-instantiate a Wallet from the data export.
Expand All @@ -221,7 +221,7 @@ To import Wallets that were persisted to your local file system using `saveSeed`

```typescript
const userWallet = await Wallet.fetch(wallet.getId());
await userWallet.loadSeed(seedFilePath);
await userWallet.loadSeedFromFile(seedFilePath);
```


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "ISC",
"description": "Coinbase Platform SDK",
"repository": "https://github.com/coinbase/coinbase-sdk-nodejs",
"version": "0.11.3",
"version": "0.13.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion quickstart-template/bridge-usdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async function getTransactionReceipt(txHash) {
async function fetchWalletAndLoadSeed(walletId, seedFilePath) {
try {
const wallet = await Wallet.fetch(walletId);
await wallet.loadSeed(seedFilePath);
await wallet.loadSeedFromFile(seedFilePath);

console.log(`Successfully loaded funded wallet: `, wallet.getId());
return wallet;
Expand Down
2 changes: 1 addition & 1 deletion quickstart-template/discord_tutorial/webhook-transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const webhookNotificationUri = process.env.WEBHOOK_NOTIFICATION_URL;
// Create Wallet
else {
myWallet = await Wallet.create();
const saveSeed = myWallet.saveSeed(seedPath);
const saveSeed = myWallet.saveSeedToFile(seedPath);
console.log("✅ Seed saved: ", saveSeed);
}

Expand Down
2 changes: 1 addition & 1 deletion quickstart-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@solana/web3.js": "^2.0.0-rc.1",
"bs58": "^6.0.0",
"@coinbase/coinbase-sdk": "^0.11.2",
"@coinbase/coinbase-sdk": "^0.13.0",
"csv-parse": "^5.5.6",
"csv-writer": "^1.6.0",
"viem": "^2.21.6"
Expand Down
2 changes: 1 addition & 1 deletion quickstart-template/register-basename.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async function registerBaseName(wallet, registerArgs) {
async function fetchWalletAndLoadSeed(walletId, seedFilePath) {
try {
const wallet = await Wallet.fetch(walletId);
await wallet.loadSeed(seedFilePath);
await wallet.loadSeedFromFile(seedFilePath);

console.log(`Successfully loaded funded wallet: `, wallet);
return wallet;
Expand Down
Loading

0 comments on commit 343e123

Please sign in to comment.