genlayer-js 0.11.2 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
 
2
2
 
3
+ ## 0.12.1 (2025-07-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * default transaction hash variant ([#100](https://github.com/genlayerlabs/genlayer-js/issues/100)) ([d8926b1](https://github.com/genlayerlabs/genlayer-js/commit/d8926b16f8983df805da713091297a5d353e9332))
9
+
10
+ ## 0.12.0 (2025-07-15)
11
+
12
+
13
+ ### Features
14
+
15
+ * add payable to ContractMethod ([#96](https://github.com/genlayerlabs/genlayer-js/issues/96)) ([011a749](https://github.com/genlayerlabs/genlayer-js/commit/011a7498ffce22a34d20d9fb88a72e7c56badaf9))
16
+
3
17
  ## 0.11.2 (2025-07-10)
4
18
 
5
19
 
@@ -269,6 +269,7 @@ interface ContractMethodBase {
269
269
  interface ContractMethod extends ContractMethodBase {
270
270
  ret: ContractParamsSchema;
271
271
  readonly: boolean;
272
+ payable?: boolean;
272
273
  }
273
274
  type ContractSchema = {
274
275
  ctor: ContractMethodBase;
@@ -269,6 +269,7 @@ interface ContractMethodBase {
269
269
  interface ContractMethod extends ContractMethodBase {
270
270
  ret: ContractParamsSchema;
271
271
  readonly: boolean;
272
+ payable?: boolean;
272
273
  }
273
274
  type ContractSchema = {
274
275
  ctor: ContractMethodBase;
package/dist/index.cjs CHANGED
@@ -437,7 +437,7 @@ var contractActions = (client, publicClient) => {
437
437
  args: callArgs,
438
438
  kwargs,
439
439
  leaderOnly = false,
440
- transactionHashVariant = "latest-final" /* LATEST_FINAL */
440
+ transactionHashVariant = "latest-nonfinal" /* LATEST_NONFINAL */
441
441
  } = args;
442
442
  const encodedData = [encode(makeCalldataObject(functionName, callArgs, kwargs)), leaderOnly];
443
443
  const serializedData = serialize(encodedData);
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address } from 'viem';
3
3
  import { G as GenLayerChain } from './chains-BYSCF33g.cjs';
4
- import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-Det5WKeN.cjs';
4
+ import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-icLJcrDm.cjs';
5
5
  import * as abitype from 'abitype';
6
6
  import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address } from 'viem';
3
3
  import { G as GenLayerChain } from './chains-BYSCF33g.js';
4
- import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-CfxRo4v6.js';
4
+ import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-TWCEN45Z.js';
5
5
  import * as abitype from 'abitype';
6
6
  import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
package/dist/index.js CHANGED
@@ -437,7 +437,7 @@ var contractActions = (client, publicClient) => {
437
437
  args: callArgs,
438
438
  kwargs,
439
439
  leaderOnly = false,
440
- transactionHashVariant = "latest-final" /* LATEST_FINAL */
440
+ transactionHashVariant = "latest-nonfinal" /* LATEST_NONFINAL */
441
441
  } = args;
442
442
  const encodedData = [encode(makeCalldataObject(functionName, callArgs, kwargs)), leaderOnly];
443
443
  const serializedData = serialize(encodedData);
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { a as CalldataAddress, C as CalldataEncodable, f as ContractMethod, e as ContractMethodBase, c as ContractParamsArraySchemaElement, d as ContractParamsSchema, g as ContractSchema, q as DecodedCallData, D as DecodedDeployData, G as GenLayerClient, b as GenLayerMethod, s as GenLayerRawTransaction, r as GenLayerTransaction, H as Hash, M as MethodDescription, N as Network, S as SnapSource, h as TransactionHash, p as TransactionHashVariant, j as TransactionResult, m as TransactionResultNameToNumber, i as TransactionStatus, o as TransactionType, V as VoteType, l as transactionResultNumberToName, k as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, n as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-Det5WKeN.cjs';
2
+ export { a as CalldataAddress, C as CalldataEncodable, f as ContractMethod, e as ContractMethodBase, c as ContractParamsArraySchemaElement, d as ContractParamsSchema, g as ContractSchema, q as DecodedCallData, D as DecodedDeployData, G as GenLayerClient, b as GenLayerMethod, s as GenLayerRawTransaction, r as GenLayerTransaction, H as Hash, M as MethodDescription, N as Network, S as SnapSource, h as TransactionHash, p as TransactionHashVariant, j as TransactionResult, m as TransactionResultNameToNumber, i as TransactionStatus, o as TransactionType, V as VoteType, l as transactionResultNumberToName, k as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, n as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-icLJcrDm.cjs';
3
3
  export { G as GenLayerChain } from '../chains-BYSCF33g.cjs';
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { a as CalldataAddress, C as CalldataEncodable, f as ContractMethod, e as ContractMethodBase, c as ContractParamsArraySchemaElement, d as ContractParamsSchema, g as ContractSchema, q as DecodedCallData, D as DecodedDeployData, G as GenLayerClient, b as GenLayerMethod, s as GenLayerRawTransaction, r as GenLayerTransaction, H as Hash, M as MethodDescription, N as Network, S as SnapSource, h as TransactionHash, p as TransactionHashVariant, j as TransactionResult, m as TransactionResultNameToNumber, i as TransactionStatus, o as TransactionType, V as VoteType, l as transactionResultNumberToName, k as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, n as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-CfxRo4v6.js';
2
+ export { a as CalldataAddress, C as CalldataEncodable, f as ContractMethod, e as ContractMethodBase, c as ContractParamsArraySchemaElement, d as ContractParamsSchema, g as ContractSchema, q as DecodedCallData, D as DecodedDeployData, G as GenLayerClient, b as GenLayerMethod, s as GenLayerRawTransaction, r as GenLayerTransaction, H as Hash, M as MethodDescription, N as Network, S as SnapSource, h as TransactionHash, p as TransactionHashVariant, j as TransactionResult, m as TransactionResultNameToNumber, i as TransactionStatus, o as TransactionType, V as VoteType, l as transactionResultNumberToName, k as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, n as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-TWCEN45Z.js';
3
3
  export { G as GenLayerChain } from '../chains-BYSCF33g.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.11.2",
4
+ "version": "0.12.1",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -88,7 +88,7 @@ export const contractActions = (client: GenLayerClient<GenLayerChain>, publicCli
88
88
  args: callArgs,
89
89
  kwargs,
90
90
  leaderOnly = false,
91
- transactionHashVariant = TransactionHashVariant.LATEST_FINAL,
91
+ transactionHashVariant = TransactionHashVariant.LATEST_NONFINAL,
92
92
  } = args;
93
93
 
94
94
  const encodedData = [calldata.encode(makeCalldataObject(functionName, callArgs, kwargs)), leaderOnly];
@@ -23,6 +23,7 @@ export interface ContractMethodBase {
23
23
  export interface ContractMethod extends ContractMethodBase {
24
24
  ret: ContractParamsSchema;
25
25
  readonly: boolean;
26
+ payable?: boolean;
26
27
  }
27
28
 
28
29
  export type ContractSchema = {
@@ -164,7 +164,7 @@ describe("Client Overrides", () => {
164
164
  to: contractAddress,
165
165
  from: accountAddressString, // Expecting the address string directly
166
166
  data: expect.any(String),
167
- transaction_hash_variant: TransactionHashVariant.LATEST_FINAL,
167
+ transaction_hash_variant: TransactionHashVariant.LATEST_NONFINAL,
168
168
  },
169
169
  ]);
170
170
  });