Skip to content

Commit 8b475e0

Browse files
authored
feat(Build): Expose ACIHelpers and ACITransformation to bundle (#970)
Update node to `5.5.2`
1 parent 68fcba5 commit 8b475e0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

es/contract/aci/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const buildContractMethods = (instance) => () => ({
7979
} : {}
8080
})
8181

82-
const parseArguments = (aciArgs = []) => (args) => ({
82+
export const parseArguments = (aciArgs = []) => (args) => ({
8383
opt: args.length > aciArgs.length ? R.last(args) : {},
8484
args: Object.values(args).slice(0, aciArgs.length)
8585
})

es/contract/aci/transformation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function decodeEvents (events, options = { schema: [] }) {
6767
* @param {String} type Event type from schema
6868
* @return {*}
6969
*/
70-
function transformEvent (event, type) {
70+
export function transformEvent (event, type) {
7171
switch (type) {
7272
case SOPHIA_TYPES.int:
7373
return parseBigNumber(event)
@@ -203,7 +203,7 @@ export function transform (type, value, { bindings } = {}) {
203203
return `${value}`
204204
}
205205

206-
function transformVariant (value, generic, { bindings }) {
206+
export function transformVariant (value, generic, { bindings }) {
207207
const [[variant, variantArgs]] = typeof value === 'string' ? [[value, []]] : Object.entries(value)
208208
const [[v, type]] = Object.entries(generic.find(o => Object.keys(o)[0].toLowerCase() === variant.toLowerCase()))
209209
return `${v}${!type.length

es/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ import * as Keystore from './utils/keystore'
2020
import * as Bytes from './utils/bytes'
2121
import * as TxBuilder from './tx/builder'
2222
import * as TxBuilderHelper from './tx/builder/helpers'
23-
import * as AmountFormatter from './utils/amount-formatter'
2423
import * as SCHEMA from './tx/builder/schema'
24+
import * as ACIHelpers from './contract/aci/helpers'
25+
import * as ACITransformation from './contract/aci/transformation'
26+
import * as AmountFormatter from './utils/amount-formatter'
2527
import HdWallet from './utils/hd-wallet'
2628

2729
import Ae from './ae'
@@ -59,6 +61,8 @@ export {
5961
Contract,
6062
ContractCompilerAPI,
6163
ContractACI,
64+
ACIHelpers,
65+
ACITransformation,
6266
ChainNode,
6367
RpcAepp,
6468
RpcWallet,

0 commit comments

Comments
 (0)