Create a MSafe Wallet

Initialize Creating Momentum Safe

After entering the interactive CLI from CLI arguments, you shall see momentum safe that has been created by this account as an owner.

My Momentum Safes

	1)	0x43b68d1027e84f0ca347ed633b87bb71437a5c50101b7f82b354b4ae7cc9d7aa
	c)	Create MSafe
	r)	Refresh

Please input your option:		c

Input information about new momentum safe wallet:

What is the number of owners? (2-32)				2
What is the confirmation threshold? (1-2)			2
What's the amount of initial fund of MSafe (Used for gas)? (>=0.001 APT)
								0.01
	1 th address (Self): 	0x67f57b23112edc0ab9173756500a4f2a566e5088562ca1a79ea81cc2b54336b6
	2 th address: 		0xbb3fce4b4d370fd3770cfcd346e3ab72811c2d73871bf803547b60c7d8184ab7
  • Number of owners is the number of addresses that is authorized to access and sign on the momentum safe wallet.

  • Confirmation threshold is the number of signatures need to be collected for submitting a transaction.

  • Initial fund is the fund sent by the current user to the momentum safe wallet to pay for gas fees.

  • For the owner addresses, the first address is default to the current wallet address. And you are able to add other owner addresses as the prompt.

All owner addresses are expected to have been previously registered to Momentum Safe. Otherwise, the momentum safe creation will fail with error.

After inputing all essential information, the wallet address as well as the creation nonce are displayed along with the confirmation:

Creating 2 / 2 Momentum Safe wallet
	Address:	0xb2c159a84aa635ac59f5bbef77e7d873292c1255a2e7c6923fbfeb0a07e4b03f
	Nonce:		0

--------------------

Initiate wallet creation? [Y/n]

Hit enter, and a transaction calling entry function of msafe::creator::init_wallet_creation is submitted and then confirmed on blockchain.

	Wallet creation transaction sent:	0xda873bcff3c6fe0aabf88c0ca837815ca2523a4f78e5e7bbe7fa6391f3bf2ea6
	Transaction confirmed, MomentumSafe creation initialized.

Thus a wallet creation request is submitted and stored on chain. On the other hand, the creation of wallet also requires confirmation from other owners to finish the registration process.

Confirm the wallet creation

Get into another terminal with the other owner (0xbb3fc...4ab7 in this case). Select 1. View my MSafes to view all momentum safe wallets owned by the address.

My Momentum Safes

	1)	0xb2c159a84aa635ac59f5bbef77e7d873292c1255a2e7c6923fbfeb0a07e4b03f (Pending Creation)
	2)	0xa39656a1c999d9eae83b5c9824dc0c9118dd9f088d0471d73cbf29cbff73420b
	c)	Create MSafe
	r)	Refresh

Please input your option:

You are able to see momentum safe both pending creation and already created. Select the first wallet that we just initiated creation and in pending status.

CLI will check whether there is enough signatures collected, and prompt you to sign the wallet creation transaction. Input s to sign and submit the transaction.

Momentum Safe Address: 0xb2c159a84aa635ac59f5bbef77e7d873292c1255a2e7c6923fbfeb0a07e4b03f

Collected signatures from public keys: 1 / 2
pk 0:	0x2599260569311822c3b3ae5d850e680ef17bff74c3ab7abb1033995ac9b432d4

--------------------

Waiting for my signature. Sign?

	s)	Sign
	r)	Refresh
	b)	Back

Please input your option:		s

	Transaction 0x1662bf72b0b03e4580d3015b7cf2b1038313f9927f7536ae98cd3a8db950a71a submitted. Waiting for confirmation
	Transaction confirmed on chain.

If the transaction is already signed by the current wallet, the sign option will not be available here.

After the transaction is confirmed on-chain, the momentum safe wallet is successfully created and registered.

You may check the status of the momentum safe wallet by checking View My MSafe:

My Momentum Safes

	1)	0xa39656a1c999d9eae83b5c9824dc0c9118dd9f088d0471d73cbf29cbff73420b
	2)	0xb2c159a84aa635ac59f5bbef77e7d873292c1255a2e7c6923fbfeb0a07e4b03f
	c)	Create MSafe
	r)	Refresh

The address we just created does not have pending creation in suffix, meaning the wallet is created.

Last updated