This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove fluent api and clean up examples (#254)
- Loading branch information
1 parent
4d2d06f
commit 8b42d8e
Showing
44 changed files
with
133 additions
and
574 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 @@ | ||
export * from "https://deno.land/x/[email protected]/types/mod.ts"; |
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 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
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
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 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,9 @@ | ||
import * as C from "../../mod.ts"; | ||
import * as rpc from "../../rpc/mod.ts"; | ||
import * as U from "../../util/mod.ts"; | ||
|
||
const client = U.throwIfError(await rpc.stdClient(C.westend)); | ||
|
||
console.log(await client.call("state_getMetadata", [])); | ||
|
||
await client.close(); |
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,20 @@ | ||
import * as C from "../../mod.ts"; | ||
import * as rpc from "../../rpc/mod.ts"; | ||
import * as U from "../../util/mod.ts"; | ||
|
||
const client = U.throwIfError(await rpc.stdClient(C.westend)); | ||
|
||
const maybeError = await client.subscribe("chain_subscribeAllHeads", [], (stop) => { | ||
let i = 1; | ||
return async (message) => { | ||
console.log({ [i++]: message.params.result }); | ||
if (i > 5) { | ||
stop(); | ||
await client.close(); | ||
} | ||
}; | ||
}); | ||
|
||
if (maybeError) { | ||
console.log(maybeError); | ||
} |
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,10 +1,6 @@ | ||
import * as C from "../mod.ts"; | ||
import * as U from "../util/mod.ts"; | ||
|
||
const root = C | ||
.chain(C.polkadot) | ||
.pallet("System") | ||
.entry("Events") | ||
.read(); | ||
const root = C.readBlock(C.polkadot); | ||
|
||
console.log(U.throwIfError(await root.run())); |
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,6 @@ | ||
import * as C from "../mod.ts"; | ||
import * as U from "../util/mod.ts"; | ||
|
||
const root = C.readEntry(C.westend, "System", "Events", []); | ||
|
||
console.log(U.throwIfError(await root.run())); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as C from "../mod.ts"; | ||
import * as U from "../util/mod.ts"; | ||
|
||
const root = C.rpcCall(C.polkadot, "rpc_methods", []); | ||
|
||
console.log(U.throwIfError(await root.run())); |
7 changes: 3 additions & 4 deletions
7
effect/examples/subscription.ts → examples/rpc_subscription.ts
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 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,10 +1,10 @@ | ||
import * as C from "../../mod.ts"; | ||
import * as U from "../../util/mod.ts"; | ||
|
||
const idx = C | ||
.readEntry(C.polkadot, "Staking", "ActiveEra", []) | ||
const idx = C.readEntry(C.polkadot, "Staking", "ActiveEra", []) | ||
.select("value") | ||
.select("index"); | ||
|
||
const eraRewardPoints = C.readEntry(C.polkadot, "Staking", "ErasRewardPoints", [idx]); | ||
|
||
console.log(U.throwIfError(await eraRewardPoints.run())); |
Oops, something went wrong.