github.com/klaytn/klaytn@v1.12.1/blockchain/types/account/doc.go (about)

     1  // Copyright 2018 The klaytn Authors
     2  // This file is part of the klaytn library.
     3  //
     4  // The klaytn library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The klaytn library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the klaytn library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  /*
    18  Package account implements Account used in Klaytn.
    19  
    20  Inside the package, types, structures, functions, and interfaces associated with the Account are defined.
    21  
    22  Type of Account
    23  
    24  There are three types of Accounts used in Klaytn.
    25  
    26    - LegacyAccountType
    27    - ExternallyOwnedAccountType
    28    - SmartContractAccountType
    29  
    30  AccountCommon implements the structure and functions common to Klaytn Account, which also implements the Account interface.
    31  
    32  EOA (ExternallyOwnedAccount) and SCA (SmartContractAccount) are implemented in a structure that includes AccountCommon.
    33  
    34  LegacyAccount is implemented separately according to the account interface.
    35  
    36  Source Files
    37  
    38  Account related functions and variables are defined in the files listed below.
    39    - account.go                  : Defines types, interfaces and functions associated with the Account.
    40    - account_common.go           : Data structures and functions that are common to EOA (ExternallyOwnedAccount) and SCA (SmartContractAccount) are defined as AccountCommon.
    41    - account_serializer.go       : AccountSerializer is defined for serializing Account.
    42    - externally_owned_account.go : ExternallyOwnedAccount containing an AccountCommon is defined.
    43    - legacy_account.go           : LegacyAccount that implements the Account interface is defined.
    44    - smart_contract_account.go   : SmartContractAccount containing an AccountCommon is defined.
    45  
    46  For more information on Account, please refer to the document below.
    47  https://docs.klaytn.com/klaytn/design/accounts#klaytn-accounts
    48  */
    49  package account