@fireblocks/ncw-js-infra
Advanced tools
Comparing version 1.0.18 to 1.0.19-beta.2
@@ -11,2 +11,10 @@ /// <reference types="emscripten" /> | ||
export interface SigningFlagsValue<T extends number> { | ||
value: T; | ||
} | ||
export type SigningFlags = | ||
| SigningFlagsValue<0> | ||
| SigningFlagsValue<1> | ||
| SigningFlagsValue<2>; | ||
// String representation of playerId (BigInt) | ||
@@ -32,2 +40,3 @@ export type PlayerId = string; | ||
export type VecUInt32 = CVec<number>; | ||
export type VecCommitment = CVec<Commitment>; | ||
export type VecSigningBlockData = CVec<SigningBlockData>; | ||
@@ -57,3 +66,4 @@ export type VecCmpMtaRequest = CVec<CmpMtaRequest>; | ||
export type MapStringBool = CMap<string, boolean>; | ||
export type MapPlayerCommitments = CMap<PlayerId, Commitment>; | ||
export type MapPlayerCommitment = CMap<PlayerId, Commitment>; | ||
export type MapPlayerCommitments = CMap<PlayerId, VecCommitment>; | ||
export type MapPlayerSetupDecomitments = CMap<PlayerId, SetupDecommitment>; | ||
@@ -68,8 +78,2 @@ export type MapPlayerSetupProofs = CMap<PlayerId, SetupProofs>; | ||
export interface IMetadataToSignInfo { | ||
fillSignatureData: (metadata: string, count: number) => boolean[]; | ||
fillEDDSASignatureData: (metadata: string, count: number) => boolean[]; | ||
fillCMPSignatureData: (metadata: string, count: number) => boolean[]; | ||
} | ||
export interface GenerateSetupCommitments { | ||
@@ -100,3 +104,2 @@ keyId: string; | ||
export interface AddDeviceRequest { | ||
tenantId: string; | ||
keyId: string; | ||
@@ -132,3 +135,2 @@ algorithm: CosignerAlgo; | ||
public_key: string; | ||
private_share: string; | ||
algorithm: CosignerAlgo; | ||
@@ -147,3 +149,3 @@ } | ||
keyId: string; | ||
commitments: MapPlayerCommitments; | ||
commitments: MapPlayerCommitment; | ||
} | ||
@@ -232,2 +234,3 @@ | ||
}>; | ||
commitments?: Array<Commitment> | ||
} | ||
@@ -293,2 +296,24 @@ | ||
export interface StoreEddsaSignatureCommitmentsResponse { | ||
txid: string; | ||
Rs: Array<string>; | ||
} | ||
export interface OnRBroadcastResponse { | ||
txid: string; | ||
si: Array<string>; | ||
} | ||
export interface GetEddsaSignatureResponse { | ||
txid: string; | ||
signatures: Array<{ | ||
signature: string; | ||
signature_object: { | ||
r: string; | ||
s: string; | ||
v: string; | ||
}; | ||
}>; | ||
} | ||
export interface DerivationParams { | ||
@@ -326,2 +351,3 @@ coinType: number; | ||
txId: string, | ||
algorithm: CosignerAlgo, | ||
metadataJson: string, | ||
@@ -332,5 +358,3 @@ payloads: VecString, | ||
players: VecString, | ||
playerIds: VecString, | ||
isCmpOnline: boolean, | ||
isEDDSA: boolean | ||
playerIds: VecString | ||
): StartSigningResponse; | ||
@@ -358,2 +382,17 @@ | ||
storeEddsaSignatureCommitments( | ||
txid: string, | ||
playerCommitments: MapPlayerCommitments | ||
): StoreEddsaSignatureCommitmentsResponse; | ||
onRBroadcast( | ||
txid: string, | ||
playerRs: MapPlayerSis | ||
): OnRBroadcastResponse; | ||
getEddsaSignature( | ||
txid: string, | ||
playerSis: MapPlayerSis | ||
): GetEddsaSignatureResponse; | ||
/** | ||
@@ -442,3 +481,3 @@ * Combine additive secret sharing based (i.e. MPC-CMP) private key shares into a single private key. | ||
get_public_key_pem_fn: (playerId: string) => string, | ||
metadataToSignInfo: IMetadataToSignInfo | ||
fill_signature_data_fn: (metadata: string, count: number) => number[] | ||
): CosignerService; | ||
@@ -451,2 +490,7 @@ }; | ||
}; | ||
SigningFlags: { | ||
NONE: SigningFlagsValue<0>; | ||
POSITIVE_R: SigningFlagsValue<1>; | ||
EDDSA_KECCAK: SigningFlagsValue<2>; | ||
}; | ||
@@ -461,2 +505,4 @@ // constructs std::vector<std::string> | ||
VecUInt64: { new (): CVec<BigInt> }; | ||
// constructs std::vector<Commitment> | ||
VecCommitment: {new(): VecCommitment}; | ||
// constructs std::vector<SigningBlockData> | ||
@@ -472,3 +518,5 @@ VecSigningBlockData: { new (): VecSigningBlockData }; | ||
MapStringString: { new (): MapStringString }; | ||
// constructs std::map<std::string, PlayerCommitments> | ||
// constructs std::map<std::string, Commitment> | ||
MapPlayerCommitment: { new (): MapPlayerCommitment }; | ||
// constructs std::map<std::string, VecCommitment> | ||
MapPlayerCommitments: { new (): MapPlayerCommitments }; | ||
@@ -475,0 +523,0 @@ // constructs std::map<std::string, PlayerSetupDecomitments> |
{ | ||
"name": "@fireblocks/ncw-js-infra", | ||
"version": "1.0.18", | ||
"version": "1.0.19-beta.2", | ||
"description": "Fireblocks NCW WebAssembly package", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1503
3086795
3