@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 +0 -0
- package/dist/esm/client.js +7 -7
- package/dist/esm/index.js +6 -6
- package/dist/esm/modules/compliance.js +3 -3
- package/dist/esm/modules/index.js +4 -4
- package/dist/esm/modules/kyc.js +3 -3
- package/dist/esm/modules/token.js +3 -3
- package/dist/esm/modules/yield.js +3 -3
- package/dist/esm/utils/index.js +2 -2
- package/package.json +49 -49
package/LICENSE
ADDED
|
File without changes
|
package/dist/esm/client.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
6
|
+
export { RWAClient } from './client';
|
|
7
7
|
// Modules
|
|
8
|
-
export { TokenModule, TokenInstance, KYCModule, KYCRegistryInstance, YieldModule, YieldDistributorInstance, ComplianceModule, } from './modules
|
|
8
|
+
export { TokenModule, TokenInstance, KYCModule, KYCRegistryInstance, YieldModule, YieldDistributorInstance, ComplianceModule, } from './modules';
|
|
9
9
|
// Types
|
|
10
|
-
export * from './types
|
|
10
|
+
export * from './types';
|
|
11
11
|
// Errors
|
|
12
|
-
export * from './errors
|
|
12
|
+
export * from './errors';
|
|
13
13
|
// Constants
|
|
14
|
-
export * from './constants
|
|
14
|
+
export * from './constants';
|
|
15
15
|
// Utilities
|
|
16
|
-
export { isValidAddress, normalizeAddress, parseAmount, formatAmount, hashIdentityData, timestampToDate, dateToTimestamp, isExpired, calculatePercentage, } from './utils
|
|
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
|
|
6
|
-
import { RWAError, ErrorCode } from '../errors
|
|
7
|
-
import { isValidAddress, normalizeAddress, parseAmount } from '../utils
|
|
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
|
|
5
|
-
export { KYCModule, KYCRegistryInstance } from './kyc
|
|
6
|
-
export { YieldModule, YieldDistributorInstance } from './yield
|
|
7
|
-
export { ComplianceModule } from './compliance
|
|
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
|
package/dist/esm/modules/kyc.js
CHANGED
|
@@ -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
|
|
6
|
-
import { RWAError, ErrorCode, parseContractError } from '../errors
|
|
7
|
-
import { isValidAddress, normalizeAddress, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, dateToTimestamp, hashIdentityData, } from '../utils
|
|
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
|
|
6
|
-
import { RWAError, ErrorCode, parseContractError } from '../errors
|
|
7
|
-
import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, } from '../utils
|
|
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
|
|
6
|
-
import { RWAError, ErrorCode, parseContractError } from '../errors
|
|
7
|
-
import { isValidAddress, normalizeAddress, parseAmount, parseEvents, createTransactionResult, retry, estimateGasWithBuffer, timestampToDate, } from '../utils
|
|
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
|
*/
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -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
|
|
6
|
-
import { DEFAULTS } from '../constants
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
}
|