genlayer-js 0.8.0 → 0.9.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/chains/index.cjs +2 -2
  3. package/dist/chains/index.d.cts +2 -2
  4. package/dist/chains/index.d.ts +2 -2
  5. package/dist/chains/index.js +3 -3
  6. package/dist/chains-BYSCF33g.d.cts +18 -0
  7. package/dist/chains-BYSCF33g.d.ts +18 -0
  8. package/dist/chunk-7YZQQWJZ.js +4056 -0
  9. package/dist/chunk-AZSICIZ3.cjs +132 -0
  10. package/dist/chunk-FPFZLPXI.cjs +4056 -0
  11. package/dist/chunk-RS7NCSOQ.js +132 -0
  12. package/dist/index-BM9hOtGg.d.cts +13 -0
  13. package/dist/index-C7Colsnk.d.ts +13 -0
  14. package/dist/index-DvSbRKD5.d.ts +370 -0
  15. package/dist/index-kDM_9wW1.d.cts +370 -0
  16. package/dist/index.cjs +393 -134
  17. package/dist/index.d.cts +6 -6
  18. package/dist/index.d.ts +6 -6
  19. package/dist/index.js +385 -126
  20. package/dist/types/index.cjs +18 -2
  21. package/dist/types/index.d.cts +3 -3
  22. package/dist/types/index.d.ts +3 -3
  23. package/dist/types/index.js +19 -3
  24. package/package.json +2 -2
  25. package/src/accounts/IAccountActions.ts +2 -2
  26. package/src/accounts/actions.ts +10 -4
  27. package/src/chains/actions.ts +5 -5
  28. package/src/chains/index.ts +1 -1
  29. package/src/chains/localnet.ts +4 -3
  30. package/src/chains/testnet.ts +4015 -0
  31. package/src/client/client.ts +64 -21
  32. package/src/contracts/actions.ts +185 -137
  33. package/src/transactions/actions.ts +173 -8
  34. package/src/types/accounts.ts +1 -2
  35. package/src/types/chains.ts +8 -2
  36. package/src/types/clients.ts +14 -13
  37. package/src/types/transactions.ts +250 -8
  38. package/src/utils/jsonifier.ts +47 -0
  39. package/src/wallet/actions.ts +4 -4
  40. package/src/wallet/connect.ts +12 -14
  41. package/tests/client.test.ts +105 -45
  42. package/dist/chains-C5PI_Nr_.d.cts +0 -13
  43. package/dist/chains-C5PI_Nr_.d.ts +0 -13
  44. package/dist/chunk-I6HC44KD.cjs +0 -72
  45. package/dist/chunk-K72OSU5N.js +0 -28
  46. package/dist/chunk-WEXFFND6.js +0 -72
  47. package/dist/chunk-YDFRDDP5.cjs +0 -28
  48. package/dist/index-B8E0qiOq.d.cts +0 -13
  49. package/dist/index-BfeTR7rO.d.cts +0 -187
  50. package/dist/index-CODAJePj.d.ts +0 -187
  51. package/dist/index-ZoW0HQ_m.d.ts +0 -13
  52. package/src/chains/simulator.ts +0 -30
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address } from 'viem';
3
- import { S as SimulatorChain } from './chains-C5PI_Nr_.cjs';
4
- import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-BfeTR7rO.cjs';
3
+ import { G as GenLayerChain } from './chains-BYSCF33g.cjs';
4
+ import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-kDM_9wW1.cjs';
5
5
  import * as abitype from 'abitype';
6
- import * as viem__types_experimental_eip7702_types_authorization from 'viem/_types/experimental/eip7702/types/authorization';
6
+ import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
8
- export { i as chains } from './index-B8E0qiOq.cjs';
8
+ export { i as chains } from './index-BM9hOtGg.cjs';
9
9
 
10
10
  interface ClientConfig {
11
11
  chain?: {
@@ -31,7 +31,7 @@ interface ClientConfig {
31
31
  endpoint?: string;
32
32
  account?: Account | Address;
33
33
  }
34
- declare const createClient: (config?: ClientConfig) => GenLayerClient<SimulatorChain>;
34
+ declare const createClient: (config?: ClientConfig) => GenLayerClient<GenLayerChain>;
35
35
 
36
36
  declare const generatePrivateKey: () => `0x${string}`;
37
37
  declare const createAccount: (accountPrivateKey?: `0x${string}`) => {
@@ -40,7 +40,7 @@ declare const createAccount: (accountPrivateKey?: `0x${string}`) => {
40
40
  sign: (parameters: {
41
41
  hash: viem.Hash;
42
42
  }) => Promise<viem.Hex>;
43
- experimental_signAuthorization: (parameters: viem__types_experimental_eip7702_types_authorization.Authorization) => Promise<viem_accounts.SignAuthorizationReturnType>;
43
+ signAuthorization: (parameters: viem__types_types_authorization.AuthorizationRequest) => Promise<viem_accounts.SignAuthorizationReturnType>;
44
44
  signMessage: ({ message }: {
45
45
  message: viem.SignableMessage;
46
46
  }) => Promise<viem.Hex>;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address } from 'viem';
3
- import { S as SimulatorChain } from './chains-C5PI_Nr_.js';
4
- import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-CODAJePj.js';
3
+ import { G as GenLayerChain } from './chains-BYSCF33g.js';
4
+ import { G as GenLayerClient, C as CalldataEncodable, T as TransactionDataElement } from './index-DvSbRKD5.js';
5
5
  import * as abitype from 'abitype';
6
- import * as viem__types_experimental_eip7702_types_authorization from 'viem/_types/experimental/eip7702/types/authorization';
6
+ import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
8
- export { i as chains } from './index-ZoW0HQ_m.js';
8
+ export { i as chains } from './index-C7Colsnk.js';
9
9
 
10
10
  interface ClientConfig {
11
11
  chain?: {
@@ -31,7 +31,7 @@ interface ClientConfig {
31
31
  endpoint?: string;
32
32
  account?: Account | Address;
33
33
  }
34
- declare const createClient: (config?: ClientConfig) => GenLayerClient<SimulatorChain>;
34
+ declare const createClient: (config?: ClientConfig) => GenLayerClient<GenLayerChain>;
35
35
 
36
36
  declare const generatePrivateKey: () => `0x${string}`;
37
37
  declare const createAccount: (accountPrivateKey?: `0x${string}`) => {
@@ -40,7 +40,7 @@ declare const createAccount: (accountPrivateKey?: `0x${string}`) => {
40
40
  sign: (parameters: {
41
41
  hash: viem.Hash;
42
42
  }) => Promise<viem.Hex>;
43
- experimental_signAuthorization: (parameters: viem__types_experimental_eip7702_types_authorization.Authorization) => Promise<viem_accounts.SignAuthorizationReturnType>;
43
+ signAuthorization: (parameters: viem__types_types_authorization.AuthorizationRequest) => Promise<viem_accounts.SignAuthorizationReturnType>;
44
44
  signMessage: ({ message }: {
45
45
  message: viem.SignableMessage;
46
46
  }) => Promise<viem.Hex>;