@aeternity/aepp-sdk 13.0.1 → 13.1.0
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/README.md +4 -2
- package/bin/aesophia_cli +0 -0
- package/dist/aepp-sdk.browser-script.js +1 -1
- package/dist/aepp-sdk.browser-script.js.map +1 -1
- package/dist/aepp-sdk.browser.js +1 -1
- package/dist/aepp-sdk.browser.js.map +1 -1
- package/dist/aepp-sdk.js +26702 -16514
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdkBase.d.ts +11 -3
- package/es/AeSdkBase.mjs +24 -3
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.d.ts +9 -14
- package/es/AeSdkMethods.mjs +20 -49
- package/es/AeSdkMethods.mjs.map +1 -1
- package/es/AeSdkWallet.mjs +28 -5
- package/es/AeSdkWallet.mjs.map +1 -1
- package/es/Middleware.d.ts +38 -0
- package/es/Middleware.mjs +90 -0
- package/es/Middleware.mjs.map +1 -0
- package/es/MiddlewareSubscriber.d.ts +30 -0
- package/es/MiddlewareSubscriber.mjs +198 -0
- package/es/MiddlewareSubscriber.mjs.map +1 -0
- package/es/Node.d.ts +1 -1
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +14 -2
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +1 -0
- package/es/account/Generalized.mjs +5 -0
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.d.ts +1 -0
- package/es/account/Ledger.mjs +5 -0
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/Memory.d.ts +2 -0
- package/es/account/Memory.mjs +18 -0
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +1 -6
- package/es/account/Rpc.mjs +24 -10
- package/es/account/Rpc.mjs.map +1 -1
- package/es/aens.d.ts +1 -1
- package/es/aens.mjs +1 -1
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +5 -2
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/types.d.ts +10 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.d.ts +1 -8
- package/es/aepp-wallet-communication/schema.mjs +1 -14
- package/es/aepp-wallet-communication/schema.mjs.map +1 -1
- package/es/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/es/aepp-wallet-communication/wallet-detector.mjs +0 -3
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
- package/es/apis/compiler/compiler.mjs +15 -1
- package/es/apis/compiler/compiler.mjs.map +1 -1
- package/es/apis/compiler/models/index.d.ts +1 -7
- package/es/apis/compiler/models/index.mjs.map +1 -1
- package/es/apis/compiler/models/mappers.d.ts +0 -1
- package/es/apis/compiler/models/mappers.mjs +0 -43
- package/es/apis/compiler/models/mappers.mjs.map +1 -1
- package/es/apis/middleware/index.d.ts +2 -0
- package/es/apis/middleware/index.mjs +3 -0
- package/es/apis/middleware/index.mjs.map +1 -0
- package/es/apis/middleware/middleware.d.ts +309 -0
- package/es/apis/middleware/middleware.mjs +1527 -0
- package/es/apis/middleware/middleware.mjs.map +1 -0
- package/es/apis/middleware/models/index.d.ts +1496 -0
- package/es/apis/middleware/models/index.mjs +364 -0
- package/es/apis/middleware/models/index.mjs.map +1 -0
- package/es/apis/middleware/models/mappers.d.ts +102 -0
- package/es/apis/middleware/models/mappers.mjs +3334 -0
- package/es/apis/middleware/models/mappers.mjs.map +1 -0
- package/es/apis/middleware/models/parameters.d.ts +43 -0
- package/es/apis/middleware/models/parameters.mjs +417 -0
- package/es/apis/middleware/models/parameters.mjs.map +1 -0
- package/es/chain.d.ts +2 -1
- package/es/chain.mjs +4 -2
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.d.ts +1 -1
- package/es/channel/Base.mjs +1 -4
- package/es/channel/Base.mjs.map +1 -1
- package/es/channel/internal.mjs +2 -0
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.mjs +1 -1
- package/es/contract/Contract.mjs.map +1 -1
- package/es/contract/compiler/Base.d.ts +21 -0
- package/es/contract/compiler/Base.mjs.map +1 -1
- package/es/contract/compiler/Cli.d.ts +2 -0
- package/es/contract/compiler/Cli.mjs +24 -3
- package/es/contract/compiler/Cli.mjs.map +1 -1
- package/es/contract/compiler/Http.d.ts +2 -0
- package/es/contract/compiler/Http.mjs +22 -2
- package/es/contract/compiler/Http.mjs.map +1 -1
- package/es/contract/compiler/HttpNode.d.ts +1 -0
- package/es/contract/compiler/HttpNode.mjs +5 -0
- package/es/contract/compiler/HttpNode.mjs.map +1 -1
- package/es/deprecated.d.ts +14 -0
- package/es/deprecated.mjs +22 -0
- package/es/deprecated.mjs.map +1 -0
- package/es/index-browser.d.ts +20 -14
- package/es/index-browser.mjs +19 -15
- package/es/index-browser.mjs.map +1 -1
- package/es/tx/builder/constants.d.ts +0 -1
- package/es/tx/builder/constants.mjs +0 -1
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/es/tx/builder/field-types/coin-amount.mjs +2 -1
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/deposit.d.ts +1 -1
- package/es/tx/builder/field-types/entry.mjs +2 -1
- package/es/tx/builder/field-types/entry.mjs.map +1 -1
- package/es/tx/builder/field-types/index.d.ts +2 -2
- package/es/tx/builder/helpers.d.ts +8 -1
- package/es/tx/builder/helpers.mjs +53 -9
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +4 -2
- package/es/tx/builder/index.mjs +0 -1
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +9 -9
- package/es/tx/validator.mjs +6 -3
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/autorest.mjs +6 -8
- package/es/utils/autorest.mjs.map +1 -1
- package/es/utils/crypto.d.ts +1 -0
- package/es/utils/crypto.mjs +12 -2
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/errors.d.ts +2 -2
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/other.d.ts +1 -0
- package/es/utils/other.mjs +5 -0
- package/es/utils/other.mjs.map +1 -1
- package/es/utils/typed-data.d.ts +45 -0
- package/es/utils/typed-data.mjs +71 -0
- package/es/utils/typed-data.mjs.map +1 -0
- package/package.json +23 -4
- package/src/AeSdkBase.ts +30 -5
- package/src/AeSdkMethods.ts +31 -50
- package/src/AeSdkWallet.ts +27 -5
- package/src/Middleware.ts +141 -0
- package/src/MiddlewareSubscriber.ts +207 -0
- package/src/Node.ts +1 -1
- package/src/account/Base.ts +20 -3
- package/src/account/Generalized.ts +5 -0
- package/src/account/Ledger.ts +5 -0
- package/src/account/Memory.ts +15 -0
- package/src/account/Rpc.ts +19 -7
- package/src/aens.ts +1 -1
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +11 -3
- package/src/aepp-wallet-communication/rpc/types.ts +11 -0
- package/src/aepp-wallet-communication/schema.ts +2 -17
- package/src/aepp-wallet-communication/wallet-detector.ts +1 -2
- package/src/apis/compiler/compiler.ts +8 -1
- package/src/apis/compiler/models/index.ts +1 -8
- package/src/apis/compiler/models/mappers.ts +0 -36
- package/src/apis/middleware/index.ts +2 -0
- package/src/apis/middleware/middleware.ts +1807 -0
- package/src/apis/middleware/models/index.ts +1747 -0
- package/src/apis/middleware/models/mappers.ts +3370 -0
- package/src/apis/middleware/models/parameters.ts +463 -0
- package/src/chain.ts +3 -2
- package/src/channel/Base.ts +5 -5
- package/src/channel/internal.ts +2 -0
- package/src/contract/Contract.ts +1 -0
- package/src/contract/compiler/Base.ts +26 -0
- package/src/contract/compiler/Cli.ts +27 -3
- package/src/contract/compiler/Http.ts +21 -2
- package/src/contract/compiler/HttpNode.ts +6 -0
- package/src/deprecated.ts +23 -0
- package/src/index-browser.ts +77 -15
- package/src/tx/builder/constants.ts +0 -1
- package/src/tx/builder/field-types/coin-amount.ts +2 -1
- package/src/tx/builder/field-types/entry.ts +1 -1
- package/src/tx/builder/helpers.ts +54 -9
- package/src/tx/builder/index.ts +6 -9
- package/src/tx/validator.ts +4 -2
- package/src/utils/autorest.ts +5 -10
- package/src/utils/crypto.ts +12 -2
- package/src/utils/errors.ts +2 -2
- package/src/utils/other.ts +5 -0
- package/src/utils/typed-data.ts +95 -0
- package/types-legacy/ts4.2/AeSdkBase.d.ts +11 -3
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +9 -14
- package/types-legacy/ts4.2/Middleware.d.ts +46 -0
- package/types-legacy/ts4.2/MiddlewareSubscriber.d.ts +30 -0
- package/types-legacy/ts4.2/Node.d.ts +1 -1
- package/types-legacy/ts4.2/account/Base.d.ts +14 -2
- package/types-legacy/ts4.2/account/Generalized.d.ts +1 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +1 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +2 -0
- package/types-legacy/ts4.2/account/Rpc.d.ts +1 -6
- package/types-legacy/ts4.2/aens.d.ts +1 -1
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +10 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +1 -8
- package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -7
- package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +0 -1
- package/types-legacy/ts4.2/apis/middleware/index.d.ts +2 -0
- package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +309 -0
- package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +1496 -0
- package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +102 -0
- package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +43 -0
- package/types-legacy/ts4.2/chain.d.ts +2 -1
- package/types-legacy/ts4.2/channel/Base.d.ts +1 -1
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +21 -0
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +2 -0
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +2 -0
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +1 -0
- package/types-legacy/ts4.2/deprecated.d.ts +14 -0
- package/types-legacy/ts4.2/index-browser.d.ts +20 -14
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +0 -1
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +2 -2
- package/types-legacy/ts4.2/tx/builder/helpers.d.ts +8 -1
- package/types-legacy/ts4.2/tx/builder/index.d.ts +4 -2
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +9 -9
- package/types-legacy/ts4.2/utils/crypto.d.ts +1 -0
- package/types-legacy/ts4.2/utils/errors.d.ts +2 -2
- package/types-legacy/ts4.2/utils/other.d.ts +1 -0
- package/types-legacy/ts4.2/utils/typed-data.d.ts +60 -0
- package/types-legacy/ts4.5/AeSdkBase.d.ts +11 -3
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +9 -14
- package/types-legacy/ts4.5/Middleware.d.ts +46 -0
- package/types-legacy/ts4.5/MiddlewareSubscriber.d.ts +30 -0
- package/types-legacy/ts4.5/Node.d.ts +1 -1
- package/types-legacy/ts4.5/account/Base.d.ts +14 -2
- package/types-legacy/ts4.5/account/Generalized.d.ts +1 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +1 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +2 -0
- package/types-legacy/ts4.5/account/Rpc.d.ts +1 -6
- package/types-legacy/ts4.5/aens.d.ts +1 -1
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +10 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +1 -8
- package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -7
- package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +0 -1
- package/types-legacy/ts4.5/apis/middleware/index.d.ts +2 -0
- package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +309 -0
- package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +1496 -0
- package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +102 -0
- package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +43 -0
- package/types-legacy/ts4.5/chain.d.ts +2 -1
- package/types-legacy/ts4.5/channel/Base.d.ts +1 -1
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +21 -0
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +2 -0
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +2 -0
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +1 -0
- package/types-legacy/ts4.5/deprecated.d.ts +14 -0
- package/types-legacy/ts4.5/index-browser.d.ts +20 -14
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +0 -1
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +2 -2
- package/types-legacy/ts4.5/tx/builder/helpers.d.ts +8 -1
- package/types-legacy/ts4.5/tx/builder/index.d.ts +4 -2
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +9 -9
- package/types-legacy/ts4.5/utils/crypto.d.ts +1 -0
- package/types-legacy/ts4.5/utils/errors.d.ts +2 -2
- package/types-legacy/ts4.5/utils/other.d.ts +1 -0
- package/types-legacy/ts4.5/utils/typed-data.d.ts +60 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OperationParameter,
|
|
3
|
+
OperationURLParameter,
|
|
4
|
+
OperationQueryParameter
|
|
5
|
+
} from "@azure/core-client";
|
|
6
|
+
|
|
7
|
+
export const accept: OperationParameter = {
|
|
8
|
+
parameterPath: "accept",
|
|
9
|
+
mapper: {
|
|
10
|
+
defaultValue: "application/json",
|
|
11
|
+
isConstant: true,
|
|
12
|
+
serializedName: "Accept",
|
|
13
|
+
type: {
|
|
14
|
+
name: "String"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const $host: OperationURLParameter = {
|
|
20
|
+
parameterPath: "$host",
|
|
21
|
+
mapper: {
|
|
22
|
+
serializedName: "$host",
|
|
23
|
+
required: true,
|
|
24
|
+
type: {
|
|
25
|
+
name: "String"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
skipEncoding: true
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const id: OperationURLParameter = {
|
|
32
|
+
parameterPath: "id",
|
|
33
|
+
mapper: {
|
|
34
|
+
serializedName: "id",
|
|
35
|
+
required: true,
|
|
36
|
+
type: {
|
|
37
|
+
name: "String"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const ownedOnly: OperationQueryParameter = {
|
|
43
|
+
parameterPath: ["options", "ownedOnly"],
|
|
44
|
+
mapper: {
|
|
45
|
+
serializedName: "owned_only",
|
|
46
|
+
type: {
|
|
47
|
+
name: "Boolean"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const type: OperationQueryParameter = {
|
|
53
|
+
parameterPath: ["options", "type"],
|
|
54
|
+
mapper: {
|
|
55
|
+
serializedName: "type",
|
|
56
|
+
type: {
|
|
57
|
+
name: "String"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const limit: OperationQueryParameter = {
|
|
63
|
+
parameterPath: "limit",
|
|
64
|
+
mapper: {
|
|
65
|
+
defaultValue: 10,
|
|
66
|
+
constraints: {
|
|
67
|
+
InclusiveMaximum: 100,
|
|
68
|
+
InclusiveMinimum: 1
|
|
69
|
+
},
|
|
70
|
+
serializedName: "limit",
|
|
71
|
+
type: {
|
|
72
|
+
name: "Number"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const scope: OperationQueryParameter = {
|
|
78
|
+
parameterPath: "scope",
|
|
79
|
+
mapper: {
|
|
80
|
+
constraints: {
|
|
81
|
+
Pattern: new RegExp("(txi|gen):\\d+(-\\d+)?")
|
|
82
|
+
},
|
|
83
|
+
serializedName: "scope",
|
|
84
|
+
type: {
|
|
85
|
+
name: "String"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const direction: OperationQueryParameter = {
|
|
91
|
+
parameterPath: "direction",
|
|
92
|
+
mapper: {
|
|
93
|
+
serializedName: "direction",
|
|
94
|
+
type: {
|
|
95
|
+
name: "String"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const by: OperationQueryParameter = {
|
|
101
|
+
parameterPath: ["options", "by"],
|
|
102
|
+
mapper: {
|
|
103
|
+
serializedName: "by",
|
|
104
|
+
type: {
|
|
105
|
+
name: "String"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const prefix: OperationQueryParameter = {
|
|
111
|
+
parameterPath: ["options", "prefix"],
|
|
112
|
+
mapper: {
|
|
113
|
+
serializedName: "prefix",
|
|
114
|
+
type: {
|
|
115
|
+
name: "String"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const accountId: OperationURLParameter = {
|
|
121
|
+
parameterPath: "accountId",
|
|
122
|
+
mapper: {
|
|
123
|
+
serializedName: "accountId",
|
|
124
|
+
required: true,
|
|
125
|
+
type: {
|
|
126
|
+
name: "String"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const contractId: OperationURLParameter = {
|
|
132
|
+
parameterPath: "contractId",
|
|
133
|
+
mapper: {
|
|
134
|
+
serializedName: "contractId",
|
|
135
|
+
required: true,
|
|
136
|
+
type: {
|
|
137
|
+
name: "String"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const tokenId: OperationURLParameter = {
|
|
143
|
+
parameterPath: "tokenId",
|
|
144
|
+
mapper: {
|
|
145
|
+
serializedName: "tokenId",
|
|
146
|
+
required: true,
|
|
147
|
+
type: {
|
|
148
|
+
name: "Number"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export const templateId: OperationURLParameter = {
|
|
154
|
+
parameterPath: "templateId",
|
|
155
|
+
mapper: {
|
|
156
|
+
serializedName: "templateId",
|
|
157
|
+
required: true,
|
|
158
|
+
type: {
|
|
159
|
+
name: "Number"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export const accountId1: OperationURLParameter = {
|
|
165
|
+
parameterPath: "accountId",
|
|
166
|
+
mapper: {
|
|
167
|
+
serializedName: "account_id",
|
|
168
|
+
required: true,
|
|
169
|
+
type: {
|
|
170
|
+
name: "String"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export const sender: OperationURLParameter = {
|
|
176
|
+
parameterPath: "sender",
|
|
177
|
+
mapper: {
|
|
178
|
+
serializedName: "sender",
|
|
179
|
+
required: true,
|
|
180
|
+
type: {
|
|
181
|
+
name: "String"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export const recipient: OperationURLParameter = {
|
|
187
|
+
parameterPath: "recipient",
|
|
188
|
+
mapper: {
|
|
189
|
+
serializedName: "recipient",
|
|
190
|
+
required: true,
|
|
191
|
+
type: {
|
|
192
|
+
name: "String"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const hash: OperationQueryParameter = {
|
|
198
|
+
parameterPath: "hash",
|
|
199
|
+
mapper: {
|
|
200
|
+
serializedName: "hash",
|
|
201
|
+
required: true,
|
|
202
|
+
type: {
|
|
203
|
+
name: "String"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const hashOrKbi: OperationURLParameter = {
|
|
209
|
+
parameterPath: "hashOrKbi",
|
|
210
|
+
mapper: {
|
|
211
|
+
serializedName: "hash_or_kbi",
|
|
212
|
+
required: true,
|
|
213
|
+
type: {
|
|
214
|
+
name: "String"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
export const kbi: OperationURLParameter = {
|
|
220
|
+
parameterPath: "kbi",
|
|
221
|
+
mapper: {
|
|
222
|
+
serializedName: "kbi",
|
|
223
|
+
required: true,
|
|
224
|
+
type: {
|
|
225
|
+
name: "Number"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export const mbi: OperationURLParameter = {
|
|
231
|
+
parameterPath: "mbi",
|
|
232
|
+
mapper: {
|
|
233
|
+
serializedName: "mbi",
|
|
234
|
+
required: true,
|
|
235
|
+
type: {
|
|
236
|
+
name: "Number"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export const state: OperationQueryParameter = {
|
|
242
|
+
parameterPath: ["options", "state"],
|
|
243
|
+
mapper: {
|
|
244
|
+
serializedName: "state",
|
|
245
|
+
type: {
|
|
246
|
+
name: "String"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const contractId1: OperationQueryParameter = {
|
|
252
|
+
parameterPath: ["options", "contractId"],
|
|
253
|
+
mapper: {
|
|
254
|
+
serializedName: "contract_id",
|
|
255
|
+
type: {
|
|
256
|
+
name: "String"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export const event: OperationQueryParameter = {
|
|
262
|
+
parameterPath: ["options", "event"],
|
|
263
|
+
mapper: {
|
|
264
|
+
serializedName: "event",
|
|
265
|
+
type: {
|
|
266
|
+
name: "String"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export const functionPrefix: OperationQueryParameter = {
|
|
272
|
+
parameterPath: ["options", "functionPrefix"],
|
|
273
|
+
mapper: {
|
|
274
|
+
serializedName: "function_prefix",
|
|
275
|
+
type: {
|
|
276
|
+
name: "String"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
export const data: OperationQueryParameter = {
|
|
282
|
+
parameterPath: ["options", "data"],
|
|
283
|
+
mapper: {
|
|
284
|
+
serializedName: "data",
|
|
285
|
+
type: {
|
|
286
|
+
name: "String"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export const aexnArgs: OperationQueryParameter = {
|
|
292
|
+
parameterPath: ["options", "aexnArgs"],
|
|
293
|
+
mapper: {
|
|
294
|
+
serializedName: "aexn-args",
|
|
295
|
+
type: {
|
|
296
|
+
name: "Boolean"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export const hash1: OperationURLParameter = {
|
|
302
|
+
parameterPath: "hash",
|
|
303
|
+
mapper: {
|
|
304
|
+
serializedName: "hash",
|
|
305
|
+
required: true,
|
|
306
|
+
type: {
|
|
307
|
+
name: "String"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export const ownedBy: OperationQueryParameter = {
|
|
313
|
+
parameterPath: ["options", "ownedBy"],
|
|
314
|
+
mapper: {
|
|
315
|
+
serializedName: "owned_by",
|
|
316
|
+
type: {
|
|
317
|
+
name: "String"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export const state1: OperationQueryParameter = {
|
|
323
|
+
parameterPath: ["options", "state"],
|
|
324
|
+
mapper: {
|
|
325
|
+
serializedName: "state",
|
|
326
|
+
type: {
|
|
327
|
+
name: "String"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export const type1: OperationQueryParameter = {
|
|
333
|
+
parameterPath: ["options", "type"],
|
|
334
|
+
mapper: {
|
|
335
|
+
serializedName: "type",
|
|
336
|
+
type: {
|
|
337
|
+
name: "Sequence",
|
|
338
|
+
element: {
|
|
339
|
+
type: {
|
|
340
|
+
name: "String"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
collectionFormat: "Multi"
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export const typeGroup: OperationQueryParameter = {
|
|
349
|
+
parameterPath: ["options", "typeGroup"],
|
|
350
|
+
mapper: {
|
|
351
|
+
serializedName: "type_group",
|
|
352
|
+
type: {
|
|
353
|
+
name: "Sequence",
|
|
354
|
+
element: {
|
|
355
|
+
type: {
|
|
356
|
+
name: "String"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
collectionFormat: "Multi"
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
export const account: OperationQueryParameter = {
|
|
365
|
+
parameterPath: ["options", "account"],
|
|
366
|
+
mapper: {
|
|
367
|
+
serializedName: "account",
|
|
368
|
+
type: {
|
|
369
|
+
name: "String"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
export const contract: OperationQueryParameter = {
|
|
375
|
+
parameterPath: ["options", "contract"],
|
|
376
|
+
mapper: {
|
|
377
|
+
serializedName: "contract",
|
|
378
|
+
type: {
|
|
379
|
+
name: "String"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export const channel: OperationQueryParameter = {
|
|
385
|
+
parameterPath: ["options", "channel"],
|
|
386
|
+
mapper: {
|
|
387
|
+
serializedName: "channel",
|
|
388
|
+
type: {
|
|
389
|
+
name: "String"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export const oracle: OperationQueryParameter = {
|
|
395
|
+
parameterPath: ["options", "oracle"],
|
|
396
|
+
mapper: {
|
|
397
|
+
serializedName: "oracle",
|
|
398
|
+
type: {
|
|
399
|
+
name: "String"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export const senderId: OperationQueryParameter = {
|
|
405
|
+
parameterPath: ["options", "senderId"],
|
|
406
|
+
mapper: {
|
|
407
|
+
serializedName: "sender_id",
|
|
408
|
+
type: {
|
|
409
|
+
name: "String"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export const recipientId: OperationQueryParameter = {
|
|
415
|
+
parameterPath: ["options", "recipientId"],
|
|
416
|
+
mapper: {
|
|
417
|
+
serializedName: "recipient_id",
|
|
418
|
+
type: {
|
|
419
|
+
name: "String"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export const entrypoint: OperationQueryParameter = {
|
|
425
|
+
parameterPath: ["options", "entrypoint"],
|
|
426
|
+
mapper: {
|
|
427
|
+
serializedName: "entrypoint",
|
|
428
|
+
type: {
|
|
429
|
+
name: "String"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
export const txType: OperationQueryParameter = {
|
|
435
|
+
parameterPath: ["options", "txType"],
|
|
436
|
+
mapper: {
|
|
437
|
+
serializedName: "tx_type",
|
|
438
|
+
type: {
|
|
439
|
+
name: "String"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
export const id1: OperationQueryParameter = {
|
|
445
|
+
parameterPath: ["options", "id"],
|
|
446
|
+
mapper: {
|
|
447
|
+
serializedName: "id",
|
|
448
|
+
type: {
|
|
449
|
+
name: "String"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export const hashOrIndex: OperationURLParameter = {
|
|
455
|
+
parameterPath: "hashOrIndex",
|
|
456
|
+
mapper: {
|
|
457
|
+
serializedName: "hash_or_index",
|
|
458
|
+
required: true,
|
|
459
|
+
type: {
|
|
460
|
+
name: "String"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
};
|
package/src/chain.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AE_AMOUNT_FORMATS, formatAmount } from './utils/amount-formatter';
|
|
2
2
|
import verifyTransaction, { ValidatorResult } from './tx/validator';
|
|
3
|
-
import { isAccountNotFoundError, pause } from './utils/other';
|
|
3
|
+
import { ensureError, isAccountNotFoundError, pause } from './utils/other';
|
|
4
4
|
import { isNameValid, produceNameId } from './tx/builder/helpers';
|
|
5
5
|
import { DRY_RUN_ACCOUNT } from './tx/builder/schema';
|
|
6
6
|
import { AensName } from './tx/builder/constants';
|
|
@@ -23,7 +23,7 @@ import { buildTxHash } from './tx/builder';
|
|
|
23
23
|
* @category chain
|
|
24
24
|
*/
|
|
25
25
|
export function _getPollInterval(
|
|
26
|
-
type: 'block' | 'microblock',
|
|
26
|
+
type: 'block' | 'microblock', // TODO: rename to 'key-block' | 'micro-block'
|
|
27
27
|
{ _expectedMineRate = 180000, _microBlockCycle = 3000, _maxPollInterval = 5000 }:
|
|
28
28
|
{ _expectedMineRate?: number; _microBlockCycle?: number; _maxPollInterval?: number },
|
|
29
29
|
): number {
|
|
@@ -208,6 +208,7 @@ export async function sendTransaction(
|
|
|
208
208
|
}
|
|
209
209
|
return { hash: txHash, rawTx: tx };
|
|
210
210
|
} catch (error) {
|
|
211
|
+
ensureError(error);
|
|
211
212
|
throw Object.assign(error, {
|
|
212
213
|
rawTx: tx,
|
|
213
214
|
verifyTx: async () => verifyTransaction(tx, onNode),
|
package/src/channel/Base.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
2
|
import { w3cwebsocket as W3CWebSocket } from 'websocket';
|
|
3
3
|
import { snakeToPascal } from '../utils/string';
|
|
4
4
|
import { buildTx, unpackTx } from '../tx/builder';
|
|
@@ -55,7 +55,7 @@ function snakeToPascalObjKeys<Type>(obj: object): Type {
|
|
|
55
55
|
export default class Channel {
|
|
56
56
|
_eventEmitter = new EventEmitter();
|
|
57
57
|
|
|
58
|
-
_pingTimeoutId
|
|
58
|
+
_pingTimeoutId!: NodeJS.Timeout;
|
|
59
59
|
|
|
60
60
|
_nextRpcMessageId = 0;
|
|
61
61
|
|
|
@@ -73,13 +73,13 @@ export default class Channel {
|
|
|
73
73
|
|
|
74
74
|
_status: ChannelStatus = 'disconnected';
|
|
75
75
|
|
|
76
|
-
_fsm
|
|
76
|
+
_fsm!: ChannelFsm;
|
|
77
77
|
|
|
78
|
-
_websocket
|
|
78
|
+
_websocket!: W3CWebSocket;
|
|
79
79
|
|
|
80
80
|
_state: Encoded.Transaction | '' = '';
|
|
81
81
|
|
|
82
|
-
_options
|
|
82
|
+
_options!: ChannelOptions;
|
|
83
83
|
|
|
84
84
|
_channelId?: Encoded.Channel;
|
|
85
85
|
|
package/src/channel/internal.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../utils/errors';
|
|
16
16
|
import { encodeContractAddress } from '../utils/crypto';
|
|
17
17
|
import { buildTx } from '../tx/builder';
|
|
18
|
+
import { ensureError } from '../utils/other';
|
|
18
19
|
|
|
19
20
|
export interface ChannelEvents {
|
|
20
21
|
statusChanged: (status: ChannelStatus) => void;
|
|
@@ -240,6 +241,7 @@ async function dequeueMessage(channel: Channel): Promise<void> {
|
|
|
240
241
|
try {
|
|
241
242
|
await handleMessage(channel, message);
|
|
242
243
|
} catch (error) {
|
|
244
|
+
ensureError(error);
|
|
243
245
|
emit(channel, 'error', new ChannelIncomingMessageError(error, message));
|
|
244
246
|
}
|
|
245
247
|
}
|
package/src/contract/Contract.ts
CHANGED
|
@@ -324,6 +324,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
324
324
|
const useFallbackAccount = callStatic === true && (
|
|
325
325
|
(error instanceof TypeError && error.message === 'Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead')
|
|
326
326
|
|| (error instanceof NoWalletConnectedError)
|
|
327
|
+
|| (error instanceof InternalError && error.message === 'Use fallback account')
|
|
327
328
|
);
|
|
328
329
|
if (!useFallbackAccount) throw error;
|
|
329
330
|
callerId = DRY_RUN_ACCOUNT.pub;
|
|
@@ -55,6 +55,32 @@ export default abstract class CompilerBase {
|
|
|
55
55
|
aci: Aci;
|
|
56
56
|
}>;
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Generate contract's ACI by contract's path
|
|
60
|
+
* Available only in Node.js
|
|
61
|
+
* @param path - Path to contract source code
|
|
62
|
+
* @returns ACI
|
|
63
|
+
*/
|
|
64
|
+
abstract generateAci(path: string): Promise<Aci>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Generate contract's ACI by contract's source code
|
|
68
|
+
* @param sourceCode - Contract source code as string
|
|
69
|
+
* @param fileSystem - A map of contract filename to the corresponding contract source code to
|
|
70
|
+
* include into the main contract
|
|
71
|
+
* @example
|
|
72
|
+
* ```js
|
|
73
|
+
* {
|
|
74
|
+
* 'library.aes': 'namespace TestLib =\n function sum(x: int, y: int) : int = x + y'
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
* @returns ACI
|
|
78
|
+
*/
|
|
79
|
+
abstract generateAciBySourceCode(
|
|
80
|
+
sourceCode: string,
|
|
81
|
+
fileSystem?: Record<string, string>,
|
|
82
|
+
): Promise<Aci>;
|
|
83
|
+
|
|
58
84
|
/**
|
|
59
85
|
* Verify that a contract bytecode is the result of compiling the given source code
|
|
60
86
|
* Available only in Node.js
|
|
@@ -7,6 +7,7 @@ import CompilerBase, { Aci } from './Base';
|
|
|
7
7
|
import { Encoded } from '../../utils/encoder';
|
|
8
8
|
import { CompilerError, InternalError, UnsupportedVersionError } from '../../utils/errors';
|
|
9
9
|
import semverSatisfies from '../../utils/semver-satisfies';
|
|
10
|
+
import { ensureError } from '../../utils/other';
|
|
10
11
|
|
|
11
12
|
const getPackagePath = (): string => {
|
|
12
13
|
const path = dirname(fileURLToPath(import.meta.url));
|
|
@@ -22,7 +23,7 @@ const getPackagePath = (): string => {
|
|
|
22
23
|
export default class CompilerCli extends CompilerBase {
|
|
23
24
|
#path: string;
|
|
24
25
|
|
|
25
|
-
#ensureCompatibleVersion
|
|
26
|
+
#ensureCompatibleVersion = Promise.resolve();
|
|
26
27
|
|
|
27
28
|
constructor(
|
|
28
29
|
compilerPath = resolve(getPackagePath(), './bin/aesophia_cli'),
|
|
@@ -32,7 +33,7 @@ export default class CompilerCli extends CompilerBase {
|
|
|
32
33
|
this.#path = compilerPath;
|
|
33
34
|
if (ignoreVersion !== true) {
|
|
34
35
|
this.#ensureCompatibleVersion = this.version().then((version) => {
|
|
35
|
-
const versions = [version, '7.
|
|
36
|
+
const versions = [version, '7.2.1', '8.0.0'] as const;
|
|
36
37
|
if (!semverSatisfies(...versions)) throw new UnsupportedVersionError('compiler', ...versions);
|
|
37
38
|
});
|
|
38
39
|
}
|
|
@@ -78,9 +79,10 @@ export default class CompilerCli extends CompilerBase {
|
|
|
78
79
|
]);
|
|
79
80
|
return {
|
|
80
81
|
bytecode: bytecode.trimEnd() as Encoded.ContractBytearray,
|
|
81
|
-
aci
|
|
82
|
+
aci,
|
|
82
83
|
};
|
|
83
84
|
} catch (error) {
|
|
85
|
+
ensureError(error);
|
|
84
86
|
throw new CompilerError(error.message);
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -97,6 +99,28 @@ export default class CompilerCli extends CompilerBase {
|
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
|
|
102
|
+
async generateAci(path: string): Promise<Aci> {
|
|
103
|
+
await this.#ensureCompatibleVersion;
|
|
104
|
+
try {
|
|
105
|
+
return JSON.parse(await this.#run('--no_code', '--create_json_aci', path));
|
|
106
|
+
} catch (error) {
|
|
107
|
+
ensureError(error);
|
|
108
|
+
throw new CompilerError(error.message);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async generateAciBySourceCode(
|
|
113
|
+
sourceCode: string,
|
|
114
|
+
fileSystem?: Record<string, string>,
|
|
115
|
+
): Promise<Aci> {
|
|
116
|
+
const tmp = await CompilerCli.#saveContractToTmpDir(sourceCode, fileSystem);
|
|
117
|
+
try {
|
|
118
|
+
return await this.generateAci(tmp);
|
|
119
|
+
} finally {
|
|
120
|
+
await rm(dirname(tmp), { recursive: true });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
100
124
|
async validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean> {
|
|
101
125
|
await this.#ensureCompatibleVersion;
|
|
102
126
|
try {
|
|
@@ -55,7 +55,7 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
55
55
|
const versionPromise = this.api.apiVersion()
|
|
56
56
|
.then(({ apiVersion }) => apiVersion, (error) => error);
|
|
57
57
|
this.api.pipeline.addPolicy(
|
|
58
|
-
genVersionCheckPolicy('compiler', '/api-version', versionPromise, '7.
|
|
58
|
+
genVersionCheckPolicy('compiler', '/api-version', versionPromise, '7.3.0', '8.0.0'),
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -70,7 +70,7 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
70
70
|
return res as { bytecode: Encoded.ContractBytearray; aci: Aci };
|
|
71
71
|
} catch (error) {
|
|
72
72
|
if (error instanceof RestError && error.statusCode === 400) {
|
|
73
|
-
throw new CompilerError(error.message
|
|
73
|
+
throw new CompilerError(error.message);
|
|
74
74
|
}
|
|
75
75
|
throw error;
|
|
76
76
|
}
|
|
@@ -81,6 +81,25 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
81
81
|
throw new NotImplementedError('File system access, use CompilerHttpNode instead');
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
async generateAciBySourceCode(
|
|
85
|
+
sourceCode: string,
|
|
86
|
+
fileSystem?: Record<string, string>,
|
|
87
|
+
): Promise<Aci> {
|
|
88
|
+
try {
|
|
89
|
+
return await this.api.generateACI({ code: sourceCode, options: { fileSystem } });
|
|
90
|
+
} catch (error) {
|
|
91
|
+
if (error instanceof RestError && error.statusCode === 400) {
|
|
92
|
+
throw new CompilerError(error.message);
|
|
93
|
+
}
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
99
|
+
async generateAci(path: string): Promise<Aci> {
|
|
100
|
+
throw new NotImplementedError('File system access, use CompilerHttpNode instead');
|
|
101
|
+
}
|
|
102
|
+
|
|
84
103
|
async validateBySourceCode(
|
|
85
104
|
bytecode: Encoded.ContractBytearray,
|
|
86
105
|
sourceCode: string,
|
|
@@ -18,6 +18,12 @@ export default class CompilerHttpNode extends HttpBrowser {
|
|
|
18
18
|
return this.compileBySourceCode(sourceCode, fileSystem);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
override async generateAci(path: string): Promise<Aci> {
|
|
22
|
+
const fileSystem = await getFileSystem(path);
|
|
23
|
+
const sourceCode = await readFile(path, 'utf8');
|
|
24
|
+
return this.generateAciBySourceCode(sourceCode, fileSystem);
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
override async validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean> {
|
|
22
28
|
const fileSystem = await getFileSystem(path);
|
|
23
29
|
const sourceCode = await readFile(path, 'utf8');
|