Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

chore: beacon-related tweaks #131

Merged
merged 2 commits into from
Jun 20, 2022
Merged

chore: beacon-related tweaks #131

merged 2 commits into from
Jun 20, 2022

Conversation

harrysolovay
Copy link
Contributor

No description provided.

@@ -7,7 +7,7 @@ import { rpcCall } from "./rpcCall.ts";

export const metadata = effector(
"metadata",
(rpc: EffectorItem<rpc.AnyClient>, blockHash?: EffectorItem<U.HashHexString>) => {
(rpc: EffectorItem<any>, blockHash?: EffectorItem<U.HashHexString>) => {
Copy link
Contributor Author

@harrysolovay harrysolovay Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effects are in need of a refactor, given the way that RPC types flow through the beacon into any/all calls. This any-ifying is temporary

@@ -1,15 +1,3 @@
import { Branded } from "../util/mod.ts";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper branded types are still a todo.

@@ -18,10 +18,10 @@ export type Subscription<NotificationResult = any> = { [_N]: NotificationResult

export interface ClientProps<
M extends AnyMethods,
Beacon,
DiscoveryValue,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zeroing in on correct terminology. Beacons contain discovery values (such as URLs and chain specs). Beacons are encoded with the type information necessary to constrain client usage.

@@ -18,10 +18,10 @@ export type Subscription<NotificationResult = any> = { [_N]: NotificationResult

export interface ClientProps<
M extends AnyMethods,
Beacon,
DiscoveryValue,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zeroing in on correct terminology. Beacons contain discovery values (such as URLs and chain specs). Beacons are encoded with the type information necessary to constrain client usage.

@harrysolovay harrysolovay merged commit ed5d3e1 into main Jun 20, 2022
@harrysolovay harrysolovay deleted the beacon-tweaks branch June 20, 2022 19:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant