@0xsequence/api 2.2.4 → 2.2.5
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.
|
@@ -13,9 +13,9 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 24814ebb88457c0545aa80e8388cb0f08ec59bec
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ const WebRPCVersion = 'v1';
|
|
|
26
26
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
27
27
|
|
|
28
28
|
// Schema hash generated from your RIDL schema
|
|
29
|
-
const WebRPCSchemaHash = '
|
|
29
|
+
const WebRPCSchemaHash = '24814ebb88457c0545aa80e8388cb0f08ec59bec';
|
|
30
30
|
|
|
31
31
|
//
|
|
32
32
|
// Types
|
|
@@ -175,6 +175,32 @@ class API {
|
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
177
|
};
|
|
178
|
+
this.registerPublicKey = (args, headers, signal) => {
|
|
179
|
+
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
180
|
+
return buildResponse(res).then(_data => {
|
|
181
|
+
return {
|
|
182
|
+
status: _data.status
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
}, error => {
|
|
186
|
+
throw WebrpcRequestFailedError.new({
|
|
187
|
+
cause: `fetch(): ${error.message || ''}`
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
this.getPublicKey = (args, headers, signal) => {
|
|
192
|
+
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
193
|
+
return buildResponse(res).then(_data => {
|
|
194
|
+
return {
|
|
195
|
+
publicKey: _data.publicKey
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
}, error => {
|
|
199
|
+
throw WebrpcRequestFailedError.new({
|
|
200
|
+
cause: `fetch(): ${error.message || ''}`
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
};
|
|
178
204
|
this.friendList = (args, headers, signal) => {
|
|
179
205
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
180
206
|
return buildResponse(res).then(_data => {
|
|
@@ -779,6 +805,33 @@ class API {
|
|
|
779
805
|
});
|
|
780
806
|
});
|
|
781
807
|
};
|
|
808
|
+
this.listAdoptedWallets = (args, headers, signal) => {
|
|
809
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
810
|
+
return buildResponse(res).then(_data => {
|
|
811
|
+
return {
|
|
812
|
+
page: _data.page,
|
|
813
|
+
wallets: _data.wallets
|
|
814
|
+
};
|
|
815
|
+
});
|
|
816
|
+
}, error => {
|
|
817
|
+
throw WebrpcRequestFailedError.new({
|
|
818
|
+
cause: `fetch(): ${error.message || ''}`
|
|
819
|
+
});
|
|
820
|
+
});
|
|
821
|
+
};
|
|
822
|
+
this.getSwapPrice = (args, headers, signal) => {
|
|
823
|
+
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
824
|
+
return buildResponse(res).then(_data => {
|
|
825
|
+
return {
|
|
826
|
+
swapPrice: _data.swapPrice
|
|
827
|
+
};
|
|
828
|
+
});
|
|
829
|
+
}, error => {
|
|
830
|
+
throw WebrpcRequestFailedError.new({
|
|
831
|
+
cause: `fetch(): ${error.message || ''}`
|
|
832
|
+
});
|
|
833
|
+
});
|
|
834
|
+
};
|
|
782
835
|
this.getSwapPrices = (args, headers, signal) => {
|
|
783
836
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
784
837
|
return buildResponse(res).then(_data => {
|
|
@@ -908,7 +961,7 @@ class API {
|
|
|
908
961
|
});
|
|
909
962
|
});
|
|
910
963
|
};
|
|
911
|
-
this.hostname = hostname;
|
|
964
|
+
this.hostname = hostname.replace(/\/*$/, '');
|
|
912
965
|
this.fetch = (input, init) => fetch(input, init);
|
|
913
966
|
}
|
|
914
967
|
url(name) {
|
|
@@ -13,9 +13,9 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 24814ebb88457c0545aa80e8388cb0f08ec59bec
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ const WebRPCVersion = 'v1';
|
|
|
26
26
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
27
27
|
|
|
28
28
|
// Schema hash generated from your RIDL schema
|
|
29
|
-
const WebRPCSchemaHash = '
|
|
29
|
+
const WebRPCSchemaHash = '24814ebb88457c0545aa80e8388cb0f08ec59bec';
|
|
30
30
|
|
|
31
31
|
//
|
|
32
32
|
// Types
|
|
@@ -175,6 +175,32 @@ class API {
|
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
177
|
};
|
|
178
|
+
this.registerPublicKey = (args, headers, signal) => {
|
|
179
|
+
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
180
|
+
return buildResponse(res).then(_data => {
|
|
181
|
+
return {
|
|
182
|
+
status: _data.status
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
}, error => {
|
|
186
|
+
throw WebrpcRequestFailedError.new({
|
|
187
|
+
cause: `fetch(): ${error.message || ''}`
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
this.getPublicKey = (args, headers, signal) => {
|
|
192
|
+
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
193
|
+
return buildResponse(res).then(_data => {
|
|
194
|
+
return {
|
|
195
|
+
publicKey: _data.publicKey
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
}, error => {
|
|
199
|
+
throw WebrpcRequestFailedError.new({
|
|
200
|
+
cause: `fetch(): ${error.message || ''}`
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
};
|
|
178
204
|
this.friendList = (args, headers, signal) => {
|
|
179
205
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
180
206
|
return buildResponse(res).then(_data => {
|
|
@@ -779,6 +805,33 @@ class API {
|
|
|
779
805
|
});
|
|
780
806
|
});
|
|
781
807
|
};
|
|
808
|
+
this.listAdoptedWallets = (args, headers, signal) => {
|
|
809
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
810
|
+
return buildResponse(res).then(_data => {
|
|
811
|
+
return {
|
|
812
|
+
page: _data.page,
|
|
813
|
+
wallets: _data.wallets
|
|
814
|
+
};
|
|
815
|
+
});
|
|
816
|
+
}, error => {
|
|
817
|
+
throw WebrpcRequestFailedError.new({
|
|
818
|
+
cause: `fetch(): ${error.message || ''}`
|
|
819
|
+
});
|
|
820
|
+
});
|
|
821
|
+
};
|
|
822
|
+
this.getSwapPrice = (args, headers, signal) => {
|
|
823
|
+
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
824
|
+
return buildResponse(res).then(_data => {
|
|
825
|
+
return {
|
|
826
|
+
swapPrice: _data.swapPrice
|
|
827
|
+
};
|
|
828
|
+
});
|
|
829
|
+
}, error => {
|
|
830
|
+
throw WebrpcRequestFailedError.new({
|
|
831
|
+
cause: `fetch(): ${error.message || ''}`
|
|
832
|
+
});
|
|
833
|
+
});
|
|
834
|
+
};
|
|
782
835
|
this.getSwapPrices = (args, headers, signal) => {
|
|
783
836
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
784
837
|
return buildResponse(res).then(_data => {
|
|
@@ -908,7 +961,7 @@ class API {
|
|
|
908
961
|
});
|
|
909
962
|
});
|
|
910
963
|
};
|
|
911
|
-
this.hostname = hostname;
|
|
964
|
+
this.hostname = hostname.replace(/\/*$/, '');
|
|
912
965
|
this.fetch = (input, init) => fetch(input, init);
|
|
913
966
|
}
|
|
914
967
|
url(name) {
|
|
@@ -9,9 +9,9 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-api v0.4.0
|
|
12
|
+
// sequence-api v0.4.0 24814ebb88457c0545aa80e8388cb0f08ec59bec
|
|
13
13
|
// --
|
|
14
|
-
// Code generated by webrpc-gen@v0.
|
|
14
|
+
// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
16
16
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ const WebRPCVersion = 'v1';
|
|
|
22
22
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
23
23
|
|
|
24
24
|
// Schema hash generated from your RIDL schema
|
|
25
|
-
const WebRPCSchemaHash = '
|
|
25
|
+
const WebRPCSchemaHash = '24814ebb88457c0545aa80e8388cb0f08ec59bec';
|
|
26
26
|
|
|
27
27
|
//
|
|
28
28
|
// Types
|
|
@@ -171,6 +171,32 @@ class API {
|
|
|
171
171
|
});
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
|
+
this.registerPublicKey = (args, headers, signal) => {
|
|
175
|
+
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
176
|
+
return buildResponse(res).then(_data => {
|
|
177
|
+
return {
|
|
178
|
+
status: _data.status
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
}, error => {
|
|
182
|
+
throw WebrpcRequestFailedError.new({
|
|
183
|
+
cause: `fetch(): ${error.message || ''}`
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
this.getPublicKey = (args, headers, signal) => {
|
|
188
|
+
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
189
|
+
return buildResponse(res).then(_data => {
|
|
190
|
+
return {
|
|
191
|
+
publicKey: _data.publicKey
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}, error => {
|
|
195
|
+
throw WebrpcRequestFailedError.new({
|
|
196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
174
200
|
this.friendList = (args, headers, signal) => {
|
|
175
201
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
176
202
|
return buildResponse(res).then(_data => {
|
|
@@ -775,6 +801,33 @@ class API {
|
|
|
775
801
|
});
|
|
776
802
|
});
|
|
777
803
|
};
|
|
804
|
+
this.listAdoptedWallets = (args, headers, signal) => {
|
|
805
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
806
|
+
return buildResponse(res).then(_data => {
|
|
807
|
+
return {
|
|
808
|
+
page: _data.page,
|
|
809
|
+
wallets: _data.wallets
|
|
810
|
+
};
|
|
811
|
+
});
|
|
812
|
+
}, error => {
|
|
813
|
+
throw WebrpcRequestFailedError.new({
|
|
814
|
+
cause: `fetch(): ${error.message || ''}`
|
|
815
|
+
});
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
this.getSwapPrice = (args, headers, signal) => {
|
|
819
|
+
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
820
|
+
return buildResponse(res).then(_data => {
|
|
821
|
+
return {
|
|
822
|
+
swapPrice: _data.swapPrice
|
|
823
|
+
};
|
|
824
|
+
});
|
|
825
|
+
}, error => {
|
|
826
|
+
throw WebrpcRequestFailedError.new({
|
|
827
|
+
cause: `fetch(): ${error.message || ''}`
|
|
828
|
+
});
|
|
829
|
+
});
|
|
830
|
+
};
|
|
778
831
|
this.getSwapPrices = (args, headers, signal) => {
|
|
779
832
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
780
833
|
return buildResponse(res).then(_data => {
|
|
@@ -904,7 +957,7 @@ class API {
|
|
|
904
957
|
});
|
|
905
958
|
});
|
|
906
959
|
};
|
|
907
|
-
this.hostname = hostname;
|
|
960
|
+
this.hostname = hostname.replace(/\/*$/, '');
|
|
908
961
|
this.fetch = (input, init) => fetch(input, init);
|
|
909
962
|
}
|
|
910
963
|
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 = "24814ebb88457c0545aa80e8388cb0f08ec59bec";
|
|
4
4
|
export declare enum SortOrder {
|
|
5
5
|
DESC = "DESC",
|
|
6
6
|
ASC = "ASC"
|
|
@@ -55,6 +55,11 @@ 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
|
+
}
|
|
58
63
|
export interface User {
|
|
59
64
|
address: string;
|
|
60
65
|
username: string;
|
|
@@ -310,7 +315,7 @@ export interface SwapPrice {
|
|
|
310
315
|
currencyAddress: string;
|
|
311
316
|
currencyBalance: string;
|
|
312
317
|
price: string;
|
|
313
|
-
|
|
318
|
+
maxPrice: string;
|
|
314
319
|
transactionValue: string;
|
|
315
320
|
}
|
|
316
321
|
export interface SwapQuote {
|
|
@@ -373,6 +378,9 @@ export interface PaymentResponse {
|
|
|
373
378
|
txTo: string;
|
|
374
379
|
txData: string;
|
|
375
380
|
}
|
|
381
|
+
export interface AdoptedChildWallet {
|
|
382
|
+
address: string;
|
|
383
|
+
}
|
|
376
384
|
export interface API {
|
|
377
385
|
ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>;
|
|
378
386
|
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>;
|
|
@@ -382,6 +390,8 @@ export interface API {
|
|
|
382
390
|
getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn>;
|
|
383
391
|
getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return>;
|
|
384
392
|
sendPasswordlessLink(args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal): Promise<SendPasswordlessLinkReturn>;
|
|
393
|
+
registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn>;
|
|
394
|
+
getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn>;
|
|
385
395
|
friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>;
|
|
386
396
|
getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>;
|
|
387
397
|
searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>;
|
|
@@ -428,6 +438,8 @@ export interface API {
|
|
|
428
438
|
removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>;
|
|
429
439
|
generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>;
|
|
430
440
|
validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>;
|
|
441
|
+
listAdoptedWallets(args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsReturn>;
|
|
442
|
+
getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>;
|
|
431
443
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>;
|
|
432
444
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>;
|
|
433
445
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>;
|
|
@@ -492,6 +504,18 @@ export interface SendPasswordlessLinkArgs {
|
|
|
492
504
|
export interface SendPasswordlessLinkReturn {
|
|
493
505
|
status: boolean;
|
|
494
506
|
}
|
|
507
|
+
export interface RegisterPublicKeyArgs {
|
|
508
|
+
publicKey: PublicKey;
|
|
509
|
+
}
|
|
510
|
+
export interface RegisterPublicKeyReturn {
|
|
511
|
+
status: boolean;
|
|
512
|
+
}
|
|
513
|
+
export interface GetPublicKeyArgs {
|
|
514
|
+
id: string;
|
|
515
|
+
}
|
|
516
|
+
export interface GetPublicKeyReturn {
|
|
517
|
+
publicKey: PublicKey;
|
|
518
|
+
}
|
|
495
519
|
export interface FriendListArgs {
|
|
496
520
|
nickname?: string;
|
|
497
521
|
page?: Page;
|
|
@@ -794,8 +818,6 @@ export interface RemoveLinkedWalletArgs {
|
|
|
794
818
|
parentWalletMessage: string;
|
|
795
819
|
parentWalletSignature: string;
|
|
796
820
|
linkedWalletAddress: string;
|
|
797
|
-
linkedWalletMessage: string;
|
|
798
|
-
linkedWalletSignature: string;
|
|
799
821
|
signatureChainId: string;
|
|
800
822
|
}
|
|
801
823
|
export interface RemoveLinkedWalletReturn {
|
|
@@ -817,11 +839,29 @@ export interface ValidateWaaSVerificationNonceArgs {
|
|
|
817
839
|
export interface ValidateWaaSVerificationNonceReturn {
|
|
818
840
|
walletAddress: string;
|
|
819
841
|
}
|
|
842
|
+
export interface ListAdoptedWalletsArgs {
|
|
843
|
+
page?: Page;
|
|
844
|
+
}
|
|
845
|
+
export interface ListAdoptedWalletsReturn {
|
|
846
|
+
page: Page;
|
|
847
|
+
wallets: Array<AdoptedChildWallet>;
|
|
848
|
+
}
|
|
849
|
+
export interface GetSwapPriceArgs {
|
|
850
|
+
buyCurrencyAddress: string;
|
|
851
|
+
sellCurrencyAddress: string;
|
|
852
|
+
buyAmount: string;
|
|
853
|
+
chainId: number;
|
|
854
|
+
slippagePercentage?: number;
|
|
855
|
+
}
|
|
856
|
+
export interface GetSwapPriceReturn {
|
|
857
|
+
swapPrice: SwapPrice;
|
|
858
|
+
}
|
|
820
859
|
export interface GetSwapPricesArgs {
|
|
821
860
|
userAddress: string;
|
|
822
861
|
buyCurrencyAddress: string;
|
|
823
862
|
buyAmount: string;
|
|
824
863
|
chainId: number;
|
|
864
|
+
slippagePercentage?: number;
|
|
825
865
|
}
|
|
826
866
|
export interface GetSwapPricesReturn {
|
|
827
867
|
swapPrices: Array<SwapPrice>;
|
|
@@ -833,6 +873,7 @@ export interface GetSwapQuoteArgs {
|
|
|
833
873
|
buyAmount: string;
|
|
834
874
|
chainId: number;
|
|
835
875
|
includeApprove: boolean;
|
|
876
|
+
slippagePercentage?: number;
|
|
836
877
|
}
|
|
837
878
|
export interface GetSwapQuoteReturn {
|
|
838
879
|
swapQuote: SwapQuote;
|
|
@@ -902,6 +943,8 @@ export declare class API implements API {
|
|
|
902
943
|
getAuthToken: (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal) => Promise<GetAuthTokenReturn>;
|
|
903
944
|
getAuthToken2: (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal) => Promise<GetAuthToken2Return>;
|
|
904
945
|
sendPasswordlessLink: (args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal) => Promise<SendPasswordlessLinkReturn>;
|
|
946
|
+
registerPublicKey: (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal) => Promise<RegisterPublicKeyReturn>;
|
|
947
|
+
getPublicKey: (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal) => Promise<GetPublicKeyReturn>;
|
|
905
948
|
friendList: (args: FriendListArgs, headers?: object, signal?: AbortSignal) => Promise<FriendListReturn>;
|
|
906
949
|
getFriendByAddress: (args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal) => Promise<GetFriendByAddressReturn>;
|
|
907
950
|
searchFriends: (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal) => Promise<SearchFriendsReturn>;
|
|
@@ -948,6 +991,8 @@ export declare class API implements API {
|
|
|
948
991
|
removeLinkedWallet: (args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal) => Promise<RemoveLinkedWalletReturn>;
|
|
949
992
|
generateWaaSVerificationURL: (args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal) => Promise<GenerateWaaSVerificationURLReturn>;
|
|
950
993
|
validateWaaSVerificationNonce: (args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal) => Promise<ValidateWaaSVerificationNonceReturn>;
|
|
994
|
+
listAdoptedWallets: (args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal) => Promise<ListAdoptedWalletsReturn>;
|
|
995
|
+
getSwapPrice: (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapPriceReturn>;
|
|
951
996
|
getSwapPrices: (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapPricesReturn>;
|
|
952
997
|
getSwapQuote: (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal) => Promise<GetSwapQuoteReturn>;
|
|
953
998
|
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 24814ebb88457c0545aa80e8388cb0f08ec59bec
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.
|
|
4
|
+
// Code generated by webrpc-gen@v0.20.3 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 = '24814ebb88457c0545aa80e8388cb0f08ec59bec'
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
@@ -78,6 +78,12 @@ 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
|
+
|
|
81
87
|
export interface User {
|
|
82
88
|
address: string
|
|
83
89
|
username: string
|
|
@@ -362,7 +368,7 @@ export interface SwapPrice {
|
|
|
362
368
|
currencyAddress: string
|
|
363
369
|
currencyBalance: string
|
|
364
370
|
price: string
|
|
365
|
-
|
|
371
|
+
maxPrice: string
|
|
366
372
|
transactionValue: string
|
|
367
373
|
}
|
|
368
374
|
|
|
@@ -432,6 +438,10 @@ export interface PaymentResponse {
|
|
|
432
438
|
txData: string
|
|
433
439
|
}
|
|
434
440
|
|
|
441
|
+
export interface AdoptedChildWallet {
|
|
442
|
+
address: string
|
|
443
|
+
}
|
|
444
|
+
|
|
435
445
|
export interface API {
|
|
436
446
|
ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>
|
|
437
447
|
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>
|
|
@@ -445,6 +455,8 @@ export interface API {
|
|
|
445
455
|
headers?: object,
|
|
446
456
|
signal?: AbortSignal
|
|
447
457
|
): Promise<SendPasswordlessLinkReturn>
|
|
458
|
+
registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn>
|
|
459
|
+
getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn>
|
|
448
460
|
friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>
|
|
449
461
|
getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>
|
|
450
462
|
searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>
|
|
@@ -539,6 +551,8 @@ export interface API {
|
|
|
539
551
|
headers?: object,
|
|
540
552
|
signal?: AbortSignal
|
|
541
553
|
): Promise<ValidateWaaSVerificationNonceReturn>
|
|
554
|
+
listAdoptedWallets(args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsReturn>
|
|
555
|
+
getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>
|
|
542
556
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
|
|
543
557
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
|
|
544
558
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
|
|
@@ -635,6 +649,20 @@ export interface SendPasswordlessLinkArgs {
|
|
|
635
649
|
export interface SendPasswordlessLinkReturn {
|
|
636
650
|
status: boolean
|
|
637
651
|
}
|
|
652
|
+
export interface RegisterPublicKeyArgs {
|
|
653
|
+
publicKey: PublicKey
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export interface RegisterPublicKeyReturn {
|
|
657
|
+
status: boolean
|
|
658
|
+
}
|
|
659
|
+
export interface GetPublicKeyArgs {
|
|
660
|
+
id: string
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
export interface GetPublicKeyReturn {
|
|
664
|
+
publicKey: PublicKey
|
|
665
|
+
}
|
|
638
666
|
export interface FriendListArgs {
|
|
639
667
|
nickname?: string
|
|
640
668
|
page?: Page
|
|
@@ -971,8 +999,6 @@ export interface RemoveLinkedWalletArgs {
|
|
|
971
999
|
parentWalletMessage: string
|
|
972
1000
|
parentWalletSignature: string
|
|
973
1001
|
linkedWalletAddress: string
|
|
974
|
-
linkedWalletMessage: string
|
|
975
|
-
linkedWalletSignature: string
|
|
976
1002
|
signatureChainId: string
|
|
977
1003
|
}
|
|
978
1004
|
|
|
@@ -997,11 +1023,31 @@ export interface ValidateWaaSVerificationNonceArgs {
|
|
|
997
1023
|
export interface ValidateWaaSVerificationNonceReturn {
|
|
998
1024
|
walletAddress: string
|
|
999
1025
|
}
|
|
1026
|
+
export interface ListAdoptedWalletsArgs {
|
|
1027
|
+
page?: Page
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export interface ListAdoptedWalletsReturn {
|
|
1031
|
+
page: Page
|
|
1032
|
+
wallets: Array<AdoptedChildWallet>
|
|
1033
|
+
}
|
|
1034
|
+
export interface GetSwapPriceArgs {
|
|
1035
|
+
buyCurrencyAddress: string
|
|
1036
|
+
sellCurrencyAddress: string
|
|
1037
|
+
buyAmount: string
|
|
1038
|
+
chainId: number
|
|
1039
|
+
slippagePercentage?: number
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export interface GetSwapPriceReturn {
|
|
1043
|
+
swapPrice: SwapPrice
|
|
1044
|
+
}
|
|
1000
1045
|
export interface GetSwapPricesArgs {
|
|
1001
1046
|
userAddress: string
|
|
1002
1047
|
buyCurrencyAddress: string
|
|
1003
1048
|
buyAmount: string
|
|
1004
1049
|
chainId: number
|
|
1050
|
+
slippagePercentage?: number
|
|
1005
1051
|
}
|
|
1006
1052
|
|
|
1007
1053
|
export interface GetSwapPricesReturn {
|
|
@@ -1014,6 +1060,7 @@ export interface GetSwapQuoteArgs {
|
|
|
1014
1060
|
buyAmount: string
|
|
1015
1061
|
chainId: number
|
|
1016
1062
|
includeApprove: boolean
|
|
1063
|
+
slippagePercentage?: number
|
|
1017
1064
|
}
|
|
1018
1065
|
|
|
1019
1066
|
export interface GetSwapQuoteReturn {
|
|
@@ -1086,7 +1133,7 @@ export class API implements API {
|
|
|
1086
1133
|
protected path = '/rpc/API/'
|
|
1087
1134
|
|
|
1088
1135
|
constructor(hostname: string, fetch: Fetch) {
|
|
1089
|
-
this.hostname = hostname
|
|
1136
|
+
this.hostname = hostname.replace(/\/*$/, '')
|
|
1090
1137
|
this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init)
|
|
1091
1138
|
}
|
|
1092
1139
|
|
|
@@ -1224,6 +1271,36 @@ export class API implements API {
|
|
|
1224
1271
|
)
|
|
1225
1272
|
}
|
|
1226
1273
|
|
|
1274
|
+
registerPublicKey = (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn> => {
|
|
1275
|
+
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(
|
|
1276
|
+
res => {
|
|
1277
|
+
return buildResponse(res).then(_data => {
|
|
1278
|
+
return {
|
|
1279
|
+
status: <boolean>_data.status
|
|
1280
|
+
}
|
|
1281
|
+
})
|
|
1282
|
+
},
|
|
1283
|
+
error => {
|
|
1284
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1285
|
+
}
|
|
1286
|
+
)
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
getPublicKey = (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn> => {
|
|
1290
|
+
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(
|
|
1291
|
+
res => {
|
|
1292
|
+
return buildResponse(res).then(_data => {
|
|
1293
|
+
return {
|
|
1294
|
+
publicKey: <PublicKey>_data.publicKey
|
|
1295
|
+
}
|
|
1296
|
+
})
|
|
1297
|
+
},
|
|
1298
|
+
error => {
|
|
1299
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1300
|
+
}
|
|
1301
|
+
)
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1227
1304
|
friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn> => {
|
|
1228
1305
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(
|
|
1229
1306
|
res => {
|
|
@@ -1999,6 +2076,41 @@ export class API implements API {
|
|
|
1999
2076
|
)
|
|
2000
2077
|
}
|
|
2001
2078
|
|
|
2079
|
+
listAdoptedWallets = (
|
|
2080
|
+
args: ListAdoptedWalletsArgs,
|
|
2081
|
+
headers?: object,
|
|
2082
|
+
signal?: AbortSignal
|
|
2083
|
+
): Promise<ListAdoptedWalletsReturn> => {
|
|
2084
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(
|
|
2085
|
+
res => {
|
|
2086
|
+
return buildResponse(res).then(_data => {
|
|
2087
|
+
return {
|
|
2088
|
+
page: <Page>_data.page,
|
|
2089
|
+
wallets: <Array<AdoptedChildWallet>>_data.wallets
|
|
2090
|
+
}
|
|
2091
|
+
})
|
|
2092
|
+
},
|
|
2093
|
+
error => {
|
|
2094
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2095
|
+
}
|
|
2096
|
+
)
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn> => {
|
|
2100
|
+
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(
|
|
2101
|
+
res => {
|
|
2102
|
+
return buildResponse(res).then(_data => {
|
|
2103
|
+
return {
|
|
2104
|
+
swapPrice: <SwapPrice>_data.swapPrice
|
|
2105
|
+
}
|
|
2106
|
+
})
|
|
2107
|
+
},
|
|
2108
|
+
error => {
|
|
2109
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2110
|
+
}
|
|
2111
|
+
)
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2002
2114
|
getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn> => {
|
|
2003
2115
|
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(
|
|
2004
2116
|
res => {
|