@emurgo/yoroi-lib-core
Advanced tools
Comparing version 0.4.0-alpha.27 to 0.4.1-alpha.28
@@ -32,3 +32,3 @@ import { BigNumber } from 'bignumber.js'; | ||
createUnsignedVotingTx(absSlotNumber: BigNumber, stakePrivateKey: PrivateKey, catalystPrivateKey: PrivateKey, utxos: Array<CardanoAddressedUtxo>, changeAddr: AddressingAddress, config: CardanoHaskellConfig, txOptions: TxOptions, nonce: number): Promise<UnsignedTx>; | ||
createUnsignedDelegationTx(absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, stakingKey: PublicKey, registrationStatus: boolean, poolRequest: void | string, changeAddr: AddressingAddress, valueInAccount: MultiTokenValue, defaultToken: Token, txOptions: TxOptions, config: CardanoHaskellConfig): Promise<CreateDelegationTxResponse>; | ||
createUnsignedDelegationTx(absSlotNumber: BigNumber, utxos: Array<CardanoAddressedUtxo>, stakingKey: PublicKey, registrationStatus: boolean, poolId: string | null, changeAddr: AddressingAddress, valueInAccount: MultiTokenValue, defaultToken: Token, txOptions: TxOptions, config: CardanoHaskellConfig): Promise<CreateDelegationTxResponse>; | ||
} |
@@ -210,3 +210,3 @@ "use strict"; | ||
} | ||
createUnsignedDelegationTx(absSlotNumber, utxos, stakingKey, registrationStatus, poolRequest, changeAddr, valueInAccount, defaultToken, txOptions, config) { | ||
createUnsignedDelegationTx(absSlotNumber, utxos, stakingKey, registrationStatus, poolId, changeAddr, valueInAccount, defaultToken, txOptions, config) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -221,3 +221,3 @@ try { | ||
}; | ||
const stakeDelegationCerts = yield (0, transactions_1.createDelegationCertificate)(this._wasmV4, stakingKey, registrationStatus, poolRequest); | ||
const stakeDelegationCerts = yield (0, transactions_1.createDelegationCertificate)(this._wasmV4, stakingKey, registrationStatus, poolId); | ||
const unsignedTx = (yield this.newAdaUnsignedTx([], changeAddr, utxos, absSlotNumber, protocolParams, stakeDelegationCerts, [], undefined, { | ||
@@ -224,0 +224,0 @@ neededHashes: new Set(), |
@@ -19,3 +19,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, poolRequest: void | string): Promise<Array<Certificate>>; | ||
export declare function createDelegationCertificate(wasm: WasmContract.WasmModuleProxy, stakingKey: PublicKey, isRegistered: boolean, poolId: string | null): Promise<Array<Certificate>>; | ||
export declare function getDifferenceAfterTx(wasm: WasmContract.WasmModuleProxy, unsignedTx: WasmUnsignedTx, allUtxos: RemoteUnspentOutput[], stakingKey: PublicKey, defaultToken: Token): Promise<MultiToken>; |
@@ -155,6 +155,6 @@ "use strict"; | ||
exports.isBigNumZero = isBigNumZero; | ||
function createDelegationCertificate(wasm, stakingKey, isRegistered, poolRequest) { | ||
function createDelegationCertificate(wasm, stakingKey, isRegistered, poolId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const credential = yield wasm.StakeCredential.fromKeyhash(yield stakingKey.hash()); | ||
if (poolRequest == null) { | ||
if (poolId === null) { | ||
if (isRegistered) { | ||
@@ -172,3 +172,3 @@ return [ | ||
} | ||
result.push(yield wasm.Certificate.newStakeDelegation(yield wasm.StakeDelegation.new(credential, yield wasm.Ed25519KeyHash.fromBytes(Buffer.from(poolRequest, 'hex'))))); | ||
result.push(yield wasm.Certificate.newStakeDelegation(yield wasm.StakeDelegation.new(credential, yield wasm.Ed25519KeyHash.fromBytes(Buffer.from(poolId, 'hex'))))); | ||
return result; | ||
@@ -175,0 +175,0 @@ }); |
{ | ||
"name": "@emurgo/yoroi-lib-core", | ||
"version": "0.4.0-alpha.27", | ||
"version": "0.4.1-alpha.28", | ||
"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
254711