@mantle-rwa/sdk 0.1.0 → 0.1.2

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/LICENSE ADDED
File without changes
@@ -2,13 +2,13 @@
2
2
  * RWAClient - Main entry point for the Mantle RWA SDK
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { TokenModule } from './modules/token.js';
6
- import { KYCModule } from './modules/kyc.js';
7
- import { YieldModule } from './modules/yield.js';
8
- import { ComplianceModule } from './modules/compliance.js';
9
- import { NETWORKS, RWA_FACTORY_ABI, DEFAULTS } from './constants/index.js';
10
- import { RWAError, ErrorCode, parseContractError } from './errors/index.js';
11
- import { isValidAddress, parseAmount, parseEvents, retry } from './utils/index.js';
5
+ import { TokenModule } from './modules/token';
6
+ import { KYCModule } from './modules/kyc';
7
+ import { YieldModule } from './modules/yield';
8
+ import { ComplianceModule } from './modules/compliance';
9
+ import { NETWORKS, RWA_FACTORY_ABI, DEFAULTS } from './constants';
10
+ import { RWAError, ErrorCode, parseContractError } from './errors';
11
+ import { isValidAddress, parseAmount, parseEvents, retry } from './utils';
12
12
  /**
13
13
  * Main client for interacting with Mantle RWA contracts
14
14
  */
package/dist/esm/index.js CHANGED
@@ -3,15 +3,15 @@
3
3
  * TypeScript SDK for Real-World Asset tokenization on Mantle Network
4
4
  */
5
5
  // Core client
6
- export { RWAClient } from './client.js';
6
+ export { RWAClient } from './client';
7
7
  // Modules
8
- export { TokenModule, TokenInstance, KYCModule, KYCRegistryInstance, YieldModule, YieldDistributorInstance, ComplianceModule, } from './modules/index.js';
8
+ export { TokenModule, TokenInstance, KYCModule, KYCRegistryInstance, YieldModule, YieldDistributorInstance, ComplianceModule, } from './modules';
9
9
  // Types
10
- export * from './types/index.js';
10
+ export * from './types';
11
11
  // Errors
12
- export * from './errors/index.js';
12
+ export * from './errors';
13
13
  // Constants
14
- export * from './constants/index.js';
14
+ export * from './constants';
15
15
  // Utilities
16
- export { isValidAddress, normalizeAddress, parseAmount, formatAmount, hashIdentityData, timestampToDate, dateToTimestamp, isExpired, calculatePercentage, } from './utils/index.js';
16
+ export { isValidAddress, normalizeAddress, parseAmount, formatAmount, hashIdentityData, timestampToDate, dateToTimestamp, isExpired, calculatePercentage, } from './utils';
17
17
  //# sourceMappingURL=index.js.map
@@ -2,9 +2,9 @@
2
2
  * ComplianceModule - Handles transfer eligibility and compliance reporting
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { RWA_TOKEN_ABI, KYC_REGISTRY_ABI } from '../constants/index.js';
6
- import { RWAError, ErrorCode } from '../errors/index.js';
7
- import { isValidAddress, normalizeAddress, parseAmount } from '../utils/index.js';
5
+ import { RWA_TOKEN_ABI, KYC_REGISTRY_ABI } from '../constants';
6
+ import { RWAError, ErrorCode } from '../errors';
7
+ import { isValidAddress, normalizeAddress, parseAmount } from '../utils';
8
8
  /**
9
9
  * Module for compliance operations
10
10
  */
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * SDK Modules
3
3
  */
4
- export { TokenModule, TokenInstance } from './token.js';
5
- export { KYCModule, KYCRegistryInstance } from './kyc.js';
6
- export { YieldModule, YieldDistributorInstance } from './yield.js';
7
- export { ComplianceModule } from './compliance.js';
4
+ export { TokenModule, TokenInstance } from './token';
5
+ export { KYCModule, KYCRegistryInstance } from './kyc';
6
+ export { YieldModule, YieldDistributorInstance } from './yield';
7
+ export { ComplianceModule } from './compliance';
8
8
  //# sourceMappingURL=index.js.map
@@ -2,9 +2,9 @@
2
2
  * KYCModule - Handles KYC registry interactions and provider integrations
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { KYC_REGISTRY_ABI } from '../constants/index.js';
6
- import { RWAError, ErrorCode, parseContractError } from '../errors/index.js';
7
- import { isValidAddress, normalizeAddress, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, dateToTimestamp, hashIdentityData, } from '../utils/index.js';
5
+ import { KYC_REGISTRY_ABI } from '../constants';
6
+ import { RWAError, ErrorCode, parseContractError } from '../errors';
7
+ import { isValidAddress, normalizeAddress, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, dateToTimestamp, hashIdentityData, } from '../utils';
8
8
  /**
9
9
  * Instance of a connected KYC registry
10
10
  */
@@ -2,9 +2,9 @@
2
2
  * TokenModule - Handles RWA token deployment and interactions
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { RWA_TOKEN_ABI } from '../constants/index.js';
6
- import { RWAError, ErrorCode, parseContractError } from '../errors/index.js';
7
- import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, } from '../utils/index.js';
5
+ import { RWA_TOKEN_ABI } from '../constants';
6
+ import { RWAError, ErrorCode, parseContractError } from '../errors';
7
+ import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, } from '../utils';
8
8
  /**
9
9
  * Instance of a connected RWA token
10
10
  */
@@ -2,9 +2,9 @@
2
2
  * YieldModule - Handles yield distribution management
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { YIELD_DISTRIBUTOR_ABI, RWA_TOKEN_ABI, DEFAULTS } from '../constants/index.js';
6
- import { RWAError, ErrorCode, parseContractError } from '../errors/index.js';
7
- import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, } from '../utils/index.js';
5
+ import { YIELD_DISTRIBUTOR_ABI, RWA_TOKEN_ABI, DEFAULTS } from '../constants';
6
+ import { RWAError, ErrorCode, parseContractError } from '../errors';
7
+ import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, } from '../utils';
8
8
  /**
9
9
  * Instance of a connected yield distributor
10
10
  */
@@ -2,8 +2,8 @@
2
2
  * Utility functions for the Mantle RWA SDK
3
3
  */
4
4
  import { ethers } from 'ethers';
5
- import { NetworkError, ErrorCode, parseNetworkError } from '../errors/index.js';
6
- import { DEFAULTS } from '../constants/index.js';
5
+ import { NetworkError, ErrorCode, parseNetworkError } from '../errors';
6
+ import { DEFAULTS } from '../constants';
7
7
  /**
8
8
  * Validate an Ethereum address
9
9
  */
package/package.json CHANGED
@@ -1,52 +1,52 @@
1
1
  {
2
- "name": "@mantle-rwa/sdk",
3
- "version": "0.1.0",
4
- "description": "TypeScript SDK for RWA tokenization on Mantle Network",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "./dist/cjs/index.js",
8
- "module": "./dist/esm/index.js",
9
- "types": "./dist/types/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": "./dist/esm/index.js",
13
- "require": "./dist/cjs/index.js",
14
- "types": "./dist/types/index.d.ts"
15
- }
16
- },
17
- "files": [
18
- "dist",
19
- "src"
20
- ],
21
- "scripts": {
22
- "build": "npm run build:esm && npm run build:cjs && npm run build:types",
23
- "build:esm": "tsc -p tsconfig.esm.json && node scripts/fix-esm-imports.js",
24
- "build:cjs": "tsc -p tsconfig.cjs.json && node scripts/add-cjs-package-json.js",
25
- "build:types": "tsc -p tsconfig.types.json",
26
- "test": "vitest run",
27
- "test:watch": "vitest",
28
- "test:coverage": "vitest run --coverage",
29
- "lint": "eslint src --ext .ts",
30
- "clean": "rm -rf dist coverage",
31
- "typecheck": "tsc --noEmit"
32
- },
33
- "dependencies": {
34
- "ethers": "^6.11.0"
35
- },
36
- "devDependencies": {
37
- "@types/node": "^20.11.0",
38
- "@typescript-eslint/eslint-plugin": "^6.19.0",
39
- "@typescript-eslint/parser": "^6.19.0",
40
- "@vitest/coverage-v8": "^1.2.0",
41
- "eslint": "^8.56.0",
42
- "fast-check": "^3.15.0",
43
- "typescript": "^5.3.3",
44
- "vitest": "^1.2.0"
45
- },
46
- "peerDependencies": {
47
- "ethers": "^6.0.0"
48
- },
49
- "engines": {
50
- "node": ">=18.0.0"
2
+ "name": "@mantle-rwa/sdk",
3
+ "version": "0.1.2",
4
+ "description": "TypeScript SDK for RWA tokenization on Mantle Network",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/cjs/index.js",
8
+ "module": "./dist/esm/index.js",
9
+ "types": "./dist/types/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/esm/index.js",
13
+ "require": "./dist/cjs/index.js",
14
+ "types": "./dist/types/index.d.ts"
51
15
  }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "src"
20
+ ],
21
+ "dependencies": {
22
+ "ethers": "^6.11.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.11.0",
26
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
27
+ "@typescript-eslint/parser": "^6.19.0",
28
+ "@vitest/coverage-v8": "^1.2.0",
29
+ "eslint": "^8.56.0",
30
+ "fast-check": "^3.15.0",
31
+ "typescript": "^5.3.3",
32
+ "vitest": "^1.2.0"
33
+ },
34
+ "peerDependencies": {
35
+ "ethers": "^6.0.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "scripts": {
41
+ "build": "npm run build:esm && npm run build:cjs && npm run build:types",
42
+ "build:esm": "tsc -p tsconfig.esm.json",
43
+ "build:cjs": "tsc -p tsconfig.cjs.json",
44
+ "build:types": "tsc -p tsconfig.types.json",
45
+ "test": "vitest run",
46
+ "test:watch": "vitest",
47
+ "test:coverage": "vitest run --coverage",
48
+ "lint": "eslint src --ext .ts",
49
+ "clean": "rm -rf dist coverage",
50
+ "typecheck": "tsc --noEmit"
51
+ }
52
52
  }