@iotexproject/kit 0.1.15 → 0.1.17

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
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};
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};
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.15",
5
+ "version": "v0.1.17",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {