@0xsequence/guard 2.3.6 → 2.3.8
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.
|
@@ -18,14 +18,14 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-guard v0.4.0
|
|
21
|
+
// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067
|
|
22
22
|
// --
|
|
23
|
-
// Code generated by webrpc-gen@v0.
|
|
23
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
25
25
|
// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
|
|
26
26
|
|
|
27
27
|
const WebrpcHeader = 'Webrpc';
|
|
28
|
-
const WebrpcHeaderValue = 'webrpc@v0.
|
|
28
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0';
|
|
29
29
|
|
|
30
30
|
//
|
|
31
31
|
// Types
|
|
@@ -18,14 +18,14 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-guard v0.4.0
|
|
21
|
+
// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067
|
|
22
22
|
// --
|
|
23
|
-
// Code generated by webrpc-gen@v0.
|
|
23
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
25
25
|
// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
|
|
26
26
|
|
|
27
27
|
const WebrpcHeader = 'Webrpc';
|
|
28
|
-
const WebrpcHeaderValue = 'webrpc@v0.
|
|
28
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0';
|
|
29
29
|
|
|
30
30
|
//
|
|
31
31
|
// Types
|
|
@@ -14,14 +14,14 @@ function _extends() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
|
-
// sequence-guard v0.4.0
|
|
17
|
+
// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067
|
|
18
18
|
// --
|
|
19
|
-
// Code generated by webrpc-gen@v0.
|
|
19
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
20
20
|
//
|
|
21
21
|
// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
|
|
22
22
|
|
|
23
23
|
const WebrpcHeader = 'Webrpc';
|
|
24
|
-
const WebrpcHeaderValue = 'webrpc@v0.
|
|
24
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0';
|
|
25
25
|
|
|
26
26
|
//
|
|
27
27
|
// Types
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const WebrpcHeader = "Webrpc";
|
|
2
|
-
export declare const WebrpcHeaderValue = "webrpc@v0.
|
|
2
|
+
export declare const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0";
|
|
3
3
|
export declare const WebRPCVersion = "v1";
|
|
4
4
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
5
|
-
export declare const WebRPCSchemaHash = "
|
|
5
|
+
export declare const WebRPCSchemaHash = "776b307c2145ac7a994eec63240acae042c96067";
|
|
6
6
|
type WebrpcGenVersions = {
|
|
7
7
|
webrpcGenVersion: string;
|
|
8
8
|
codeGenName: string;
|
|
@@ -57,17 +57,61 @@ export interface Guard {
|
|
|
57
57
|
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>;
|
|
58
58
|
runtimeStatus(headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn>;
|
|
59
59
|
getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetSignerConfigReturn>;
|
|
60
|
+
/**
|
|
61
|
+
* Called by sequence.app when the user signs in, and signs messages/transactions/migrations.
|
|
62
|
+
* Requires a valid 2FA token if enabled.
|
|
63
|
+
*/
|
|
60
64
|
sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise<SignReturn>;
|
|
61
65
|
signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise<SignWithReturn>;
|
|
66
|
+
/**
|
|
67
|
+
* Internal use only.
|
|
68
|
+
* Only ever needs to be called once per chain.
|
|
69
|
+
* Signs a preconfigured payload that the caller has no control over.
|
|
70
|
+
*/
|
|
62
71
|
patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise<PatchReturn>;
|
|
72
|
+
/**
|
|
73
|
+
* Called by sequence.app when it needs to check the user's 2FA.
|
|
74
|
+
* This happens during sign in, before signing messages and transactions, and when configuring 2FA.
|
|
75
|
+
* Requires either a valid JWT or a signature by one of the wallet's signers.
|
|
76
|
+
*/
|
|
63
77
|
authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise<AuthMethodsReturn>;
|
|
78
|
+
/**
|
|
79
|
+
* Not currently called. Requires both a JWT and a wallet signature.
|
|
80
|
+
*/
|
|
64
81
|
setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise<SetPINReturn>;
|
|
82
|
+
/**
|
|
83
|
+
* Not currently called. Requires both a JWT and a wallet signature.
|
|
84
|
+
*/
|
|
65
85
|
resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise<ResetPINReturn>;
|
|
86
|
+
/**
|
|
87
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
88
|
+
* Requires both a JWT and a wallet signature.
|
|
89
|
+
*/
|
|
66
90
|
createTOTP(args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise<CreateTOTPReturn>;
|
|
91
|
+
/**
|
|
92
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
93
|
+
* Requires both a JWT and a wallet signature.
|
|
94
|
+
*/
|
|
67
95
|
commitTOTP(args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise<CommitTOTPReturn>;
|
|
96
|
+
/**
|
|
97
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
98
|
+
* Requires both a JWT and a wallet signature.
|
|
99
|
+
*/
|
|
68
100
|
resetTOTP(args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise<ResetTOTPReturn>;
|
|
101
|
+
/**
|
|
102
|
+
* Called by sequence.app when the user uses a recovery code.
|
|
103
|
+
* Requires either a valid JWT or a signature by one of the wallet's signers.
|
|
104
|
+
*/
|
|
69
105
|
reset2FA(args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise<Reset2FAReturn>;
|
|
106
|
+
/**
|
|
107
|
+
* Called by sequence.app when the user is viewing their recovery codes.
|
|
108
|
+
* Requires both a JWT and a wallet signature.
|
|
109
|
+
*/
|
|
70
110
|
recoveryCodes(args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise<RecoveryCodesReturn>;
|
|
111
|
+
/**
|
|
112
|
+
* Called by sequence.app when the user is viewing their recovery codes.
|
|
113
|
+
* Requires both a JWT and a wallet signature.
|
|
114
|
+
*/
|
|
71
115
|
resetRecoveryCodes(args: ResetRecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise<ResetRecoveryCodesReturn>;
|
|
72
116
|
}
|
|
73
117
|
export interface PingArgs {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/guard",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
4
4
|
"description": "guard sub-package for Sequence",
|
|
5
5
|
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"ethers": ">=6"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@0xsequence/
|
|
16
|
-
"@0xsequence/
|
|
17
|
-
"@0xsequence/signhub": "2.3.
|
|
18
|
-
"@0xsequence/
|
|
15
|
+
"@0xsequence/account": "2.3.8",
|
|
16
|
+
"@0xsequence/core": "2.3.8",
|
|
17
|
+
"@0xsequence/signhub": "2.3.8",
|
|
18
|
+
"@0xsequence/utils": "2.3.8"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"ethers": "6.13.4"
|
package/src/guard.gen.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-guard v0.4.0
|
|
2
|
+
// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.
|
|
4
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
|
|
7
7
|
|
|
8
8
|
export const WebrpcHeader = 'Webrpc'
|
|
9
9
|
|
|
10
|
-
export const WebrpcHeaderValue = 'webrpc@v0.
|
|
10
|
+
export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0'
|
|
11
11
|
|
|
12
12
|
// WebRPC description and code-gen version
|
|
13
13
|
export const WebRPCVersion = 'v1'
|
|
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
|
|
|
16
16
|
export const WebRPCSchemaVersion = 'v0.4.0'
|
|
17
17
|
|
|
18
18
|
// Schema hash generated from your RIDL schema
|
|
19
|
-
export const WebRPCSchemaHash = '
|
|
19
|
+
export const WebRPCSchemaHash = '776b307c2145ac7a994eec63240acae042c96067'
|
|
20
20
|
|
|
21
21
|
type WebrpcGenVersions = {
|
|
22
22
|
webrpcGenVersion: string
|
|
@@ -124,17 +124,61 @@ export interface Guard {
|
|
|
124
124
|
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>
|
|
125
125
|
runtimeStatus(headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn>
|
|
126
126
|
getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetSignerConfigReturn>
|
|
127
|
+
/**
|
|
128
|
+
* Called by sequence.app when the user signs in, and signs messages/transactions/migrations.
|
|
129
|
+
* Requires a valid 2FA token if enabled.
|
|
130
|
+
*/
|
|
127
131
|
sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise<SignReturn>
|
|
128
132
|
signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise<SignWithReturn>
|
|
133
|
+
/**
|
|
134
|
+
* Internal use only.
|
|
135
|
+
* Only ever needs to be called once per chain.
|
|
136
|
+
* Signs a preconfigured payload that the caller has no control over.
|
|
137
|
+
*/
|
|
129
138
|
patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise<PatchReturn>
|
|
139
|
+
/**
|
|
140
|
+
* Called by sequence.app when it needs to check the user's 2FA.
|
|
141
|
+
* This happens during sign in, before signing messages and transactions, and when configuring 2FA.
|
|
142
|
+
* Requires either a valid JWT or a signature by one of the wallet's signers.
|
|
143
|
+
*/
|
|
130
144
|
authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise<AuthMethodsReturn>
|
|
145
|
+
/**
|
|
146
|
+
* Not currently called. Requires both a JWT and a wallet signature.
|
|
147
|
+
*/
|
|
131
148
|
setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise<SetPINReturn>
|
|
149
|
+
/**
|
|
150
|
+
* Not currently called. Requires both a JWT and a wallet signature.
|
|
151
|
+
*/
|
|
132
152
|
resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise<ResetPINReturn>
|
|
153
|
+
/**
|
|
154
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
155
|
+
* Requires both a JWT and a wallet signature.
|
|
156
|
+
*/
|
|
133
157
|
createTOTP(args: CreateTOTPArgs, headers?: object, signal?: AbortSignal): Promise<CreateTOTPReturn>
|
|
158
|
+
/**
|
|
159
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
160
|
+
* Requires both a JWT and a wallet signature.
|
|
161
|
+
*/
|
|
134
162
|
commitTOTP(args: CommitTOTPArgs, headers?: object, signal?: AbortSignal): Promise<CommitTOTPReturn>
|
|
163
|
+
/**
|
|
164
|
+
* Called by sequence.app when the user configures their 2FA.
|
|
165
|
+
* Requires both a JWT and a wallet signature.
|
|
166
|
+
*/
|
|
135
167
|
resetTOTP(args: ResetTOTPArgs, headers?: object, signal?: AbortSignal): Promise<ResetTOTPReturn>
|
|
168
|
+
/**
|
|
169
|
+
* Called by sequence.app when the user uses a recovery code.
|
|
170
|
+
* Requires either a valid JWT or a signature by one of the wallet's signers.
|
|
171
|
+
*/
|
|
136
172
|
reset2FA(args: Reset2FAArgs, headers?: object, signal?: AbortSignal): Promise<Reset2FAReturn>
|
|
173
|
+
/**
|
|
174
|
+
* Called by sequence.app when the user is viewing their recovery codes.
|
|
175
|
+
* Requires both a JWT and a wallet signature.
|
|
176
|
+
*/
|
|
137
177
|
recoveryCodes(args: RecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise<RecoveryCodesReturn>
|
|
178
|
+
/**
|
|
179
|
+
* Called by sequence.app when the user is viewing their recovery codes.
|
|
180
|
+
* Requires both a JWT and a wallet signature.
|
|
181
|
+
*/
|
|
138
182
|
resetRecoveryCodes(args: ResetRecoveryCodesArgs, headers?: object, signal?: AbortSignal): Promise<ResetRecoveryCodesReturn>
|
|
139
183
|
}
|
|
140
184
|
|