Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding trusted dealer key package napi struct #4520

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ironfish-rust-nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ export const TRANSACTION_EXPIRATION_LENGTH: number
export const TRANSACTION_FEE_LENGTH: number
export const LATEST_TRANSACTION_VERSION: number
export function verifyTransactions(serializedTransactions: Array<Buffer>): boolean
export interface TrustedDealerKeyPackages {
verifyingKey: string
proofGenerationKey: string
viewKey: string
incomingViewKey: string
outgoingViewKey: string
publicAddress: string
keyPackages: Record<string, string>
publicKeyPackage: string
}
export const enum LanguageCode {
English = 0,
ChineseSimplified = 1,
Expand Down
19 changes: 19 additions & 0 deletions ironfish-rust-nodejs/src/structs/key_packages.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 napi_derive::napi;
use std::collections::HashMap;

#[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<String, String>,
pub public_key_package: String,
}
3 changes: 3 additions & 0 deletions ironfish-rust-nodejs/src/structs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ pub use transaction::*;

mod witness;
pub use witness::*;

mod key_packages;
pub use key_packages::*;