Replies: 2 comments 2 replies
-
How about The word "Active" could be easily linked to "have some relevant transactions on the blockchain", I think it's comprehensive. |
Beta Was this translation helpful? Give feedback.
-
I think In other words, the name 'used' / 'unused' is ok. It's the previous definition of 'used' / 'unused' - whether it's observable on chain - inappropriate. |
Beta Was this translation helpful? Give feedback.
-
As an HD wallet extension, Nexus uses a key derivation strategy similar to BIP-44 for keys with full ownership. By monitoring whether a certain public key has a transaction record on the chain, the next set of gap (default 20) locks are derived and provided to dApps for assembling transactions.
Initially, we named these two APIs
getUnusedLocks
andgetUsedLocks
. However, we realized that this API was not entirely accurate. A dApp might obtain a lock throughgetUnusedLocks
, but that lock might only be used to generate a lock hash for simulating P2SH, such as the 0xFC authentication used by Omnilock. In this case, we have used the lock semantically, but the lock would not appear on the chain. Therefore, it would still appear in the results ofgetUnusedLocks
. As a result, we changed the names togetOnChainLocks
andgetOffChainLocks
. While these RPC method names are more practical, they may not be easy to understand. dApp developers may need to have a good understanding of the background to know which RPC to use in this situation.Therefore, I opened an issue to discuss whether there are more appropriate names for these two RPC methods. One suggestion we received was
getRevealedLocks
andgetUnrevealedLocks
, which is clearer thanOnChain
andOffChain
, but still requires dApp developers to be familiar with the relevant background.@janx @zhangyouxin @zhb666 @IronLu233
Beta Was this translation helpful? Give feedback.
All reactions