MagicCredential class
MagicCredential class as an extension for web3dart
Constructors
- MagicCredential(RpcProvider provider)
Properties
- address ↔ EthereumAddress
-
The ethereum address belonging to this credential.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isolateSafe → bool
-
Whether these
Credentials
are safe to be copied to another isolate and can operate there. If this getter returns true, the client might chose to perform the expensive signing operations on another isolate.no setterinherited - provider ↔ RpcProvider
-
The provider that relays requests to the relayer
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ethSign(
{required Uint8List payload}) → Future< String> - Eth Sign
-
extractAddress(
) → Future< EthereumAddress> -
Loads the ethereum address specified by these credentials.
inherited
-
getAccount(
) → Future< EthereumAddress> - Get account needs to be called to initiate account field.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
personalSign(
{required Uint8List payload}) → Future< String> - Personal Sign
-
sendTransaction(
Transaction transaction) → Future< String> - SendTransaction
-
sign(
Uint8List payload, {int? chainId, bool isEIP1559 = false}) → Future< Uint8List> -
Signs the
payload
with a private key. The output will be like the bytes representation of the eth_sign RPC method, but without the "Ethereum signed message" prefix. Thepayload
parameter contains the raw data, not a hash.inherited -
signPersonalMessage(
Uint8List payload, {int? chainId}) → Future< Uint8List> - An override to the signPersonalMessage, personal sign would do the same trick without the necessity of chainId
-
signPersonalMessageToUint8List(
Uint8List payload, {int? chainId}) → Uint8List -
Signs an Ethereum specific signature. This method is equivalent to
signToUint8List
, but with a special prefix so that this method can't be used to sign, for instance, transactions.inherited -
signToEcSignature(
Uint8List payload, {int? chainId, bool isEIP1559 = false}) → MsgSignature -
Signs the
payload
with a private key and returns the obtained signature. -
signToSignature(
Uint8List payload, {int? chainId, bool? isEIP1559}) → Future< MsgSignature> - An override to the signToSignature, but it's not supported as the signing is done in the relayer.
-
signToUint8List(
Uint8List payload, {int? chainId, bool isEIP1559 = false}) → Uint8List -
Signs the
payload
with a private key. The output will be like the bytes representation of the eth_sign RPC method, but without the "Ethereum signed message" prefix. Thepayload
parameter contains the raw data, not a hash.inherited -
signTypedData(
{required Map payload}) → Future< String> - SignTypedDataV3
-
signTypedDataLegacy(
{required Map payload}) → Future< String> - SignTypedDataV1
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited