web3swift
web3swift copied to clipboard
'paths' is deprecated: Please use addressStorage instead
When using the paths property of the BIP32Keystore class there is a warning saying "'paths' is deprecated: Please use addressStorage instead". The addressStorage property is declared as a private(set) property which results in its getter having an implicit internal access specifier since the entire class is marked as public. As a result it's not accessible outside the module.
One solution would be to mark the addressStorage property as public private(set).
can you please share your screen shot
Sure. Please find attached two screenshots. The getter of the addressStorage property has an implicitly internal protection level. Hence, it can't be accessed outside the web3swift module.
We are having the same issue. Not an issue yet as it still compiles, but we need a way to access addressStorage
. For example, getting the public key of a wallet (we need that for internal purposes) can only be done with code like in UNSAFE_getPrivateKeyData
but for that we need access to the path
I see that exactly this is done in 3.0.0 already, so the fix will be available on quite soon with next version release.
@fpillet speaking about retrieving public key, such method will be available within new CodableTransaction.sender
property again in version 3.0.0. It'll be calculated leveraging on private key data.
@yaroslavyaroslav Ok thanks! For our purposes we need to access both public and private keys of wallets we generate. We also need to perform ECDH but that's a different topic, I have a post-install script that customizes your secp256k1 config to enable the ECDH function :)