deso-protocol
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "deso-protocol", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Client side typescript/javascript SDK for building web3 applications for the DeSo blockchain.", |
@@ -6,2 +6,16 @@ import { hexToBytes } from '@noble/hashes/utils'; | ||
const buildRegisterAsValidatorMetadata = (params) => { | ||
let parsedVotingPublicKey; | ||
let parsedVotingAuthorization; | ||
try { | ||
parsedVotingPublicKey = hexToBytes(stripHexPrefix(params.VotingPublicKey)); | ||
} | ||
catch (e) { | ||
throw new Error('Error parsing voting public key: ' + String(e)); | ||
} | ||
try { | ||
parsedVotingAuthorization = hexToBytes(stripHexPrefix(params.VotingAuthorization)); | ||
} | ||
catch (e) { | ||
throw new Error('Error parsing voting authorization: ' + String(e)); | ||
} | ||
const metadata = new TransactionMetadataRegisterAsValidator(); | ||
@@ -12,4 +26,4 @@ metadata.domains = params.Domains.map((d) => encodeUTF8ToBytes(d)); | ||
metadata.disableDelegatedStake = params.DisableDelegatedStake; | ||
metadata.votingPublicKey = hexToBytes(stripHexPrefix(params.VotingPublicKey)); | ||
metadata.votingAuthorization = hexToBytes(stripHexPrefix(params.VotingAuthorization)); | ||
metadata.votingPublicKey = parsedVotingPublicKey; | ||
metadata.votingAuthorization = parsedVotingAuthorization; | ||
return metadata; | ||
@@ -110,2 +124,2 @@ }; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zYWN0aW9ucy92YWxpZGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBUWpELE9BQU8sRUFDTCxzQ0FBc0MsRUFDdEMsa0NB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gICAgICAgICAgPy5VTlJFR0lTVEVSX0FTX1ZBTElEQVRPUiA/P1xuICAgICAgICAgIDEsXG4gICAgICB9LFxuICAgIH0pO1xuICB9XG5cbiAgcmV0dXJuIGhhbmRsZVNpZ25BbmRTdWJtaXQoJ2FwaS92MC92YWxpZGF0b3JzL3VuamFpbCcsIHBhcmFtcywge1xuICAgIC4uLm9wdGlvbnMsXG4gICAgY29uc3RydWN0aW9uRnVuY3Rpb246IGNvbnN0cnVjdFVuamFpbFZhbGlkYXRvclRyYW5zYWN0aW9uLFxuICB9KTtcbn07XG4iXX0= |
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
1683107
15490