Skip to content

Commit 22ddba1

Browse files
feat(sdk-coin-icp): implement getHashFunction
Ticket: WIN-5178
1 parent 7ffbfce commit 22ddba1

File tree

1 file changed

+6
-1
lines changed
  • modules/sdk-coin-icp/src

1 file changed

+6
-1
lines changed

modules/sdk-coin-icp/src/icp.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
} from './lib/iface';
3737
import { TransactionBuilderFactory } from './lib/transactionBuilderFactory';
3838
import utils from './lib/utils';
39-
import { createHash } from 'crypto';
39+
import { createHash, Hash } from 'crypto';
4040
import { Principal } from '@dfinity/principal';
4141
import axios from 'axios';
4242

@@ -134,6 +134,11 @@ export class Icp extends BaseCoin {
134134
return 'ecdsa';
135135
}
136136

137+
/** @inheritDoc **/
138+
getHashFunction(): Hash {
139+
return createHash('sha256');
140+
}
141+
137142
private async getAddressFromPublicKey(hexEncodedPublicKey: string) {
138143
return utils.getAddressFromPublicKey(hexEncodedPublicKey);
139144
}

0 commit comments

Comments
 (0)