Skip to content

TrustStore: Unify interfaces #3525

@oncilla

Description

@oncilla

The trust store interface is out of sync.

type CryptoProvider interface {
	GetTRC(ctx context.Context, isd addr.ISD, version scrypto.Version, opts infra.TRCOpts) (*trc.TRC, error)
	GetRawTRC(ctx context.Context, isd addr.ISD, version scrypto.Version, opts infra.TRCOpts, client net.Addr) ([]byte, error)
	GetRawChain(ctx context.Context, ia addr.IA, version scrypto.Version, opts infra.ChainOpts, client net.Addr) ([]byte, error)
	GetASKey(context.Context, ChainID, *infra.ChainOpts) (*scrypto.KeyMeta, error)
}

It should be made consistent:

  • The client address can be moved to infra.TrustStoreOpts
  • Introduce type TRCID similar to ChainID (maybe move definitions to scyrpto/trc/v2 and scrypto/cert/v2)
  • use value type instead of pointer everywhere.

Check other interfaces for inconsistencies too.

Metadata

Metadata

Labels

c/CPPKISCION Control-plane PKI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions