@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.
- package/CHANGELOG.md +7 -0
- package/dist/actions/account_cluster.d.ts +4 -4
- package/dist/actions/account_cluster.js +147 -338
- package/dist/actions/admin.d.ts +3 -3
- package/dist/actions/admin.js +37 -127
- package/dist/actions/application.d.ts +2 -2
- package/dist/actions/application.js +14 -77
- package/dist/actions/instance.d.ts +3 -3
- package/dist/actions/instance.js +98 -255
- package/dist/actions/operation.d.ts +4 -4
- package/dist/actions/operation.js +92 -263
- package/dist/actions/token.d.ts +3 -3
- package/dist/actions/token.js +34 -119
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +70 -71
- package/dist/entities/account.d.ts +1 -1
- package/dist/entities/account.js +25 -30
- package/dist/entities/financial/account_balance.d.ts +2 -2
- package/dist/entities/financial/account_balance.js +20 -22
- package/dist/entities/financial/asset.js +13 -15
- package/dist/entities/financial/currency.d.ts +1 -1
- package/dist/entities/financial/currency.js +16 -35
- package/dist/entities/financial/currency_amount.d.ts +1 -1
- package/dist/entities/financial/currency_amount.js +49 -71
- package/dist/entities/financial/fungible_token.d.ts +2 -2
- package/dist/entities/financial/fungible_token.js +31 -52
- package/dist/entities/financial/fungible_token_amount.d.ts +2 -2
- package/dist/entities/financial/fungible_token_amount.js +53 -75
- package/dist/entities/financial/non_fungible_token.d.ts +2 -2
- package/dist/entities/financial/non_fungible_token.js +25 -45
- package/dist/entities/financial/semi_fungible_token.d.ts +2 -2
- package/dist/entities/financial/semi_fungible_token.js +25 -45
- package/dist/entities/library_request.d.ts +1 -1
- package/dist/entities/library_request.js +7 -9
- package/dist/entities/state.d.ts +4 -4
- package/dist/entities/state.js +57 -67
- package/dist/index.d.ts +27 -27
- package/dist/index.js +27 -27
- package/dist/interfaces/account_cluster.d.ts +3 -3
- package/dist/interfaces/admin.d.ts +1 -1
- package/dist/interfaces/instance.d.ts +1 -1
- package/dist/interfaces/operation.d.ts +3 -3
- package/dist/interfaces/orby.d.ts +6 -6
- package/dist/interfaces/token.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +7 -7
- package/dist/utils/action_helpers.d.ts +1 -1
- package/dist/utils/action_helpers.js +42 -58
- package/dist/utils/jsbi.d.ts +2 -0
- package/dist/utils/jsbi.js +2 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.js +17 -19
- package/dist/utils/validateAndParseAddress.js +3 -3
- package/package.json +4 -2
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
25
|
+
this.address = checkValidAddress(address)?.toLowerCase();
|
|
43
26
|
}
|
|
44
27
|
else {
|
|
45
|
-
|
|
28
|
+
this.address = validateAndParseAddress(address)?.toLowerCase();
|
|
46
29
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return _this;
|
|
30
|
+
this.chainId = chainId;
|
|
31
|
+
this.url = url;
|
|
50
32
|
}
|
|
51
|
-
|
|
33
|
+
static toSemiFungibleToken(sft) {
|
|
52
34
|
if (!sft) {
|
|
53
35
|
return undefined;
|
|
54
36
|
}
|
|
55
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
+
currency() {
|
|
73
55
|
return this;
|
|
74
|
-
}
|
|
75
|
-
|
|
56
|
+
}
|
|
57
|
+
type() {
|
|
76
58
|
return TokenType.SEMI_FUNGIBLE_TOKEN;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}(Currency));
|
|
83
|
-
export { SemiFungibleToken };
|
|
59
|
+
}
|
|
60
|
+
identifier() {
|
|
61
|
+
return `${this.chainId}+${this.address.toLowerCase()}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
22
|
+
sendRequest(method, params) {
|
|
23
23
|
if (this.library == LIBRARY_TYPE.VIEM) {
|
|
24
|
-
return this.client.request({ method
|
|
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
|
-
|
|
31
|
-
}());
|
|
32
|
-
export { LibraryRequest };
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/entities/state.d.ts
CHANGED
|
@@ -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;
|
package/dist/entities/state.js
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
6
|
-
this.fungibleTokens = fungibleTokens.reduce(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
19
|
+
static fromFungibleTokenAmounts(fungibleTokenAmounts) {
|
|
20
20
|
return new State(fungibleTokenAmounts, [], []);
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
22
|
+
static fromTokenAndAmount(token, amount) {
|
|
23
23
|
if (!token || !amount) {
|
|
24
24
|
return undefined;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
const fungibleTokenAmount = FungibleTokenAmount.fromRawAmount(token, amount);
|
|
27
27
|
return State.fromFungibleTokenAmounts([fungibleTokenAmount]);
|
|
28
|
-
}
|
|
29
|
-
|
|
28
|
+
}
|
|
29
|
+
getFungibleTokens() {
|
|
30
30
|
return Array.from(this.fungibleTokens.values());
|
|
31
|
-
}
|
|
32
|
-
|
|
31
|
+
}
|
|
32
|
+
getNonFungibleTokens() {
|
|
33
33
|
return Array.from(this.nonFungibleTokens.values());
|
|
34
|
-
}
|
|
35
|
-
|
|
34
|
+
}
|
|
35
|
+
getSemiFungibleTokens() {
|
|
36
36
|
return Array.from(this.semiFungibleTokens.values());
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
43
|
+
this.fungibleTokens.set(identifier, currentAmount.add(amount));
|
|
45
44
|
}
|
|
46
45
|
else {
|
|
47
|
-
|
|
46
|
+
this.fungibleTokens.set(identifier, amount);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
return this;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
56
|
+
this.fungibleTokens.set(identifier, currentAmount.add(amount));
|
|
60
57
|
}
|
|
61
58
|
else {
|
|
62
|
-
|
|
59
|
+
this.fungibleTokens.set(identifier, amount);
|
|
63
60
|
}
|
|
64
61
|
});
|
|
65
62
|
return this;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
72
|
+
this.fungibleTokens.delete(identifier);
|
|
77
73
|
}
|
|
78
74
|
});
|
|
79
75
|
return this;
|
|
80
|
-
}
|
|
81
|
-
|
|
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(
|
|
87
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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
|
-
|
|
98
|
-
return states.reduce(
|
|
99
|
-
}
|
|
100
|
-
|
|
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
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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 { 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
|
}
|