near-api-js
near-api-js copied to clipboard
Support for creating and funding linkdrop links
-
- Story
As an app developer, I want to fund the creation of my users` accounts, so they can login and use my app.
-
- Flow
1. Generate new key pair (pub key/private key)
2. Call [Linkdrop](https://github.com/nearprotocol/near-linkdrop) contract's send
function with public_key
as the argument, and an attached NEAR balance
3. Redirect user to the wallet with "fundingKey" argument
-
-
-
- Unhappy Path
-
-
- [ ] Surface error if call to Linkdrop contract fails
@kcole16 was this resolved?
Not yet (that I’m aware of). cc @vgrichina
@kcole16, this solution just needs to be generalized to near-api-js correct?
Check this PR for more context: https://github.com/near/near-api-js/pull/256
@potatodepaulo do we have specific customer who wants to integrate this? If so – I think it will help to do demo for them first and then refactor into library once we have it working end to end.
@vgrichina @mikedotexe @kcole16 do we still need this functionality? PR related to this issue was closed: https://github.com/near/near-api-js/pull/256 Should we close the issue?
I think on client side it's relatively easy, more interesting is to create smart contract SDK which would allow to send more customised linkdrops. Like allow to avoid attaching 1 N for gas fees, allow to transfer NFTs on claim, etc. Basically make it easy to send any kind of stuff on NEAR as a linkdrop.
I think on client side it's relatively easy
I mean in the sense that you just create new KeyPair
and then make regular smart contract functionCall
transaction to whatever linkdrop contract you want to use