genlayer-js 0.0.2 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,3 @@
1
1
 
2
2
 
3
- ## 0.0.2 (2024-09-30)
3
+ ## 0.0.3 (2024-09-30)
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [Your Project Name]
1
+ # GenLayerJS
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit/)
4
4
  [![Discord](https://dcbadge.vercel.app/api/server/8Jm4v89VAu?compact=true&style=flat)](https://discord.gg/VpfmXEMN66)
@@ -3,5 +3,9 @@
3
3
  var _chunkAR7OM4HIcjs = require('../chunk-AR7OM4HI.cjs');
4
4
  require('../chunk-75ZPJI57.cjs');
5
5
 
6
+ // src/types/accounts.ts
7
+ var _viem = require('viem');
6
8
 
7
- exports.TransactionStatus = _chunkAR7OM4HIcjs.TransactionStatus;
9
+
10
+
11
+ exports.Account = _viem.Account; exports.TransactionStatus = _chunkAR7OM4HIcjs.TransactionStatus;
@@ -1,6 +1,6 @@
1
1
  export { A as Address, G as GenLayerClient, a as GenLayerMethod, c as GenLayerTransaction, T as TransactionHash, b as TransactionStatus } from '../clients-CL75M8Ma.cjs';
2
2
  export { S as SimulatorChain } from '../chains-CtZJFz4Q.cjs';
3
- import 'viem';
3
+ export { Account } from 'viem';
4
4
 
5
5
  type ContractSchema = {
6
6
  abi: Array<{
@@ -1,6 +1,6 @@
1
1
  export { A as Address, G as GenLayerClient, a as GenLayerMethod, c as GenLayerTransaction, T as TransactionHash, b as TransactionStatus } from '../clients-Bt_8fb_v.js';
2
2
  export { S as SimulatorChain } from '../chains-CtZJFz4Q.js';
3
- import 'viem';
3
+ export { Account } from 'viem';
4
4
 
5
5
  type ContractSchema = {
6
6
  abi: Array<{
@@ -2,6 +2,10 @@ import {
2
2
  TransactionStatus
3
3
  } from "../chunk-VQTD5PMI.js";
4
4
  import "../chunk-MLKGABMK.js";
5
+
6
+ // src/types/accounts.ts
7
+ import { Account } from "viem";
5
8
  export {
9
+ Account,
6
10
  TransactionStatus
7
11
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
- import {GenLayerClient, TransactionHash, SimulatorChain} from "@/types";
2
- import {simulator} from "@/chains";
1
+ import {GenLayerClient, TransactionHash, SimulatorChain} from "../types";
2
+ import {simulator} from "../chains";
3
3
  import {Account, Transport} from "viem";
4
4
 
5
5
  export function accountActions<
@@ -4,7 +4,6 @@ import {accountActions} from "../accounts/actions";
4
4
  import {contractActions, overrideContractActions} from "../contracts/actions";
5
5
  import {transactionActions} from "../transactions/actions";
6
6
  import {GenLayerClient, SimulatorChain} from "@/types";
7
- import {createAccount} from "@/accounts/account";
8
7
 
9
8
  // Define the configuration interface for the client
10
9
  interface ClientConfig {
@@ -1 +1,2 @@
1
+ export {Account} from "viem";
1
2
  export type Address = `0x${string}` & {length: 42};
@@ -0,0 +1,11 @@
1
+ // tests/client.test.ts
2
+ import {createClient} from "../src/client/client";
3
+ import {simulator} from "../src/chains/simulator";
4
+
5
+ describe("Client Creation", () => {
6
+ it("should create a client for the simulator", () => {
7
+ const client = createClient({chain: simulator});
8
+ expect(client).toBeDefined();
9
+ expect(client.chain).toBe(simulator);
10
+ });
11
+ });