UNPKG

lumina-node

Version:

Lumina node for Celestia, running in browser

3,419 lines (1,772 loc) 127 kB
<a name="readmemd"></a> **lumina-node-wasm** *** # Lumina node wasm A compatibility layer for the [`Lumina`](https://github.com/eigerco/lumina) node to work within a browser environment and be operable with javascript. # Changelog You can find about the latest changes [here](https://github.com/eigerco/lumina/blob/main/node-wasm/CHANGELOG.md). # Example Starting lumina inside a dedicated worker ```javascript import { spawnNode, Network, NodeConfig } from "lumina-node"; const node = await spawnNode(); const mainnetConfig = NodeConfig.default(Network.Mainnet); await node.start(mainnetConfig); await node.waitConnected(); await node.requestHeadHeader(); ``` ## Manual setup `spawnNode` sets up a `DedicatedWorker` instance and runs `NodeWorker` there. If you want to set things up manually you need to connect client and worker using objects that have `MessagePort` interface. ```javascript import { Network, NodeClient, NodeConfig, NodeWorker } from "lumina-node"; const config = NodeConfig.default(Network.Mainnet); // client and worker accept any object with MessagePort like interface e.g. Worker const channel = new MessageChannel(); const worker = new NodeWorker(channel.port1); // note that this runs lumina in the current context (and doesn't create a new web-worker). Promise created with `.run()` never completes. const worker_promise = worker.run(); // client port can be used locally or transferred like any plain MessagePort const client = await new NodeClient(channel.port2); await client.waitConnected(); await client.requestHeadHeader(); ``` ## Rust API For comprehensive and fully typed interface documentation, see [lumina-node](https://docs.rs/lumina-node/latest/lumina_node/) and [celestia-types](https://docs.rs/celestia-types/latest/celestia_types/) documentation on docs.rs. You can see there the exact structure of more complex types, such as [`ExtendedHeader`](https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html). JavaScript API's goal is to provide similar interface to Rust when possible, e.g. `NodeClient` mirrors [`Node`](https://docs.rs/lumina-node/latest/lumina_node/node/struct.Node.html). # Classes <a name="classesabcimessagelogmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / AbciMessageLog ## Class: AbciMessageLog ABCIMessageLog defines a structure containing an indexed tx ABCI message log. ### Properties #### events > **events**: [`StringEvent`](#classesstringeventmd)[] Events contains a slice of Event objects that were emitted during some execution. ##### Defined in lumina\_node\_wasm.d.ts:531 *** #### log > **log**: `string` ##### Defined in lumina\_node\_wasm.d.ts:526 *** #### msg\_index > **msg\_index**: `number` ##### Defined in lumina\_node\_wasm.d.ts:525 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:524 <a name="classesabciqueryresponsemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / AbciQueryResponse ## Class: AbciQueryResponse Response to a tx query ### Properties #### code > **code**: [`ErrorCode`](#enumerationserrorcodemd) Response code. ##### Defined in lumina\_node\_wasm.d.ts:542 *** #### codespace > **codespace**: `string` Namespace for the Code. ##### Defined in lumina\_node\_wasm.d.ts:546 *** #### height > `readonly` **height**: `bigint` The block height from which data was derived. Note that this is the height of the block containing the application's Merkle root hash, which represents the state as it was after committing the block at height - 1. ##### Defined in lumina\_node\_wasm.d.ts:588 *** #### index > **index**: `bigint` The index of the key in the tree. ##### Defined in lumina\_node\_wasm.d.ts:550 *** #### info > **info**: `string` Additional information. May be non-deterministic. ##### Defined in lumina\_node\_wasm.d.ts:581 *** #### key > **key**: `Uint8Array`\<`ArrayBuffer`\> The key of the matching data. ##### Defined in lumina\_node\_wasm.d.ts:554 *** #### log > **log**: `string` The output of the application's logger (raw string). May be non-deterministic. ##### Defined in lumina\_node\_wasm.d.ts:577 *** #### value > **value**: `Uint8Array`\<`ArrayBuffer`\> The value of the matching data. ##### Defined in lumina\_node\_wasm.d.ts:558 ### Accessors #### proof\_ops ##### Get Signature > **get** **proof\_ops**(): [`ProofOps`](#classesproofopsmd) Serialized proof for the value data, if requested, to be verified against the [`AppHash`] for the given [`Height`]. [`AppHash`]: tendermint::hash::AppHash ###### Returns [`ProofOps`](#classesproofopsmd) ##### Set Signature > **set** **proof\_ops**(`value`): `void` Serialized proof for the value data, if requested, to be verified against the [`AppHash`] for the given [`Height`]. [`AppHash`]: tendermint::hash::AppHash ###### Parameters ####### value [`ProofOps`](#classesproofopsmd) ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:565 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:538 <a name="classesaccaddressmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / AccAddress ## Class: AccAddress Address of an account. ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:603 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:598 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:602 <a name="classesappversionmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / AppVersion ## Class: AppVersion Version of the App ### Properties #### V1 > `readonly` `static` **V1**: [`AppVersion`](#classesappversionmd) App v1 ##### Defined in lumina\_node\_wasm.d.ts:618 *** #### V2 > `readonly` `static` **V2**: [`AppVersion`](#classesappversionmd) App v2 ##### Defined in lumina\_node\_wasm.d.ts:622 *** #### V3 > `readonly` `static` **V3**: [`AppVersion`](#classesappversionmd) App v3 ##### Defined in lumina\_node\_wasm.d.ts:626 *** #### V4 > `readonly` `static` **V4**: [`AppVersion`](#classesappversionmd) App v4 ##### Defined in lumina\_node\_wasm.d.ts:630 *** #### V5 > `readonly` `static` **V5**: [`AppVersion`](#classesappversionmd) App v5 ##### Defined in lumina\_node\_wasm.d.ts:634 *** #### V6 > `readonly` `static` **V6**: [`AppVersion`](#classesappversionmd) App v6 ##### Defined in lumina\_node\_wasm.d.ts:638 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:610 *** #### latest() > `static` **latest**(): [`AppVersion`](#classesappversionmd) Latest App version variant. ##### Returns [`AppVersion`](#classesappversionmd) ##### Defined in lumina\_node\_wasm.d.ts:614 <a name="classesattributemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Attribute ## Class: Attribute Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. ### Properties #### key > **key**: `string` ##### Defined in lumina\_node\_wasm.d.ts:647 *** #### value > **value**: `string` ##### Defined in lumina\_node\_wasm.d.ts:648 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:646 <a name="classesauthinfomd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / AuthInfo ## Class: AuthInfo [`AuthInfo`] describes the fee and signer modes that are used to sign a transaction. ### Properties #### fee > **fee**: [`Fee`](#classesfeemd) [`Fee`] and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation. ##### Defined in lumina\_node\_wasm.d.ts:671 *** #### signer\_infos > **signer\_infos**: [`SignerInfo`](#classessignerinfomd)[] Defines the signing modes for the required signers. The number and order of elements must match the required signers from transaction [`TxBody`]’s messages. The first element is the primary signer and the one which pays the [`Fee`]. ##### Defined in lumina\_node\_wasm.d.ts:663 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:655 <a name="classesblobmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Blob ## Class: Blob Arbitrary data that can be stored in the network within certain [`Namespace`]. ### Constructors #### new Blob() > **new Blob**(`namespace`, `data`, `app_version`): [`Blob`](#classesblobmd) Create a new blob with the given data within the [`Namespace`]. ##### Parameters ###### namespace [`Namespace`](#classesnamespacemd) ###### data `Uint8Array`\<`ArrayBuffer`\> ###### app\_version [`AppVersion`](#classesappversionmd) ##### Returns [`Blob`](#classesblobmd) ##### Defined in lumina\_node\_wasm.d.ts:689 ### Properties #### commitment > **commitment**: [`Commitment`](#classescommitmentmd) A [`Commitment`] computed from the [`Blob`]s data. ##### Defined in lumina\_node\_wasm.d.ts:709 *** #### data > **data**: `Uint8Array`\<`ArrayBuffer`\> Data stored within the [`Blob`]. ##### Defined in lumina\_node\_wasm.d.ts:701 *** #### namespace > **namespace**: [`Namespace`](#classesnamespacemd) A [`Namespace`] the [`Blob`] belongs to. ##### Defined in lumina\_node\_wasm.d.ts:697 *** #### share\_version > **share\_version**: `number` Version indicating the format in which [`Share`]s should be created from this [`Blob`]. ##### Defined in lumina\_node\_wasm.d.ts:705 ### Accessors #### index ##### Get Signature > **get** **index**(): `bigint` Index of the blob's first share in the EDS. Only set for blobs retrieved from chain. ###### Returns `bigint` ##### Set Signature > **set** **index**(`value`): `void` Index of the blob's first share in the EDS. Only set for blobs retrieved from chain. ###### Parameters ####### value `bigint` ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:713 *** #### signer ##### Get Signature > **get** **signer**(): [`AccAddress`](#classesaccaddressmd) A signer of the blob, i.e. address of the account which submitted the blob. Must be present in `share_version 1` and absent otherwise. ###### Returns [`AccAddress`](#classesaccaddressmd) ##### Set Signature > **set** **signer**(`value`): `void` A signer of the blob, i.e. address of the account which submitted the blob. Must be present in `share_version 1` and absent otherwise. ###### Parameters ####### value [`AccAddress`](#classesaccaddressmd) ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:723 ### Methods #### clone() > **clone**(): [`Blob`](#classesblobmd) Clone a blob creating a new deep copy of it. ##### Returns [`Blob`](#classesblobmd) ##### Defined in lumina\_node\_wasm.d.ts:693 *** #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:685 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:680 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:684 <a name="classesblobparamsmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / BlobParams ## Class: BlobParams Params defines the parameters for the blob module. ### Properties #### gas\_per\_blob\_byte > **gas\_per\_blob\_byte**: `number` Gas cost per blob byte ##### Defined in lumina\_node\_wasm.d.ts:748 *** #### gov\_max\_square\_size > **gov\_max\_square\_size**: `bigint` Max square size ##### Defined in lumina\_node\_wasm.d.ts:752 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:744 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:739 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:743 <a name="classesblockmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Block ## Class: Block Blocks consist of a header, transactions, votes (the commit), and a list of evidence of malfeasance (i.e. signing conflicting votes). This is a modified version of [`tendermint::block::Block`] which contains [modifications](data-mod) that Celestia introduced. [data-mod]: https://github.com/celestiaorg/celestia-core/blob/a1268f7ae3e688144a613c8a439dd31818aae07d/proto/tendermint/types/types.proto#L84-L104 ### Properties #### data > **data**: [`Data`](#classesdatamd) Transaction data ##### Defined in lumina\_node\_wasm.d.ts:769 *** #### evidence > `readonly` **evidence**: [`Evidence`](#classesevidencemd)[] Evidence of malfeasance ##### Defined in lumina\_node\_wasm.d.ts:777 *** #### header > `readonly` **header**: [`Header`](#classesheadermd) Block header ##### Defined in lumina\_node\_wasm.d.ts:773 *** #### lastCommit > `readonly` **lastCommit**: [`Commit`](#classescommitmd) Last commit, should be `None` for the initial block. ##### Defined in lumina\_node\_wasm.d.ts:781 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:765 <a name="classesblockidmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / BlockId ## Class: BlockId Block identifiers which contain two distinct Merkle roots of the block, as well as the number of parts in the block. ### Properties #### hash > **hash**: `string` The block’s main hash is the Merkle root of all the fields in the block header. ##### Defined in lumina\_node\_wasm.d.ts:792 *** #### part\_set\_header > **part\_set\_header**: [`PartsHeader`](#classespartsheadermd) Parts header (if available) is used for secure gossipping of the block during consensus. It is the Merkle root of the complete serialized block cut into parts. PartSet is used to split a byteslice of data into parts (pieces) for transmission. By splitting data into smaller parts and computing a Merkle root hash on the list, you can verify that a part is legitimately part of the complete data, and the part can be forwarded to other peers before all the parts are known. In short, it’s a fast way to propagate a large file over a gossip network. <https://github.com/tendermint/tendermint/wiki/Block-Structure#partset> PartSetHeader in protobuf is defined as never nil using the gogoproto annotations. This does not translate to Rust, but we can indicate this in the domain type. ##### Defined in lumina\_node\_wasm.d.ts:808 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:788 <a name="classesblockrangemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / BlockRange ## Class: BlockRange A range of blocks between `start` and `end` height, inclusive ### Properties #### end > **end**: `bigint` Last block height in range ##### Defined in lumina\_node\_wasm.d.ts:831 *** #### start > **start**: `bigint` First block height in range ##### Defined in lumina\_node\_wasm.d.ts:827 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:823 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:818 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:822 <a name="classesbroadcastmodemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / BroadcastMode ## Class: BroadcastMode BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. ### Properties #### Async > `readonly` `static` **Async**: [`BroadcastMode`](#classesbroadcastmodemd) `BroadcastMode` `Async` defines a tx broadcasting mode where the client returns immediately. ##### Defined in lumina\_node\_wasm.d.ts:857 *** #### Block > `readonly` `static` **Block**: [`BroadcastMode`](#classesbroadcastmodemd) DEPRECATED: use `BroadcastMode` `Sync` instead, `BroadcastMode` `Block` is not supported by the SDK from v0.47.x onwards. ##### Defined in lumina\_node\_wasm.d.ts:847 *** #### Sync > `readonly` `static` **Sync**: [`BroadcastMode`](#classesbroadcastmodemd) `BroadcastMode` `Sync` defines a tx broadcasting mode where the client waits for a CheckTx execution response only. ##### Defined in lumina\_node\_wasm.d.ts:852 *** #### Unspecified > `readonly` `static` **Unspecified**: [`BroadcastMode`](#classesbroadcastmodemd) zero-value for mode ordering ##### Defined in lumina\_node\_wasm.d.ts:842 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:838 <a name="classescoinmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Coin ## Class: Coin Coin defines a token with a denomination and an amount. ### Properties #### amount > **amount**: `bigint` ##### Defined in lumina\_node\_wasm.d.ts:427 *** #### denom > **denom**: `string` ##### Defined in lumina\_node\_wasm.d.ts:426 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:864 <a name="classescommitmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Commit ## Class: Commit Commit contains the justification (ie. a set of signatures) that a block was committed by a set of validators. ### Properties #### block\_id > **block\_id**: [`BlockId`](#classesblockidmd) Block ID ##### Defined in lumina\_node\_wasm.d.ts:884 *** #### height > **height**: `bigint` Block height ##### Defined in lumina\_node\_wasm.d.ts:876 *** #### round > **round**: `number` Round ##### Defined in lumina\_node\_wasm.d.ts:880 *** #### signatures > **signatures**: [`CommitSig`](#classescommitsigmd)[] Signatures ##### Defined in lumina\_node\_wasm.d.ts:888 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:872 <a name="classescommitsigmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / CommitSig ## Class: CommitSig CommitSig represents a signature of a validator. It’s a part of the Commit and can be used to reconstruct the vote set given the validator set. ### Properties #### vote\_type > **vote\_type**: [`CommitVoteType`](#enumerationscommitvotetypemd) vote type of a validator ##### Defined in lumina\_node\_wasm.d.ts:900 ### Accessors #### vote ##### Get Signature > **get** **vote**(): [`CommitVote`](#classescommitvotemd) vote, if received ###### Returns [`CommitVote`](#classescommitvotemd) ##### Set Signature > **set** **vote**(`value`): `void` vote, if received ###### Parameters ####### value [`CommitVote`](#classescommitvotemd) ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:904 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:896 <a name="classescommitvotemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / CommitVote ## Class: CommitVote Value of the validator vote ### Properties #### timestamp > **timestamp**: `string` Timestamp ##### Defined in lumina\_node\_wasm.d.ts:923 *** #### validator\_address > **validator\_address**: `string` Address of the voting validator ##### Defined in lumina\_node\_wasm.d.ts:919 ### Accessors #### signature ##### Get Signature > **get** **signature**(): [`Signature`](#classessignaturemd) Signature ###### Returns [`Signature`](#classessignaturemd) ##### Set Signature > **set** **signature**(`value`): `void` Signature ###### Parameters ####### value [`Signature`](#classessignaturemd) ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:927 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:915 <a name="classescommitmentmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Commitment ## Class: Commitment A merkle hash used to identify the [`Blob`]s data. In Celestia network, the transaction which pays for the blob's inclusion is separated from the data itself. The reason for that is to allow verifying the blockchain's state without the need to pull the actual data which got stored. To achieve that, the [`MsgPayForBlobs`] transaction only includes the [`Commitment`]s of the blobs it is paying for, not the data itself. The algorithm of computing the [`Commitment`] of the [`Blob`]'s [`Share`]s is designed in a way to allow easy and cheap proving of the [`Share`]s inclusion in the block. It is computed as a [`merkle hash`] of all the [`Nmt`] subtree roots created from the blob shares included in the [`ExtendedDataSquare`] rows. Assuming the `s1` and `s2` are the only shares of some blob posted to the celestia, they'll result in a single subtree root as shown below: ```text NMT: row root / \ o subtree root / \ / \ _________________ EDS row: | s | s | s1 | s2 | ``` Using subtree roots as a base for [`Commitment`] computation allows for much smaller inclusion proofs than when the [`Share`]s would be used directly, but it imposes some constraints on how the [`Blob`]s can be placed in the [`ExtendedDataSquare`]. You can read more about that in the [`share commitment rules`]. [`Blob`]: crate::Blob [`Share`]: crate::share::Share [`MsgPayForBlobs`]: celestia_proto::celestia::blob::v1::MsgPayForBlobs [`merkle hash`]: tendermint::merkle::simple_hash_from_byte_vectors [`Nmt`]: crate::nmt::Nmt [`ExtendedDataSquare`]: crate::ExtendedDataSquare [`share commitment rules`]: https://github.com/celestiaorg/celestia-app/blob/main/specs/src/specs/data_square_layout.md#blob-share-commitment-rules ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:981 *** #### hash() > **hash**(): `Uint8Array`\<`ArrayBuffer`\> Hash of the commitment ##### Returns `Uint8Array`\<`ArrayBuffer`\> ##### Defined in lumina\_node\_wasm.d.ts:985 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:976 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:980 <a name="classesconfigresponsemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / ConfigResponse ## Class: ConfigResponse Response holding consensus node configuration. ### Properties #### halt\_height > **halt\_height**: `bigint` A height at which the node should stop advancing state. ##### Defined in lumina\_node\_wasm.d.ts:1012 *** #### pruning\_interval > **pruning\_interval**: `bigint` Amount of blocks used as an interval to trigger prunning. ##### Defined in lumina\_node\_wasm.d.ts:1008 *** #### pruning\_keep\_recent > **pruning\_keep\_recent**: `bigint` How many recent blocks are stored by the node. ##### Defined in lumina\_node\_wasm.d.ts:1004 ### Accessors #### minimum\_gas\_price ##### Get Signature > **get** **minimum\_gas\_price**(): `number` Minimum gas price for the node to accept tx. Value is in `utia` denom. ###### Returns `number` ##### Set Signature > **set** **minimum\_gas\_price**(`value`): `void` Minimum gas price for the node to accept tx. Value is in `utia` denom. ###### Parameters ####### value `number` ###### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:996 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:992 <a name="classesconflictingblockmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / ConflictingBlock ## Class: ConflictingBlock Conflicting block detected in light client attack ### Properties #### signed\_header > **signed\_header**: [`SignedHeader`](#classessignedheadermd) Signed header ##### Defined in lumina\_node\_wasm.d.ts:1023 *** #### validator\_set > **validator\_set**: [`ValidatorSet`](#classesvalidatorsetmd) Validator set ##### Defined in lumina\_node\_wasm.d.ts:1027 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1019 <a name="classesconnectioncounterssnapshotmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / ConnectionCountersSnapshot ## Class: ConnectionCountersSnapshot ### Properties #### num\_connections > **num\_connections**: `number` The total number of connections, both pending and established. ##### Defined in lumina\_node\_wasm.d.ts:1043 *** #### num\_established > **num\_established**: `number` The number of outgoing connections being established. ##### Defined in lumina\_node\_wasm.d.ts:1059 *** #### num\_established\_incoming > **num\_established\_incoming**: `number` The number of established incoming connections. ##### Defined in lumina\_node\_wasm.d.ts:1063 *** #### num\_established\_outgoing > **num\_established\_outgoing**: `number` The number of established outgoing connections. ##### Defined in lumina\_node\_wasm.d.ts:1067 *** #### num\_pending > **num\_pending**: `number` The total number of pending connections, both incoming and outgoing. ##### Defined in lumina\_node\_wasm.d.ts:1047 *** #### num\_pending\_incoming > **num\_pending\_incoming**: `number` The total number of pending connections, both incoming and outgoing. ##### Defined in lumina\_node\_wasm.d.ts:1051 *** #### num\_pending\_outgoing > **num\_pending\_outgoing**: `number` The number of outgoing connections being established. ##### Defined in lumina\_node\_wasm.d.ts:1055 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1039 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:1034 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1038 <a name="classesconsaddressmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / ConsAddress ## Class: ConsAddress Address of a consensus node. ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1082 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:1077 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1081 <a name="classesdatamd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Data ## Class: Data Data contained in a [`Block`]. [`Block`]: crate::block::Block ### Properties #### hash > **hash**: `Uint8Array`\<`ArrayBuffer`\> Hash is the root of a binary Merkle tree where the leaves of the tree are the row and column roots of an extended data square. Hash is often referred to as the "data root". ##### Defined in lumina\_node\_wasm.d.ts:1101 *** #### square\_size > **square\_size**: `bigint` Square width of original data square. ##### Defined in lumina\_node\_wasm.d.ts:1095 *** #### transactions > `readonly` **transactions**: `Uint8Array`\<`ArrayBuffer`\>[] Transactions ##### Defined in lumina\_node\_wasm.d.ts:1105 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1091 <a name="classesdataavailabilityheadermd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / DataAvailabilityHeader ## Class: DataAvailabilityHeader Header with commitments of the data availability. It consists of the root hashes of the merkle trees created from each row and column of the [`ExtendedDataSquare`]. Those are used to prove the inclusion of the data in a block. The hash of this header is a hash of all rows and columns and thus a data commitment of the block. ## Example ```no_run ## use celestia_types::{ExtendedHeader, Height, Share}; ## use celestia_types::nmt::{Namespace, NamespaceProof}; ## fn extended_header() -> ExtendedHeader { ## unimplemented!(); ## } ## fn shares_with_proof(_: Height, _: &Namespace) -> (Vec<Share>, NamespaceProof) { ## unimplemented!(); ## } // fetch the block header and data for your namespace let namespace = Namespace::new_v0(&[1, 2, 3, 4]).unwrap(); let eh = extended_header(); let (shares, proof) = shares_with_proof(eh.height(), &namespace); // get the data commitment for a given row let dah = eh.dah; let root = dah.row_root(0).unwrap(); // verify a proof of the inclusion of the shares assert!(proof.verify_complete_namespace(&root, &shares, *namespace).is_ok()); ``` [`ExtendedDataSquare`]: crate::eds::ExtendedDataSquare ### Methods #### columnRoot() > **columnRoot**(`column`): `any` Get the a root of the column with the given index. ##### Parameters ###### column `number` ##### Returns `any` ##### Defined in lumina\_node\_wasm.d.ts:1169 *** #### columnRoots() > **columnRoots**(): `any`[] Merkle roots of the [`ExtendedDataSquare`] columns. ##### Returns `any`[] ##### Defined in lumina\_node\_wasm.d.ts:1161 *** #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1153 *** #### hash() > **hash**(): `any` Compute the combined hash of all rows and columns. This is the data commitment for the block. ##### Returns `any` ##### Defined in lumina\_node\_wasm.d.ts:1175 *** #### rowRoot() > **rowRoot**(`row`): `any` Get a root of the row with the given index. ##### Parameters ###### row `number` ##### Returns `any` ##### Defined in lumina\_node\_wasm.d.ts:1165 *** #### rowRoots() > **rowRoots**(): `any`[] Merkle roots of the [`ExtendedDataSquare`] rows. ##### Returns `any`[] ##### Defined in lumina\_node\_wasm.d.ts:1157 *** #### squareWidth() > **squareWidth**(): `number` Get the size of the [`ExtendedDataSquare`] for which this header was built. ##### Returns `number` ##### Defined in lumina\_node\_wasm.d.ts:1179 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:1148 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1152 <a name="classesduplicatevoteevidencemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / DuplicateVoteEvidence ## Class: DuplicateVoteEvidence Duplicate vote evidence ### Properties #### timestamp > **timestamp**: `string` Timestamp ##### Defined in lumina\_node\_wasm.d.ts:1206 *** #### total\_voting\_power > **total\_voting\_power**: `bigint` Total voting power ##### Defined in lumina\_node\_wasm.d.ts:1198 *** #### validator\_power > **validator\_power**: `bigint` Validator power ##### Defined in lumina\_node\_wasm.d.ts:1202 *** #### vote\_a > **vote\_a**: [`Vote`](#classesvotemd) Vote A ##### Defined in lumina\_node\_wasm.d.ts:1190 *** #### vote\_b > **vote\_b**: [`Vote`](#classesvotemd) Vote B ##### Defined in lumina\_node\_wasm.d.ts:1194 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1186 <a name="classesevidencemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Evidence ## Class: Evidence Evidence of malfeasance by validators (i.e. signing conflicting votes or light client attack). ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1213 <a name="classesextendedheadermd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / ExtendedHeader ## Class: ExtendedHeader Block header together with the relevant Data Availability metadata. [`ExtendedHeader`]s are used to announce and describe the blocks in the Celestia network. Before being used, each header should be validated and verified with a header you trust. ## Example ``` ## use celestia_types::ExtendedHeader; ## fn trusted_genesis_header() -> ExtendedHeader { ## let s = include_str!("../test_data/chain1/extended_header_block_1.json"); ## serde_json::from_str(s).unwrap() ## } ## fn some_untrusted_header() -> ExtendedHeader { ## let s = include_str!("../test_data/chain1/extended_header_block_27.json"); ## serde_json::from_str(s).unwrap() ## } let genesis_header = trusted_genesis_header(); // fetch new header let fetched_header = some_untrusted_header(); fetched_header.validate().expect("Invalid block header"); genesis_header.verify(&fetched_header).expect("Malicious header received"); ``` ### Properties #### commit > `readonly` **commit**: `any` Commit metadata and signatures from validators committing the block. ##### Defined in lumina\_node\_wasm.d.ts:1344 *** #### dah > **dah**: [`DataAvailabilityHeader`](#classesdataavailabilityheadermd) Header of the block data availability. ##### Defined in lumina\_node\_wasm.d.ts:1336 *** #### header > `readonly` **header**: `any` Tendermint block header. ##### Defined in lumina\_node\_wasm.d.ts:1340 *** #### validatorSet > `readonly` **validatorSet**: `any` Information about the set of validators commiting the block. ##### Defined in lumina\_node\_wasm.d.ts:1348 ### Methods #### clone() > **clone**(): [`ExtendedHeader`](#classesextendedheadermd) Clone a header producing a deep copy of it. ##### Returns [`ExtendedHeader`](#classesextendedheadermd) ##### Defined in lumina\_node\_wasm.d.ts:1258 *** #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1254 *** #### hash() > **hash**(): `string` Get the block hash. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1270 *** #### height() > **height**(): `bigint` Get the block height. ##### Returns `bigint` ##### Defined in lumina\_node\_wasm.d.ts:1262 *** #### previousHeaderHash() > **previousHeaderHash**(): `string` Get the hash of the previous header. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1274 *** #### time() > **time**(): `number` Get the block time. ##### Returns `number` ##### Defined in lumina\_node\_wasm.d.ts:1266 *** #### toJSON() > **toJSON**(): `Object` * Return copy of self without private attributes. ##### Returns `Object` ##### Defined in lumina\_node\_wasm.d.ts:1249 *** #### toString() > **toString**(): `string` Return stringified version of self. ##### Returns `string` ##### Defined in lumina\_node\_wasm.d.ts:1253 *** #### validate() > **validate**(): `void` Decode protobuf encoded header and then validate it. ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1278 *** #### verify() > **verify**(`untrusted`): `void` Verify a chain of adjacent untrusted headers and make sure they are adjacent to `self`. ## Errors If verification fails, this function will return an error with a reason of failure. This function will also return an error if untrusted headers and `self` don't form contiguous range ##### Parameters ###### untrusted [`ExtendedHeader`](#classesextendedheadermd) ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1288 *** #### verifyAdjacentRange() > **verifyAdjacentRange**(`untrusted`): `void` Verify a chain of adjacent untrusted headers and make sure they are adjacent to `self`. ## Note Provided headers will be consumed by this method, meaning they will no longer be accessible. If this behavior is not desired, consider using `ExtendedHeader.clone()`. ```js const genesis = hdr0; const headers = [hrd1, hdr2, hdr3]; genesis.verifyAdjacentRange(headers.map(h => h.clone())); ``` ## Errors If verification fails, this function will return an error with a reason of failure. This function will also return an error if untrusted headers and `self` don't form contiguous range ##### Parameters ###### untrusted [`ExtendedHeader`](#classesextendedheadermd)[] ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1332 *** #### verifyRange() > **verifyRange**(`untrusted`): `void` Verify a chain of adjacent untrusted headers. ## Note Provided headers will be consumed by this method, meaning they will no longer be accessible. If this behavior is not desired, consider using `ExtendedHeader.clone()`. ```js const genesis = hdr0; const headers = [hrd1, hdr2, hdr3]; genesis.verifyRange(headers.map(h => h.clone())); ``` ## Errors If verification fails, this function will return an error with a reason of failure. This function will also return an error if untrusted headers are not adjacent to each other. ##### Parameters ###### untrusted [`ExtendedHeader`](#classesextendedheadermd)[] ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1310 <a name="classesfeemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / Fee ## Class: Fee Fee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool. ### Properties #### amount > **amount**: [`Coin`](#classescoinmd)[] amount is the amount of coins to be paid as a fee ##### Defined in lumina\_node\_wasm.d.ts:1361 *** #### gas\_limit > **gas\_limit**: `bigint` gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs ##### Defined in lumina\_node\_wasm.d.ts:1366 *** #### granter > `readonly` **granter**: `string` if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail ##### Defined in lumina\_node\_wasm.d.ts:1378 *** #### payer > `readonly` **payer**: `string` if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction. ##### Defined in lumina\_node\_wasm.d.ts:1372 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1357 <a name="classesgasestimatemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / GasEstimate ## Class: GasEstimate Result of gas price and usage estimation ### Properties #### price > **price**: `number` Gas price estimated based on last 5 blocks ##### Defined in lumina\_node\_wasm.d.ts:1389 *** #### usage > **usage**: `bigint` Simulated transaction gas usage ##### Defined in lumina\_node\_wasm.d.ts:1393 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1385 <a name="classesgasinfomd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / GasInfo ## Class: GasInfo GasInfo defines tx execution gas context. ### Properties #### gas\_used > **gas\_used**: `bigint` GasUsed is the amount of gas actually consumed. ##### Defined in lumina\_node\_wasm.d.ts:1408 *** #### gas\_wanted > **gas\_wanted**: `bigint` GasWanted is the maximum units of work we allow this tx to perform. ##### Defined in lumina\_node\_wasm.d.ts:1404 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1400 <a name="classesgettxresponsemd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / GetTxResponse ## Class: GetTxResponse Response to GetTx ### Properties #### tx > **tx**: [`Tx`](#classestxmd) Response Transaction ##### Defined in lumina\_node\_wasm.d.ts:1419 *** #### tx\_response > **tx\_response**: [`TxResponse`](#classestxresponsemd) TxResponse to a Query ##### Defined in lumina\_node\_wasm.d.ts:1423 ### Methods #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1415 <a name="classesgrpcclientmd"></a> [**lumina-node-wasm**](#readmemd) *** [lumina-node-wasm](#globalsmd) / GrpcClient ## Class: GrpcClient Celestia gRPC client, for builder see [`GrpcClientBuilder`] ### Properties #### appVersion > `readonly` **appVersion**: `Promise`\<[`AppVersion`](#classesappversionmd)\> AppVersion of the client ##### Defined in lumina\_node\_wasm.d.ts:1572 *** #### chainId > `readonly` **chainId**: `Promise`\<`string`\> Chain id of the client ##### Defined in lumina\_node\_wasm.d.ts:1568 ### Methods #### abciQuery() > **abciQuery**(`data`, `path`, `height`, `prove`): `Promise`\<[`AbciQueryResponse`](#classesabciqueryresponsemd)\> Issue a direct ABCI query to the application ##### Parameters ###### data `Uint8Array`\<`ArrayBuffer`\> ###### path `string` ###### height `bigint` ###### prove `boolean` ##### Returns `Promise`\<[`AbciQueryResponse`](#classesabciqueryresponsemd)\> ##### Defined in lumina\_node\_wasm.d.ts:1489 *** #### broadcastTx() > **broadcastTx**(`tx_bytes`, `mode`): `Promise`\<[`TxResponse`](#classestxresponsemd)\> Broadcast prepared and serialised transaction ##### Parameters ###### tx\_bytes `Uint8Array`\<`ArrayBuffer`\> ###### mode [`BroadcastMode`](#classesbroadcastmodemd) ##### Returns `Promise`\<[`TxResponse`](#classestxresponsemd)\> ##### Defined in lumina\_node\_wasm.d.ts:1493 *** #### estimateGasPrice() > **estimateGasPrice**(`priority`): `Promise`\<`number`\> Estimate gas price for given transaction priority based on the gas prices of the transactions in the last five blocks. If no transaction is found in the last five blocks, return the network min gas price. ##### Parameters ###### priority [`TxPriority`](#enumerationstxprioritymd) ##### Returns `Promise`\<`number`\> ##### Defined in lumina\_node\_wasm.d.ts:1517 *** #### free() > **free**(): `void` ##### Returns `void` ##### Defined in lumina\_node\_wasm.d.ts:1430 *** #### get\_node\_config() > **get\_node\_config**(): `Promise`\<[`ConfigResponse`](#classesconfigresponsemd)\> Get node configuration ##### Returns `Promise`\<[`ConfigResponse`](#classesconfigresponsemd)\> ##### Defined in lumina\_node\_wasm.d.ts:1477 *** #### getAccount() > **getAccount**(`account`): `Promise`\<[`BaseAccount`](#interfacesbaseaccountmd)\> Get account ##### Parameters ###### account `string` ##### Returns `Promise`\<[`BaseAccount`](#interfacesbaseaccountmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1442 *** #### getAccounts() > **getAccounts**(): `Promise`\<[`BaseAccount`](#interfacesbaseaccountmd)[]\> Get accounts ##### Returns `Promise`\<[`BaseAccount`](#interfacesbaseaccountmd)[]\> ##### Defined in lumina\_node\_wasm.d.ts:1446 *** #### getAllBalances() > **getAllBalances**(`address`): `Promise`\<[`Coin`](#classescoinmd)[]\> Get balance of all coins ##### Parameters ###### address `string` ##### Returns `Promise`\<[`Coin`](#classescoinmd)[]\> ##### Defined in lumina\_node\_wasm.d.ts:1465 *** #### getAuthParams() > **getAuthParams**(): `Promise`\<[`AuthParams`](#interfacesauthparamsmd)\> Get auth params ##### Returns `Promise`\<[`AuthParams`](#interfacesauthparamsmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1438 *** #### getBalance() > **getBalance**(`address`, `denom`): `Promise`\<[`Coin`](#classescoinmd)\> Retrieves the Celestia coin balance for the given address. ##### Parameters ###### address `string` ###### denom `string` ##### Returns `Promise`\<[`Coin`](#classescoinmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1461 *** #### getBlobParams() > **getBlobParams**(): `Promise`\<[`BlobParams`](#classesblobparamsmd)\> Get blob params ##### Returns `Promise`\<[`BlobParams`](#classesblobparamsmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1505 *** #### getBlockByHeight() > **getBlockByHeight**(`height`): `Promise`\<[`Block`](#classesblockmd)\> Get block by height ##### Parameters ###### height `bigint` ##### Returns `Promise`\<[`Block`](#classesblockmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1485 *** #### getLatestBlock() > **getLatestBlock**(): `Promise`\<[`Block`](#classesblockmd)\> Get latest block ##### Returns `Promise`\<[`Block`](#classesblockmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1481 *** #### getSpendableBalances() > **getSpendableBalances**(`address`): `Promise`\<[`Coin`](#classescoinmd)[]\> Get balance of all spendable coins ##### Parameters ###### address `string` ##### Returns `Promise`\<[`Coin`](#classescoinmd)[]\> ##### Defined in lumina\_node\_wasm.d.ts:1469 *** #### getTotalSupply() > **getTotalSupply**(): `Promise`\<[`Coin`](#classescoinmd)[]\> Get total supply ##### Returns `Promise`\<[`Coin`](#classescoinmd)[]\> ##### Defined in lumina\_node\_wasm.d.ts:1473 *** #### getTx() > **getTx**(`hash`): `Promise`\<[`GetTxResponse`](#classesgettxresponsemd)\> Get Tx ##### Parameters ###### hash `string` ##### Returns `Promise`\<[`GetTxResponse`](#classesgettxresponsemd)\> ##### Defined in lumina\_node\_wasm.d.ts:1497 *** #### getVerifiedBalance() > **getVerifiedBalance**(`address`, `header`): `Promise`\<[`Coin`](#classescoinmd)\> Retrieves the verified Celestia coin balance for the address. ## Notes This returns the verified balance which is the one that was reported by the previous network block. In other words, if you transfer some coins, you need to wait 1 more block in order to see the new balance. If you want something more immediate then use [`GrpcClient::get_balance`]. ##### Parameters ###### address `string` ###### header [`ExtendedHeader`](#classesextendedheadermd) ##### Returns `Promise`\<[`Coin`](#classescoinmd)\> ##### Defined in lumina\_node\_wasm.d.ts:1457 *** #### simulate() > **simulate**(`tx_bytes`): `Promise`\<[`GasInfo`](#classesgasinfomd)\> Simulate prepared and serialised transaction, returning simulated gas usage ##### Parameters ###### tx\_bytes `Uint8Array`\<`ArrayBuffer`\> ##### Returns `Promise`\<[`GasInfo`](#classesgasinfomd)\> ##### Defined in lumina\_node\_wasm.d.ts:1501 *** #### submitBlobs() > **submitBlobs**(`blobs`, `tx_config`?): `Promise`\<[`TxInfo`](#interfacestxinfomd)\> Submit blobs to the celestia network. ## Example ```js const ns = Namespace.newV0(new Uint8Array([97, 98, 99])); const data = new Uint8Array([100, 97, 116, 97]); const blob = new Blob(ns, data, AppVersion.latest()); const txInfo = await txClient.submitBlobs([blob]); await txClient.submitBlobs([blob], { gasLimit: 100000n, gasPrice: 0.02, memo: "foo" }); ``` ## Note Provided blobs will be consumed by this method, meaning they will no longer be accessible. If this behavior is not desired, consider using `Blob.clone()`. ```js const blobs = [blob1, blob2, blob3]; await txClient.submitBlobs(blobs.map(b => b.clone())); ``` ##### Parameters ###### blobs [`Blob`](#classesblobmd)[] ###### tx\_config? [`TxConfig`](#interfacestxconfigmd) ##### Returns `Promise`\<[`TxInfo`](#interfacestxinfomd)\> ##### Defined in lumina\_node\_wasm.d.ts:1542 *** #### submitMessage() > **submitMessage**(`message`, `tx_config`?): `Promise`\<[`TxInfo`](#interfacestxinfomd)\> Submit message to the celestia network. ## Example ```js import { Registry } from "@cosmjs/proto-signing"; const registry = new Registry(); const sendMsg = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: { fromAddress: "celestia169s50psyj2f4la9a2235329xz7rk6c53zhw9mm", toAddress: "celestia1t52q7uqgnjfzdh3wx5m5phvma3umrq8k6tq2p9", amount: [{ denom: "utia", amount: "10000" }], }, }; const sendMsgAny = registry.encodeAsAny(sendMsg); const txInfo = await txClient.submitMessage(sendMsgAny); ``` ##### Parameters ###### message [`ProtoAny`](#interfacesprotoanymd) ###### tx\_config? [`TxConfig`](#interfacestxconfigmd) ##### Returns `Promise`\<[`TxInfo`](#interfacestxinfomd)\> ##### Defined in lumina\_node\_wasm.d.ts:1564 *** #### txStatus() > **txStatus**(`hash`): `Promise`\<[`TxStatusResponse`](#classestxstatusresponsemd)\> Get status of the transaction ##### Parameters ###### hash `string` ##### Returns `Promise`\<[`TxStatusResponse`](#classestxstatusresponsemd)\> ##### Defined in lumina\_node\_wasm.d.ts:1509 *** #### withUrl() > `static` **withUrl**(`url`): [`GrpcClien