New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →

@emurgo/yoroi-lib

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emurgo/yoroi-lib - npm Package Compare versions

Comparing version

to
0.1.1

@@ -31,3 +31,3 @@ import { BigNumber } from 'bignumber.js';

}, defaultToken: Token, absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, withdrawalRequests: Array<WithdrawalRequest>, changeAddr: AddressingAddress, config: CardanoHaskellConfig, txOptions: TxOptions): Promise<UnsignedTx>;
createUnsignedVotingTx(absSlotNumber: BigNumber, defaultToken: Token, votingPublicKey: PublicKey, stakingKeyPath: number[], stakingPublicKey: PublicKey, utxos: Array<CardanoAddressedUtxo>, changeAddr: AddressingAddress, config: CardanoHaskellConfig, txOptions: TxOptions, nonce: number, networkId: number, signer: (hashedMetadata: Uint8Array) => Promise<string>): Promise<UnsignedTx>;
createUnsignedVotingTx(absSlotNumber: BigNumber, defaultToken: Token, votingPublicKey: PublicKey, stakingKeyPath: number[], stakingPublicKey: PublicKey, utxos: Array<CardanoAddressedUtxo>, changeAddr: AddressingAddress, config: CardanoHaskellConfig, txOptions: TxOptions, nonce: number, networkId: number): Promise<UnsignedTx>;
createUnsignedDelegationTx(absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, stakingKey: PublicKey, registrationStatus: RegistrationStatus, poolId: string | null, changeAddr: AddressingAddress, valueInAccount: MultiTokenValue, defaultToken: Token, txOptions: TxOptions, config: CardanoHaskellConfig): Promise<UnsignedTx>;

@@ -34,0 +34,0 @@ buildLedgerPayload(unsignedTx: UnsignedTx, networkId: number, byronNetworkMagic: number, stakingDerivationPath?: number[]): Promise<LedgerSignTransactionRequest>;

@@ -108,3 +108,3 @@ "use strict";

}
createUnsignedVotingTx(absSlotNumber, defaultToken, votingPublicKey, stakingKeyPath, stakingPublicKey, utxos, changeAddr, config, txOptions, nonce, networkId, signer) {
createUnsignedVotingTx(absSlotNumber, defaultToken, votingPublicKey, stakingKeyPath, stakingPublicKey, utxos, changeAddr, config, txOptions, nonce, networkId) {
return __awaiter(this, void 0, void 0, function* () {

@@ -118,3 +118,3 @@ const votingPublicKeyHex = Buffer.from(yield votingPublicKey.asBytes()).toString('hex');

.then(b => Buffer.from(b).toString('hex'));
const auxData = yield (0, transactions_1.generateRegistrationMetadata)(this.Wasm, votingPublicKeyHex, stakingPublicKeyHex, rewardAddressHex, nonce, signer);
const auxData = yield (0, transactions_1.generateRegistrationMetadata)(this.Wasm, votingPublicKeyHex, stakingPublicKeyHex, rewardAddressHex, nonce, () => Promise.resolve('0'.repeat(64 * 2)));
const protocolParams = {

@@ -121,0 +121,0 @@ keyDeposit: yield this._wasmV4.BigNum.fromStr(config.keyDeposit),

@@ -184,3 +184,2 @@ "use strict";

sign(keyLevel, privateKey, stakingKeyWits, stakingKeys) {
var _a;
return __awaiter(this, void 0, void 0, function* () {

@@ -248,4 +247,13 @@ const signingKey = yield this._wasm.Bip32PrivateKey.fromBytes(Buffer.from(privateKey, 'hex'));

yield witnessSet.setVkeys(vkeyWits);
const signedTx = yield this._wasm.Transaction.new(this._txBody, witnessSet, this.auxiliaryData && ((_a = this._auxiliaryData) === null || _a === void 0 ? void 0 : _a.hasValue())
? this.auxiliaryData
let auxData = this.auxiliaryData;
if (auxData && auxData.hasValue()) {
if (this.catalystRegistrationData) {
auxData = yield (0, transactions_1.generateRegistrationMetadata)(this._wasm, this.catalystRegistrationData.votingPublicKeyHex, this.catalystRegistrationData.stakingPublicKeyHex, this.catalystRegistrationData.rewardAddressHex, this.catalystRegistrationData.nonce, (meta) => signingKey
.toRawKey()
.then(k => k.sign(meta))
.then(s => s.toHex()));
}
}
const signedTx = yield this._wasm.Transaction.new(this._txBody, witnessSet, auxData && auxData.hasValue()
? auxData
: yield this.wasm.AuxiliaryData.empty());

@@ -252,0 +260,0 @@ const signedTxBody = yield signedTx.body();

{
"name": "@emurgo/yoroi-lib",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet