You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .env.example
+7-2
Original file line number
Diff line number
Diff line change
@@ -91,5 +91,10 @@ STARKNET_ADDRESS=
91
91
STARKNET_PRIVATE_KEY=
92
92
STARKNET_RPC_URL=
93
93
94
-
# Coinbase Commerce
95
-
COINBASE_COMMERCE_KEY=
94
+
# Coinbase
95
+
COINBASE_COMMERCE_KEY=# from coinbase developer portal
96
+
COINBASE_API_KEY=# from coinbase developer portal
97
+
COINBASE_PRIVATE_KEY=# from coinbase developer portal
98
+
# if not configured it will be generated and written to runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_ID and runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_HEX_SEED
99
+
COINBASE_GENERATED_WALLET_ID=# not your address but the wallet id from generating a wallet through the plugin
100
+
COINBASE_GENERATED_WALLET_HEX_SEED=# not your address but the wallet hex seed from generating a wallet through the plugin and calling export
This plugin facilitates the processing of cryptocurrency mass payouts using the Coinbase SDK. It enables the creation and management of mass payouts to multiple wallet addresses, logging all transaction details to a CSV file for further analysis.
217
+
218
+
**Actions:**
219
+
220
+
-`SEND_MASS_PAYOUT`
221
+
Sends cryptocurrency mass payouts to multiple wallet addresses.
222
+
-**Inputs**:
223
+
-`receivingAddresses` (array of strings): Wallet addresses to receive funds.
224
+
-`transferAmount` (number): Amount to send to each address (in smallest currency unit, e.g., Wei for ETH).
225
+
-`assetId` (string): Cryptocurrency asset ID (e.g., `ETH`, `BTC`).
-**Outputs**: Logs transaction results (success/failure) in a CSV file.
228
+
-**Example**:
229
+
```json
230
+
{
231
+
"receivingAddresses": [
232
+
"0xA0ba2ACB5846A54834173fB0DD9444F756810f06",
233
+
"0xF14F2c49aa90BaFA223EE074C1C33b59891826bF"
234
+
],
235
+
"transferAmount": 5000000000000000,
236
+
"assetId": "ETH",
237
+
"network": "eth"
238
+
}
239
+
```
240
+
241
+
**Providers:**
242
+
243
+
- `massPayoutProvider`
244
+
Retrieves details of past transactions from the generated CSV file.
245
+
- **Outputs**: A list of transaction records including the following fields:
246
+
- `address`: Recipient wallet address.
247
+
- `amount`: Amount sent.
248
+
- `status`: Transaction status (`Success` or `Failed`).
249
+
- `errorCode`: Error code (if any).
250
+
- `transactionUrl`: URL for transaction details (if available).
251
+
252
+
**Description:**
253
+
254
+
The Coinbase MassPayments plugin streamlines cryptocurrency distribution, ensuring efficient and scalable payouts to multiple recipients on supported blockchain networks.
255
+
256
+
Supported networks:
257
+
258
+
- `base` (Base blockchain)
259
+
- `sol` (Solana)
260
+
- `eth` (Ethereum)
261
+
- `arb` (Arbitrum)
262
+
- `pol` (Polygon)
263
+
264
+
**Usage Instructions:**
265
+
266
+
1. **Configure the Plugin**
267
+
Add the plugin to your character’s configuration:
268
+
269
+
```typescript
270
+
import { coinbaseMassPaymentsPlugin } from "@eliza/plugin-coinbase-masspayments";
271
+
272
+
const character = {
273
+
plugins: [coinbaseMassPaymentsPlugin],
274
+
};
275
+
```
276
+
277
+
2.**Ensure Secure Configuration**
278
+
Set the following environment variables or runtime settings to ensure the plugin functions securely:
279
+
280
+
-`COINBASE_API_KEY`: API key for Coinbase SDK.
281
+
-`COINBASE_PRIVATE_KEY`: Private key for secure transactions.
282
+
283
+
---
284
+
285
+
### Wallet Management
286
+
287
+
The plugin automatically handles wallet creation or uses an existing wallet if the required details are provided during the first run.
288
+
289
+
1.**Wallet Generation on First Run**
290
+
If no wallet information is provided (`COINBASE_GENERATED_WALLET_HEX_SEED` and `COINBASE_GENERATED_WALLET_ID`), the plugin will:
291
+
292
+
-**Generate a new wallet** using the Coinbase SDK.
293
+
- Automatically **export the wallet details** (`seed` and `walletId`) and securely store them in `runtime.character.settings.secrets` or other configured storage.
294
+
- Log the wallet’s default address for reference.
295
+
- If the character file does not exist, the wallet details are saved to a characters/charactername-seed.txt file in the characters directory with a note indicating that the user must manually add these details to settings.secrets or the .env file.
296
+
297
+
2.**Using an Existing Wallet**
298
+
If wallet information is available during the first run:
299
+
- Provide `COINBASE_GENERATED_WALLET_HEX_SEED` and `COINBASE_GENERATED_WALLET_ID` via `runtime.character.settings.secrets` or environment variables.
300
+
- The plugin will **import the wallet** and use it for processing mass payouts.
301
+
302
+
---
303
+
304
+
### Required Configurations
305
+
306
+
The following configurations must be provided for wallet management:
307
+
308
+
-**Environment Variables or Secrets**:
309
+
-`COINBASE_GENERATED_WALLET_HEX_SEED`: Hexadecimal seed of the wallet.
0 commit comments