@veridex/sdk 1.0.0-beta.8 → 1.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chains/aptos/index.js +3 -3
- package/dist/chains/aptos/index.js.map +1 -1
- package/dist/chains/aptos/index.mjs +3 -3
- package/dist/chains/aptos/index.mjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3858,12 +3858,12 @@ var AptosClient = class {
|
|
|
3858
3858
|
*/
|
|
3859
3859
|
async getVaultAddress(userKeyHash) {
|
|
3860
3860
|
try {
|
|
3861
|
-
const
|
|
3861
|
+
const keyHashHex = userKeyHash.startsWith("0x") ? userKeyHash.toLowerCase().padStart(66, "0").replace(/^0+/, "0x").padStart(66, "0") : `0x${userKeyHash.toLowerCase().padStart(64, "0")}`;
|
|
3862
3862
|
const payload = {
|
|
3863
3863
|
function: `${this.moduleAddress}::spoke::get_vault_address`,
|
|
3864
3864
|
type_arguments: [],
|
|
3865
|
-
arguments: [
|
|
3866
|
-
// Pass as
|
|
3865
|
+
arguments: [keyHashHex]
|
|
3866
|
+
// Pass as hex string for vector<u8>
|
|
3867
3867
|
};
|
|
3868
3868
|
const response = await this.client.view(payload);
|
|
3869
3869
|
if (response && response.length > 0) {
|