Skip to content

Commit b15d174

Browse files
committed
chore: update dependencies & bump version
1 parent bb64fee commit b15d174

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,33 @@ npm install --save @spherity/ethr-revocation-registry-controller
3131
You can then build the controller object by instantiating it for example with a WebsocketProvider connected to Infura:
3232

3333
```javascript
34-
const revocation = require('@spherity/ethr-revocation-registry-controller');
3534
const { ethers } = require("ethers");
35+
const {EthereumRevocationRegistryController} = require("@spherity/ethr-revocation-registry-controller");
36+
const {InfuraWebSocketProvider} = require('@ethersproject/providers');
3637

37-
const provider = new InfuraWebSocketProvider("goerli", "XXXXXXXXXXXXXXXXXXXX");
38-
const signer = new ethers.Wallet.createRandom()
39-
const signerAndProvider = signer.connect(provider)
38+
const provider = new InfuraWebSocketProvider(5, "XXXXXX");
39+
const signer = ethers.Wallet.createRandom();
40+
const signerAndProvider = signer.connect(provider);
4041

4142
const config = {
42-
signer: signerAndProvider,
43-
address: "0x185D1Cf733e2C85A7Eda4f188036baA5b7a11182",
43+
signer: signerAndProvider,
44+
chainId: 5,
45+
address: "0x534b89b798e45929A24a217d7324EAd0EAF9413E"
46+
}
47+
48+
const controller = new EthereumRevocationRegistryController(config);
49+
50+
async function checkRevocation() {
51+
const date = new Date(1686386460*1000);
52+
console.log(`Date: ${date.toDateString()}`);
53+
54+
const revoked = await controller.isRevoked({
55+
namespace: "0x68849D547F49f19291737bFebA5ca5a0E1e19d84",
56+
list: "0x1bfcc5aaebc43b53d181ad28013ffb74e750b43b5f7c3340bfe6f33ac66e3d49",
57+
revocationKey: "0x6c329cb9bd41aa21e38d2c1c6ca83d88b381f2dad0a489769684f4d5c575eb2b",
58+
});
59+
60+
console.log(`Credential status is: ${revoked}`);
4461
}
4562
```
4663
**Make sure to provide a TypedDataSigner if you intend to use Meta transactions (for example 'Wallet')!**

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spherity/ethr-revocation-registry-controller",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"description": "The controller module for interacting with Ethereum revocation lists & resolving revocation entries for EIP-5539.",
55
"main": "dist/src/index.js",
66
"typings": "dist/src/index.d.ts",
@@ -57,7 +57,7 @@
5757
"@ethersproject/providers": "^5.6.8",
5858
"@ethersproject/transactions": "^5.6.2",
5959
"@ethersproject/wallet": "^5.7.0",
60-
"@spherity/ethr-revocation-registry": "^1.0.9",
60+
"@spherity/ethr-revocation-registry": "^1.0.11",
6161
"@types/lodash": "^4.14.184",
6262
"lodash": "^4.17.21",
6363
"web3": "^1.7.5"

0 commit comments

Comments
 (0)