@connext/types
Advanced tools
Comparing version 7.1.2 to 7.2.0
@@ -152,2 +152,3 @@ this.window = this.window || {}; | ||
const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
const SimpleLinkedTransferAppStateEncoding = tidy(`tuple( | ||
@@ -240,2 +241,3 @@ ${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
@@ -247,4 +249,7 @@ [SimpleTwoPartySwapAppName]: SimpleTwoPartySwapAppName, | ||
const SupportedApplicationNames = enumify({ | ||
[DepositAppName]: DepositAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
@@ -254,4 +259,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[WithdrawAppName]: WithdrawAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[DepositAppName]: DepositAppName, | ||
}); | ||
@@ -261,6 +264,13 @@ const PureActionApps = [ | ||
GraphSignedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleTwoPartySwapAppName, | ||
]; | ||
const RequireOnlineApps = [ | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
]; | ||
@@ -351,34 +361,18 @@ const CONDITIONAL_TRANSFER_CREATED_EVENT = "CONDITIONAL_TRANSFER_CREATED_EVENT"; | ||
const RequireOnlineAppNames = [ | ||
SupportedApplicationNames.GraphSignedTransferApp, | ||
SupportedApplicationNames.GraphBatchedTransferApp, | ||
SupportedApplicationNames.HashLockTransferApp, | ||
]; | ||
const AllowOfflineAppNames = [ | ||
SupportedApplicationNames.SimpleSignedTransferApp, | ||
SupportedApplicationNames.SimpleLinkedTransferApp, | ||
]; | ||
const getTransferTypeFromAppName = (name) => { | ||
if (RequireOnlineAppNames.includes(name)) { | ||
return "RequireOnline"; | ||
} | ||
if (AllowOfflineAppNames.includes(name)) { | ||
return "AllowOffline"; | ||
} | ||
return undefined; | ||
}; | ||
const ConditionalTransferTypes = enumify({ | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
HashLockTransfer: HashLockTransferAppName, | ||
LinkedTransfer: SimpleLinkedTransferAppName, | ||
OnlineTransfer: OnlineLinkedTransferAppName, | ||
SignedTransfer: SimpleSignedTransferAppName, | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
}); | ||
const ConditionalTransferAppNames = enumify({ | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
}); | ||
@@ -484,2 +478,3 @@ const TransferStatuses = { | ||
exports.NATS_TIMEOUT = NATS_TIMEOUT; | ||
exports.OnlineLinkedTransferAppName = OnlineLinkedTransferAppName; | ||
exports.OutcomeType = OutcomeType; | ||
@@ -490,2 +485,3 @@ exports.PriceOracleTypes = PriceOracleTypes; | ||
exports.PureActionApps = PureActionApps; | ||
exports.RequireOnlineApps = RequireOnlineApps; | ||
exports.STORE_SCHEMA_VERSION = STORE_SCHEMA_VERSION; | ||
@@ -511,3 +507,2 @@ exports.SignedTransferStatus = SignedTransferStatus; | ||
exports.enumify = enumify; | ||
exports.getTransferTypeFromAppName = getTransferTypeFromAppName; | ||
exports.multiAssetMultiPartyCoinTransferEncoding = multiAssetMultiPartyCoinTransferEncoding; | ||
@@ -514,0 +509,0 @@ exports.multiAssetMultiPartyCoinTransferInterpreterParamsEncoding = multiAssetMultiPartyCoinTransferInterpreterParamsEncoding; |
@@ -150,2 +150,3 @@ import { providers, BigNumber as BigNumber$1, constants } from 'ethers'; | ||
const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
const SimpleLinkedTransferAppStateEncoding = tidy(`tuple( | ||
@@ -241,2 +242,3 @@ ${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
@@ -248,4 +250,7 @@ [SimpleTwoPartySwapAppName]: SimpleTwoPartySwapAppName, | ||
const SupportedApplicationNames = enumify({ | ||
[DepositAppName]: DepositAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
@@ -255,4 +260,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[WithdrawAppName]: WithdrawAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[DepositAppName]: DepositAppName, | ||
}); | ||
@@ -262,6 +265,13 @@ const PureActionApps = [ | ||
GraphSignedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleTwoPartySwapAppName, | ||
]; | ||
const RequireOnlineApps = [ | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
]; | ||
@@ -353,34 +363,18 @@ const CONDITIONAL_TRANSFER_CREATED_EVENT = "CONDITIONAL_TRANSFER_CREATED_EVENT"; | ||
const RequireOnlineAppNames = [ | ||
SupportedApplicationNames.GraphSignedTransferApp, | ||
SupportedApplicationNames.GraphBatchedTransferApp, | ||
SupportedApplicationNames.HashLockTransferApp, | ||
]; | ||
const AllowOfflineAppNames = [ | ||
SupportedApplicationNames.SimpleSignedTransferApp, | ||
SupportedApplicationNames.SimpleLinkedTransferApp, | ||
]; | ||
const getTransferTypeFromAppName = (name) => { | ||
if (RequireOnlineAppNames.includes(name)) { | ||
return "RequireOnline"; | ||
} | ||
if (AllowOfflineAppNames.includes(name)) { | ||
return "AllowOffline"; | ||
} | ||
return undefined; | ||
}; | ||
const ConditionalTransferTypes = enumify({ | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
HashLockTransfer: HashLockTransferAppName, | ||
LinkedTransfer: SimpleLinkedTransferAppName, | ||
OnlineTransfer: OnlineLinkedTransferAppName, | ||
SignedTransfer: SimpleSignedTransferAppName, | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
}); | ||
const ConditionalTransferAppNames = enumify({ | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
}); | ||
@@ -431,2 +425,2 @@ const TransferStatuses = { | ||
export { AppNames, BigNumber, CF_METHOD_TIMEOUT, CHANNEL_PROTOCOL_VERSION, CONVENTION_FOR_ETH_ASSET_ID, ChallengeCancellationFailedEvent, ChallengeCancelledEvent, ChallengeCompletedEvent, ChallengeCompletionFailedEvent, ChallengeEvents, ChallengeOutcomeFailedEvent, ChallengeOutcomeSetEvent, ChallengeProgressedEvent, ChallengeProgressionFailedEvent, ChallengeStatus, ChallengeUpdatedEvent, ChannelMethods, CommitmentTarget, CommitmentTypes, ConditionalTransferAppNames, ConditionalTransferTypes, ConnextClientStorePrefix, ConnextEventEmitter, ConnextNodeStorePrefix, DOMAIN_NAME, DOMAIN_SALT, DOMAIN_VERSION, DepositAppName, DepositAppStateEncoding, ETHEREUM_NAMESPACE, EXPECTED_CONTRACT_NAMES_IN_NETWORK_CONTEXT, EventNames, GANACHE_CHAIN_ID, GRAPH_BATCHED_SWAP_CONVERSION, GenericConditionalTransferAppName, GraphBatchedTransferAppActionEncoding, GraphBatchedTransferAppName, GraphBatchedTransferAppStateEncoding, GraphSignedTransferAppActionEncoding, GraphSignedTransferAppName, GraphSignedTransferAppStateEncoding, GraphSignedTransferStatus, HashLockTransferAppActionEncoding, HashLockTransferAppName, HashLockTransferAppStateEncoding, HashLockTransferStatus, JsonRpcProvider, LinkedTransferStatus, MethodNames, MultisigOperation, NATS_ATTEMPTS, NATS_TIMEOUT, Opcode, OutcomeType, PriceOracleTypes, ProtocolNames, ProtocolRoles, PureActionApps, STORE_SCHEMA_VERSION, SignedTransferStatus, SimpleLinkedTransferAppActionEncoding, SimpleLinkedTransferAppName, SimpleLinkedTransferAppStateEncoding, SimpleSignedTransferAppActionEncoding, SimpleSignedTransferAppName, SimpleSignedTransferAppStateEncoding, SimpleSwapAppStateEncoding, SimpleTwoPartySwapAppName, StateProgressedEvent, StateSchemaVersion, StoredAppChallengeStatus, SupportedApplicationNames, TransferStatuses, TransferWithExpiryStatuses, TwoPartyFixedOutcome, WatcherEvents, WithdrawAppActionEncoding, WithdrawAppName, WithdrawAppStateEncoding, enumify, getTransferTypeFromAppName, multiAssetMultiPartyCoinTransferEncoding, multiAssetMultiPartyCoinTransferInterpreterParamsEncoding, singleAssetSinglePartyCoinTransferEncoding, singleAssetTwoPartyCoinTransferEncoding, singleAssetTwoPartyCoinTransferInterpreterParamsEncoding, tidy, twoPartyFixedOutcomeInterpreterParamsEncoding }; | ||
export { AppNames, BigNumber, CF_METHOD_TIMEOUT, CHANNEL_PROTOCOL_VERSION, CONVENTION_FOR_ETH_ASSET_ID, ChallengeCancellationFailedEvent, ChallengeCancelledEvent, ChallengeCompletedEvent, ChallengeCompletionFailedEvent, ChallengeEvents, ChallengeOutcomeFailedEvent, ChallengeOutcomeSetEvent, ChallengeProgressedEvent, ChallengeProgressionFailedEvent, ChallengeStatus, ChallengeUpdatedEvent, ChannelMethods, CommitmentTarget, CommitmentTypes, ConditionalTransferAppNames, ConditionalTransferTypes, ConnextClientStorePrefix, ConnextEventEmitter, ConnextNodeStorePrefix, DOMAIN_NAME, DOMAIN_SALT, DOMAIN_VERSION, DepositAppName, DepositAppStateEncoding, ETHEREUM_NAMESPACE, EXPECTED_CONTRACT_NAMES_IN_NETWORK_CONTEXT, EventNames, GANACHE_CHAIN_ID, GRAPH_BATCHED_SWAP_CONVERSION, GenericConditionalTransferAppName, GraphBatchedTransferAppActionEncoding, GraphBatchedTransferAppName, GraphBatchedTransferAppStateEncoding, GraphSignedTransferAppActionEncoding, GraphSignedTransferAppName, GraphSignedTransferAppStateEncoding, GraphSignedTransferStatus, HashLockTransferAppActionEncoding, HashLockTransferAppName, HashLockTransferAppStateEncoding, HashLockTransferStatus, JsonRpcProvider, LinkedTransferStatus, MethodNames, MultisigOperation, NATS_ATTEMPTS, NATS_TIMEOUT, OnlineLinkedTransferAppName, Opcode, OutcomeType, PriceOracleTypes, ProtocolNames, ProtocolRoles, PureActionApps, RequireOnlineApps, STORE_SCHEMA_VERSION, SignedTransferStatus, SimpleLinkedTransferAppActionEncoding, SimpleLinkedTransferAppName, SimpleLinkedTransferAppStateEncoding, SimpleSignedTransferAppActionEncoding, SimpleSignedTransferAppName, SimpleSignedTransferAppStateEncoding, SimpleSwapAppStateEncoding, SimpleTwoPartySwapAppName, StateProgressedEvent, StateSchemaVersion, StoredAppChallengeStatus, SupportedApplicationNames, TransferStatuses, TransferWithExpiryStatuses, TwoPartyFixedOutcome, WatcherEvents, WithdrawAppActionEncoding, WithdrawAppName, WithdrawAppStateEncoding, enumify, multiAssetMultiPartyCoinTransferEncoding, multiAssetMultiPartyCoinTransferInterpreterParamsEncoding, singleAssetSinglePartyCoinTransferEncoding, singleAssetTwoPartyCoinTransferEncoding, singleAssetTwoPartyCoinTransferInterpreterParamsEncoding, tidy, twoPartyFixedOutcomeInterpreterParamsEncoding }; |
@@ -155,2 +155,3 @@ 'use strict'; | ||
const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
const SimpleLinkedTransferAppStateEncoding = tidy(`tuple( | ||
@@ -243,2 +244,3 @@ ${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
@@ -250,4 +252,7 @@ [SimpleTwoPartySwapAppName]: SimpleTwoPartySwapAppName, | ||
const SupportedApplicationNames = enumify({ | ||
[DepositAppName]: DepositAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
@@ -257,4 +262,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[WithdrawAppName]: WithdrawAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[DepositAppName]: DepositAppName, | ||
}); | ||
@@ -264,6 +267,13 @@ const PureActionApps = [ | ||
GraphSignedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleTwoPartySwapAppName, | ||
]; | ||
const RequireOnlineApps = [ | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
]; | ||
@@ -354,34 +364,18 @@ const CONDITIONAL_TRANSFER_CREATED_EVENT = "CONDITIONAL_TRANSFER_CREATED_EVENT"; | ||
const RequireOnlineAppNames = [ | ||
SupportedApplicationNames.GraphSignedTransferApp, | ||
SupportedApplicationNames.GraphBatchedTransferApp, | ||
SupportedApplicationNames.HashLockTransferApp, | ||
]; | ||
const AllowOfflineAppNames = [ | ||
SupportedApplicationNames.SimpleSignedTransferApp, | ||
SupportedApplicationNames.SimpleLinkedTransferApp, | ||
]; | ||
const getTransferTypeFromAppName = (name) => { | ||
if (RequireOnlineAppNames.includes(name)) { | ||
return "RequireOnline"; | ||
} | ||
if (AllowOfflineAppNames.includes(name)) { | ||
return "AllowOffline"; | ||
} | ||
return undefined; | ||
}; | ||
const ConditionalTransferTypes = enumify({ | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
HashLockTransfer: HashLockTransferAppName, | ||
LinkedTransfer: SimpleLinkedTransferAppName, | ||
OnlineTransfer: OnlineLinkedTransferAppName, | ||
SignedTransfer: SimpleSignedTransferAppName, | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
}); | ||
const ConditionalTransferAppNames = enumify({ | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
}); | ||
@@ -487,2 +481,3 @@ const TransferStatuses = { | ||
exports.NATS_TIMEOUT = NATS_TIMEOUT; | ||
exports.OnlineLinkedTransferAppName = OnlineLinkedTransferAppName; | ||
exports.OutcomeType = OutcomeType; | ||
@@ -493,2 +488,3 @@ exports.PriceOracleTypes = PriceOracleTypes; | ||
exports.PureActionApps = PureActionApps; | ||
exports.RequireOnlineApps = RequireOnlineApps; | ||
exports.STORE_SCHEMA_VERSION = STORE_SCHEMA_VERSION; | ||
@@ -514,3 +510,2 @@ exports.SignedTransferStatus = SignedTransferStatus; | ||
exports.enumify = enumify; | ||
exports.getTransferTypeFromAppName = getTransferTypeFromAppName; | ||
exports.multiAssetMultiPartyCoinTransferEncoding = multiAssetMultiPartyCoinTransferEncoding; | ||
@@ -517,0 +512,0 @@ exports.multiAssetMultiPartyCoinTransferInterpreterParamsEncoding = multiAssetMultiPartyCoinTransferInterpreterParamsEncoding; |
import { HexString } from "../../basic"; | ||
import { CoinTransfer } from "../funding"; | ||
export declare const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
export declare const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
export declare type SimpleLinkedTransferAppState = { | ||
@@ -5,0 +6,0 @@ coinTransfers: CoinTransfer[]; |
import { tidy } from "../../utils"; | ||
import { singleAssetTwoPartyCoinTransferEncoding } from "../misc"; | ||
export const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
export const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
export const SimpleLinkedTransferAppStateEncoding = tidy(`tuple( | ||
@@ -5,0 +6,0 @@ ${singleAssetTwoPartyCoinTransferEncoding} coinTransfers, |
@@ -1,2 +0,2 @@ | ||
import { DepositAppState, HashLockTransferAppAction, HashLockTransferAppState, SimpleLinkedTransferAppAction, SimpleLinkedTransferAppState, SimpleSignedTransferAppAction, SimpleSignedTransferAppState, SimpleSwapAppState, WithdrawAppState, WithdrawAppAction, WithdrawAppName, HashLockTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName, DepositAppName, SimpleTwoPartySwapAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, GraphSignedTransferAppAction, GraphSignedTransferAppState, GraphBatchedTransferAppAction, GraphBatchedTransferAppState } from "./apps"; | ||
import { DepositAppState, HashLockTransferAppAction, HashLockTransferAppState, SimpleLinkedTransferAppAction, SimpleLinkedTransferAppState, SimpleSignedTransferAppAction, SimpleSignedTransferAppState, SimpleSwapAppState, WithdrawAppState, WithdrawAppAction, WithdrawAppName, HashLockTransferAppName, SimpleLinkedTransferAppName, OnlineLinkedTransferAppName, SimpleSignedTransferAppName, DepositAppName, SimpleTwoPartySwapAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, GraphSignedTransferAppAction, GraphSignedTransferAppState, GraphBatchedTransferAppAction, GraphBatchedTransferAppState } from "./apps"; | ||
import { CoinTransfer } from "./funding"; | ||
@@ -19,2 +19,3 @@ export * from "./adjudicator"; | ||
readonly SimpleLinkedTransferApp: "SimpleLinkedTransferApp"; | ||
readonly OnlineLinkedTransferApp: "OnlineLinkedTransferApp"; | ||
readonly SimpleSignedTransferApp: "SimpleSignedTransferApp"; | ||
@@ -32,2 +33,3 @@ readonly SimpleTwoPartySwapApp: "SimpleTwoPartySwapApp"; | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppAction; | ||
[OnlineLinkedTransferAppName]: SimpleLinkedTransferAppAction; | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppAction; | ||
@@ -43,5 +45,7 @@ [SimpleTwoPartySwapAppName]: {}; | ||
[DepositAppName]: DepositAppState; | ||
[HashLockTransferAppName]: HashLockTransferAppState; | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppState; | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppState; | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppState; | ||
[HashLockTransferAppName]: HashLockTransferAppState; | ||
[OnlineLinkedTransferAppName]: SimpleLinkedTransferAppState; | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppState; | ||
@@ -51,3 +55,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppState; | ||
[WithdrawAppName]: WithdrawAppState; | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppState; | ||
} | ||
@@ -60,4 +63,7 @@ export declare type AppStates = { | ||
export declare const SupportedApplicationNames: { | ||
DepositApp: "DepositApp"; | ||
GraphBatchedTransferApp: "GraphBatchedTransferApp"; | ||
GraphSignedTransferApp: "GraphSignedTransferApp"; | ||
HashLockTransferApp: "HashLockTransferApp"; | ||
OnlineLinkedTransferApp: "OnlineLinkedTransferApp"; | ||
SimpleLinkedTransferApp: "SimpleLinkedTransferApp"; | ||
@@ -67,7 +73,6 @@ SimpleSignedTransferApp: "SimpleSignedTransferApp"; | ||
WithdrawApp: "WithdrawApp"; | ||
HashLockTransferApp: "HashLockTransferApp"; | ||
DepositApp: "DepositApp"; | ||
}; | ||
export declare type SupportedApplicationNames = typeof SupportedApplicationNames[keyof typeof SupportedApplicationNames]; | ||
export declare const PureActionApps: string[]; | ||
export declare const RequireOnlineApps: string[]; | ||
export declare type AddressBookEntry = { | ||
@@ -74,0 +79,0 @@ address: string; |
@@ -1,2 +0,2 @@ | ||
import { WithdrawAppName, HashLockTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName, DepositAppName, SimpleTwoPartySwapAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, } from "./apps"; | ||
import { WithdrawAppName, HashLockTransferAppName, SimpleLinkedTransferAppName, OnlineLinkedTransferAppName, SimpleSignedTransferAppName, DepositAppName, SimpleTwoPartySwapAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, } from "./apps"; | ||
import { enumify } from "../utils"; | ||
@@ -14,2 +14,3 @@ export * from "./adjudicator"; | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
@@ -21,4 +22,7 @@ [SimpleTwoPartySwapAppName]: SimpleTwoPartySwapAppName, | ||
export const SupportedApplicationNames = enumify({ | ||
[DepositAppName]: DepositAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
@@ -28,4 +32,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[WithdrawAppName]: WithdrawAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[DepositAppName]: DepositAppName, | ||
}); | ||
@@ -35,6 +37,13 @@ export const PureActionApps = [ | ||
GraphSignedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleTwoPartySwapAppName, | ||
]; | ||
export const RequireOnlineApps = [ | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
]; | ||
//# sourceMappingURL=index.js.map |
@@ -58,3 +58,3 @@ import { providers, BigNumberish } from "ethers"; | ||
declare type LinkedTransferParameters = { | ||
conditionType: typeof ConditionalTransferTypes.LinkedTransfer; | ||
conditionType: typeof ConditionalTransferTypes.LinkedTransfer | typeof ConditionalTransferTypes.OnlineTransfer; | ||
amount: BigNumberish; | ||
@@ -61,0 +61,0 @@ assetId?: Address; |
import { Address, BigNumber, Bytes32, SignatureString } from "./basic"; | ||
import { HashLockTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName, SupportedApplicationNames, GenericConditionalTransferAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName } from "./contracts"; | ||
export declare type TransferType = "RequireOnline" | "AllowOffline"; | ||
export declare const getTransferTypeFromAppName: (name: SupportedApplicationNames) => TransferType | undefined; | ||
import { GenericConditionalTransferAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, HashLockTransferAppName, OnlineLinkedTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName } from "./contracts"; | ||
export declare const ConditionalTransferTypes: { | ||
GraphBatchedTransfer: "GraphBatchedTransferApp"; | ||
GraphTransfer: "GraphSignedTransferApp"; | ||
HashLockTransfer: "HashLockTransferApp"; | ||
LinkedTransfer: "SimpleLinkedTransferApp"; | ||
OnlineTransfer: "OnlineLinkedTransferApp"; | ||
SignedTransfer: "SimpleSignedTransferApp"; | ||
GraphBatchedTransfer: "GraphBatchedTransferApp"; | ||
GraphTransfer: "GraphSignedTransferApp"; | ||
}; | ||
export declare type ConditionalTransferTypes = typeof ConditionalTransferTypes[keyof typeof ConditionalTransferTypes]; | ||
export declare const ConditionalTransferAppNames: { | ||
GenericConditionalTransferApp: "GenericConditionalTransferApp"; | ||
GraphBatchedTransferApp: "GraphBatchedTransferApp"; | ||
GraphSignedTransferApp: "GraphSignedTransferApp"; | ||
HashLockTransferApp: "HashLockTransferApp"; | ||
OnlineLinkedTransferApp: "OnlineLinkedTransferApp"; | ||
SimpleLinkedTransferApp: "SimpleLinkedTransferApp"; | ||
SimpleSignedTransferApp: "SimpleSignedTransferApp"; | ||
GraphBatchedTransferApp: "GraphBatchedTransferApp"; | ||
GraphSignedTransferApp: "GraphSignedTransferApp"; | ||
GenericConditionalTransferApp: "GenericConditionalTransferApp"; | ||
}; | ||
export declare type ConditionalTransferAppNames = typeof ConditionalTransferAppNames[keyof typeof ConditionalTransferAppNames]; | ||
export interface CreatedConditionalTransferMetaMap { | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: CreatedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: CreatedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.HashLockTransfer]: CreatedHashLockTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.OnlineTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.SignedTransfer]: CreatedSignedTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: CreatedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: CreatedGraphBatchedTransferMeta; | ||
} | ||
@@ -33,7 +34,8 @@ export declare type CreatedConditionalTransferMeta = { | ||
export interface UnlockedConditionalTransferMetaMap { | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: UnlockedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: UnlockedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.HashLockTransfer]: UnlockedHashLockTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.OnlineTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.SignedTransfer]: UnlockedSignedTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: UnlockedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: UnlockedGraphSignedTransferMeta; | ||
} | ||
@@ -40,0 +42,0 @@ export declare type UnlockedConditionalTransferMeta = { |
import { enumify } from "./utils"; | ||
import { HashLockTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName, SupportedApplicationNames, GenericConditionalTransferAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, } from "./contracts"; | ||
const RequireOnlineAppNames = [ | ||
SupportedApplicationNames.GraphSignedTransferApp, | ||
SupportedApplicationNames.GraphBatchedTransferApp, | ||
SupportedApplicationNames.HashLockTransferApp, | ||
]; | ||
const AllowOfflineAppNames = [ | ||
SupportedApplicationNames.SimpleSignedTransferApp, | ||
SupportedApplicationNames.SimpleLinkedTransferApp, | ||
]; | ||
export const getTransferTypeFromAppName = (name) => { | ||
if (RequireOnlineAppNames.includes(name)) { | ||
return "RequireOnline"; | ||
} | ||
if (AllowOfflineAppNames.includes(name)) { | ||
return "AllowOffline"; | ||
} | ||
return undefined; | ||
}; | ||
import { GenericConditionalTransferAppName, GraphBatchedTransferAppName, GraphSignedTransferAppName, HashLockTransferAppName, OnlineLinkedTransferAppName, SimpleLinkedTransferAppName, SimpleSignedTransferAppName, } from "./contracts"; | ||
export const ConditionalTransferTypes = enumify({ | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
HashLockTransfer: HashLockTransferAppName, | ||
LinkedTransfer: SimpleLinkedTransferAppName, | ||
OnlineTransfer: OnlineLinkedTransferAppName, | ||
SignedTransfer: SimpleSignedTransferAppName, | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
}); | ||
export const ConditionalTransferAppNames = enumify({ | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
}); | ||
@@ -36,0 +20,0 @@ export const TransferStatuses = { |
{ | ||
"name": "@connext/types", | ||
"version": "7.1.2", | ||
"version": "7.2.0", | ||
"description": "TypeScript typings for common Connext types", | ||
@@ -19,5 +19,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"ethers": "5.0.7", | ||
"ethers": "5.0.8", | ||
"eventemitter3": "4.0.4", | ||
"evt": "1.8.3", | ||
"evt": "1.8.4", | ||
"sequelize": "6.3.4" | ||
@@ -24,0 +24,0 @@ }, |
@@ -8,2 +8,3 @@ import { HexString } from "../../basic"; | ||
export const SimpleLinkedTransferAppName = "SimpleLinkedTransferApp"; | ||
export const OnlineLinkedTransferAppName = "OnlineLinkedTransferApp"; | ||
@@ -10,0 +11,0 @@ //////////////////////////////////////// |
@@ -15,2 +15,3 @@ import { | ||
SimpleLinkedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
@@ -48,2 +49,3 @@ DepositAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
@@ -62,2 +64,3 @@ [SimpleTwoPartySwapAppName]: SimpleTwoPartySwapAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppAction; | ||
[OnlineLinkedTransferAppName]: SimpleLinkedTransferAppAction; | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppAction; | ||
@@ -74,5 +77,7 @@ [SimpleTwoPartySwapAppName]: {}; // no action | ||
[DepositAppName]: DepositAppState; | ||
[HashLockTransferAppName]: HashLockTransferAppState; | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppState; | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppState; | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppState; | ||
[HashLockTransferAppName]: HashLockTransferAppState; | ||
[OnlineLinkedTransferAppName]: SimpleLinkedTransferAppState; | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppState; | ||
@@ -82,3 +87,2 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppState; | ||
[WithdrawAppName]: WithdrawAppState; | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppState; | ||
} | ||
@@ -109,4 +113,7 @@ export type AppStates = { | ||
export const SupportedApplicationNames = enumify({ | ||
[DepositAppName]: DepositAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
@@ -116,7 +123,7 @@ [SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[WithdrawAppName]: WithdrawAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[DepositAppName]: DepositAppName, | ||
}); | ||
export type SupportedApplicationNames = typeof SupportedApplicationNames[keyof typeof SupportedApplicationNames]; | ||
export type SupportedApplicationNames = typeof SupportedApplicationNames[ | ||
keyof typeof SupportedApplicationNames | ||
]; | ||
@@ -129,7 +136,17 @@ // These apps have actions which do not depend on contract storage & have zero side-effects | ||
GraphSignedTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleTwoPartySwapAppName, | ||
]; | ||
// These apps will malfunction if the recipient is not online during the time of transfer creation | ||
// Others (eg linked transfer app) can optionally require the recipient be online but not necessary | ||
export const RequireOnlineApps = [ | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
]; | ||
export type AddressBookEntry = { | ||
@@ -136,0 +153,0 @@ address: string; |
@@ -22,2 +22,3 @@ import { Ctx } from "evt"; | ||
type LinkedTransfer = typeof ConditionalTransferTypes.LinkedTransfer; | ||
type OnlineTransfer = typeof ConditionalTransferTypes.OnlineTransfer; | ||
@@ -220,9 +221,12 @@ //////////////////////////////////////// | ||
[CONDITIONAL_TRANSFER_CREATED_EVENT]: ConditionalTransferCreatedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
[CONDITIONAL_TRANSFER_UNLOCKED_EVENT]: ConditionalTransferUnlockedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
[CONDITIONAL_TRANSFER_FAILED_EVENT]: ConditionalTransferFailedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
@@ -345,9 +349,12 @@ [CREATE_CHANNEL_EVENT]: CreateMultisigEventData; | ||
export type ConditionalTransferCreated<T> = ConditionalTransferCreatedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
export type ConditionalTransferUnlocked<T> = ConditionalTransferUnlockedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
export type ConditionalTransferFailed<T> = ConditionalTransferFailedEventData< | ||
HashLockTransfer | LinkedTransfer | SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
HashLockTransfer | LinkedTransfer | | ||
SignedTransfer | GraphTransfer | GraphBatchedTransfer | ||
>; | ||
@@ -354,0 +361,0 @@ export type DepositStarted = DepositStartedEventData; |
@@ -83,3 +83,5 @@ import { providers, BigNumberish } from "ethers"; | ||
type LinkedTransferParameters = { | ||
conditionType: typeof ConditionalTransferTypes.LinkedTransfer; | ||
conditionType: | ||
typeof ConditionalTransferTypes.LinkedTransfer | | ||
typeof ConditionalTransferTypes.OnlineTransfer | ||
amount: BigNumberish; | ||
@@ -100,3 +102,3 @@ assetId?: Address; | ||
type ResolveLinkedTransferParameters = { | ||
conditionType: typeof ConditionalTransferTypes.LinkedTransfer; | ||
conditionType: typeof ConditionalTransferTypes.LinkedTransfer | ||
paymentId: Bytes32; | ||
@@ -103,0 +105,0 @@ preImage: Bytes32; |
import { Address, BigNumber, Bytes32, SignatureString } from "./basic"; | ||
import { enumify } from "./utils"; | ||
import { | ||
GenericConditionalTransferAppName, | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
HashLockTransferAppName, | ||
OnlineLinkedTransferAppName, | ||
SimpleLinkedTransferAppName, | ||
SimpleSignedTransferAppName, | ||
SupportedApplicationNames, | ||
GenericConditionalTransferAppName, | ||
GraphBatchedTransferAppName, | ||
GraphSignedTransferAppName, | ||
} from "./contracts"; | ||
@@ -16,44 +16,26 @@ | ||
const RequireOnlineAppNames: SupportedApplicationNames[] = [ | ||
SupportedApplicationNames.GraphSignedTransferApp, | ||
SupportedApplicationNames.GraphBatchedTransferApp, | ||
SupportedApplicationNames.HashLockTransferApp, | ||
]; | ||
const AllowOfflineAppNames: SupportedApplicationNames[] = [ | ||
SupportedApplicationNames.SimpleSignedTransferApp, | ||
SupportedApplicationNames.SimpleLinkedTransferApp, | ||
]; | ||
export type TransferType = "RequireOnline" | "AllowOffline"; | ||
export const getTransferTypeFromAppName = ( | ||
name: SupportedApplicationNames, | ||
): TransferType | undefined => { | ||
if (RequireOnlineAppNames.includes(name)) { | ||
return "RequireOnline"; | ||
} | ||
if (AllowOfflineAppNames.includes(name)) { | ||
return "AllowOffline"; | ||
} | ||
return undefined; | ||
}; | ||
export const ConditionalTransferTypes = enumify({ | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
HashLockTransfer: HashLockTransferAppName, | ||
LinkedTransfer: SimpleLinkedTransferAppName, | ||
OnlineTransfer: OnlineLinkedTransferAppName, | ||
SignedTransfer: SimpleSignedTransferAppName, | ||
GraphBatchedTransfer: GraphBatchedTransferAppName, | ||
GraphTransfer: GraphSignedTransferAppName, | ||
}); | ||
export type ConditionalTransferTypes = typeof ConditionalTransferTypes[keyof typeof ConditionalTransferTypes]; | ||
export type ConditionalTransferTypes = typeof ConditionalTransferTypes[ | ||
keyof typeof ConditionalTransferTypes | ||
]; | ||
export const ConditionalTransferAppNames = enumify({ | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[HashLockTransferAppName]: HashLockTransferAppName, | ||
[OnlineLinkedTransferAppName]: OnlineLinkedTransferAppName, | ||
[SimpleLinkedTransferAppName]: SimpleLinkedTransferAppName, | ||
[SimpleSignedTransferAppName]: SimpleSignedTransferAppName, | ||
[GraphBatchedTransferAppName]: GraphBatchedTransferAppName, | ||
[GraphSignedTransferAppName]: GraphSignedTransferAppName, | ||
[GenericConditionalTransferAppName]: GenericConditionalTransferAppName, | ||
}); | ||
export type ConditionalTransferAppNames = typeof ConditionalTransferAppNames[keyof typeof ConditionalTransferAppNames]; | ||
export type ConditionalTransferAppNames = typeof ConditionalTransferAppNames[ | ||
keyof typeof ConditionalTransferAppNames | ||
]; | ||
@@ -64,7 +46,8 @@ //////////////////////////////////////// | ||
export interface CreatedConditionalTransferMetaMap { | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: CreatedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: CreatedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.HashLockTransfer]: CreatedHashLockTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.OnlineTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.SignedTransfer]: CreatedSignedTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: CreatedLinkedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: CreatedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: CreatedGraphBatchedTransferMeta; | ||
} | ||
@@ -76,7 +59,8 @@ export type CreatedConditionalTransferMeta = { | ||
export interface UnlockedConditionalTransferMetaMap { | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: UnlockedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: UnlockedGraphSignedTransferMeta; | ||
[ConditionalTransferTypes.HashLockTransfer]: UnlockedHashLockTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.OnlineTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.SignedTransfer]: UnlockedSignedTransferMeta; | ||
[ConditionalTransferTypes.LinkedTransfer]: UnlockedLinkedTransferMeta; | ||
[ConditionalTransferTypes.GraphBatchedTransfer]: UnlockedGraphBatchedTransferMeta; | ||
[ConditionalTransferTypes.GraphTransfer]: UnlockedGraphSignedTransferMeta; | ||
} | ||
@@ -159,3 +143,5 @@ export type UnlockedConditionalTransferMeta = { | ||
} as const; | ||
export type TransferWithExpiryStatus = typeof TransferWithExpiryStatuses[keyof typeof TransferWithExpiryStatuses]; | ||
export type TransferWithExpiryStatus = typeof TransferWithExpiryStatuses[ | ||
keyof typeof TransferWithExpiryStatuses | ||
]; | ||
export type TransferStatus = typeof TransferStatuses[keyof Omit< | ||
@@ -162,0 +148,0 @@ typeof TransferStatuses, |
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
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
857706
7328
+ Addedethers@5.0.8(transitive)
+ Addedevt@1.8.4(transitive)
- Removedethers@5.0.7(transitive)
- Removedevt@1.8.3(transitive)
Updatedethers@5.0.8
Updatedevt@1.8.4