【已解决】ApiPromise.create() 运行报错

我在基于@polkadot/api做二次开发的时候,连接wss://poc4.phala.network/ws报错
image

You need latest types definition ;)
Update @polkadot/api and install @phala/typedefs
Add types to ApiPromise.create

import { dev as phalaDevTypes } from '@phala/typedefs';

ApiPromise.create({
    provider,
    types: {
        ...phalaDevTypes
    },
});
2 Likes

Thanks! You successfully solved the problem that has troubled me for a long time.