Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Client Implementation #15

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

rado0x54
Copy link
Contributor

@rado0x54 rado0x54 commented Sep 21, 2023

Add did:bnb Typescript client library
Provide client library @identity.com/did-bnb-client that conveniently exposes functions to interact with the on-chain EVM bases DIDRegistry contract. It comes with a thorough README and integration test that are exectuted in CI

PR: #15

Signed-off-by: Martin Riedel [email protected]
Reviewed-by: Robert Leonard [email protected]

@rado0x54 rado0x54 force-pushed the dev-rado0x54/IDCOM-2588/ts-client branch from fa76032 to 4f9cab9 Compare September 21, 2023 16:35
@rado0x54 rado0x54 marked this pull request as ready for review September 22, 2023 19:13
public '@context'?: 'https://www.w3.org/ns/did/v1' | string | string[] =
DidDocument.defaultContext();
public id: string;
// public alsoKnownAs?: string[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[non-blocking] Is this variable still needed?

// Verification Method for For 20-bytes Ethereum Keys
EcdsaSecp256k1RecoveryMethod2020,
// Verification Method for a full 32 bytes Secp256k1 Verification Key
EcdsaSecp256k1VerificationKey2019,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DiD registry contract only supports 20-byte ethereum keys

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put that on the TODO? Generally it could support full keys, right? (The accessor just needs to convert back to a 20byte address).

"prepack": "yarn build",
"generate-contract-types": "typechain --target=ethers-v5 --out-dir ./src/contracts/typechain-types ./src/contracts/abi/DIDRegistry.json",
"spawn-devnet": "tenderly devnet spawn-rpc --project project --template bnb-testnet",
"test:integration": "ts-mocha test/integration/**/*.test.ts"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the github workflow for running the integration test calls the command npm run integration-test it need to be updated to this new command npm run test:integration.

https://github.com/identity-com/did-bnb/blob/main/.github/workflows/ts-client-integration-test.yml#L34


dotenv.config();

describe('Native TS Client Integration Test', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there also be a test case for adding controllers?

@rado0x54 rado0x54 force-pushed the dev-rado0x54/IDCOM-2588/ts-client branch from b5c1a77 to b8994ca Compare September 26, 2023 03:35
Provide client library @identity.com/did-bnb-client that conveniently exposes functions to interact with the on-chain EVM bases DIDRegistry contract. It comes with a thorough README and integration test that are exectuted in CI

PR: #15

Signed-off-by: Martin Riedel <[email protected]>
Reviewed-by: Robert Leonard <[email protected]>
@rado0x54 rado0x54 force-pushed the dev-rado0x54/IDCOM-2588/ts-client branch from b8994ca to 750486c Compare September 26, 2023 03:39
@rado0x54 rado0x54 changed the title TS Client and Uniresolver Implementation TS Client Implementation Sep 26, 2023
@rado0x54 rado0x54 merged commit 30802cd into main Sep 26, 2023
2 checks passed
@rado0x54 rado0x54 deleted the dev-rado0x54/IDCOM-2588/ts-client branch September 26, 2023 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants