@iotexproject/kit 0.1.25 → 0.1.27
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/dist/index.d.ts +78 -1
- package/package.json +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -8411,6 +8411,18 @@ declare class MSP {
|
|
|
8411
8411
|
chainId: string;
|
|
8412
8412
|
}[] | null>;
|
|
8413
8413
|
}
|
|
8414
|
+
export interface Candidate {
|
|
8415
|
+
ownerAddress: string;
|
|
8416
|
+
operatorAddress: string;
|
|
8417
|
+
rewardAddress: string;
|
|
8418
|
+
name: string;
|
|
8419
|
+
totalWeightedVotes: bigint;
|
|
8420
|
+
selfStakeBucketIdx: bigint;
|
|
8421
|
+
selfStakingTokens: bigint;
|
|
8422
|
+
}
|
|
8423
|
+
export interface CandidateV3 extends Candidate {
|
|
8424
|
+
id: string;
|
|
8425
|
+
}
|
|
8414
8426
|
export interface Bucket {
|
|
8415
8427
|
index: bigint;
|
|
8416
8428
|
candidateAddress: string;
|
|
@@ -8534,6 +8546,28 @@ declare class Staking {
|
|
|
8534
8546
|
error: unknown;
|
|
8535
8547
|
data?: undefined;
|
|
8536
8548
|
}>;
|
|
8549
|
+
getDelegateByAddress(args: {
|
|
8550
|
+
ownerAddress: `0x${string}` | `io${string}`;
|
|
8551
|
+
}): Promise<CandidateV3>;
|
|
8552
|
+
upsertRewardDistribution(args: {
|
|
8553
|
+
foundationRewardPortion: number;
|
|
8554
|
+
epochRewardPortion: number;
|
|
8555
|
+
blockRewardPortion: number;
|
|
8556
|
+
}): Promise<any>;
|
|
8557
|
+
candidateUpdate({ name, operatorAddress, rewardAddress }: {
|
|
8558
|
+
name: string;
|
|
8559
|
+
operatorAddress: `0x${string}`;
|
|
8560
|
+
rewardAddress: `0x${string}`;
|
|
8561
|
+
}): Promise<any>;
|
|
8562
|
+
getEndorseBucketsByDelegate(args: {
|
|
8563
|
+
ownerAddress: `0x${string}` | `io${string}`;
|
|
8564
|
+
}): Promise<never[] | undefined>;
|
|
8565
|
+
candidateTransferOwnership({ newOwner }: {
|
|
8566
|
+
newOwner: `0x${string}`;
|
|
8567
|
+
}): Promise<any>;
|
|
8568
|
+
candidateActivate({ bucketIndex }: {
|
|
8569
|
+
bucketIndex: string;
|
|
8570
|
+
}): Promise<any>;
|
|
8537
8571
|
}
|
|
8538
8572
|
declare class utils {
|
|
8539
8573
|
erc20(args: {
|
|
@@ -8960,6 +8994,49 @@ declare class Contract extends BaseDBModule {
|
|
|
8960
8994
|
address: string;
|
|
8961
8995
|
}): Promise<import("postgres").Row>;
|
|
8962
8996
|
}
|
|
8997
|
+
export type ItemVote = {
|
|
8998
|
+
isNative: boolean;
|
|
8999
|
+
remainingDuration: string;
|
|
9000
|
+
voterIotexAddress: string;
|
|
9001
|
+
votes: string;
|
|
9002
|
+
weightedVotes: string;
|
|
9003
|
+
};
|
|
9004
|
+
export type DelegateVotes = {
|
|
9005
|
+
data: {
|
|
9006
|
+
bucketInfo: ItemVote[];
|
|
9007
|
+
count: number;
|
|
9008
|
+
epochNumber: number;
|
|
9009
|
+
};
|
|
9010
|
+
};
|
|
9011
|
+
declare class Staking$1 extends BaseDBModule {
|
|
9012
|
+
delegatesByHeight({ height }?: {
|
|
9013
|
+
height?: number;
|
|
9014
|
+
}): Promise<never[] | import("postgres").RowList<import("postgres").Row[]>>;
|
|
9015
|
+
bucketByHash({ hash }: {
|
|
9016
|
+
hash: string;
|
|
9017
|
+
}): Promise<import("postgres").Row | null>;
|
|
9018
|
+
delegate_votes(args: {
|
|
9019
|
+
delegateName: string;
|
|
9020
|
+
page: number;
|
|
9021
|
+
limit?: number;
|
|
9022
|
+
}): Promise<DelegateVotes | {
|
|
9023
|
+
error: any;
|
|
9024
|
+
}>;
|
|
9025
|
+
delegate_recent_blocks(args: {
|
|
9026
|
+
producerAddress: string;
|
|
9027
|
+
page: number;
|
|
9028
|
+
limit: number;
|
|
9029
|
+
}): Promise<{
|
|
9030
|
+
data: {
|
|
9031
|
+
blocks: import("postgres").Row[] & Iterable<import("postgres").Row> & import("postgres").ResultQueryMeta<number, string | number>;
|
|
9032
|
+
total: number;
|
|
9033
|
+
};
|
|
9034
|
+
error?: undefined;
|
|
9035
|
+
} | {
|
|
9036
|
+
error: unknown;
|
|
9037
|
+
data?: undefined;
|
|
9038
|
+
}>;
|
|
9039
|
+
}
|
|
8963
9040
|
export type ComponentType = "banner-latest" | "iotex-2.0";
|
|
8964
9041
|
export interface ComponentData {
|
|
8965
9042
|
id: ComponentType;
|
|
@@ -8974,7 +9051,7 @@ declare class Resource {
|
|
|
8974
9051
|
declare const modules$1: {
|
|
8975
9052
|
account: Account;
|
|
8976
9053
|
analyzer: Analyzer;
|
|
8977
|
-
staking: Staking;
|
|
9054
|
+
staking: Staking$1;
|
|
8978
9055
|
transaction: Transaction;
|
|
8979
9056
|
nft: NFT;
|
|
8980
9057
|
health: Health;
|
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.
|
|
5
|
+
"version": "v0.1.27",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"@iotexproject/iotex-address-ts": "^1.0.4",
|
|
27
27
|
"@noble/curves": "^1.6.0",
|
|
28
28
|
"@tryghost/content-api": "^1.11.21",
|
|
29
|
+
"@types/bn.js": "^5.1.6",
|
|
30
|
+
"@types/utf8": "^3.0.3",
|
|
29
31
|
"axios": "^1.7.2",
|
|
30
32
|
"bech32": "^2.0.0",
|
|
31
33
|
"bentocache": "^1.0.0-beta.9",
|
|
@@ -40,9 +42,12 @@
|
|
|
40
42
|
"jsonwebtoken": "^9.0.2",
|
|
41
43
|
"lodash": "^4.17.21",
|
|
42
44
|
"lru-cache": "^11.0.0",
|
|
45
|
+
"number-to-bn": "^1.7.0",
|
|
43
46
|
"postgres": "^3.4.4",
|
|
44
47
|
"reflect-metadata": "^0.2.2",
|
|
45
48
|
"strip-ansi-cjs": "^8.0.0",
|
|
49
|
+
"underscore": "^1.13.7",
|
|
50
|
+
"utf8": "^3.0.0",
|
|
46
51
|
"utility-types": "^3.11.0",
|
|
47
52
|
"viem": "^2.17.5",
|
|
48
53
|
"zod": "^3.23.8",
|
|
@@ -55,6 +60,7 @@
|
|
|
55
60
|
"@types/google-protobuf": "^3.15.12",
|
|
56
61
|
"@types/jsonwebtoken": "^9.0.7",
|
|
57
62
|
"@types/tryghost__content-api": "^1.3.16",
|
|
63
|
+
"@types/underscore": "^1.11.15",
|
|
58
64
|
"bun-plugin-dts": "^0.2.3",
|
|
59
65
|
"grpc-tools": "^1.12.4",
|
|
60
66
|
"grpc_tools_node_protoc_ts": "^5.3.3",
|