-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
90 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scripts | ||
tsconfig.json | ||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# Vea SDK | ||
# Vea SDK <a href="https://www.npmjs.com/package/@kleros/vea-sdk"><img alt="npm" src="https://img.shields.io/npm/v/@kleros/vea-sdk?color=lightgrey"></a> | ||
|
||
Something useful | ||
This package facilitates the interactions with the Vea protocol. | ||
|
||
## Getting Started | ||
|
||
```bash | ||
yarn add @kleros/vea-sdk | ||
# or | ||
npm install @kleros/vea-sdk | ||
``` | ||
|
||
## Example | ||
|
||
```typescript | ||
import { Wallet } from "@ethersproject/wallet"; | ||
import VeaSdk from "../src/index"; | ||
import envVar from "../src/utils/envVar"; | ||
|
||
// Create the Vea client | ||
const vea = VeaSdk.ClientFactory.arbitrumGoerliToChiadoDevnet(envVar("RPC_ARB_GOERLI"), envVar("RPC_CHIADO")); | ||
|
||
// Get the message info | ||
const messageId = 42; | ||
const messageInfo = await vea.getMessageInfo(messageId); | ||
|
||
// Relay the message | ||
const privateKey = envVar("PRIVATE_KEY"); | ||
const wallet = new Wallet(privateKey, vea.outboxProvider); | ||
await vea.relay(messageInfo, wallet); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ | ||
"name": "@kleros/vea-sdk", | ||
"version": "0.1.14", | ||
"version": "0.2.0", | ||
"description": "SDK for the development of cross-chain apps on Vea", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/kleros/vea.git" | ||
|
@@ -10,7 +12,7 @@ | |
"bugs": { | ||
"url": "https://github.com/kleros/vea/issues" | ||
}, | ||
"homepage": "https://github.com/kleros/vea#readme", | ||
"homepage": "https://vea.ninja", | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
@@ -25,10 +27,15 @@ | |
"tag": "latest" | ||
}, | ||
"scripts": { | ||
"start": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch ts-node ./src/run.ts" | ||
"start": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-fetch ts-node ./src/run.ts", | ||
"release:patch": "yarn version patch && yarn npm publish", | ||
"release:minor": "yarn version minor && yarn npm publish", | ||
"release:major": "yarn version major && yarn npm publish", | ||
"clean": "rm -rf dist", | ||
"prepublish": "yarn tsc || echo" | ||
}, | ||
"dependencies": { | ||
"@kleros/vea-contracts": "workspace:^", | ||
"@kleros/vea-contracts": "workspace:^0.2.1", | ||
"@logtail/pino": "^0.4.0", | ||
"@typechain/ethers-v5": "^10.2.0", | ||
"dotenv": "^16.0.3", | ||
|
@@ -42,5 +49,10 @@ | |
"devDependencies": { | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.5" | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"src", | ||
"examples" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters