---
# System prepended metadata

title: 'Yummi Wallet Spec :'
tags: [Hashgreen, ' wallet']

---

---
tags: Hashgreen, wallet
---
# Yummi Wallet Spec :


## :memo: todo list
1. selectCoin
2. generateUnsignedTransaction
3. generateSignedTransaction



### 1: selectCoin (done)
* input: address, amount

1. Get spendable amount, if spending amount > spendable amount, cancel the deal
2. If spending amount valid, get spendable coin list
3. Sort the spendable coin list, **sort by?**
4. Calculate summary value, if summary value> spending amount then for loop break
5. return used_coin

### 2: generateUnsignedTransaction (create spend)
1. Calculate change value = spending value - total_amount
2. Choose a coin for creating coin(coins[0]) 
3. Get coin's puzzle hash, and solution
4. Bundle **CoinSpend** with `coin`, `puzzle` and `solution`
5. return SpendsList

### 3: generateSignedTransaction
1. Sign CoinSpend, get SpendBundle (signCoinSpend function exist)
2. Push Transaction with SpendBundle

### :snowboarder: Pending issues
1. sort by?
2. generateUnsignedTransaction - when to create coin? 
3. miss make solution function



