Kaspa address验证
the way that I create address object
const addressRegex = new RegExp(/(kaspa|kaspatest):\S+/i);
const addressArg = ‘kaspa:xxxxx’ ?? positionals.find((positional) => addressRegex.test(positional)) ?? null;
const address = addressArg === null ? null : new Address(addressArg);
There is Address::validate() static fn for address validation.
let isValid = Address::validate("kaspa:invalid-address");
Static validate
validate(address): boolean
Parameters
Returns boolean
Defined in web/kaspa/kaspa.d.ts:4564
address: string
感动 | 同情 | 无聊 | 愤怒 | 搞笑 | 难过 | 高兴 | 路过 |
- 上一篇:验证Kaspa链的完整性
- 下一篇:转账0.2kas手续费却有9.8KAS的问题
相关文章
-
没有相关内容