@iotexproject/kit 0.1.10 → 0.1.11
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 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -8590,6 +8590,51 @@ declare const modules$2: {
|
|
|
8590
8590
|
};
|
|
8591
8591
|
};
|
|
8592
8592
|
export type IotexscanModulesType = typeof modules$2;
|
|
8593
|
+
declare class Ioid {
|
|
8594
|
+
register(args: {
|
|
8595
|
+
projectName: string;
|
|
8596
|
+
deviceSignature: `0x${string}`;
|
|
8597
|
+
did: string;
|
|
8598
|
+
didurl: string;
|
|
8599
|
+
owner: `0x${string}`;
|
|
8600
|
+
device: `0x${string}`;
|
|
8601
|
+
v: string;
|
|
8602
|
+
r: string;
|
|
8603
|
+
s: string;
|
|
8604
|
+
}, ctx?: ConfigContext): Promise<{
|
|
8605
|
+
error: any;
|
|
8606
|
+
ok?: undefined;
|
|
8607
|
+
hash?: undefined;
|
|
8608
|
+
} | {
|
|
8609
|
+
ok: boolean;
|
|
8610
|
+
hash: `0x${string}`;
|
|
8611
|
+
error?: undefined;
|
|
8612
|
+
}>;
|
|
8613
|
+
verifier(args: {
|
|
8614
|
+
owner: string;
|
|
8615
|
+
device: string;
|
|
8616
|
+
}, ctx?: ConfigContext): Promise<{
|
|
8617
|
+
verifySignature: string;
|
|
8618
|
+
error?: undefined;
|
|
8619
|
+
} | {
|
|
8620
|
+
error: any;
|
|
8621
|
+
verifySignature?: undefined;
|
|
8622
|
+
}>;
|
|
8623
|
+
did_hex(args: {
|
|
8624
|
+
did: `0x${string}`;
|
|
8625
|
+
owner: `0x${string}`;
|
|
8626
|
+
}, ctx?: ConfigContext): Promise<{
|
|
8627
|
+
hex: string;
|
|
8628
|
+
error?: undefined;
|
|
8629
|
+
} | {
|
|
8630
|
+
error: unknown;
|
|
8631
|
+
hex?: undefined;
|
|
8632
|
+
}>;
|
|
8633
|
+
}
|
|
8634
|
+
declare const modules$3: {
|
|
8635
|
+
ioid: Ioid;
|
|
8636
|
+
};
|
|
8637
|
+
export type IoIDModuleType = typeof modules$3;
|
|
8593
8638
|
export type IotexscanAdapterType<T extends Record<string, Record<string, any>>> = {
|
|
8594
8639
|
[key in keyof T]: {
|
|
8595
8640
|
[key1 in keyof T[key]]: (arg: Parameters<T[key][key1]>[0] & {
|
|
@@ -8616,6 +8661,6 @@ export declare const createIotexscanClient: ({ url, fetchRequestInit }: {
|
|
|
8616
8661
|
export declare const createIoidClient: ({ url, ctx }?: {
|
|
8617
8662
|
url?: string;
|
|
8618
8663
|
ctx?: ConfigContext;
|
|
8619
|
-
}) =>
|
|
8664
|
+
}) => IoIDModuleType;
|
|
8620
8665
|
|
|
8621
8666
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var F=({url:w="http://localhost:9527",ctx:b}={})=>new Proxy({},{get(B,z,E){return new Proxy({},{get(C,$){return async(T)=>{for(let O in T){if(typeof T[O]==="object")T[O]=JSON.stringify(T[O],(D,A)=>typeof A==="bigint"?A.toString():A);if(T[O]==null)delete T[O]}const j=`${w}/${String(z)}/${String($)}?${new URLSearchParams(T).toString()}`;let N;if(b)N=await fetch(j,{headers:{...b}});else N=await fetch(j);return N.json()}}})}}),G=({url:w="http://localhost:9527"}={})=>new Proxy({},{get(b,B,z){return new Proxy({},{get(E,C){return async($)=>{for(let N in $){if(typeof $[N]==="object")$[N]=JSON.stringify($[N],(O,D)=>typeof D==="bigint"?D.toString():D);if($[N]==null)delete $[N]}const T=`${w}/${String(B)}/${String(C)}?${new URLSearchParams($).toString()}`;return(await fetch(T)).json()}}})}}),H=({url:w="http://localhost:9527",fetchRequestInit:b})=>new Proxy({},{get(B,z,E){return new Proxy({},{get(C,$){return async(T)=>{const j=`${w}/${String(z)}/${String($)}`;return(await fetch(j,{method:"POST",...b,body:JSON.stringify(T)})).json()}}})}}),J=({url:w="http://localhost:9527",fetchRequestInit:b})=>new Proxy({},{get(B,z,E){return new Proxy({},{get(C,$){return async(T)=>{const j=`${w}/${String(z)}/${String($)}?${new URLSearchParams(T).toString()}`;return(await fetch(j,{method:"GET",...b})).json()}}})}}),K=({url:w="http://localhost:9527",ctx:b}={})=>new Proxy({},{get(B,z,E){return new Proxy({},{get(C,$){return async(T)=>{for(let O in T){if(typeof T[O]==="object")T[O]=JSON.stringify(T[O],(D,A)=>typeof A==="bigint"?A.toString():A);if(T[O]==null)delete T[O]}const j=`${w}/${String(z)}/${String($)}?${new URLSearchParams(T).toString()}`;let N;if(b)N=await fetch(j,{headers:{...b}});else N=await fetch(j);return N.json()}}})}});export{J as createIotexscanClient,K as createIoidClient,H as createClientWithWriteDBServer,G as createClientWithDBServer,F 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.
|
|
5
|
+
"version": "v0.1.11",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@grpc/grpc-js": "^1.11.1",
|
|
24
24
|
"@grpc/proto-loader": "^0.7.13",
|
|
25
25
|
"@iotexproject/iotex-address-ts": "^1.0.4",
|
|
26
|
+
"@noble/curves": "^1.6.0",
|
|
26
27
|
"@tryghost/content-api": "^1.11.21",
|
|
27
28
|
"axios": "^1.7.2",
|
|
28
29
|
"bech32": "^2.0.0",
|