@iotexproject/kit 0.1.7 → 0.1.10

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
@@ -4230,37 +4230,6 @@ declare class IoID {
4230
4230
  }, ctx?: ConfigContext): Promise<IoIDDevice[] | {
4231
4231
  error: unknown;
4232
4232
  }>;
4233
- register(args: {
4234
- verifyingProxyAddress: `0x${string}`;
4235
- verifySignature: string;
4236
- didhash: string;
4237
- didurl: string;
4238
- owner: `0x${string}`;
4239
- device: `0x${string}`;
4240
- v: string;
4241
- r: string;
4242
- s: string;
4243
- }, ctx?: ConfigContext): Promise<{
4244
- address: `0x${string}`;
4245
- data: any;
4246
- chainId: string;
4247
- error?: undefined;
4248
- } | {
4249
- error: unknown;
4250
- address?: undefined;
4251
- data?: undefined;
4252
- chainId?: undefined;
4253
- }>;
4254
- did_hex(args: {
4255
- did: `0x${string}`;
4256
- owner: `0x${string}`;
4257
- }, ctx?: ConfigContext): Promise<{
4258
- hex: string;
4259
- error?: undefined;
4260
- } | {
4261
- error: unknown;
4262
- hex?: undefined;
4263
- }>;
4264
4233
  }
4265
4234
  declare class VoterEntity {
4266
4235
  address: `0x${string}`;
@@ -8644,5 +8613,9 @@ export declare const createIotexscanClient: ({ url, fetchRequestInit }: {
8644
8613
  url?: string;
8645
8614
  fetchRequestInit?: FetchRequestInit;
8646
8615
  }) => IotexscanAdapterType<IotexscanModulesType>;
8616
+ export declare const createIoidClient: ({ url, ctx }?: {
8617
+ url?: string;
8618
+ ctx?: ConfigContext;
8619
+ }) => ModuleType;
8647
8620
 
8648
8621
  export {};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var N=({url:B="http://localhost:9527",ctx:C}={})=>new Proxy({},{get(H,F,L){return new Proxy({},{get(J,b){return async(j)=>{for(let G in j){if(typeof j[G]==="object")j[G]=JSON.stringify(j[G],(K,M)=>typeof M==="bigint"?M.toString():M);if(j[G]==null)delete j[G]}const D=`${B}/${String(F)}/${String(b)}?${new URLSearchParams(j).toString()}`;let z;if(C)z=await fetch(D,{headers:{...C}});else z=await fetch(D);return z.json()}}})}}),O=({url:B="http://localhost:9527"}={})=>new Proxy({},{get(C,H,F){return new Proxy({},{get(L,J){return async(b)=>{for(let z in b){if(typeof b[z]==="object")b[z]=JSON.stringify(b[z],(G,K)=>typeof K==="bigint"?K.toString():K);if(b[z]==null)delete b[z]}const j=`${B}/${String(H)}/${String(J)}?${new URLSearchParams(b).toString()}`;return(await fetch(j)).json()}}})}}),P=({url:B="http://localhost:9527",fetchRequestInit:C})=>new Proxy({},{get(H,F,L){return new Proxy({},{get(J,b){return async(j)=>{const D=`${B}/${String(F)}/${String(b)}`;return(await fetch(D,{method:"POST",...C,body:JSON.stringify(j)})).json()}}})}}),Q=({url:B="http://localhost:9527",fetchRequestInit:C})=>new Proxy({},{get(H,F,L){return new Proxy({},{get(J,b){return async(j)=>{const D=`${B}/${String(F)}/${String(b)}?${new URLSearchParams(j).toString()}`;return(await fetch(D,{method:"GET",...C})).json()}}})}});export{Q as createIotexscanClient,P as createClientWithWriteDBServer,O as createClientWithDBServer,N as createClient};
1
+ var N=({url:F="http://localhost:9527",ctx:C}={})=>new Proxy({},{get(J,G,M){return new Proxy({},{get(K,j){return async(b)=>{for(let B in b){if(typeof b[B]==="object")b[B]=JSON.stringify(b[B],(L,H)=>typeof H==="bigint"?H.toString():H);if(b[B]==null)delete b[B]}const D=`${F}/${String(G)}/${String(j)}?${new URLSearchParams(b).toString()}`;let z;if(C)z=await fetch(D,{headers:{...C}});else z=await fetch(D);return z.json()}}})}}),O=({url:F="http://localhost:9527"}={})=>new Proxy({},{get(C,J,G){return new Proxy({},{get(M,K){return async(j)=>{for(let z in j){if(typeof j[z]==="object")j[z]=JSON.stringify(j[z],(B,L)=>typeof L==="bigint"?L.toString():L);if(j[z]==null)delete j[z]}const b=`${F}/${String(J)}/${String(K)}?${new URLSearchParams(j).toString()}`;return(await fetch(b)).json()}}})}}),P=({url:F="http://localhost:9527",fetchRequestInit:C})=>new Proxy({},{get(J,G,M){return new Proxy({},{get(K,j){return async(b)=>{const D=`${F}/${String(G)}/${String(j)}`;return(await fetch(D,{method:"POST",...C,body:JSON.stringify(b)})).json()}}})}}),Q=({url:F="http://localhost:9527",fetchRequestInit:C})=>new Proxy({},{get(J,G,M){return new Proxy({},{get(K,j){return async(b)=>{const D=`${F}/${String(G)}/${String(j)}?${new URLSearchParams(b).toString()}`;return(await fetch(D,{method:"GET",...C})).json()}}})}}),S=({url:F="http://localhost:9527",ctx:C}={})=>new Proxy({},{get(J,G,M){return new Proxy({},{get(K,j){return async(b)=>{for(let B in b){if(typeof b[B]==="object")b[B]=JSON.stringify(b[B],(L,H)=>typeof H==="bigint"?H.toString():H);if(b[B]==null)delete b[B]}const D=`${F}/${String(G)}/${String(j)}?${new URLSearchParams(b).toString()}`;let z;if(C)z=await fetch(D,{headers:{...C}});else z=await fetch(D);return z.json()}}})}});export{Q as createIotexscanClient,S as createIoidClient,P as createClientWithWriteDBServer,O as createClientWithDBServer,N as createClient};
package/package.json CHANGED
@@ -2,13 +2,14 @@
2
2
  "name": "@iotexproject/kit",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "v0.1.7",
5
+ "version": "v0.1.10",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "dev": "bun run build && bun run --watch server-kit.ts",
10
10
  "dev-db": "bun server-db.ts",
11
11
  "dev-iotexscan": "bun server-iotexscan.ts",
12
+ "dev-ioid": "bun run build && bun run --watch server-ioid.ts",
12
13
  "test": "bun --hot run tests/test-marshalldao.ts",
13
14
  "build": "bun run build.mjs",
14
15
  "prepublishOnly": "bun run build",
@@ -31,7 +32,7 @@
31
32
  "crypto-js": "^4.2.0",
32
33
  "dataloader": "^2.2.2",
33
34
  "dayjs": "^1.11.12",
34
- "ethers": "5.7.2",
35
+ "ethers": "^6.13.2",
35
36
  "graphql-request": "^7.1.0",
36
37
  "ioredis": "^5.4.1",
37
38
  "lru-cache": "^11.0.0",