@iotexproject/kit 0.1.32 → 0.1.34
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 +17 -3
- 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(): 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}`>;
|
|
@@ -4146,7 +4148,6 @@ declare class IoID {
|
|
|
4146
4148
|
projectAppliedAmount: true;
|
|
4147
4149
|
projectName: true;
|
|
4148
4150
|
projectType: true;
|
|
4149
|
-
projectMetadata: true;
|
|
4150
4151
|
deviceNFT: true;
|
|
4151
4152
|
projectDeviceAllowance: true;
|
|
4152
4153
|
verifier: true;
|
|
@@ -4242,6 +4243,19 @@ declare class IoID {
|
|
|
4242
4243
|
}, ctx?: ConfigContext): Promise<IoIDDevice[] | {
|
|
4243
4244
|
error: unknown;
|
|
4244
4245
|
}>;
|
|
4246
|
+
get_project_metadata(args: {
|
|
4247
|
+
address: `0x${string}`;
|
|
4248
|
+
keys: string[];
|
|
4249
|
+
projectId: string;
|
|
4250
|
+
}, ctx?: ConfigContext): Promise<{
|
|
4251
|
+
address: `0x${string}`;
|
|
4252
|
+
data: Record<string, any>;
|
|
4253
|
+
error?: undefined;
|
|
4254
|
+
} | {
|
|
4255
|
+
error: unknown;
|
|
4256
|
+
address?: undefined;
|
|
4257
|
+
data?: undefined;
|
|
4258
|
+
}>;
|
|
4245
4259
|
}
|
|
4246
4260
|
declare class VoterEntity {
|
|
4247
4261
|
address: `0x${string}`;
|
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};
|