Documentation ¶
Index ¶
- func GetKMSClient(secretId string, secretKey string, region string, endpoint string) *kms.Client
- func SigDigest(chainID, payload, contextFreeData []byte) []byte
- type TencentKMSKeyBag
- func (b *TencentKMSKeyBag) Add(wifKey string) error
- func (b *TencentKMSKeyBag) AddKMSKeyById(kmsId string) (string, error)
- func (b *TencentKMSKeyBag) Append(privateKey *ecc.PrivateKey) error
- func (b *TencentKMSKeyBag) AvailableKeys(ctx context.Context) (out []ecc.PublicKey, err error)
- func (b *TencentKMSKeyBag) ImportFromFile(path string) error
- func (b *TencentKMSKeyBag) ImportPrivateKey(ctx context.Context, wifPrivKey string) (err error)
- func (b *TencentKMSKeyBag) ImportPrivateKeyFromEnv(ctx context.Context, envVarName string) error
- func (b *TencentKMSKeyBag) Sign(ctx context.Context, tx *zsw.SignedTransaction, chainID []byte, ...) (*zsw.SignedTransaction, error)
- func (b *TencentKMSKeyBag) SignDigest(digest []byte, requiredKey ecc.PublicKey) (ecc.Signature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKMSClient ¶
Types ¶
type TencentKMSKeyBag ¶
type TencentKMSKeyBag struct { Keys []*ecc.PrivateKey `json:"keys"` PublicKeyToKMSIdMap map[string]string `json:"publicKeyToKMSIdMap"` KMSClient *kms.Client }
func NewTencentKMSKeyBag ¶
func NewTencentKMSKeyBag(client *kms.Client) *TencentKMSKeyBag
func (*TencentKMSKeyBag) Add ¶
func (b *TencentKMSKeyBag) Add(wifKey string) error
func (*TencentKMSKeyBag) AddKMSKeyById ¶
func (b *TencentKMSKeyBag) AddKMSKeyById(kmsId string) (string, error)
func (*TencentKMSKeyBag) Append ¶
func (b *TencentKMSKeyBag) Append(privateKey *ecc.PrivateKey) error
func (*TencentKMSKeyBag) AvailableKeys ¶
func (*TencentKMSKeyBag) ImportFromFile ¶
func (b *TencentKMSKeyBag) ImportFromFile(path string) error
func (*TencentKMSKeyBag) ImportPrivateKey ¶
func (b *TencentKMSKeyBag) ImportPrivateKey(ctx context.Context, wifPrivKey string) (err error)
func (*TencentKMSKeyBag) ImportPrivateKeyFromEnv ¶
func (b *TencentKMSKeyBag) ImportPrivateKeyFromEnv(ctx context.Context, envVarName string) error
func (*TencentKMSKeyBag) Sign ¶
func (b *TencentKMSKeyBag) Sign(ctx context.Context, tx *zsw.SignedTransaction, chainID []byte, requiredKeys ...ecc.PublicKey) (*zsw.SignedTransaction, error)
func (*TencentKMSKeyBag) SignDigest ¶
Click to show internal directories.
Click to hide internal directories.