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

Api developer onboard #129

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

Conversation

Vikastc
Copy link
Contributor

@Vikastc Vikastc commented Sep 29, 2023

No description provided.

Vikastc and others added 7 commits August 3, 2023 14:19
* Working flow of SDK/API implementation

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* Fetch call for api.*.query

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* query on module

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* api.query for module 'stream'

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* fetch call on api.query

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* api.query on number and system

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* Added fetch call inside helper function

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* fetch call to check if a registry is anchored on chain

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* fetch call based on section and added registry api

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* fetch call for function fetchAuthorizationDetailsfromChain

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* fetch call for schemaCheck

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* resolved conflicts

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* removed .then because of await

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* Created a config service for url and token support

Signed-off-by: vikastc <vikas.tc@dhiway.com>

---------

Signed-off-by: vikastc <vikas.tc@dhiway.com>
Signed-off-by: vikastc <vikas.tc@dhiway.com>
* Removed env file

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* update

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* updated..

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* direct sdk implementation

Signed-off-by: vikastc <vikas.tc@dhiway.com>

* Working flow of direct sdk interation

Signed-off-by: vikastc <vikas.tc@dhiway.com>

---------

Signed-off-by: vikastc <vikas.tc@dhiway.com>
Signed-off-by: Amar Tumballi <amar@dhiway.com>
Signed-off-by: Amar Tumballi <amar@dhiway.com>
Signed-off-by: vikastc <vikas.tc@dhiway.com>
Signed-off-by: vikastc <vikas.tc@dhiway.com>
@Vikastc Vikastc requested a review from amarts September 29, 2023 08:53
Signed-off-by: vikastc <vikas.tc@dhiway.com>
@Vikastc Vikastc force-pushed the api-developer-onboard branch from c292349 to 8655129 Compare September 29, 2023 09:00
Signed-off-by: vikastc <vikas.tc@dhiway.com>
@Vikastc Vikastc force-pushed the api-developer-onboard branch from ba9f9ac to 7784058 Compare October 4, 2023 07:53
Vikastc and others added 4 commits October 4, 2023 13:38
Signed-off-by: vikastc <vikas.tc@dhiway.com>
Signed-off-by: vikastc <vikas.tc@dhiway.com>
Signed-off-by: vikastc <vikas.tc@dhiway.com>
@@ -160,3 +162,121 @@ export function linkedInfoFromChain(
didName,
}
}

interface PalletDidDidDetailsApi extends Struct {
Copy link
Member

Choose a reason for hiding this comment

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

Why are we implementing this again? DID resolver package is already doing this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the function 'linkedInfoFromApi'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but its actually not needed

const authorizationId = Identifier.uriToIdentifier(auth)
const registryAuthoriation: Option<PalletRegistryRegistryAuthorization> =
await api.query.registry.authorizations(authorizationId)
registryAuthoriation = await cord_api_query(
Copy link
Member

Choose a reason for hiding this comment

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

The challenge with wrappers is that the signature becomes difficult to understand. We already have Cord.api..query, right?

@@ -173,10 +174,20 @@ export async function signAndSubmitTx(
tx: SubmittableExtrinsic,
signer: KeyringPair,
{
nonce = -1,
tip,
Copy link
Member

Choose a reason for hiding this comment

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

tip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of this error - "error TS2339: Property 'nonce' does not exist on type 'Partial & Partial<{ tip: AnyNumber; }>'."

Vikastc and others added 2 commits October 10, 2023 13:02
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.

3 participants