@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 CHANGED
@@ -2573,7 +2573,9 @@ export type ProjectMetadata = {
2573
2573
  website?: string;
2574
2574
  desc?: string;
2575
2575
  github?: string;
2576
- metadata?: any;
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
- generate_referral_code({ refer_id, }: {
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: number;
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 L=({url:A="http://localhost:9527",ctx:B}={})=>new Proxy({},{get(G,C,j){return new Proxy({},{get(z,D){return async(T)=>{for(let E in T){if(typeof T[E]==="object")T[E]=JSON.stringify(T[E],(J,H)=>typeof H==="bigint"?H.toString():H);if(T[E]==null)delete T[E]}const w=`${A}/${String(C)}/${String(D)}?${new URLSearchParams(T).toString()}`;let b;if(B)b=await fetch(w,{headers:{...B}});else b=await fetch(w);return b.json()}}})}}),K=async({args:A={},prop:B,method:G,url:C,fetchRequestInit:j})=>{if(!j?.method||j?.method==="GET"){for(let T in A){if(typeof A[T]==="object")A[T]=JSON.stringify(A[T],(w,b)=>typeof b==="bigint"?b.toString():b);if(A[T]==null)delete A[T]}const z=`${C}/${String(B)}/${String(G)}?${new URLSearchParams(A).toString()}`;return(await fetch(z,{...j})).json()}if(j?.method==="POST"){const z=`${C}/${String(B)}/${String(G)}`;return(await fetch(z,{...j,body:JSON.stringify(A)})).json()}},N=({url:A="http://localhost:9527",fetchRequestInit:B})=>new Proxy({},{get(G,C,j){return new Proxy({},{get(z,D){return async(T)=>{return K({args:T,prop:C,method:D,url:A,fetchRequestInit:B})}}})}}),Q=({url:A="http://localhost:9527",fetchRequestInit:B})=>new Proxy({},{get(G,C,j){return new Proxy({},{get(z,D){return async(T)=>{return K({args:T,prop:C,method:D,url:A,fetchRequestInit:B})}}})}}),S=({url:A="http://localhost:9527",fetchRequestInit:B})=>new Proxy({},{get(G,C,j){return new Proxy({},{get(z,D){return async(T)=>{const w=`${A}/${String(C)}/${String(D)}?${new URLSearchParams(T).toString()}`;return(await fetch(w,{method:"GET",...B})).json()}}})}}),U=({url:A="http://localhost:9527",ctx:B}={})=>new Proxy({},{get(G,C,j){return new Proxy({},{get(z,D){return async(T)=>{let w=!1;for(let H in T){if(typeof T[H]==="object")w=!0;if(T[H]==null)delete T[H]}let b,E,J={};if(w)b=`${A}/${String(C)}/${String(D)}`;else b=`${A}/${String(C)}/${String(D)}?${new URLSearchParams(T).toString()}`;if(B)J.headers={...B};if(w)J.method="POST",J.body=JSON.stringify(T);return E=await fetch(b,J),E.json()}}})}});export{S as createIotexscanClient,U as createIoidClient,Q as createClientWithIoPayServer,N as createClientWithDBServer,L as createClient};
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};
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.33",
5
+ "version": "v0.1.35",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {