@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 +15 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/orby_provider.d.ts +42 -9
- package/dist/orby_provider.js +164 -382
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/dist/wallet.d.ts +0 -17
- package/dist/wallet.js +0 -132
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
package/dist/orby_provider.d.ts
CHANGED
@@ -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<
|
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
|
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:
|
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:
|
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:
|
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:
|
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:
|
133
|
+
chainId: bigint;
|
110
134
|
address?: string;
|
111
135
|
}[], tokenDestination?: {
|
112
|
-
chainId:
|
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;
|