@cowprotocol/cow-sdk
Version:
<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>
73 lines (47 loc) • 2.69 kB
Markdown
⛔️ DEPRECATED: This module has been superseded by the [multiformats](https://github.com/multiformats/js-multiformats) module <!-- omit in toc -->
js-multibase <!-- omit in toc -->
============
[](https://protocol.ai)
[](https://github.com/multiformats/multiformats)
[](https://webchat.freenode.net/?channels=%23ipfs)
[](https://codecov.io/gh/multiformats/js-multibase)
[](https://github.com/multiformats/js-multibase/actions?query=branch%3Amaster+workflow%3Aci+)
> JavaScript implementation of the [multibase](https://github.com/multiformats/multibase) specification
## Lead Maintainer <!-- omit in toc -->
[Hugo Dias](https://github.com/hugomrdias)
## Table of Contents <!-- omit in toc -->
- [Install](#install)
- [NPM](#npm)
- [Browser through `<script>` tag](#browser-through-script-tag)
- [Usage](#usage)
- [Example](#example)
- [API](#api)
- [Contribute](#contribute)
- [License](#license)
## Install
### NPM
```sh
$ npm install --save multibase
```
### Browser through `<script>` tag
Loading this module through a script tag will make the `Multibase` obj available in the global namespace.
```html
<script src="https://unpkg.com/multibase/dist/index.min.js"></script>
```
## Usage
### Example
```JavaScript
const multibase = require('multibase')
const bytes = multibase.encode('base58btc', new TextEncoder().encode('hey, how is it going'))
const decodedBytes = multibase.decode(bytes)
console.log(decodedBytes.toString())
// hey, how is it going
```
## API
https://multiformats.github.io/js-multibase/
## Contribute
Contributions welcome. Please check out [the issues](https://github.com/multiformats/js-multibase/issues).
Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
[MIT](LICENSE) © Protocol Labs Inc.