You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eip12Connection.invokeErgoPay(ergoPayUrl: string, completionHandler: function)
// invokes an EIP-20 ErgoPay request
completionHandler is called when the user completes the ErgoPay request by submitting a transaction. If the user cancels, it is not called (therefore a Promise is not correct to use).
The request is successful without having an Eip12Connection established before (isConnected() may result to false) as it is not necessary. An ErgoPay request might be bound to a different connection or (if it does not result in a reduced transaction to sign) might not need a wallet connection at all.
When invokeErgoPay called, the following actions are performed:
Static ErgoPay request (ergopay:<reducedTx>)
User can select the wallet to sign. ReducedTx is shown (inputboxes and outputboxes) for the user to confirm. The inputboxes must be fetched from the blockchain in order to check if tokens might be burned.
On confirmation, the tx is signed and submitted and in case of success the completionHandler is called.
Dynamic ErgoPay request(ergopay://<url>)
If url contains "#P2PK_ADDRESS#": show the user a choose dialog for a wallet and wallet address. When user made their choice, proceed.
Fetch data from https://url (or http://url for local addresses) and process the response as outlined in EIP-20. If the response contains a reduced transaction, show it as outlined in 1)
If the response data contains no address information and the user did not already choose the wallet to use, it is now needed to choose a wallet to sign with. If address information is provided or the user already made a choice, do not prompt again.
When a signed transaction is submitted, completionHandler is called. It is not called when there was no reduced transaction in the response.
The text was updated successfully, but these errors were encountered:
Add method to web dapp connector:
completionHandler is called when the user completes the ErgoPay request by submitting a transaction. If the user cancels, it is not called (therefore a Promise is not correct to use).
The request is successful without having an Eip12Connection established before (
isConnected()
may result to false) as it is not necessary. An ErgoPay request might be bound to a different connection or (if it does not result in a reduced transaction to sign) might not need a wallet connection at all.When
invokeErgoPay
called, the following actions are performed:Static ErgoPay request (
ergopay:<reducedTx>
)User can select the wallet to sign. ReducedTx is shown (inputboxes and outputboxes) for the user to confirm. The inputboxes must be fetched from the blockchain in order to check if tokens might be burned.
On confirmation, the tx is signed and submitted and in case of success the
completionHandler
is called.Dynamic ErgoPay request(
ergopay://<url>
)If
url
contains "#P2PK_ADDRESS#": show the user a choose dialog for a wallet and wallet address. When user made their choice, proceed.Fetch data from https://url (or http://url for local addresses) and process the response as outlined in EIP-20. If the response contains a reduced transaction, show it as outlined in 1)
If the response data contains no address information and the user did not already choose the wallet to use, it is now needed to choose a wallet to sign with. If address information is provided or the user already made a choice, do not prompt again.
When a signed transaction is submitted,
completionHandler
is called. It is not called when there was no reduced transaction in the response.The text was updated successfully, but these errors were encountered: