@0xsequence/api 0.0.0-20241216114019 → 0.0.0-20241218203257
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.
- package/dist/0xsequence-api.cjs.dev.js +10 -54
- package/dist/0xsequence-api.cjs.prod.js +10 -54
- package/dist/0xsequence-api.esm.js +10 -54
- package/dist/declarations/src/api.gen.d.ts +4 -37
- package/package.json +1 -1
- package/src/api.gen.ts +7 -86
|
@@ -3,24 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
22
17
|
// --
|
|
23
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
19
|
//
|
|
25
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
26
21
|
|
|
@@ -31,7 +26,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
26
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
27
|
|
|
33
28
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
29
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
35
30
|
|
|
36
31
|
//
|
|
37
32
|
// Types
|
|
@@ -180,32 +175,6 @@ class API {
|
|
|
180
175
|
});
|
|
181
176
|
});
|
|
182
177
|
};
|
|
183
|
-
this.registerPublicKey = (args, headers, signal) => {
|
|
184
|
-
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
185
|
-
return buildResponse(res).then(_data => {
|
|
186
|
-
return {
|
|
187
|
-
status: _data.status
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
}, error => {
|
|
191
|
-
throw WebrpcRequestFailedError.new({
|
|
192
|
-
cause: `fetch(): ${error.message || ''}`
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
this.getPublicKey = (args, headers, signal) => {
|
|
197
|
-
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
198
|
-
return buildResponse(res).then(_data => {
|
|
199
|
-
return {
|
|
200
|
-
publicKey: _data.publicKey
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
}, error => {
|
|
204
|
-
throw WebrpcRequestFailedError.new({
|
|
205
|
-
cause: `fetch(): ${error.message || ''}`
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
178
|
this.friendList = (args, headers, signal) => {
|
|
210
179
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
211
180
|
return buildResponse(res).then(_data => {
|
|
@@ -810,19 +779,6 @@ class API {
|
|
|
810
779
|
});
|
|
811
780
|
});
|
|
812
781
|
};
|
|
813
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
814
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
815
|
-
return buildResponse(res).then(_data => {
|
|
816
|
-
return {
|
|
817
|
-
swapPrice: _data.swapPrice
|
|
818
|
-
};
|
|
819
|
-
});
|
|
820
|
-
}, error => {
|
|
821
|
-
throw WebrpcRequestFailedError.new({
|
|
822
|
-
cause: `fetch(): ${error.message || ''}`
|
|
823
|
-
});
|
|
824
|
-
});
|
|
825
|
-
};
|
|
826
782
|
this.getSwapPrices = (args, headers, signal) => {
|
|
827
783
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
828
784
|
return buildResponse(res).then(_data => {
|
|
@@ -952,7 +908,7 @@ class API {
|
|
|
952
908
|
});
|
|
953
909
|
});
|
|
954
910
|
};
|
|
955
|
-
this.hostname = hostname
|
|
911
|
+
this.hostname = hostname;
|
|
956
912
|
this.fetch = (input, init) => fetch(input, init);
|
|
957
913
|
}
|
|
958
914
|
url(name) {
|
|
@@ -3,24 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
22
17
|
// --
|
|
23
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
19
|
//
|
|
25
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
26
21
|
|
|
@@ -31,7 +26,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
26
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
27
|
|
|
33
28
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
29
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
35
30
|
|
|
36
31
|
//
|
|
37
32
|
// Types
|
|
@@ -180,32 +175,6 @@ class API {
|
|
|
180
175
|
});
|
|
181
176
|
});
|
|
182
177
|
};
|
|
183
|
-
this.registerPublicKey = (args, headers, signal) => {
|
|
184
|
-
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
185
|
-
return buildResponse(res).then(_data => {
|
|
186
|
-
return {
|
|
187
|
-
status: _data.status
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
}, error => {
|
|
191
|
-
throw WebrpcRequestFailedError.new({
|
|
192
|
-
cause: `fetch(): ${error.message || ''}`
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
this.getPublicKey = (args, headers, signal) => {
|
|
197
|
-
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
198
|
-
return buildResponse(res).then(_data => {
|
|
199
|
-
return {
|
|
200
|
-
publicKey: _data.publicKey
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
}, error => {
|
|
204
|
-
throw WebrpcRequestFailedError.new({
|
|
205
|
-
cause: `fetch(): ${error.message || ''}`
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
178
|
this.friendList = (args, headers, signal) => {
|
|
210
179
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
211
180
|
return buildResponse(res).then(_data => {
|
|
@@ -810,19 +779,6 @@ class API {
|
|
|
810
779
|
});
|
|
811
780
|
});
|
|
812
781
|
};
|
|
813
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
814
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
815
|
-
return buildResponse(res).then(_data => {
|
|
816
|
-
return {
|
|
817
|
-
swapPrice: _data.swapPrice
|
|
818
|
-
};
|
|
819
|
-
});
|
|
820
|
-
}, error => {
|
|
821
|
-
throw WebrpcRequestFailedError.new({
|
|
822
|
-
cause: `fetch(): ${error.message || ''}`
|
|
823
|
-
});
|
|
824
|
-
});
|
|
825
|
-
};
|
|
826
782
|
this.getSwapPrices = (args, headers, signal) => {
|
|
827
783
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
828
784
|
return buildResponse(res).then(_data => {
|
|
@@ -952,7 +908,7 @@ class API {
|
|
|
952
908
|
});
|
|
953
909
|
});
|
|
954
910
|
};
|
|
955
|
-
this.hostname = hostname
|
|
911
|
+
this.hostname = hostname;
|
|
956
912
|
this.fetch = (input, init) => fetch(input, init);
|
|
957
913
|
}
|
|
958
914
|
url(name) {
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
function _extends() {
|
|
2
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
for (var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
2
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var t = arguments[e];
|
|
5
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
10
6
|
}
|
|
11
|
-
return
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
7
|
+
return n;
|
|
8
|
+
}, _extends.apply(null, arguments);
|
|
14
9
|
}
|
|
15
10
|
|
|
16
11
|
/* eslint-disable */
|
|
17
|
-
// sequence-api v0.4.0
|
|
12
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
18
13
|
// --
|
|
19
|
-
// Code generated by webrpc-gen@v0.
|
|
14
|
+
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
20
15
|
//
|
|
21
16
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
22
17
|
|
|
@@ -27,7 +22,7 @@ const WebRPCVersion = 'v1';
|
|
|
27
22
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
28
23
|
|
|
29
24
|
// Schema hash generated from your RIDL schema
|
|
30
|
-
const WebRPCSchemaHash = '
|
|
25
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
31
26
|
|
|
32
27
|
//
|
|
33
28
|
// Types
|
|
@@ -176,32 +171,6 @@ class API {
|
|
|
176
171
|
});
|
|
177
172
|
});
|
|
178
173
|
};
|
|
179
|
-
this.registerPublicKey = (args, headers, signal) => {
|
|
180
|
-
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
181
|
-
return buildResponse(res).then(_data => {
|
|
182
|
-
return {
|
|
183
|
-
status: _data.status
|
|
184
|
-
};
|
|
185
|
-
});
|
|
186
|
-
}, error => {
|
|
187
|
-
throw WebrpcRequestFailedError.new({
|
|
188
|
-
cause: `fetch(): ${error.message || ''}`
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
this.getPublicKey = (args, headers, signal) => {
|
|
193
|
-
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
194
|
-
return buildResponse(res).then(_data => {
|
|
195
|
-
return {
|
|
196
|
-
publicKey: _data.publicKey
|
|
197
|
-
};
|
|
198
|
-
});
|
|
199
|
-
}, error => {
|
|
200
|
-
throw WebrpcRequestFailedError.new({
|
|
201
|
-
cause: `fetch(): ${error.message || ''}`
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
174
|
this.friendList = (args, headers, signal) => {
|
|
206
175
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
207
176
|
return buildResponse(res).then(_data => {
|
|
@@ -806,19 +775,6 @@ class API {
|
|
|
806
775
|
});
|
|
807
776
|
});
|
|
808
777
|
};
|
|
809
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
810
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
811
|
-
return buildResponse(res).then(_data => {
|
|
812
|
-
return {
|
|
813
|
-
swapPrice: _data.swapPrice
|
|
814
|
-
};
|
|
815
|
-
});
|
|
816
|
-
}, error => {
|
|
817
|
-
throw WebrpcRequestFailedError.new({
|
|
818
|
-
cause: `fetch(): ${error.message || ''}`
|
|
819
|
-
});
|
|
820
|
-
});
|
|
821
|
-
};
|
|
822
778
|
this.getSwapPrices = (args, headers, signal) => {
|
|
823
779
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
824
780
|
return buildResponse(res).then(_data => {
|
|
@@ -948,7 +904,7 @@ class API {
|
|
|
948
904
|
});
|
|
949
905
|
});
|
|
950
906
|
};
|
|
951
|
-
this.hostname = hostname
|
|
907
|
+
this.hostname = hostname;
|
|
952
908
|
this.fetch = (input, init) => fetch(input, init);
|
|
953
909
|
}
|
|
954
910
|
url(name) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
|
|
4
4
|
export declare enum SortOrder {
|
|
5
5
|
DESC = "DESC",
|
|
6
6
|
ASC = "ASC"
|
|
@@ -55,11 +55,6 @@ export interface SequenceContext {
|
|
|
55
55
|
guestModule: string;
|
|
56
56
|
utils: string;
|
|
57
57
|
}
|
|
58
|
-
export interface PublicKey {
|
|
59
|
-
id: string;
|
|
60
|
-
x: string;
|
|
61
|
-
y: string;
|
|
62
|
-
}
|
|
63
58
|
export interface User {
|
|
64
59
|
address: string;
|
|
65
60
|
username: string;
|
|
@@ -315,7 +310,7 @@ export interface SwapPrice {
|
|
|
315
310
|
currencyAddress: string;
|
|
316
311
|
currencyBalance: string;
|
|
317
312
|
price: string;
|
|
318
|
-
|
|
313
|
+
to: string;
|
|
319
314
|
transactionValue: string;
|
|
320
315
|
}
|
|
321
316
|
export interface SwapQuote {
|
|
@@ -387,8 +382,6 @@ export interface API {
|
|
|
387
382
|
getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn>;
|
|
388
383
|
getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return>;
|
|
389
384
|
sendPasswordlessLink(args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal): Promise<SendPasswordlessLinkReturn>;
|
|
390
|
-
registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn>;
|
|
391
|
-
getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn>;
|
|
392
385
|
friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>;
|
|
393
386
|
getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>;
|
|
394
387
|
searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>;
|
|
@@ -435,7 +428,6 @@ export interface API {
|
|
|
435
428
|
removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>;
|
|
436
429
|
generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>;
|
|
437
430
|
validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>;
|
|
438
|
-
getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>;
|
|
439
431
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>;
|
|
440
432
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>;
|
|
441
433
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>;
|
|
@@ -500,18 +492,6 @@ export interface SendPasswordlessLinkArgs {
|
|
|
500
492
|
export interface SendPasswordlessLinkReturn {
|
|
501
493
|
status: boolean;
|
|
502
494
|
}
|
|
503
|
-
export interface RegisterPublicKeyArgs {
|
|
504
|
-
publicKey: PublicKey;
|
|
505
|
-
}
|
|
506
|
-
export interface RegisterPublicKeyReturn {
|
|
507
|
-
status: boolean;
|
|
508
|
-
}
|
|
509
|
-
export interface GetPublicKeyArgs {
|
|
510
|
-
id: string;
|
|
511
|
-
}
|
|
512
|
-
export interface GetPublicKeyReturn {
|
|
513
|
-
publicKey: PublicKey;
|
|
514
|
-
}
|
|
515
495
|
export interface FriendListArgs {
|
|
516
496
|
nickname?: string;
|
|
517
497
|
page?: Page;
|
|
@@ -814,6 +794,8 @@ export interface RemoveLinkedWalletArgs {
|
|
|
814
794
|
parentWalletMessage: string;
|
|
815
795
|
parentWalletSignature: string;
|
|
816
796
|
linkedWalletAddress: string;
|
|
797
|
+
linkedWalletMessage: string;
|
|
798
|
+
linkedWalletSignature: string;
|
|
817
799
|
signatureChainId: string;
|
|
818
800
|
}
|
|
819
801
|
export interface RemoveLinkedWalletReturn {
|
|
@@ -835,22 +817,11 @@ export interface ValidateWaaSVerificationNonceArgs {
|
|
|
835
817
|
export interface ValidateWaaSVerificationNonceReturn {
|
|
836
818
|
walletAddress: string;
|
|
837
819
|
}
|
|
838
|
-
export interface GetSwapPriceArgs {
|
|
839
|
-
buyCurrencyAddress: string;
|
|
840
|
-
sellCurrencyAddress: string;
|
|
841
|
-
buyAmount: string;
|
|
842
|
-
chainId: number;
|
|
843
|
-
slippagePercentage?: number;
|
|
844
|
-
}
|
|
845
|
-
export interface GetSwapPriceReturn {
|
|
846
|
-
swapPrice: SwapPrice;
|
|
847
|
-
}
|
|
848
820
|
export interface GetSwapPricesArgs {
|
|
849
821
|
userAddress: string;
|
|
850
822
|
buyCurrencyAddress: string;
|
|
851
823
|
buyAmount: string;
|
|
852
824
|
chainId: number;
|
|
853
|
-
slippagePercentage?: number;
|
|
854
825
|
}
|
|
855
826
|
export interface GetSwapPricesReturn {
|
|
856
827
|
swapPrices: Array<SwapPrice>;
|
|
@@ -862,7 +833,6 @@ export interface GetSwapQuoteArgs {
|
|
|
862
833
|
buyAmount: string;
|
|
863
834
|
chainId: number;
|
|
864
835
|
includeApprove: boolean;
|
|
865
|
-
slippagePercentage?: number;
|
|
866
836
|
}
|
|
867
837
|
export interface GetSwapQuoteReturn {
|
|
868
838
|
swapQuote: SwapQuote;
|
|
@@ -932,8 +902,6 @@ export declare class API implements API {
|
|
|
932
902
|
getAuthToken: (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal) => Promise<GetAuthTokenReturn>;
|
|
933
903
|
getAuthToken2: (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal) => Promise<GetAuthToken2Return>;
|
|
934
904
|
sendPasswordlessLink: (args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal) => Promise<SendPasswordlessLinkReturn>;
|
|
935
|
-
registerPublicKey: (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal) => Promise<RegisterPublicKeyReturn>;
|
|
936
|
-
getPublicKey: (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal) => Promise<GetPublicKeyReturn>;
|
|
937
905
|
friendList: (args: FriendListArgs, headers?: object, signal?: AbortSignal) => Promise<FriendListReturn>;
|
|
938
906
|
getFriendByAddress: (args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal) => Promise<GetFriendByAddressReturn>;
|
|
939
907
|
searchFriends: (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal) => Promise<SearchFriendsReturn>;
|
|
@@ -980,7 +948,6 @@ export declare class API implements API {
|
|
|
980
948
|
removeLinkedWallet: (args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal) => Promise<RemoveLinkedWalletReturn>;
|
|
981
949
|
generateWaaSVerificationURL: (args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal) => Promise<GenerateWaaSVerificationURLReturn>;
|
|
982
950
|
validateWaaSVerificationNonce: (args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal) => Promise<ValidateWaaSVerificationNonceReturn>;
|
|
983
|
-
getSwapPrice: (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapPriceReturn>;
|
|
984
951
|
getSwapPrices: (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapPricesReturn>;
|
|
985
952
|
getSwapQuote: (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapQuoteReturn>;
|
|
986
953
|
listCurrencyGroups: (headers?: object, signal?: AbortSignal) => Promise<ListCurrencyGroupsReturn>;
|
package/package.json
CHANGED
package/src/api.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.
|
|
4
|
+
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ export const WebRPCVersion = 'v1'
|
|
|
12
12
|
export const WebRPCSchemaVersion = 'v0.4.0'
|
|
13
13
|
|
|
14
14
|
// Schema hash generated from your RIDL schema
|
|
15
|
-
export const WebRPCSchemaHash = '
|
|
15
|
+
export const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0'
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
@@ -78,12 +78,6 @@ export interface SequenceContext {
|
|
|
78
78
|
utils: string
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export interface PublicKey {
|
|
82
|
-
id: string
|
|
83
|
-
x: string
|
|
84
|
-
y: string
|
|
85
|
-
}
|
|
86
|
-
|
|
87
81
|
export interface User {
|
|
88
82
|
address: string
|
|
89
83
|
username: string
|
|
@@ -368,7 +362,7 @@ export interface SwapPrice {
|
|
|
368
362
|
currencyAddress: string
|
|
369
363
|
currencyBalance: string
|
|
370
364
|
price: string
|
|
371
|
-
|
|
365
|
+
to: string
|
|
372
366
|
transactionValue: string
|
|
373
367
|
}
|
|
374
368
|
|
|
@@ -451,8 +445,6 @@ export interface API {
|
|
|
451
445
|
headers?: object,
|
|
452
446
|
signal?: AbortSignal
|
|
453
447
|
): Promise<SendPasswordlessLinkReturn>
|
|
454
|
-
registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn>
|
|
455
|
-
getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn>
|
|
456
448
|
friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>
|
|
457
449
|
getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>
|
|
458
450
|
searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>
|
|
@@ -547,7 +539,6 @@ export interface API {
|
|
|
547
539
|
headers?: object,
|
|
548
540
|
signal?: AbortSignal
|
|
549
541
|
): Promise<ValidateWaaSVerificationNonceReturn>
|
|
550
|
-
getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>
|
|
551
542
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
|
|
552
543
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
|
|
553
544
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
|
|
@@ -644,20 +635,6 @@ export interface SendPasswordlessLinkArgs {
|
|
|
644
635
|
export interface SendPasswordlessLinkReturn {
|
|
645
636
|
status: boolean
|
|
646
637
|
}
|
|
647
|
-
export interface RegisterPublicKeyArgs {
|
|
648
|
-
publicKey: PublicKey
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
export interface RegisterPublicKeyReturn {
|
|
652
|
-
status: boolean
|
|
653
|
-
}
|
|
654
|
-
export interface GetPublicKeyArgs {
|
|
655
|
-
id: string
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
export interface GetPublicKeyReturn {
|
|
659
|
-
publicKey: PublicKey
|
|
660
|
-
}
|
|
661
638
|
export interface FriendListArgs {
|
|
662
639
|
nickname?: string
|
|
663
640
|
page?: Page
|
|
@@ -994,6 +971,8 @@ export interface RemoveLinkedWalletArgs {
|
|
|
994
971
|
parentWalletMessage: string
|
|
995
972
|
parentWalletSignature: string
|
|
996
973
|
linkedWalletAddress: string
|
|
974
|
+
linkedWalletMessage: string
|
|
975
|
+
linkedWalletSignature: string
|
|
997
976
|
signatureChainId: string
|
|
998
977
|
}
|
|
999
978
|
|
|
@@ -1018,23 +997,11 @@ export interface ValidateWaaSVerificationNonceArgs {
|
|
|
1018
997
|
export interface ValidateWaaSVerificationNonceReturn {
|
|
1019
998
|
walletAddress: string
|
|
1020
999
|
}
|
|
1021
|
-
export interface GetSwapPriceArgs {
|
|
1022
|
-
buyCurrencyAddress: string
|
|
1023
|
-
sellCurrencyAddress: string
|
|
1024
|
-
buyAmount: string
|
|
1025
|
-
chainId: number
|
|
1026
|
-
slippagePercentage?: number
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
export interface GetSwapPriceReturn {
|
|
1030
|
-
swapPrice: SwapPrice
|
|
1031
|
-
}
|
|
1032
1000
|
export interface GetSwapPricesArgs {
|
|
1033
1001
|
userAddress: string
|
|
1034
1002
|
buyCurrencyAddress: string
|
|
1035
1003
|
buyAmount: string
|
|
1036
1004
|
chainId: number
|
|
1037
|
-
slippagePercentage?: number
|
|
1038
1005
|
}
|
|
1039
1006
|
|
|
1040
1007
|
export interface GetSwapPricesReturn {
|
|
@@ -1047,7 +1014,6 @@ export interface GetSwapQuoteArgs {
|
|
|
1047
1014
|
buyAmount: string
|
|
1048
1015
|
chainId: number
|
|
1049
1016
|
includeApprove: boolean
|
|
1050
|
-
slippagePercentage?: number
|
|
1051
1017
|
}
|
|
1052
1018
|
|
|
1053
1019
|
export interface GetSwapQuoteReturn {
|
|
@@ -1120,7 +1086,7 @@ export class API implements API {
|
|
|
1120
1086
|
protected path = '/rpc/API/'
|
|
1121
1087
|
|
|
1122
1088
|
constructor(hostname: string, fetch: Fetch) {
|
|
1123
|
-
this.hostname = hostname
|
|
1089
|
+
this.hostname = hostname
|
|
1124
1090
|
this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init)
|
|
1125
1091
|
}
|
|
1126
1092
|
|
|
@@ -1258,36 +1224,6 @@ export class API implements API {
|
|
|
1258
1224
|
)
|
|
1259
1225
|
}
|
|
1260
1226
|
|
|
1261
|
-
registerPublicKey = (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn> => {
|
|
1262
|
-
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(
|
|
1263
|
-
res => {
|
|
1264
|
-
return buildResponse(res).then(_data => {
|
|
1265
|
-
return {
|
|
1266
|
-
status: <boolean>_data.status
|
|
1267
|
-
}
|
|
1268
|
-
})
|
|
1269
|
-
},
|
|
1270
|
-
error => {
|
|
1271
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1272
|
-
}
|
|
1273
|
-
)
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
getPublicKey = (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn> => {
|
|
1277
|
-
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(
|
|
1278
|
-
res => {
|
|
1279
|
-
return buildResponse(res).then(_data => {
|
|
1280
|
-
return {
|
|
1281
|
-
publicKey: <PublicKey>_data.publicKey
|
|
1282
|
-
}
|
|
1283
|
-
})
|
|
1284
|
-
},
|
|
1285
|
-
error => {
|
|
1286
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1287
|
-
}
|
|
1288
|
-
)
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
1227
|
friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn> => {
|
|
1292
1228
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(
|
|
1293
1229
|
res => {
|
|
@@ -2063,21 +1999,6 @@ export class API implements API {
|
|
|
2063
1999
|
)
|
|
2064
2000
|
}
|
|
2065
2001
|
|
|
2066
|
-
getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn> => {
|
|
2067
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(
|
|
2068
|
-
res => {
|
|
2069
|
-
return buildResponse(res).then(_data => {
|
|
2070
|
-
return {
|
|
2071
|
-
swapPrice: <SwapPrice>_data.swapPrice
|
|
2072
|
-
}
|
|
2073
|
-
})
|
|
2074
|
-
},
|
|
2075
|
-
error => {
|
|
2076
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2077
|
-
}
|
|
2078
|
-
)
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
2002
|
getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn> => {
|
|
2082
2003
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(
|
|
2083
2004
|
res => {
|