Skip to content

Latest commit

 

History

History
80 lines (44 loc) · 1.39 KB

README.md

File metadata and controls

80 lines (44 loc) · 1.39 KB

Name Service ZkApp Example

User-facing Functions

settle()

Allows anyone to submit the settlement proof generated by the Offchain State ZkProgram

register_name()

Allows a user to register a name with the given name and name record. This method emits a state change event for the offchain mapping. The state change requires the from value to be undefined and the to value to be the name. This state change is not applied directly but is applied when emitted state change actions are settled.

set_record()

Allows a name owner to update name record.

transfer_name_ownership()

Allow a name owner to transfer name's ownership.

owner_of()

Returns owner of the given name

resolve_name()

Returns name record of the given name

premium_rate()

Returns premium rate in nanoMINA

get_admin()

Returns the current admin

is_paused()

Returns true if the zkapp is paused

Admin Functions

set_premium()

Allows admin to set and update premium rate.

toggle_pause()

Allows admin to pause or unpause the zkapp

change_admin()

Allows admin to transfer admin rights.

How to Build & Test

How to build

npm run build

How to run tests

npm run test
npm run test:provable # test proofsEnabled=true
npm run test:all # run all tests

How to run coverage

npm run coverage

License

Apache-2.0