Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
first pass implementing mnemonic phrase wallet import example
Browse files Browse the repository at this point in the history
  • Loading branch information
stat committed Jan 8, 2025
1 parent c90f8c4 commit d6c6e89
Show file tree
Hide file tree
Showing 8 changed files with 3,519 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cdp-langchain/examples/wallet/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parser": "@typescript-eslint/parser",
"extends": ["../../../.eslintrc.base.json"]
}
7 changes: 7 additions & 0 deletions cdp-langchain/examples/wallet/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
docs/
dist/
coverage/
.github/
src/client
**/**/*.json
*.md
11 changes: 11 additions & 0 deletions cdp-langchain/examples/wallet/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"printWidth": 100,
"proseWrap": "never"
}
45 changes: 45 additions & 0 deletions cdp-langchain/examples/wallet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CDP AgentKit Langchain Extension Examples - Mnemomic Phrase Wallet Import

This example demonstrates agentkit setup with an imported wallet from a mnemomic phrase through the ENV. An example of a mnemomic phrase could be:
```bash
eternal phone creek robot disorder climb thought eternal noodle flat cage bubble liquid sting can
```

## Requirements

- Node.js 18+
- [CDP API Key](https://portal.cdp.coinbase.com/access/api)

### Checking Node Version

Before using the example, ensure that you have the correct version of Node.js installed. The example requires Node.js 18 or higher. You can check your Node version by running:

```bash
node --version
npm --version
```

## Installation

```bash
npm install
```

## Run the Chatbot

### Set ENV Vars

Ensure the following ENV Vars are set in .env
- "CDP_API_KEY_NAME"
- "CDP_API_KEY_PRIVATE_KEY"
- "MNEMONIC_PHRASE"

The mnemomic phrase example above can be used to validate wallet import functionality.

```bash
npm start
```

## License

Apache-2.0
Loading

0 comments on commit d6c6e89

Please sign in to comment.