secretkeylabs / bns-zonefile

MIT License
1 stars 1 forks source link

Initial commit #1

Closed speedingonatram closed 1 year ago

yknl commented 1 year ago

In terms of the public API, as a consumer I would probably expect something like this:

Return all addresses for a coin: getAddresses(coin: string, zonefile: string): Array<string>

Optionally include a function to get the primary/first address:

getPrimaryAddress(coin: string, zonefile: string): string

Add an address for a coin, option to set it as the primary/first address: addAddress(coin: string, zonefile: string, primary: boolean)

Remove an address from a coin's record: removeAddress(coin: string, zonefile: string)

Remove a coin's txt record entirely: removeCoin(coin: string)

Something to consider is, if we removed the last address for a coin, should we automatically delete that record?