Skip to content

Commit

Permalink
remove legacy code and encointer code
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Oct 25, 2024
1 parent 6da2a66 commit cdf69f0
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 340 deletions.
132 changes: 0 additions & 132 deletions packages/worker-api/src/encointerWorker.spec.ts

This file was deleted.

107 changes: 0 additions & 107 deletions packages/worker-api/src/encointerWorker.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/worker-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { Worker } from './worker.js';
export { EncointerWorker } from './encointerWorker.js';
export { IntegriteeWorker } from './integriteeWorker.js';

export * from './interface.js';
27 changes: 0 additions & 27 deletions packages/worker-api/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface IWorker extends WebSocketAsPromised {
}

export interface GenericGetter {

toHex(): string
}

Expand All @@ -45,22 +44,6 @@ export interface ISubmittableGetter<W extends IWorkerBase, Type> {
send(): Promise<Type>;
}

export interface JsonRpcRequest {
jsonrpc: string;
method: string;
params?: any;
id: number | string;
}

export function createJsonRpcRequest(method: string, params: any, id: number | string): JsonRpcRequest {
return {
jsonrpc: '2.0',
method: method,
params: params,
id: id
};
}

export interface WorkerOptions {
keyring?: Keyring;
types?: RegistryTypes;
Expand Down Expand Up @@ -94,17 +77,7 @@ export interface PublicGetterArgs {

export type PublicGetterParams = GuessTheNumberPublicGetter | null

export type RequestArgs = PublicGetterArgs | TrustedGetterArgs | { }

export interface RequestOptions {
timeout?: number;
debug?: boolean;
}

export enum Request {
TrustedGetter,
PublicGetter,
Worker
}

export type WorkerMethod = [ Request, string, string ]
22 changes: 0 additions & 22 deletions packages/worker-api/src/parsers.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/worker-api/src/requests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
createJsonRpcRequest,
type IWorkerBase, type PublicGetterParams, type TrustedGetterParams,
type TrustedSignerOptions
} from "./interface.js";
Expand Down Expand Up @@ -50,18 +49,6 @@ export async function signTrustedGetter(self: IWorkerBase, account: AddressOrPai
return g;
}

export const createGetterRpc = (self: IWorkerBase, getter: IntegriteeGetter, shard: ShardIdentifier) => {
const r = self.createType(
'Request', {
shard: shard,
cyphertext: getter.toHex()
}
);

return createJsonRpcRequest('state_executeGetter', [r.toHex()], 1);
}


export type TrustedCallArgs = (BalanceTransferArgs | BalanceUnshieldArgs | GuessTheNumberTrustedCall);

export type TrustedCallVariant = [string, string]
Expand Down
38 changes: 0 additions & 38 deletions packages/worker-api/src/sendRequest.ts

This file was deleted.

0 comments on commit cdf69f0

Please sign in to comment.