// New creates a new anchor link store.
New creates a new anchor link store.
// New creates a new anchor link store .
func New(provider storage.Provider) (*Store, error) {
	store, err := provider.OpenStore(storeName)
	if err != nil {
		return nil, fmt.Errorf("failed to open anchor link store: %w", err)
	}
	err = provider.SetStoreConfig(storeName, storage.StoreConfiguration{TagNames: []string{hashTag}})
	if err != nil {
		return nil, fmt.Errorf("failed to set store configuration: %w", err)
	}
	return &Store{
		store:     store,
		marshal:   json.Marshal,
		unmarshal: json.Unmarshal,
	}, nil
}
func New ( provider storage . Provider ) ( * Store , error ) { store , err := provider . OpenStore ( storeName ) if err != nil { return nil , fmt . Errorf ( " " , err ) } err = provider . SetStoreConfig ( storeName , storage . StoreConfiguration { TagNames : [ ] string { hashTag } } ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & Store { store : store , marshal : json . Marshal , unmarshal : json . Unmarshal , } , nil }
New creates a new anchor link store.
New creates a new anchor link store .