13 lines
446 B
TypeScript
13 lines
446 B
TypeScript
// Copyright 2017-2018 @polkadot/primitives-json authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the ISC license. See the LICENSE file for details.
|
|
|
|
import { AccountId } from '@polkadot/primitives/base';
|
|
import { JsonAccountId } from '../types';
|
|
|
|
import hashEncode from '../hash/encode';
|
|
|
|
export default function accountIdEncode (value: AccountId): JsonAccountId {
|
|
return hashEncode(value, 160);
|
|
}
|