@@ -945,6 +945,31 @@ func (c *ChainlinkClient) ImportVRFKey(vrfExportKey *VRFExportKey) (*VRFKey, *ht
945945 return vrfKey , resp .RawResponse , err
946946}
947947
948+ // ReadWorkflowKeys reads all Workflow keys from the Chainlink node
949+ func (c * ChainlinkClient ) ReadWorkflowKeys () (* WorkflowKeys , * http.Response , error ) {
950+ workflowKeys := & WorkflowKeys {}
951+ framework .L .Info ().Str (NodeURL , c .Config .URL ).Msg ("Reading Workflow Keys" )
952+ resp , err := c .APIClient .R ().
953+ SetResult (workflowKeys ).
954+ Get ("/v2/keys/workflow" )
955+ if err != nil {
956+ return nil , nil , err
957+ }
958+ if len (workflowKeys .Data ) == 0 {
959+ framework .L .Warn ().Str (NodeURL , c .Config .URL ).Msg ("Found no Workflow Keys on the node" )
960+ }
961+ return workflowKeys , resp .RawResponse , err
962+ }
963+
964+ // MustReadWorkflowKeys reads all Workflow keys from the Chainlink node
965+ func (c * ChainlinkClient ) MustReadWorkflowKeys () (* WorkflowKeys , * http.Response , error ) {
966+ workflowKeys , res , err := c .ReadWorkflowKeys ()
967+ if err != nil {
968+ return nil , res , err
969+ }
970+ return workflowKeys , res , VerifyStatusCode (res .StatusCode , http .StatusOK )
971+ }
972+
948973// CreateCSAKey creates a CSA key on the Chainlink node, only 1 CSA key per node
949974func (c * ChainlinkClient ) CreateCSAKey () (* CSAKey , * http.Response , error ) {
950975 csaKey := & CSAKey {}
0 commit comments