wallet

package
v0.0.0-...-8770fa7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllKeys

func GetAllKeys() ([]string, error)

func StoreBucket

func StoreBucket(bucket DidBucket) error

Types

type DidBucket

type DidBucket struct {
	Did                 string                 `json:"did,omitempty"`
	IssuanceKey         jwk.Key                `json:"issKey,omitempty"`
	PresentationKey     jwk.Key                `json:"presKey,omitempty"`
	AdminEncryptionKey  jwk.Key                `json:"encKey,omitempty"`
	AdminTransactionKey jwk.Key                `json:"txnKey,omitempty"`
	AdminSigningKey     jwk.Key                `json:"sigKey,omitempty"`
	Document            map[string]interface{} `json:"doc,omitempty"`
	Token               string                 `json:"token,omitempty"`
}

func GetBucketByDid

func GetBucketByDid(didSubject string) (DidBucket, error)

func (*DidBucket) MarshalJSON

func (bucket *DidBucket) MarshalJSON() ([]byte, error)

func (*DidBucket) UnmarshalJSON

func (bucket *DidBucket) UnmarshalJSON(data []byte) error

type MKVStore

type MKVStore struct {
	*buntdb.DB
}

MemoryStore token storage based on buntdb(https://github.com/tidwall/buntdb)

func NewFileKVStore

func NewFileKVStore() (*MKVStore, error)

NewMemoryKVStore create a store instance based on a file

func NewMemoryKVStore

func NewMemoryKVStore() (*MKVStore, error)

NewMemoryKVStore create a store instance based on memory

func (*MKVStore) Get

func (m *MKVStore) Get(key string) (string, error)

func (*MKVStore) GetAllKeys

func (m *MKVStore) GetAllKeys() ([]string, error)

func (*MKVStore) Remove

func (m *MKVStore) Remove(key string) error

remove key

func (*MKVStore) Set

func (m *MKVStore) Set(key string, value string, expires time.Duration) error

Set persist the value with key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL