github.com/condensat/bank-core@v0.1.0/database/model/ssmaddress.go (about) 1 // Copyright 2020 Condensat Tech. All rights reserved. 2 // Use of this source code is governed by a MIT 3 // license that can be found in the LICENSE file. 4 5 package model 6 7 type SsmAddressID ID 8 type SsmPublicAddress String 9 type SsmPubkey String 10 type SsmBlindingKey String 11 12 type SsmAddress struct { 13 ID SsmAddressID `gorm:"primary_key;"` // [PK] SsmAddress ID 14 PublicAddress SsmPublicAddress `gorm:"unique_index;not null;size:126"` // Ssm Address, non mutable 15 ScriptPubkey SsmPubkey `gorm:"not null;size:66"` // Ssm Script, non mutable 16 BlindingKey SsmBlindingKey `gorm:"not null;size:64"` // Ssm BlindingKey, non mutable (optional) 17 } 18 19 func (p *SsmAddress) IsValid() bool { 20 return len(p.PublicAddress) > 0 && len(p.ScriptPubkey) > 0 21 }