4.1.1. LoRaScript API
LoRaScriptではNode.jsおよびサードパーティのAPIを利用できます。
ただしいくつかのAPIは利用が制限されます。
例えばNetパッケージのServerクラスはLoRaScriptでは許可されていません。
次の表は使用できるAPIのリストです。
表4-4 LoRaScript API
パッケージ | 名前 | タイプ | 参照 |
---|---|---|---|
Buffer | Buffer | Class | |
SlowBuffer | Class | ||
crypto | setEngine | Function | https://nodejs.org/docs/v0.12.7/api/crypto.html |
getCiphers | Function | ||
getHashes | Function | ||
createCredentials | Function | ||
createHash | Function | ||
Hash | Class | ||
createHmac | Function | ||
Hmac | Class | ||
createCipher | Function | ||
createCipheriv | Function | ||
Cipher | Class | ||
createDecipher | Function | ||
createDecipheriv | Function | ||
Decipher | Class | ||
createSign | Function | ||
Sign | Class | ||
createVerify | Function | ||
Verify | Class | ||
createDiffieHellman | Function | ||
DiffieHellman | Class | ||
getDiffieHellman | Function | ||
createECDH | Function | ||
ECDH | Class | ||
pbkdf2 | Function | ||
pbkdf2Sync | Function | ||
randomBytes | Function | ||
pseudoRandomBytes | Function | ||
Certificate | Class | ||
publicEncrypt | Function | ||
privateDecrypt | Function | ||
dgram | createSocket | Function | https://nodejs.org/docs/v0.12.7/api/dgram.html |
Socket | Class | ||
dns | getServers | Function | https://nodejs.org/api/dns.html |
lookup | Function | ||
lookupService | Function | ||
resolve | Function | ||
resolve4 | Function | ||
resolve6 | Function | ||
resolveCname | Function | ||
resolveMx | Function | ||
resolveNaptr | Function | ||
resolveNs | Function | ||
resolveSoa | Function | ||
resolveSrv | Function | ||
resolvePtr | Function | ||
resolveTxt | Function | ||
reverse | Function | ||
setServers | Function | ||
http | request | Function | https://nodejs.org/docs/v0.12.7/api/http.html |
get | Function | ||
https | request | Function | https://nodejs.org/docs/v0.12.7/api/https.html |
get | Function | ||
net | connect | Function | https://nodejs.org/docs/v0.12.7/api/net.html |
createConnection | Function | ||
Sokcet | Class | ||
isIP | Function | ||
isIPv4 | Function | ||
isIPV6 | Function | ||
punycode | decode | Function | https://nodejs.org/docs/v0.12.7/api/punycode.html |
encode | Function | ||
toUnicode | Function | ||
toASCII | Function | ||
ucs2.decode | Function | ||
ucs2.encode | Function | ||
version | Function | ||
querystring | stringify | Function | https://nodejs.org/docs/v0.12.7/api/querystring.html |
parse | Function | ||
escape | Function | ||
unescape | Function | ||
smalloc | smalloc | Class | https://nodejs.org/docs/v0.12.7/api/smalloc.html |
string_decoder | stringDecoder | Class | https://nodejs.org/docs/v0.12.7/api/string_decoder.html |
timers | setTimeout | Function | https://nodejs.org/docs/v0.12.7/api/timers.html |
clearTimeout | Function | ||
setInterval | Function | ||
clearInterval | Function | ||
unref | Function | ||
ref | Function | ||
setImmediate | Function | ||
clearImmediate | Function | ||
url | parse | Function | https://nodejs.org/docs/v0.12.7/api/url.html |
format | Function | ||
resolve | Function | ||
util | debuglog | Function | https://nodejs.org/docs/v0.12.7/api/util.html |
format | Function | ||
log | Function | ||
inspect | Function | ||
isArray | Function | ||
isRegExp | Function | ||
isDate | Function | ||
isError | Function | ||
inherits | Function | ||
deprecate | Function | ||
debug | Function | ||
error | Function | ||
puts | Function | ||
Function | |||
pump | Function | ||
zlib | createGzip | Function | https://nodejs.org/docs/v0.12.7/api/zlib.html |
createGnuzip | Function | ||
createDeflate | Function | ||
createInflate | Function | ||
createDeflateRaw | Function | ||
createInflateRaw | Function | ||
createUnzip | Function | ||
Zlib | Class | ||
Gzip | Class | ||
Gunzip | Class | ||
Deflate | Class | ||
Inflate | Class | ||
DeflateRaw | Class | ||
InflateRaw | Class | ||
Unzip | Class | ||
deflate | Function | ||
deflateSync | Function | ||
deflateRaw | Function | ||
deflateRawSync | Function | ||
gzip | Function | ||
gzipSync | Function | ||
inflate | Function | ||
inflateSync | Function | ||
inflateRaw | Function | ||
inflateRawSync | Function | ||
unzip | Function | ||
unzipSync | Function | ||
bcryptjs | setrandomfallbackrandom | Function | https://www.npmjs.com/package/bcryptjs |
genSaltSync | Function | ||
genSalt | Function | ||
hashSync | Function | ||
hash | Function | ||
compareSync | Function | ||
compare | Function | ||
getRounds | Function | ||
getSalt | Function | ||
ws | WebSocket | Class | https://github.com/websockets/ws |
Server | Class | ||
Sender | Class | ||
Receiver | Class | ||
createServer | Function | ||
createConnection | Function | ||
msgpack-lite | encode | Function | https://github.com/kawanet/msgpack-lite |
decode | Function | ||
Encoder | Class | ||
Decoder | Class | ||
createEncodeStream | Function | ||
createDecodeStream | Function | ||
createCodec | Function | ||
codec | Class | ||
lora-packet | fromWire | Function | https://github.com/anthonykirby/lora-packet |
fromFields | Function | ||
verifyMIC | Function | ||
calculateMIC | Function | ||
recalculateMIC | Function | ||
decrypt | Function | ||
constants | Function |