UNPKG
@bigmi/core
Version:
beta (0.4.0-beta.1)
latest (0.5.2)
0.5.2
0.5.1
0.5.0
0.4.5
0.4.4
0.4.3
0.4.2
0.4.0
0.4.0-beta.1
0.4.0-beta.0
0.3.1
0.3.1-beta.0
0.3.0
0.3.0-beta.6
0.3.0-beta.5
0.3.0-beta.4
0.3.0-beta.3
0.3.0-beta.2
0.3.0-beta.1
0.3.0-beta.0
0.2.1
0.2.0
0.2.0-beta.2
0.2.0-beta.1
0.2.0-beta.0
0.1.1
0.1.0
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
TypeScript library for Bitcoin apps.
github.com/lifinance/bigmi
lifinance/bigmi
@bigmi/core
/
src
/
transports
/
blockcypher
/
utils.ts
9 lines
(7 loc)
•
255 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{
RpcErrorCode
}
from
'../../errors/rpc.js'
export
function
getRpcErrorCode
(
error: string
):
RpcErrorCode
{
if
(error.
toLowerCase
().
startsWith
(
'rate limit exceeded'
)) {
return
RpcErrorCode
.
ACCESS_DENIED
}
return
RpcErrorCode
.
MISC_ERROR
}