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

client-api: populate type definitions for create_account_store and TrustedCallAuthenticated #3158

Merged
merged 4 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tee-worker/identity/client-api/parachain-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Added

- Type definitions for the new OmniAccount Pallet.
- Type definitions for the new OmniAccount Pallet under the name of `omniAccount`.
- Expose getter to get the derived `omniaccount` address from a given identity
- Expose the OmniAccount `request_intent`'s trusted call.
- Expose the OmniAccount's `request_intent` and `create_account_store` trusted calls.
- Add `TrustedCallAuthenticated` and `TCAuthentication` trusted call structs.

## [0.9.20-4.1] - 2024-09-30

Expand Down
2 changes: 1 addition & 1 deletion tee-worker/identity/client-api/parachain-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/src/index.js",
"module": "dist/src/index.js",
"sideEffects": false,
"version": "0.9.20-next.1",
"version": "0.9.20-next.4",
"scripts": {
"clean": "rm -rf dist build node_modules",
"update-metadata": "curl -s -H \"Content-Type: application/json\" -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9944 > prepare-build/litentry-parachain-metadata.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ export default {
signature: "LitentryMultiSignature",
},

TCAuthentication: {
_enum: {
Web3: "LitentryMultiSignature",
Email: "Text",
},
},
TrustedCallAuthenticated: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

a minor issue: Above there is TCAuthentication; here is TrustedCallAuthenticated. I know it's coming from RUST code. Would it be better to consistent name pattern? or this is on purpose? @silva-fj

Copy link
Contributor

Choose a reason for hiding this comment

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

Not particular reason, feel free to propose better names. There are a few things we should clean up after the demo

call: "TrustedCall",
nonce: "Index",
authentication: "TCAuthentication",
},

//important
TrustedGetter: {
_enum: {
Expand Down Expand Up @@ -66,6 +78,7 @@ export default {

clean_id_graphs: "(LitentryIdentity)",
request_intent: "(LitentryIdentity, Intent)",
create_account_store: "(LitentryIdentity)",
},
},
TrustedOperationStatus: {
Expand Down
3 changes: 2 additions & 1 deletion tee-worker/identity/client-api/parachain-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ export * from "@polkadot/api";
export * from "@polkadot/api/types";
import { default as identity } from "../build/interfaces/identity/definitions";
import { default as vc } from "../build/interfaces/vc/definitions";
import { default as omniAccount } from "../build/interfaces/omniAccount/definitions";
import { default as trusted_operations } from "../build/interfaces/trusted_operations/definitions";
import { default as sidechain } from "../build/interfaces/sidechain/definitions";
export { identity, vc, trusted_operations, sidechain };
export { identity, vc, trusted_operations, sidechain, omniAccount };

// Export handy types
import type { LitentryIdentity, Web3Network } from "../build/interfaces/identity/types";
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/identity/client-api/sidechain-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/src/index.js",
"module": "dist/src/index.js",
"sideEffects": false,
"version": "0.9.20-next.0",
"version": "0.9.20-next.4",
"scripts": {
"clean": "rm -rf dist build node_modules",
"update-metadata": "../../bin/litentry-cli print-sgx-metadata-raw > prepare-build/litentry-sidechain-metadata.json",
Expand Down