@orb-labs/orby-ethers6 0.0.1 → 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 ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ### Unreleased
4
+
5
+ ### 0.0.4
6
+
7
+ - removing wallet class
8
+ - adding getVirtualNodeRpcUrlsForSupportedChains function
9
+ - adding listBlockchainsInformation function
10
+ - adding subscribeToOperationStatuses function
11
+ - adding sendOperationSet function
12
+
13
+ ### 0.0.2
14
+
15
+ - chore: new package settings
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export * from "./orby_provider";
2
- export * from "./wallet";
1
+ export * from "./orby_provider.js";
package/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  // entities
2
- export * from "./orby_provider";
3
- export * from "./wallet";
2
+ export * from "./orby_provider.js";
@@ -1,5 +1,5 @@
1
1
  import { ethers } from "ethers";
2
- import { Account, AccountCluster, Activity, BlockchainInformation, ChainEndpoint, ChainSupportStatus, CurrencyAmount, FungibleTokenOverview, GasSpendForInstance, GasSponsorshipData, GasSponsorshipPolicy, OperationSet, OperationStatus, Orby, Order, QuoteType, SignedOperation, StandardizedBalance, StandardizedToken } from "@orb-labs/orby-core";
2
+ import { Account, AccountCluster, Activity, BlockchainInformation, ChainEndpoint, ChainSupportStatus, CurrencyAmount, FungibleTokenOverview, GasSpendForInstance, GasSponsorshipData, GasSponsorshipPolicy, OperationSet, OperationStatus, Orby, Order, QuoteType, SignedOperation, StandardizedBalance, StandardizedToken, VirtualNodeRpcUrlForSupportedChain, OperationStatusType, OnchainOperation } from "@orb-labs/orby-core";
3
3
  export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby {
4
4
  private accountClusterActions;
5
5
  private adminActions;
@@ -7,10 +7,12 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
7
7
  private instanceActions;
8
8
  private operationActions;
9
9
  private tokenActions;
10
+ private blockchainActions;
10
11
  constructor(url: string);
11
12
  createAccountCluster(accounts: Account[]): Promise<AccountCluster>;
12
13
  addToAccountCluster(accounts: Account[], accountClusterId: string): Promise<AccountCluster>;
13
14
  removeFromAccountCluster(accounts: Account[], accountClusterId: string): Promise<AccountCluster>;
15
+ getVirtualNodeRpcUrlsForSupportedChains(accountClusterId: string): Promise<VirtualNodeRpcUrlForSupportedChain[]>;
14
16
  enableChainAbstractionForAccountCluster(accountClusterId: string, enable: boolean): Promise<boolean>;
15
17
  setCustomChainEndpointsForAccountCluster(accountClusterId: string, chainEndpoints: ChainEndpoint[]): Promise<boolean>;
16
18
  removeCustomChainEndpointsForAccountCluster(accountClusterId: string, chainIds: bigint[]): Promise<boolean>;
@@ -21,7 +23,14 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
21
23
  getActivity(accountClusterId: string, limit?: number, offset?: number, order?: Order, startDate?: number, endDate?: number, filters?: {
22
24
  transactionHash?: string;
23
25
  address?: string;
24
- }[]): Promise<Activity[]>;
26
+ }[]): Promise<{
27
+ activities: Activity[];
28
+ pageInfo: {
29
+ hasNextPage: boolean;
30
+ hasPreviousPage: boolean;
31
+ totalCount: number;
32
+ };
33
+ }>;
25
34
  getPortfolioOverview(accountClusterId: string): Promise<FungibleTokenOverview>;
26
35
  getFungibleTokenPortfolio(accountClusterId: string): Promise<StandardizedBalance[]>;
27
36
  getFungibleTokenBalances(accountClusterId: string, offset?: number, limit?: number, chainId?: bigint, tokensToOmit?: string[]): Promise<StandardizedBalance[]>;
@@ -41,6 +50,15 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
41
50
  removeCustomChainEndpointForInstance(chainIds: bigint[]): Promise<boolean>;
42
51
  getCustomChainEndpointsForInstance(returnChainIdsOnly: boolean): Promise<boolean>;
43
52
  getChainsSupportedByDefault(): Promise<BlockchainInformation[]>;
53
+ getBlockchainInformation(chainId: bigint): Promise<BlockchainInformation>;
54
+ listBlockchainsInformation(offset?: number, limit?: number): Promise<{
55
+ blockchains: BlockchainInformation[];
56
+ pageInfo: {
57
+ hasNextPage: boolean;
58
+ hasPreviousPage: boolean;
59
+ totalCount: number;
60
+ };
61
+ }>;
44
62
  enabledChainAbstractionForInstance(enable: boolean): Promise<boolean>;
45
63
  enableGasSponsorshipForInstance(enable: boolean): Promise<boolean>;
46
64
  getGasSponsorForInstance(): Promise<string>;
@@ -48,7 +66,13 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
48
66
  setOrbyGasSponsorPolicyForInstance(gasSponsorshipPolicy: GasSponsorshipPolicy): Promise<boolean>;
49
67
  removeOrbyGasSponsorPolicyForInstance(): Promise<boolean>;
50
68
  getOperationsToExecuteTransaction(accountClusterId: string, to: string, data: string, value?: bigint): Promise<OperationSet>;
51
- getOperationsToSignTypedData(accountClusterId: string, data: string): Promise<OperationSet>;
69
+ getOperationsToSignTypedData(accountClusterId: string, data: string, gasToken?: {
70
+ standardizedTokenId: string;
71
+ tokenSources?: {
72
+ chainId: bigint;
73
+ address?: string;
74
+ }[];
75
+ }): Promise<OperationSet>;
52
76
  getOperationsToCancelTransaction(accountClusterId: string, operationSetId: string): Promise<OperationSet>;
53
77
  isTransactionPreconditionSatisfied(accountClusterId: string, to: string, data: string, value?: string): Promise<boolean>;
54
78
  isTypedDataPreconditionSatisfied(accountClusterId: string, data: string): Promise<boolean>;
@@ -73,14 +97,14 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
73
97
  standardizedTokenId: string;
74
98
  amount?: bigint;
75
99
  tokenSources?: {
76
- chainId: string;
100
+ chainId: bigint;
77
101
  address?: string;
78
102
  }[];
79
103
  }, output: {
80
104
  standardizedTokenId: string;
81
105
  amount?: bigint;
82
106
  tokenDestination?: {
83
- chainId: string;
107
+ chainId: bigint;
84
108
  address?: string;
85
109
  };
86
110
  }, gasToken?: {
@@ -94,22 +118,22 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
94
118
  standardizedTokenId: string;
95
119
  amount?: bigint;
96
120
  tokenSources?: {
97
- chainId: string;
121
+ chainId: bigint;
98
122
  address?: string;
99
123
  }[];
100
124
  }, output: {
101
125
  standardizedTokenId: string;
102
126
  amount?: bigint;
103
127
  tokenDestination?: {
104
- chainId: string;
128
+ chainId: bigint;
105
129
  address?: string;
106
130
  };
107
131
  }): Promise<OperationSet>;
108
132
  getOperationsToBridge(accountClusterId: string, standardizedTokenId: string, amount: bigint, tokenSources?: {
109
- chainId: string;
133
+ chainId: bigint;
110
134
  address?: string;
111
135
  }[], tokenDestination?: {
112
- chainId: string;
136
+ chainId: bigint;
113
137
  address?: string;
114
138
  }, gasToken?: {
115
139
  standardizedTokenId: string;
@@ -118,6 +142,15 @@ export declare class OrbyProvider extends ethers.JsonRpcProvider implements Orby
118
142
  address?: string;
119
143
  }[];
120
144
  }): Promise<OperationSet>;
145
+ subscribeToOperationStatuses(ids?: string[], onOperationStatusesUpdateCallback?: (statusSummary: OperationStatusType, primaryOperationStatus?: OperationStatus, allOperationStatuses?: OperationStatus[]) => void): {
146
+ intervalId: number | null;
147
+ };
148
+ sendOperationSet(accountClusterId: string, operationSet: OperationSet, signOperation: (operation: OnchainOperation) => Promise<SignedOperation | undefined>): Promise<{
149
+ success: boolean;
150
+ operationSetId?: string;
151
+ primaryOperationStatus?: OperationStatus;
152
+ operationResponses?: OperationStatus[];
153
+ }>;
121
154
  getStandardizedTokenIds(tokens: {
122
155
  tokenAddress: string;
123
156
  chainId: bigint;