@0xsequence/indexer 0.39.3 → 0.39.6

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.
@@ -27,7 +27,7 @@ function _extends() {
27
27
  }
28
28
 
29
29
  /* eslint-disable */
30
- // sequence-indexer v0.4.0 d44c148ecd843665eba71e66908382e569d8821a
30
+ // sequence-indexer v0.4.0 1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b
31
31
  // --
32
32
  // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
33
33
  // Do not edit by hand. Update your webrpc schema and re-generate.
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
36
36
 
37
37
  const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
38
38
 
39
- const WebRPCSchemaHash = "d44c148ecd843665eba71e66908382e569d8821a"; //
39
+ const WebRPCSchemaHash = "1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b"; //
40
40
  // Types
41
41
  //
42
42
 
@@ -196,6 +196,14 @@ class Indexer {
196
196
  });
197
197
  };
198
198
 
199
+ this.syncBalance = (args, headers) => {
200
+ return this.fetch(this.url('SyncBalance'), createHTTPRequest(args, headers)).then(res => {
201
+ return buildResponse(res).then(_data => {
202
+ return {};
203
+ });
204
+ });
205
+ };
206
+
199
207
  this.hostname = hostname;
200
208
  this.fetch = fetch;
201
209
  }
@@ -27,7 +27,7 @@ function _extends() {
27
27
  }
28
28
 
29
29
  /* eslint-disable */
30
- // sequence-indexer v0.4.0 d44c148ecd843665eba71e66908382e569d8821a
30
+ // sequence-indexer v0.4.0 1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b
31
31
  // --
32
32
  // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
33
33
  // Do not edit by hand. Update your webrpc schema and re-generate.
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
36
36
 
37
37
  const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
38
38
 
39
- const WebRPCSchemaHash = "d44c148ecd843665eba71e66908382e569d8821a"; //
39
+ const WebRPCSchemaHash = "1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b"; //
40
40
  // Types
41
41
  //
42
42
 
@@ -196,6 +196,14 @@ class Indexer {
196
196
  });
197
197
  };
198
198
 
199
+ this.syncBalance = (args, headers) => {
200
+ return this.fetch(this.url('SyncBalance'), createHTTPRequest(args, headers)).then(res => {
201
+ return buildResponse(res).then(_data => {
202
+ return {};
203
+ });
204
+ });
205
+ };
206
+
199
207
  this.hostname = hostname;
200
208
  this.fetch = fetch;
201
209
  }
@@ -19,7 +19,7 @@ function _extends() {
19
19
  }
20
20
 
21
21
  /* eslint-disable */
22
- // sequence-indexer v0.4.0 d44c148ecd843665eba71e66908382e569d8821a
22
+ // sequence-indexer v0.4.0 1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b
23
23
  // --
24
24
  // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
25
25
  // Do not edit by hand. Update your webrpc schema and re-generate.
@@ -28,7 +28,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
28
28
 
29
29
  const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
30
30
 
31
- const WebRPCSchemaHash = "d44c148ecd843665eba71e66908382e569d8821a"; //
31
+ const WebRPCSchemaHash = "1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b"; //
32
32
  // Types
33
33
  //
34
34
 
@@ -188,6 +188,14 @@ class Indexer {
188
188
  });
189
189
  };
190
190
 
191
+ this.syncBalance = (args, headers) => {
192
+ return this.fetch(this.url('SyncBalance'), createHTTPRequest(args, headers)).then(res => {
193
+ return buildResponse(res).then(_data => {
194
+ return {};
195
+ });
196
+ });
197
+ };
198
+
191
199
  this.hostname = hostname;
192
200
  this.fetch = fetch;
193
201
  }
@@ -1,6 +1,44 @@
1
1
  export declare const WebRPCVersion = "v1";
2
2
  export declare const WebRPCSchemaVersion = "v0.4.0";
3
- export declare const WebRPCSchemaHash = "d44c148ecd843665eba71e66908382e569d8821a";
3
+ export declare const WebRPCSchemaHash = "1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b";
4
+ export interface ContractInfo {
5
+ chainId: number;
6
+ address: string;
7
+ name: string;
8
+ type: string;
9
+ symbol: string;
10
+ decimals?: number;
11
+ logoURI: string;
12
+ extensions: ContractInfoExtensions;
13
+ }
14
+ export interface ContractInfoExtensions {
15
+ link: string;
16
+ description: string;
17
+ ogImage: string;
18
+ originChainId: number;
19
+ originAddress: string;
20
+ blacklist: boolean;
21
+ }
22
+ export interface TokenMetadata {
23
+ tokenId: string;
24
+ contractAddress: string;
25
+ name: string;
26
+ description: string;
27
+ image: string;
28
+ decimals: number;
29
+ properties: {
30
+ [key: string]: any;
31
+ };
32
+ video: string;
33
+ audio: string;
34
+ image_data: string;
35
+ external_url: string;
36
+ background_color: string;
37
+ animation_url: string;
38
+ attributes: Array<{
39
+ [key: string]: any;
40
+ }>;
41
+ }
4
42
  export declare enum ContractType {
5
43
  UNKNOWN = "UNKNOWN",
6
44
  ERC20 = "ERC20",
@@ -85,6 +123,8 @@ export interface TokenBalance {
85
123
  blockNumber: number;
86
124
  updateId: number;
87
125
  chainId: number;
126
+ contractInfo?: ContractInfo;
127
+ tokenMetadata?: TokenMetadata;
88
128
  }
89
129
  export interface TokenHistory {
90
130
  id: number;
@@ -104,6 +144,8 @@ export interface TokenSupply {
104
144
  tokenID: string;
105
145
  supply: string;
106
146
  chainId: number;
147
+ contractInfo?: ContractInfo;
148
+ tokenMetadata?: TokenMetadata;
107
149
  }
108
150
  export interface Transaction {
109
151
  txnHash: string;
@@ -122,6 +164,11 @@ export interface TxnTransfer {
122
164
  to: string;
123
165
  tokenIds?: Array<string>;
124
166
  amounts: Array<string>;
167
+ logIndex: number;
168
+ contractInfo?: ContractInfo;
169
+ tokenMetadata?: {
170
+ [key: string]: TokenMetadata;
171
+ };
125
172
  }
126
173
  export interface TransactionHistoryFilter {
127
174
  accountAddress?: string;
@@ -157,6 +204,7 @@ export interface Indexer {
157
204
  getTokenSuppliesMap(args: GetTokenSuppliesMapArgs, headers?: object): Promise<GetTokenSuppliesMapReturn>;
158
205
  getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn>;
159
206
  getTransactionHistory(args: GetTransactionHistoryArgs, headers?: object): Promise<GetTransactionHistoryReturn>;
207
+ syncBalance(args: SyncBalanceArgs, headers?: object): Promise<SyncBalanceReturn>;
160
208
  }
161
209
  export interface PingArgs {
162
210
  }
@@ -187,12 +235,14 @@ export interface GetEtherBalanceReturn {
187
235
  export interface GetTokenBalancesArgs {
188
236
  accountAddress?: string;
189
237
  contractAddress?: string;
238
+ includeMetadata?: boolean;
190
239
  }
191
240
  export interface GetTokenBalancesReturn {
192
241
  balances: Array<TokenBalance>;
193
242
  }
194
243
  export interface GetTokenSuppliesArgs {
195
244
  contractAddress: string;
245
+ includeMetadata?: boolean;
196
246
  }
197
247
  export interface GetTokenSuppliesReturn {
198
248
  contractType: ContractType;
@@ -202,6 +252,7 @@ export interface GetTokenSuppliesMapArgs {
202
252
  tokenMap: {
203
253
  [key: string]: Array<string>;
204
254
  };
255
+ includeMetadata?: boolean;
205
256
  }
206
257
  export interface GetTokenSuppliesMapReturn {
207
258
  supplies: {
@@ -220,11 +271,19 @@ export interface GetBalanceUpdatesReturn {
220
271
  export interface GetTransactionHistoryArgs {
221
272
  filter: TransactionHistoryFilter;
222
273
  page?: Page;
274
+ includeMetadata?: boolean;
223
275
  }
224
276
  export interface GetTransactionHistoryReturn {
225
277
  page: Page;
226
278
  transactions: Array<Transaction>;
227
279
  }
280
+ export interface SyncBalanceArgs {
281
+ accountAddress: string;
282
+ contractAddress: string;
283
+ tokenID?: string;
284
+ }
285
+ export interface SyncBalanceReturn {
286
+ }
228
287
  export declare class Indexer implements Indexer {
229
288
  protected hostname: string;
230
289
  protected fetch: Fetch;
@@ -241,6 +300,7 @@ export declare class Indexer implements Indexer {
241
300
  getTokenSuppliesMap: (args: GetTokenSuppliesMapArgs, headers?: object | undefined) => Promise<GetTokenSuppliesMapReturn>;
242
301
  getBalanceUpdates: (args: GetBalanceUpdatesArgs, headers?: object | undefined) => Promise<GetBalanceUpdatesReturn>;
243
302
  getTransactionHistory: (args: GetTransactionHistoryArgs, headers?: object | undefined) => Promise<GetTransactionHistoryReturn>;
303
+ syncBalance: (args: SyncBalanceArgs, headers?: object | undefined) => Promise<SyncBalanceReturn>;
244
304
  }
245
305
  export interface WebRPCError extends Error {
246
306
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/indexer",
3
- "version": "0.39.3",
3
+ "version": "0.39.6",
4
4
  "description": "indexer sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/indexer",
6
6
  "source": "src/index.ts",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-indexer v0.4.0 d44c148ecd843665eba71e66908382e569d8821a
2
+ // sequence-indexer v0.4.0 1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b
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,12 +11,49 @@ 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 = "d44c148ecd843665eba71e66908382e569d8821a"
14
+ export const WebRPCSchemaHash = "1b0f4a5b9d100c50a6afdd42cdeda800aa92ce9b"
15
15
 
16
16
 
17
17
  //
18
18
  // Types
19
19
  //
20
+ export interface ContractInfo {
21
+ chainId: number
22
+ address: string
23
+ name: string
24
+ type: string
25
+ symbol: string
26
+ decimals?: number
27
+ logoURI: string
28
+ extensions: ContractInfoExtensions
29
+ }
30
+
31
+ export interface ContractInfoExtensions {
32
+ link: string
33
+ description: string
34
+ ogImage: string
35
+ originChainId: number
36
+ originAddress: string
37
+ blacklist: boolean
38
+ }
39
+
40
+ export interface TokenMetadata {
41
+ tokenId: string
42
+ contractAddress: string
43
+ name: string
44
+ description: string
45
+ image: string
46
+ decimals: number
47
+ properties: {[key: string]: any}
48
+ video: string
49
+ audio: string
50
+ image_data: string
51
+ external_url: string
52
+ background_color: string
53
+ animation_url: string
54
+ attributes: Array<{[key: string]: any}>
55
+ }
56
+
20
57
  export enum ContractType {
21
58
  UNKNOWN = 'UNKNOWN',
22
59
  ERC20 = 'ERC20',
@@ -113,6 +150,8 @@ export interface TokenBalance {
113
150
  blockNumber: number
114
151
  updateId: number
115
152
  chainId: number
153
+ contractInfo?: ContractInfo
154
+ tokenMetadata?: TokenMetadata
116
155
  }
117
156
 
118
157
  export interface TokenHistory {
@@ -134,6 +173,8 @@ export interface TokenSupply {
134
173
  tokenID: string
135
174
  supply: string
136
175
  chainId: number
176
+ contractInfo?: ContractInfo
177
+ tokenMetadata?: TokenMetadata
137
178
  }
138
179
 
139
180
  export interface Transaction {
@@ -154,6 +195,9 @@ export interface TxnTransfer {
154
195
  to: string
155
196
  tokenIds?: Array<string>
156
197
  amounts: Array<string>
198
+ logIndex: number
199
+ contractInfo?: ContractInfo
200
+ tokenMetadata?: {[key: string]: TokenMetadata}
157
201
  }
158
202
 
159
203
  export interface TransactionHistoryFilter {
@@ -193,6 +237,7 @@ export interface Indexer {
193
237
  getTokenSuppliesMap(args: GetTokenSuppliesMapArgs, headers?: object): Promise<GetTokenSuppliesMapReturn>
194
238
  getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn>
195
239
  getTransactionHistory(args: GetTransactionHistoryArgs, headers?: object): Promise<GetTransactionHistoryReturn>
240
+ syncBalance(args: SyncBalanceArgs, headers?: object): Promise<SyncBalanceReturn>
196
241
  }
197
242
 
198
243
  export interface PingArgs {
@@ -229,6 +274,7 @@ export interface GetEtherBalanceReturn {
229
274
  export interface GetTokenBalancesArgs {
230
275
  accountAddress?: string
231
276
  contractAddress?: string
277
+ includeMetadata?: boolean
232
278
  }
233
279
 
234
280
  export interface GetTokenBalancesReturn {
@@ -236,6 +282,7 @@ export interface GetTokenBalancesReturn {
236
282
  }
237
283
  export interface GetTokenSuppliesArgs {
238
284
  contractAddress: string
285
+ includeMetadata?: boolean
239
286
  }
240
287
 
241
288
  export interface GetTokenSuppliesReturn {
@@ -244,6 +291,7 @@ export interface GetTokenSuppliesReturn {
244
291
  }
245
292
  export interface GetTokenSuppliesMapArgs {
246
293
  tokenMap: {[key: string]: Array<string>}
294
+ includeMetadata?: boolean
247
295
  }
248
296
 
249
297
  export interface GetTokenSuppliesMapReturn {
@@ -262,12 +310,21 @@ export interface GetBalanceUpdatesReturn {
262
310
  export interface GetTransactionHistoryArgs {
263
311
  filter: TransactionHistoryFilter
264
312
  page?: Page
313
+ includeMetadata?: boolean
265
314
  }
266
315
 
267
316
  export interface GetTransactionHistoryReturn {
268
317
  page: Page
269
318
  transactions: Array<Transaction>
270
319
  }
320
+ export interface SyncBalanceArgs {
321
+ accountAddress: string
322
+ contractAddress: string
323
+ tokenID?: string
324
+ }
325
+
326
+ export interface SyncBalanceReturn {
327
+ }
271
328
 
272
329
 
273
330
 
@@ -415,6 +472,17 @@ export class Indexer implements Indexer {
415
472
  })
416
473
  }
417
474
 
475
+ syncBalance = (args: SyncBalanceArgs, headers?: object): Promise<SyncBalanceReturn> => {
476
+ return this.fetch(
477
+ this.url('SyncBalance'),
478
+ createHTTPRequest(args, headers)).then((res) => {
479
+ return buildResponse(res).then(_data => {
480
+ return {
481
+ }
482
+ })
483
+ })
484
+ }
485
+
418
486
  }
419
487
 
420
488