func NewProvider(name string) (*Provider, error) {
	p := &Provider{stores: make(map[string]*store)}
	db := defDBName
	if name != "" {
		db = fmt.Sprintf(dbName, name)
	}
	err := p.openDB(db, getStoreNames()...)
	if err != nil {
		return nil, fmt.Errorf("failed to open IndexDB : %w", err)
	}
	return p, nil
}
NewProvider instantiates a new IndexedDB provider.
package indexeddb
import (
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	"strings"
	"sync"
	"syscall/js"
	"time"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/messenger"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/introduce"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/issuecredential"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/mediator"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/presentproof"
	"github.com/hyperledger/aries-framework-go/pkg/kms/localkms"
	"github.com/hyperledger/aries-framework-go/pkg/store/connection"
	"github.com/hyperledger/aries-framework-go/pkg/store/did"
	"github.com/hyperledger/aries-framework-go/pkg/store/verifiable"
	"github.com/hyperledger/aries-framework-go/pkg/vdr/peer"
	"github.com/hyperledger/aries-framework-go/spi/storage"
)
const (
	dbName                          = "aries-%s"
	defDBName                       = "aries"
	dbVersion                       = 1
	tagMapKey                       = "TagMap"
	storeConfigKey                  = "StoreConfig"
	expressionTagNameOnlyLength     = 1
	expressionTagNameAndValueLength = 2
	invalidTagName  = `"%s" is an invalid tag name since it contains one or more ':' characters`
	invalidTagValue = `"%s" is an invalid tag value since it contains one or more ':' characters`
	invalidQueryExpressionFormat = `"%s" is not in a valid expression format. ` +
		"it must be in the following format: TagName:TagValue"
)
type tagMapping map[string]map[string]struct{}  
type Provider struct {
	stores map[string]*store
	lock   sync.RWMutex
}