@ayanworks/polygon-did-registry-contract 0.0.1 → 1.1.1

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/.env.sample ADDED
@@ -0,0 +1,2 @@
1
+ RPC_URL=""
2
+ MNEMONIC=""
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Polygon- Identity
1
+ # Polygon DID Registry Contract
2
2
 
3
3
  This library is an implementation of a registry contract that supports the Polygon DID Method.
4
4
 
@@ -12,10 +12,14 @@ The Polygon registry contract acts as a public ledger, where the Polygon-Identit
12
12
 
13
13
  * updateDID(address, string) : The method updateDID is included in contract, which will facilitate the controller, and only the controller of the did, to update the document if need arises. Though the Polygon DID method, defines how the DID doc is defined as per standards, and that can be resolved.
14
14
 
15
- * deleteDID(address) : The method deleteDID is included in the contract, that only the controller of DID can access, to delete a particular DID from ledge.
15
+ * deleteDID(address) : The method deleteDID is included in the contract, that only the controller of DID can access, to delete a particular DID from ledger.
16
16
 
17
17
  * getDID(address) : The method getDID helps, the DID controller to resolve the DID document.
18
18
 
19
+ * transferOwnership(address) : The method transferOwnership, helps in transferring the ownership of contract to a new owner. Only the current owner can access this function.
20
+
21
+ * getOwner() : the method getOwner helps one to fetch the current owner of the contract.
22
+
19
23
  ## Example ethers code
20
24
 
21
25
  Using ethers, the following illustrates how one can interact with PolygonRegistry contract, from client side application.
@@ -96,10 +100,11 @@ Run a ganache instance
96
100
  ganache-cli
97
101
  ```
98
102
 
99
- Update your mnemonic in truffle-config.js
103
+ Update your and RPC URL in .env file.
100
104
 
101
105
  ```
102
- const mnemonic = <Place your mnemonic here>;
106
+ RPC_URL="<Place your mnemonic here>"
107
+ MNEMONIC="<Place your mnemonic here>"
103
108
  ```
104
109
 
105
110
  On a new console window run
@@ -113,13 +118,7 @@ truffle migrate --network matic
113
118
  For Testing use the command
114
119
 
115
120
  ```
116
- npm install
121
+ truffle test
117
122
  ```
118
-
119
- Next, run
120
-
121
- ```
122
- npm run test
123
- ```
124
-
123
+ The test cases run on a ganache setup.
125
124