LikeCoin
English
Search…
⌃K
Links

iscn-message-types

Provides javascript/typescript protobuf message definition for ISCN message.

Repositories

Sample usage:

import { MsgCreateIscnRecord } from '@likecoin/iscn-message-types/dist/iscn/tx';
​
const registry = new Registry([
...defaultRegistryTypes,
['/likechain.iscn.MsgCreateIscnRecord', MsgCreateIscnRecord],
]);
​
const client = await SigningStargateClient.connectWithSigner(
RPC_URL,
signer,
{ registry }
);
​
...
​
const message = {
typeUrl: '/likechain.iscn.MsgCreateIscnRecord',
value: {
from: address,
record,
},
};
​
...
​
const response = await client.signAndBroadcast(address, [message], fee, '');
assertIsBroadcastTxSuccess(response);
Last modified 1yr ago