Closed speedingonatram closed 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>
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)
addAddress(coin: string, zonefile: string, primary: boolean)
Remove an address from a coin's record: removeAddress(coin: string, zonefile: string)
removeAddress(coin: string, zonefile: string)
Remove a coin's txt record entirely: removeCoin(coin: string)
removeCoin(coin: string)
Something to consider is, if we removed the last address for a coin, should we automatically delete that record?
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?