Skip to content

Commit

Permalink
Instructions to Acquire Near Credentials (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Smith <[email protected]>
  • Loading branch information
Lukisong82 and bh2smith authored Jun 14, 2024
1 parent cdd68c9 commit 9953031
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,38 @@ await adapter.signAndSendTransaction({
// Optional: Set nearGas (default is 300 TGAS, which sometimes might not be sufficient)
});
```

### Other Examples

Each of the following scripts can be run with

```bash
npx ts-node examples/*.ts
```

1. [(Basic) Send ETH](./examples/send-eth.ts)
2. **WETH**
- [Deposit (aka wrap-ETH)](./examples/weth/wrap.ts)
- [Withdraw (aka unwrap-ETH)](./examples/weth/wrap.ts)
3. [Transfer ERC721](./examples/nft/erc721/transfer.ts)
4. [(Advanced) Buy NFT On Opensea](./examples/opensea.ts)

## Configuration

Before using NEAR-CA, ensure you have the following environment variables set:

- `NEAR_ACCOUNT_ID`: Your NEAR account identifier.
- `NEAR_ACCOUNT_PRIVATE_KEY`: Your NEAR account private key.
- `NEAR_MULTICHAIN_CONTRACT`: The NEAR contract that handles multichain operations.

Copy the `.env.example` file and place these values in `.env`


Steps to get your `NEAR_ACCOUNT_ID` and `NEAR_ACCOUNT_PRIVATE_KEY`:

1. Create a mintbase wallet, super easy, here: https://wallet.mintbase.xyz/
2. Your `XYZ.testnet` is your `NEAR_ACCOUNT_ID`.
3. In mintbase, on the top right corner click on the gear (settings) icon.
4. Go to "Security & Recovery" -> "Export Account".
5. After the exporting is complete click on "Private Key" and copy it.
6. Paste it to `NEAR_ACCOUNT_PRIVATE_KEY` in your `.env` file.

0 comments on commit 9953031

Please sign in to comment.