Message
Defined in: packages/iso-filecoin/src/message.js:59
Filecoin Message class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Message(
msg
):Message
Defined in: packages/iso-filecoin/src/message.js:70
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
msg | { from : string ; gasFeeCap? : string ; gasLimit? : number ; gasPremium? : string ; method? : number ; nonce? : number ; params? : string ; to : string ; value : string ; version? : 0 ; } | - |
msg.from | string | - |
msg.gasFeeCap? | string | - |
msg.gasLimit? | number | - |
msg.gasPremium? | string | - |
msg.method? | number | - |
msg.nonce? | number | - |
msg.params? | string | Params encoded as base64pad |
msg.to | string | - |
msg.value | string | Value in attoFIL |
msg.version? | 0 | - |
Returns
Section titled “Returns”Message
Methods
Section titled “Methods”cidBytes()
Section titled “cidBytes()”cidBytes():
Uint8Array
<ArrayBufferLike
>
Defined in: packages/iso-filecoin/src/message.js:200
CID bytes of the filecoin message
Returns
Section titled “Returns”Uint8Array
<ArrayBufferLike
>
prepare()
Section titled “prepare()”prepare(
rpc
):Promise
<Message
>
Defined in: packages/iso-filecoin/src/message.js:130
Prepare message for signing with nonce and gas estimation
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
rpc | RPC |
Returns
Section titled “Returns”Promise
<Message
>
serialize()
Section titled “serialize()”serialize():
Uint8Array
<ArrayBufferLike
>
Defined in: packages/iso-filecoin/src/message.js:175
Serialize message using dag-cbor
Returns
Section titled “Returns”Uint8Array
<ArrayBufferLike
>
toLotus()
Section titled “toLotus()”toLotus():
object
Defined in: packages/iso-filecoin/src/message.js:87
Convert message to Lotus message
Returns
Section titled “Returns”object
From:
string
GasFeeCap
Section titled “GasFeeCap”GasFeeCap:
string
GasLimit
Section titled “GasLimit”GasLimit:
number
GasPremium
Section titled “GasPremium”GasPremium:
string
Method
Section titled “Method”Method:
number
Nonce:
number
Params
Section titled “Params”Params:
string
To:
string
Value:
string
Version
Section titled “Version”Version:
0
fromLotus()
Section titled “fromLotus()”
static
fromLotus(json
):Message
Defined in: packages/iso-filecoin/src/message.js:107
Create message from Lotus message
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
json | LotusMessage |
Returns
Section titled “Returns”Message
Properties
Section titled “Properties”from:
string
Defined in: packages/iso-filecoin/src/message.js:74
gasFeeCap
Section titled “gasFeeCap”gasFeeCap:
string
Defined in: packages/iso-filecoin/src/message.js:78
gasLimit
Section titled “gasLimit”gasLimit:
number
Defined in: packages/iso-filecoin/src/message.js:77
gasPremium
Section titled “gasPremium”gasPremium:
string
Defined in: packages/iso-filecoin/src/message.js:79
method
Section titled “method”method:
number
Defined in: packages/iso-filecoin/src/message.js:80
nonce:
number
Defined in: packages/iso-filecoin/src/message.js:75
params
Section titled “params”params:
string
Defined in: packages/iso-filecoin/src/message.js:81
to:
string
Defined in: packages/iso-filecoin/src/message.js:73
value:
string
Defined in: packages/iso-filecoin/src/message.js:76
version
Section titled “version”version:
0
Defined in: packages/iso-filecoin/src/message.js:72