Added ownership reference + wallet creation methods
This commit is contained in:
26
api/pkg/model/chainasset.go
Normal file
26
api/pkg/model/chainasset.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/tech/sendico/pkg/db/storable"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
)
|
||||
|
||||
type ChainAssetKey struct {
|
||||
Chain ChainNetwork `bson:"chain" json:"chain" yaml:"chain" mapstructure:"chain"`
|
||||
TokenSymbol string `bson:"tokenSymbol" json:"tokenSymbol" yaml:"tokenSymbol" mapstructure:"tokenSymbol"`
|
||||
}
|
||||
|
||||
type ChainAsset struct {
|
||||
ChainAssetKey `bson:",inline" json:",inline"`
|
||||
ContractAddress *string `bson:"contractAddress,omitempty" json:"contractAddress,omitempty"`
|
||||
}
|
||||
|
||||
type ChainAssetDescription struct {
|
||||
storable.Storable `bson:",inline" json:",inline"`
|
||||
Describable `bson:",inline" json:",inline"`
|
||||
Asset ChainAsset `bson:"asset" json:"asset"`
|
||||
}
|
||||
|
||||
func Collection(*ChainAssetDescription) mservice.Type {
|
||||
return mservice.ChainAssets
|
||||
}
|
||||
Reference in New Issue
Block a user