ErrSerializing = errors.New("serializing asset definition")
ErrMarshalAsset = errors.New("failed marshal asset")
ErrFindAsset = errors.New("fail to find asset")
+ ErrInternalAsset = errors.New("btm has been defined as the internal asset")
)
//NewRegistry create new registry
// Define defines a new Asset.
func (reg *Registry) Define(ctx context.Context, xpubs []chainkd.XPub, quorum int, definition map[string]interface{}, alias string, tags map[string]interface{}, clientToken string) (*Asset, error) {
+ if alias == "btm" {
+ return nil, ErrInternalAsset
+ }
+
if existed := reg.db.Get(aliasKey(alias)); existed != nil {
return nil, ErrDuplicateAlias
}
var updateAccountTagsCmd = &cobra.Command{
Use: "update-account-tags <accountID|alias>",
- Short: "Add, update or delete the account tags",
- Long: `If the tags match the pattern 'key:value', add or update them.
-If the tags match the pattern 'key:', delete them.`,
- Args: cobra.ExactArgs(1),
+ Short: "Update the account tags",
+ Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
cmd.MarkFlagRequired("tags")
},
var updateAssetTagsCmd = &cobra.Command{
Use: "update-asset-tags <assetID|alias>",
- Short: "Add, update or delete the asset tags",
- Long: `If the tags match the pattern 'key:value', add or update them.
-If the tags match the pattern 'key:', delete them.`,
- Args: cobra.ExactArgs(1),
+ Short: "Update the asset tags",
+ Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
cmd.MarkFlagRequired("tags")
},