Skip to content
Merged
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
13 changes: 13 additions & 0 deletions interchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ async function main() {
main().catch(console.error);
```

## ReactJS Examples

We have also included few examples to integrate the `interchain` SDK with frontend libraries like ReactJS.
Run the following commands to setup the React example repository. See examples [here](./examples/react-examples/)

```bash
cd examples/react-examples
npm install
npm run dev
```

Now visit the local website to interact with the ICM and ICTT examples.

## Warp Message Parsing

The SDK provides utilities for parsing and working with Warp messages, which are used for cross-chain communication in the Avalanche network. Warp messages are signed messages that can be verified across different chains.
Expand Down
24 changes: 24 additions & 0 deletions interchain/examples/react-examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions interchain/examples/react-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ReactJS Examples

We have also included few examples to integrate the `interchain` SDK with frontend libraries like ReactJS.
Run the following commands to setup the React example repository. See examples [here](./examples/react-examples/)

```bash
cd examples/react-examples
npm install
npm run dev
```
23 changes: 23 additions & 0 deletions interchain/examples/react-examples/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { globalIgnores } from 'eslint/config'

export default tseslint.config([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
10 changes: 10 additions & 0 deletions interchain/examples/react-examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<html lang="en">
<head>
<title>Avalanche SDK - React Examples</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading