Skip to content

Commit

Permalink
refactor: remove private key and use signing key (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
  • Loading branch information
sairanjit authored Jan 30, 2024
1 parent b66e07c commit af00bab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/schema-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract, JsonRpcProvider, Wallet } from 'ethers'
import { Contract, JsonRpcProvider, SigningKey, Wallet } from 'ethers'
import { parseDid, validateDid } from './utils/did'
import { v4 as uuidv4 } from 'uuid'
import SchemaRegistryAbi from './abi/SchemaRegistry.json'
Expand All @@ -9,7 +9,7 @@ import axios from 'axios'
export type PolygonDidInitOptions = {
didRegistrarContractAddress: string
rpcUrl: string
privateKey: string
signingKey: SigningKey
schemaManagerContractAddress: string
serverUrl: string
fileServerToken: string
Expand Down Expand Up @@ -46,10 +46,10 @@ export class PolygonSchema {
rpcUrl,
serverUrl,
fileServerToken,
privateKey,
signingKey,
}: PolygonDidInitOptions) {
const provider = new JsonRpcProvider(rpcUrl)
const wallet = new Wallet(privateKey, provider)
const wallet = new Wallet(signingKey, provider)
this.didRegistry = new Contract(
didRegistrarContractAddress,
DidRegistryContract.abi,
Expand Down

0 comments on commit af00bab

Please sign in to comment.