Skip to content

Commit

Permalink
chore: update @kaytrust/did-ethr 0.1.3
Browse files Browse the repository at this point in the history
docs: use createDidEthrFromPrivateKey
  • Loading branch information
Geiner Grandez Valle committed Oct 10, 2024
1 parent a65a3e8 commit 31582fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```ts
import { JwtCredentialPayload } from '@kaytrust/prooftypes'
import { createDidEthrFromPrivateKeyAndRpc } from '@kaytrust/did-ethr'
import { createDidEthrFromPrivateKey } from '@kaytrust/did-ethr'

const vcPayload: JwtCredentialPayload = {
sub: 'did:ethr:0x435df3eda57154cf8cf7926079881f2912f54db4',
Expand All @@ -22,9 +22,8 @@ const vcPayload: JwtCredentialPayload = {
}

const privateKey = "<PRIVATE_KEY>";
const RPC_AMOY = "<RPC_AMOY>";
const AMOY_CHAIN_ID = 80002;
const issuer = createDidEthrFromPrivateKeyAndRpc(privateKey, RPC_AMOY, {chainNameOrId: AMOY_CHAIN_ID})
const issuer = createDidEthrFromPrivateKey(privateKey, {chainNameOrId: AMOY_CHAIN_ID})
const proofTypeCredential = new ProofTypeJWT({issuer})

const vcJwt = await proofTypeCredential.generateProof(vcPayload)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vitest": "^2.1.2"
},
"dependencies": {
"@kaytrust/did-ethr": "^0.1.2",
"@kaytrust/did-ethr": "^0.1.3",
"did-jwt-vc": "^4.0.4"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"

"@kaytrust/did-ethr@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@kaytrust/did-ethr/-/did-ethr-0.1.2.tgz#da5f0003d3934acf3beb7fd4c2cca0911fb317e5"
integrity sha512-I09odR1FnNLEsfGZvwVb1sbXV5xVYeYM+TzRG2viTZJLZIK6G+kXUlAWXRvQ00mUsL9qhNSfGyS8Nag+vVLnRg==
"@kaytrust/did-ethr@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@kaytrust/did-ethr/-/did-ethr-0.1.3.tgz#ead99ab9c5af6d01ab3f6e5642f0d8fcc90e2199"
integrity sha512-J7ZrwlwWBRYoI9PFt6BC7hNaeHL2gDGd6VsJdZqCBbEMD972eJZntenLK0XFM9u71/0j+YOrFQVktialFG+iCA==
dependencies:
dotenv "^16.4.5"
ethr-did "^3.0.21"
Expand Down

0 comments on commit 31582fd

Please sign in to comment.