最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

blockchain - Can hashing be done in compact on the client side using persistentHash? - Stack Overflow

programmeradmin6浏览0评论

I'm using Midnight and learning compact. I'm hoping to get some clarification on the persistentHash function (export declare function persistentHash<a>(rt_type: CompactType<a>, value: a): Uint8Array;) , especially for rt_type

Is this possible to do the same hashing in Compact on the client side? Can persistentHash be used to do the same thing?

export enum Role {
    Owner,
    None
};    
const roleHash = persistent_hash<Vector<1, Role>>([Role.Owner]);
发布评论

评论列表(0)

  1. 暂无评论