@orb-labs/orby-core 0.0.6 → 0.0.7

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 (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/actions/account_cluster.d.ts +4 -4
  3. package/dist/actions/account_cluster.js +147 -338
  4. package/dist/actions/admin.d.ts +3 -3
  5. package/dist/actions/admin.js +37 -127
  6. package/dist/actions/application.d.ts +2 -2
  7. package/dist/actions/application.js +14 -77
  8. package/dist/actions/instance.d.ts +3 -3
  9. package/dist/actions/instance.js +98 -255
  10. package/dist/actions/operation.d.ts +4 -4
  11. package/dist/actions/operation.js +92 -263
  12. package/dist/actions/token.d.ts +3 -3
  13. package/dist/actions/token.js +34 -119
  14. package/dist/constants.d.ts +3 -3
  15. package/dist/constants.js +70 -71
  16. package/dist/entities/account.d.ts +1 -1
  17. package/dist/entities/account.js +25 -30
  18. package/dist/entities/financial/account_balance.d.ts +2 -2
  19. package/dist/entities/financial/account_balance.js +20 -22
  20. package/dist/entities/financial/asset.js +13 -15
  21. package/dist/entities/financial/currency.d.ts +1 -1
  22. package/dist/entities/financial/currency.js +16 -35
  23. package/dist/entities/financial/currency_amount.d.ts +1 -1
  24. package/dist/entities/financial/currency_amount.js +49 -71
  25. package/dist/entities/financial/fungible_token.d.ts +2 -2
  26. package/dist/entities/financial/fungible_token.js +31 -52
  27. package/dist/entities/financial/fungible_token_amount.d.ts +2 -2
  28. package/dist/entities/financial/fungible_token_amount.js +53 -75
  29. package/dist/entities/financial/non_fungible_token.d.ts +2 -2
  30. package/dist/entities/financial/non_fungible_token.js +25 -45
  31. package/dist/entities/financial/semi_fungible_token.d.ts +2 -2
  32. package/dist/entities/financial/semi_fungible_token.js +25 -45
  33. package/dist/entities/library_request.d.ts +1 -1
  34. package/dist/entities/library_request.js +7 -9
  35. package/dist/entities/state.d.ts +4 -4
  36. package/dist/entities/state.js +57 -67
  37. package/dist/index.d.ts +27 -27
  38. package/dist/index.js +27 -27
  39. package/dist/interfaces/account_cluster.d.ts +3 -3
  40. package/dist/interfaces/admin.d.ts +1 -1
  41. package/dist/interfaces/instance.d.ts +1 -1
  42. package/dist/interfaces/operation.d.ts +3 -3
  43. package/dist/interfaces/orby.d.ts +6 -6
  44. package/dist/interfaces/token.d.ts +1 -1
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/dist/types.d.ts +7 -7
  47. package/dist/utils/action_helpers.d.ts +1 -1
  48. package/dist/utils/action_helpers.js +42 -58
  49. package/dist/utils/jsbi.d.ts +2 -0
  50. package/dist/utils/jsbi.js +2 -0
  51. package/dist/utils/utils.d.ts +1 -1
  52. package/dist/utils/utils.js +17 -19
  53. package/dist/utils/validateAndParseAddress.js +3 -3
  54. package/package.json +4 -2
@@ -1,26 +1,10 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { Currency } from "./currency";
17
- import { checkValidAddress, validateAndParseAddress, } from "../../utils/validateAndParseAddress";
18
- import { TokenType } from "../../enums";
1
+ import { Currency } from "./currency.js";
2
+ import { checkValidAddress, validateAndParseAddress, } from "../../utils/validateAndParseAddress.js";
3
+ import { TokenType } from "../../enums.js";
19
4
  /**
20
5
  * Represents an ERC1155 token with a unique address and some metadata.
21
6
  */
22
- var SemiFungibleToken = /** @class */ (function (_super) {
23
- __extends(SemiFungibleToken, _super);
7
+ export class SemiFungibleToken extends Currency {
24
8
  /**
25
9
  *
26
10
  * @param chainId The chain ID on which this token resides
@@ -31,53 +15,49 @@ var SemiFungibleToken = /** @class */ (function (_super) {
31
15
  * @param url The URL of the token's metadata
32
16
  * @param bypassChecksum If true it only checks for length === 42, startsWith 0x and contains only hex characters
33
17
  */
34
- function SemiFungibleToken(chainId, address, decimals, symbol, name, url, bypassChecksum, coinGeckoId) {
18
+ constructor(chainId, address, decimals, symbol, name, url, bypassChecksum, coinGeckoId) {
35
19
  // TODO(felix): add this back
36
20
  // invariant(!_.isUndefined(getBlockchainFromBlockchainId(chainId)), "CHAIN_ID");
37
- var _a, _b;
38
- var _this = _super.call(this, decimals, symbol, name, url, false, true, coinGeckoId) || this;
39
- _this.isNative = false;
40
- _this.isToken = true;
21
+ super(decimals, symbol, name, url, false, true, coinGeckoId);
22
+ this.isNative = false;
23
+ this.isToken = true;
41
24
  if (bypassChecksum) {
42
- _this.address = (_a = checkValidAddress(address)) === null || _a === void 0 ? void 0 : _a.toLowerCase();
25
+ this.address = checkValidAddress(address)?.toLowerCase();
43
26
  }
44
27
  else {
45
- _this.address = (_b = validateAndParseAddress(address)) === null || _b === void 0 ? void 0 : _b.toLowerCase();
28
+ this.address = validateAndParseAddress(address)?.toLowerCase();
46
29
  }
47
- _this.chainId = chainId;
48
- _this.url = url;
49
- return _this;
30
+ this.chainId = chainId;
31
+ this.url = url;
50
32
  }
51
- SemiFungibleToken.toSemiFungibleToken = function (sft) {
33
+ static toSemiFungibleToken(sft) {
52
34
  if (!sft) {
53
35
  return undefined;
54
36
  }
55
- var currency = Currency.toCurrency(sft.currency);
37
+ const currency = Currency.toCurrency(sft.currency);
56
38
  return new SemiFungibleToken(sft.chainId, sft.address, currency.decimals, currency.symbol, currency.name, sft.url);
57
- };
39
+ }
58
40
  /**
59
41
  * Returns true if the two tokens are equivalent, i.e. have the same chainId and address.
60
42
  * @param other other token to compare
61
43
  */
62
- SemiFungibleToken.prototype.equals = function (other) {
44
+ equals(other) {
63
45
  // short circuit on reference equality
64
46
  if (this === other)
65
47
  return true;
66
48
  return (this.chainId === other.chainId &&
67
49
  this.address === other.address.toLowerCase());
68
- };
50
+ }
69
51
  /**
70
52
  * Returns the currency object that this token represents
71
53
  */
72
- SemiFungibleToken.prototype.currency = function () {
54
+ currency() {
73
55
  return this;
74
- };
75
- SemiFungibleToken.prototype.type = function () {
56
+ }
57
+ type() {
76
58
  return TokenType.SEMI_FUNGIBLE_TOKEN;
77
- };
78
- SemiFungibleToken.prototype.identifier = function () {
79
- return "".concat(this.chainId, "+").concat(this.address.toLowerCase());
80
- };
81
- return SemiFungibleToken;
82
- }(Currency));
83
- export { SemiFungibleToken };
59
+ }
60
+ identifier() {
61
+ return `${this.chainId}+${this.address.toLowerCase()}`;
62
+ }
63
+ }
@@ -1,4 +1,4 @@
1
- import { LIBRARY_TYPE } from "../enums";
1
+ import { LIBRARY_TYPE } from "../enums.js";
2
2
  export declare class LibraryRequest {
3
3
  readonly library: LIBRARY_TYPE;
4
4
  readonly client?: any;
@@ -1,7 +1,7 @@
1
- import { LIBRARY_TYPE } from "../enums";
1
+ import { LIBRARY_TYPE } from "../enums.js";
2
2
  import invariant from "tiny-invariant";
3
- var LibraryRequest = /** @class */ (function () {
4
- function LibraryRequest(library, client, provider) {
3
+ export class LibraryRequest {
4
+ constructor(library, client, provider) {
5
5
  if (library == LIBRARY_TYPE.VIEM) {
6
6
  invariant(client, "CLIENT");
7
7
  invariant(!provider, "PROVIDER");
@@ -19,14 +19,12 @@ var LibraryRequest = /** @class */ (function () {
19
19
  this.client = client;
20
20
  this.provider = provider;
21
21
  }
22
- LibraryRequest.prototype.sendRequest = function (method, params) {
22
+ sendRequest(method, params) {
23
23
  if (this.library == LIBRARY_TYPE.VIEM) {
24
- return this.client.request({ method: method, params: params });
24
+ return this.client.request({ method, params });
25
25
  }
26
26
  else if (this.library == LIBRARY_TYPE.ETHERS) {
27
27
  return this.provider.send(method, params);
28
28
  }
29
- };
30
- return LibraryRequest;
31
- }());
32
- export { LibraryRequest };
29
+ }
30
+ }
@@ -1,7 +1,7 @@
1
- import { FungibleToken } from "./financial/fungible_token";
2
- import { FungibleTokenAmount } from "./financial/fungible_token_amount";
3
- import { NonFungibleToken } from "./financial/non_fungible_token";
4
- import { SemiFungibleToken } from "./financial/semi_fungible_token";
1
+ import { FungibleToken } from "./financial/fungible_token.js";
2
+ import { FungibleTokenAmount } from "./financial/fungible_token_amount.js";
3
+ import { NonFungibleToken } from "./financial/non_fungible_token.js";
4
+ import { SemiFungibleToken } from "./financial/semi_fungible_token.js";
5
5
  export declare class State {
6
6
  private readonly fungibleTokens;
7
7
  private readonly nonFungibleTokens;
@@ -1,112 +1,102 @@
1
- import { FungibleTokenAmount } from "./financial/fungible_token_amount";
2
- import { NonFungibleToken } from "./financial/non_fungible_token";
3
- import { SemiFungibleToken } from "./financial/semi_fungible_token";
4
- var State = /** @class */ (function () {
5
- function State(fungibleTokens, nonFungibleTokens, semiFungibleTokens) {
6
- this.fungibleTokens = fungibleTokens.reduce(function (acc, amount) {
1
+ import { FungibleTokenAmount } from "./financial/fungible_token_amount.js";
2
+ import { NonFungibleToken } from "./financial/non_fungible_token.js";
3
+ import { SemiFungibleToken } from "./financial/semi_fungible_token.js";
4
+ export class State {
5
+ constructor(fungibleTokens, nonFungibleTokens, semiFungibleTokens) {
6
+ this.fungibleTokens = fungibleTokens.reduce((acc, amount) => {
7
7
  acc.set(amount.token.identifier(), amount);
8
8
  return acc;
9
9
  }, new Map());
10
- this.nonFungibleTokens = nonFungibleTokens.reduce(function (acc, token) {
10
+ this.nonFungibleTokens = nonFungibleTokens.reduce((acc, token) => {
11
11
  acc.set(token.identifier(), token);
12
12
  return acc;
13
13
  }, new Map());
14
- this.semiFungibleTokens = semiFungibleTokens.reduce(function (acc, token) {
14
+ this.semiFungibleTokens = semiFungibleTokens.reduce((acc, token) => {
15
15
  acc.set(token.identifier(), token);
16
16
  return acc;
17
17
  }, new Map());
18
18
  }
19
- State.fromFungibleTokenAmounts = function (fungibleTokenAmounts) {
19
+ static fromFungibleTokenAmounts(fungibleTokenAmounts) {
20
20
  return new State(fungibleTokenAmounts, [], []);
21
- };
22
- State.fromTokenAndAmount = function (token, amount) {
21
+ }
22
+ static fromTokenAndAmount(token, amount) {
23
23
  if (!token || !amount) {
24
24
  return undefined;
25
25
  }
26
- var fungibleTokenAmount = FungibleTokenAmount.fromRawAmount(token, amount);
26
+ const fungibleTokenAmount = FungibleTokenAmount.fromRawAmount(token, amount);
27
27
  return State.fromFungibleTokenAmounts([fungibleTokenAmount]);
28
- };
29
- State.prototype.getFungibleTokens = function () {
28
+ }
29
+ getFungibleTokens() {
30
30
  return Array.from(this.fungibleTokens.values());
31
- };
32
- State.prototype.getNonFungibleTokens = function () {
31
+ }
32
+ getNonFungibleTokens() {
33
33
  return Array.from(this.nonFungibleTokens.values());
34
- };
35
- State.prototype.getSemiFungibleTokens = function () {
34
+ }
35
+ getSemiFungibleTokens() {
36
36
  return Array.from(this.semiFungibleTokens.values());
37
- };
38
- State.prototype.addTokens = function (fungibleTokens) {
39
- var _this = this;
40
- fungibleTokens.forEach(function (amount) {
41
- var identifier = amount.token.identifier();
42
- var currentAmount = _this.fungibleTokens.get(identifier);
37
+ }
38
+ addTokens(fungibleTokens) {
39
+ fungibleTokens.forEach((amount) => {
40
+ const identifier = amount.token.identifier();
41
+ const currentAmount = this.fungibleTokens.get(identifier);
43
42
  if (currentAmount) {
44
- _this.fungibleTokens.set(identifier, currentAmount.add(amount));
43
+ this.fungibleTokens.set(identifier, currentAmount.add(amount));
45
44
  }
46
45
  else {
47
- _this.fungibleTokens.set(identifier, amount);
46
+ this.fungibleTokens.set(identifier, amount);
48
47
  }
49
48
  });
50
49
  return this;
51
- };
52
- State.prototype.addState = function (other) {
53
- var _this = this;
54
- var _a;
55
- (_a = other === null || other === void 0 ? void 0 : other.fungibleTokens) === null || _a === void 0 ? void 0 : _a.forEach(function (amount) {
56
- var identifier = amount.token.identifier();
57
- var currentAmount = _this.fungibleTokens.get(identifier);
50
+ }
51
+ addState(other) {
52
+ other?.fungibleTokens?.forEach((amount) => {
53
+ const identifier = amount.token.identifier();
54
+ const currentAmount = this.fungibleTokens.get(identifier);
58
55
  if (currentAmount) {
59
- _this.fungibleTokens.set(identifier, currentAmount.add(amount));
56
+ this.fungibleTokens.set(identifier, currentAmount.add(amount));
60
57
  }
61
58
  else {
62
- _this.fungibleTokens.set(identifier, amount);
59
+ this.fungibleTokens.set(identifier, amount);
63
60
  }
64
61
  });
65
62
  return this;
66
- };
67
- State.prototype.deductState = function (other) {
68
- var _this = this;
69
- other.fungibleTokens.forEach(function (amount) {
70
- var identifier = amount.token.identifier();
71
- var currentAmount = _this.fungibleTokens.get(identifier);
72
- if ((currentAmount === null || currentAmount === void 0 ? void 0 : currentAmount.toRawAmount()) > (amount === null || amount === void 0 ? void 0 : amount.toRawAmount())) {
73
- _this.fungibleTokens.set(identifier, currentAmount.subtract(amount));
63
+ }
64
+ deductState(other) {
65
+ other.fungibleTokens.forEach((amount) => {
66
+ const identifier = amount.token.identifier();
67
+ const currentAmount = this.fungibleTokens.get(identifier);
68
+ if (currentAmount?.toRawAmount() > amount?.toRawAmount()) {
69
+ this.fungibleTokens.set(identifier, currentAmount.subtract(amount));
74
70
  }
75
71
  else if (currentAmount) {
76
- _this.fungibleTokens.delete(identifier);
72
+ this.fungibleTokens.delete(identifier);
77
73
  }
78
74
  });
79
75
  return this;
80
- };
81
- State.prototype.equals = function (other) {
76
+ }
77
+ equals(other) {
82
78
  if (!other) {
83
79
  return false;
84
80
  }
85
81
  return (this.fungibleTokens.size == other.fungibleTokens.size &&
86
- Array.from(this.fungibleTokens.entries()).every(function (_a) {
87
- var key = _a[0], value = _a[1];
88
- var otherValue = other.fungibleTokens.get(key);
82
+ Array.from(this.fungibleTokens.entries()).every(([key, value]) => {
83
+ const otherValue = other.fungibleTokens.get(key);
89
84
  return otherValue && value.equals(otherValue);
90
85
  }));
91
- };
92
- State.prototype.addStates = function (states) {
93
- var _this = this;
94
- states.forEach(function (state) { return _this.addState(state); });
86
+ }
87
+ addStates(states) {
88
+ states.forEach((state) => this.addState(state));
95
89
  return this;
96
- };
97
- State.mergeStates = function (states) {
98
- return states.reduce(function (acc, state) { return acc.addState(state); }, new State([], [], []));
99
- };
100
- State.toState = function (state) {
90
+ }
91
+ static mergeStates(states) {
92
+ return states.reduce((acc, state) => acc.addState(state), new State([], [], []));
93
+ }
94
+ static toState(state) {
101
95
  if (!state)
102
96
  return undefined;
103
- var fungibleTokenAmounts = state.fungibleTokenAmounts.map(function (ft) {
104
- return FungibleTokenAmount.toFungibleTokenAmount(ft);
105
- });
106
- var nonFungibleTokenAmounts = state.nonFungibleTokenAmounts.map(function (nft) { return NonFungibleToken.toNonFungibleToken(nft); });
107
- var semiFungibleTokenAmounts = state.semiFungibleTokenAmounts.map(function (sft) { return SemiFungibleToken.toSemiFungibleToken(sft); });
97
+ const fungibleTokenAmounts = state.fungibleTokenAmounts.map((ft) => FungibleTokenAmount.toFungibleTokenAmount(ft));
98
+ const nonFungibleTokenAmounts = state.nonFungibleTokenAmounts.map((nft) => NonFungibleToken.toNonFungibleToken(nft));
99
+ const semiFungibleTokenAmounts = state.semiFungibleTokenAmounts.map((sft) => SemiFungibleToken.toSemiFungibleToken(sft));
108
100
  return new State(fungibleTokenAmounts, nonFungibleTokenAmounts, semiFungibleTokenAmounts);
109
- };
110
- return State;
111
- }());
112
- export { State };
101
+ }
102
+ }
package/dist/index.d.ts CHANGED
@@ -1,27 +1,27 @@
1
- export * from "./interfaces/account_cluster";
2
- export * from "./interfaces/admin";
3
- export * from "./interfaces/application";
4
- export * from "./interfaces/instance";
5
- export * from "./interfaces/operation";
6
- export * from "./interfaces/token";
7
- export * from "./interfaces/orby";
8
- export * from "./actions/account_cluster";
9
- export * from "./actions/admin";
10
- export * from "./actions/application";
11
- export * from "./actions/instance";
12
- export * from "./actions/operation";
13
- export * from "./actions/token";
14
- export * from "./entities/financial/account_balance";
15
- export * from "./entities/financial/asset";
16
- export * from "./entities/financial/currency_amount";
17
- export * from "./entities/financial/currency";
18
- export * from "./entities/financial/fungible_token_amount";
19
- export * from "./entities/financial/fungible_token";
20
- export * from "./entities/financial/non_fungible_token";
21
- export * from "./entities/financial/semi_fungible_token";
22
- export * from "./entities/account";
23
- export * from "./entities/state";
24
- export * from "./enums";
25
- export * from "./types";
26
- export * from "./constants";
27
- export * from "./utils/utils";
1
+ export * from "./interfaces/account_cluster.js";
2
+ export * from "./interfaces/admin.js";
3
+ export * from "./interfaces/application.js";
4
+ export * from "./interfaces/instance.js";
5
+ export * from "./interfaces/operation.js";
6
+ export * from "./interfaces/token.js";
7
+ export * from "./interfaces/orby.js";
8
+ export * from "./actions/account_cluster.js";
9
+ export * from "./actions/admin.js";
10
+ export * from "./actions/application.js";
11
+ export * from "./actions/instance.js";
12
+ export * from "./actions/operation.js";
13
+ export * from "./actions/token.js";
14
+ export * from "./entities/financial/account_balance.js";
15
+ export * from "./entities/financial/asset.js";
16
+ export * from "./entities/financial/currency_amount.js";
17
+ export * from "./entities/financial/currency.js";
18
+ export * from "./entities/financial/fungible_token_amount.js";
19
+ export * from "./entities/financial/fungible_token.js";
20
+ export * from "./entities/financial/non_fungible_token.js";
21
+ export * from "./entities/financial/semi_fungible_token.js";
22
+ export * from "./entities/account.js";
23
+ export * from "./entities/state.js";
24
+ export * from "./enums.js";
25
+ export * from "./types.js";
26
+ export * from "./constants.js";
27
+ export * from "./utils/utils.js";
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
1
  // interfaces
2
- export * from "./interfaces/account_cluster";
3
- export * from "./interfaces/admin";
4
- export * from "./interfaces/application";
5
- export * from "./interfaces/instance";
6
- export * from "./interfaces/operation";
7
- export * from "./interfaces/token";
8
- export * from "./interfaces/orby";
2
+ export * from "./interfaces/account_cluster.js";
3
+ export * from "./interfaces/admin.js";
4
+ export * from "./interfaces/application.js";
5
+ export * from "./interfaces/instance.js";
6
+ export * from "./interfaces/operation.js";
7
+ export * from "./interfaces/token.js";
8
+ export * from "./interfaces/orby.js";
9
9
  // actions
10
- export * from "./actions/account_cluster";
11
- export * from "./actions/admin";
12
- export * from "./actions/application";
13
- export * from "./actions/instance";
14
- export * from "./actions/operation";
15
- export * from "./actions/token";
10
+ export * from "./actions/account_cluster.js";
11
+ export * from "./actions/admin.js";
12
+ export * from "./actions/application.js";
13
+ export * from "./actions/instance.js";
14
+ export * from "./actions/operation.js";
15
+ export * from "./actions/token.js";
16
16
  // entities
17
- export * from "./entities/financial/account_balance";
18
- export * from "./entities/financial/asset";
19
- export * from "./entities/financial/currency_amount";
20
- export * from "./entities/financial/currency";
21
- export * from "./entities/financial/fungible_token_amount";
22
- export * from "./entities/financial/fungible_token";
23
- export * from "./entities/financial/non_fungible_token";
24
- export * from "./entities/financial/semi_fungible_token";
25
- export * from "./entities/account";
26
- export * from "./entities/state";
17
+ export * from "./entities/financial/account_balance.js";
18
+ export * from "./entities/financial/asset.js";
19
+ export * from "./entities/financial/currency_amount.js";
20
+ export * from "./entities/financial/currency.js";
21
+ export * from "./entities/financial/fungible_token_amount.js";
22
+ export * from "./entities/financial/fungible_token.js";
23
+ export * from "./entities/financial/non_fungible_token.js";
24
+ export * from "./entities/financial/semi_fungible_token.js";
25
+ export * from "./entities/account.js";
26
+ export * from "./entities/state.js";
27
27
  // enums, types and constants
28
- export * from "./enums";
29
- export * from "./types";
30
- export * from "./constants";
31
- export * from "./utils/utils";
28
+ export * from "./enums.js";
29
+ export * from "./types.js";
30
+ export * from "./constants.js";
31
+ export * from "./utils/utils.js";
@@ -1,6 +1,6 @@
1
- import { Account } from "../entities/account";
2
- import { AccountCluster, Activity, ChainEndpoint, FungibleTokenOverview, StandardizedBalance } from "../types";
3
- import { ChainSupportStatus, Order } from "../enums";
1
+ import { Account } from "../entities/account.js";
2
+ import { AccountCluster, Activity, ChainEndpoint, FungibleTokenOverview, StandardizedBalance } from "../types.js";
3
+ import { ChainSupportStatus, Order } from "../enums.js";
4
4
  export interface IAccountClusterActions {
5
5
  createAccountCluster(accounts: Account[]): Promise<AccountCluster>;
6
6
  addToAccountCluster(accounts: Account[], accountClusterId: string): Promise<AccountCluster>;
@@ -1,4 +1,4 @@
1
- import { GasSpendForInstance, GasSponsorshipData } from "../types";
1
+ import { GasSpendForInstance, GasSponsorshipData } from "../types.js";
2
2
  export interface IAdminActions {
3
3
  createInstance(name: string): Promise<{
4
4
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { BlockchainInformation, ChainEndpoint, GasSponsorshipPolicy } from "../types";
1
+ import { BlockchainInformation, ChainEndpoint, GasSponsorshipPolicy } from "../types.js";
2
2
  export interface IInstanceActions {
3
3
  setCustomChainEndpointsForInstance(chainEndpoints: ChainEndpoint[]): Promise<boolean>;
4
4
  removeCustomChainEndpointForInstance(chainIds: bigint[]): Promise<boolean>;
@@ -1,6 +1,6 @@
1
- import { OperationSet, OperationStatus, SignedOperation } from "../types";
2
- import { CurrencyAmount } from "../entities/financial/currency_amount";
3
- import { QuoteType } from "../enums";
1
+ import { OperationSet, OperationStatus, SignedOperation } from "../types.js";
2
+ import { CurrencyAmount } from "../entities/financial/currency_amount.js";
3
+ import { QuoteType } from "../enums.js";
4
4
  export interface IOperationActions {
5
5
  getOperationsToExecuteTransaction(accountClusterId: string, to: string, data: string, value?: bigint): Promise<OperationSet>;
6
6
  getOperationsToSignTypedData(accountClusterId: string, data: string): Promise<OperationSet>;
@@ -1,8 +1,8 @@
1
- import { IAccountClusterActions } from "./account_cluster";
2
- import { IAdminActions } from "./admin";
3
- import { IApplicationActions } from "./application";
4
- import { IInstanceActions } from "./instance";
5
- import { IOperationActions } from "./operation";
6
- import { ITokenActions } from "./token";
1
+ import { IAccountClusterActions } from "./account_cluster.js";
2
+ import { IAdminActions } from "./admin.js";
3
+ import { IApplicationActions } from "./application.js";
4
+ import { IInstanceActions } from "./instance.js";
5
+ import { IOperationActions } from "./operation.js";
6
+ import { ITokenActions } from "./token.js";
7
7
  export interface Orby extends IAccountClusterActions, IAdminActions, IApplicationActions, IInstanceActions, IOperationActions, ITokenActions {
8
8
  }
@@ -1,4 +1,4 @@
1
- import { StandardizedToken } from "../types";
1
+ import { StandardizedToken } from "../types.js";
2
2
  export interface ITokenActions {
3
3
  getStandardizedTokenIds(tokens: {
4
4
  tokenAddress: string;