@iotexproject/kit 0.1.17 → 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 +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8605,9 +8605,11 @@ declare class Ioid {
|
|
|
8605
8605
|
error: any;
|
|
8606
8606
|
ok?: undefined;
|
|
8607
8607
|
hash?: undefined;
|
|
8608
|
+
cid?: undefined;
|
|
8608
8609
|
} | {
|
|
8609
8610
|
ok: boolean;
|
|
8610
8611
|
hash: `0x${string}`;
|
|
8612
|
+
cid: string;
|
|
8611
8613
|
error?: undefined;
|
|
8612
8614
|
}>;
|
|
8613
8615
|
verifier(args: {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
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};
|