Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@re-ai/inner-tool-sdk
Advanced tools
2024.07.01
2024.06.30
2024.06.19
2024.06.17
2024.06.07
REAI_ONE_API_TOKEN
, REAI_ONE_API_HOST
npm i @re-ai/inner-tool-sdk
环境变量 | 描述 | 默认值 |
---|---|---|
RPC_PORT_SMS | 短信服务端口 | 4682 |
RPC_HOST_SMS | 短信服务地址 | 127.0.0.1 |
RPC_PORT_PAY | 支付服务端口 | 4681 |
RPC_HOST_PAY | 支付服务地址 | 127.0.0.1 |
RPC_PORT_TEXT | 文本处理端口 | 4683 |
RPC_HOST_TEXT | 文本处理地址 | 127.0.0.1 |
ONE_API_HOST | one-api服务地址 | |
ONE_API_TOKEN | one-api 管理员token | (只在管理员模式下生效) |
import { ReAITool } from '@re-ai/inner-tool-sdk'
// 管理员接口
// 使用管理员接口设置环境变量 ONE_API_HOST 和 ONE_API_TOKEN,获取通过初始化参数传入
ReAITool.oneapi().admin().channelList()
// 用户接口
// 使用用户接口设置环境变量 ONE_API_HOST
// register, login 不需要传token
ReAITool.oneapi().user().register()
ReAITool.oneapi().user().login()
// 其他用户接口,推荐在初始化参数中传入
ReAITool.oneapi({token}).user().self()
import { ReAITool, SMSPlatforms } from '@re-ai/inner-tool-sdk'
// 发送短信
ReAITool.sms().smsCodeSend({
platform: SMSPlatforms.ALI,
mobile: "xxxxxxxx"
})
// 验证短信
ReAITool.sms().smsCodeVerify({
mobile: "xxxxxxxx",
code: "xxxxxxxx"
})
import { ReAITool, SMSPlatforms } from '@re-ai/inner-tool-sdk'
// 生成支付订单
ReAITool.pay().create({
...
})
import { ReAITool, TextPlatform } from '@re-ai/inner-tool-sdk'
ReAITool.text().address({
platform: TextPlatform.ALIYUN,
text: "需要处理的地址文本"
}).then(res => {
console.log(res);
})
create(data: PayOrderCreateData): Promise<RPCClientResponseResult<PayOrderInfo>>
创建新的支付订单。
data
(PayOrderCreateData
): 包含订单创建数据的对象。
orderNo
(string
): 唯一订单号。amount
(number
): 订单总金额。desc
(string
): 订单描述。ip
(string
): 发起订单的IP地址。type
(PayType
): 支付类型(wxpay
微信支付或 alipay
支付宝支付)。platform
("pc" | "h5" | "jsapi"
): 发起订单的平台。returnUrl
(string?
): 支付成功后重定向的URL。notifyUrl
(string?
): 接收支付通知的URL。get(orderNo: string): Promise<RPCClientResponseResult<PayOrderInfo>>
获取现有订单的详细信息。
orderNo
(string
): 订单的唯一标识符。smsCodeSend(data: SMSSendArgs): Promise<RPCClientResponseResult<SMSSendRes>>
发送短信验证码。
data
(SMSSendArgs
): 包含发送短信数据的对象。
mobile
(string
): 将发送短信的手机号码。platform
(SMSPlatforms
): 将使用的短信平台(ali
阿里云或 tx
腾讯云)。smsCodeVerify(data: SMSVerifyArgs): Promise<RPCClientResponseResult<undefined>>
验证用户接收到的短信验证码。
data
(SMSVerifyArgs
): 包含验证数据的对象。
mobile
(string
): 与短信验证码相关联的手机号码。code
(string
): 要验证的验证码。PayType
定义支付系统的类型。
wxpay
: 微信支付alipay
: 支付宝支付SMSPlatforms
定义发送短信的平台。
ali
: 阿里云tx
: 腾讯云address(data: TextAddressArgs): Promise<RPCClientResponseResult<TextAddressResult>>
data
(TextAddressArgs
): 包含文本处理数据的对象。
platform
(TextPlatform
): 文本处理平台(ali
阿里云或 tx
腾讯云)。text
(string
): 要处理的文本。TextPlatform
定义文本处理系统的类型。
aliyun
: 阿里云baidu
: 百度FAQs
ReAI内部接口sdk
The npm package @re-ai/inner-tool-sdk receives a total of 4 weekly downloads. As such, @re-ai/inner-tool-sdk popularity was classified as not popular.
We found that @re-ai/inner-tool-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.