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 <[email protected]>

* Fetch call for api.*.query

Signed-off-by: vikastc <[email protected]>

* query on module

Signed-off-by: vikastc <[email protected]>

* api.query for module 'stream'

Signed-off-by: vikastc <[email protected]>

* fetch call on api.query

Signed-off-by: vikastc <[email protected]>

* api.query on number and system

Signed-off-by: vikastc <[email protected]>

* Added fetch call inside helper function

Signed-off-by: vikastc <[email protected]>

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

Signed-off-by: vikastc <[email protected]>

* fetch call based on section and added registry api

Signed-off-by: vikastc <[email protected]>

* fetch call for function fetchAuthorizationDetailsfromChain

Signed-off-by: vikastc <[email protected]>

* fetch call for schemaCheck

Signed-off-by: vikastc <[email protected]>

* resolved conflicts

Signed-off-by: vikastc <[email protected]>

* removed .then because of await

Signed-off-by: vikastc <[email protected]>

* Created a config service for url and token support

Signed-off-by: vikastc <[email protected]>

---------

Signed-off-by: vikastc <[email protected]>
* Removed env file

Signed-off-by: vikastc <[email protected]>

* update

Signed-off-by: vikastc <[email protected]>

* updated..

Signed-off-by: vikastc <[email protected]>

* direct sdk implementation

Signed-off-by: vikastc <[email protected]>

* Working flow of direct sdk interation

Signed-off-by: vikastc <[email protected]>

---------

Signed-off-by: vikastc <[email protected]>
Signed-off-by: Amar Tumballi <[email protected]>
Signed-off-by: Amar Tumballi <[email protected]>
@Vikastc Vikastc requested a review from amarts September 29, 2023 08:53
Signed-off-by: vikastc <[email protected]>
Signed-off-by: vikastc <[email protected]>
@@ -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; }>'."

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