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

SDK v1 Example #322

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

SDK v1 Example #322

wants to merge 1 commit into from

Conversation

abdulmth
Copy link
Contributor

No description provided.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-322.d3oeht7cvddn19.amplifyapp.com


// Create a connection to a KILT blockchain.
// let api = await Kilt.connect('wss://peregrine.kilt.io/')
let api = await Kilt.connect('ws://localhost:9944/')
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just use a descriptive const?

Suggested change
let api = await Kilt.connect('ws://localhost:9944/')
let api = await Kilt.connect(FULL_NODE_WEB_SOCKET_URL)

// The submitter account must have enough funds to cover the deposit costs.
const submitterMnemonic =
'build hill second flame trigger simple rigid cabbage phrase evolve final eight'
const submitter = Crypto.makeKeypairFromUri(submitterMnemonic, 'sr25519')
Copy link
Contributor

Choose a reason for hiding this comment

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

this will change in the next prerelease, so when you port this over to bundle tests, use generateKeypair instead.

// - `getSubmittable`: Produces transaction that can be submitted to a blockchain node for inclusion, or signed and submitted by an external service.

// Submit transaction.
// Note: `submit()` by default, waits for the block to be finalized. This behaviour can be overwritten
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 default currently is inBlock - that's something we should discuss again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but the awaitFinalized is true by default, no?

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