@initia/initia.js 2.0.0-rc.0 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -22,28 +22,28 @@ TypeScript SDK for Initia and its rollup ecosystem.
|
|
|
22
22
|
|
|
23
23
|
## Supported Environments
|
|
24
24
|
|
|
25
|
-
| Environment | Version
|
|
26
|
-
|
|
27
|
-
| Node.js
|
|
28
|
-
| Browser
|
|
29
|
-
| Bun
|
|
30
|
-
| Deno
|
|
25
|
+
| Environment | Version | Transport |
|
|
26
|
+
| ----------- | ---------- | ---------------------- |
|
|
27
|
+
| Node.js | >= 22 | Native gRPC (HTTP/2) |
|
|
28
|
+
| Browser | Modern | gRPC-Web |
|
|
29
|
+
| Bun | >= 1.3.11 | Native gRPC (HTTP/2) |
|
|
30
|
+
| Deno | >= 2.5 | Native gRPC (HTTP/2) |
|
|
31
31
|
|
|
32
32
|
## Compatibility
|
|
33
33
|
|
|
34
34
|
### Chain Versions
|
|
35
35
|
|
|
36
|
-
| initia.js | Initia L1 | Minievm | Minimove
|
|
37
|
-
|
|
38
|
-
| v2.0.x
|
|
36
|
+
| initia.js | Initia L1 | Minievm | Minimove | Miniwasm | OPinit |
|
|
37
|
+
| --------- | --------- | ------- | ---------- | -------- | ------ |
|
|
38
|
+
| v2.0.x | v1.4.0 | v1.2.15 | v1.1.11\* | v1.2.11 | v1.3.0 |
|
|
39
39
|
|
|
40
40
|
\* Minimove v1.1.11 uses Initia v1.2.2 move proto — governance messages (Whitelist/Delist) differ from v1.4.0. Core move execute/view/query are compatible.
|
|
41
41
|
|
|
42
42
|
### Proto Dependencies
|
|
43
43
|
|
|
44
|
-
| initia.js | Cosmos SDK
|
|
45
|
-
|
|
46
|
-
| v2.0.x
|
|
44
|
+
| initia.js | Cosmos SDK | IBC | CosmWasm | Connect (Oracle) |
|
|
45
|
+
| --------- | ---------------- | ----------------- | ----------------- | ----------------- |
|
|
46
|
+
| v2.0.x | [`5a6ab7bc`][cs] | [`cc1d31ac`][ibc] | [`3c30b822`][cw] | [`ea643a0e`][co] |
|
|
47
47
|
|
|
48
48
|
[cs]: https://buf.build/cosmos/cosmos-sdk/commits/5a6ab7bc14314acaa912d5e53aef1c2f
|
|
49
49
|
[ibc]: https://buf.build/cosmos/ibc/commits/cc1d31ac98a0477580379346dab8e87b
|
|
@@ -195,7 +195,7 @@ const account = keyToViemAccount(rawKey)
|
|
|
195
195
|
|
|
196
196
|
## Architecture
|
|
197
197
|
|
|
198
|
-
```
|
|
198
|
+
```text
|
|
199
199
|
Provider --> ChainInfo --> ChainContext
|
|
200
200
|
(registry) (chain data) (client + signer + msgs)
|
|
201
201
|
```
|
|
@@ -203,7 +203,7 @@ Provider --> ChainInfo --> ChainContext
|
|
|
203
203
|
### Which provider to use
|
|
204
204
|
|
|
205
205
|
| Provider | Use case |
|
|
206
|
-
|
|
206
|
+
| --- | --- |
|
|
207
207
|
| `createRegistryProvider()` | **Default choice.** Fetches chain data from Initia registry. Works for all Initia L1/L2 chains. |
|
|
208
208
|
| `CustomProvider` | Private chains, local testnets, or non-Initia chains with manual config. |
|
|
209
209
|
| `CosmosRegistryProvider` | External Cosmos chains (Osmosis, Noble, etc.) via chain-registry npm package. |
|
|
@@ -225,7 +225,7 @@ const provider = composeProviders(
|
|
|
225
225
|
Domain-specific APIs are available via subpath exports:
|
|
226
226
|
|
|
227
227
|
| Import path | Description |
|
|
228
|
-
|
|
228
|
+
| --- | --- |
|
|
229
229
|
| `initia.js` | Core types, keys, wallet, typed context factories |
|
|
230
230
|
| `initia.js/client` | gRPC client, transport, interceptors |
|
|
231
231
|
| `initia.js/tx` | Signing, serialization, Amino conversion |
|
|
@@ -247,7 +247,7 @@ Domain-specific APIs are available via subpath exports:
|
|
|
247
247
|
|
|
248
248
|
See the [examples/](./examples) directory for runnable scripts:
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
### Getting started
|
|
251
251
|
|
|
252
252
|
- [query.ts](./examples/query.ts) -- Read-only gRPC queries
|
|
253
253
|
- [send.ts](./examples/send.ts) -- Send tokens with high-level API
|
|
@@ -255,7 +255,7 @@ See the [examples/](./examples) directory for runnable scripts:
|
|
|
255
255
|
- [staking.ts](./examples/staking.ts) -- Delegate, redelegate, undelegate, claim rewards
|
|
256
256
|
- [get-tx.ts](./examples/get-tx.ts) -- Decode transactions with VM-aware arg enrichment
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
### Smart contracts
|
|
259
259
|
|
|
260
260
|
- [move-contract.ts](./examples/move-contract.ts) -- ABI-driven Move contract interactions
|
|
261
261
|
- [move-typed.ts](./examples/move-typed.ts) -- Move contract with full type inference
|
|
@@ -265,7 +265,7 @@ See the [examples/](./examples) directory for runnable scripts:
|
|
|
265
265
|
- [wasm-typed.ts](./examples/wasm-typed.ts) -- CosmWasm contract with full type inference
|
|
266
266
|
- [deploy-cw20.ts](./examples/deploy-cw20.ts) -- Deploy and interact with a CW20 token
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
### RPC & low-level
|
|
269
269
|
|
|
270
270
|
- [evm-rpc.ts](./examples/evm-rpc.ts) -- EVM JSON-RPC (blocks, logs, receipts)
|
|
271
271
|
- [evm-jsonrpc.ts](./examples/evm-jsonrpc.ts) -- EVM JSON-RPC direct calls
|
|
@@ -274,7 +274,7 @@ See the [examples/](./examples) directory for runnable scripts:
|
|
|
274
274
|
- [raw-send.ts](./examples/raw-send.ts) -- Send using raw BSR proto messages
|
|
275
275
|
- [raw-query-historical.ts](./examples/raw-query-historical.ts) -- Query at historical block heights
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
### Cross-chain
|
|
278
278
|
|
|
279
279
|
- [op-bridge.ts](./examples/op-bridge.ts) -- OP Bridge deposit, withdraw, and claim
|
|
280
280
|
- [smart-route.ts](./examples/smart-route.ts) -- Router API for cross-chain transfers
|
|
@@ -282,12 +282,12 @@ See the [examples/](./examples) directory for runnable scripts:
|
|
|
282
282
|
- [noble-ibc-transfer.ts](./examples/noble-ibc-transfer.ts) -- IBC from external Cosmos chains
|
|
283
283
|
- [osmosis-custom-provider.ts](./examples/osmosis-custom-provider.ts) -- Custom provider for external Cosmos chains
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
### Custom chains & modules
|
|
286
286
|
|
|
287
287
|
- [custom-chain.ts](./examples/custom-chain.ts) -- CustomProvider, CosmosRegistryProvider, composeProviders
|
|
288
288
|
- [custom-rollup.ts](./examples/custom-rollup.ts) -- Add custom proto modules to rollup contexts
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
### Utilities
|
|
291
291
|
|
|
292
292
|
- [usernames.ts](./examples/usernames.ts) -- `.init` domain resolution
|
|
293
293
|
- [token.ts](./examples/token.ts) -- VM-agnostic token operations
|
|
@@ -296,6 +296,7 @@ See the [examples/](./examples) directory for runnable scripts:
|
|
|
296
296
|
- [cache-management.ts](./examples/cache-management.ts) -- gRPC response cache control
|
|
297
297
|
- [provider-assets.ts](./examples/provider-assets.ts) -- Provider asset and denom lookup
|
|
298
298
|
- [keystore.ts](./examples/keystore.ts) -- KeyStore multi-key management
|
|
299
|
+
- [ledger.ts](./examples/ledger.ts) -- Ledger hardware wallet (`@initia/ledger-key`)
|
|
299
300
|
|
|
300
301
|
## License
|
|
301
302
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $n as RpcConsensusStateResponse, A as BaseClient, Bn as ConsensusParams, Bt as BroadcastResult, C as NetworkType, D as TxOptions, E as SignedTx, Fn as CachedClient, Gn as RpcBlockMeta, Gt as createBroadcastResultWithWait, Hn as PaginationOptions, Ht as SignBroadcastOptions, In as AbciEvent, Jn as RpcBlockchainResponse, Jt as TxQueryClient, Kn as RpcBlockResponse, Ln as AbciEventAttribute, M as MinievmClient, N as MinimoveClient, O as UsernamesSupportedNetwork, P as MiniwasmClient, Qn as RpcConsensusParamsResponse, Qt as WaitForTxOptions, Rn as AbciQueryOptions, Rt as BroadcastMode, S as HttpRequestOptions, Ss as createRetryInterceptor, T as SignModeType, Un as RpcAbciInfoResponse, Ut as TxClient, Vn as ExecTxResult, Vt as BroadcastResultWithWait, Wn as RpcAbciQueryResponse, Wt as broadcast, Xn as RpcClientOptions, Yn as RpcClient, Yt as TxResult, Zn as RpcCommitResponse, _ as HasClient, _a as SimulateClient, _i as UnsignedTx, _s as Interceptor, ar as RpcNumUnconfirmedTxsResponse, b as HasUsernames, bs as TransportOptions, cr as RpcTxSearchResponse, dr as TxSearchOptions, ds as ServiceClients, er as RpcDumpConsensusStateResponse, fr as ValidatorUpdate, fs as createGrpcClient, g as ClientFor, gi as MultisigSignature, gs as wrapResponse, h as Client, ha as GasEstimate, hs as isWrappedResponse, ir as RpcNetInfoResponse, j as InitiaClient, k as auth, lr as RpcUnconfirmedTxsResponse, m as ChainType, ma as EstimateOptions, ms as WrappedResponse, nn as waitForTx, nr as RpcGenesisResponse, or as RpcStatusResponse, p as AuthConfig, pr as createRpcClient, ps as WrapReturnType, qn as RpcBlockSearchResponse, qt as TxEvent, rr as RpcHeaderResponse, sr as RpcTxResponse, tr as RpcGenesisChunkedResponse, ur as RpcValidatorsResponse, us as QueryClient, v as HasEvmService, va as estimateGas, vs as RetryOptions, w as QueryOptions, x as HasWasmService, xs as createHeadersInterceptor, y as HasMoveService, zn as BlockResultsResponse, zt as BroadcastOptions } from "./types-DGrP9Ro_.mjs";
|
|
2
2
|
import { a as EvmProfile, c as ProfileCache, d as getAddressProfile, i as EoaProfile, l as ShorthandProfile, n as AddressProfile, o as GetAddressProfileOptions, r as ContractKind, s as MoveProfile, t as AccountKind, u as WasmProfile } from "./address-profile-DjdaEBxo.mjs";
|
|
3
|
-
export { AbciEvent, AbciEventAttribute, AbciQueryOptions, AccountKind, AddressProfile, AuthConfig, BaseClient, BlockResultsResponse, BroadcastMode, BroadcastOptions, BroadcastResult, BroadcastResultWithWait, CachedClient, ChainType, Client, ClientFor, ConsensusParams, ContractKind, EoaProfile, EstimateOptions, EvmProfile, ExecTxResult, GasEstimate, GetAddressProfileOptions, HasClient, HasEvmService, HasMoveService, HasUsernames, HasWasmService, HttpRequestOptions, InitiaClient, Interceptor, MinievmClient, MinimoveClient, MiniwasmClient, MoveProfile, MultisigSignature, NetworkType, PaginationOptions, ProfileCache, QueryClient, QueryOptions, RetryOptions, RpcAbciInfoResponse, RpcAbciQueryResponse, RpcBlockMeta, RpcBlockResponse, RpcBlockSearchResponse, RpcBlockchainResponse, RpcClient, RpcClientOptions, RpcCommitResponse, RpcConsensusParamsResponse, RpcConsensusStateResponse, RpcDumpConsensusStateResponse, RpcGenesisChunkedResponse, RpcGenesisResponse, RpcHeaderResponse, RpcNetInfoResponse, RpcNumUnconfirmedTxsResponse, RpcStatusResponse, RpcTxResponse, RpcTxSearchResponse, RpcUnconfirmedTxsResponse, RpcValidatorsResponse, ServiceClients, ShorthandProfile, SignBroadcastOptions, SignModeType, SignedTx, SimulateClient, TransportOptions, TxClient, TxEvent, TxOptions, TxQueryClient, TxResult, TxSearchOptions, UnsignedTx, UsernamesSupportedNetwork, ValidatorUpdate, WaitForTxOptions, WasmProfile, WrapReturnType, WrappedResponse, auth, broadcast, createBroadcastResultWithWait, createGrpcClient, createHeadersInterceptor, createRetryInterceptor, createRpcClient, estimateGas, getAddressProfile, isWrappedResponse, waitForTx, wrapResponse };
|
|
3
|
+
export { type AbciEvent, type AbciEventAttribute, type AbciQueryOptions, type AccountKind, type AddressProfile, type AuthConfig, type BaseClient, type BlockResultsResponse, type BroadcastMode, type BroadcastOptions, type BroadcastResult, type BroadcastResultWithWait, type CachedClient, type ChainType, type Client, type ClientFor, type ConsensusParams, type ContractKind, type EoaProfile, type EstimateOptions, type EvmProfile, type ExecTxResult, type GasEstimate, type GetAddressProfileOptions, type HasClient, type HasEvmService, type HasMoveService, type HasUsernames, type HasWasmService, type HttpRequestOptions, type InitiaClient, type Interceptor, type MinievmClient, type MinimoveClient, type MiniwasmClient, type MoveProfile, type MultisigSignature, type NetworkType, type PaginationOptions, type ProfileCache, type QueryClient, type QueryOptions, type RetryOptions, type RpcAbciInfoResponse, type RpcAbciQueryResponse, type RpcBlockMeta, type RpcBlockResponse, type RpcBlockSearchResponse, type RpcBlockchainResponse, RpcClient, type RpcClientOptions, type RpcCommitResponse, type RpcConsensusParamsResponse, type RpcConsensusStateResponse, type RpcDumpConsensusStateResponse, type RpcGenesisChunkedResponse, type RpcGenesisResponse, type RpcHeaderResponse, type RpcNetInfoResponse, type RpcNumUnconfirmedTxsResponse, type RpcStatusResponse, type RpcTxResponse, type RpcTxSearchResponse, type RpcUnconfirmedTxsResponse, type RpcValidatorsResponse, type ServiceClients, type ShorthandProfile, type SignBroadcastOptions, type SignModeType, type SignedTx, type SimulateClient, type TransportOptions, type TxClient, type TxEvent, type TxOptions, type TxQueryClient, type TxResult, type TxSearchOptions, UnsignedTx, type UsernamesSupportedNetwork, type ValidatorUpdate, type WaitForTxOptions, type WasmProfile, type WrapReturnType, type WrappedResponse, auth, broadcast, createBroadcastResultWithWait, createGrpcClient, createHeadersInterceptor, createRetryInterceptor, createRpcClient, estimateGas, getAddressProfile, isWrappedResponse, waitForTx, wrapResponse };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $n as RpcConsensusStateResponse, A as BaseClient, Bn as ConsensusParams, Bt as BroadcastResult, C as NetworkType, D as TxOptions, E as SignedTx, Fn as CachedClient, Gn as RpcBlockMeta, Gt as createBroadcastResultWithWait, Hn as PaginationOptions, Ht as SignBroadcastOptions, In as AbciEvent, Jn as RpcBlockchainResponse, Jt as TxQueryClient, Kn as RpcBlockResponse, Ln as AbciEventAttribute, M as MinievmClient, N as MinimoveClient, O as UsernamesSupportedNetwork, P as MiniwasmClient, Qn as RpcConsensusParamsResponse, Qt as WaitForTxOptions, Rn as AbciQueryOptions, Rt as BroadcastMode, S as HttpRequestOptions, Ss as createRetryInterceptor, T as SignModeType, Un as RpcAbciInfoResponse, Ut as TxClient, Vn as ExecTxResult, Vt as BroadcastResultWithWait, Wn as RpcAbciQueryResponse, Wt as broadcast, Xn as RpcClientOptions, Yn as RpcClient, Yt as TxResult, Zn as RpcCommitResponse, _ as HasClient, _a as SimulateClient, _i as UnsignedTx, _s as Interceptor, ar as RpcNumUnconfirmedTxsResponse, b as HasUsernames, bs as TransportOptions, cr as RpcTxSearchResponse, dr as TxSearchOptions, ds as ServiceClients, er as RpcDumpConsensusStateResponse, fr as ValidatorUpdate, fs as createGrpcClient, g as ClientFor, gi as MultisigSignature, gs as wrapResponse, h as Client, ha as GasEstimate, hs as isWrappedResponse, ir as RpcNetInfoResponse, j as InitiaClient, k as auth, lr as RpcUnconfirmedTxsResponse, m as ChainType, ma as EstimateOptions, ms as WrappedResponse, nn as waitForTx, nr as RpcGenesisResponse, or as RpcStatusResponse, p as AuthConfig, pr as createRpcClient, ps as WrapReturnType, qn as RpcBlockSearchResponse, qt as TxEvent, rr as RpcHeaderResponse, sr as RpcTxResponse, tr as RpcGenesisChunkedResponse, ur as RpcValidatorsResponse, us as QueryClient, v as HasEvmService, va as estimateGas, vs as RetryOptions, w as QueryOptions, x as HasWasmService, xs as createHeadersInterceptor, y as HasMoveService, zn as BlockResultsResponse, zt as BroadcastOptions } from "./types-DGrP9Ro_.mjs";
|
|
2
2
|
import { a as EvmProfile, c as ProfileCache, d as getAddressProfile, i as EoaProfile, l as ShorthandProfile, n as AddressProfile, o as GetAddressProfileOptions, r as ContractKind, s as MoveProfile, t as AccountKind, u as WasmProfile } from "./address-profile-DjdaEBxo.mjs";
|
|
3
|
-
export {
|
|
3
|
+
export { AbciEvent, AbciEventAttribute, AbciQueryOptions, AccountKind, AddressProfile, AuthConfig, BaseClient, BlockResultsResponse, BroadcastMode, BroadcastOptions, BroadcastResult, BroadcastResultWithWait, CachedClient, ChainType, Client, ClientFor, ConsensusParams, ContractKind, EoaProfile, EstimateOptions, EvmProfile, ExecTxResult, GasEstimate, GetAddressProfileOptions, HasClient, HasEvmService, HasMoveService, HasUsernames, HasWasmService, HttpRequestOptions, InitiaClient, Interceptor, MinievmClient, MinimoveClient, MiniwasmClient, MoveProfile, MultisigSignature, NetworkType, PaginationOptions, ProfileCache, QueryClient, QueryOptions, RetryOptions, RpcAbciInfoResponse, RpcAbciQueryResponse, RpcBlockMeta, RpcBlockResponse, RpcBlockSearchResponse, RpcBlockchainResponse, RpcClient, RpcClientOptions, RpcCommitResponse, RpcConsensusParamsResponse, RpcConsensusStateResponse, RpcDumpConsensusStateResponse, RpcGenesisChunkedResponse, RpcGenesisResponse, RpcHeaderResponse, RpcNetInfoResponse, RpcNumUnconfirmedTxsResponse, RpcStatusResponse, RpcTxResponse, RpcTxSearchResponse, RpcUnconfirmedTxsResponse, RpcValidatorsResponse, ServiceClients, ShorthandProfile, SignBroadcastOptions, SignModeType, SignedTx, SimulateClient, TransportOptions, TxClient, TxEvent, TxOptions, TxQueryClient, TxResult, TxSearchOptions, UnsignedTx, UsernamesSupportedNetwork, ValidatorUpdate, WaitForTxOptions, WasmProfile, WrapReturnType, WrappedResponse, auth, broadcast, createBroadcastResultWithWait, createGrpcClient, createHeadersInterceptor, createRetryInterceptor, createRpcClient, estimateGas, getAddressProfile, isWrappedResponse, waitForTx, wrapResponse };
|
package/package.json
CHANGED
|
File without changes
|