@decentralchain/cubensis-connect-types
TypeScript type definitions for the CubensisConnect browser-extension API.
Zero-dependency, type-only package providing strict TypeScript types for the CubensisConnect browser extension API surface — authentication, state, all 15 transaction types, orders, custom data signing, and global Window augmentation.
Part of the DecentralChain SDK.
npm install --save-dev @decentralchain/cubensis-connect-types
Requires Node.js ≥ 24 (LTS).
Module imports (recommended)
import type {
ICubensisConnectApi ,
IAuthData ,
TSignTransactionData ,
TMoney ,
} from '@decentralchain/cubensis-connect-types' ;
The package automatically augments the global Window interface, so
window.CubensisConnect is typed without extra configuration:
// No import needed — Window is augmented globally
const api = window . CubensisConnect ;
const state = await api . publicState ( ) ;
Type
Description
ICubensisConnectApi
Full API surface exposed by the extension
TCubensisConnectApi
(deprecated) Alias for ICubensisConnectApi
Type
Description
IAuthData
Payload passed to auth()
IAuthResponse
Response returned by auth()
Type
Description
IPublicStateResponse
Full public-state snapshot from publicState()
TPublicStateAccount
User account info within public state
Type
Description
TSignTransactionData
Union of all 15 transaction types
TSignTransactionPackageData
Array type for batch signing (up to 7 transactions)
TSignRequestData
Sign-request data (type 1001 or 1004)
TTypedData
Typed-data entry (boolean, integer, string, binary)
Type
Tx ID
TIssueTxData
3
TTransferTxData
4
TReissueTxData
5
TBurnTxData
6
TLeaseTxData
8
TLeaseCancelTxData
9
TCreateAliasTxData
10
TMassTransferTxData
11
TDataTxData
12
TSetScriptTxData
13
TSponsoredFeeTxData
14
TSetAssetScriptTxData
15
TScriptInvocationTxData
16
TUpdateAssetInfoTxData
17
TInvokeExpressionTxData
18
Type
Description
TSignOrderData
DEX order signing data
TSignCancelOrderData
Order cancellation data
ISignOrderDataBody
Order body fields
Type
Description
ISignCustomDataParamsV1
Custom data signing params (v1)
ISignCustomDataParamsV2
Custom data signing params (v2)
ISignCustomDataResponseV1
Custom data response (v1)
ISignCustomDataResponseV2
Custom data response (v2)
Type
Description
TMoney
IMoneyTokens | IMoneyCoins | IMoneyAmount union
TCallArgs
Invoke-script call argument
ISignData
Generic wrapper mapping tx type code to body
Script
Purpose
npm run build
Compile with tsdown (ESM + .d.ts)
npm run typecheck
tsc --noEmit strict type check
npm run lint
Biome lint check (no auto-fix)
npm run lint:fix
Biome lint with auto-fix
npm run format
Biome auto-format
npm run format:check
Biome format check (no writes)
npm run test
Vitest type-level tests
npm run test:watch
Tests in watch mode
npm run test:coverage
Tests with V8 coverage
npm run bulletproof
Format + lint fix + typecheck + test
npm run bulletproof:check
CI-safe: check format + lint + tc + test
npm run validate
Full CI pipeline (all checks + build + publish checks)
Node.js ≥ 24 (LTS)
npm ≥ 11
See CONTRIBUTING.md .
To report a vulnerability, see SECURITY.md .
MIT — Copyright (c) DecentralChain