
from twisted.web.resource import Resource

import json
import nacl.encoding

class Ed25519Servlet(Resource):
    isLeaf = True

    def __init__(self, syd):
        self.sydent = syd

    def render_GET(self, request):
        pubKey = self.sydent.signers.ed25519.signing_key.verify_key
        pubKeyHex = pubKey.encode(encoder=nacl.encoding.HexEncoder)

        return json.dumps({'public_key':pubKeyHex})


from twisted.web.resource import Resource

import json
import nacl.encoding

class Ed25519Servlet(Resource):
    isLeaf = True

    def __init__(self, syd):
        self.sydent = syd

    def render_GET(self, request):
        pubKey = self.sydent.keyring.ed25519.verify_key
        pubKeyHex = pubKey.encode(encoder=nacl.encoding.HexEncoder)

        return json.dumps({'public_key':pubKeyHex})

Update pubkey servlet to s/signers/keyring
Update pubkey servlet to s/signers/keyring

  
  from twisted.web.resource import Resource
  
  import json
  import nacl.encoding
  
  class Ed25519Servlet(Resource):
      isLeaf = True
  
      def __init__(self, syd):
          self.sydent = syd
  
      def render_GET(self, request):
-         pubKey = self.sydent.signers.ed25519.signing_key.verify_key
+         pubKey = self.sydent.keyring.ed25519.verify_key
          pubKeyHex = pubKey.encode(encoder=nacl.encoding.HexEncoder)
  
          return json.dumps({'public_key':pubKeyHex})
  
Update pubkey servlet to s/signers/keyring
## Code Before:

from twisted.web.resource import Resource

import json
import nacl.encoding

class Ed25519Servlet(Resource):
    isLeaf = True

    def __init__(self, syd):
        self.sydent = syd

    def render_GET(self, request):
        pubKey = self.sydent.signers.ed25519.signing_key.verify_key
        pubKeyHex = pubKey.encode(encoder=nacl.encoding.HexEncoder)

        return json.dumps({'public_key':pubKeyHex})

## Instruction:
Update pubkey servlet to s/signers/keyring
## Code After:

from twisted.web.resource import Resource

import json
import nacl.encoding

class Ed25519Servlet(Resource):
    isLeaf = True

    def __init__(self, syd):
        self.sydent = syd

    def render_GET(self, request):
        pubKey = self.sydent.keyring.ed25519.verify_key
        pubKeyHex = pubKey.encode(encoder=nacl.encoding.HexEncoder)

        return json.dumps({'public_key':pubKeyHex})
