Source Code

;; Implementation 5

;; Name Registry
(define-map identities principal (string-utf8 50))

(define-public (register (label (string-utf8 50)))
  (ok (map-set identities tx-sender label))
)

(define-read-only (get-label (who principal))
  (ok (map-get? identities who))
)

(define-read-only (get-my-label)
  (ok (map-get? identities tx-sender))
)

Functions (3)

FunctionAccessArgs
registerpubliclabel: (string-utf8 50
get-labelread-onlywho: principal
get-my-labelread-only