fix State type
@@ -130,9 +130,14 @@ type RpcAccounts = {
[key: string]: PublicKey | RpcAccounts;
};
-export type State = {
+export type State = () =>
+ | Promise<any>
+ | {
address: () => Promise<PublicKey>;
rpc: Rpcs;
+ instruction: Ixs;
+ subscribe: (address: PublicKey, commitment?: Commitment) => EventEmitter;
+ unsubscribe: (address: PublicKey) => void;
};
// Tracks all subscriptions.
