diff --git a/ironfish-rust-nodejs/index.d.ts b/ironfish-rust-nodejs/index.d.ts index 592c825e6a..fef1c8aacb 100644 --- a/ironfish-rust-nodejs/index.d.ts +++ b/ironfish-rust-nodejs/index.d.ts @@ -72,6 +72,16 @@ export function wordsToSpendingKey(words: string, languageCode: LanguageCode): s export function generateKeyFromPrivateKey(privateKey: string): Key export function initializeSapling(): void export function isValidPublicAddress(hexAddress: string): boolean +export interface TrustedDealerKeyPackages { + verifyingKey: string + proofGenerationKey: string + viewKey: string + incomingViewKey: string + outgoingViewKey: string + publicAddress: string + keyPackages: Record + publicKeyPackage: string +} export class BoxKeyPair { constructor() static fromHex(secretHex: string): BoxKeyPair diff --git a/ironfish-rust-nodejs/src/lib.rs b/ironfish-rust-nodejs/src/lib.rs index 7d9458a143..428e034c23 100644 --- a/ironfish-rust-nodejs/src/lib.rs +++ b/ironfish-rust-nodejs/src/lib.rs @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::collections::HashMap; use std::fmt::Display; use ironfish::keys::Language; @@ -167,3 +168,15 @@ impl ThreadPoolHandler { pub fn is_valid_public_address(hex_address: String) -> bool { PublicAddress::from_hex(&hex_address).is_ok() } + +#[napi(object)] +pub struct TrustedDealerKeyPackages { + pub verifying_key: String, + pub proof_generation_key: String, + pub view_key: String, + pub incoming_view_key: String, + pub outgoing_view_key: String, + pub public_address: String, + pub key_packages: HashMap, + pub public_key_package: String, +} \ No newline at end of file