@magnaflow/contract-sdk 1.0.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.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Contract ABI type
3
+ */
4
+ export type Abi = readonly unknown[];
5
+ /**
6
+ * EIP-712 domain
7
+ */
8
+ export interface EIP712Domain {
9
+ name: string;
10
+ version: string;
11
+ chainId: bigint;
12
+ verifyingContract: string;
13
+ }
14
+ /**
15
+ * Contract call parameters
16
+ */
17
+ export interface ContractCallParams {
18
+ address: string;
19
+ abi: Abi;
20
+ functionName: string;
21
+ args?: readonly unknown[];
22
+ value?: bigint;
23
+ }
24
+ /**
25
+ * Contract write parameters
26
+ */
27
+ export interface ContractWriteParams extends ContractCallParams {
28
+ account?: string;
29
+ gasLimit?: bigint;
30
+ gasPrice?: bigint;
31
+ maxFeePerGas?: bigint;
32
+ maxPriorityFeePerGas?: bigint;
33
+ }
34
+ /**
35
+ * Transaction result
36
+ */
37
+ export interface ContractTransactionResult {
38
+ hash: string;
39
+ chainType: 'evm' | 'tron';
40
+ }
41
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B"}
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@magnaflow/contract-sdk",
3
+ "version": "1.0.1",
4
+ "description": "Standardized contract interaction SDK for multi-chain smart contracts",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "test": "vitest run",
22
+ "test:watch": "vitest",
23
+ "test:coverage": "vitest run --coverage",
24
+ "dev": "tsc --watch",
25
+ "clean": "rm -rf dist",
26
+ "prepublishOnly": "node ../../scripts/verify-package-dist.cjs"
27
+ },
28
+ "keywords": [
29
+ "contract",
30
+ "smart-contract",
31
+ "eip712",
32
+ "signature",
33
+ "ethereum",
34
+ "tron",
35
+ "web3"
36
+ ],
37
+ "author": "",
38
+ "license": "MIT",
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "dependencies": {
43
+ "@magnaflow/chain-provider": "workspace:*",
44
+ "@magnaflow/eoa-wallet": "workspace:*",
45
+ "viem": "^2.39.2"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "~5.9.3",
49
+ "vitest": "^4.0.18",
50
+ "@vitest/coverage-v8": "^4.0.18"
51
+ },
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/magnaflowlabs/merchant-v2-sdk.git",
55
+ "directory": "packages/contract-sdk"
56
+ }
57
+ }