@0xsequence/api 0.0.0-2021827201516 → 0.0.0-20220427054350

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 +1,11 @@
1
- export * from "./declarations/src/index";
1
+ // are you seeing an error that a default export doesn't exist but your source file has a default export?
2
+ // you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
3
+
4
+ // curious why you need to?
5
+ // this file exists so that you can import from the entrypoint normally
6
+ // except that it points to your source file and you don't need to run build constantly
7
+ // which means we need to re-export all of the modules from your source file
8
+ // and since export * doesn't include default exports, we need to read your source file
9
+ // to check for a default export and re-export it if it exists
10
+ // it's not ideal, but it works pretty well ¯\_(ツ)_/¯
11
+ export * from "../src/index";
@@ -1,7 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
+ // this file might look strange and you might be wondering what it's for
3
+ // it's lets you import your source files by importing this entrypoint
4
+ // as you would import it if it was built with preconstruct build
5
+ // this file is slightly different to some others though
6
+ // it has a require hook which compiles your code with Babel
7
+ // this means that you don't have to set up @babel/register or anything like that
8
+ // but you can still require this module and it'll be compiled
2
9
 
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./0xsequence-api.cjs.prod.js");
5
- } else {
6
- module.exports = require("./0xsequence-api.cjs.dev.js");
7
- }
10
+ // this bit of code imports the require hook and registers it
11
+ let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", "..");
12
+
13
+ // this re-exports the source file
14
+ module.exports = require("../src/index.ts");
15
+
16
+ unregister();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-2021827201516",
3
+ "version": "0.0.0-20220427054350",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
@@ -13,7 +13,7 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "cross-fetch": "^3.1.4"
16
+ "cross-fetch": "^3.1.5"
17
17
  },
18
18
  "peerDependencies": {},
19
19
  "devDependencies": {},
package/src/api.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-api v0.4.0 8e3575e965dc76a152d48e0b6660271db4d0c5be
2
+ // sequence-api v0.4.0 db6421c0a8d94ad6eafa79249ba7692c55059b39
3
3
  // --
4
4
  // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
5
5
  // Do not edit by hand. Update your webrpc schema and re-generate.
@@ -11,7 +11,7 @@ export const WebRPCVersion = "v1"
11
11
  export const WebRPCSchemaVersion = "v0.4.0"
12
12
 
13
13
  // Schema hash generated from your RIDL schema
14
- export const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be"
14
+ export const WebRPCSchemaHash = "db6421c0a8d94ad6eafa79249ba7692c55059b39"
15
15
 
16
16
 
17
17
  //
@@ -129,6 +129,12 @@ export interface Transaction {
129
129
  call?: ContractCall
130
130
  }
131
131
 
132
+ export interface UserStorage {
133
+ userAddress: string
134
+ key: string
135
+ value: any
136
+ }
137
+
132
138
  export interface Page {
133
139
  pageSize?: number
134
140
  page?: number
@@ -150,6 +156,7 @@ export interface API {
150
156
  runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>
151
157
  getSequenceContext(headers?: object): Promise<GetSequenceContextReturn>
152
158
  getAuthToken(args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn>
159
+ sendPasswordlessLink(args: SendPasswordlessLinkArgs, headers?: object): Promise<SendPasswordlessLinkReturn>
153
160
  friendList(args: FriendListArgs, headers?: object): Promise<FriendListReturn>
154
161
  getFriendByAddress(args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn>
155
162
  searchFriends(args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn>
@@ -159,7 +166,14 @@ export interface API {
159
166
  contractCall(args: ContractCallArgs, headers?: object): Promise<ContractCallReturn>
160
167
  decodeContractCall(args: DecodeContractCallArgs, headers?: object): Promise<DecodeContractCallReturn>
161
168
  lookupContractCallSelectors(args: LookupContractCallSelectorsArgs, headers?: object): Promise<LookupContractCallSelectorsReturn>
169
+ userStorageFetch(args: UserStorageFetchArgs, headers?: object): Promise<UserStorageFetchReturn>
170
+ userStorageSave(args: UserStorageSaveArgs, headers?: object): Promise<UserStorageSaveReturn>
171
+ userStorageDelete(args: UserStorageDeleteArgs, headers?: object): Promise<UserStorageDeleteReturn>
172
+ userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn>
173
+ getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn>
174
+ isUsingGoogleMail(args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn>
162
175
  getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
176
+ isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
163
177
  internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
164
178
  walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn>
165
179
  }
@@ -190,6 +204,7 @@ export interface GetSequenceContextReturn {
190
204
  }
191
205
  export interface GetAuthTokenArgs {
192
206
  ewtString: string
207
+ testnetMode?: boolean
193
208
  }
194
209
 
195
210
  export interface GetAuthTokenReturn {
@@ -198,6 +213,15 @@ export interface GetAuthTokenReturn {
198
213
  address: string
199
214
  user?: User
200
215
  }
216
+ export interface SendPasswordlessLinkArgs {
217
+ email: string
218
+ redirectUri: string
219
+ intent: string
220
+ }
221
+
222
+ export interface SendPasswordlessLinkReturn {
223
+ status: boolean
224
+ }
201
225
  export interface FriendListArgs {
202
226
  page?: Page
203
227
  }
@@ -271,12 +295,62 @@ export interface LookupContractCallSelectorsArgs {
271
295
  export interface LookupContractCallSelectorsReturn {
272
296
  signatures: Array<Array<string>>
273
297
  }
298
+ export interface UserStorageFetchArgs {
299
+ key: string
300
+ }
301
+
302
+ export interface UserStorageFetchReturn {
303
+ object: any
304
+ }
305
+ export interface UserStorageSaveArgs {
306
+ key: string
307
+ object: any
308
+ }
309
+
310
+ export interface UserStorageSaveReturn {
311
+ ok: boolean
312
+ }
313
+ export interface UserStorageDeleteArgs {
314
+ key: string
315
+ }
316
+
317
+ export interface UserStorageDeleteReturn {
318
+ ok: boolean
319
+ }
320
+ export interface UserStorageFetchAllArgs {
321
+ keys?: Array<string>
322
+ }
323
+
324
+ export interface UserStorageFetchAllReturn {
325
+ objects: {[key: string]: any}
326
+ }
327
+ export interface GetMoonpayLinkArgs {
328
+ url: string
329
+ }
330
+
331
+ export interface GetMoonpayLinkReturn {
332
+ signedUrl: string
333
+ }
334
+ export interface IsUsingGoogleMailArgs {
335
+ domain: string
336
+ }
337
+
338
+ export interface IsUsingGoogleMailReturn {
339
+ yes: boolean
340
+ }
274
341
  export interface GetInviteInfoArgs {
275
342
  }
276
343
 
277
344
  export interface GetInviteInfoReturn {
278
345
  inviteInfo: InviteInfo
279
346
  }
347
+ export interface IsValidAccessCodeArgs {
348
+ accessCode: string
349
+ }
350
+
351
+ export interface IsValidAccessCodeReturn {
352
+ status: boolean
353
+ }
280
354
  export interface InternalClaimAccessCodeArgs {
281
355
  address: string
282
356
  accessCode: string
@@ -380,6 +454,18 @@ export class API implements API {
380
454
  })
381
455
  }
382
456
 
457
+ sendPasswordlessLink = (args: SendPasswordlessLinkArgs, headers?: object): Promise<SendPasswordlessLinkReturn> => {
458
+ return this.fetch(
459
+ this.url('SendPasswordlessLink'),
460
+ createHTTPRequest(args, headers)).then((res) => {
461
+ return buildResponse(res).then(_data => {
462
+ return {
463
+ status: <boolean>(_data.status)
464
+ }
465
+ })
466
+ })
467
+ }
468
+
383
469
  friendList = (args: FriendListArgs, headers?: object): Promise<FriendListReturn> => {
384
470
  return this.fetch(
385
471
  this.url('FriendList'),
@@ -492,6 +578,78 @@ export class API implements API {
492
578
  })
493
579
  }
494
580
 
581
+ userStorageFetch = (args: UserStorageFetchArgs, headers?: object): Promise<UserStorageFetchReturn> => {
582
+ return this.fetch(
583
+ this.url('UserStorageFetch'),
584
+ createHTTPRequest(args, headers)).then((res) => {
585
+ return buildResponse(res).then(_data => {
586
+ return {
587
+ object: <any>(_data.object)
588
+ }
589
+ })
590
+ })
591
+ }
592
+
593
+ userStorageSave = (args: UserStorageSaveArgs, headers?: object): Promise<UserStorageSaveReturn> => {
594
+ return this.fetch(
595
+ this.url('UserStorageSave'),
596
+ createHTTPRequest(args, headers)).then((res) => {
597
+ return buildResponse(res).then(_data => {
598
+ return {
599
+ ok: <boolean>(_data.ok)
600
+ }
601
+ })
602
+ })
603
+ }
604
+
605
+ userStorageDelete = (args: UserStorageDeleteArgs, headers?: object): Promise<UserStorageDeleteReturn> => {
606
+ return this.fetch(
607
+ this.url('UserStorageDelete'),
608
+ createHTTPRequest(args, headers)).then((res) => {
609
+ return buildResponse(res).then(_data => {
610
+ return {
611
+ ok: <boolean>(_data.ok)
612
+ }
613
+ })
614
+ })
615
+ }
616
+
617
+ userStorageFetchAll = (args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn> => {
618
+ return this.fetch(
619
+ this.url('UserStorageFetchAll'),
620
+ createHTTPRequest(args, headers)).then((res) => {
621
+ return buildResponse(res).then(_data => {
622
+ return {
623
+ objects: <{[key: string]: any}>(_data.objects)
624
+ }
625
+ })
626
+ })
627
+ }
628
+
629
+ getMoonpayLink = (args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn> => {
630
+ return this.fetch(
631
+ this.url('GetMoonpayLink'),
632
+ createHTTPRequest(args, headers)).then((res) => {
633
+ return buildResponse(res).then(_data => {
634
+ return {
635
+ signedUrl: <string>(_data.signedUrl)
636
+ }
637
+ })
638
+ })
639
+ }
640
+
641
+ isUsingGoogleMail = (args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn> => {
642
+ return this.fetch(
643
+ this.url('IsUsingGoogleMail'),
644
+ createHTTPRequest(args, headers)).then((res) => {
645
+ return buildResponse(res).then(_data => {
646
+ return {
647
+ yes: <boolean>(_data.yes)
648
+ }
649
+ })
650
+ })
651
+ }
652
+
495
653
  getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
496
654
  return this.fetch(
497
655
  this.url('GetInviteInfo'),
@@ -505,6 +663,18 @@ export class API implements API {
505
663
  })
506
664
  }
507
665
 
666
+ isValidAccessCode = (args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn> => {
667
+ return this.fetch(
668
+ this.url('IsValidAccessCode'),
669
+ createHTTPRequest(args, headers)).then((res) => {
670
+ return buildResponse(res).then(_data => {
671
+ return {
672
+ status: <boolean>(_data.status)
673
+ }
674
+ })
675
+ })
676
+ }
677
+
508
678
  internalClaimAccessCode = (args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> => {
509
679
  return this.fetch(
510
680
  this.url('InternalClaimAccessCode'),
package/src/index.ts CHANGED
@@ -6,7 +6,7 @@ import { API as BaseSequenceAPI } from './api.gen'
6
6
 
7
7
  export class SequenceAPIClient extends BaseSequenceAPI {
8
8
  constructor(hostname: string, public jwtAuth?: string) {
9
- super(hostname, fetch)
9
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
10
10
  this.fetch = this._fetch
11
11
  }
12
12
 
package/CHANGELOG.md DELETED
@@ -1,362 +0,0 @@
1
- # @0xsequence/api
2
-
3
- ## 0.0.0-2021827201516
4
-
5
- ### Minor Changes
6
-
7
- - next release
8
-
9
- ## 0.28.0
10
-
11
- ### Minor Changes
12
-
13
- - extension provider
14
-
15
- ## 0.27.0
16
-
17
- ### Minor Changes
18
-
19
- - Add requireFreshSigner lib to sessions
20
-
21
- ## 0.25.1
22
-
23
- ### Patch Changes
24
-
25
- - Fix build typescrypt issue
26
-
27
- ## 0.25.0
28
-
29
- ### Minor Changes
30
-
31
- - 10c8af8: Add estimator package
32
- Fix multicall few calls bug
33
-
34
- ## 0.24.0
35
-
36
- ### Minor Changes
37
-
38
- - pass wallet config and nonce to GetMetaTxnNetworkFeeOptions
39
-
40
- ## 0.23.0
41
-
42
- ### Minor Changes
43
-
44
- - - relayer: offer variety of gas fee options from the relayer service"
45
-
46
- ## 0.22.2
47
-
48
- ### Patch Changes
49
-
50
- - e1c109e: Fix authProof on expired sessions
51
-
52
- ## 0.22.1
53
-
54
- ### Patch Changes
55
-
56
- - transport session cache
57
-
58
- ## 0.22.0
59
-
60
- ### Minor Changes
61
-
62
- - e667b65: Expose all relayer options on networks
63
-
64
- ## 0.21.5
65
-
66
- ### Patch Changes
67
-
68
- - Give priority to metaTxnId returned by relayer
69
-
70
- ## 0.21.4
71
-
72
- ### Patch Changes
73
-
74
- - Add has enough signers method
75
-
76
- ## 0.21.3
77
-
78
- ### Patch Changes
79
-
80
- - add window session cache
81
-
82
- ## 0.21.2
83
-
84
- ### Patch Changes
85
-
86
- - exception handlind in relayer
87
-
88
- ## 0.21.0
89
-
90
- ### Minor Changes
91
-
92
- - - fix gas estimation on wallets with large number of signers
93
- - update to session handling and wallet config construction upon auth
94
-
95
- ## 0.20.0
96
-
97
- ### Minor Changes
98
-
99
- - revert JWT request piggybacking
100
-
101
- ## 0.19.3
102
-
103
- ### Patch Changes
104
-
105
- - jwtAuth visibility, package version sync
106
-
107
- ## 0.19.0
108
-
109
- ### Minor Changes
110
-
111
- - - provider, improve dapp / wallet transport io
112
-
113
- ## 0.18.0
114
-
115
- ### Minor Changes
116
-
117
- - relayer improvements and pending transaction handling
118
-
119
- ## 0.17.0
120
-
121
- ### Minor Changes
122
-
123
- - ArcadeumAPIClient no longer exposes jwtAuth
124
-
125
- ## 0.16.1
126
-
127
- ### Patch Changes
128
-
129
- - api: add legacy types for bw compat
130
-
131
- ## 0.16.0
132
-
133
- ### Minor Changes
134
-
135
- - relayer as its own service separate from chaind
136
-
137
- ## 0.15.1
138
-
139
- ### Patch Changes
140
-
141
- - update api clients
142
-
143
- ## 0.15.0
144
-
145
- ### Patch Changes
146
-
147
- - - update chaind and api bindings
148
- - replace EstimateMetaTxnGasReceipt with UpdateMetaTxnGasLimits and GetMetaTxnNetworkFeeOptions
149
-
150
- ## 0.14.3
151
-
152
- ### Patch Changes
153
-
154
- - Fix 0xSequence relayer dependencies
155
-
156
- ## 0.14.2
157
-
158
- ### Patch Changes
159
-
160
- - Add debug logs to rpc-relayer
161
-
162
- ## 0.14.1
163
-
164
- ### Patch Changes
165
-
166
- - update api client
167
-
168
- ## 0.14.0
169
-
170
- ### Minor Changes
171
-
172
- - update sequence utils finder which includes optimization
173
-
174
- ## 0.13.0
175
-
176
- ### Minor Changes
177
-
178
- - Update SequenceUtils deployed contract
179
-
180
- ## 0.12.1
181
-
182
- ### Patch Changes
183
-
184
- - npm bump
185
-
186
- ## 0.12.0
187
-
188
- ### Minor Changes
189
-
190
- - provider: improvements to window transport
191
-
192
- ## 0.11.4
193
-
194
- ### Patch Changes
195
-
196
- - update api client
197
-
198
- ## 0.11.3
199
-
200
- ### Patch Changes
201
-
202
- - improve openWindow state options handling
203
-
204
- ## 0.11.2
205
-
206
- ### Patch Changes
207
-
208
- - Fix multicall proxy scopes
209
-
210
- ## 0.11.1
211
-
212
- ### Patch Changes
213
-
214
- - Add support for dynamic and nested signatures
215
-
216
- ## 0.11.0
217
-
218
- ### Minor Changes
219
-
220
- - Update wallet context to 1.7 contracts
221
-
222
- ## 0.10.9
223
-
224
- ### Patch Changes
225
-
226
- - add support for public addresses as signers in session.open
227
-
228
- ## 0.10.8
229
-
230
- ### Patch Changes
231
-
232
- - Multicall production configuration
233
-
234
- ## 0.10.7
235
-
236
- ### Patch Changes
237
-
238
- - allow provider transport to force disconnect
239
-
240
- ## 0.10.6
241
-
242
- ### Patch Changes
243
-
244
- - - fix getWalletState method
245
-
246
- ## 0.10.5
247
-
248
- ### Patch Changes
249
-
250
- - update relayer gas refund options
251
-
252
- ## 0.10.4
253
-
254
- ### Patch Changes
255
-
256
- - Update api proto
257
-
258
- ## 0.10.3
259
-
260
- ### Patch Changes
261
-
262
- - Fix loading config cross-chain
263
-
264
- ## 0.10.2
265
-
266
- ### Patch Changes
267
-
268
- - - message digest fix
269
-
270
- ## 0.10.1
271
-
272
- ### Patch Changes
273
-
274
- - upgrade deps
275
-
276
- ## 0.10.0
277
-
278
- ### Minor Changes
279
-
280
- - Deployed new contracts with ERC1271 signer support
281
-
282
- ## 0.9.6
283
-
284
- ### Patch Changes
285
-
286
- - Update ABIs for latest sequence contracts
287
-
288
- ## 0.9.5
289
-
290
- ### Patch Changes
291
-
292
- - Implemented session class
293
-
294
- ## 0.9.3
295
-
296
- ### Patch Changes
297
-
298
- - - minor improvements
299
-
300
- ## 0.9.2
301
-
302
- ### Patch Changes
303
-
304
- - - Update api client
305
-
306
- ## 0.9.1
307
-
308
- ### Patch Changes
309
-
310
- - - patch bump
311
-
312
- ## 0.9.0
313
-
314
- ### Minor Changes
315
-
316
- - - provider transport hardening
317
-
318
- ## 0.8.5
319
-
320
- ### Patch Changes
321
-
322
- - - use latest wallet-contracts
323
-
324
- ## 0.8.4
325
-
326
- ### Patch Changes
327
-
328
- - - minor improvements, name updates and comments
329
-
330
- ## 0.8.3
331
-
332
- ### Patch Changes
333
-
334
- - - refinements
335
-
336
- - normalize signer address in config
337
-
338
- - provider: getWalletState() method to WalletProvider
339
-
340
- ## 0.8.2
341
-
342
- ### Patch Changes
343
-
344
- - - field rename and ethauth dependency bump
345
-
346
- ## 0.8.1
347
-
348
- ### Patch Changes
349
-
350
- - - variety of optimizations
351
-
352
- ## 0.8.0
353
-
354
- ### Minor Changes
355
-
356
- - - changeset fix
357
-
358
- ## 0.7.0
359
-
360
- ### Patch Changes
361
-
362
- - 6f11ed7: sequence.js, init release