You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can define type proxies for Address and Pubkey to improve the code readability of the btc lib. However, it would take some time to search for relevant code and update it. So, the discussion is: Do you think we should define the two type proxies, and do you think the change is worthwhile?
The original comment was discussing about how to make the type of pubkeyMap more clear, in the PR I've chosen a simpler solution to only define a type AddressToPubkeyMap with an explanation comment:
/** * Type: Record<Address, Pubkey> * The map of address and pubkey, usually for recognizing the P2TR inputs in the transaction. */typeAddressToPubkeyMap=Record<string,string>;interfaceSendXProps{from: string;fromPubkey?: string;pubkeyMap?: AddressToPubkeyMap;}
The text was updated successfully, but these errors were encountered:
We can define type proxies for
Address
andPubkey
to improve the code readability of the btc lib. However, it would take some time to search for relevant code and update it. So, the discussion is: Do you think we should define the two type proxies, and do you think the change is worthwhile?From this:
Which can be refactored to this:
Original commented at: #228 (comment)
The original comment was discussing about how to make the type of
pubkeyMap
more clear, in the PR I've chosen a simpler solution to only define a typeAddressToPubkeyMap
with an explanation comment:The text was updated successfully, but these errors were encountered: