@0xsequence/metadata 0.0.0-202182516517 → 0.0.0-20220412184039

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/CHANGELOG.md CHANGED
@@ -1,6 +1,212 @@
1
1
  # @0xsequence/metadata
2
2
 
3
- ## 0.0.0-202182516517
3
+ ## 0.0.0-20220412184039
4
+
5
+ ### Patch Changes
6
+
7
+ - update metadata proto
8
+
9
+ ## 0.36.9
10
+
11
+ ### Patch Changes
12
+
13
+ - minor dev xp improvements
14
+
15
+ ## 0.36.8
16
+
17
+ ### Patch Changes
18
+
19
+ - more connect options (theme, payment providers, funding currencies)
20
+
21
+ ## 0.36.7
22
+
4
23
  ### Patch Changes
5
24
 
6
- - next
25
+ - fix missing break
26
+
27
+ ## 0.36.6
28
+
29
+ ### Patch Changes
30
+
31
+ - wallet_switchEthereumChain support
32
+
33
+ ## 0.36.5
34
+
35
+ ### Patch Changes
36
+
37
+ - auth: bump ethauth to 0.7.0
38
+ network, wallet: don't assume position of auth network in list
39
+ api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls
40
+ relayer: Allow to specify local relayer transaction parameters like gas price or gas limit
41
+
42
+ ## 0.36.4
43
+
44
+ ### Patch Changes
45
+
46
+ - Updating list of chain ids to include other ethereum compatible chains
47
+
48
+ ## 0.36.3
49
+
50
+ ### Patch Changes
51
+
52
+ - provider: pass connect options to prompter methods
53
+
54
+ ## 0.36.2
55
+
56
+ ### Patch Changes
57
+
58
+ - transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode
59
+
60
+ ## 0.36.1
61
+
62
+ ### Patch Changes
63
+
64
+ - metadata: update client with more fields
65
+
66
+ ## 0.36.0
67
+
68
+ ### Minor Changes
69
+
70
+ - relayer, wallet: fee quote support
71
+
72
+ ## 0.35.12
73
+
74
+ ### Patch Changes
75
+
76
+ - provider: rename wallet.commands to wallet.utils
77
+
78
+ ## 0.35.11
79
+
80
+ ### Patch Changes
81
+
82
+ - provider/utils: smoother message validation
83
+
84
+ ## 0.35.10
85
+
86
+ ### Patch Changes
87
+
88
+ - upgrade deps
89
+
90
+ ## 0.35.9
91
+
92
+ ### Patch Changes
93
+
94
+ - provider: window-transport override event handlers with new wallet instance
95
+
96
+ ## 0.35.8
97
+
98
+ ### Patch Changes
99
+
100
+ - provider: async wallet sign in improvements
101
+
102
+ ## 0.35.7
103
+
104
+ ### Patch Changes
105
+
106
+ - config: cache wallet configs
107
+
108
+ ## 0.35.6
109
+
110
+ ### Patch Changes
111
+
112
+ - provider: support async signin of wallet request handler
113
+
114
+ ## 0.35.5
115
+
116
+ ### Patch Changes
117
+
118
+ - wallet: skip threshold check during fee estimation
119
+
120
+ ## 0.35.4
121
+
122
+ ### Patch Changes
123
+
124
+ - - browser extension mode, center window
125
+
126
+ ## 0.35.3
127
+
128
+ ### Patch Changes
129
+
130
+ - - update window position when in browser extension mode
131
+
132
+ ## 0.35.2
133
+
134
+ ### Patch Changes
135
+
136
+ - - provider: WindowMessageHandler accept optional windowHref
137
+
138
+ ## 0.35.1
139
+
140
+ ### Patch Changes
141
+
142
+ - wallet: update config on undeployed too
143
+
144
+ ## 0.35.0
145
+
146
+ ### Minor Changes
147
+
148
+ - - config: add buildStubSignature
149
+ - provider: add checks to signing cases for wallet deployment and config statuses
150
+ - provider: add prompt for wallet deployment
151
+ - relayer: add BaseRelayer.prependWalletDeploy
152
+ - relayer: add Relayer.feeOptions
153
+ - relayer: account for wallet deployment in fee estimation
154
+ - transactions: add fromTransactionish
155
+ - wallet: add Account.prependConfigUpdate
156
+ - wallet: add Account.getFeeOptions
157
+
158
+ ## 0.34.0
159
+
160
+ ### Minor Changes
161
+
162
+ - - upgrade deps
163
+
164
+ ## 0.31.3
165
+
166
+ ### Patch Changes
167
+
168
+ - update metadata bindings
169
+
170
+ ## 0.31.0
171
+
172
+ ### Minor Changes
173
+
174
+ - - upgrading to ethers v5.5
175
+
176
+ ## 0.30.0
177
+
178
+ ### Minor Changes
179
+
180
+ - - upgrade most deps
181
+
182
+ ## 0.29.8
183
+
184
+ ### Patch Changes
185
+
186
+ - update api
187
+
188
+ ## 0.29.1
189
+
190
+ ### Patch Changes
191
+
192
+ - metadata: ContractInfo.decimals is now optional, i.e. may be undefined
193
+
194
+ api: new APIs for user storage and isUsingGoogleMail
195
+
196
+ ## 0.29.0
197
+
198
+ ### Minor Changes
199
+
200
+ - major architectural changes in Sequence design
201
+
202
+ - only one API instance, API is no longer a per-chain service
203
+ - separate per-chain indexer service, API no longer handles indexing
204
+ - single contract metadata service, API no longer serves metadata
205
+
206
+ chaind package has been removed, indexer and metadata packages have been added
207
+
208
+ stronger typing with new explicit ChainId type
209
+
210
+ multicall fixes and improvements
211
+
212
+ forbid "wait" transactions in sendTransactionBatch calls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "0.0.0-202182516517",
3
+ "version": "0.0.0-20220412184039",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
@@ -13,7 +13,7 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "cross-fetch": "^3.0.6"
16
+ "cross-fetch": "^3.1.5"
17
17
  },
18
18
  "peerDependencies": {},
19
19
  "devDependencies": {},
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ import fetch from 'cross-fetch'
5
5
  import { Metadata as BaseSequenceMetadata } from './metadata.gen'
6
6
 
7
7
  export class SequenceMetadataClient extends BaseSequenceMetadata {
8
- constructor(hostname: string) {
9
- super(hostname, fetch)
8
+ constructor(hostname: string = 'https://metadata.sequence.app') {
9
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
10
10
  }
11
11
  }
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-metadata v0.4.0 f1264bc1871ed85b966466b348374ace021d3723
2
+ // sequence-metadata v0.4.0 376fc6f21f770a4d0457a039d13b6aca6d174e3f
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,18 +11,32 @@ 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 = "f1264bc1871ed85b966466b348374ace021d3723"
14
+ export const WebRPCSchemaHash = "376fc6f21f770a4d0457a039d13b6aca6d174e3f"
15
15
 
16
16
 
17
17
  //
18
18
  // Types
19
19
  //
20
+ export enum ContractType {
21
+ ERC20 = 'ERC20',
22
+ ContractURI = 'ContractURI',
23
+ OpenSea = 'OpenSea',
24
+ ERC1155 = 'ERC1155',
25
+ ERC721 = 'ERC721',
26
+ UNKNOWN = 'UNKNOWN'
27
+ }
28
+
20
29
  export enum SwapType {
21
30
  UNKNOWN = 'UNKNOWN',
22
31
  BUY = 'BUY',
23
32
  SELL = 'SELL'
24
33
  }
25
34
 
35
+ export enum SortOrder {
36
+ DESC = 'DESC',
37
+ ASC = 'ASC'
38
+ }
39
+
26
40
  export interface Version {
27
41
  webrpcVersion: string
28
42
  schemaVersion: string
@@ -43,13 +57,20 @@ export interface RuntimeStatus {
43
57
  export interface RuntimeChecks {
44
58
  }
45
59
 
60
+ export interface ContractIndex {
61
+ chainId: string
62
+ address: string
63
+ type: ContractType
64
+ metadata: {[key: string]: any}
65
+ }
66
+
46
67
  export interface ContractInfo {
47
68
  chainId: number
48
69
  address: string
49
70
  name: string
50
71
  type: string
51
72
  symbol: string
52
- decimals: number
73
+ decimals?: number
53
74
  logoURI: string
54
75
  extensions: ContractInfoExtensions
55
76
  }
@@ -60,6 +81,15 @@ export interface ContractInfoExtensions {
60
81
  ogImage: string
61
82
  originChainId: number
62
83
  originAddress: string
84
+ blacklist: boolean
85
+ }
86
+
87
+ export interface TokenIndex {
88
+ chainId: string
89
+ contractAddress: string
90
+ tokenId: string
91
+ metadata: {[key: string]: any}
92
+
63
93
  }
64
94
 
65
95
  export interface TokenMetadata {
@@ -70,9 +100,12 @@ export interface TokenMetadata {
70
100
  image: string
71
101
  decimals: number
72
102
  properties: {[key: string]: any}
103
+ video: string
104
+ audio: string
73
105
  image_data: string
74
106
  external_url: string
75
107
  background_color: string
108
+ animation_url: string
76
109
  attributes: Array<{[key: string]: any}>
77
110
  }
78
111
 
@@ -82,12 +115,24 @@ export interface GetNiftyswapUnitPricesRequest {
82
115
  amounts: Array<string>
83
116
  }
84
117
 
118
+ export interface Page {
119
+ pageSize?: number
120
+ page?: number
121
+ }
122
+
123
+ export interface SortBy {
124
+ column: string
125
+ order: SortOrder
126
+ }
127
+
85
128
  export interface Metadata {
86
129
  ping(headers?: object): Promise<PingReturn>
87
130
  version(headers?: object): Promise<VersionReturn>
88
131
  runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>
89
132
  getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>
90
133
  getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn>
134
+ searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn>
135
+ searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn>
91
136
  getContractInfo(args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn>
92
137
  getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn>
93
138
  searchContractInfo(args: SearchContractInfoArgs, headers?: object): Promise<SearchContractInfoReturn>
@@ -131,6 +176,28 @@ export interface GetTokenMetadataBatchArgs {
131
176
  export interface GetTokenMetadataBatchReturn {
132
177
  contractTokenMetadata: {[key: string]: Array<TokenMetadata>}
133
178
  }
179
+ export interface SearchTokenMetadataArgs {
180
+ chainID: string
181
+ contractAddress: string
182
+ filter: string
183
+ page?: Page
184
+ }
185
+
186
+ export interface SearchTokenMetadataReturn {
187
+ page: Page
188
+ tokenMetadata: Array<TokenMetadata>
189
+ }
190
+ export interface SearchTokenIDsArgs {
191
+ chainID: string
192
+ contractAddress: string
193
+ filter: string
194
+ page?: Page
195
+ }
196
+
197
+ export interface SearchTokenIDsReturn {
198
+ page: Page
199
+ tokenIds: Array<string>
200
+ }
134
201
  export interface GetContractInfoArgs {
135
202
  chainID: string
136
203
  contractAddress: string
@@ -262,6 +329,32 @@ export class Metadata implements Metadata {
262
329
  })
263
330
  }
264
331
 
332
+ searchTokenMetadata = (args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn> => {
333
+ return this.fetch(
334
+ this.url('SearchTokenMetadata'),
335
+ createHTTPRequest(args, headers)).then((res) => {
336
+ return buildResponse(res).then(_data => {
337
+ return {
338
+ page: <Page>(_data.page),
339
+ tokenMetadata: <Array<TokenMetadata>>(_data.tokenMetadata)
340
+ }
341
+ })
342
+ })
343
+ }
344
+
345
+ searchTokenIDs = (args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn> => {
346
+ return this.fetch(
347
+ this.url('SearchTokenIDs'),
348
+ createHTTPRequest(args, headers)).then((res) => {
349
+ return buildResponse(res).then(_data => {
350
+ return {
351
+ page: <Page>(_data.page),
352
+ tokenIds: <Array<string>>(_data.tokenIds)
353
+ }
354
+ })
355
+ })
356
+ }
357
+
265
358
  getContractInfo = (args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn> => {
266
359
  return this.fetch(
267
360
  this.url('GetContractInfo'),
@@ -366,4 +459,4 @@ const buildResponse = (res: Response): Promise<any> => {
366
459
  })
367
460
  }
368
461
 
369
- export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
462
+ export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>