hashgraph / hashgraph/did-sdk-js

createVcTransaction return `Invalid arguments`

Open
#78 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
43
Forks
21
PR merge metrics
No merged PRs in 30d

Description

### Description

I add console logs into the createVcTransaction and confirm it has 3 params
2nd params is the string
3rd params as below

```PublicKey {
_key: Ed25519PublicKey {
_keyData: Uint8Array(32) [
212, 37, 93, 181, 0, 126, 44, 56,
105, 98, 51, 132, 136, 53, 125, 144,
151, 184, 107, 3, 128, 23, 239, 91,
72, 192, 150, 224, 202, 85, 241, 243
]
}
}```

but the resolve of args[2] instanceof PublicKey -> false that why it come to the else statement

### Steps to reproduce

1. set up workspaces project using yarn
2. in the project add both dependency
.```
"@hashgraph/did-sdk-js": "0.1.1",
"@hashgraph/sdk": "2.6.0",
```

3. create Hedera helper on the main project with sdk 2.6.0
const hederaHelper = HederaHelper.setOperator(
hederaAccountId,
hederaAccountKey,
).setAddressBook(null as any, null as any, topic);

Then later call hederaHelper.DID.createVcTransaction(vc, hederaAccountKey);

when hedera helper v2.6.0 create the call it using PublicKey refer on 2.6.0, but when inside the library there also has hedera 2.0.20 that make the validation become not valid

The workaround I can delete the sdk inside did after install or make the sdk version same with did sdk version.

I think it is good time to update the sdk to 2.6.0

### Additional context

_No response_

### Hedera network

testnet

### Version

0.1.0

### Operating system

macOS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.