forked from Chia-Network/go-chia-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallet.go
73 lines (57 loc) · 2.39 KB
/
wallet.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package types
// WalletType types of wallets
// This matches constants on the chik-blockchain end as well. Don't change to arbitrary values.
// https://github.com/Chik-Network/chik-blockchain/blob/main/chik/wallet/util/wallet_types.py#L12
type WalletType uint8
const (
// WalletTypeStandard Standard Wallet
WalletTypeStandard = WalletType(0)
// WalletTypeRateLimited Deprecated: Rate Limited Wallet
WalletTypeRateLimited = WalletType(1)
// WalletTypeAtomicSwap Atomic Swap
WalletTypeAtomicSwap = WalletType(2)
// WalletTypeAuthorizedPayee Authorized Payee
WalletTypeAuthorizedPayee = WalletType(3)
// WalletTypeMultiSig Multi Sig
WalletTypeMultiSig = WalletType(4)
// WalletTypeCustody Custody
WalletTypeCustody = WalletType(5)
// WalletTypeCAT CAT Wallet
WalletTypeCAT = WalletType(6)
// WalletTypeRecoverable Recoverable Wallet
WalletTypeRecoverable = WalletType(7)
// WalletTypeDID DECENTRALIZED_ID Wallet
WalletTypeDID = WalletType(8)
// WalletTypePooling Pooling Wallet
WalletTypePooling = WalletType(9)
// WalletTypeNFT NFT Wallet
WalletTypeNFT = WalletType(10)
// WalletTypeDataLayer Data Layer Wallet
WalletTypeDataLayer = WalletType(11)
// WalletTypeDataLayerOffer Data Layer Offer wallet
WalletTypeDataLayerOffer = WalletType(12)
)
// WalletInfo single wallet record
// https://github.com/Chik-Network/chik-blockchain/blob/main/chik/wallet/wallet_info.py#L12
// @TODO Streamable
type WalletInfo struct {
ID uint32 `json:"id"`
Name string `json:"name"`
Type WalletType `json:"type"`
Data string `json:"data"`
}
// WalletBalance specific wallet balance information
// https://github.com/Chik-Network/chik-blockchain/blob/main/chik/rpc/wallet_rpc_api.py#L721
type WalletBalance struct {
WalletID int32 `json:"wallet_id"`
Fingerprint int `json:"fingerprint"`
ConfirmedWalletBalance Uint128 `json:"confirmed_wallet_balance"`
UnconfirmedWalletBalance Uint128 `json:"unconfirmed_wallet_balance"`
SpendableBalance Uint128 `json:"spendable_balance"`
PendingChange int64 `json:"pending_change"`
MaxSendAmount Uint128 `json:"max_send_amount"`
UnspentCoinCount int64 `json:"unspent_coin_count"`
PendingCoinRemovalCount int64 `json:"pending_coin_removal_count"`
WalletType WalletType `json:"wallet_type"`
AssetID string `json:"asset_id"`
}