@connext/apps
Advanced tools
Comparing version 0.0.1 to 5.0.2
this.window = this.window || {}; | ||
this.window.apps = (function (exports, types, constants, cfCore, utils) { | ||
this.window.apps = (function (exports, types, cfCore, constants, utils) { | ||
'use strict'; | ||
@@ -16,4 +16,10 @@ | ||
const singleAssetTwoPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[2]`; | ||
const multiAssetMultiPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[][]`; | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: types.FastSignerTransferAppStateEncoding, | ||
actionEncoding: types.FastSignerTransferAppActionEncoding, | ||
}; | ||
@@ -30,3 +36,3 @@ function convertCoinBalanceRefund(to, obj) { | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: `tuple(address recipient, address multisig, uint256 threshold, address tokenAddress)`, | ||
stateEncoding: types.CoinBalanceRefundAppStateEncoding, | ||
}; | ||
@@ -80,37 +86,2 @@ | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const paymentsEncoding = ` | ||
tuple( | ||
uint256 amount, | ||
address assetId, | ||
address signer, | ||
bytes32 paymentId, | ||
uint256 timeout, | ||
string recipientXpub, | ||
bytes32 data, | ||
bytes signature | ||
)[] | ||
`; | ||
const stateEncoding = ` | ||
tuple( | ||
${paymentsEncoding} lockedPayments, | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bool finalized, | ||
uint256 turnNum | ||
) | ||
`; | ||
const actionEncoding = ` | ||
tuple( | ||
${paymentsEncoding} newLockedPayments, | ||
uint256 actionType | ||
) | ||
`; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
actionEncoding, | ||
}; | ||
const validateFastSignedTransferApp = (params, initiatorPublicIdentifier, responderPublicIdentifier) => { | ||
@@ -151,18 +122,8 @@ const { responderDeposit, initiatorDeposit, initialState: initialStateBadType } = types.bigNumberifyObj(params); | ||
const SimpleLinkedTransferApp = "SimpleLinkedTransferApp"; | ||
const stateEncoding$1 = ` | ||
tuple( | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bytes32 linkedHash, | ||
uint256 amount, | ||
address assetId, | ||
bytes32 paymentId, | ||
bytes32 preImage | ||
) | ||
`; | ||
const SimpleLinkedTransferAppRegistryInfo = { | ||
actionEncoding: `tuple(bytes32 preImage)`, | ||
actionEncoding: types.SimpleLinkedTransferAppActionEncoding, | ||
allowNodeInstall: true, | ||
name: SimpleLinkedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$1, | ||
stateEncoding: types.SimpleLinkedTransferAppStateEncoding, | ||
}; | ||
@@ -200,5 +161,2 @@ | ||
const SimpleTwoPartySwapApp = "SimpleTwoPartySwapApp"; | ||
const stateEncoding$2 = ` | ||
tuple(${multiAssetMultiPartyCoinTransferEncoding} coinTransfers) | ||
`; | ||
const SimpleTwoPartySwapAppRegistryInfo = { | ||
@@ -208,3 +166,3 @@ allowNodeInstall: true, | ||
outcomeType: types.OutcomeType.MULTI_ASSET_MULTI_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$2, | ||
stateEncoding: types.SimpleSwapAppStateEncoding, | ||
}; | ||
@@ -263,4 +221,2 @@ | ||
exports.convertSwapParameters = convertSwapParameters; | ||
exports.multiAssetMultiPartyCoinTransferEncoding = multiAssetMultiPartyCoinTransferEncoding; | ||
exports.singleAssetTwoPartyCoinTransferEncoding = singleAssetTwoPartyCoinTransferEncoding; | ||
exports.unidirectionalCoinTransferValidation = unidirectionalCoinTransferValidation; | ||
@@ -273,2 +229,2 @@ exports.validateFastSignedTransferApp = validateFastSignedTransferApp; | ||
}({}, types, constants, cfCore, utils)); | ||
}({}, types, cfCore, constants, utils)); |
@@ -1,4 +0,4 @@ | ||
import { getType, convertFields, convertAmountField, OutcomeType, bigNumberifyObj, stringify, convertAssetAmountWithId, makeChecksumOrEthAddress, calculateExchange } from '@connext/types'; | ||
import { getType, convertFields, convertAmountField, OutcomeType, FastSignerTransferAppStateEncoding, FastSignerTransferAppActionEncoding, CoinBalanceRefundAppStateEncoding, bigNumberifyObj, stringify, convertAssetAmountWithId, SimpleLinkedTransferAppActionEncoding, SimpleLinkedTransferAppStateEncoding, makeChecksumOrEthAddress, SimpleSwapAppStateEncoding, calculateExchange } from '@connext/types'; | ||
import { xkeyKthAddress } from '@connext/cf-core'; | ||
import { Zero } from 'ethers/constants'; | ||
import { xkeyKthAddress } from '@connext/cf-core'; | ||
import { bigNumberify } from 'ethers/utils'; | ||
@@ -17,4 +17,10 @@ | ||
const singleAssetTwoPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[2]`; | ||
const multiAssetMultiPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[][]`; | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: FastSignerTransferAppStateEncoding, | ||
actionEncoding: FastSignerTransferAppActionEncoding, | ||
}; | ||
@@ -31,3 +37,3 @@ function convertCoinBalanceRefund(to, obj) { | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: `tuple(address recipient, address multisig, uint256 threshold, address tokenAddress)`, | ||
stateEncoding: CoinBalanceRefundAppStateEncoding, | ||
}; | ||
@@ -81,37 +87,2 @@ | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const paymentsEncoding = ` | ||
tuple( | ||
uint256 amount, | ||
address assetId, | ||
address signer, | ||
bytes32 paymentId, | ||
uint256 timeout, | ||
string recipientXpub, | ||
bytes32 data, | ||
bytes signature | ||
)[] | ||
`; | ||
const stateEncoding = ` | ||
tuple( | ||
${paymentsEncoding} lockedPayments, | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bool finalized, | ||
uint256 turnNum | ||
) | ||
`; | ||
const actionEncoding = ` | ||
tuple( | ||
${paymentsEncoding} newLockedPayments, | ||
uint256 actionType | ||
) | ||
`; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
actionEncoding, | ||
}; | ||
const validateFastSignedTransferApp = (params, initiatorPublicIdentifier, responderPublicIdentifier) => { | ||
@@ -152,18 +123,8 @@ const { responderDeposit, initiatorDeposit, initialState: initialStateBadType } = bigNumberifyObj(params); | ||
const SimpleLinkedTransferApp = "SimpleLinkedTransferApp"; | ||
const stateEncoding$1 = ` | ||
tuple( | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bytes32 linkedHash, | ||
uint256 amount, | ||
address assetId, | ||
bytes32 paymentId, | ||
bytes32 preImage | ||
) | ||
`; | ||
const SimpleLinkedTransferAppRegistryInfo = { | ||
actionEncoding: `tuple(bytes32 preImage)`, | ||
actionEncoding: SimpleLinkedTransferAppActionEncoding, | ||
allowNodeInstall: true, | ||
name: SimpleLinkedTransferApp, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$1, | ||
stateEncoding: SimpleLinkedTransferAppStateEncoding, | ||
}; | ||
@@ -201,5 +162,2 @@ | ||
const SimpleTwoPartySwapApp = "SimpleTwoPartySwapApp"; | ||
const stateEncoding$2 = ` | ||
tuple(${multiAssetMultiPartyCoinTransferEncoding} coinTransfers) | ||
`; | ||
const SimpleTwoPartySwapAppRegistryInfo = { | ||
@@ -209,3 +167,3 @@ allowNodeInstall: true, | ||
outcomeType: OutcomeType.MULTI_ASSET_MULTI_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$2, | ||
stateEncoding: SimpleSwapAppStateEncoding, | ||
}; | ||
@@ -242,2 +200,2 @@ | ||
export { AppRegistry, CoinBalanceRefundApp, CoinBalanceRefundAppRegistryInfo, FastSignedTransferApp, FastSignedTransferAppRegistryInfo, SimpleLinkedTransferApp, SimpleLinkedTransferAppRegistryInfo, SimpleTwoPartySwapApp, SimpleTwoPartySwapAppRegistryInfo, SupportedApplications, baseCoinTransferValidation, commonAppProposalValidation, convertCoinBalanceRefund, convertFastSignedTransferAppState, convertFastSignedTransferParameters, convertLinkedTransferAppState, convertLinkedTransferParameters, convertLinkedTransferToRecipientParameters, convertResolveLinkedTransferParameters, convertResolveLinkedTransferToRecipientParameters, convertSimpleSwapAppState, convertSwapParameters, multiAssetMultiPartyCoinTransferEncoding, singleAssetTwoPartyCoinTransferEncoding, unidirectionalCoinTransferValidation, validateFastSignedTransferApp, validateSimpleLinkedTransferApp, validateSimpleSwapApp }; | ||
export { AppRegistry, CoinBalanceRefundApp, CoinBalanceRefundAppRegistryInfo, FastSignedTransferApp, FastSignedTransferAppRegistryInfo, SimpleLinkedTransferApp, SimpleLinkedTransferAppRegistryInfo, SimpleTwoPartySwapApp, SimpleTwoPartySwapAppRegistryInfo, SupportedApplications, baseCoinTransferValidation, commonAppProposalValidation, convertCoinBalanceRefund, convertFastSignedTransferAppState, convertFastSignedTransferParameters, convertLinkedTransferAppState, convertLinkedTransferParameters, convertLinkedTransferToRecipientParameters, convertResolveLinkedTransferParameters, convertResolveLinkedTransferToRecipientParameters, convertSimpleSwapAppState, convertSwapParameters, unidirectionalCoinTransferValidation, validateFastSignedTransferApp, validateSimpleLinkedTransferApp, validateSimpleSwapApp }; |
@@ -6,4 +6,4 @@ 'use strict'; | ||
var types = require('@connext/types'); | ||
var cfCore = require('@connext/cf-core'); | ||
var constants = require('ethers/constants'); | ||
var cfCore = require('@connext/cf-core'); | ||
var utils = require('ethers/utils'); | ||
@@ -22,4 +22,10 @@ | ||
const singleAssetTwoPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[2]`; | ||
const multiAssetMultiPartyCoinTransferEncoding = `tuple(address to, uint256 amount)[][]`; | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: types.FastSignerTransferAppStateEncoding, | ||
actionEncoding: types.FastSignerTransferAppActionEncoding, | ||
}; | ||
@@ -36,3 +42,3 @@ function convertCoinBalanceRefund(to, obj) { | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: `tuple(address recipient, address multisig, uint256 threshold, address tokenAddress)`, | ||
stateEncoding: types.CoinBalanceRefundAppStateEncoding, | ||
}; | ||
@@ -86,37 +92,2 @@ | ||
const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const paymentsEncoding = ` | ||
tuple( | ||
uint256 amount, | ||
address assetId, | ||
address signer, | ||
bytes32 paymentId, | ||
uint256 timeout, | ||
string recipientXpub, | ||
bytes32 data, | ||
bytes signature | ||
)[] | ||
`; | ||
const stateEncoding = ` | ||
tuple( | ||
${paymentsEncoding} lockedPayments, | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bool finalized, | ||
uint256 turnNum | ||
) | ||
`; | ||
const actionEncoding = ` | ||
tuple( | ||
${paymentsEncoding} newLockedPayments, | ||
uint256 actionType | ||
) | ||
`; | ||
const FastSignedTransferAppRegistryInfo = { | ||
allowNodeInstall: true, | ||
name: FastSignedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
actionEncoding, | ||
}; | ||
const validateFastSignedTransferApp = (params, initiatorPublicIdentifier, responderPublicIdentifier) => { | ||
@@ -157,18 +128,8 @@ const { responderDeposit, initiatorDeposit, initialState: initialStateBadType } = types.bigNumberifyObj(params); | ||
const SimpleLinkedTransferApp = "SimpleLinkedTransferApp"; | ||
const stateEncoding$1 = ` | ||
tuple( | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bytes32 linkedHash, | ||
uint256 amount, | ||
address assetId, | ||
bytes32 paymentId, | ||
bytes32 preImage | ||
) | ||
`; | ||
const SimpleLinkedTransferAppRegistryInfo = { | ||
actionEncoding: `tuple(bytes32 preImage)`, | ||
actionEncoding: types.SimpleLinkedTransferAppActionEncoding, | ||
allowNodeInstall: true, | ||
name: SimpleLinkedTransferApp, | ||
outcomeType: types.OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$1, | ||
stateEncoding: types.SimpleLinkedTransferAppStateEncoding, | ||
}; | ||
@@ -206,5 +167,2 @@ | ||
const SimpleTwoPartySwapApp = "SimpleTwoPartySwapApp"; | ||
const stateEncoding$2 = ` | ||
tuple(${multiAssetMultiPartyCoinTransferEncoding} coinTransfers) | ||
`; | ||
const SimpleTwoPartySwapAppRegistryInfo = { | ||
@@ -214,3 +172,3 @@ allowNodeInstall: true, | ||
outcomeType: types.OutcomeType.MULTI_ASSET_MULTI_PARTY_COIN_TRANSFER, | ||
stateEncoding: stateEncoding$2, | ||
stateEncoding: types.SimpleSwapAppStateEncoding, | ||
}; | ||
@@ -269,4 +227,2 @@ | ||
exports.convertSwapParameters = convertSwapParameters; | ||
exports.multiAssetMultiPartyCoinTransferEncoding = multiAssetMultiPartyCoinTransferEncoding; | ||
exports.singleAssetTwoPartyCoinTransferEncoding = singleAssetTwoPartyCoinTransferEncoding; | ||
exports.unidirectionalCoinTransferValidation = unidirectionalCoinTransferValidation; | ||
@@ -273,0 +229,0 @@ exports.validateFastSignedTransferApp = validateFastSignedTransferApp; |
@@ -1,2 +0,2 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { CoinBalanceRefundAppStateEncoding, OutcomeType } from "@connext/types"; | ||
export const CoinBalanceRefundApp = "CoinBalanceRefundApp"; | ||
@@ -7,4 +7,4 @@ export const CoinBalanceRefundAppRegistryInfo = { | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: `tuple(address recipient, address multisig, uint256 threshold, address tokenAddress)`, | ||
stateEncoding: CoinBalanceRefundAppStateEncoding, | ||
}; | ||
//# sourceMappingURL=registry.js.map |
@@ -1,30 +0,3 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { singleAssetTwoPartyCoinTransferEncoding } from "../shared"; | ||
import { OutcomeType, FastSignerTransferAppStateEncoding, FastSignerTransferAppActionEncoding, } from "@connext/types"; | ||
export const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const paymentsEncoding = ` | ||
tuple( | ||
uint256 amount, | ||
address assetId, | ||
address signer, | ||
bytes32 paymentId, | ||
uint256 timeout, | ||
string recipientXpub, | ||
bytes32 data, | ||
bytes signature | ||
)[] | ||
`; | ||
const stateEncoding = ` | ||
tuple( | ||
${paymentsEncoding} lockedPayments, | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bool finalized, | ||
uint256 turnNum | ||
) | ||
`; | ||
const actionEncoding = ` | ||
tuple( | ||
${paymentsEncoding} newLockedPayments, | ||
uint256 actionType | ||
) | ||
`; | ||
export const FastSignedTransferAppRegistryInfo = { | ||
@@ -34,5 +7,5 @@ allowNodeInstall: true, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
actionEncoding, | ||
stateEncoding: FastSignerTransferAppStateEncoding, | ||
actionEncoding: FastSignerTransferAppActionEncoding, | ||
}; | ||
//# sourceMappingURL=registry.js.map |
export * from "./registry"; | ||
export * from "./constants"; | ||
export * from "./validation"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,3 +0,2 @@ | ||
export * from "./constants"; | ||
export * from "./validation"; | ||
//# sourceMappingURL=index.js.map |
@@ -1,21 +0,10 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { singleAssetTwoPartyCoinTransferEncoding } from "../shared"; | ||
import { OutcomeType, SimpleLinkedTransferAppStateEncoding, SimpleLinkedTransferAppActionEncoding, } from "@connext/types"; | ||
export const SimpleLinkedTransferApp = "SimpleLinkedTransferApp"; | ||
const stateEncoding = ` | ||
tuple( | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bytes32 linkedHash, | ||
uint256 amount, | ||
address assetId, | ||
bytes32 paymentId, | ||
bytes32 preImage | ||
) | ||
`; | ||
export const SimpleLinkedTransferAppRegistryInfo = { | ||
actionEncoding: `tuple(bytes32 preImage)`, | ||
actionEncoding: SimpleLinkedTransferAppActionEncoding, | ||
allowNodeInstall: true, | ||
name: SimpleLinkedTransferApp, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
stateEncoding: SimpleLinkedTransferAppStateEncoding, | ||
}; | ||
//# sourceMappingURL=registry.js.map |
@@ -1,7 +0,3 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { multiAssetMultiPartyCoinTransferEncoding } from "../shared"; | ||
import { OutcomeType, SimpleSwapAppStateEncoding } from "@connext/types"; | ||
export const SimpleTwoPartySwapApp = "SimpleTwoPartySwapApp"; | ||
const stateEncoding = ` | ||
tuple(${multiAssetMultiPartyCoinTransferEncoding} coinTransfers) | ||
`; | ||
export const SimpleTwoPartySwapAppRegistryInfo = { | ||
@@ -11,4 +7,4 @@ allowNodeInstall: true, | ||
outcomeType: OutcomeType.MULTI_ASSET_MULTI_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
stateEncoding: SimpleSwapAppStateEncoding, | ||
}; | ||
//# sourceMappingURL=registry.js.map |
{ | ||
"name": "@connext/apps", | ||
"version": "0.0.1", | ||
"version": "5.0.2", | ||
"description": "Connext Counterfactual Apps", | ||
@@ -13,6 +13,6 @@ "main": "dist/index.js", | ||
"lint": "../../node_modules/.bin/eslint -c '../../.eslintrc.js' --fix 'src/**/*'", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"rebuild": "npm run clean && npm run build", | ||
"clean": "rm -rf ./dist" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
@@ -19,0 +19,0 @@ "@connext/cf-core": "5.0.2", |
@@ -1,2 +0,2 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { CoinBalanceRefundAppStateEncoding, OutcomeType } from "@connext/types"; | ||
@@ -11,3 +11,3 @@ import { AppRegistryInfo } from "../shared"; | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding: `tuple(address recipient, address multisig, uint256 threshold, address tokenAddress)`, | ||
stateEncoding: CoinBalanceRefundAppStateEncoding, | ||
}; |
@@ -1,37 +0,12 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { | ||
OutcomeType, | ||
FastSignerTransferAppStateEncoding, | ||
FastSignerTransferAppActionEncoding, | ||
} from "@connext/types"; | ||
import { AppRegistryInfo } from "../shared"; | ||
import { singleAssetTwoPartyCoinTransferEncoding } from "../shared"; | ||
import {} from "../shared"; | ||
export const FastSignedTransferApp = "FastSignedTransferApp"; | ||
const paymentsEncoding = ` | ||
tuple( | ||
uint256 amount, | ||
address assetId, | ||
address signer, | ||
bytes32 paymentId, | ||
uint256 timeout, | ||
string recipientXpub, | ||
bytes32 data, | ||
bytes signature | ||
)[] | ||
`; | ||
const stateEncoding = ` | ||
tuple( | ||
${paymentsEncoding} lockedPayments, | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bool finalized, | ||
uint256 turnNum | ||
) | ||
`; | ||
const actionEncoding = ` | ||
tuple( | ||
${paymentsEncoding} newLockedPayments, | ||
uint256 actionType | ||
) | ||
`; | ||
export const FastSignedTransferAppRegistryInfo: AppRegistryInfo = { | ||
@@ -41,4 +16,4 @@ allowNodeInstall: true, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
actionEncoding, | ||
stateEncoding: FastSignerTransferAppStateEncoding, | ||
actionEncoding: FastSignerTransferAppActionEncoding, | ||
}; |
export * from "./registry"; | ||
export * from "./constants"; | ||
export * from "./validation"; |
@@ -1,24 +0,17 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { | ||
OutcomeType, | ||
SimpleLinkedTransferAppStateEncoding, | ||
SimpleLinkedTransferAppActionEncoding, | ||
} from "@connext/types"; | ||
import { AppRegistryInfo, singleAssetTwoPartyCoinTransferEncoding } from "../shared"; | ||
import { AppRegistryInfo } from "../shared"; | ||
export const SimpleLinkedTransferApp = "SimpleLinkedTransferApp"; | ||
const stateEncoding = ` | ||
tuple( | ||
${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
bytes32 linkedHash, | ||
uint256 amount, | ||
address assetId, | ||
bytes32 paymentId, | ||
bytes32 preImage | ||
) | ||
`; | ||
export const SimpleLinkedTransferAppRegistryInfo: AppRegistryInfo = { | ||
actionEncoding: `tuple(bytes32 preImage)`, | ||
actionEncoding: SimpleLinkedTransferAppActionEncoding, | ||
allowNodeInstall: true, | ||
name: SimpleLinkedTransferApp, | ||
outcomeType: OutcomeType.SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
stateEncoding: SimpleLinkedTransferAppStateEncoding, | ||
}; |
@@ -1,11 +0,7 @@ | ||
import { OutcomeType } from "@connext/types"; | ||
import { OutcomeType, SimpleSwapAppStateEncoding } from "@connext/types"; | ||
import { AppRegistryInfo, multiAssetMultiPartyCoinTransferEncoding } from "../shared"; | ||
import { AppRegistryInfo } from "../shared"; | ||
export const SimpleTwoPartySwapApp = "SimpleTwoPartySwapApp"; | ||
const stateEncoding = ` | ||
tuple(${multiAssetMultiPartyCoinTransferEncoding} coinTransfers) | ||
`; | ||
export const SimpleTwoPartySwapAppRegistryInfo: AppRegistryInfo = { | ||
@@ -15,3 +11,3 @@ allowNodeInstall: true, | ||
outcomeType: OutcomeType.MULTI_ASSET_MULTI_PARTY_COIN_TRANSFER, | ||
stateEncoding, | ||
stateEncoding: SimpleSwapAppStateEncoding, | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
390063
100
1
1367