github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/concepts/stdlibs/coin.md (about)

     1  ---
     2  id: coin
     3  ---
     4  
     5  # Coin
     6  
     7  A Coin is a native Gno type that has a denomination and an amount. Coins can be issued by the [Banker](banker.md).  
     8  
     9  A coin is defined by the following:
    10  
    11  ```go
    12  type Coin struct {
    13  	Denom  string `json:"denom"`
    14  	Amount int64  `json:"amount"`
    15  }
    16  ```
    17  
    18  `Denom` is the denomination of the coin, i.e. `ugnot`, and `Amount` is a non-negative
    19  amount of the coin.
    20  
    21  Multiple coins can be bundled together into a `Coins` slice:
    22  
    23  ```go
    24  type Coins []Coin
    25  ```
    26  
    27  This slice behaves like a mathematical set - it cannot contain duplicate `Coin` instances.
    28  
    29  The `Coins` slice can be included in a transaction made by a user addresses or a realm. 
    30  Coins in this set are then available for access by specific types of Bankers,
    31  which can manipulate them depending on access rights.
    32  
    33  Read more about coins in the [Effective Gno](../effective-gno.md#coins) section. 
    34  
    35  The Coin(s) API can be found in under the `std` package [reference](../../reference/stdlibs/std/coin.md).