@emurgo/yoroi-lib-core
Advanced tools
Comparing version 0.6.0-alpha.33 to 0.6.1-alpha.34
@@ -34,4 +34,4 @@ /// <reference types="node" /> | ||
createUnsignedVotingTx(absSlotNumber: BigNumber, defaultToken: Token, votingPublicKey: PublicKey, stakingKeyPath: number[], stakingPublicKey: PublicKey, utxos: Array<CardanoAddressedUtxo>, changeAddr: AddressingAddress, config: CardanoHaskellConfig, txOptions: TxOptions, nonce: number, signer: (hashedMetadata: Buffer) => Promise<string>): Promise<UnsignedTx>; | ||
createUnsignedDelegationTx(absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, stakingKey: PublicKey, registrationStatus: boolean, poolId: string | null, changeAddr: AddressingAddress, valueInAccount: MultiTokenValue, defaultToken: Token, txOptions: TxOptions, config: CardanoHaskellConfig): Promise<UnsignedTx>; | ||
createUnsignedDelegationTx(absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, stakingKey: PublicKey, isRegistered: boolean, shouldDeregister: boolean, poolId: string | null, changeAddr: AddressingAddress, valueInAccount: MultiTokenValue, defaultToken: Token, txOptions: TxOptions, config: CardanoHaskellConfig): Promise<UnsignedTx>; | ||
buildLedgerPayload(unsignedTx: UnsignedTx, networkId: number, byronNetworkMagic: number, addressingMap: (addr: string) => Addressing): Promise<LedgerSignTransactionRequest>; | ||
} |
@@ -238,3 +238,3 @@ "use strict"; | ||
} | ||
createUnsignedDelegationTx(absSlotNumber, utxos, stakingKey, registrationStatus, poolId, changeAddr, valueInAccount, defaultToken, txOptions, config) { | ||
createUnsignedDelegationTx(absSlotNumber, utxos, stakingKey, isRegistered, shouldDeregister, poolId, changeAddr, valueInAccount, defaultToken, txOptions, config) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -249,3 +249,3 @@ try { | ||
}; | ||
const stakeDelegationCerts = yield (0, transactions_1.createDelegationCertificate)(this._wasmV4, stakingKey, registrationStatus, poolId); | ||
const stakeDelegationCerts = yield (0, transactions_1.createDelegationCertificate)(this._wasmV4, stakingKey, isRegistered, shouldDeregister, poolId); | ||
const unsignedTx = (yield this.newAdaUnsignedTx([], defaultToken, changeAddr, utxos, absSlotNumber, protocolParams, stakeDelegationCerts, [], undefined, { | ||
@@ -252,0 +252,0 @@ neededHashes: new Set(), |
@@ -147,3 +147,3 @@ "use strict"; | ||
if (del.hasValue()) { | ||
deregistrations.push(del); | ||
delegations.push(del); | ||
} | ||
@@ -150,0 +150,0 @@ } |
@@ -18,3 +18,3 @@ import * as WasmContract from '../wasm-contract'; | ||
export declare function isBigNumZero(wasm: WasmContract.WasmModuleProxy, b: WasmContract.BigNum): Promise<boolean>; | ||
export declare function createDelegationCertificate(wasm: WasmContract.WasmModuleProxy, stakingKey: PublicKey, isRegistered: boolean, poolId: string | null): Promise<Array<Certificate>>; | ||
export declare function createDelegationCertificate(wasm: WasmContract.WasmModuleProxy, stakingKey: PublicKey, isRegistered: boolean, shouldDeregister: boolean, poolId: string | null): Promise<Array<Certificate>>; | ||
export declare function getDifferenceAfterTx(wasm: WasmContract.WasmModuleProxy, senderUtxos: CardanoAddressedUtxo[], txBody: WasmContract.TransactionBody, allUtxos: RemoteUnspentOutput[], stakingKey: PublicKey, defaultToken: Token): Promise<MultiToken>; |
@@ -155,7 +155,7 @@ "use strict"; | ||
exports.isBigNumZero = isBigNumZero; | ||
function createDelegationCertificate(wasm, stakingKey, isRegistered, poolId) { | ||
function createDelegationCertificate(wasm, stakingKey, isRegistered, shouldDeregister, poolId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const credential = yield wasm.StakeCredential.fromKeyhash(yield stakingKey.hash()); | ||
if (poolId === null) { | ||
if (isRegistered) { | ||
if (shouldDeregister) { | ||
return [ | ||
@@ -162,0 +162,0 @@ yield wasm.Certificate.newStakeDeregistration(yield wasm.StakeDeregistration.new(credential)) |
{ | ||
"name": "@emurgo/yoroi-lib-core", | ||
"version": "0.6.0-alpha.33", | ||
"version": "0.6.1-alpha.34", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
285906