This example demonstrates how to integrate the Para SDK with a Deno server. The server includes routes for wallet creation and signing using different libraries.
- Install dependencies (optional):
deno cache --reload server.ts
- Start the server:
deno task dev
Alternatively, you can run directly:
deno run --watch -R server.ts
Ensure that you configure the **.env
** file using **.env.example
**.
The server starts on port 8000
, and the following routes are available for interacting with the wallet functionality.
Each route requires an email
in the body of the request.
-
Create Wallet
curl -X POST http://localhost:8000/wallets/create -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Para Pre-Generated Wallet
curl -X POST http://localhost:8000/wallets/sign/paraPreGen -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Para Session
curl -X POST http://localhost:8000/wallets/sign/paraSession -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Ethers
curl -X POST http://localhost:8000/wallets/sign/ethers -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Viem
curl -X POST http://localhost:8000/wallets/sign/viem -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with CosmJS
curl -X POST http://localhost:8000/wallets/sign/cosmjs -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Solana Web3
curl -X POST http://localhost:8000/wallets/sign/solana-web3 -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
-
Sign with Alchemy
curl -X POST http://localhost:8000/wallets/sign/alchemy -H "Content-Type: application/json" -d '{"email": "[email protected]"}'
For more details, visit the Para SDK documentation.