Wallet reference
Wallets are used to known the address of the Marmo wallet, and to sign intents to that wallet.
Constructor
Creates a new wallet instance
from marmopy import Wallet
Wallet(private or credentials, configuration (optional))
Parameters
private_key
-string | Credentials
: The private key to use when creating the wallet. Used to sign Intents.configuration
-Config
: (semi-optional) The configuration to use in order to derivate the wallet address, by default uses the global configuration, throws if not available.
Return
Wallet
object used to sign Intents and obtain the wallet address.
import { Wallet } from "marmojs"
new Wallet(key, config)
Parameters
private_key
-string
: The private key to use when creating the wallet. Used to sign Intents.configuration
-Config
: (semi-optional) The configuration to use in order to derivate the wallet address, by default uses the global configuration, throws if not available.
Return
Wallet
object used to sign Intents and obtain the wallet address.
todo
wallet address
The address of the wallet, can receive and send funds, eth, tokens, etc.
wallet.address
Property
string
- Address of the Marmo wallet
wallet.address
Property
string
- Address of the Marmo wallet
todo
wallet signer
The address signing the Intents, a regultar Ethereum address derivated from the private key.
wallet.signer
Property
string
- Address of the wallet signer
wallet.signer
Property
string
- Address of the wallet signer
todo
wallet sign ()
Signs an Intent using the wallet
wallet.sign(intent)
Parameters
Intent
- Intent to sign
Returns
SignedIntent
, signature with intent attached
wallet.sign(intent)
Parameters
Intent
- Intent to sign
Returns
SignedIntent
, signature with intent attached
todo