@ayanworks/credo-polygon-w3c-module 0.0.2-alpha.2 → 0.0.2-alpha.4

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.
@@ -12,35 +12,22 @@ export declare class PolygonApi {
12
12
  }): Promise<{
13
13
  did: string;
14
14
  schemaId: string;
15
- txnReceipt: {
16
- schemaTxnReceipt: {
17
- txnHash: any;
18
- to: any;
19
- from: any;
20
- nonce: any;
21
- gasLimit: any;
22
- chainId: any;
23
- };
24
- resourceTxnReceipt: {
25
- txnHash: any;
26
- to: any;
27
- from: any;
28
- nonce: any;
29
- gasLimit: any;
30
- chainId: any;
31
- };
32
- };
15
+ schemaTxnHash: any;
16
+ resourceTxnHash: any;
33
17
  tnxSchemaId?: undefined;
18
+ schemaTxhash?: undefined;
34
19
  schemaState?: undefined;
35
20
  } | {
36
21
  tnxSchemaId: string;
22
+ schemaTxhash: string;
37
23
  schemaState: {
38
24
  state: string;
39
25
  reason: string;
40
26
  };
41
27
  did?: undefined;
42
28
  schemaId?: undefined;
43
- txnReceipt?: undefined;
29
+ schemaTxnHash?: undefined;
30
+ resourceTxnHash?: undefined;
44
31
  }>;
45
32
  getSchemaById(did: string, schemaId: string): Promise<any>;
46
33
  estimateFeeForDidOperation(options: DidOperationOptions): Promise<import("@ayanworks/polygon-did-registrar/build/registrar").EstimatedTxDetails | null | undefined>;
@@ -1,9 +1,10 @@
1
- import { type AgentContext, type DidResolutionResult, type DidResolver } from '@credo-ts/core';
1
+ import type { DidResolutionOptions, AgentContext, DidResolutionResult, DidResolver } from '@credo-ts/core';
2
+ import type { ParsedDID } from 'did-resolver';
2
3
  import { Resolver } from 'did-resolver';
3
4
  export declare class PolygonDidResolver implements DidResolver {
4
5
  readonly allowsCaching = true;
5
6
  readonly supportedMethods: string[];
6
7
  resolver: Resolver;
7
8
  constructor();
8
- resolve(agentContext: AgentContext, did: string): Promise<DidResolutionResult>;
9
+ resolve(agentContext: AgentContext, did: string, parsed: ParsedDID, didResolutionOptions: DidResolutionOptions): Promise<DidResolutionResult>;
9
10
  }
@@ -11,7 +11,11 @@ class PolygonDidResolver {
11
11
  this.supportedMethods = ['polygon'];
12
12
  this.resolver = new did_resolver_1.Resolver((0, polygon_did_resolver_1.getResolver)());
13
13
  }
14
- async resolve(agentContext, did) {
14
+ async resolve(agentContext, did,
15
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
+ parsed,
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
+ didResolutionOptions) {
15
19
  const didDocumentMetadata = {};
16
20
  if (!(0, didPolygonUtil_1.isValidPolygonDid)(did)) {
17
21
  throw new Error('Invalid DID');
@@ -1 +1 @@
1
- {"version":3,"file":"PolygonDidResolver.js","sourceRoot":"","sources":["../../src/dids/PolygonDidResolver.ts"],"names":[],"mappings":";;;AAEA,0EAA6D;AAC7D,yCAMuB;AACvB,+CAAuC;AAEvC,qDAAoD;AAEpD,MAAa,kBAAkB;IAO7B;QANgB,kBAAa,GAAG,IAAI,CAAA;QAEpB,qBAAgB,GAAG,CAAC,SAAS,CAAC,CAAA;QAK5C,IAAI,CAAC,QAAQ,GAAG,IAAI,uBAAQ,CAAC,IAAA,kCAAW,GAAsB,CAAC,CAAA;IACjE,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,YAA0B,EAAE,GAAW;QAC1D,MAAM,mBAAmB,GAAG,EAAE,CAAA;QAE9B,IAAI,CAAC,IAAA,kCAAiB,EAAC,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;SAC/B;QACD,IAAI;YACF,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YAEpG,OAAO;gBACL,WAAW,EAAE,sBAAe,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAW,CAAC;gBAC/D,mBAAmB;gB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AAE;oBACrB,KAAK,EAAE,UAAU;oBACjB,OAAO,EAAE,0CAA0C,GAAG,MAAM,KAAK,EAAE;iBACpE;aACF,CAAA;SACF;IACH,CAAC;CACF;AA1CD,gDA0CC"}
@@ -58,35 +58,22 @@ export declare class PolygonLedgerService {
58
58
  }): Promise<{
59
59
  did: string;
60
60
  schemaId: string;
61
- txnReceipt: {
62
- schemaTxnReceipt: {
63
- txnHash: any;
64
- to: any;
65
- from: any;
66
- nonce: any;
67
- gasLimit: any;
68
- chainId: any;
69
- };
70
- resourceTxnReceipt: {
71
- txnHash: any;
72
- to: any;
73
- from: any;
74
- nonce: any;
75
- gasLimit: any;
76
- chainId: any;
77
- };
78
- };
61
+ schemaTxnHash: any;
62
+ resourceTxnHash: any;
79
63
  tnxSchemaId?: undefined;
64
+ schemaTxhash?: undefined;
80
65
  schemaState?: undefined;
81
66
  } | {
82
67
  tnxSchemaId: string;
68
+ schemaTxhash: string;
83
69
  schemaState: {
84
70
  state: string;
85
71
  reason: string;
86
72
  };
87
73
  did?: undefined;
88
74
  schemaId?: undefined;
89
- txnReceipt?: undefined;
75
+ schemaTxnHash?: undefined;
76
+ resourceTxnHash?: undefined;
90
77
  }>;
91
78
  getSchemaByDidAndSchemaId(agentContext: AgentContext, did: string, schemaId: string): Promise<any>;
92
79
  estimateFeeForDidOperation(agentContext: AgentContext, options: DidOperationOptions): Promise<import("@ayanworks/polygon-did-registrar/build/registrar").EstimatedTxDetails | null | undefined>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ayanworks/credo-polygon-w3c-module",
3
3
  "main": "build/index",
4
4
  "types": "build/index",
5
- "version": "0.0.2-alpha.2",
5
+ "version": "0.0.2-alpha.4",
6
6
  "files": [
7
7
  "build"
8
8
  ],
@@ -27,11 +27,11 @@
27
27
  "lint": "eslint --ignore-path .gitignore ."
28
28
  },
29
29
  "dependencies": {
30
- "@credo-ts/askar": "0.5.0",
31
- "@credo-ts/core": "0.5.0",
32
- "@ayanworks/polygon-did-registrar": "0.0.16-alpha.13",
30
+ "@credo-ts/askar": "0.5.1",
31
+ "@credo-ts/core": "0.5.1",
32
+ "@ayanworks/polygon-did-registrar": "0.0.16-alpha.14",
33
33
  "@ayanworks/polygon-did-resolver": "0.0.16-alpha.10",
34
- "@ayanworks/polygon-schema-manager": "0.0.2-alpha.4",
34
+ "@ayanworks/polygon-schema-manager": "0.0.2-alpha.5",
35
35
  "did-resolver": "^4.1.0",
36
36
  "ethers": "^6.9.0"
37
37
  },