@iotexproject/kit 0.1.29 → 0.1.30
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 +98 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4133,6 +4133,7 @@ declare class VerifyingProxyEntity {
|
|
|
4133
4133
|
export type ConfigContext = {
|
|
4134
4134
|
chainId: string;
|
|
4135
4135
|
appName: string;
|
|
4136
|
+
authData?: Record<string, any>;
|
|
4136
4137
|
};
|
|
4137
4138
|
declare class IoID {
|
|
4138
4139
|
verfiyerProxyList(args: {
|
|
@@ -4222,11 +4223,12 @@ declare class IoID {
|
|
|
4222
4223
|
chainId?: undefined;
|
|
4223
4224
|
}>;
|
|
4224
4225
|
setProjectMetadata(args: {
|
|
4226
|
+
key: string;
|
|
4225
4227
|
address: `0x${string}`;
|
|
4226
4228
|
metadata: ProjectMetadata;
|
|
4227
4229
|
}, ctx?: ConfigContext): Promise<{
|
|
4228
4230
|
address: `0x${string}`;
|
|
4229
|
-
data:
|
|
4231
|
+
data: any;
|
|
4230
4232
|
chainId: string;
|
|
4231
4233
|
error?: undefined;
|
|
4232
4234
|
} | {
|
|
@@ -8879,29 +8881,74 @@ declare class Analysis extends BaseDBModule {
|
|
|
8879
8881
|
api_key: string;
|
|
8880
8882
|
};
|
|
8881
8883
|
}>;
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
+
upload_event({ user_id, event_type, event_id, event }: {
|
|
8885
|
+
event_type: string;
|
|
8886
|
+
user_id: string;
|
|
8887
|
+
event_id: string;
|
|
8888
|
+
event: Record<string, any>;
|
|
8889
|
+
}, ctx?: {
|
|
8890
|
+
authData?: {
|
|
8891
|
+
app_id: string;
|
|
8892
|
+
api_key: string;
|
|
8893
|
+
};
|
|
8894
|
+
}): Promise<{
|
|
8895
|
+
ok: boolean;
|
|
8896
|
+
msg: any;
|
|
8897
|
+
}>;
|
|
8898
|
+
generate_referral_code({ refer_id, }: {
|
|
8884
8899
|
refer_id: string;
|
|
8900
|
+
}, ctx?: {
|
|
8901
|
+
authData?: {
|
|
8902
|
+
app_id: string;
|
|
8903
|
+
api_key: string;
|
|
8904
|
+
};
|
|
8905
|
+
}): Promise<{
|
|
8906
|
+
ok: boolean;
|
|
8907
|
+
referral_code: any;
|
|
8908
|
+
msg: string;
|
|
8909
|
+
} | {
|
|
8910
|
+
ok: boolean;
|
|
8911
|
+
msg: any;
|
|
8912
|
+
referral_code?: undefined;
|
|
8913
|
+
}>;
|
|
8914
|
+
fetch_referral_code({ user_id, }: {
|
|
8885
8915
|
user_id: string;
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8916
|
+
}, ctx?: {
|
|
8917
|
+
authData?: {
|
|
8918
|
+
app_id: string;
|
|
8919
|
+
api_key: string;
|
|
8920
|
+
};
|
|
8890
8921
|
}): Promise<{
|
|
8922
|
+
ok: boolean;
|
|
8923
|
+
referral_code: any;
|
|
8924
|
+
msg?: undefined;
|
|
8925
|
+
} | {
|
|
8891
8926
|
ok: boolean;
|
|
8892
8927
|
msg: any;
|
|
8928
|
+
referral_code?: undefined;
|
|
8893
8929
|
}>;
|
|
8894
|
-
|
|
8895
|
-
|
|
8930
|
+
create_refer({ refer_id, user_id, device_id, data, }: {
|
|
8931
|
+
refer_id: string;
|
|
8896
8932
|
user_id: string;
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8933
|
+
device_id: string;
|
|
8934
|
+
data?: Record<string, any>;
|
|
8935
|
+
}, ctx?: {
|
|
8936
|
+
authData?: {
|
|
8937
|
+
app_id: string;
|
|
8938
|
+
api_key: string;
|
|
8939
|
+
};
|
|
8901
8940
|
}): Promise<{
|
|
8902
8941
|
ok: boolean;
|
|
8903
8942
|
msg: any;
|
|
8904
8943
|
}>;
|
|
8944
|
+
fetch_event({ event_id, }: {
|
|
8945
|
+
event_id: string;
|
|
8946
|
+
}, ctx?: {
|
|
8947
|
+
authData?: {
|
|
8948
|
+
app_id: string;
|
|
8949
|
+
api_key: string;
|
|
8950
|
+
};
|
|
8951
|
+
}): Promise<Record<string, any>>;
|
|
8905
8952
|
}
|
|
8906
8953
|
declare class Analyzer extends BaseDBModule {
|
|
8907
8954
|
tvl(): Promise<any>;
|
|
@@ -9074,7 +9121,7 @@ declare class Staking$1 extends BaseDBModule {
|
|
|
9074
9121
|
data?: undefined;
|
|
9075
9122
|
}>;
|
|
9076
9123
|
}
|
|
9077
|
-
export type ComponentType = "banner-latest" | "
|
|
9124
|
+
export type ComponentType = "banner-latest" | "token-2049";
|
|
9078
9125
|
export interface ComponentData {
|
|
9079
9126
|
id: ComponentType;
|
|
9080
9127
|
html: string;
|
|
@@ -9103,6 +9150,7 @@ declare const modules$1: {
|
|
|
9103
9150
|
export type DBModuleType = typeof modules$1;
|
|
9104
9151
|
export interface ConfigOptions {
|
|
9105
9152
|
ttl: number;
|
|
9153
|
+
checkAuth?: boolean;
|
|
9106
9154
|
}
|
|
9107
9155
|
export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
|
|
9108
9156
|
input?: I;
|
|
@@ -10148,17 +10196,44 @@ declare class Point {
|
|
|
10148
10196
|
sub: string | undefined;
|
|
10149
10197
|
};
|
|
10150
10198
|
}>;
|
|
10151
|
-
upload_event({
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10199
|
+
upload_event({ action_id, }: {
|
|
10200
|
+
action_id: number;
|
|
10201
|
+
device_id?: string;
|
|
10202
|
+
refer_id?: string;
|
|
10203
|
+
}, ctx?: {
|
|
10204
|
+
authData?: {
|
|
10205
|
+
sub: string;
|
|
10206
|
+
};
|
|
10155
10207
|
}): Promise<any>;
|
|
10156
|
-
|
|
10157
|
-
|
|
10208
|
+
generate_referral_code(args?: any, ctx?: {
|
|
10209
|
+
authData?: {
|
|
10210
|
+
sub: string;
|
|
10211
|
+
};
|
|
10212
|
+
}): Promise<any>;
|
|
10213
|
+
fetch_referral_code(args?: any, ctx?: {
|
|
10214
|
+
authData?: {
|
|
10215
|
+
sub: string;
|
|
10216
|
+
};
|
|
10217
|
+
}): Promise<any>;
|
|
10218
|
+
create_refer({ referral_code, device_id, }: {
|
|
10219
|
+
referral_code: string;
|
|
10158
10220
|
device_id: string;
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10221
|
+
}, ctx?: {
|
|
10222
|
+
authData?: {
|
|
10223
|
+
sub: string;
|
|
10224
|
+
};
|
|
10225
|
+
}): Promise<any>;
|
|
10226
|
+
fetch_event({ event_id }: {
|
|
10227
|
+
event_id: string;
|
|
10228
|
+
}, ctx?: {
|
|
10229
|
+
authData?: {
|
|
10230
|
+
sub: string;
|
|
10231
|
+
};
|
|
10232
|
+
}): Promise<any>;
|
|
10233
|
+
my_point_tasks(args?: any, ctx?: {
|
|
10234
|
+
authData?: {
|
|
10235
|
+
sub: string;
|
|
10236
|
+
};
|
|
10162
10237
|
}): Promise<any>;
|
|
10163
10238
|
}
|
|
10164
10239
|
declare const modules$4: {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
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};
|