@iotexproject/kit 0.1.19 → 0.1.20

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +385 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -352,6 +352,12 @@ declare class ERC20Entity {
352
352
  originFormat: string;
353
353
  decimals: string;
354
354
  }>;
355
+ balanceUSD(account?: `0x${string}`): Promise<string | {
356
+ value: string;
357
+ format: string;
358
+ originFormat: string;
359
+ decimals: string;
360
+ }>;
355
361
  allowance: (owner: string, spender: string) => Promise<any>;
356
362
  approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
357
363
  priceUSD(): Promise<any>;
@@ -6304,6 +6310,366 @@ declare class UniswapV2LPEntity {
6304
6310
  balanceOf(address: string): Promise<bigint>;
6305
6311
  totalSupplyUSD(): Promise<number>;
6306
6312
  }
6313
+ declare class ERC20Entity$1 {
6314
+ address: `0x${string}`;
6315
+ chainId: string;
6316
+ static abi: readonly [
6317
+ {
6318
+ readonly inputs: readonly [
6319
+ {
6320
+ readonly internalType: "string";
6321
+ readonly name: "name";
6322
+ readonly type: "string";
6323
+ },
6324
+ {
6325
+ readonly internalType: "string";
6326
+ readonly name: "symbol";
6327
+ readonly type: "string";
6328
+ },
6329
+ {
6330
+ readonly internalType: "uint256";
6331
+ readonly name: "initialSupply";
6332
+ readonly type: "uint256";
6333
+ },
6334
+ {
6335
+ readonly internalType: "address";
6336
+ readonly name: "owner";
6337
+ readonly type: "address";
6338
+ }
6339
+ ];
6340
+ readonly stateMutability: "nonpayable";
6341
+ readonly type: "constructor";
6342
+ },
6343
+ {
6344
+ readonly anonymous: false;
6345
+ readonly inputs: readonly [
6346
+ {
6347
+ readonly indexed: true;
6348
+ readonly internalType: "address";
6349
+ readonly name: "owner";
6350
+ readonly type: "address";
6351
+ },
6352
+ {
6353
+ readonly indexed: true;
6354
+ readonly internalType: "address";
6355
+ readonly name: "spender";
6356
+ readonly type: "address";
6357
+ },
6358
+ {
6359
+ readonly indexed: false;
6360
+ readonly internalType: "uint256";
6361
+ readonly name: "value";
6362
+ readonly type: "uint256";
6363
+ }
6364
+ ];
6365
+ readonly name: "Approval";
6366
+ readonly type: "event";
6367
+ },
6368
+ {
6369
+ readonly anonymous: false;
6370
+ readonly inputs: readonly [
6371
+ {
6372
+ readonly indexed: true;
6373
+ readonly internalType: "address";
6374
+ readonly name: "from";
6375
+ readonly type: "address";
6376
+ },
6377
+ {
6378
+ readonly indexed: true;
6379
+ readonly internalType: "address";
6380
+ readonly name: "to";
6381
+ readonly type: "address";
6382
+ },
6383
+ {
6384
+ readonly indexed: false;
6385
+ readonly internalType: "uint256";
6386
+ readonly name: "value";
6387
+ readonly type: "uint256";
6388
+ }
6389
+ ];
6390
+ readonly name: "Transfer";
6391
+ readonly type: "event";
6392
+ },
6393
+ {
6394
+ readonly inputs: readonly [
6395
+ {
6396
+ readonly internalType: "address";
6397
+ readonly name: "owner";
6398
+ readonly type: "address";
6399
+ },
6400
+ {
6401
+ readonly internalType: "address";
6402
+ readonly name: "spender";
6403
+ readonly type: "address";
6404
+ }
6405
+ ];
6406
+ readonly name: "allowance";
6407
+ readonly outputs: readonly [
6408
+ {
6409
+ readonly internalType: "uint256";
6410
+ readonly name: "";
6411
+ readonly type: "uint256";
6412
+ }
6413
+ ];
6414
+ readonly stateMutability: "view";
6415
+ readonly type: "function";
6416
+ },
6417
+ {
6418
+ readonly inputs: readonly [
6419
+ {
6420
+ readonly internalType: "address";
6421
+ readonly name: "spender";
6422
+ readonly type: "address";
6423
+ },
6424
+ {
6425
+ readonly internalType: "uint256";
6426
+ readonly name: "amount";
6427
+ readonly type: "uint256";
6428
+ }
6429
+ ];
6430
+ readonly name: "approve";
6431
+ readonly outputs: readonly [
6432
+ {
6433
+ readonly internalType: "bool";
6434
+ readonly name: "";
6435
+ readonly type: "bool";
6436
+ }
6437
+ ];
6438
+ readonly stateMutability: "nonpayable";
6439
+ readonly type: "function";
6440
+ },
6441
+ {
6442
+ readonly inputs: readonly [
6443
+ {
6444
+ readonly internalType: "address";
6445
+ readonly name: "account";
6446
+ readonly type: "address";
6447
+ }
6448
+ ];
6449
+ readonly name: "balanceOf";
6450
+ readonly outputs: readonly [
6451
+ {
6452
+ readonly internalType: "uint256";
6453
+ readonly name: "";
6454
+ readonly type: "uint256";
6455
+ }
6456
+ ];
6457
+ readonly stateMutability: "view";
6458
+ readonly type: "function";
6459
+ },
6460
+ {
6461
+ readonly inputs: readonly [
6462
+ {
6463
+ readonly internalType: "uint256";
6464
+ readonly name: "amount";
6465
+ readonly type: "uint256";
6466
+ }
6467
+ ];
6468
+ readonly name: "burn";
6469
+ readonly outputs: readonly [
6470
+ ];
6471
+ readonly stateMutability: "nonpayable";
6472
+ readonly type: "function";
6473
+ },
6474
+ {
6475
+ readonly inputs: readonly [
6476
+ {
6477
+ readonly internalType: "address";
6478
+ readonly name: "account";
6479
+ readonly type: "address";
6480
+ },
6481
+ {
6482
+ readonly internalType: "uint256";
6483
+ readonly name: "amount";
6484
+ readonly type: "uint256";
6485
+ }
6486
+ ];
6487
+ readonly name: "burnFrom";
6488
+ readonly outputs: readonly [
6489
+ ];
6490
+ readonly stateMutability: "nonpayable";
6491
+ readonly type: "function";
6492
+ },
6493
+ {
6494
+ readonly inputs: readonly [
6495
+ ];
6496
+ readonly name: "decimals";
6497
+ readonly outputs: readonly [
6498
+ {
6499
+ readonly internalType: "uint8";
6500
+ readonly name: "";
6501
+ readonly type: "uint8";
6502
+ }
6503
+ ];
6504
+ readonly stateMutability: "view";
6505
+ readonly type: "function";
6506
+ },
6507
+ {
6508
+ readonly inputs: readonly [
6509
+ {
6510
+ readonly internalType: "address";
6511
+ readonly name: "spender";
6512
+ readonly type: "address";
6513
+ },
6514
+ {
6515
+ readonly internalType: "uint256";
6516
+ readonly name: "subtractedValue";
6517
+ readonly type: "uint256";
6518
+ }
6519
+ ];
6520
+ readonly name: "decreaseAllowance";
6521
+ readonly outputs: readonly [
6522
+ {
6523
+ readonly internalType: "bool";
6524
+ readonly name: "";
6525
+ readonly type: "bool";
6526
+ }
6527
+ ];
6528
+ readonly stateMutability: "nonpayable";
6529
+ readonly type: "function";
6530
+ },
6531
+ {
6532
+ readonly inputs: readonly [
6533
+ {
6534
+ readonly internalType: "address";
6535
+ readonly name: "spender";
6536
+ readonly type: "address";
6537
+ },
6538
+ {
6539
+ readonly internalType: "uint256";
6540
+ readonly name: "addedValue";
6541
+ readonly type: "uint256";
6542
+ }
6543
+ ];
6544
+ readonly name: "increaseAllowance";
6545
+ readonly outputs: readonly [
6546
+ {
6547
+ readonly internalType: "bool";
6548
+ readonly name: "";
6549
+ readonly type: "bool";
6550
+ }
6551
+ ];
6552
+ readonly stateMutability: "nonpayable";
6553
+ readonly type: "function";
6554
+ },
6555
+ {
6556
+ readonly inputs: readonly [
6557
+ ];
6558
+ readonly name: "name";
6559
+ readonly outputs: readonly [
6560
+ {
6561
+ readonly internalType: "string";
6562
+ readonly name: "";
6563
+ readonly type: "string";
6564
+ }
6565
+ ];
6566
+ readonly stateMutability: "view";
6567
+ readonly type: "function";
6568
+ },
6569
+ {
6570
+ readonly inputs: readonly [
6571
+ ];
6572
+ readonly name: "symbol";
6573
+ readonly outputs: readonly [
6574
+ {
6575
+ readonly internalType: "string";
6576
+ readonly name: "";
6577
+ readonly type: "string";
6578
+ }
6579
+ ];
6580
+ readonly stateMutability: "view";
6581
+ readonly type: "function";
6582
+ },
6583
+ {
6584
+ readonly inputs: readonly [
6585
+ ];
6586
+ readonly name: "totalSupply";
6587
+ readonly outputs: readonly [
6588
+ {
6589
+ readonly internalType: "uint256";
6590
+ readonly name: "";
6591
+ readonly type: "uint256";
6592
+ }
6593
+ ];
6594
+ readonly stateMutability: "view";
6595
+ readonly type: "function";
6596
+ },
6597
+ {
6598
+ readonly inputs: readonly [
6599
+ {
6600
+ readonly internalType: "address";
6601
+ readonly name: "recipient";
6602
+ readonly type: "address";
6603
+ },
6604
+ {
6605
+ readonly internalType: "uint256";
6606
+ readonly name: "amount";
6607
+ readonly type: "uint256";
6608
+ }
6609
+ ];
6610
+ readonly name: "transfer";
6611
+ readonly outputs: readonly [
6612
+ {
6613
+ readonly internalType: "bool";
6614
+ readonly name: "";
6615
+ readonly type: "bool";
6616
+ }
6617
+ ];
6618
+ readonly stateMutability: "nonpayable";
6619
+ readonly type: "function";
6620
+ },
6621
+ {
6622
+ readonly inputs: readonly [
6623
+ {
6624
+ readonly internalType: "address";
6625
+ readonly name: "sender";
6626
+ readonly type: "address";
6627
+ },
6628
+ {
6629
+ readonly internalType: "address";
6630
+ readonly name: "recipient";
6631
+ readonly type: "address";
6632
+ },
6633
+ {
6634
+ readonly internalType: "uint256";
6635
+ readonly name: "amount";
6636
+ readonly type: "uint256";
6637
+ }
6638
+ ];
6639
+ readonly name: "transferFrom";
6640
+ readonly outputs: readonly [
6641
+ {
6642
+ readonly internalType: "bool";
6643
+ readonly name: "";
6644
+ readonly type: "bool";
6645
+ }
6646
+ ];
6647
+ readonly stateMutability: "nonpayable";
6648
+ readonly type: "function";
6649
+ }
6650
+ ];
6651
+ get isEther(): boolean;
6652
+ type(): Promise<string>;
6653
+ name: string;
6654
+ symbol: string;
6655
+ decimals(): Promise<number | undefined>;
6656
+ balanceOf(account?: `0x${string}`): Promise<{
6657
+ value: string;
6658
+ format: string;
6659
+ originFormat: string;
6660
+ decimals: string;
6661
+ }>;
6662
+ balanceUSD(account?: `0x${string}`): Promise<string | {
6663
+ value: string;
6664
+ format: string;
6665
+ originFormat: string;
6666
+ decimals: string;
6667
+ }>;
6668
+ allowance: (owner: string, spender: string) => Promise<any>;
6669
+ approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
6670
+ priceUSD(): Promise<any>;
6671
+ tokenUrl(): Promise<any>;
6672
+ }
6307
6673
  declare class Mimo {
6308
6674
  getLpList(args: {
6309
6675
  address: string;
@@ -6336,6 +6702,24 @@ declare class Mimo {
6336
6702
  getToken({ address }: {
6337
6703
  address: string;
6338
6704
  }): Promise<any>;
6705
+ getTokenDetail({ account, tokenAddress }: {
6706
+ account: `0x${string}`;
6707
+ tokenAddress: `0x${string}`;
6708
+ }): Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity$1, {
6709
+ name: true;
6710
+ symbol: true;
6711
+ priceUSD: true;
6712
+ tokenUrl: true;
6713
+ balanceOf: false | [
6714
+ `0x${string}`
6715
+ ];
6716
+ balanceUSD: false | [
6717
+ `0x${string}`
6718
+ ];
6719
+ }>>;
6720
+ getAllTokens({ account }: {
6721
+ account: `0x${string}`;
6722
+ }): Promise<any>;
6339
6723
  }
6340
6724
  declare class MockBucketEntity {
6341
6725
  address: `0x${string}`;
@@ -8394,7 +8778,7 @@ declare class Analysis extends BaseDBModule {
8394
8778
  ok: boolean;
8395
8779
  message: string;
8396
8780
  }>;
8397
- createRef({ device_id, refer_id, user_id }: {
8781
+ create_ref({ device_id, refer_id, user_id }: {
8398
8782
  device_id: string;
8399
8783
  refer_id: string;
8400
8784
  user_id: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@iotexproject/kit",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "v0.1.19",
5
+ "version": "v0.1.20",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {