-
Notifications
You must be signed in to change notification settings - Fork 214
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
SCP-3069: Hello world demo app integrating Nami wallet with the PAB #196
Conversation
8f80f3c
to
be69a8a
Compare
79e6f2f
to
aa090e2
Compare
Would love to see a more involved transaction, with validator scripts, datums etc. Is it also planned? |
@gege251 Yes, that will be the next step. This PR is more about a "hello world" type example for setting everything up. |
0973bb8
to
0bae4d4
Compare
Co-authored-by: Jamie Bertram <jamie.bertram@tweag.io>
0bae4d4
to
cdf16fe
Compare
exports.getWalletIdImpl = () => { | ||
return Promise.all([window.cardano.getUsedAddresses(), window.cardano.getUnusedAddresses()]) | ||
.then(([walletUsedAddresses, walletUnusedAddresses]) => { | ||
const addresses = walletUnusedAddresses.concat(walletUsedAddresses) | ||
return require('blake2b')(20) | ||
.update(Buffer.from(addresses.map(a => a.to_bech32).join(''))) | ||
.digest('hex') | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koslambrou does this generate a WalletId compatible with the WBE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this uses the same hash algorithm as the one used in WBE
Very simple demo app which demonstrates how to integrate the PAB with a light wallet (Nami in this case, but should work with other light wallets which respect the CIP-0030 standard.).
Pre-submit checklist: