Coin
A Coin is a native Gno type that has a denomination and an amount. Coins can be issued by the Banker.
A coin is defined by the following:
type Coin struct {
Denom string `json:"denom"`
Amount int64 `json:"amount"`
}
Denom
is the denomination of the coin, i.e. ugnot
, and Amount
is a non-negative
amount of the coin.
Multiple coins can be bundled together into a Coins
slice:
type Coins []Coin
This slice behaves like a mathematical set - it cannot contain duplicate Coin
instances.
The Coins
slice can be included in a transaction made by a user addresses or a realm.
Coins in this set are then available for access by specific types of Bankers,
which can manipulate them depending on access rights.
Read more about coins in the Effective Gno section.
The Coin(s) API can be found in under the std
package reference.