Skip to content

Commit

Permalink
feat(utils): remove toAddressIdentifier method
Browse files Browse the repository at this point in the history
remove toAddressIdentifier method, which is the alias of toAddressPayload method

BREAKING CHANGE: remove toAddressIdentifier method
  • Loading branch information
Keith-CY committed Jun 27, 2019
1 parent 296c515 commit ab1e356
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/ckb-sdk-utils/src/address/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ export const toAddressPayload = (
return new Uint8Array([...hexToBytes(type), ...utf8ToBytes(params), ...identifier])
}

export const toAddressIdentifier = toAddressPayload

export const bech32Address = (
data: Uint8Array | string,
identifier: Uint8Array | string,
{
prefix = AddressPrefix.Testnet,
type = AddressType.BinIdx,
binIdx = AddressBinIdx.P2PH,
}: AddressOptions = defaultAddressOptions
) => bech32.encode(prefix, bech32.toWords(toAddressIdentifier(data, type, binIdx)))
) => bech32.encode(prefix, bech32.toWords(toAddressPayload(identifier, type, binIdx)))

export const pubkeyToAddress = (
pubkey: Uint8Array | string,
Expand Down

0 comments on commit ab1e356

Please sign in to comment.