@iotexproject/kit 0.1.33 → 0.1.35
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 +46 -25
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2573,7 +2573,9 @@ export type ProjectMetadata = {
|
|
|
2573
2573
|
website?: string;
|
|
2574
2574
|
desc?: string;
|
|
2575
2575
|
github?: string;
|
|
2576
|
-
|
|
2576
|
+
name?: string;
|
|
2577
|
+
version?: string;
|
|
2578
|
+
url?: string;
|
|
2577
2579
|
};
|
|
2578
2580
|
declare class GaugeEntity {
|
|
2579
2581
|
address: `0x${string}`;
|
|
@@ -4112,7 +4114,7 @@ declare class VerifyingProxyEntity {
|
|
|
4112
4114
|
verifier: () => Promise<any>;
|
|
4113
4115
|
deviceGauge: GaugeEntity;
|
|
4114
4116
|
projectDeviceAllowance(): Promise<number | null>;
|
|
4115
|
-
projectMetadata(name: string): Promise<ProjectMetadata | null>;
|
|
4117
|
+
projectMetadata(name: string, projectId: string): Promise<ProjectMetadata | null>;
|
|
4116
4118
|
projectAppliedAmount(): Promise<string>;
|
|
4117
4119
|
projectActivedAmount(): Promise<string>;
|
|
4118
4120
|
ioIDStore(): Promise<"" | `0x${string}`>;
|
|
@@ -4244,6 +4246,7 @@ declare class IoID {
|
|
|
4244
4246
|
get_project_metadata(args: {
|
|
4245
4247
|
address: `0x${string}`;
|
|
4246
4248
|
keys: string[];
|
|
4249
|
+
projectId: string;
|
|
4247
4250
|
}, ctx?: ConfigContext): Promise<{
|
|
4248
4251
|
address: `0x${string}`;
|
|
4249
4252
|
data: Record<string, any>;
|
|
@@ -8906,7 +8909,7 @@ declare class Analysis extends BaseDBModule {
|
|
|
8906
8909
|
ok: boolean;
|
|
8907
8910
|
msg: any;
|
|
8908
8911
|
}>;
|
|
8909
|
-
|
|
8912
|
+
referral_code({ refer_id, }: {
|
|
8910
8913
|
refer_id: string;
|
|
8911
8914
|
}, ctx?: {
|
|
8912
8915
|
authData?: {
|
|
@@ -8922,22 +8925,6 @@ declare class Analysis extends BaseDBModule {
|
|
|
8922
8925
|
msg: any;
|
|
8923
8926
|
referral_code?: undefined;
|
|
8924
8927
|
}>;
|
|
8925
|
-
fetch_referral_code({ user_id, }: {
|
|
8926
|
-
user_id: string;
|
|
8927
|
-
}, ctx?: {
|
|
8928
|
-
authData?: {
|
|
8929
|
-
app_id: string;
|
|
8930
|
-
api_key: string;
|
|
8931
|
-
};
|
|
8932
|
-
}): Promise<{
|
|
8933
|
-
ok: boolean;
|
|
8934
|
-
referral_code: any;
|
|
8935
|
-
msg?: undefined;
|
|
8936
|
-
} | {
|
|
8937
|
-
ok: boolean;
|
|
8938
|
-
msg: any;
|
|
8939
|
-
referral_code?: undefined;
|
|
8940
|
-
}>;
|
|
8941
8928
|
create_refer({ refer_id, refer_id_type, user_id, device_id, data, }: {
|
|
8942
8929
|
refer_id: string;
|
|
8943
8930
|
refer_id_type: "referral_code" | "user_id";
|
|
@@ -8961,6 +8948,17 @@ declare class Analysis extends BaseDBModule {
|
|
|
8961
8948
|
api_key: string;
|
|
8962
8949
|
};
|
|
8963
8950
|
}): Promise<Record<string, any>>;
|
|
8951
|
+
batch_fetch_event({ event_ids, }: {
|
|
8952
|
+
event_ids: string[];
|
|
8953
|
+
}, ctx?: {
|
|
8954
|
+
authData?: {
|
|
8955
|
+
app_id: string;
|
|
8956
|
+
api_key: string;
|
|
8957
|
+
};
|
|
8958
|
+
}): Promise<any[] | {
|
|
8959
|
+
ok: boolean;
|
|
8960
|
+
msg: string;
|
|
8961
|
+
}>;
|
|
8964
8962
|
fetch_user_point({ user_id, }: {
|
|
8965
8963
|
user_id: string;
|
|
8966
8964
|
}, ctx?: {
|
|
@@ -8977,6 +8975,22 @@ declare class Analysis extends BaseDBModule {
|
|
|
8977
8975
|
msg: any;
|
|
8978
8976
|
point?: undefined;
|
|
8979
8977
|
}>;
|
|
8978
|
+
fetch_invitees_num({ user_id, }: {
|
|
8979
|
+
user_id: string;
|
|
8980
|
+
}, ctx?: {
|
|
8981
|
+
authData?: {
|
|
8982
|
+
app_id: string;
|
|
8983
|
+
api_key: string;
|
|
8984
|
+
};
|
|
8985
|
+
}): Promise<{
|
|
8986
|
+
ok: boolean;
|
|
8987
|
+
invitees_num: any;
|
|
8988
|
+
msg?: undefined;
|
|
8989
|
+
} | {
|
|
8990
|
+
ok: boolean;
|
|
8991
|
+
msg: any;
|
|
8992
|
+
invitees_num?: undefined;
|
|
8993
|
+
}>;
|
|
8980
8994
|
}
|
|
8981
8995
|
declare class Analyzer extends BaseDBModule {
|
|
8982
8996
|
tvl(): Promise<any>;
|
|
@@ -9177,7 +9191,7 @@ declare const modules$1: {
|
|
|
9177
9191
|
};
|
|
9178
9192
|
export type DBModuleType = typeof modules$1;
|
|
9179
9193
|
export interface ConfigOptions {
|
|
9180
|
-
ttl
|
|
9194
|
+
ttl?: number;
|
|
9181
9195
|
checkAuth?: boolean;
|
|
9182
9196
|
}
|
|
9183
9197
|
export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
|
|
@@ -10231,11 +10245,6 @@ declare class Point {
|
|
|
10231
10245
|
sub: string;
|
|
10232
10246
|
};
|
|
10233
10247
|
}): Promise<any>;
|
|
10234
|
-
generate_referral_code(args?: any, ctx?: {
|
|
10235
|
-
authData?: {
|
|
10236
|
-
sub: string;
|
|
10237
|
-
};
|
|
10238
|
-
}): Promise<any>;
|
|
10239
10248
|
fetch_referral_code(args?: any, ctx?: {
|
|
10240
10249
|
authData?: {
|
|
10241
10250
|
sub: string;
|
|
@@ -10256,6 +10265,13 @@ declare class Point {
|
|
|
10256
10265
|
sub: string;
|
|
10257
10266
|
};
|
|
10258
10267
|
}): Promise<any>;
|
|
10268
|
+
batch_fetch_event({ event_ids, }: {
|
|
10269
|
+
event_ids: string[];
|
|
10270
|
+
}, ctx?: {
|
|
10271
|
+
authData?: {
|
|
10272
|
+
sub: string;
|
|
10273
|
+
};
|
|
10274
|
+
}): Promise<any>;
|
|
10259
10275
|
my_point_tasks(args?: any, ctx?: {
|
|
10260
10276
|
authData?: {
|
|
10261
10277
|
sub: string;
|
|
@@ -10266,6 +10282,11 @@ declare class Point {
|
|
|
10266
10282
|
sub: string;
|
|
10267
10283
|
};
|
|
10268
10284
|
}): Promise<any>;
|
|
10285
|
+
fetch_invitees_num(args?: any, ctx?: {
|
|
10286
|
+
authData?: {
|
|
10287
|
+
sub: string;
|
|
10288
|
+
};
|
|
10289
|
+
}): Promise<any>;
|
|
10269
10290
|
}
|
|
10270
10291
|
declare const modules$4: {
|
|
10271
10292
|
point: Point;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var U=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{for(let K in b){if(typeof b[K]==="object")b[K]=JSON.stringify(b[K],(Q,N)=>typeof N==="bigint"?N.toString():N);if(b[K]==null)delete b[K]}const H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;let D;if(z)D=await fetch(H,{headers:{...z}});else D=await fetch(H);return D.json()}}})}}),S=async({args:j={},prop:z,method:L,url:B,fetchRequestInit:G})=>{if(!G?.method||G?.method==="GET"){for(let b in j){if(typeof j[b]==="object")j[b]=JSON.stringify(j[b],(H,D)=>typeof D==="bigint"?D.toString():D);if(j[b]==null)delete j[b]}const J=`${B}/${String(z)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(J,{...G})).json()}if(G?.method==="POST"){const J=`${B}/${String(z)}/${String(L)}`;return(await fetch(J,{...G,body:JSON.stringify(j)})).json()}},V=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),W=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),X=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{const H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;return(await fetch(H,{method:"GET",...z})).json()}}})}}),Y=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{let H=!1;for(let N in b){if(typeof b[N]==="object")H=!0;if(b[N]==null)delete b[N]}let D,K,Q={};if(H)D=`${j}/${String(B)}/${String(C)}`;else D=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;if(z)Q.headers={...z};if(H)Q.method="POST",Q.body=JSON.stringify(b);return K=await fetch(D,Q),K.json()}}})}});export{X as createIotexscanClient,Y as createIoidClient,W as createClientWithIoPayServer,V as createClientWithDBServer,U as createClient};
|