@iotexproject/kit 0.1.16 → 0.1.18

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
@@ -8591,9 +8591,6 @@ declare const modules$2: {
8591
8591
  };
8592
8592
  export type IotexscanModulesType = typeof modules$2;
8593
8593
  declare class Ioid {
8594
- test(args: {
8595
- jsonParams: any;
8596
- }, ctx?: ConfigContext): Promise<any>;
8597
8594
  register(args: {
8598
8595
  projectName: string;
8599
8596
  deviceSignature: `0x${string}`;
@@ -8608,9 +8605,11 @@ declare class Ioid {
8608
8605
  error: any;
8609
8606
  ok?: undefined;
8610
8607
  hash?: undefined;
8608
+ cid?: undefined;
8611
8609
  } | {
8612
8610
  ok: boolean;
8613
8611
  hash: `0x${string}`;
8612
+ cid: string;
8614
8613
  error?: undefined;
8615
8614
  }>;
8616
8615
  verifier(args: {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var Q=({url:C="http://localhost:9527",ctx:D}={})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{for(let G in b){if(typeof b[G]==="object")b[G]=JSON.stringify(b[G],(H,J)=>typeof J==="bigint"?J.toString():J);if(b[G]==null)delete b[G]}const B=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;let z;if(D)z=await fetch(B,{headers:{...D}});else z=await fetch(B);return z.json()}}})}}),S=({url:C="http://localhost:9527"}={})=>new Proxy({},{get(D,K,F){return new Proxy({},{get(N,L){return async(j)=>{for(let z in j){if(typeof j[z]==="object")j[z]=JSON.stringify(j[z],(G,H)=>typeof H==="bigint"?H.toString():H);if(j[z]==null)delete j[z]}const b=`${C}/${String(K)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(b)).json()}}})}}),U=({url:C="http://localhost:9527",fetchRequestInit:D})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{const B=`${C}/${String(F)}/${String(j)}`;return(await fetch(B,{method:"POST",...D,body:JSON.stringify(b)})).json()}}})}}),V=({url:C="http://localhost:9527",fetchRequestInit:D})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{const B=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;return(await fetch(B,{method:"GET",...D})).json()}}})}}),W=({url:C="http://localhost:9527",ctx:D}={})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{let B=!1;for(let J in b){if(typeof b[J]==="object")B=!0;if(b[J]==null)delete b[J]}let z,G,H={};if(B)z=`${C}/${String(F)}/${String(j)}`;else z=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;if(D)H.headers={...D};if(B)H.method="POST",H.body=JSON.stringify(b);return G=await fetch(z,H),G.json()}}})}});export{V as createIotexscanClient,W as createIoidClient,U as createClientWithWriteDBServer,S as createClientWithDBServer,Q as createClient};
1
+ var G=({url:b="http://localhost:9527",ctx:j}={})=>new Proxy({},{get(C,w,F){return new Proxy({},{get(E,D){return async(T)=>{for(let z in T){if(typeof T[z]==="object")T[z]=JSON.stringify(T[z],(A,B)=>typeof B==="bigint"?B.toString():B);if(T[z]==null)delete T[z]}const $=`${b}/${String(w)}/${String(D)}?${new URLSearchParams(T).toString()}`;let N;if(j)N=await fetch($,{headers:{...j}});else N=await fetch($);return N.json()}}})}}),H=({url:b="http://localhost:9527"}={})=>new Proxy({},{get(j,C,w){return new Proxy({},{get(F,E){return async(D)=>{for(let N in D){if(typeof D[N]==="object")D[N]=JSON.stringify(D[N],(z,A)=>typeof A==="bigint"?A.toString():A);if(D[N]==null)delete D[N]}const T=`${b}/${String(C)}/${String(E)}?${new URLSearchParams(D).toString()}`;return(await fetch(T)).json()}}})}}),J=({url:b="http://localhost:9527",fetchRequestInit:j})=>new Proxy({},{get(C,w,F){return new Proxy({},{get(E,D){return async(T)=>{const $=`${b}/${String(w)}/${String(D)}`;return(await fetch($,{method:"POST",...j,body:JSON.stringify(T)})).json()}}})}}),K=({url:b="http://localhost:9527",fetchRequestInit:j})=>new Proxy({},{get(C,w,F){return new Proxy({},{get(E,D){return async(T)=>{const $=`${b}/${String(w)}/${String(D)}?${new URLSearchParams(T).toString()}`;return(await fetch($,{method:"GET",...j})).json()}}})}}),L=({url:b="http://localhost:9527",ctx:j}={})=>new Proxy({},{get(C,w,F){return new Proxy({},{get(E,D){return async(T)=>{let $=!1;for(let B in T){if(typeof T[B]==="object")$=!0;if(T[B]==null)delete T[B]}let N,z,A={};if($)N=`${b}/${String(w)}/${String(D)}`;else N=`${b}/${String(w)}/${String(D)}?${new URLSearchParams(T).toString()}`;if(j)A.headers={...j};if($)A.method="POST",A.body=JSON.stringify(T);return z=await fetch(N,A),z.json()}}})}});export{K as createIotexscanClient,L as createIoidClient,J as createClientWithWriteDBServer,H as createClientWithDBServer,G 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.16",
5
+ "version": "v0.1.18",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {