Skip to content

Commit

Permalink
Merge pull request #73 from make-software/CMW-767/set-uref-permissions
Browse files Browse the repository at this point in the history
feat(uref): Add ability to set access for a Uref (CMW-767)
  • Loading branch information
Volodymyr-Kuchinskyi authored Dec 21, 2023
2 parents 61b8bcd + 3d0f28f commit fb240d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/key/uref.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func (v URef) ToPrefixedString() string {
return PrefixNameURef + hex.EncodeToString(v.data[:]) + "-0" + hex.EncodeToString([]byte{v.access})
}

func (v *URef) SetAccess(access UrefAccess) {
v.access = access
}

func (v *URef) UnmarshalJSON(data []byte) error {
var s string
if err := json.Unmarshal(data, &s); err != nil {
Expand Down

0 comments on commit fb240d5

Please sign in to comment.