github.com/MetalBlockchain/subnet-evm@v0.4.9/warp/warp_service.go (about) 1 // (c) 2023, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package warp 5 6 import ( 7 "context" 8 "fmt" 9 10 "github.com/MetalBlockchain/metalgo/ids" 11 "github.com/ethereum/go-ethereum/common/hexutil" 12 ) 13 14 // WarpAPI introduces snowman specific functionality to the evm 15 type WarpAPI struct { 16 Backend WarpBackend 17 } 18 19 // GetSignature returns the BLS signature associated with a messageID. 20 func (api *WarpAPI) GetSignature(ctx context.Context, messageID ids.ID) (hexutil.Bytes, error) { 21 signature, err := api.Backend.GetSignature(ctx, messageID) 22 if err != nil { 23 return nil, fmt.Errorf("failed to get signature for with error %w", err) 24 } 25 return signature[:], nil 26 }