social-graph-registry
SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBTSource Code
;; social-graph-registry.clar
;; Identity mapping
(define-map profiles principal {handle: (string-ascii 20), bio: (string-ascii 100)})
(define-public (register (handle (string-ascii 20)) (bio (string-ascii 100)))
(begin
(map-set profiles tx-sender {handle: handle, bio: bio})
(ok true)
)
)
(define-read-only (get-profile (user principal))
(map-get? profiles user)
)
Functions (2)
| Function | Access | Args |
|---|---|---|
| register | public | handle: (string-ascii 20 |
| get-profile | read-only | user: principal |