@argent/x-shared 1.30.0 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Address } from '../chains/starknet/address';
|
|
2
|
-
import {
|
|
2
|
+
import { OnchainRecovery } from './schema';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* IOnchainRecoveryService interface
|
|
6
6
|
*/
|
|
7
7
|
export interface IOnchainRecoveryService {
|
|
8
|
-
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<
|
|
9
|
-
|
|
10
|
-
}>;
|
|
11
|
-
getRecovery(address: Address, recoveryId: number): Promise<RecoveryStatus>;
|
|
8
|
+
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<OnchainRecovery>;
|
|
9
|
+
getRecovery(address: Address, recoveryId?: number): Promise<OnchainRecovery>;
|
|
12
10
|
cancelRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<void>;
|
|
13
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address } from '../chains/starknet/address';
|
|
2
2
|
import { IHttpService } from '../http';
|
|
3
3
|
import { IOnchainRecoveryService } from './IOnchainRecoveryService';
|
|
4
|
-
import {
|
|
4
|
+
import { OnchainRecovery } from './schema';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* RecoveryService class implements IRecoveryService interface.
|
|
@@ -10,9 +10,7 @@ export declare class OnchainRecoveryService implements IOnchainRecoveryService {
|
|
|
10
10
|
protected readonly apiBase: string;
|
|
11
11
|
private readonly httpService;
|
|
12
12
|
constructor(apiBase: string, httpService: IHttpService);
|
|
13
|
-
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<
|
|
14
|
-
|
|
15
|
-
}>;
|
|
16
|
-
getRecovery(address: Address, recoveryId: number): Promise<RecoveryStatus>;
|
|
13
|
+
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<OnchainRecovery>;
|
|
14
|
+
getRecovery(address: Address, recoveryId?: number): Promise<OnchainRecovery>;
|
|
17
15
|
cancelRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<void>;
|
|
18
16
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export declare const startRecoverySchema: z.ZodObject<{
|
|
4
|
-
recoveryId: z.ZodNumber;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
recoveryId: number;
|
|
7
|
-
}, {
|
|
8
|
-
recoveryId: number;
|
|
9
|
-
}>;
|
|
10
3
|
export declare const recoveryBodySchema: z.ZodObject<{
|
|
11
4
|
feeToken: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
12
5
|
signerSignature: z.ZodObject<{
|
|
@@ -61,13 +54,18 @@ export declare const recoveryBodySchema: z.ZodObject<{
|
|
|
61
54
|
};
|
|
62
55
|
}>;
|
|
63
56
|
export declare const recoveryStatusSchema: z.ZodEnum<["ONGOING", "COMPLETED", "ERROR", "CANCELLED", "AWAITING_FUNDS"]>;
|
|
64
|
-
export declare const
|
|
57
|
+
export declare const onchainRecoverySchema: z.ZodObject<{
|
|
65
58
|
status: z.ZodEnum<["ONGOING", "COMPLETED", "ERROR", "CANCELLED", "AWAITING_FUNDS"]>;
|
|
59
|
+
recoveryId: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
completionTime: z.ZodArray<z.ZodNumber, "many">;
|
|
66
61
|
}, "strip", z.ZodTypeAny, {
|
|
67
62
|
status: "ONGOING" | "COMPLETED" | "ERROR" | "CANCELLED" | "AWAITING_FUNDS";
|
|
63
|
+
completionTime: number[];
|
|
64
|
+
recoveryId?: number | undefined;
|
|
68
65
|
}, {
|
|
69
66
|
status: "ONGOING" | "COMPLETED" | "ERROR" | "CANCELLED" | "AWAITING_FUNDS";
|
|
67
|
+
completionTime: number[];
|
|
68
|
+
recoveryId?: number | undefined;
|
|
70
69
|
}>;
|
|
71
|
-
export type StartRecoveryResponse = z.infer<typeof startRecoverySchema>;
|
|
72
70
|
export type RecoveryStatus = z.infer<typeof recoveryStatusSchema>;
|
|
73
|
-
export type
|
|
71
|
+
export type OnchainRecovery = z.infer<typeof onchainRecoverySchema>;
|