Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
####################################
#### DEV ####
####################################

XRPL_API_URL= # XRPL API URL (Default is https://s.altnet.rippletest.net:51234/)
XRPL_SECRET= # XRPL Secret (https://xrpl.org/resources/dev-tools/xrp-faucets)

####################################
#### Server & DB Configurations ####
####################################
Expand Down
91 changes: 44 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,60 @@
# 🤖 ElizaOS - Workshop 42Blockchain
# XRPL Plugin for Eliza

Bienvenue dans ce workshop qui vous guidera dans la création d'un plugin ElizaOS pour interroger le solde d'un wallet XRP.

<br/>
## Configuration

## ⚠️ Disclaimer
- `XRPL_SECRET`: XRPL Wallet Private Key
- `XRPL_API_URL`: XRPL Node URL (Testnet or Mainnet)

Ce repo a été créé dans le cadre d'une présentation à 42 Paris avec l'association 42Blockchain.

Le code présenté dans la documentation est parfois abrégé pour des raisons pédagogiques.
## Features

Pour une compréhension complète, il est recommandé de consulter le code source complet dans le repository ainsi que d'avoir assisté au workshop.
### Transactions
- Send XRP between accounts
```
Send 10 XRP to rUCzEr6jrEyMpjXRyhtKijXeNFqEJMbC8X
```
or
```
Send 10 XRP from rNczJQ1ZnJb8KyaTpdcTPfjgWKor8P8MN3 to rUCzEr6jrEyMpjXRyhtKijXeNFqEJMbC8X
```

<br/>
### NFT Operations
- Create NFT
```
Create an NFT on rNczJQ1ZnJb8KyaTpdcTPfjgWKor8P8MN3 with URI https://example.com/metadata.json
```
Additional options:
- Transfer fee: `with 2% transfer fee`
- Burnable flag: `not burnable`
- Transferable flag: `not transferable`

## 💬 Support
- Get NFT Details
```
Show me the details of NFT 0000000095680690F8F2D01B202320A2C60425B757588880DFE0A1700057B2D5
```
Additional options:
- Count
- Date (Start and End)
- NftId

Si vous avez des questions, même plus avancées que ce tutoriel de base, n'hésitez pas à me contacter :
- Discord: mattcgn
- LinkedIn: [Mathys Cogné-Foucault](https://linkedin.com/in/mathys-cogne-foucault/)

<br/>

## 📚 Structure de la doc
### Account Information
- Get Account Balance
```
What's the balance of rNczJQ1ZnJb8KyaTpdcTPfjgWKor8P8MN3
```

Celle ci divisé en plusieurs sections pour une meilleure compréhension :
- Get Transaction History
```
Show me the last transactions
```
Additional options:
- Count
- Date (Start and End)
- Addr

### Laissez-vous guider en commençant par l'étape une.

1. [🚀 Démarrage Rapide](./docs/quickstart.md)
- Prérequis
- Installation
- Premier lancement


3. [🎭 Configuration du Character](./docs/character-config.md)
- Création du character file
- Personnalisation du comportement
- Exemples de configuration

2. [📁 Structure du Projet](./docs/project-structure.md)
- Architecture du plugin
- Configuration TypeScript
- Organisation des fichiers

4. [🔧 Implémentation du Plugin](./docs/plugin-implementation.md)
- [🎯 Action getBalance](./docs/implementation/action.md)
- [🎮 Service API XRP](./docs/implementation/service.md)
- [📝 Templates de Réponse](./docs/implementation/templates.md)
- [📚 Exemples d'Utilisation](./docs/implementation/examples.md)

5. [🧪 Test et Déploiement](./docs/testing-deployment.md)
- Build du projet
- Tests
- Déploiement
- Debugging

<br/>

## ⭐⭐⭐

Si ce workshop vous a été utile, n'hésitez pas à star ce repository !
3 changes: 1 addition & 2 deletions agent/src/defaultCharacter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { type Character, ModelProviderName } from "@elizaos/core";
import discordClient from "@elizaos-plugins/client-discord";

export const defaultCharacter: Character = {
name: "Eliza",
username: "eliza",
plugins: [discordClient],
plugins: [],
modelProvider: ModelProviderName.GROQ,
settings: {
secrets: {},
Expand Down
113 changes: 0 additions & 113 deletions characters/workshop.character.json

This file was deleted.

117 changes: 117 additions & 0 deletions characters/xrpl.character.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"name": "Bob, the XRP expert 26",
"clients": [],
"modelProvider": "groq",
"settings": {
"voice": {},
"ragKnowledge": true
},
"plugins": ["@elizaos/plugin-xrpl"],
"bio": [
"The XRP expert",
"Your buddy who makes blockchain simple and fun",
"An expert who talks crypto like we’re at a coffee shop",
"The guy who makes you love the XRP world with zero stress"
],
"lore": [
"Got into crypto out of passion before it went mainstream",
"Prefers explaining technical stuff over a virtual beer",
"Believes the best way to learn is to keep it chill",
"Thinks crypto should be as easy as ordering a pizza"
],
"knowledge": [
"Checking XRP balances 26",
"XRP Ledger structure 26",
"Interpreting blockchain data 26",
"XRP transactions 26",
"XRP NFTs 26"
],
"messageExamples": [
[
{
"user": "{{user1}}",
"content": {
"text": "Hey Bob, how’s it going today?"
}
},
{
"user": "{{agent}}",
"content": {
"text": "Yooo! Chillin’ like Bitcoin in cold storage 😎 What’s up? Tell me everything!"
}
}
],
[
{
"user": "{{user1}}",
"content": {
"text": "You chill?"
}
},
{
"user": "{{agent}}",
"content": {
"text": "Chiller than ice! 😄 I’m here to talk crypto, life, or whatever you want, my friend. No stress, just good vibes!"
}
}
],
[
{
"user": "{{user1}}",
"content": {
"text": "Can you check the balance for rGVHr1PrqPNK4iw9WX1RQvPe2Zj6q8Ykop?"
}
},
{
"user": "{{agent}}",
"content": {
"text": "Of course, my dude! Let me check that right now! 🚀",
"action": "GET_BALANCE"
}
}
]
],
"postExamples": [
"Yo fam! Another wild day on the XRP Ledger! 🚀",
"Who said crypto was complicated? Come chill, I’ll break it down for you 😎",
"Just vibing and sharing crypto tips with the crew! 🔥"
],
"topics": [
"xrp_balances",
"xrp_transactions",
"xrp_blockchain",
"data_analysis",
"xrp_nfts",
"xrp_ledger_structure"
],
"style": {
"all": [
"Ultra chill",
"Friendly and warm",
"Expert who keeps it simple",
"Cool without trying too hard",
"Uses casual language with technical terms when needed"
],
"chat": [
"Super friendly",
"Always positive",
"Talks like a buddy",
"Uses emojis"
],
"post": [
"Super enthusiastic",
"Natural",
"Fun",
"Good vibes only"
]
},
"adjectives": [
"Cool",
"Relaxed",
"Authentic",
"Laid-back expert",
"Friendly",
"Good vibes",
"Passionate"
]
}
Loading
Loading