-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
256 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Examples | ||
|
||
The `examples/` directory is a growing & living folder, and open for contributions. | ||
|
||
|
||
- Epoch | ||
- [ ] Fetching Epoch | ||
- [ ] Watching Epoch | ||
- Clients | ||
- [ ] Public (w/ HTTP, WebSocket, Fallback) | ||
- [ ] Wallet – JSON-RPC Account (`window.fluent`) | ||
- [ ] Wallet - JSON-RPC Account (WalletConnect v2) | ||
- Contracts | ||
- [ ] Deploying | ||
- [ ] Reading | ||
- [ ] Writing | ||
- [ ] Multicall | ||
- [ ] Call | ||
- [ ] Events | ||
- [ ] Simulating Method Calls | ||
- Filters & Logs | ||
- [ ] Blocks | ||
- [ ] Pending Transactions | ||
- [ ] Events | ||
- Signatures | ||
- [ ] Sign typed data | ||
- [ ] + verify/recover address | ||
- [ ] Sign message (+ recover message address) | ||
- [ ] + verify/recover address | ||
- Transactions | ||
- [ ] Fetching Transactions & Receipts | ||
- [ ] Transaction Types (EIP-1559, Legacy, etc) | ||
- [ ] Simulating Transactions | ||
- [ ] Sending Transactions (& Waiting for Receipt) |
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 @@ | ||
# _REPLACE ME_ Example | ||
|
||
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github.com/iosh/cive/tree/main/examples/PATH/TO/EXAMPLE/DIR) |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</head> | ||
<body> | ||
<h1>_REPLACE ME_ Example</h1> | ||
<div id="app">Loading...</div> | ||
<script type="module"> | ||
import out from './index.ts'; | ||
document.querySelector('#app').innerHTML = Array.isArray(out) | ||
? out.map(x => `<div style="margin-bottom: 16px;">${x}</div>`).join('') | ||
: out; | ||
</script> | ||
</body> | ||
</html> |
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,11 @@ | ||
import { http, createPublicClient } from 'cive' | ||
import { mainnet } from 'cive/chains' | ||
|
||
const client = createPublicClient({ | ||
chain: mainnet, | ||
transport: http(), | ||
}) | ||
|
||
const epochNumber = await client.getEpochNumber() | ||
|
||
export default [`epoch number: ${epochNumber}`] |
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,15 @@ | ||
{ | ||
"name": "example-template", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite" | ||
}, | ||
"dependencies": { | ||
"cive": "latest" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.0.3", | ||
"vite": "^5.4.4" | ||
} | ||
} |
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,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
"lib": ["ESNext", "DOM"], | ||
"moduleResolution": "Node", | ||
"strict": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"noEmit": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src"] | ||
} |
Oops, something went wrong.