DApp(APLink) - Scatter Agreement
Scatter acquired method
getIdentity - acquire identity(login)
forgetIdentity - forget identity(logout)
authenticate - prove identity ownership
SuggestNetwork - This is a help method for requesting the addition of an EOS network that the website is currently using.
amax - used to obtain amaxjs using Scatter as the signProvider
requireVersion - The minimum specific version required for Scatter.
Acquire Scatter
Only with the scanner object can we operate the scanner.
If non page initialization requires the use of scatter, such as button click event calls, it is possible to directly obtain all window.scatter
.
Note: The installation of scatter requires the initialization of the scatter plugin to be completed before the document. After completion, document.dispatchEvent(new CustomEvent("scatterLoaded"));
Acquire Identity (login)
A pop-up box will appear for you to choose an identity. If logged in, there is no need to call getIdentity
again. If called again, an error will be reported. You cannot log in again unless you call foregetIdentity to log out.
Of course, it is also possible to obtain the identity directly from scatter.identity
, but this must be obtained after identity selection.
identity
information is as follows:
Generally, only the information in accounts
is used, and other information is temporarily useless (reserved for other purposes).
Forget identity (logout)
Once calling forgetIdentity
,scatter.identity
will be removed.
Recommend network for users
If you are not using a universal network, you can suggest that users add the network to their Scatter. It is equivalent to the user adding a network. If you are not using a universal network, you can suggest that users add the network to their Scatter. It is equivalent to the user adding a network.
Random signature
You can request the Scatter to sign any type of data you wish. If you need to sign the sha256 hash, be sure to set isHash to true as it uses different signature methods. Otherwise, always make it false.
Instantiate an AMAX object
Return an AMAX proxy object that allows for all operations on the chain.
Last updated