@iotexproject/kit 0.0.93 → 0.0.94
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 +28 -21
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2535,6 +2535,33 @@ declare class LPTokenEntity {
|
|
|
2535
2535
|
transfer: (to: `0x${string}`, value: string) => Promise<any>;
|
|
2536
2536
|
transferFrom: (from: `0x${string}`, to: `0x${string}`, value: string) => Promise<any>;
|
|
2537
2537
|
}
|
|
2538
|
+
export interface IoIDDevice {
|
|
2539
|
+
deviceId: string;
|
|
2540
|
+
owner: string;
|
|
2541
|
+
project: {
|
|
2542
|
+
name: string;
|
|
2543
|
+
metadata: {
|
|
2544
|
+
value: string;
|
|
2545
|
+
}[];
|
|
2546
|
+
};
|
|
2547
|
+
did: string;
|
|
2548
|
+
tokenId: string;
|
|
2549
|
+
wallet: string;
|
|
2550
|
+
walletBalance: {
|
|
2551
|
+
value: string;
|
|
2552
|
+
format: string;
|
|
2553
|
+
originFormat: string;
|
|
2554
|
+
decimals: string;
|
|
2555
|
+
isZero: boolean;
|
|
2556
|
+
};
|
|
2557
|
+
metadata: {
|
|
2558
|
+
logo: string;
|
|
2559
|
+
twitter?: string;
|
|
2560
|
+
website?: string;
|
|
2561
|
+
desc?: string;
|
|
2562
|
+
github?: string;
|
|
2563
|
+
} | null;
|
|
2564
|
+
}
|
|
2538
2565
|
export type ProjectMetadata = {
|
|
2539
2566
|
logo: string;
|
|
2540
2567
|
twitter?: string;
|
|
@@ -4184,27 +4211,7 @@ declare class IoID {
|
|
|
4184
4211
|
}>;
|
|
4185
4212
|
registedDevices(args: {
|
|
4186
4213
|
address: `0x${string}`;
|
|
4187
|
-
}): Promise<{
|
|
4188
|
-
metadata: any;
|
|
4189
|
-
deviceId: string;
|
|
4190
|
-
owner: string;
|
|
4191
|
-
project: {
|
|
4192
|
-
name: string;
|
|
4193
|
-
metadata: {
|
|
4194
|
-
value: string;
|
|
4195
|
-
}[];
|
|
4196
|
-
};
|
|
4197
|
-
did: string;
|
|
4198
|
-
tokenId: string;
|
|
4199
|
-
wallet: string;
|
|
4200
|
-
walletBalance: {
|
|
4201
|
-
value: string;
|
|
4202
|
-
format: string;
|
|
4203
|
-
originFormat: string;
|
|
4204
|
-
decimals: string;
|
|
4205
|
-
isZero: boolean;
|
|
4206
|
-
};
|
|
4207
|
-
}[] | {
|
|
4214
|
+
}): Promise<IoIDDevice[] | {
|
|
4208
4215
|
error: unknown;
|
|
4209
4216
|
}>;
|
|
4210
4217
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C=({url:$="http://localhost:9527"}={})=>new Proxy({},{get(j,c,w){return new Proxy({},{get(A,f){return async(x)=>{for(let T in x){if(typeof x[T]==="object")x[T]=JSON.stringify(x[T],(B,W)=>typeof W==="bigint"?W.toString():W);if(x[T]==null)delete x[T]}const b=`${$}/${String(c)}/${String(f)}?${new URLSearchParams(x).toString()}`;return(await fetch(b)).json()}}})}}),D=({url:$="http://localhost:9527"}={})=>new Proxy({},{get(j,c,w){return new Proxy({},{get(A,f){return async(x)=>{for(let T in x){if(typeof x[T]==="object")x[T]=JSON.stringify(x[T],(B,W)=>typeof W==="bigint"?W.toString():W);if(x[T]==null)delete x[T]}const b=`${$}/${String(c)}/${String(f)}?${new URLSearchParams(x).toString()}`;return(await fetch(b)).json()}}})}}),E=({url:$="http://localhost:9527",fetchRequestInit:j})=>new Proxy({},{get(c,w,A){return new Proxy({},{get(f,x){return async(b)=>{const z=`${$}/${String(w)}/${String(x)}`;return(await fetch(z,{method:"POST",...j,body:JSON.stringify(b)})).json()}}})}});export{E as createClientWithWriteDBServer,D as createClientWithDBServer,C as createClient};
|