βοΈAccount
Account
The account is the first step in deploying and editing smart contracts. Before creating contracts, tokens, and minting NFT, please check the Matmo account information, which will help developers quickly create and use Matmo.
Accounts on the matmo blockchain contain blockchain assets such as tokens, NFTs, functions, and identifying information. These assets are inherently scarce and unique, and must have access controls. Any such assets are represented as resources in blockchain accounts.
Each account on the matmo blockchain is identified by a 64-byte account address. Accounts can store data, and accounts store that data in resources. The initial resource is the account data itself (authentication key and serial number). Additional resources such as currency or NFTs are added after account creation. Unlike other blockchains where accounts and addresses are implicit, accounts on matmo are explicit and need to be created to hold resources and modules.
There are many advanced features in the account such as:
Matmo Cross-chain license verification.When conducting cross-chain transactions and interactions, the account and key will be verified with the data on the chain at the same time to ensure the accuracy of the data on the chain.
Matmo rotates authentication keys. An account's authentication key can be changed to be controlled by a different private key. This is a unique feature in web3.
Matmo native multi-signature support. Accounts on matmo support multi-ed25519
, which allows the use of multi-signature authentication schemes when constructing authentication keys. More authentication schemes can be easily introduced in the future.
Matmo accounts can also be more integrated with the rest of the ecosystem to introduce features like profiles, domain names that can be seamlessly integrated with matmo accounts.
There are two types of accounts in matmo:
The first is a standard account - this is a typical account corresponding to an address with a corresponding public/private key pair.
The second is the resource account - an autonomous account without a corresponding private key, which is used by developers to store resources or publish on-chain modules.
ACCOUNT ADDRESS EXAMPLE
Example account address Account addresses are 64 bytes. One nibble per hex character. Sometimes addresses are prefixed with 0x
. For an example of how the address appears, see your first transaction, reproduced below:
If there are leading 0s, they may be excluded:
Create an account
When a user requests to create an account, for example by using the matmo SDK, the following cryptographic steps are performed:
Generate a new private key and public key pair.
From the user, get the account's preferred signature scheme: whether the account should use a single signature, or whether multiple signatures are required to sign transactions.
Combine the public key with the user's signature scheme to generate a 64-byte authentication key.
Initialize the account serial number to 0. Both the authentication key and serial number are stored in the account as initial account resources.
Create a
From now on, the user should use the private key to sign transactions with the account.
Signature schemes An account can send transactions. The Matmo blockchain supports the following signature schemes:
MT45518 for single signature transactions.
MultiMT45518, for multi-signature transactions.
NOTE The Matmo blockchain defaults to single signature transactions.
Signature scheme identifiers Generating the authentication key for an account requires that you provide one of the below 1-byte signature scheme identifiers for this account, i.e., whether the account is a single signature or a multisig account:
Make sure to also provide the value of K to generate the K-of-N multisig authentication key.
Account Status
The state of each account includes code (moving modules) and data (moving resources).
Mobile Modules: Mobile modules contain #code, such as type and procedure declarations; but they do not contain data. The Move module encodes rules for updating the global state of the matmo blockchain.
Mobile resources: Mobile resources contain data but not code. Each resource value has a type, which is declared in a module published in the distributed database of the matmo blockchain.
An account may contain any number of EVM modules and EVM resources.
Last updated