@exodus/aptos-sdk-fork
Advanced tools
Comparing version 1.19.2 to 1.19.3
@@ -55,3 +55,3 @@ { | ||
}, | ||
"version": "1.19.2" | ||
"version": "1.19.3" | ||
} |
@@ -39,2 +39,9 @@ // Copyright © Aptos Foundation | ||
static addressFromPublicKey(publicKey: any) { | ||
const uint8Array = HexString.ensure(publicKey).toUint8Array() | ||
const pubKey = new Ed25519PublicKey(uint8Array); | ||
const authKey = AuthenticationKey.fromEd25519PublicKey(pubKey); | ||
return authKey.derivedAddress().hex(); | ||
} | ||
/** | ||
@@ -41,0 +48,0 @@ * Check's if the derive path is valid |
@@ -17,2 +17,7 @@ // Copyright © Aptos Foundation | ||
test("addressFromPublicKey", () => { | ||
const address = AptosAccount.addressFromPublicKey(aptosAccountObject.publicKeyHex); | ||
expect(address).toBe(aptosAccountObject.address); | ||
}); | ||
test("generates random accounts", () => { | ||
@@ -19,0 +24,0 @@ const a1 = new AptosAccount(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1482257
66
11907
0