Skip to content

Commit

Permalink
chore: rename signFrost to aggregateSignatureShares (#4693)
Browse files Browse the repository at this point in the history
  • Loading branch information
jowparks authored Feb 6, 2024
1 parent b859447 commit 8cae60e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class UnsignedTransaction {
publicKeyRandomness(): string
signingPackage(nativeIdentiferCommitments: Array<Commitment>): string
sign(spenderHexKey: string): Buffer
signFrost(publicKeyPackageStr: string, signingPackageStr: string, signatureSharesArr: Array<string>): Buffer
aggregateSignatureShares(publicKeyPackageStr: string, signingPackageStr: string, signatureSharesArr: Array<string>): Buffer
}
export class FoundBlockResult {
randomness: string
Expand Down
4 changes: 2 additions & 2 deletions ironfish-rust-nodejs/src/structs/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl NativeUnsignedTransaction {
}

#[napi]
pub fn sign_frost(
pub fn aggregate_signature_shares(
&mut self,
public_key_package_str: String,
signing_package_str: String,
Expand All @@ -485,7 +485,7 @@ impl NativeUnsignedTransaction {

let signed_transaction = self
.transaction
.sign_frost(&public_key_package, &signing_package, signature_shares)
.aggregate_signature_shares(&public_key_package, &signing_package, signature_shares)
.map_err(to_napi_err)?;

let mut vec: Vec<u8> = vec![];
Expand Down
4 changes: 2 additions & 2 deletions ironfish-rust/src/transaction/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ fn test_sign_simple() {
}

#[test]
fn test_sign_frost() {
fn test_aggregate_signature_shares() {
let spender_key = SaplingKey::generate_key();

let identifiers = create_identifiers(10);
Expand Down Expand Up @@ -812,7 +812,7 @@ fn test_sign_frost() {

// coordinator creates signed transaction
let signed_transaction = unsigned_transaction
.sign_frost(
.aggregate_signature_shares(
&key_packages.public_key_package,
&signing_package,
signing_shares,
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust/src/transaction/unsigned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl UnsignedTransaction {
Ok(hash_result)
}

pub fn sign_frost(
pub fn aggregate_signature_shares(
&mut self,
public_key_package: &PublicKeyPackage,
authorizing_signing_package: &SigningPackage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ routes.register<typeof AggregateSigningSharesRequestSchema, AggregateSigningShar
const unsigned = new UnsignedTransaction(
Buffer.from(request.data.unsignedTransaction, 'hex'),
)
const transaction = unsigned.signFrost(
const transaction = unsigned.aggregateSignatureShares(
account.multiSigKeys.publicKeyPackage,
request.data.signingPackage,
request.data.signingShares,
Expand Down
2 changes: 1 addition & 1 deletion ironfish/src/wallet/wallet.test.slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ describe('Wallet', () => {
}

Assert.isNotUndefined(coordinator.multiSigKeys)
const serializedFrostTransaction = unsignedTransaction.signFrost(
const serializedFrostTransaction = unsignedTransaction.aggregateSignatureShares(
coordinator.multiSigKeys.publicKeyPackage,
signingPackage,
signatureShares,
Expand Down

0 comments on commit 8cae60e

Please sign in to comment.