Skip to content

improvements #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ clean:
docker network prune -f
docker container prune -f
rm -rf ./integration/token/fungible/dlog/cmd/
rm -rf ./integration/token/fungible/dlog/testdata/
rm -rf ./integration/token/fungible/dloghsm/cmd/
rm -rf ./integration/token/fungible/dloghsm/testdata/
rm -rf ./integration/token/fungible/dlogstress/cmd/
rm -rf ./integration/token/fungible/dlogstress/testdata/
rm -rf ./integration/token/fungible/fabtoken/cmd/
rm -rf ./integration/token/fungible/fabtoken/testdata/
rm -rf ./integration/token/fungible/odlog/cmd/
rm -rf ./integration/token/fungible/ofabtoken/cmd/
rm -rf ./integration/token/fungible/mixed/cmd/
Expand Down
16 changes: 16 additions & 0 deletions ci/scripts/cleanup_softhsm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

LABEL_TO_DELETE="ForFSC"

# Get all slot numbers
slots=$(softhsm2-util --show-slots | grep "Slot " | awk '{print $2}')

for slot in $slots
do
# Check if the token in this slot has the label we want to delete
label=$(softhsm2-util --show-slots | grep -A 2 "Slot $slot" | grep "Label:" | awk '{print $2}')
if [ "$label" == "$LABEL_TO_DELETE" ]; then
echo "Deleting token in slot $slot with label $LABEL_TO_DELETE"
softhsm2-util --delete-token --token "$LABEL_TO_DELETE"
fi
done
5 changes: 0 additions & 5 deletions ci/scripts/setup_softhsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
# Create tokens inside tmp folder
echo directories.tokendir = /tmp > $CONFIGPATH/softhsm2.conf

#Delete existing token
# softhsm2-util --delete-token --token "ForFSC" || true

echo "Initializing tokens..."
softhsm2-util --init-token --free --label "ForFSC" --so-pin 1234 --pin 98765432

else

#Create directory to store hsm tokens
sudo mkdir -p /var/lib/softhsm/tokens
#Delete existing token
softhsm2-util --delete-token --token "ForFSC" || true

echo "Initializing tokens..."
sudo softhsm2-util --init-token --slot 0 --label "ForFSC" --so-pin 1234 --pin 98765432
Expand Down
2 changes: 1 addition & 1 deletion docs/core-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ token:
# Therefore, also FSC nodes equipped with proper endorsement keys can perform the same function.
# This section is dedicated to the configuration of the endorsement of the token chaincode by
# other FSC nodes.
endorsement:
fsc_endorsement:
# Is this node an endorser?: true/false
endorser: true
# If this node is an endorser, which Fabric identity should be used to sign the endorsement?
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/IBM/mathlib v0.0.3-0.20231011094432-44ee0eb539da
github.com/gin-gonic/gin v1.10.0
github.com/hashicorp/go-uuid v1.0.3
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241005130302-4dc84b0086d5
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241021061520-9b09a4cb3756
github.com/hyperledger-labs/orion-sdk-go v0.2.10
github.com/hyperledger-labs/orion-server v0.2.10
github.com/hyperledger/fabric v1.4.0-rc1.0.20230405174026-695dd57e01c2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,8 @@ github.com/hidal-go/hidalgo v0.0.0-20201109092204-05749a6d73df/go.mod h1:bPkrxDl
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241005130302-4dc84b0086d5 h1:wth+4n2Ej29MHwywtJkKWnlsEuFhFd+qSKhYLUDYlYY=
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241005130302-4dc84b0086d5/go.mod h1:vZLAiVznnEdHyx1OV5nIqf34apnfdhonwJL+qEYniIQ=
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241021061520-9b09a4cb3756 h1:kJqTELZpGmccM32uLEHdqASOUODOM6J6yjNPiIWvGhg=
github.com/hyperledger-labs/fabric-smart-client v0.3.1-0.20241021061520-9b09a4cb3756/go.mod h1:vZLAiVznnEdHyx1OV5nIqf34apnfdhonwJL+qEYniIQ=
github.com/hyperledger-labs/orion-sdk-go v0.2.10 h1:lFgWgxyvngIhWnIqymYGBmtmq9D6uC5d0uLG9cbyh5s=
github.com/hyperledger-labs/orion-sdk-go v0.2.10/go.mod h1:iN2xZB964AqwVJwL+EnwPOs8z1EkMEbbIg/qYeC7gDY=
github.com/hyperledger-labs/orion-server v0.2.10 h1:G4zbQEL5Egk0Oj+TwHCZWdTOLDBHOjaAEvYOT4G7ozw=
Expand Down
8 changes: 4 additions & 4 deletions integration/nwo/token/common/ppmgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (f *FabTokenPublicParamsGenerator) Generate(tms *topology.TMS, wallets *gen
}
for _, auditor := range wallets.Auditors {
// Build an MSP Identity
provider, _, err := x509.NewProvider(auditor.Path, "", msp2.AuditorMSPID, nil, auditor.Opts)
provider, _, err := x509.NewKeyManager(auditor.Path, "", msp2.AuditorMSPID, nil, auditor.Opts)
if err != nil {
return nil, errors.WithMessage(err, "failed to create x509 provider")
}
Expand All @@ -74,7 +74,7 @@ func (f *FabTokenPublicParamsGenerator) Generate(tms *topology.TMS, wallets *gen
}
for _, issuer := range wallets.Issuers {
// Build an MSP Identity
provider, _, err := x509.NewProvider(issuer.Path, "", msp2.AuditorMSPID, nil, issuer.Opts)
provider, _, err := x509.NewKeyManager(issuer.Path, "", msp2.AuditorMSPID, nil, issuer.Opts)
if err != nil {
return nil, errors.WithMessage(err, "failed to create x509 provider")
}
Expand Down Expand Up @@ -148,7 +148,7 @@ func (d *DLogPublicParamsGenerator) Generate(tms *topology.TMS, wallets *generat
}
for _, auditor := range wallets.Auditors {
// Build an MSP Identity
provider, _, err := x509.NewProvider(auditor.Path, "", msp2.AuditorMSPID, nil, auditor.Opts)
provider, _, err := x509.NewKeyManager(auditor.Path, "", msp2.AuditorMSPID, nil, auditor.Opts)
if err != nil {
return nil, errors.WithMessage(err, "failed to create x509 provider")
}
Expand All @@ -168,7 +168,7 @@ func (d *DLogPublicParamsGenerator) Generate(tms *topology.TMS, wallets *generat
}
for _, issuer := range wallets.Issuers {
// Build an MSP Identity
provider, _, err := x509.NewProvider(issuer.Path, "", msp2.AuditorMSPID, nil, issuer.Opts)
provider, _, err := x509.NewKeyManager(issuer.Path, "", msp2.AuditorMSPID, nil, issuer.Opts)
if err != nil {
return nil, errors.WithMessage(err, "failed to create x509 provider")
}
Expand Down
2 changes: 1 addition & 1 deletion integration/token/fungible/dlog/dlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func newTestSuite(commType fsc.P2PCommunicationType, mask int, factor int, token
Monitoring: false,
ReplicationOpts: opts,
FSCBasedEndorsement: mask&WithEndorsers > 0,
//FSCLogSpec: "token-sdk=debug:fabric-sdk=debug:info",
// FSCLogSpec: "token-sdk=debug:fabric-sdk=debug:info",
OnlyUnity: true,
TokenSelector: tokenSelector,
},
Expand Down
1 change: 1 addition & 0 deletions integration/token/fungible/dloghsm/dlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func newTestSuite(commType fsc.P2PCommunicationType, mask int, factor int, names
HSM: mask&HSM > 0,
WebEnabled: mask&WebEnabled > 0,
SDKs: []api.SDK{&fdlog.SDK{}},
// FSCLogSpec: "token-sdk=debug:fabric-sdk=debug:info",
ReplicationOpts: opts,
OnlyUnity: true,
},
Expand Down
4 changes: 2 additions & 2 deletions integration/token/fungible/fabtoken/fabtoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

var _ = Describe("EndToEnd", func() {
for _, t := range integration2.WebSocketNoReplicationOnly {
for _, t := range integration2.AllTestTypes {
Describe("Fungible", t.Label, func() {
ts, selector := newTestSuite(t.CommType, t.ReplicationFactor, "alice", "bob", "charlie")
BeforeEach(ts.Setup)
Expand Down Expand Up @@ -65,7 +65,7 @@ func newTestSuite(commType fsc.P2PCommunicationType, factor int, names ...string
SDKs: []api.SDK{&ffabtoken.SDK{}},
ReplicationOpts: opts,
WebEnabled: true, // Needed for the Remote Wallet with websockets
//FSCLogSpec: "token-sdk=debug:fabric-sdk=debug:info",
// FSCLogSpec: "token-sdk=debug:fabric-sdk=debug:info",
OnlyUnity: true,
},
))
Expand Down
13 changes: 9 additions & 4 deletions integration/token/fungible/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func RegisterAuditorForTMSID(network *integration.Infrastructure, auditor *token

func getTmsId(network *integration.Infrastructure, namespace string) *token2.TMSID {
fabricTopology := getFabricTopology(network)
Expect(fabricTopology).NotTo(BeNil())
return &token2.TMSID{
Network: fabricTopology.Name(),
Channel: fabricTopology.Channels[0].Name,
Expand All @@ -73,7 +74,7 @@ func getFabricTopology(network *integration.Infrastructure) *topology2.Topology
return t.(*topology2.Topology)
}
}
panic("no fabric topology found")
return nil
}

func IssueCash(network *integration.Infrastructure, wallet string, typ string, amount uint64, receiver *token3.NodeReference, auditor *token3.NodeReference, anonymous bool, issuer *token3.NodeReference, expectedErrorMsgs ...string) string {
Expand Down Expand Up @@ -112,8 +113,11 @@ func issueCashForTMSID(network *integration.Infrastructure, wallet string, typ s
for _, n := range []*token3.NodeReference{receiver, auditor} {
common2.CheckFinality(network, n, txID, tmsId, false)
}
for _, n := range endorsers {
common2.CheckEndorserFinality(network, n, txID, tmsId, false)
// Perform this check only if there is a fabric network
if getFabricTopology(network) != nil {
for _, n := range endorsers {
common2.CheckEndorserFinality(network, n, txID, tmsId, false)
}
}
return common.JSONUnmarshalString(txIDBoxed)
}
Expand Down Expand Up @@ -1023,7 +1027,8 @@ func Restart(network *integration.Infrastructure, deleteVault bool, ids ...*toke
if on != nil {
on.DeleteVault(id.Id())
} else {
Expect(false).To(BeTrue(), "neither fabric nor orion network found")
// TODO: handle additional platforms
logger.Warnf("neither fabric nor orion network found")
}
}

Expand Down
13 changes: 10 additions & 3 deletions token/core/common/authrorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import (
"github.com/hyperledger-labs/fabric-token-sdk/token"
"github.com/hyperledger-labs/fabric-token-sdk/token/driver"
"github.com/hyperledger-labs/fabric-token-sdk/token/services/identity"
"github.com/hyperledger-labs/fabric-token-sdk/token/services/logging"
token2 "github.com/hyperledger-labs/fabric-token-sdk/token/token"
"github.com/pkg/errors"
)

type Authorization interface {
Expand All @@ -27,20 +29,25 @@ type Authorization interface {

// WalletBasedAuthorization is a wallet-based authorization implementation
type WalletBasedAuthorization struct {
Logger logging.Logger
PublicParameters driver.PublicParameters
WalletService driver.WalletService
amIAnAuditor bool
}

func NewTMSAuthorization(publicParameters driver.PublicParameters, walletService driver.WalletService) *WalletBasedAuthorization {
func NewTMSAuthorization(logger logging.Logger, publicParameters driver.PublicParameters, walletService driver.WalletService) *WalletBasedAuthorization {
amIAnAuditor := false
var errs []error
for _, identity := range publicParameters.Auditors() {
if _, err := walletService.AuditorWallet(identity); err == nil {
_, err := walletService.AuditorWallet(identity)
if err == nil {
amIAnAuditor = true
break
}
errs = append(errs, errors.Wrapf(err, "I'm not this auditor identity [%s]", identity))
}
return &WalletBasedAuthorization{PublicParameters: publicParameters, WalletService: walletService, amIAnAuditor: amIAnAuditor}
logger.Debugf("am I an auditor? [%v], with errs [%v]", amIAnAuditor, errs)
return &WalletBasedAuthorization{Logger: logger, PublicParameters: publicParameters, WalletService: walletService, amIAnAuditor: amIAnAuditor}
}

// IsMine returns true if the passed token is owned by an owner wallet.
Expand Down
50 changes: 25 additions & 25 deletions token/core/common/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ const (
TokenRequestToSign driver.ValidationAttributeID = "trs"
)

type Context[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction] struct {
type Context[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer] struct {
Logger logging.Logger
PP P
Deserializer driver.Deserializer
Deserializer DS
SignatureProvider driver.SignatureProvider
Signatures [][]byte
InputTokens []T
Expand All @@ -34,38 +34,38 @@ type Context[P driver.PublicParameters, T any, TA driver.TransferAction, IA driv
Attributes driver.ValidationAttributes
}

func (c *Context[P, T, TA, IA]) CountMetadataKey(key string) {
func (c *Context[P, T, TA, IA, DS]) CountMetadataKey(key string) {
c.MetadataCounter[key] = c.MetadataCounter[key] + 1
}

type ValidateTransferFunc[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction] func(ctx *Context[P, T, TA, IA]) error
type ValidateTransferFunc[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer] func(ctx *Context[P, T, TA, IA, DS]) error

type ValidateIssueFunc[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction] func(ctx *Context[P, T, TA, IA]) error
type ValidateIssueFunc[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer] func(ctx *Context[P, T, TA, IA, DS]) error

type ActionDeserializer[TA driver.TransferAction, IA driver.IssueAction] interface {
DeserializeActions(tr *driver.TokenRequest) ([]IA, []TA, error)
}

type Validator[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction] struct {
type Validator[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer] struct {
Logger logging.Logger
PublicParams P
Deserializer driver.Deserializer
Deserializer DS
ActionDeserializer ActionDeserializer[TA, IA]
TransferValidators []ValidateTransferFunc[P, T, TA, IA]
IssueValidators []ValidateIssueFunc[P, T, TA, IA]
TransferValidators []ValidateTransferFunc[P, T, TA, IA, DS]
IssueValidators []ValidateIssueFunc[P, T, TA, IA, DS]
Serializer driver.Serializer
}

func NewValidator[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction](
func NewValidator[P driver.PublicParameters, T any, TA driver.TransferAction, IA driver.IssueAction, DS driver.Deserializer](
Logger logging.Logger,
publicParams P,
deserializer driver.Deserializer,
deserializer DS,
actionDeserializer ActionDeserializer[TA, IA],
transferValidators []ValidateTransferFunc[P, T, TA, IA],
issueValidators []ValidateIssueFunc[P, T, TA, IA],
transferValidators []ValidateTransferFunc[P, T, TA, IA, DS],
issueValidators []ValidateIssueFunc[P, T, TA, IA, DS],
serializer driver.Serializer,
) *Validator[P, T, TA, IA] {
return &Validator[P, T, TA, IA]{
) *Validator[P, T, TA, IA, DS] {
return &Validator[P, T, TA, IA, DS]{
Logger: Logger,
PublicParams: publicParams,
Deserializer: deserializer,
Expand All @@ -76,7 +76,7 @@ func NewValidator[P driver.PublicParameters, T any, TA driver.TransferAction, IA
}
}

func (v *Validator[P, T, TA, IA]) VerifyTokenRequestFromRaw(ctx context.Context, getState driver.GetStateFnc, anchor string, raw []byte) ([]interface{}, driver.ValidationAttributes, error) {
func (v *Validator[P, T, TA, IA, DS]) VerifyTokenRequestFromRaw(ctx context.Context, getState driver.GetStateFnc, anchor string, raw []byte) ([]interface{}, driver.ValidationAttributes, error) {
if len(raw) == 0 {
return nil, nil, errors.New("empty token request")
}
Expand Down Expand Up @@ -115,7 +115,7 @@ func (v *Validator[P, T, TA, IA]) VerifyTokenRequestFromRaw(ctx context.Context,
return v.VerifyTokenRequest(backend, backend, anchor, tr, attributes)
}

func (v *Validator[P, T, TA, IA]) VerifyTokenRequest(ledger driver.Ledger, signatureProvider driver.SignatureProvider, anchor string, tr *driver.TokenRequest, attributes driver.ValidationAttributes) ([]interface{}, driver.ValidationAttributes, error) {
func (v *Validator[P, T, TA, IA, DS]) VerifyTokenRequest(ledger driver.Ledger, signatureProvider driver.SignatureProvider, anchor string, tr *driver.TokenRequest, attributes driver.ValidationAttributes) ([]interface{}, driver.ValidationAttributes, error) {
if err := v.verifyAuditorSignature(signatureProvider, attributes); err != nil {
return nil, nil, errors.Wrapf(err, "failed to verifier auditor's signature [%s]", anchor)
}
Expand All @@ -142,7 +142,7 @@ func (v *Validator[P, T, TA, IA]) VerifyTokenRequest(ledger driver.Ledger, signa
return actions, attributes, nil
}

func (v *Validator[P, T, TA, IA]) UnmarshalActions(raw []byte) ([]interface{}, error) {
func (v *Validator[P, T, TA, IA, DS]) UnmarshalActions(raw []byte) ([]interface{}, error) {
tr := &driver.TokenRequest{}
err := tr.FromBytes(raw)
if err != nil {
Expand All @@ -163,7 +163,7 @@ func (v *Validator[P, T, TA, IA]) UnmarshalActions(raw []byte) ([]interface{}, e
return res, nil
}

func (v *Validator[P, T, TA, IA]) verifyAuditorSignature(signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
func (v *Validator[P, T, TA, IA, DS]) verifyAuditorSignature(signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
if len(v.PublicParams.Auditors()) != 0 {
auditor := v.PublicParams.Auditors()[0]
verifier, err := v.Deserializer.GetAuditorVerifier(auditor)
Expand All @@ -176,7 +176,7 @@ func (v *Validator[P, T, TA, IA]) verifyAuditorSignature(signatureProvider drive
return nil
}

func (v *Validator[P, T, TA, IA]) verifyIssues(ledger driver.Ledger, issues []IA, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
func (v *Validator[P, T, TA, IA, DS]) verifyIssues(ledger driver.Ledger, issues []IA, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
for _, issue := range issues {
if err := v.verifyIssue(issue, ledger, signatureProvider, attributes); err != nil {
return errors.Wrapf(err, "failed to verify transfer action")
Expand All @@ -185,8 +185,8 @@ func (v *Validator[P, T, TA, IA]) verifyIssues(ledger driver.Ledger, issues []IA
return nil
}

func (v *Validator[P, T, TA, IA]) verifyIssue(tr IA, ledger driver.Ledger, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
context := &Context[P, T, TA, IA]{
func (v *Validator[P, T, TA, IA, DS]) verifyIssue(tr IA, ledger driver.Ledger, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
context := &Context[P, T, TA, IA, DS]{
Logger: v.Logger,
PP: v.PublicParams,
Deserializer: v.Deserializer,
Expand Down Expand Up @@ -217,7 +217,7 @@ func (v *Validator[P, T, TA, IA]) verifyIssue(tr IA, ledger driver.Ledger, signa
return nil
}

func (v *Validator[P, T, TA, IA]) verifyTransfers(ledger driver.Ledger, transferActions []TA, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
func (v *Validator[P, T, TA, IA, DS]) verifyTransfers(ledger driver.Ledger, transferActions []TA, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
v.Logger.Debugf("check sender start...")
defer v.Logger.Debugf("check sender finished.")
for _, action := range transferActions {
Expand All @@ -228,8 +228,8 @@ func (v *Validator[P, T, TA, IA]) verifyTransfers(ledger driver.Ledger, transfer
return nil
}

func (v *Validator[P, T, TA, IA]) verifyTransfer(tr TA, ledger driver.Ledger, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
context := &Context[P, T, TA, IA]{
func (v *Validator[P, T, TA, IA, DS]) verifyTransfer(tr TA, ledger driver.Ledger, signatureProvider driver.SignatureProvider, attributes driver.ValidationAttributes) error {
context := &Context[P, T, TA, IA, DS]{
Logger: v.Logger,
PP: v.PublicParams,
Deserializer: v.Deserializer,
Expand Down
1 change: 1 addition & 0 deletions token/core/common/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type WalletRegistry interface {
RegisterWallet(id string, wallet driver.Wallet) error
BindIdentity(identity driver.Identity, eID string, wID string, meta any) error
ContainsIdentity(i driver.Identity, id string) bool
GetIdentityMetadata(identity driver.Identity, wID string, meta any) error
}

type WalletFactory interface {
Expand Down
Loading
Loading