@iotexproject/kit 0.1.25 → 0.1.26
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 +44 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8960,6 +8960,49 @@ declare class Contract extends BaseDBModule {
|
|
|
8960
8960
|
address: string;
|
|
8961
8961
|
}): Promise<import("postgres").Row>;
|
|
8962
8962
|
}
|
|
8963
|
+
export type ItemVote = {
|
|
8964
|
+
isNative: boolean;
|
|
8965
|
+
remainingDuration: string;
|
|
8966
|
+
voterIotexAddress: string;
|
|
8967
|
+
votes: string;
|
|
8968
|
+
weightedVotes: string;
|
|
8969
|
+
};
|
|
8970
|
+
export type DelegateVotes = {
|
|
8971
|
+
data: {
|
|
8972
|
+
bucketInfo: ItemVote[];
|
|
8973
|
+
count: number;
|
|
8974
|
+
epochNumber: number;
|
|
8975
|
+
};
|
|
8976
|
+
};
|
|
8977
|
+
declare class Staking$1 extends BaseDBModule {
|
|
8978
|
+
delegatesByHeight({ height }?: {
|
|
8979
|
+
height?: number;
|
|
8980
|
+
}): Promise<never[] | import("postgres").RowList<import("postgres").Row[]>>;
|
|
8981
|
+
bucketByHash({ hash }: {
|
|
8982
|
+
hash: string;
|
|
8983
|
+
}): Promise<import("postgres").Row | null>;
|
|
8984
|
+
delegate_votes(args: {
|
|
8985
|
+
delegateName: string;
|
|
8986
|
+
page: number;
|
|
8987
|
+
limit?: number;
|
|
8988
|
+
}): Promise<DelegateVotes | {
|
|
8989
|
+
error: any;
|
|
8990
|
+
}>;
|
|
8991
|
+
delegate_recent_blocks(args: {
|
|
8992
|
+
producerAddress: string;
|
|
8993
|
+
page: number;
|
|
8994
|
+
limit: number;
|
|
8995
|
+
}): Promise<{
|
|
8996
|
+
data: {
|
|
8997
|
+
blocks: import("postgres").Row[] & Iterable<import("postgres").Row> & import("postgres").ResultQueryMeta<number, string | number>;
|
|
8998
|
+
total: number;
|
|
8999
|
+
};
|
|
9000
|
+
error?: undefined;
|
|
9001
|
+
} | {
|
|
9002
|
+
error: unknown;
|
|
9003
|
+
data?: undefined;
|
|
9004
|
+
}>;
|
|
9005
|
+
}
|
|
8963
9006
|
export type ComponentType = "banner-latest" | "iotex-2.0";
|
|
8964
9007
|
export interface ComponentData {
|
|
8965
9008
|
id: ComponentType;
|
|
@@ -8974,7 +9017,7 @@ declare class Resource {
|
|
|
8974
9017
|
declare const modules$1: {
|
|
8975
9018
|
account: Account;
|
|
8976
9019
|
analyzer: Analyzer;
|
|
8977
|
-
staking: Staking;
|
|
9020
|
+
staking: Staking$1;
|
|
8978
9021
|
transaction: Transaction;
|
|
8979
9022
|
nft: NFT;
|
|
8980
9023
|
health: Health;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var K=({url:w="http://localhost:9527",ctx:A}={})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{for(let z in j){if(typeof j[z]==="object")j[z]=JSON.stringify(j[z],(G,D)=>typeof D==="bigint"?D.toString():D);if(j[z]==null)delete j[z]}const $=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;let J;if(A)J=await fetch($,{headers:{...A}});else J=await fetch($);return J.json()}}})}}),H=async({args:w={},prop:A,method:B,url:C,fetchRequestInit:T})=>{if(!T?.method||T?.method==="GET"){for(let j in w){if(typeof w[j]==="object")w[j]=JSON.stringify(w[j],($,J)=>typeof J==="bigint"?J.toString():J);if(w[j]==null)delete w[j]}const b=`${C}/${String(A)}/${String(B)}?${new URLSearchParams(w).toString()}`;return(await fetch(b)).json()}if(T?.method==="POST"){const b=`${C}/${String(A)}/${String(B)}`;return(await fetch(b,{...T,body:JSON.stringify(w)})).json()}},L=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{return H({args:j,prop:C,method:E,url:w,fetchRequestInit:A})}}})}}),N=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{return H({args:j,prop:C,method:E,url:w,fetchRequestInit:A})}}})}}),Q=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{const $=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;return(await fetch($,{method:"GET",...A})).json()}}})}}),S=({url:w="http://localhost:9527",ctx:A}={})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{let $=!1;for(let D in j){if(typeof j[D]==="object")$=!0;if(j[D]==null)delete j[D]}let J,z,G={};if($)J=`${w}/${String(C)}/${String(E)}`;else J=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;if(A)G.headers={...A};if($)G.method="POST",G.body=JSON.stringify(j);return z=await fetch(J,G),z.json()}}})}});export{Q as createIotexscanClient,S as createIoidClient,N as createClientWithIoPayServer,L as createClientWithDBServer,K as createClient};
|