Skip to content

Commit

Permalink
[ncw] delete signing algo EP (#309)
Browse files Browse the repository at this point in the history
* add EP

* fix url

* fix api method

* typo
  • Loading branch information
yuval-fireblocks authored Dec 18, 2024
1 parent 0ad1eea commit eda99ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/ncw-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,8 @@ export class NcwApiClient implements NcwSdk {
public async getPublicKeyInfoByAccountAsset(walletId: string, args: PublicKeyInfoByAccountAssetArgs): Promise<PublicKeyResponse> {
return await getPublicKeyInfoByAccountAssetImpl(PeerType.END_USER_WALLET, args, this.apiClient, walletId);
}

public async deleteSigningAlgorithm(walletId: string, algorithm: SigningAlgorithm): Promise<void> {
return await this.apiClient.issueDeleteRequest(`${this.NCW_BASE_PATH}/${walletId}/remove_signing_algorithm/${algorithm}`);
}
}
12 changes: 11 additions & 1 deletion src/ncw-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export interface NcwSdk {
getUnspentInputs(walletId: string, accountId: number, assetId: string): Promise<UnspentInputsResponse[]>;

/**
* refresh a NCW asset balance
* set required algorithms for a wallet
*
* @param {string} walletId
* @param {SigningAlgorithm[]} algorithms
Expand All @@ -222,4 +222,14 @@ export interface NcwSdk {
* @return {*} {Promise<PublicKeyResponse>}
*/
getPublicKeyInfoByAccountAsset(walletId: string, args: PublicKeyInfoByAccountAssetArgs): Promise<PublicKeyResponse>;

/**
* delete signing algorithm for a wallet
*
* @param {string} walletId
* @param {SigningAlgorithm} algorithm
* @return {*} {Promise<void>}
*/
deleteSigningAlgorithm(walletId: string, algorithm: SigningAlgorithm): Promise<void>;

}

0 comments on commit eda99ef

Please sign in to comment.