mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Retire legalContractReference (#1188)
* Add LegalProseReference annotation * Migrate code from autogenerated javascript to TypeScript source * Add instructions to rebuild the web resources * Make installWeb more reproducible
This commit is contained in:
parent
d22cdac2dd
commit
2829faa01f
@ -296,8 +296,8 @@ interface MoveCommand : CommandData {
|
||||
* Contract code the moved state(s) are for the attention of, for example to indicate that the states are moved in
|
||||
* order to settle an obligation contract's state object(s).
|
||||
*/
|
||||
// TODO: Replace SecureHash here with a general contract constraints object
|
||||
val contractHash: SecureHash?
|
||||
// TODO: Replace Class here with a general contract constraints object
|
||||
val contract: Class<out Contract>?
|
||||
}
|
||||
|
||||
/** Indicates that this transaction replaces the inputs contract state to another contract state */
|
||||
@ -333,15 +333,14 @@ interface Contract {
|
||||
*/
|
||||
@Throws(IllegalArgumentException::class)
|
||||
fun verify(tx: LedgerTransaction)
|
||||
|
||||
/**
|
||||
* Unparsed reference to the natural language contract that this code is supposed to express (usually a hash of
|
||||
* the contract's contents).
|
||||
*/
|
||||
val legalContractReference: SecureHash
|
||||
}
|
||||
// DOCEND 5
|
||||
|
||||
/** The annotated [Contract] implements the legal prose identified by the given URI. */
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@MustBeDocumented
|
||||
annotation class LegalProseReference(val uri: String)
|
||||
|
||||
/**
|
||||
* Interface which can upgrade state objects issued by a contract to a new state object issued by a different contract.
|
||||
*
|
||||
@ -427,7 +426,7 @@ fun JarInputStream.extractFile(path: String, outputTo: OutputStream) {
|
||||
* A privacy salt is required to compute nonces per transaction component in order to ensure that an adversary cannot
|
||||
* use brute force techniques and reveal the content of a Merkle-leaf hashed value.
|
||||
* Because this salt serves the role of the seed to compute nonces, its size and entropy should be equal to the
|
||||
* underlying hash function used for Merkle tree generation, currently [SHA256], which has an output of 32 bytes.
|
||||
* underlying hash function used for Merkle tree generation, currently [SecureHash.SHA256], which has an output of 32 bytes.
|
||||
* There are two constructors, one that generates a new 32-bytes random salt, and another that takes a [ByteArray] input.
|
||||
* The latter is required in cases where the salt value needs to be pre-generated (agreed between transacting parties),
|
||||
* but it is highlighted that one should always ensure it has sufficient entropy.
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.core.contracts
|
||||
|
||||
import net.corda.contracts.asset.Cash
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
import net.corda.finance.DOLLARS
|
||||
@ -29,7 +28,6 @@ class TransactionEncumbranceTests {
|
||||
val timeLock = DummyTimeLock.State(FIVE_PM)
|
||||
|
||||
class DummyTimeLock : Contract {
|
||||
override val legalContractReference = SecureHash.sha256("DummyTimeLock")
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
val timeLockInput = tx.inputsOfType<State>().singleOrNull() ?: return
|
||||
val time = tx.timeWindow?.untilTime ?: throw IllegalArgumentException("Transactions containing time-locks must have a time-window")
|
||||
|
@ -3,7 +3,6 @@ package net.corda.core.flows
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.contracts.asset.Cash
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.messaging.CordaRPCOps
|
||||
@ -212,9 +211,6 @@ class ContractUpgradeFlowTest {
|
||||
override fun upgrade(state: Cash.State) = CashV2.State(state.amount.times(1000), listOf(state.owner))
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {}
|
||||
|
||||
// Dummy Cash contract for testing.
|
||||
override val legalContractReference = SecureHash.sha256("")
|
||||
}
|
||||
|
||||
@StartableByRPC
|
||||
|
@ -17,8 +17,6 @@ class VaultUpdateTests {
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
}
|
||||
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("")
|
||||
}
|
||||
|
||||
private class DummyState : ContractState {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.core.serialization
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
@ -20,8 +19,6 @@ val TEST_PROGRAM_ID = TransactionSerializationTests.TestCash()
|
||||
|
||||
class TransactionSerializationTests : TestDependencyInjectionBase() {
|
||||
class TestCash : Contract {
|
||||
override val legalContractReference = SecureHash.sha256("TestCash")
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
}
|
||||
|
||||
|
@ -22,9 +22,7 @@ The ``Contract`` interface is defined as follows:
|
||||
|
||||
Where:
|
||||
|
||||
* ``verify(tx: LedgerTransaction)`` determines whether transactions involving states which reference this
|
||||
contract type are valid
|
||||
* ``legalContractReference`` is the hash of the legal prose contract that ``verify`` seeks to express in code
|
||||
* ``verify(tx: LedgerTransaction)`` determines whether transactions involving states which reference this contract type are valid
|
||||
|
||||
verify()
|
||||
--------
|
||||
@ -187,8 +185,6 @@ execution of ``verify()``:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("X contract hash")
|
||||
}
|
||||
|
||||
.. sourcecode:: java
|
||||
@ -209,9 +205,6 @@ execution of ``verify()``:
|
||||
// Transfer verification logic.
|
||||
}
|
||||
}
|
||||
|
||||
private final SecureHash legalContractReference = SecureHash.sha256("X contract hash");
|
||||
@Override public final SecureHash getLegalContractReference() { return legalContractReference; }
|
||||
}
|
||||
|
||||
Grouping states
|
||||
@ -297,13 +290,5 @@ We can now verify these groups individually:
|
||||
Legal prose
|
||||
-----------
|
||||
|
||||
Current, ``legalContractReference`` is simply the SHA-256 hash of a contract:
|
||||
|
||||
.. container:: codeset
|
||||
|
||||
.. literalinclude:: ../../finance/src/main/kotlin/net/corda/contracts/asset/Cash.kt
|
||||
:language: kotlin
|
||||
:start-after: DOCSTART 2
|
||||
:end-before: DOCEND 2
|
||||
|
||||
In the future, a contract's legal prose will be included as an attachment instead.
|
||||
Currently, a ``Contract`` subtype may refer to the legal prose it implements via a ``LegalProseReference`` annotation.
|
||||
In the future, a contract's legal prose will be included as an attachment.
|
||||
|
@ -2,7 +2,6 @@ package net.corda.docs
|
||||
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.TransactionSignature
|
||||
import net.corda.core.crypto.containsAny
|
||||
import net.corda.core.flows.FinalityFlow
|
||||
@ -11,8 +10,6 @@ import net.corda.core.flows.InitiatedBy
|
||||
import net.corda.core.flows.InitiatingFlow
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.node.services.Vault
|
||||
import net.corda.core.node.services.queryBy
|
||||
import net.corda.core.node.services.vault.QueryCriteria.VaultQueryCriteria
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
@ -35,7 +32,7 @@ enum class WorkflowState {
|
||||
* Minimal contract to encode a simple workflow with one initial state and two possible eventual states.
|
||||
* It is assumed one party unilaterally submits and the other manually retrieves the deal and completes it.
|
||||
*/
|
||||
data class TradeApprovalContract(override val legalContractReference: SecureHash = SecureHash.sha256("Example of workflow type transaction")) : Contract {
|
||||
data class TradeApprovalContract(private val blank: Void? = null) : Contract {
|
||||
|
||||
interface Commands : CommandData {
|
||||
class Issue : TypeOnlyCommandData(), Commands // Record receipt of deal details
|
||||
|
@ -37,17 +37,11 @@ Just as every Corda state must implement the ``ContractState`` interface, every
|
||||
// Implements the contract constraints in code.
|
||||
@Throws(IllegalArgumentException::class)
|
||||
fun verify(tx: LedgerTransaction)
|
||||
|
||||
// Expresses the contract constraints as legal prose.
|
||||
val legalContractReference: SecureHash
|
||||
}
|
||||
|
||||
You can read about function declarations in Kotlin `here <https://kotlinlang.org/docs/reference/functions.html>`_.
|
||||
|
||||
We can see that ``Contract`` expresses its constraints in two ways:
|
||||
|
||||
* In legal prose, through a hash referencing a legal contract that expresses the contract's constraints in legal prose
|
||||
* In code, through a ``verify`` function that takes a transaction as input, and:
|
||||
We can see that ``Contract`` expresses its constraints through a ``verify`` function that takes a transaction as input, and:
|
||||
|
||||
* Throws an ``IllegalArgumentException`` if it rejects the transaction proposal
|
||||
* Returns silently if it accepts the transaction proposal
|
||||
@ -113,9 +107,6 @@ Let's write a contract that enforces these constraints. We'll do this by modifyi
|
||||
"The signer must be the lender." using (command.signers.contains(out.lender.owningKey))
|
||||
}
|
||||
}
|
||||
|
||||
// The legal contract reference - we'll leave this as a dummy hash for now.
|
||||
override val legalContractReference = SecureHash.zeroHash
|
||||
}
|
||||
|
||||
.. code-block:: java
|
||||
@ -160,10 +151,6 @@ Let's write a contract that enforces these constraints. We'll do this by modifyi
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
// The legal contract reference - we'll leave this as a dummy hash for now.
|
||||
private final SecureHash legalContractReference = SecureHash.Companion.getZeroHash();
|
||||
@Override public final SecureHash getLegalContractReference() { return legalContractReference; }
|
||||
}
|
||||
|
||||
If you're following along in Java, you'll also need to rename ``TemplateContract.java`` to ``IOUContract.java``.
|
||||
|
@ -152,8 +152,7 @@ The vaults of Node A and Node B should both display the following output:
|
||||
value: 99
|
||||
lender: "CN=NodeA,O=NodeA,L=London,C=GB"
|
||||
borrower: "CN=NodeB,O=NodeB,L=New York,C=US"
|
||||
contract:
|
||||
legalContractReference: "559322B95BCF7913E3113962DC3F3CBD71C818C66977721580C045DC41C813A5"
|
||||
contract: {}
|
||||
participants:
|
||||
- "CN=NodeA,O=NodeA,L=London,C=GB"
|
||||
- "CN=NodeB,O=NodeB,L=New York,C=US"
|
||||
|
@ -66,8 +66,6 @@ We start by defining the ``CommercialPaper`` class. As in the previous tutorial,
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
class CommercialPaper : Contract {
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper")
|
||||
|
||||
override fun verify(tx: LedgerTransaction) = verifyClause(tx, Clauses.Group(), tx.commands.select<Commands>())
|
||||
|
||||
interface Commands : CommandData {
|
||||
@ -79,11 +77,6 @@ We start by defining the ``CommercialPaper`` class. As in the previous tutorial,
|
||||
.. sourcecode:: java
|
||||
|
||||
public class CommercialPaper implements Contract {
|
||||
@Override
|
||||
public SecureHash getLegalContractReference() {
|
||||
return SecureHash.Companion.sha256("https://en.wikipedia.org/wiki/Commercial_paper");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(@NotNull LedgerTransaction tx) throws IllegalArgumentException {
|
||||
ClauseVerifier.verifyClause(tx, new Clauses.Group(), extractCommands(tx));
|
||||
|
@ -59,8 +59,6 @@ Kotlin syntax works.
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
class CommercialPaper : Contract {
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper");
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
TODO()
|
||||
}
|
||||
@ -69,22 +67,16 @@ Kotlin syntax works.
|
||||
.. sourcecode:: java
|
||||
|
||||
public class CommercialPaper implements Contract {
|
||||
@Override
|
||||
public SecureHash getLegalContractReference() {
|
||||
return SecureHash.Companion.sha256("https://en.wikipedia.org/wiki/Commercial_paper");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(LedgerTransaction tx) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
Every contract must have at least a ``getLegalContractReference()`` and a ``verify()`` method. In Kotlin we express
|
||||
a getter without a setter as an immutable property (val). The *legal contract reference* is supposed to be a hash
|
||||
of a document that describes the legal contract and may take precedence over the code, in case of a dispute.
|
||||
Every contract must have at least a ``verify()`` method.
|
||||
|
||||
.. note:: The way legal contract prose is bound to a smart contract implementation will change in future.
|
||||
.. note:: In the future there will be a way to bind legal contract prose to a smart contract implementation,
|
||||
that may take precedence over the code in case of a dispute.
|
||||
|
||||
The verify method returns nothing. This is intentional: the function either completes correctly, or throws an exception,
|
||||
in which case the transaction is rejected.
|
||||
|
@ -450,8 +450,7 @@ We can see a list of the states in our node's vault using ``run vaultAndUpdates`
|
||||
linearId:
|
||||
externalId: null
|
||||
id: "84628565-2688-45ef-bb06-aae70fcf3be7"
|
||||
contract:
|
||||
legalContractReference: "4DDE2A47C361106CBAEC06CC40FE418A994822A3C8054851FEECD51207BFAF82"
|
||||
contract: {}
|
||||
participants:
|
||||
- "CN=NodeB,O=NodeB,L=New York,C=US"
|
||||
- "CN=NodeA,O=NodeA,L=London,C=UK"
|
||||
@ -485,8 +484,7 @@ abbreviated the output below):
|
||||
linearId:
|
||||
externalId: null
|
||||
id: "84628565-2688-45ef-bb06-aae70fcf3be7"
|
||||
contract:
|
||||
legalContractReference: "4DDE2A47C361106CBAEC06CC40FE418A994822A3C8054851FEECD51207BFAF82"
|
||||
contract: {}
|
||||
participants:
|
||||
- "CN=NodeB,O=NodeB,L=New York,C=US"
|
||||
- "CN=NodeA,O=NodeA,L=London,C=UK"
|
||||
|
@ -3,7 +3,6 @@ package net.corda.contracts.universal
|
||||
import net.corda.contracts.BusinessCalendar
|
||||
import net.corda.contracts.FixOf
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
@ -316,9 +315,6 @@ class UniversalContract : Contract {
|
||||
else -> throw NotImplementedError("replaceFixing - " + arr.javaClass.name)
|
||||
}
|
||||
|
||||
override val legalContractReference: SecureHash
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
fun generateIssue(tx: TransactionBuilder, arrangement: Arrangement, at: PartyAndReference, notary: Party) {
|
||||
check(tx.inputStates().isEmpty())
|
||||
tx.addOutputState(State(listOf(notary), arrangement))
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.contracts.isolated
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
@ -25,9 +24,6 @@ class AnotherDummyContract : Contract, DummyContractBackdoor {
|
||||
// Always accepts.
|
||||
}
|
||||
|
||||
// The "empty contract"
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://anotherdummy.org")
|
||||
|
||||
override fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder {
|
||||
val state = State(magicNumber)
|
||||
return TransactionBuilder(notary).withItems(state, Command(Commands.Create(), owner.party.owningKey))
|
||||
|
@ -3,10 +3,9 @@ package net.corda.contracts;
|
||||
import co.paralleluniverse.fibers.Suspendable;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import kotlin.*;
|
||||
import net.corda.contracts.asset.*;
|
||||
import kotlin.Unit;
|
||||
import net.corda.contracts.asset.Cash;
|
||||
import net.corda.core.contracts.*;
|
||||
import net.corda.core.crypto.SecureHash;
|
||||
import net.corda.core.crypto.testing.NullPublicKey;
|
||||
import net.corda.core.identity.AbstractParty;
|
||||
import net.corda.core.identity.AnonymousParty;
|
||||
@ -236,13 +235,6 @@ public class JavaCommercialPaper implements Contract {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SecureHash getLegalContractReference() {
|
||||
// TODO: Should return hash of the contract's contents, not its URI
|
||||
return SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper");
|
||||
}
|
||||
|
||||
public TransactionBuilder generateIssue(@NotNull PartyAndReference issuance, @NotNull Amount<Issued<Currency>> faceValue, @Nullable Instant maturityDate, @NotNull Party notary, Integer encumbrance) {
|
||||
State state = new State(issuance, issuance.getParty(), faceValue, maturityDate);
|
||||
TransactionState output = new TransactionState<>(state, notary, encumbrance);
|
||||
|
@ -3,7 +3,6 @@ package net.corda.contracts
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.contracts.asset.Cash
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.testing.NULL_PARTY
|
||||
import net.corda.core.crypto.toBase58String
|
||||
import net.corda.core.identity.AbstractParty
|
||||
@ -45,9 +44,6 @@ val CP_PROGRAM_ID = CommercialPaper()
|
||||
|
||||
// TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance.
|
||||
class CommercialPaper : Contract {
|
||||
// TODO: should reference the content of the legal agreement, not its URI
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://en.wikipedia.org/wiki/Commercial_paper")
|
||||
|
||||
data class State(
|
||||
val issuance: PartyAndReference,
|
||||
override val owner: AbstractParty,
|
||||
|
@ -11,7 +11,6 @@ import net.corda.core.crypto.testing.NULL_PARTY
|
||||
import net.corda.core.crypto.toBase58String
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.identity.PartyAndCertificate
|
||||
import net.corda.core.internal.Emoji
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.node.services.StatesNotAvailableException
|
||||
@ -60,20 +59,6 @@ val CASH_PROGRAM_ID = Cash()
|
||||
* vaults can ignore the issuer/depositRefs and just examine the amount fields.
|
||||
*/
|
||||
class Cash : OnLedgerAsset<Currency, Cash.Commands, Cash.State>() {
|
||||
/**
|
||||
* TODO:
|
||||
* 1) hash should be of the contents, not the URI
|
||||
* 2) allow the content to be specified at time of instance creation?
|
||||
*
|
||||
* Motivation: it's the difference between a state object referencing a programRef, which references a
|
||||
* legalContractReference and a state object which directly references both. The latter allows the legal wording
|
||||
* to evolve without requiring code changes. But creates a risk that users create objects governed by a program
|
||||
* that is inconsistent with the legal contract.
|
||||
*/
|
||||
// DOCSTART 2
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://www.big-book-of-banking-law.gov/cash-claims.html")
|
||||
|
||||
// DOCEND 2
|
||||
override fun extractCommands(commands: Collection<AuthenticatedObject<CommandData>>): List<AuthenticatedObject<Cash.Commands>>
|
||||
= commands.select<Cash.Commands>()
|
||||
|
||||
@ -129,11 +114,11 @@ class Cash : OnLedgerAsset<Currency, Cash.Commands, Cash.State>() {
|
||||
/**
|
||||
* A command stating that money has been moved, optionally to fulfil another contract.
|
||||
*
|
||||
* @param contractHash the contract this move is for the attention of. Only that contract's verify function
|
||||
* @param contract the contract this move is for the attention of. Only that contract's verify function
|
||||
* should take the moved states into account when considering whether it is valid. Typically this will be
|
||||
* null.
|
||||
*/
|
||||
data class Move(override val contractHash: SecureHash? = null) : FungibleAsset.Commands.Move, Commands
|
||||
data class Move(override val contract: Class<out Contract>? = null) : FungibleAsset.Commands.Move, Commands
|
||||
|
||||
/**
|
||||
* Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
|
@ -2,13 +2,13 @@ package net.corda.contracts.asset
|
||||
|
||||
import net.corda.contracts.Commodity
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.newSecureRandom
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
import java.security.PublicKey
|
||||
import net.corda.finance.utils.sumCommodities
|
||||
import net.corda.finance.utils.sumCommoditiesOrNull
|
||||
import net.corda.finance.utils.sumCommoditiesOrZero
|
||||
@ -34,18 +34,6 @@ val COMMODITY_PROGRAM_ID = CommodityContract()
|
||||
*/
|
||||
// TODO: Need to think about expiry of commodities, how to require payment of storage costs, etc.
|
||||
class CommodityContract : OnLedgerAsset<Commodity, CommodityContract.Commands, CommodityContract.State>() {
|
||||
/**
|
||||
* TODO:
|
||||
* 1) hash should be of the contents, not the URI
|
||||
* 2) allow the content to be specified at time of instance creation?
|
||||
*
|
||||
* Motivation: it's the difference between a state object referencing a programRef, which references a
|
||||
* legalContractReference and a state object which directly references both. The latter allows the legal wording
|
||||
* to evolve without requiring code changes. But creates a risk that users create objects governed by a program
|
||||
* that is inconsistent with the legal contract
|
||||
*/
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://www.big-book-of-banking-law.gov/commodity-claims.html")
|
||||
|
||||
/** A state representing a commodity claim against some party */
|
||||
data class State(
|
||||
override val amount: Amount<Issued<Commodity>>,
|
||||
@ -57,7 +45,7 @@ class CommodityContract : OnLedgerAsset<Commodity, CommodityContract.Commands, C
|
||||
: this(Amount(amount.quantity, Issued(deposit, amount.token)), owner)
|
||||
|
||||
override val contract = COMMODITY_PROGRAM_ID
|
||||
override val exitKeys = Collections.singleton(owner.owningKey)
|
||||
override val exitKeys: Set<PublicKey> = Collections.singleton(owner.owningKey)
|
||||
override val participants = listOf(owner)
|
||||
|
||||
override fun move(newAmount: Amount<Issued<Commodity>>, newOwner: AbstractParty): FungibleAsset<Commodity>
|
||||
@ -74,11 +62,11 @@ class CommodityContract : OnLedgerAsset<Commodity, CommodityContract.Commands, C
|
||||
/**
|
||||
* A command stating that money has been moved, optionally to fulfil another contract.
|
||||
*
|
||||
* @param contractHash the contract this move is for the attention of. Only that contract's verify function
|
||||
* @param contract the contract this move is for the attention of. Only that contract's verify function
|
||||
* should take the moved states into account when considering whether it is valid. Typically this will be
|
||||
* null.
|
||||
*/
|
||||
data class Move(override val contractHash: SecureHash? = null) : FungibleAsset.Commands.Move, Commands
|
||||
data class Move(override val contract: Class<out Contract>? = null) : FungibleAsset.Commands.Move, Commands
|
||||
|
||||
/**
|
||||
* Allows new commodity states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
|
@ -75,18 +75,6 @@ val OBLIGATION_PROGRAM_ID = Obligation<Currency>()
|
||||
* @param P the product the obligation is for payment of.
|
||||
*/
|
||||
class Obligation<P : Any> : Contract {
|
||||
/**
|
||||
* TODO:
|
||||
* 1) hash should be of the contents, not the URI
|
||||
* 2) allow the content to be specified at time of instance creation?
|
||||
*
|
||||
* Motivation: it's the difference between a state object referencing a programRef, which references a
|
||||
* legalContractReference and a state object which directly references both. The latter allows the legal wording
|
||||
* to evolve without requiring code changes. But creates a risk that users create objects governed by a program
|
||||
* that is inconsistent with the legal contract.
|
||||
*/
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://www.big-book-of-banking-law.example.gov/cash-settlement.html")
|
||||
|
||||
/**
|
||||
* Represents where in its lifecycle a contract state is, which in turn controls the commands that can be applied
|
||||
* to the state. Most states will not leave the [NORMAL] lifecycle. Note that settled (as an end lifecycle) is
|
||||
@ -200,11 +188,11 @@ class Obligation<P : Any> : Contract {
|
||||
/**
|
||||
* A command stating that a debt has been moved, optionally to fulfil another contract.
|
||||
*
|
||||
* @param contractHash the contract this move is for the attention of. Only that contract's verify function
|
||||
* @param contract the contract this move is for the attention of. Only that contract's verify function
|
||||
* should take the moved states into account when considering whether it is valid. Typically this will be
|
||||
* null.
|
||||
*/
|
||||
data class Move(override val contractHash: SecureHash? = null) : Commands, FungibleAsset.Commands.Move
|
||||
data class Move(override val contract: Class<out Contract>? = null) : Commands, FungibleAsset.Commands.Move
|
||||
|
||||
/**
|
||||
* Allows new obligation states to be issued into existence: the nonce ("number used once") ensures the
|
||||
@ -352,15 +340,15 @@ class Obligation<P : Any> : Contract {
|
||||
//
|
||||
// That would pass this check. Ensuring they do not is best addressed in the transaction generation stage.
|
||||
val assetStates = tx.outputsOfType<FungibleAsset<*>>()
|
||||
val acceptableAssetStates = assetStates
|
||||
// TODO: This filter is nonsense, because it just checks there is an asset contract loaded, we need to
|
||||
// verify the asset contract is the asset contract we expect.
|
||||
// Something like:
|
||||
// attachments.mustHaveOneOf(key.acceptableAssetContract)
|
||||
.filter { it.contract.legalContractReference in template.acceptableContracts }
|
||||
// Restrict the states to those of the correct issuance definition (this normally
|
||||
// covers issued product and obligor, but is opaque to us)
|
||||
.filter { it.amount.token in template.acceptableIssuedProducts }
|
||||
val acceptableContract = tx.attachments.any { it.id in template.acceptableContracts }
|
||||
requireThat {
|
||||
"an acceptable contract is attached" using acceptableContract
|
||||
}
|
||||
val acceptableAssetStates = assetStates.filter {
|
||||
// Restrict the states to those of the correct issuance definition (this normally
|
||||
// covers issued product and obligor, but is opaque to us)
|
||||
it.amount.token in template.acceptableIssuedProducts
|
||||
}
|
||||
// Catch that there's nothing useful here, so we can dump out a useful error
|
||||
requireThat {
|
||||
"there are fungible asset state outputs" using (assetStates.isNotEmpty())
|
||||
@ -387,8 +375,8 @@ class Obligation<P : Any> : Contract {
|
||||
requireThat {
|
||||
// Insist that we can be the only contract consuming inputs, to ensure no other contract can think it's being
|
||||
// settled as well
|
||||
"all move commands relate to this contract" using (moveCommands.map { it.value.contractHash }
|
||||
.all { it == null || it == Obligation<P>().legalContractReference })
|
||||
"all move commands relate to this contract" using (moveCommands.map { it.value.contract }
|
||||
.all { it == null || it == this@Obligation.javaClass })
|
||||
// Settle commands exclude all other commands, so we don't need to check for contracts moving at the same
|
||||
// time.
|
||||
"amounts paid must match recipients to settle" using inputs.map { it.owner }.containsAll(amountReceivedByOwner.keys)
|
||||
@ -486,7 +474,7 @@ class Obligation<P : Any> : Contract {
|
||||
* Generate a transaction performing close-out netting of two or more states.
|
||||
*
|
||||
* @param signer the party which will sign the transaction. Must be one of the obligor or beneficiary.
|
||||
* @param states two or more states, which must be compatible for bilateral netting (same issuance definitions,
|
||||
* @param inputs two or more states, which must be compatible for bilateral netting (same issuance definitions,
|
||||
* and same parties involved).
|
||||
*/
|
||||
fun generateCloseOutNetting(tx: TransactionBuilder,
|
||||
@ -542,11 +530,12 @@ class Obligation<P : Any> : Contract {
|
||||
*/
|
||||
fun generateCashIssue(tx: TransactionBuilder,
|
||||
obligor: AbstractParty,
|
||||
acceptableContract: SecureHash,
|
||||
amount: Amount<Issued<Currency>>,
|
||||
dueBefore: Instant,
|
||||
beneficiary: AbstractParty,
|
||||
notary: Party) {
|
||||
val issuanceDef = Terms(NonEmptySet.of(Cash().legalContractReference), NonEmptySet.of(amount.token), dueBefore)
|
||||
val issuanceDef = Terms(NonEmptySet.of(acceptableContract), NonEmptySet.of(amount.token), dueBefore)
|
||||
OnLedgerAsset.generateIssue(tx, TransactionState(State(Lifecycle.NORMAL, obligor, issuanceDef, amount.quantity, beneficiary), notary), Commands.Issue())
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.contracts.asset
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.newSecureRandom
|
||||
import net.corda.core.crypto.toBase58String
|
||||
import net.corda.core.identity.AbstractParty
|
||||
@ -22,8 +21,6 @@ import java.security.PublicKey
|
||||
import java.util.*
|
||||
|
||||
class DummyFungibleContract : OnLedgerAsset<Currency, DummyFungibleContract.Commands, DummyFungibleContract.State>() {
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("https://www.big-book-of-banking-law.gov/cash-claims.html")
|
||||
|
||||
override fun extractCommands(commands: Collection<AuthenticatedObject<CommandData>>): List<AuthenticatedObject<DummyFungibleContract.Commands>>
|
||||
= commands.select<DummyFungibleContract.Commands>()
|
||||
|
||||
@ -82,7 +79,7 @@ class DummyFungibleContract : OnLedgerAsset<Currency, DummyFungibleContract.Comm
|
||||
|
||||
interface Commands : FungibleAsset.Commands {
|
||||
|
||||
data class Move(override val contractHash: SecureHash? = null) : FungibleAsset.Commands.Move, Commands
|
||||
data class Move(override val contract: Class<out Contract>? = null) : FungibleAsset.Commands.Move, Commands
|
||||
|
||||
data class Issue(override val nonce: Long = newSecureRandom().nextLong()) : FungibleAsset.Commands.Issue, Commands
|
||||
|
||||
|
@ -5,6 +5,7 @@ import net.corda.contracts.NetType
|
||||
import net.corda.contracts.asset.Obligation.Lifecycle
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.sha256
|
||||
import net.corda.core.crypto.testing.NULL_PARTY
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.AnonymousParty
|
||||
@ -28,26 +29,26 @@ import kotlin.test.assertNotEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class ObligationTests {
|
||||
val defaultRef = OpaqueBytes.of(1)
|
||||
val defaultIssuer = MEGA_CORP.ref(defaultRef)
|
||||
val oneMillionDollars = 1000000.DOLLARS `issued by` defaultIssuer
|
||||
val trustedCashContract = NonEmptySet.of(SecureHash.randomSHA256() as SecureHash)
|
||||
val megaIssuedDollars = NonEmptySet.of(Issued(defaultIssuer, USD))
|
||||
val megaIssuedPounds = NonEmptySet.of(Issued(defaultIssuer, GBP))
|
||||
val fivePm: Instant = TEST_TX_TIME.truncatedTo(ChronoUnit.DAYS) + 17.hours
|
||||
val sixPm: Instant = fivePm + 1.hours
|
||||
val megaCorpDollarSettlement = Obligation.Terms(trustedCashContract, megaIssuedDollars, fivePm)
|
||||
val megaCorpPoundSettlement = megaCorpDollarSettlement.copy(acceptableIssuedProducts = megaIssuedPounds)
|
||||
val inState = Obligation.State(
|
||||
private val defaultRef = OpaqueBytes.of(1)
|
||||
private val defaultIssuer = MEGA_CORP.ref(defaultRef)
|
||||
private val oneMillionDollars = 1000000.DOLLARS `issued by` defaultIssuer
|
||||
private val trustedCashContract = NonEmptySet.of(SecureHash.randomSHA256() as SecureHash)
|
||||
private val megaIssuedDollars = NonEmptySet.of(Issued(defaultIssuer, USD))
|
||||
private val megaIssuedPounds = NonEmptySet.of(Issued(defaultIssuer, GBP))
|
||||
private val fivePm: Instant = TEST_TX_TIME.truncatedTo(ChronoUnit.DAYS) + 17.hours
|
||||
private val sixPm: Instant = fivePm + 1.hours
|
||||
private val megaCorpDollarSettlement = Obligation.Terms(trustedCashContract, megaIssuedDollars, fivePm)
|
||||
private val megaCorpPoundSettlement = megaCorpDollarSettlement.copy(acceptableIssuedProducts = megaIssuedPounds)
|
||||
private val inState = Obligation.State(
|
||||
lifecycle = Lifecycle.NORMAL,
|
||||
obligor = MEGA_CORP,
|
||||
template = megaCorpDollarSettlement,
|
||||
quantity = 1000.DOLLARS.quantity,
|
||||
beneficiary = CHARLIE
|
||||
)
|
||||
val outState = inState.copy(beneficiary = AnonymousParty(BOB_PUBKEY))
|
||||
val miniCorpServices = MockServices(MINI_CORP_KEY)
|
||||
val notaryServices = MockServices(DUMMY_NOTARY_KEY)
|
||||
private val outState = inState.copy(beneficiary = AnonymousParty(BOB_PUBKEY))
|
||||
private val miniCorpServices = MockServices(MINI_CORP_KEY)
|
||||
private val notaryServices = MockServices(DUMMY_NOTARY_KEY)
|
||||
|
||||
private fun cashObligationTestRoots(
|
||||
group: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>
|
||||
@ -294,7 +295,7 @@ class ObligationTests {
|
||||
// Generate a transaction issuing the obligation.
|
||||
var tx = TransactionBuilder(null).apply {
|
||||
val amount = Amount(100, Issued(defaultIssuer, USD))
|
||||
Obligation<Currency>().generateCashIssue(this, ALICE, amount, dueBefore,
|
||||
Obligation<Currency>().generateCashIssue(this, ALICE, cashContractBytes.sha256(), amount, dueBefore,
|
||||
beneficiary = MINI_CORP, notary = DUMMY_NOTARY)
|
||||
}
|
||||
var stx = miniCorpServices.signInitialTransaction(tx)
|
||||
@ -312,7 +313,7 @@ class ObligationTests {
|
||||
stx.verifyRequiredSignatures()
|
||||
|
||||
// And set it back
|
||||
stateAndRef = stx.tx.outRef<Obligation.State<Currency>>(0)
|
||||
stateAndRef = stx.tx.outRef(0)
|
||||
tx = TransactionBuilder(DUMMY_NOTARY).apply {
|
||||
Obligation<Currency>().generateSetLifecycle(this, listOf(stateAndRef), Lifecycle.NORMAL, DUMMY_NOTARY)
|
||||
}
|
||||
@ -469,7 +470,8 @@ class ObligationTests {
|
||||
input("Alice's $1,000,000")
|
||||
output("Bob's $1,000,000") { 1000000.DOLLARS.CASH `issued by` defaultIssuer `owned by` BOB }
|
||||
command(ALICE_PUBKEY) { Obligation.Commands.Settle(Amount(oneMillionDollars.quantity, inState.amount.token)) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation<Currency>().legalContractReference) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation::class.java) }
|
||||
attachment(attachment(cashContractBytes.inputStream()))
|
||||
this.verifies()
|
||||
}
|
||||
}
|
||||
@ -483,7 +485,8 @@ class ObligationTests {
|
||||
output("Alice's $500,000 obligation to Bob") { halfAMillionDollars.OBLIGATION between Pair(ALICE, BOB) }
|
||||
output("Bob's $500,000") { 500000.DOLLARS.CASH `issued by` defaultIssuer `owned by` BOB }
|
||||
command(ALICE_PUBKEY) { Obligation.Commands.Settle(Amount(oneMillionDollars.quantity / 2, inState.amount.token)) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation<Currency>().legalContractReference) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation::class.java) }
|
||||
attachment(attachment(cashContractBytes.inputStream()))
|
||||
this.verifies()
|
||||
}
|
||||
}
|
||||
@ -496,7 +499,7 @@ class ObligationTests {
|
||||
input(1000000.DOLLARS.CASH `issued by` defaultIssuer `owned by` ALICE)
|
||||
output("Bob's $1,000,000") { 1000000.DOLLARS.CASH `issued by` defaultIssuer `owned by` BOB }
|
||||
command(ALICE_PUBKEY) { Obligation.Commands.Settle(Amount(oneMillionDollars.quantity, inState.amount.token)) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation<Currency>().legalContractReference) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation::class.java) }
|
||||
this `fails with` "all inputs are in the normal state"
|
||||
}
|
||||
}
|
||||
@ -509,7 +512,8 @@ class ObligationTests {
|
||||
input("Alice's $1,000,000")
|
||||
output("Bob's $1,000,000") { 1000000.DOLLARS.CASH `issued by` defaultIssuer `owned by` BOB }
|
||||
command(ALICE_PUBKEY) { Obligation.Commands.Settle(Amount(oneMillionDollars.quantity / 2, inState.amount.token)) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation<Currency>().legalContractReference) }
|
||||
command(ALICE_PUBKEY) { Cash.Commands.Move(Obligation::class.java) }
|
||||
attachment(attachment(cashContractBytes.inputStream()))
|
||||
this `fails with` "amount in settle command"
|
||||
}
|
||||
}
|
||||
@ -517,9 +521,10 @@ class ObligationTests {
|
||||
|
||||
@Test
|
||||
fun `commodity settlement`() {
|
||||
val commodityContractBytes = "https://www.big-book-of-banking-law.gov/commodity-claims.html".toByteArray()
|
||||
val defaultFcoj = Issued(defaultIssuer, Commodity.getInstance("FCOJ")!!)
|
||||
val oneUnitFcoj = Amount(1, defaultFcoj)
|
||||
val obligationDef = Obligation.Terms(NonEmptySet.of(CommodityContract().legalContractReference), NonEmptySet.of(defaultFcoj), TEST_TX_TIME)
|
||||
val obligationDef = Obligation.Terms(NonEmptySet.of(commodityContractBytes.sha256() as SecureHash), NonEmptySet.of(defaultFcoj), TEST_TX_TIME)
|
||||
val oneUnitFcojObligation = Obligation.State(Obligation.Lifecycle.NORMAL, ALICE,
|
||||
obligationDef, oneUnitFcoj.quantity, NULL_PARTY)
|
||||
// Try settling a simple commodity obligation
|
||||
@ -533,7 +538,8 @@ class ObligationTests {
|
||||
input("Alice's 1 FCOJ")
|
||||
output("Bob's 1 FCOJ") { CommodityContract.State(oneUnitFcoj, BOB) }
|
||||
command(ALICE_PUBKEY) { Obligation.Commands.Settle(Amount(oneUnitFcoj.quantity, oneUnitFcojObligation.amount.token)) }
|
||||
command(ALICE_PUBKEY) { CommodityContract.Commands.Move(Obligation<Commodity>().legalContractReference) }
|
||||
command(ALICE_PUBKEY) { CommodityContract.Commands.Move(Obligation::class.java) }
|
||||
attachment(attachment(commodityContractBytes.inputStream()))
|
||||
verifies()
|
||||
}
|
||||
}
|
||||
@ -904,8 +910,9 @@ class ObligationTests {
|
||||
assertEquals(expected, actual)
|
||||
}
|
||||
|
||||
val Issued<Currency>.OBLIGATION_DEF: Obligation.Terms<Currency>
|
||||
get() = Obligation.Terms(NonEmptySet.of(Cash().legalContractReference), NonEmptySet.of(this), TEST_TX_TIME)
|
||||
val Amount<Issued<Currency>>.OBLIGATION: Obligation.State<Currency>
|
||||
private val cashContractBytes = "https://www.big-book-of-banking-law.gov/cash-claims.html".toByteArray()
|
||||
private val Issued<Currency>.OBLIGATION_DEF: Obligation.Terms<Currency>
|
||||
get() = Obligation.Terms(NonEmptySet.of(cashContractBytes.sha256() as SecureHash), NonEmptySet.of(this), TEST_TX_TIME)
|
||||
private val Amount<Issued<Currency>>.OBLIGATION: Obligation.State<Currency>
|
||||
get() = Obligation.State(Obligation.Lifecycle.NORMAL, DUMMY_OBLIGATION_ISSUER, token.OBLIGATION_DEF, quantity, NULL_PARTY)
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.internal.declaredField
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.node.services.AttachmentStorage
|
||||
import net.corda.core.serialization.*
|
||||
@ -66,9 +67,6 @@ class AttachmentClassLoaderTests : TestDependencyInjectionBase() {
|
||||
// Always accepts.
|
||||
}
|
||||
|
||||
// The "empty contract"
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("")
|
||||
|
||||
fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder {
|
||||
val state = State(magicNumber)
|
||||
return TransactionBuilder(notary).withItems(state, Command(Commands.Create(), owner.party.owningKey))
|
||||
@ -99,7 +97,7 @@ class AttachmentClassLoaderTests : TestDependencyInjectionBase() {
|
||||
val contractClass = Class.forName("net.corda.contracts.isolated.AnotherDummyContract", true, child)
|
||||
val contract = contractClass.newInstance() as Contract
|
||||
|
||||
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.legalContractReference)
|
||||
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.declaredField<Any?>("legalContractReference").value)
|
||||
}
|
||||
|
||||
fun fakeAttachment(filepath: String, content: String): ByteArray {
|
||||
@ -190,7 +188,7 @@ class AttachmentClassLoaderTests : TestDependencyInjectionBase() {
|
||||
val contractClass = Class.forName("net.corda.contracts.isolated.AnotherDummyContract", true, cl)
|
||||
val contract = contractClass.newInstance() as Contract
|
||||
assertEquals(cl, contract.javaClass.classLoader)
|
||||
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.legalContractReference)
|
||||
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.declaredField<Any?>("legalContractReference").value)
|
||||
}
|
||||
|
||||
|
||||
|
@ -516,8 +516,6 @@ class SerializationOutputTests {
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
|
||||
}
|
||||
|
||||
override val legalContractReference: SecureHash = SecureHash.Companion.sha256("FooContractLegal")
|
||||
}
|
||||
|
||||
class FooState : ContractState {
|
||||
|
@ -80,8 +80,6 @@ class VaultSchemaTest : TestDependencyInjectionBase() {
|
||||
}
|
||||
|
||||
private class VaultNoopContract : Contract {
|
||||
override val legalContractReference = SecureHash.sha256("")
|
||||
|
||||
data class VaultNoopState(override val owner: AbstractParty) : OwnableState {
|
||||
override val contract = VaultNoopContract()
|
||||
override val participants: List<AbstractParty>
|
||||
|
@ -177,9 +177,6 @@ private fun printHelp(parser: OptionParser) {
|
||||
}
|
||||
|
||||
class AttachmentContract : Contract {
|
||||
override val legalContractReference: SecureHash
|
||||
get() = SecureHash.zeroHash // TODO not implemented
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
val state = tx.outputsOfType<AttachmentContract.State>().single()
|
||||
val attachment = tx.attachments.single()
|
||||
|
@ -3,7 +3,6 @@ package net.corda.irs.contract
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|
||||
import net.corda.contracts.*
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.containsAny
|
||||
import net.corda.core.flows.FlowLogicRefFactory
|
||||
import net.corda.core.identity.AbstractParty
|
||||
@ -193,8 +192,6 @@ class FloatingRatePaymentEvent(date: LocalDate,
|
||||
* This is just a representation of a vanilla Fixed vs Floating (same currency) IRS in the R3 prototype model.
|
||||
*/
|
||||
class InterestRateSwap : Contract {
|
||||
override val legalContractReference = SecureHash.sha256("is_this_the_text_of_the_contract ? TBD")
|
||||
|
||||
/**
|
||||
* This Common area contains all the information that is not leg specific.
|
||||
*/
|
||||
|
@ -1,9 +1,10 @@
|
||||
package net.corda.notarydemo.flows
|
||||
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.core.contracts.Contract
|
||||
import net.corda.core.contracts.ContractState
|
||||
import net.corda.contracts.asset.Cash
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.sha256
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.StartableByRPC
|
||||
import net.corda.core.identity.AbstractParty
|
||||
@ -16,7 +17,6 @@ import net.corda.finance.GBP
|
||||
@StartableByRPC
|
||||
class DummyIssueAndMove(private val notary: Party, private val counterpartyNode: Party, private val discriminator: Int) : FlowLogic<SignedTransaction>() {
|
||||
object DoNothingContract : Contract {
|
||||
override val legalContractReference = byteArrayOf().sha256()
|
||||
override fun verify(tx: LedgerTransaction) {}
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,7 @@ This demo was built in partnership with OpenGamma and used their SIMM library. H
|
||||
| Could not find net.corda.(...):(...):0.6-SNAPSHOT | The corda libraries have not been installed into your local maven directory. View the instructions for doing this in the core corda repository |
|
||||
| Execution failed for task ':simm-valuation-demo:buildWeb' : A problem occurred starting process 'command 'ng'' | You need to have `node packet manager` installed in order to build out some of the web resources. This is not a necessary step as we include pre-built web resources but if you do modify the web source, you will need to rebuild this area |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Rebuild the web resources
|
||||
|
||||
* Get Node.js v6.11.2 which at time of writing is the LTS release
|
||||
* ../../gradlew installWeb
|
||||
|
@ -1,3 +1,5 @@
|
||||
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||
|
||||
buildscript {
|
||||
ext.strata_version = '1.1.2'
|
||||
}
|
||||
@ -117,13 +119,18 @@ task buildWeb(type: Exec, dependsOn: [cleanWeb, npmInstall]) {
|
||||
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
|
||||
commandLine 'cmd', '/c', 'ng', 'build'
|
||||
} else {
|
||||
commandLine 'ng', 'build'
|
||||
commandLine 'node_modules/angular-cli/bin/ng', 'build'
|
||||
}
|
||||
}
|
||||
|
||||
task installWeb(type: Copy, dependsOn: [buildWeb]) {
|
||||
from 'src/main/web/dist'
|
||||
into 'src/main/resources/simmvaluationweb'
|
||||
['**/*.js', '**/*.js.map', '**/*.ts'].each {
|
||||
filesMatching(it) {
|
||||
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.LF, fixlast: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
@ -10,7 +10,6 @@ import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.crypto.toBase58String
|
||||
import net.corda.core.messaging.CordaRPCOps
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.vega.contracts.IRSState
|
||||
import net.corda.vega.contracts.PortfolioState
|
||||
import net.corda.vega.portfolio.Portfolio
|
||||
@ -169,7 +168,6 @@ class PortfolioApiUtils(private val ownParty: Party) {
|
||||
),
|
||||
common = mapOf(
|
||||
"valuationDate" to trade.product.startDate.unadjusted,
|
||||
"hashLegalDocs" to state.contract.legalContractReference.toString(),
|
||||
"interestRate" to mapOf(
|
||||
"name" to "TODO",
|
||||
"oracle" to "TODO",
|
||||
|
@ -1,14 +1,13 @@
|
||||
package net.corda.vega.contracts
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* Specifies the contract between two parties that trade an OpenGamma IRS. Currently can only agree to trade.
|
||||
*/
|
||||
data class OGTrade(override val legalContractReference: SecureHash = SecureHash.sha256("OGTRADE.KT")) : Contract {
|
||||
class OGTrade : Contract {
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
requireNotNull(tx.timeWindow) { "must have a time-window" }
|
||||
val groups: List<LedgerTransaction.InOutGroup<IRSState, UniqueIdentifier>> = tx.groupStates { state -> state.linearId }
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.vega.contracts
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
|
||||
/**
|
||||
@ -9,7 +8,7 @@ import net.corda.core.transactions.LedgerTransaction
|
||||
* Implements an agree clause to agree to the portfolio and an update clause to change either the portfolio or valuation
|
||||
* of the portfolio arbitrarily.
|
||||
*/
|
||||
data class PortfolioSwap(override val legalContractReference: SecureHash = SecureHash.sha256("swordfish")) : Contract {
|
||||
data class PortfolioSwap(private val blank: Void? = null) : Contract {
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
requireNotNull(tx.timeWindow) { "must have a time-window)" }
|
||||
val groups: List<LedgerTransaction.InOutGroup<PortfolioState, UniqueIdentifier>> = tx.groupStates { state -> state.linearId }
|
||||
|
File diff suppressed because one or more lines are too long
@ -25,8 +25,8 @@ var AppComponent = (function () {
|
||||
this.counterparty = this.httpWrapperService.setCounterparty(value.id);
|
||||
};
|
||||
AppComponent.prototype.renderX500Name = function (x500Name) {
|
||||
var name = x500Name
|
||||
x500Name.split(',').forEach(function(element) {
|
||||
var name = x500Name;
|
||||
x500Name.split(',').forEach(function (element) {
|
||||
var keyValue = element.split('=');
|
||||
if (keyValue[0].toUpperCase() == 'CN') {
|
||||
name = keyValue[1];
|
||||
@ -38,11 +38,11 @@ var AppComponent = (function () {
|
||||
var _this = this;
|
||||
this.httpWrapperService.getAbsolute("whoami").toPromise().then(function (data) {
|
||||
_this.whoAmI = _this.renderX500Name(data.self.text);
|
||||
_this.counterParties = data.counterparties.map(function(x) {
|
||||
return {
|
||||
_this.counterParties = data.counterparties.map(function (x) {
|
||||
return {
|
||||
id: x.id,
|
||||
text: _this.renderX500Name(x.text)
|
||||
};
|
||||
text: this.renderX500Name(x.text)
|
||||
};
|
||||
});
|
||||
if (_this.counterParties.length == 0) {
|
||||
console.log("/whoami is returning no counterparties, the whole app won't run", data);
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"app.component.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/app.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA6C,eAAe,CAAC,CAAA;AAC7D,uBAAkC,iBAAiB,CAAC,CAAA;AACpD,uBAA+C,iBAAiB,CAAC,CAAA;AACjE,2BAAkC,uBAAuB,CAAC,CAAA;AAE1D,qCAAmC,wBAAwB,CAAC,CAAA;AAgB5D;IAEE,sBAAoB,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;QAInD,mBAAc,GAAkB,EAAE,CAAC;QAQlC,iBAAY,GAAQ,IAAI,CAAC;IAZ4B,CAAC;IAMvD,+BAAQ,GAAf,UAAgB,KAAU,IAAS,CAAC;;IAE7B,mCAAY,GAAnB,UAAoB,KAAU;QAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IAID,+BAAQ,GAAR;QAAA,iBAUC;QATC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,UAAC,IAAI;YAClE,KAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC7B,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;YAC1C,EAAE,CAAC,CAAC,KAAI,CAAC,cAAc,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,iEAAiE,EAAE,IAAI,CAAC,CAAC;YACvF,CAAC;QACH,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;YACb,OAAO,CAAC,GAAG,CAAC,0EAA0E,EAAE,KAAK,CAAC,CAAC;QACjG,CAAC,CAAC,CAAC;IACL,CAAC;IAxCH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,oBAAoB;YACjC,SAAS,EAAE,CAAC,mBAAmB,EAAE,oDAAoD,CAAC;YACtF,UAAU,EAAE;gBACV,0BAAiB;gBACjB,gBAAO;gBACP,8BAAiB;aAClB;YACD,aAAa,EAAE,wBAAiB,CAAC,IAAI;YACrC,SAAS,EAAE,CAAC,yCAAkB,CAAC,CAAC,wDAAwD;SACzF,CAAC;;oBAAA;IA6BF,mBAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,oBAAY,eA2BxB,CAAA","sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\r\nimport { ROUTER_DIRECTIVES } from '@angular/router';\r\nimport { CORE_DIRECTIVES, NgClass, NgIf } from '@angular/common';\r\nimport { SELECT_DIRECTIVES } from 'ng2-select/ng2-select';\r\nimport * as moment from 'moment';\r\nimport { HttpWrapperService } from './http-wrapper.service';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'app-root',\r\n templateUrl: 'app.component.html',\r\n styleUrls: ['app.component.css', '../vendor/ng2-select/components/css/ng2-select.css'],\r\n directives: [\r\n ROUTER_DIRECTIVES,\r\n NgClass,\r\n SELECT_DIRECTIVES\r\n ],\r\n encapsulation: ViewEncapsulation.None, // allow external CSS\r\n providers: [HttpWrapperService] // don't declare in children, so that it's a \"singleton\"\r\n})\r\n\r\nexport class AppComponent {\r\n\r\n constructor(private httpWrapperService: HttpWrapperService) {}\r\n\r\n public whoAmI: string; // name\r\n public counterParty: string; // id\r\n public counterParties: Array < any > = [];\r\n\r\n public selected(value: any): void {};\r\n\r\n public refreshValue(value: any): void {\r\n this.counterparty = this.httpWrapperService.setCounterparty(value.id);\r\n }\r\n\r\n private counterparty: any = null;\r\n\r\n ngOnInit() {\r\n this.httpWrapperService.getAbsolute(\"whoami\").toPromise().then((data) => {\r\n this.whoAmI = data.self.text;\r\n this.counterParties = data.counterparties;\r\n if (this.counterParties.length == 0) {\r\n console.log(\"/whoami is returning no counterparties, the whole app won't run\", data);\r\n }\r\n }).catch((error) => {\r\n console.log(\"Error loading who am i (this is really bad, the whole app will not work)\", error);\r\n });\r\n }\r\n}\r\n"]}
|
||||
{"version":3,"file":"app.component.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/app.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA6C,eAAe,CAAC,CAAA;AAC7D,uBAAkC,iBAAiB,CAAC,CAAA;AACpD,uBAA+C,iBAAiB,CAAC,CAAA;AACjE,2BAAkC,uBAAuB,CAAC,CAAA;AAE1D,qCAAmC,wBAAwB,CAAC,CAAA;AAgB5D;IAEE,sBAAoB,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;QAInD,mBAAc,GAAkB,EAAE,CAAC;QAmBlC,iBAAY,GAAQ,IAAI,CAAC;IAvB4B,CAAC;IAMvD,+BAAQ,GAAf,UAAgB,KAAU,IAAS,CAAC;;IAE7B,mCAAY,GAAnB,UAAoB,KAAU;QAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IAEM,qCAAc,GAArB,UAAsB,QAAQ;QAC5B,IAAI,IAAI,GAAG,QAAQ,CAAC;QACpB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,OAAO;YACzC,IAAI,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;gBACpC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;QACL,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAID,+BAAQ,GAAR;QAAA,iBAeC;QAdC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,UAAC,IAAI;YAClE,KAAI,CAAC,MAAM,GAAG,KAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClD,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC;gBACrD,MAAM,CAAC;oBACH,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;iBACpC,CAAC;YACN,CAAC,CAAC,CAAC;YACH,EAAE,CAAC,CAAC,KAAI,CAAC,cAAc,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,iEAAiE,EAAE,IAAI,CAAC,CAAC;YACvF,CAAC;QACH,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;YACb,OAAO,CAAC,GAAG,CAAC,0EAA0E,EAAE,KAAK,CAAC,CAAC;QACjG,CAAC,CAAC,CAAC;IACL,CAAC;IAxDH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,oBAAoB;YACjC,SAAS,EAAE,CAAC,mBAAmB,EAAE,oDAAoD,CAAC;YACtF,UAAU,EAAE;gBACV,0BAAiB;gBACjB,gBAAO;gBACP,8BAAiB;aAClB;YACD,aAAa,EAAE,wBAAiB,CAAC,IAAI;YACrC,SAAS,EAAE,CAAC,yCAAkB,CAAC,CAAC,wDAAwD;SACzF,CAAC;;oBAAA;IA6CF,mBAAC;AAAD,CAAC,AA3CD,IA2CC;AA3CY,oBAAY,eA2CxB,CAAA","sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\nimport { ROUTER_DIRECTIVES } from '@angular/router';\nimport { CORE_DIRECTIVES, NgClass, NgIf } from '@angular/common';\nimport { SELECT_DIRECTIVES } from 'ng2-select/ng2-select';\nimport * as moment from 'moment';\nimport { HttpWrapperService } from './http-wrapper.service';\n\n@Component({\n moduleId: module.id,\n selector: 'app-root',\n templateUrl: 'app.component.html',\n styleUrls: ['app.component.css', '../vendor/ng2-select/components/css/ng2-select.css'],\n directives: [\n ROUTER_DIRECTIVES,\n NgClass,\n SELECT_DIRECTIVES\n ],\n encapsulation: ViewEncapsulation.None, // allow external CSS\n providers: [HttpWrapperService] // don't declare in children, so that it's a \"singleton\"\n})\n\nexport class AppComponent {\n\n constructor(private httpWrapperService: HttpWrapperService) {}\n\n public whoAmI: string; // name\n public counterParty: string; // id\n public counterParties: Array < any > = [];\n\n public selected(value: any): void {};\n\n public refreshValue(value: any): void {\n this.counterparty = this.httpWrapperService.setCounterparty(value.id);\n }\n\n public renderX500Name(x500Name) {\n var name = x500Name;\n x500Name.split(',').forEach(function (element) {\n var keyValue = element.split('=');\n if (keyValue[0].toUpperCase() == 'CN') {\n name = keyValue[1];\n }\n });\n return name;\n }\n\n private counterparty: any = null;\n\n ngOnInit() {\n this.httpWrapperService.getAbsolute(\"whoami\").toPromise().then((data) => {\n this.whoAmI = this.renderX500Name(data.self.text);\n this.counterParties = data.counterparties.map(function (x) {\n return {\n id: x.id,\n text: this.renderX500Name(x.text)\n };\n });\n if (this.counterParties.length == 0) {\n console.log(\"/whoami is returning no counterparties, the whole app won't run\", data);\n }\n }).catch((error) => {\n console.log(\"Error loading who am i (this is really bad, the whole app will not work)\", error);\n });\n }\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"app.component.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/app.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,8BAA6B,iBAAiB,CAAC,CAAA;AAE/C,QAAQ,CAAC,WAAW,EAAE;IACpB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,4BAAY,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EACxB,gBAAM,CAAC,CAAC,4BAAY,CAAC,EAAE,UAAC,GAAiB;QACvC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { AppComponent } from './app.component';\r\n\r\ndescribe('App: Vega', () => {\r\n beforeEach(() => {\r\n addProviders([AppComponent]);\r\n });\r\n\r\n it('should create the app',\r\n inject([AppComponent], (app: AppComponent) => {\r\n expect(app).toBeTruthy();\r\n }));\r\n});\r\n"]}
|
||||
{"version":3,"file":"app.component.spec.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/app.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,8BAA6B,iBAAiB,CAAC,CAAA;AAE/C,QAAQ,CAAC,WAAW,EAAE;IACpB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,4BAAY,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EACxB,gBAAM,CAAC,CAAC,4BAAY,CAAC,EAAE,UAAC,GAAiB;QACvC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { AppComponent } from './app.component';\n\ndescribe('App: Vega', () => {\n beforeEach(() => {\n addProviders([AppComponent]);\n });\n\n it('should create the app',\n inject([AppComponent], (app: AppComponent) => {\n expect(app).toBeTruthy();\n }));\n});\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"app.routes.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/app.routes.ts"],"names":[],"mappings":";AAAA,uBAA4C,iBAAiB,CAAC,CAAA;AAC9D,0BAAmC,aAAa,CAAC,CAAA;AACjD,2BAAoC,cAAc,CAAC,CAAA;AACnD,6BAAqC,gBAAgB,CAAC,CAAA;AACtD,2BAAmC,cAAc,CAAC,CAAA;AAElD,IAAM,MAAM,GAAiB;IAC3B,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;IACzD,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAkB,EAAE;IACpD,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,gCAAmB,EAAE;IACtD,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,mCAAoB,EAAE;IACzD,EAAE,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAE,+BAAkB,EAAE;CAG/D,CAAC;AAEW,0BAAkB,GAAG;IAChC,sBAAa,CAAC,MAAM,CAAC;CACtB,CAAC","sourcesContent":["import { provideRouter, RouterConfig } from '@angular/router';\r\nimport { PortfolioComponent } from './portfolio';\r\nimport { ValuationsComponent } from './valuations';\r\nimport { CreateTradeComponent } from './create-trade';\r\nimport { ViewTradeComponent } from './view-trade';\r\n\r\nconst routes: RouterConfig = [\r\n { path: '', redirectTo: '/portfolio', pathMatch: 'full' },\r\n { path: 'portfolio', component: PortfolioComponent },\r\n { path: 'valuations', component: ValuationsComponent },\r\n { path: 'create-trade', component: CreateTradeComponent },\r\n { path: 'view-trade/:tradeId', component: ViewTradeComponent }\r\n\r\n // { path: '**', component: PageNotFoundComponent }\r\n];\r\n\r\nexport const appRouterProviders = [\r\n provideRouter(routes)\r\n];\r\n"]}
|
||||
{"version":3,"file":"app.routes.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/app.routes.ts"],"names":[],"mappings":";AAAA,uBAA4C,iBAAiB,CAAC,CAAA;AAC9D,0BAAmC,aAAa,CAAC,CAAA;AACjD,2BAAoC,cAAc,CAAC,CAAA;AACnD,6BAAqC,gBAAgB,CAAC,CAAA;AACtD,2BAAmC,cAAc,CAAC,CAAA;AAElD,IAAM,MAAM,GAAiB;IAC3B,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;IACzD,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAkB,EAAE;IACpD,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,gCAAmB,EAAE;IACtD,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,mCAAoB,EAAE;IACzD,EAAE,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAE,+BAAkB,EAAE;CAG/D,CAAC;AAEW,0BAAkB,GAAG;IAChC,sBAAa,CAAC,MAAM,CAAC;CACtB,CAAC","sourcesContent":["import { provideRouter, RouterConfig } from '@angular/router';\nimport { PortfolioComponent } from './portfolio';\nimport { ValuationsComponent } from './valuations';\nimport { CreateTradeComponent } from './create-trade';\nimport { ViewTradeComponent } from './view-trade';\n\nconst routes: RouterConfig = [\n { path: '', redirectTo: '/portfolio', pathMatch: 'full' },\n { path: 'portfolio', component: PortfolioComponent },\n { path: 'valuations', component: ValuationsComponent },\n { path: 'create-trade', component: CreateTradeComponent },\n { path: 'view-trade/:tradeId', component: ViewTradeComponent }\n\n // { path: '**', component: PageNotFoundComponent }\n];\n\nexport const appRouterProviders = [\n provideRouter(routes)\n];\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"create-trade.component.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/create-trade/create-trade.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAClD,4BAA2B,gBAAgB,CAAC,CAAA;AAC5C,6BAA4B,iBAAiB,CAAC,CAAA;AAC9C,uBAAyB,iBAAiB,CAAC,CAAA;AAC3C,uBAAuB,iBAAiB,CAAC,CAAA;AACzC,qCAAmC,yBAAyB,CAAC,CAAA;AAE7D;IAAA;QACE,OAAE,GAAW,MAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC;QAI1D,eAAU,GAAW,uBAAuB,CAAC;QAG7C,YAAO,GAAW,KAAK,CAAC;QACxB,aAAQ,GAAW,SAAS,CAAC;QAC7B,cAAS,GAAW,OAAO,CAAC;IAC9B,CAAC;IAAD,iBAAC;AAAD,CAAC,AAXD,IAWC;AASD;IAKE,8BACU,UAAsB,EACtB,WAAwB,EACxB,QAAkB,EAClB,MAAc,EACd,kBAAsC;QAVlD,iBAiCC;QA3BW,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;QACxB,aAAQ,GAAR,QAAQ,CAAU;QAClB,WAAM,GAAN,MAAM,CAAQ;QACd,uBAAkB,GAAlB,kBAAkB,CAAoB;QAPhD,cAAS,GAAW,EAAE,CAAC;QAoBvB,eAAU,GAAG;YACX,IAAI,IAAI,GAAG,KAAI,CAAC;YAChB,KAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAI,CAAC,IAAI,CAAC;iBAC7D,SAAS,EAAE,CAAC,IAAI,CAAC;gBAChB,KAAI,CAAC,MAAM,CAAC,aAAa,CAAC,iBAAe,KAAI,CAAC,IAAI,CAAC,EAAI,CAAC,CAAC;YAC3D,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;gBACb,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAnBA,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,yBAAyB,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACxC,CAAC;IAED,uCAAQ,GAAR,cAAY,CAAC;IA5Bf;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;YACjE,SAAS,EAAE,CAAC,wBAAU,EAAE,0BAAW,EAAE,iBAAQ,CAAC;SAC/C,CAAC;;4BAAA;IAkCF,2BAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCY,4BAAoB,uBAiChC,CAAA","sourcesContent":["import { Component, OnInit } from '@angular/core';\r\nimport { IRSService } from '../irs.service';\r\nimport { NodeService } from '../node.service';\r\nimport { Location } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { HttpWrapperService } from '../http-wrapper.service';\r\n\r\nclass DealParams {\r\n id: string = `${100 + Math.floor((Math.random() * 900))}`;\r\n description: string;\r\n counterparty: string;\r\n tradeDate: string;\r\n convention: string = \"USD_FIXED_6M_LIBOR_3M\";\r\n startDate: string;\r\n endDate: string;\r\n buySell: string = \"BUY\";\r\n notional: string = \"1000000\";\r\n fixedRate: string = \"0.015\";\r\n}\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'app-create-trade',\r\n templateUrl: 'create-trade.component.html',\r\n styleUrls: ['../app.component.css', 'create-trade.component.css'],\r\n providers: [IRSService, NodeService, Location]\r\n})\r\nexport class CreateTradeComponent implements OnInit {\r\n dayCountBasisLookup: string[];\r\n deal: DealParams;\r\n formError: string = \"\";\r\n\r\n constructor(\r\n private irsService: IRSService,\r\n private nodeService: NodeService,\r\n private location: Location,\r\n private router: Router,\r\n private httpWrapperService: HttpWrapperService\r\n ) {\r\n this.dayCountBasisLookup = Object.keys(this.irsService.lookupTable);\r\n this.deal = new DealParams();\r\n this.deal.tradeDate = this.nodeService.formatDateForNode(new Date());\r\n this.deal.startDate = this.nodeService.formatDateForNode(new Date());\r\n this.deal.endDate = this.nodeService.formatDateForNode(new Date(2020, 1, 1));\r\n this.deal.convention = \"EUR_FIXED_1Y_EURIBOR_3M\";\r\n this.deal.description = \"description\";\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n createDeal = () => {\r\n var that = this;\r\n this.httpWrapperService.putWithCounterparty(\"trades\", this.deal)\r\n .toPromise().then(() => {\r\n this.router.navigateByUrl(`/view-trade/${this.deal.id}`);\r\n }).catch((error) => {\r\n that.formError = error;\r\n });\r\n };\r\n\r\n}\r\n"]}
|
||||
{"version":3,"file":"create-trade.component.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/create-trade/create-trade.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAClD,4BAA2B,gBAAgB,CAAC,CAAA;AAC5C,6BAA4B,iBAAiB,CAAC,CAAA;AAC9C,uBAAyB,iBAAiB,CAAC,CAAA;AAC3C,uBAAuB,iBAAiB,CAAC,CAAA;AACzC,qCAAmC,yBAAyB,CAAC,CAAA;AAE7D;IAAA;QACE,OAAE,GAAW,MAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC;QAI1D,eAAU,GAAW,uBAAuB,CAAC;QAG7C,YAAO,GAAW,KAAK,CAAC;QACxB,aAAQ,GAAW,SAAS,CAAC;QAC7B,cAAS,GAAW,OAAO,CAAC;IAC9B,CAAC;IAAD,iBAAC;AAAD,CAAC,AAXD,IAWC;AASD;IAKE,8BACU,UAAsB,EACtB,WAAwB,EACxB,QAAkB,EAClB,MAAc,EACd,kBAAsC;QAVlD,iBAiCC;QA3BW,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;QACxB,aAAQ,GAAR,QAAQ,CAAU;QAClB,WAAM,GAAN,MAAM,CAAQ;QACd,uBAAkB,GAAlB,kBAAkB,CAAoB;QAPhD,cAAS,GAAW,EAAE,CAAC;QAoBvB,eAAU,GAAG;YACX,IAAI,IAAI,GAAG,KAAI,CAAC;YAChB,KAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAI,CAAC,IAAI,CAAC;iBAC7D,SAAS,EAAE,CAAC,IAAI,CAAC;gBAChB,KAAI,CAAC,MAAM,CAAC,aAAa,CAAC,iBAAe,KAAI,CAAC,IAAI,CAAC,EAAI,CAAC,CAAC;YAC3D,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;gBACb,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAnBA,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,yBAAyB,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACxC,CAAC;IAED,uCAAQ,GAAR,cAAY,CAAC;IA5Bf;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;YACjE,SAAS,EAAE,CAAC,wBAAU,EAAE,0BAAW,EAAE,iBAAQ,CAAC;SAC/C,CAAC;;4BAAA;IAkCF,2BAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCY,4BAAoB,uBAiChC,CAAA","sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { IRSService } from '../irs.service';\nimport { NodeService } from '../node.service';\nimport { Location } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { HttpWrapperService } from '../http-wrapper.service';\n\nclass DealParams {\n id: string = `${100 + Math.floor((Math.random() * 900))}`;\n description: string;\n counterparty: string;\n tradeDate: string;\n convention: string = \"USD_FIXED_6M_LIBOR_3M\";\n startDate: string;\n endDate: string;\n buySell: string = \"BUY\";\n notional: string = \"1000000\";\n fixedRate: string = \"0.015\";\n}\n\n@Component({\n moduleId: module.id,\n selector: 'app-create-trade',\n templateUrl: 'create-trade.component.html',\n styleUrls: ['../app.component.css', 'create-trade.component.css'],\n providers: [IRSService, NodeService, Location]\n})\nexport class CreateTradeComponent implements OnInit {\n dayCountBasisLookup: string[];\n deal: DealParams;\n formError: string = \"\";\n\n constructor(\n private irsService: IRSService,\n private nodeService: NodeService,\n private location: Location,\n private router: Router,\n private httpWrapperService: HttpWrapperService\n ) {\n this.dayCountBasisLookup = Object.keys(this.irsService.lookupTable);\n this.deal = new DealParams();\n this.deal.tradeDate = this.nodeService.formatDateForNode(new Date());\n this.deal.startDate = this.nodeService.formatDateForNode(new Date());\n this.deal.endDate = this.nodeService.formatDateForNode(new Date(2020, 1, 1));\n this.deal.convention = \"EUR_FIXED_1Y_EURIBOR_3M\";\n this.deal.description = \"description\";\n }\n\n ngOnInit() {}\n\n createDeal = () => {\n var that = this;\n this.httpWrapperService.putWithCounterparty(\"trades\", this.deal)\n .toPromise().then(() => {\n this.router.navigateByUrl(`/view-trade/${this.deal.id}`);\n }).catch((error) => {\n that.formError = error;\n });\n };\n\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"create-trade.component.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/create-trade/create-trade.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,wBAAwB,EAAE;IACjC,EAAE,CAAC,2BAA2B,EAAE;QAC9B,6CAA6C;QAC7C,iCAAiC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { By } from '@angular/platform-browser';\r\nimport { DebugElement } from '@angular/core';\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { CreateTradeComponent } from './create-trade.component';\r\n\r\ndescribe('Component: CreateTrade', () => {\r\n it('should create an instance', () => {\r\n //let component = new CreateTradeComponent();\r\n //expect(component).toBeTruthy();\r\n });\r\n});\r\n"]}
|
||||
{"version":3,"file":"create-trade.component.spec.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/create-trade/create-trade.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,wBAAwB,EAAE;IACjC,EAAE,CAAC,2BAA2B,EAAE;QAC9B,6CAA6C;QAC7C,iCAAiC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { CreateTradeComponent } from './create-trade.component';\n\ndescribe('Component: CreateTrade', () => {\n it('should create an instance', () => {\n //let component = new CreateTradeComponent();\n //expect(component).toBeTruthy();\n });\n});\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/create-trade/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,0BAA0B,CAAC,EAAA","sourcesContent":["export * from './create-trade.component';\r\n"]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/create-trade/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,0BAA0B,CAAC,EAAA","sourcesContent":["export * from './create-trade.component';\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/create-trade/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/create-trade/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/environment.ts"],"names":[],"mappings":";AAAa,mBAAW,GAAG;IACzB,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,yBAAyB;CACnC,CAAC","sourcesContent":["export const environment = {\r\n production: false,\r\n APIPath: \"/api/simmvaluationdemo/\"\r\n};\r\n"]}
|
||||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/environment.ts"],"names":[],"mappings":";AAAa,mBAAW,GAAG;IACzB,UAAU,EAAE,KAAK;IACjB,OAAO,EAAE,yBAAyB;CACnC,CAAC","sourcesContent":["export const environment = {\n production: false,\n APIPath: \"/api/simmvaluationdemo/\"\n};\n"]}
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"http-wrapper.service.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/http-wrapper.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,qCAAmC,wBAAwB,CAAC,CAAA;AAE5D,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,yCAAkB,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,yCAAkB,CAAC,EACzB,UAAC,OAA2B;QAC1B,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { HttpWrapperService } from './http-wrapper.service';\r\n\r\ndescribe('Service: HttpWrapper', () => {\r\n beforeEach(() => {\r\n addProviders([HttpWrapperService]);\r\n });\r\n\r\n it('should ...',\r\n inject([HttpWrapperService],\r\n (service: HttpWrapperService) => {\r\n expect(service).toBeTruthy();\r\n }));\r\n});\r\n"]}
|
||||
{"version":3,"file":"http-wrapper.service.spec.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/http-wrapper.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,qCAAmC,wBAAwB,CAAC,CAAA;AAE5D,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,yCAAkB,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,yCAAkB,CAAC,EACzB,UAAC,OAA2B;QAC1B,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { HttpWrapperService } from './http-wrapper.service';\n\ndescribe('Service: HttpWrapper', () => {\n beforeEach(() => {\n addProviders([HttpWrapperService]);\n });\n\n it('should ...',\n inject([HttpWrapperService],\n (service: HttpWrapperService) => {\n expect(service).toBeTruthy();\n }));\n});\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,eAAe,CAAC,EAAA;AAC9B,iBAAc,iBAAiB,CAAC,EAAA","sourcesContent":["export * from './environment';\r\nexport * from './app.component';\r\n"]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,eAAe,CAAC,EAAA;AAC9B,iBAAc,iBAAiB,CAAC,EAAA","sourcesContent":["export * from './environment';\nexport * from './app.component';\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"irs.service.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/irs.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA2B,eAAe,CAAC,CAAA;AAE3C;IACE,uBAAmB,GAAW,EAAS,IAAY;QAAhC,QAAG,GAAH,GAAG,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;IACzD,oBAAC;AAAD,CAAC,AAFD,IAEC;AAFY,qBAAa,gBAEzB,CAAA;AAGD;IAWE;QAXF,iBAiBC;QAhBC,gBAAW,GAAG;YACZ,QAAQ,EAAE,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC;YAC1C,SAAS,EAAE,IAAI,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC;YAC5C,SAAS,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;YAC/C,eAAe,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YACtD,WAAW,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YAClD,cAAc,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YACrD,cAAc,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;SACtD,CAAA;QAID,wBAAmB,GAAa,UAAC,SAAiB;YAChD,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC,CAAA;IAJc,CAAC;IAZlB;QAAC,iBAAU,EAAE;;kBAAA;IAkBb,iBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,kBAAU,aAiBtB,CAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\nexport class DayCountBasis {\r\n constructor(public day: string, public year: string) {}\r\n}\r\n\r\n@Injectable()\r\nexport class IRSService {\r\n lookupTable = {\r\n \"30/360\": new DayCountBasis(\"D30\", \"Y360\"),\r\n \"30E/360\": new DayCountBasis(\"D30E\", \"Y360\"),\r\n \"ACT/360\": new DayCountBasis(\"DActual\", \"Y360\"),\r\n \"ACT/365 Fixed\": new DayCountBasis(\"DActual\", \"Y365F\"),\r\n \"ACT/365 L\": new DayCountBasis(\"DActual\", \"Y365L\"),\r\n \"ACT/ACT ISDA\": new DayCountBasis(\"DActual\", \"YISDA\"),\r\n \"ACT/ACT ICMA\": new DayCountBasis(\"DActual\", \"YICMA\")\r\n }\r\n\r\n constructor() {}\r\n\r\n lookupDayCountBasis: Function = (shorthand: string) => {\r\n return this.lookupTable[shorthand];\r\n }\r\n\r\n}\r\n"]}
|
||||
{"version":3,"file":"irs.service.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/irs.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA2B,eAAe,CAAC,CAAA;AAE3C;IACE,uBAAmB,GAAW,EAAS,IAAY;QAAhC,QAAG,GAAH,GAAG,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;IACzD,oBAAC;AAAD,CAAC,AAFD,IAEC;AAFY,qBAAa,gBAEzB,CAAA;AAGD;IAWE;QAXF,iBAiBC;QAhBC,gBAAW,GAAG;YACZ,QAAQ,EAAE,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC;YAC1C,SAAS,EAAE,IAAI,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC;YAC5C,SAAS,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC;YAC/C,eAAe,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YACtD,WAAW,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YAClD,cAAc,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;YACrD,cAAc,EAAE,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC;SACtD,CAAA;QAID,wBAAmB,GAAa,UAAC,SAAiB;YAChD,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC,CAAA;IAJc,CAAC;IAZlB;QAAC,iBAAU,EAAE;;kBAAA;IAkBb,iBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,kBAAU,aAiBtB,CAAA","sourcesContent":["import { Injectable } from '@angular/core';\n\nexport class DayCountBasis {\n constructor(public day: string, public year: string) {}\n}\n\n@Injectable()\nexport class IRSService {\n lookupTable = {\n \"30/360\": new DayCountBasis(\"D30\", \"Y360\"),\n \"30E/360\": new DayCountBasis(\"D30E\", \"Y360\"),\n \"ACT/360\": new DayCountBasis(\"DActual\", \"Y360\"),\n \"ACT/365 Fixed\": new DayCountBasis(\"DActual\", \"Y365F\"),\n \"ACT/365 L\": new DayCountBasis(\"DActual\", \"Y365L\"),\n \"ACT/ACT ISDA\": new DayCountBasis(\"DActual\", \"YISDA\"),\n \"ACT/ACT ICMA\": new DayCountBasis(\"DActual\", \"YICMA\")\n }\n\n constructor() {}\n\n lookupDayCountBasis: Function = (shorthand: string) => {\n return this.lookupTable[shorthand];\n }\n\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"irs.service.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/irs.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,4BAA2B,eAAe,CAAC,CAAA;AAE3C,QAAQ,CAAC,cAAc,EAAE;IACvB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,wBAAU,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,wBAAU,CAAC,EACjB,UAAC,OAAmB;QAClB,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { IRSService } from './irs.service';\r\n\r\ndescribe('Service: IRS', () => {\r\n beforeEach(() => {\r\n addProviders([IRSService]);\r\n });\r\n\r\n it('should ...',\r\n inject([IRSService],\r\n (service: IRSService) => {\r\n expect(service).toBeTruthy();\r\n }));\r\n});\r\n"]}
|
||||
{"version":3,"file":"irs.service.spec.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/irs.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,4BAA2B,eAAe,CAAC,CAAA;AAE3C,QAAQ,CAAC,cAAc,EAAE;IACvB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,wBAAU,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,wBAAU,CAAC,EACjB,UAAC,OAAmB;QAClB,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { IRSService } from './irs.service';\n\ndescribe('Service: IRS', () => {\n beforeEach(() => {\n addProviders([IRSService]);\n });\n\n it('should ...',\n inject([IRSService],\n (service: IRSService) => {\n expect(service).toBeTruthy();\n }));\n});\n"]}
|
@ -23,7 +23,6 @@ var CommonModel = (function () {
|
||||
this.exposure = null;
|
||||
this.localBusinessDay = null;
|
||||
this.dailyInterestAmount = null;
|
||||
this.hashLegalDocs = null;
|
||||
this.tradeID = null;
|
||||
}
|
||||
return CommonModel;
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"CommonModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/model/CommonModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,iBAAY,GAAW,IAAI,CAAC;QAC5B,0BAAqB,GAAW,IAAI,CAAC;QACrC,uBAAkB,GAAG;YACnB,KAAK,EAAE,EAAE;SACV,CAAC;QACF,cAAS,GAAG;YACV,KAAK,EAAE,EAAE;SACV,CAAC;QACF,0BAAqB,GAAG;YACtB,KAAK,EAAE,EAAE;SACV,CAAC;QACF,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,kBAAa,GAAW,IAAI,CAAC;QAC7B,qBAAgB,GAAW,IAAI,CAAC;QAChC,mBAAc,GAAW,IAAI,CAAC;QAC9B,iBAAY,GAAW,IAAI,CAAC;QAC5B,wBAAmB,GAAW,IAAI,CAAC;QACnC,aAAQ,GAAW,IAAI,CAAC;QACxB,qBAAgB,GAAW,IAAI,CAAC;QAChC,wBAAmB,GAAW,IAAI,CAAC;QACnC,kBAAa,GAAW,IAAI,CAAC;QAC7B,YAAO,GAAW,IAAI,CAAC;IAEzB,CAAC;IAAD,kBAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,mBAAW,cA0BvB,CAAA","sourcesContent":["export class CommonModel {\r\n baseCurrency: string = null;\r\n eligibleCreditSupport: string = null;\r\n independentAmounts = {\r\n token: \"\"\r\n };\r\n threshold = {\r\n token: \"\"\r\n };\r\n minimumTransferAmount = {\r\n token: \"\"\r\n };\r\n rounding = {\r\n token: \"\"\r\n };\r\n valuationDate: string = null;\r\n notificationTime: string = null;\r\n resolutionTime: string = null;\r\n interestRate: Object = null;\r\n addressForTransfers: string = null;\r\n exposure: Object = null;\r\n localBusinessDay: Object = null;\r\n dailyInterestAmount: string = null;\r\n hashLegalDocs: string = null;\r\n tradeID: string = null;\r\n eligibleCurrency: string;\r\n}\r\n"]}
|
||||
{"version":3,"file":"CommonModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/model/CommonModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,iBAAY,GAAW,IAAI,CAAC;QAC5B,0BAAqB,GAAW,IAAI,CAAC;QACrC,uBAAkB,GAAG;YACnB,KAAK,EAAE,EAAE;SACV,CAAC;QACF,cAAS,GAAG;YACV,KAAK,EAAE,EAAE;SACV,CAAC;QACF,0BAAqB,GAAG;YACtB,KAAK,EAAE,EAAE;SACV,CAAC;QACF,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,kBAAa,GAAW,IAAI,CAAC;QAC7B,qBAAgB,GAAW,IAAI,CAAC;QAChC,mBAAc,GAAW,IAAI,CAAC;QAC9B,iBAAY,GAAW,IAAI,CAAC;QAC5B,wBAAmB,GAAW,IAAI,CAAC;QACnC,aAAQ,GAAW,IAAI,CAAC;QACxB,qBAAgB,GAAW,IAAI,CAAC;QAChC,wBAAmB,GAAW,IAAI,CAAC;QACnC,YAAO,GAAW,IAAI,CAAC;IAEzB,CAAC;IAAD,kBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,mBAAW,cAyBvB,CAAA","sourcesContent":["export class CommonModel {\n baseCurrency: string = null;\n eligibleCreditSupport: string = null;\n independentAmounts = {\n token: \"\"\n };\n threshold = {\n token: \"\"\n };\n minimumTransferAmount = {\n token: \"\"\n };\n rounding = {\n token: \"\"\n };\n valuationDate: string = null;\n notificationTime: string = null;\n resolutionTime: string = null;\n interestRate: Object = null;\n addressForTransfers: string = null;\n exposure: Object = null;\n localBusinessDay: Object = null;\n dailyInterestAmount: string = null;\n tradeID: string = null;\n eligibleCurrency: string;\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"FixedLegModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/model/FixedLegModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,mBAAc,GAAW,IAAI,CAAC;QAC9B,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,qBAAgB,GAAW,IAAI,CAAC;QAChC,kBAAa,GAAW,IAAI,CAAC;QAC7B,oBAAe,GAAW,IAAI,CAAC;QAC/B,cAAS,GAAW,IAAI,CAAC;QACzB,qBAAgB,GAAW,IAAI,CAAC;QAChC,sBAAiB,GAAW,IAAI,CAAC;QACjC,mBAAc,GAAW,IAAI,CAAC;QAC9B,eAAU,GAAW,IAAI,CAAC;QAC1B,gBAAW,GAAW,IAAI,CAAC;QAC3B,oBAAe,GAAW,IAAI,CAAC;QAC/B,6BAAwB,GAAW,IAAI,CAAC;IAC1C,CAAC;IAAD,oBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,qBAAa,gBAgBzB,CAAA","sourcesContent":["export class FixedLegModel {\r\n fixedRatePayer: string = null;\r\n notional = {\r\n token: \"\"\r\n };\r\n paymentFrequency: string = null;\r\n effectiveDate: string = null;\r\n terminationDate: string = null;\r\n fixedRate: Object = null;\r\n dayCountBasisDay: string = null;\r\n dayCountBasisYear: string = null;\r\n rollConvention: string = null;\r\n dayInMonth: number = null;\r\n paymentRule: string = null;\r\n paymentCalendar: string = null;\r\n interestPeriodAdjustment: string = null;\r\n}\r\n"]}
|
||||
{"version":3,"file":"FixedLegModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/model/FixedLegModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,mBAAc,GAAW,IAAI,CAAC;QAC9B,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,qBAAgB,GAAW,IAAI,CAAC;QAChC,kBAAa,GAAW,IAAI,CAAC;QAC7B,oBAAe,GAAW,IAAI,CAAC;QAC/B,cAAS,GAAW,IAAI,CAAC;QACzB,qBAAgB,GAAW,IAAI,CAAC;QAChC,sBAAiB,GAAW,IAAI,CAAC;QACjC,mBAAc,GAAW,IAAI,CAAC;QAC9B,eAAU,GAAW,IAAI,CAAC;QAC1B,gBAAW,GAAW,IAAI,CAAC;QAC3B,oBAAe,GAAW,IAAI,CAAC;QAC/B,6BAAwB,GAAW,IAAI,CAAC;IAC1C,CAAC;IAAD,oBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,qBAAa,gBAgBzB,CAAA","sourcesContent":["export class FixedLegModel {\n fixedRatePayer: string = null;\n notional = {\n token: \"\"\n };\n paymentFrequency: string = null;\n effectiveDate: string = null;\n terminationDate: string = null;\n fixedRate: Object = null;\n dayCountBasisDay: string = null;\n dayCountBasisYear: string = null;\n rollConvention: string = null;\n dayInMonth: number = null;\n paymentRule: string = null;\n paymentCalendar: string = null;\n interestPeriodAdjustment: string = null;\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"FloatingLegModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/model/FloatingLegModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,sBAAiB,GAAW,IAAI,CAAC;QACjC,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,qBAAgB,GAAW,IAAI,CAAC;QAChC,kBAAa,GAAW,IAAI,CAAC;QAC7B,oBAAe,GAAW,IAAI,CAAC;QAC/B,qBAAgB,GAAW,IAAI,CAAC;QAChC,sBAAiB,GAAW,IAAI,CAAC;QACjC,mBAAc,GAAW,IAAI,CAAC;QAC9B,yBAAoB,GAAW,IAAI,CAAC;QACpC,eAAU,GAAW,IAAI,CAAC;QAC1B,oBAAe,GAAW,IAAI,CAAC;QAC/B,gBAAW,GAAW,IAAI,CAAC;QAC3B,iBAAY,GAAW,IAAI,CAAC;QAC5B,6BAAwB,GAAW,IAAI,CAAC;QACxC,uBAAkB,GAAW,IAAI,CAAC;QAClC,cAAS,GAAW,IAAI,CAAC;QACzB,sBAAiB,GAAW,IAAI,CAAC;QACjC,gBAAW,GAAW,IAAI,CAAC;QAC3B,UAAK,GAAW,IAAI,CAAC;QACrB,eAAU,GAAG;YACX,IAAI,EAAE,EAAE;SACT,CAAC;QACF,mBAAc,GAAa,EAAE,CAAC;QAC9B,oBAAe,GAAa,EAAE,CAAC;IACjC,CAAC;IAAD,uBAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,wBAAgB,mBA2B5B,CAAA","sourcesContent":["export class FloatingLegModel {\r\n floatingRatePayer: string = null;\r\n notional = {\r\n token: \"\"\r\n };\r\n paymentFrequency: string = null;\r\n effectiveDate: string = null;\r\n terminationDate: string = null;\r\n dayCountBasisDay: string = null;\r\n dayCountBasisYear: string = null;\r\n rollConvention: string = null;\r\n fixingRollConvention: string = null;\r\n dayInMonth: string = null;\r\n resetDayInMonth: string = null;\r\n paymentRule: string = null;\r\n paymentDelay: string = null;\r\n interestPeriodAdjustment: string = null;\r\n fixingPeriodOffset: string = null;\r\n resetRule: string = null;\r\n fixingsPerPayment: string = null;\r\n indexSource: string = null;\r\n index: string = null;\r\n indexTenor = {\r\n name: \"\"\r\n };\r\n fixingCalendar: string[] = [];\r\n paymentCalendar: string[] = [];\r\n}\r\n"]}
|
||||
{"version":3,"file":"FloatingLegModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/model/FloatingLegModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,sBAAiB,GAAW,IAAI,CAAC;QACjC,aAAQ,GAAG;YACT,KAAK,EAAE,EAAE;SACV,CAAC;QACF,qBAAgB,GAAW,IAAI,CAAC;QAChC,kBAAa,GAAW,IAAI,CAAC;QAC7B,oBAAe,GAAW,IAAI,CAAC;QAC/B,qBAAgB,GAAW,IAAI,CAAC;QAChC,sBAAiB,GAAW,IAAI,CAAC;QACjC,mBAAc,GAAW,IAAI,CAAC;QAC9B,yBAAoB,GAAW,IAAI,CAAC;QACpC,eAAU,GAAW,IAAI,CAAC;QAC1B,oBAAe,GAAW,IAAI,CAAC;QAC/B,gBAAW,GAAW,IAAI,CAAC;QAC3B,iBAAY,GAAW,IAAI,CAAC;QAC5B,6BAAwB,GAAW,IAAI,CAAC;QACxC,uBAAkB,GAAW,IAAI,CAAC;QAClC,cAAS,GAAW,IAAI,CAAC;QACzB,sBAAiB,GAAW,IAAI,CAAC;QACjC,gBAAW,GAAW,IAAI,CAAC;QAC3B,UAAK,GAAW,IAAI,CAAC;QACrB,eAAU,GAAG;YACX,IAAI,EAAE,EAAE;SACT,CAAC;QACF,mBAAc,GAAa,EAAE,CAAC;QAC9B,oBAAe,GAAa,EAAE,CAAC;IACjC,CAAC;IAAD,uBAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,wBAAgB,mBA2B5B,CAAA","sourcesContent":["export class FloatingLegModel {\n floatingRatePayer: string = null;\n notional = {\n token: \"\"\n };\n paymentFrequency: string = null;\n effectiveDate: string = null;\n terminationDate: string = null;\n dayCountBasisDay: string = null;\n dayCountBasisYear: string = null;\n rollConvention: string = null;\n fixingRollConvention: string = null;\n dayInMonth: string = null;\n resetDayInMonth: string = null;\n paymentRule: string = null;\n paymentDelay: string = null;\n interestPeriodAdjustment: string = null;\n fixingPeriodOffset: string = null;\n resetRule: string = null;\n fixingsPerPayment: string = null;\n indexSource: string = null;\n index: string = null;\n indexTenor = {\n name: \"\"\n };\n fixingCalendar: string[] = [];\n paymentCalendar: string[] = [];\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"node.service.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/node.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA2B,eAAe,CAAC,CAAA;AAG3C,IAAI,UAAU,GAAG,EAAE,CAAC;AAEpB,IAAI,IAAI,GAAG,UAAC,IAAI,EAAE,OAAO;IACvB,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAC,GAAG;QACtB,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACzB,MAAM,CAAC,GAAG,CAAC;IACb,CAAC,EAAE,UAAC,GAAG;QACL,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACzB,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AACF,qCAAmC,wBAAwB,CAAC,CAAA;AAG5D;IACE,qBAAoB,kBAAsC;QAD5D,iBAmBC;QAlBqB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAE1D,sBAAiB,GAAa,UAAC,IAAI;YACjC,iEAAiE;YACjE,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,CAAI,IAAI,CAAC,WAAW,EAAE,SAAI,KAAK,SAAI,GAAK,CAAC;QACjD,CAAC,CAAC;QAEF,YAAO,GAAa,UAAC,MAAM;YACzB,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,KAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC;iBACtG,IAAI,CAAC,UAAC,IAAI;gBACT,kDAAkD;gBAClD,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC7F,MAAM,CAAC,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;IAjB2D,CAAC;IAFhE;QAAC,iBAAU,EAAE;;mBAAA;IAoBb,kBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,mBAAW,cAmBvB,CAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Deal } from './Deal'\r\nimport { Observable } from 'rxjs/Rx';\r\nlet curLoading = {};\r\n\r\nlet load = (type, promise) => {\r\n curLoading[type] = true;\r\n return promise.then((arg) => {\r\n curLoading[type] = false;\r\n return arg;\r\n }, (arg) => {\r\n curLoading[type] = false;\r\n throw arg;\r\n });\r\n};\r\nimport { HttpWrapperService } from './http-wrapper.service';\r\n\r\n@Injectable()\r\nexport class NodeService {\r\n constructor(private httpWrapperService: HttpWrapperService) {}\r\n\r\n formatDateForNode: Function = (date) => {\r\n // Produces yyyy-dd-mm. JS is missing proper date formatting libs\r\n let day = (\"0\" + (date.getDate())).slice(-2);\r\n let month = (\"0\" + (date.getMonth() + 1)).slice(-2);\r\n return `${date.getFullYear()}-${month}-${day}`;\r\n };\r\n\r\n getDeal: Function = (dealId) => {\r\n return load('deal' + dealId, this.httpWrapperService.getWithCounterparty('trades/' + dealId).toPromise())\r\n .then((resp) => {\r\n // Do some data modification to simplify the model\r\n let deal = resp;\r\n deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.value * 100).toString().slice(0, 6);\r\n return deal;\r\n });\r\n };\r\n}\r\n"]}
|
||||
{"version":3,"file":"node.service.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/node.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA2B,eAAe,CAAC,CAAA;AAG3C,IAAI,UAAU,GAAG,EAAE,CAAC;AAEpB,IAAI,IAAI,GAAG,UAAC,IAAI,EAAE,OAAO;IACvB,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAC,GAAG;QACtB,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACzB,MAAM,CAAC,GAAG,CAAC;IACb,CAAC,EAAE,UAAC,GAAG;QACL,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACzB,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AACF,qCAAmC,wBAAwB,CAAC,CAAA;AAG5D;IACE,qBAAoB,kBAAsC;QAD5D,iBAmBC;QAlBqB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAE1D,sBAAiB,GAAa,UAAC,IAAI;YACjC,iEAAiE;YACjE,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,CAAI,IAAI,CAAC,WAAW,EAAE,SAAI,KAAK,SAAI,GAAK,CAAC;QACjD,CAAC,CAAC;QAEF,YAAO,GAAa,UAAC,MAAM;YACzB,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,KAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC;iBACtG,IAAI,CAAC,UAAC,IAAI;gBACT,kDAAkD;gBAClD,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC7F,MAAM,CAAC,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;IAjB2D,CAAC;IAFhE;QAAC,iBAAU,EAAE;;mBAAA;IAoBb,kBAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,mBAAW,cAmBvB,CAAA","sourcesContent":["import { Injectable } from '@angular/core';\nimport { Deal } from './Deal'\nimport { Observable } from 'rxjs/Rx';\nlet curLoading = {};\n\nlet load = (type, promise) => {\n curLoading[type] = true;\n return promise.then((arg) => {\n curLoading[type] = false;\n return arg;\n }, (arg) => {\n curLoading[type] = false;\n throw arg;\n });\n};\nimport { HttpWrapperService } from './http-wrapper.service';\n\n@Injectable()\nexport class NodeService {\n constructor(private httpWrapperService: HttpWrapperService) {}\n\n formatDateForNode: Function = (date) => {\n // Produces yyyy-dd-mm. JS is missing proper date formatting libs\n let day = (\"0\" + (date.getDate())).slice(-2);\n let month = (\"0\" + (date.getMonth() + 1)).slice(-2);\n return `${date.getFullYear()}-${month}-${day}`;\n };\n\n getDeal: Function = (dealId) => {\n return load('deal' + dealId, this.httpWrapperService.getWithCounterparty('trades/' + dealId).toPromise())\n .then((resp) => {\n // Do some data modification to simplify the model\n let deal = resp;\n deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.value * 100).toString().slice(0, 6);\n return deal;\n });\n };\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"node.service.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/node.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,6BAA4B,gBAAgB,CAAC,CAAA;AAE7C,QAAQ,CAAC,eAAe,EAAE;IACxB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,0BAAW,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,0BAAW,CAAC,EAClB,UAAC,OAAoB;QACnB,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { NodeService } from './node.service';\r\n\r\ndescribe('Service: Node', () => {\r\n beforeEach(() => {\r\n addProviders([NodeService]);\r\n });\r\n\r\n it('should ...',\r\n inject([NodeService],\r\n (service: NodeService) => {\r\n expect(service).toBeTruthy();\r\n }));\r\n});\r\n"]}
|
||||
{"version":3,"file":"node.service.spec.js","sourceRoot":"","sources":["../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/node.service.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAEvC,wBAA4C,uBAAuB,CAAC,CAAA;AACpE,6BAA4B,gBAAgB,CAAC,CAAA;AAE7C,QAAQ,CAAC,eAAe,EAAE;IACxB,UAAU,CAAC;QACT,sBAAY,CAAC,CAAC,0BAAW,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EACb,gBAAM,CAAC,CAAC,0BAAW,CAAC,EAClB,UAAC,OAAoB;QACnB,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { NodeService } from './node.service';\n\ndescribe('Service: Node', () => {\n beforeEach(() => {\n addProviders([NodeService]);\n });\n\n it('should ...',\n inject([NodeService],\n (service: NodeService) => {\n expect(service).toBeTruthy();\n }));\n});\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/portfolio/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,uBAAuB,CAAC,EAAA","sourcesContent":["export * from './portfolio.component';\r\n"]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/portfolio/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,uBAAuB,CAAC,EAAA","sourcesContent":["export * from './portfolio.component';\n"]}
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"portfolio.component.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/portfolio/portfolio.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { By } from '@angular/platform-browser';\r\nimport { DebugElement } from '@angular/core';\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { PortfolioComponent } from './portfolio.component';\r\n"]}
|
||||
{"version":3,"file":"portfolio.component.spec.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/portfolio/portfolio.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { PortfolioComponent } from './portfolio.component';\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/valuations/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,wBAAwB,CAAC,EAAA","sourcesContent":["export * from './valuations.component';\r\n"]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/valuations/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,wBAAwB,CAAC,EAAA","sourcesContent":["export * from './valuations.component';\n"]}
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"valuations.component.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/valuations/valuations.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,uBAAuB,EAAE;IAChC,EAAE,CAAC,2BAA2B,EAAE;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { By } from '@angular/platform-browser';\r\nimport { DebugElement } from '@angular/core';\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { ValuationsComponent } from './valuations.component';\r\n\r\ndescribe('Component: Valuations', () => {\r\n it('should create an instance', () => {\r\n });\r\n});\r\n"]}
|
||||
{"version":3,"file":"valuations.component.spec.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/valuations/valuations.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,uBAAuB,EAAE;IAChC,EAAE,CAAC,2BAA2B,EAAE;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { ValuationsComponent } from './valuations.component';\n\ndescribe('Component: Valuations', () => {\n it('should create an instance', () => {\n });\n});\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/view-trade/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,wBAAwB,CAAC,EAAA","sourcesContent":["export * from './view-trade.component';\r\n"]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/view-trade/index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,wBAAwB,CAAC,EAAA","sourcesContent":["export * from './view-trade.component';\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/view-trade/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/view-trade/shared/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
@ -27,10 +27,6 @@
|
||||
<td>Valuation Date</td>
|
||||
<td>{{deal.common.valuationDate}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Legal Document Hash</td>
|
||||
<td>{{deal.common.hashLegalDocs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interest Rates</td>
|
||||
<td>
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"view-trade.component.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/view-trade/view-trade.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAClD,6BAA4B,iBAAiB,CAAC,CAAA;AAC9C,uBAAkD,iBAAiB,CAAC,CAAA;AAUpE;IAmBE,4BAAoB,WAAwB,EAAU,KAAqB;QAAvD,gBAAW,GAAX,WAAW,CAAa;QAAU,UAAK,GAAL,KAAK,CAAgB;QAlB3E,SAAI,GAAW;YACb,QAAQ,EAAE;gBACR,QAAQ,EAAE,EAAE;gBACZ,SAAS,EAAE,EAAE;gBACb,eAAe,EAAE,EAAE;aACpB;YACD,WAAW,EAAE;gBACX,QAAQ,EAAE,EAAE;gBACZ,eAAe,EAAE,EAAE;gBACnB,cAAc,EAAE,EAAE;aACnB;YACD,MAAM,EAAE;gBACN,YAAY,EAAE;oBACZ,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAC;IAIF,CAAC;IAED,qCAAQ,GAAR;QAAA,iBAIC;QAHC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,SAAS,CAAC,EAAjB,CAAiB,CAAC,CAAC,SAAS,CAAC,UAAC,OAAO;YACnE,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qCAAQ,GAAR,UAAS,OAAe;QAAxB,iBAQC;QAPC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC;aAC9B,IAAI,CAAC,UAAC,IAAI;YACT,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;aACD,KAAK,CAAC,UAAC,GAAG;YACT,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;IA7CH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;YAC/D,SAAS,EAAE,CAAC,0BAAW,CAAC;YACxB,UAAU,EAAE,CAAC,0BAAiB,CAAC,CAAC,2BAA2B;SAC5D,CAAC;;0BAAA;IAuCF,yBAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,0BAAkB,qBAsC9B,CAAA","sourcesContent":["import { Component, OnInit } from '@angular/core';\r\nimport { NodeService } from '../node.service';\r\nimport { ROUTER_DIRECTIVES, ActivatedRoute } from '@angular/router';\r\n\r\n@Component({\r\n moduleId: module.id,\r\n selector: 'app-view-trade',\r\n templateUrl: 'view-trade.component.html',\r\n styleUrls: ['../app.component.css', 'view-trade.component.css'],\r\n providers: [NodeService],\r\n directives: [ROUTER_DIRECTIVES] // necessary for routerLink\r\n})\r\nexport class ViewTradeComponent implements OnInit {\r\n deal: Object = {\r\n fixedLeg: {\r\n notional: {},\r\n fixedRate: {},\r\n paymentCalendar: {}\r\n },\r\n floatingLeg: {\r\n notional: {},\r\n paymentCalendar: {},\r\n fixingCalendar: {}\r\n },\r\n common: {\r\n interestRate: {\r\n tenor: {}\r\n }\r\n }\r\n };\r\n\r\n constructor(private nodeService: NodeService, private route: ActivatedRoute) {\r\n\r\n }\r\n\r\n ngOnInit() {\r\n this.route.params.map(params => params['tradeId']).subscribe((tradeId) => {\r\n this.showDeal(tradeId);\r\n });\r\n }\r\n\r\n showDeal(tradeId: string) {\r\n this.nodeService.getDeal(tradeId)\r\n .then((deal) => {\r\n this.deal = deal;\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n }\r\n}\r\n"]}
|
||||
{"version":3,"file":"view-trade.component.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/view-trade/view-trade.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAClD,6BAA4B,iBAAiB,CAAC,CAAA;AAC9C,uBAAkD,iBAAiB,CAAC,CAAA;AAUpE;IAmBE,4BAAoB,WAAwB,EAAU,KAAqB;QAAvD,gBAAW,GAAX,WAAW,CAAa;QAAU,UAAK,GAAL,KAAK,CAAgB;QAlB3E,SAAI,GAAW;YACb,QAAQ,EAAE;gBACR,QAAQ,EAAE,EAAE;gBACZ,SAAS,EAAE,EAAE;gBACb,eAAe,EAAE,EAAE;aACpB;YACD,WAAW,EAAE;gBACX,QAAQ,EAAE,EAAE;gBACZ,eAAe,EAAE,EAAE;gBACnB,cAAc,EAAE,EAAE;aACnB;YACD,MAAM,EAAE;gBACN,YAAY,EAAE;oBACZ,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAC;IAIF,CAAC;IAED,qCAAQ,GAAR;QAAA,iBAIC;QAHC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,SAAS,CAAC,EAAjB,CAAiB,CAAC,CAAC,SAAS,CAAC,UAAC,OAAO;YACnE,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qCAAQ,GAAR,UAAS,OAAe;QAAxB,iBAQC;QAPC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC;aAC9B,IAAI,CAAC,UAAC,IAAI;YACT,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;aACD,KAAK,CAAC,UAAC,GAAG;YACT,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;IA7CH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;YAC/D,SAAS,EAAE,CAAC,0BAAW,CAAC;YACxB,UAAU,EAAE,CAAC,0BAAiB,CAAC,CAAC,2BAA2B;SAC5D,CAAC;;0BAAA;IAuCF,yBAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,0BAAkB,qBAsC9B,CAAA","sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { NodeService } from '../node.service';\nimport { ROUTER_DIRECTIVES, ActivatedRoute } from '@angular/router';\n\n@Component({\n moduleId: module.id,\n selector: 'app-view-trade',\n templateUrl: 'view-trade.component.html',\n styleUrls: ['../app.component.css', 'view-trade.component.css'],\n providers: [NodeService],\n directives: [ROUTER_DIRECTIVES] // necessary for routerLink\n})\nexport class ViewTradeComponent implements OnInit {\n deal: Object = {\n fixedLeg: {\n notional: {},\n fixedRate: {},\n paymentCalendar: {}\n },\n floatingLeg: {\n notional: {},\n paymentCalendar: {},\n fixingCalendar: {}\n },\n common: {\n interestRate: {\n tenor: {}\n }\n }\n };\n\n constructor(private nodeService: NodeService, private route: ActivatedRoute) {\n\n }\n\n ngOnInit() {\n this.route.params.map(params => params['tradeId']).subscribe((tradeId) => {\n this.showDeal(tradeId);\n });\n }\n\n showDeal(tradeId: string) {\n this.nodeService.getDeal(tradeId)\n .then((deal) => {\n this.deal = deal;\n })\n .catch((err) => {\n console.error(err);\n });\n }\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"view-trade.component.spec.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/view-trade/view-trade.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,EAAE,CAAC,2BAA2B,EAAE;QAC9B,2CAA2C;QAC3C,iCAAiC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\r\n\r\nimport { By } from '@angular/platform-browser';\r\nimport { DebugElement } from '@angular/core';\r\nimport { addProviders, async, inject } from '@angular/core/testing';\r\nimport { ViewTradeComponent } from './view-trade.component';\r\n\r\ndescribe('Component: ViewTrade', () => {\r\n it('should create an instance', () => {\r\n //let component = new ViewTradeComponent();\r\n //expect(component).toBeTruthy();\r\n });\r\n});\r\n"]}
|
||||
{"version":3,"file":"view-trade.component.spec.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/view-trade/view-trade.component.spec.ts"],"names":[],"mappings":"AAAA,uCAAuC;;AAOvC,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,EAAE,CAAC,2BAA2B,EAAE;QAC9B,2CAA2C;QAC3C,iCAAiC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* tslint:disable:no-unused-variable */\n\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\nimport { addProviders, async, inject } from '@angular/core/testing';\nimport { ViewTradeComponent } from './view-trade.component';\n\ndescribe('Component: ViewTrade', () => {\n it('should create an instance', () => {\n //let component = new ViewTradeComponent();\n //expect(component).toBeTruthy();\n });\n});\n"]}
|
@ -32,7 +32,6 @@ var CommonViewModel = (function () {
|
||||
this.exposure = {};
|
||||
this.localBusinessDay = ["London", "NewYork"];
|
||||
this.dailyInterestAmount = "(CashAmount * InterestRate ) / (fixedLeg.notional.token.currencyCode.equals('GBP')) ? 365 : 360";
|
||||
this.hashLegalDocs = "put hash here";
|
||||
}
|
||||
return CommonViewModel;
|
||||
}());
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"CommonViewModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/viewmodel/CommonViewModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,iBAAY,GAAG,KAAK,CAAC;QACrB,kBAAa,GAAG,YAAY,CAAC;QAC7B,oBAAe,GAAG,YAAY,CAAC;QAC/B,0BAAqB,GAAG,8BAA8B,CAAC;QACvD,uBAAkB,GAAG;YACjB,QAAQ,EAAE,CAAC;SACd,CAAC;QACF,cAAS,GAAG;YACR,QAAQ,EAAE,CAAC;SACd,CAAC;QACF,0BAAqB,GAAG;YACpB,QAAQ,EAAE,QAAQ;SACrB,CAAC;QACF,aAAQ,GAAG;YACP,QAAQ,EAAE,OAAO;SACpB,CAAC;QACF,kBAAa,GAAG,0BAA0B,CAAC;QAC3C,qBAAgB,GAAG,eAAe,CAAC;QACnC,mBAAc,GAAG,mGAAmG,CAAC;QACrH,iBAAY,GAAG;YACX,MAAM,EAAE,wBAAwB;YAChC,KAAK,EAAE;gBACH,IAAI,EAAE,IAAI;aACb;YACD,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,OAAO;SAChB,CAAC;QACF,wBAAmB,GAAG,EAAE,CAAC;QACzB,aAAQ,GAAG,EAAE,CAAC;QACd,qBAAgB,GAAG,CAAE,QAAQ,EAAG,SAAS,CAAE,CAAC;QAC5C,wBAAmB,GAAG,iGAAiG,CAAC;QACxH,kBAAa,GAAG,eAAe,CAAC;IAClC,CAAC;IAAD,sBAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCY,uBAAe,kBAiC3B,CAAA","sourcesContent":["export class CommonViewModel {\r\n baseCurrency = \"EUR\";\r\n effectiveDate = \"2016-02-11\";\r\n terminationDate = \"2026-02-11\";\r\n eligibleCreditSupport = \"Cash in an Eligible Currency\";\r\n independentAmounts = {\r\n quantity: 0\r\n };\r\n threshold = {\r\n quantity: 0\r\n };\r\n minimumTransferAmount = {\r\n quantity: 25000000\r\n };\r\n rounding = {\r\n quantity: 1000000\r\n };\r\n valuationDate = \"Every Local Business Day\";\r\n notificationTime = \"2:00pm London\";\r\n resolutionTime = \"2:00pm London time on the first LocalBusiness Day following the date on which the notice is given\";\r\n interestRate = {\r\n oracle: \"Rates Service Provider\",\r\n tenor: {\r\n name: \"6M\"\r\n },\r\n ratioUnit: null,\r\n name: \"EONIA\"\r\n };\r\n addressForTransfers = \"\";\r\n exposure = {};\r\n localBusinessDay = [ \"London\" , \"NewYork\" ];\r\n dailyInterestAmount = \"(CashAmount * InterestRate ) / (fixedLeg.notional.token.currencyCode.equals('GBP')) ? 365 : 360\";\r\n hashLegalDocs = \"put hash here\";\r\n}\r\n"]}
|
||||
{"version":3,"file":"CommonViewModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/viewmodel/CommonViewModel.ts"],"names":[],"mappings":";AAAA;IAAA;QACE,iBAAY,GAAG,KAAK,CAAC;QACrB,kBAAa,GAAG,YAAY,CAAC;QAC7B,oBAAe,GAAG,YAAY,CAAC;QAC/B,0BAAqB,GAAG,8BAA8B,CAAC;QACvD,uBAAkB,GAAG;YACjB,QAAQ,EAAE,CAAC;SACd,CAAC;QACF,cAAS,GAAG;YACR,QAAQ,EAAE,CAAC;SACd,CAAC;QACF,0BAAqB,GAAG;YACpB,QAAQ,EAAE,QAAQ;SACrB,CAAC;QACF,aAAQ,GAAG;YACP,QAAQ,EAAE,OAAO;SACpB,CAAC;QACF,kBAAa,GAAG,0BAA0B,CAAC;QAC3C,qBAAgB,GAAG,eAAe,CAAC;QACnC,mBAAc,GAAG,mGAAmG,CAAC;QACrH,iBAAY,GAAG;YACX,MAAM,EAAE,wBAAwB;YAChC,KAAK,EAAE;gBACH,IAAI,EAAE,IAAI;aACb;YACD,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,OAAO;SAChB,CAAC;QACF,wBAAmB,GAAG,EAAE,CAAC;QACzB,aAAQ,GAAG,EAAE,CAAC;QACd,qBAAgB,GAAG,CAAE,QAAQ,EAAG,SAAS,CAAE,CAAC;QAC5C,wBAAmB,GAAG,iGAAiG,CAAC;IAC1H,CAAC;IAAD,sBAAC;AAAD,CAAC,AAhCD,IAgCC;AAhCY,uBAAe,kBAgC3B,CAAA","sourcesContent":["export class CommonViewModel {\n baseCurrency = \"EUR\";\n effectiveDate = \"2016-02-11\";\n terminationDate = \"2026-02-11\";\n eligibleCreditSupport = \"Cash in an Eligible Currency\";\n independentAmounts = {\n quantity: 0\n };\n threshold = {\n quantity: 0\n };\n minimumTransferAmount = {\n quantity: 25000000\n };\n rounding = {\n quantity: 1000000\n };\n valuationDate = \"Every Local Business Day\";\n notificationTime = \"2:00pm London\";\n resolutionTime = \"2:00pm London time on the first LocalBusiness Day following the date on which the notice is given\";\n interestRate = {\n oracle: \"Rates Service Provider\",\n tenor: {\n name: \"6M\"\n },\n ratioUnit: null,\n name: \"EONIA\"\n };\n addressForTransfers = \"\";\n exposure = {};\n localBusinessDay = [ \"London\" , \"NewYork\" ];\n dailyInterestAmount = \"(CashAmount * InterestRate ) / (fixedLeg.notional.token.currencyCode.equals('GBP')) ? 365 : 360\";\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"DealViewModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/viewmodel/DealViewModel.ts"],"names":[],"mappings":";AAAA,kCAAkC,qBAClC,CAAC,CADsD;AACvD,qCAAqC,wBACrC,CAAC,CAD4D;AAC7D,gCAAgC,mBAEhC,CAAC,CAFkD;AAEnD;IACE;QAEA,aAAQ,GAAG,IAAI,qCAAiB,EAAE,CAAC;QACnC,gBAAW,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACzC,WAAM,GAAG,IAAI,iCAAe,EAAE,CAAC;IAJhB,CAAC;IAKlB,oBAAC;AAAD,CAAC,AAND,IAMC;AANY,qBAAa,gBAMzB,CAAA","sourcesContent":["import { FixedLegViewModel } from './FixedLegViewModel'\r\nimport { FloatingLegViewModel } from './FloatingLegViewModel'\r\nimport { CommonViewModel } from './CommonViewModel'\r\n\r\nexport class DealViewModel {\r\n constructor() {}\r\n\r\n fixedLeg = new FixedLegViewModel();\r\n floatingLeg = new FloatingLegViewModel();\r\n common = new CommonViewModel();\r\n}\r\n"]}
|
||||
{"version":3,"file":"DealViewModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/viewmodel/DealViewModel.ts"],"names":[],"mappings":";AAAA,kCAAkC,qBAClC,CAAC,CADsD;AACvD,qCAAqC,wBACrC,CAAC,CAD4D;AAC7D,gCAAgC,mBAEhC,CAAC,CAFkD;AAEnD;IACE;QAEA,aAAQ,GAAG,IAAI,qCAAiB,EAAE,CAAC;QACnC,gBAAW,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACzC,WAAM,GAAG,IAAI,iCAAe,EAAE,CAAC;IAJhB,CAAC;IAKlB,oBAAC;AAAD,CAAC,AAND,IAMC;AANY,qBAAa,gBAMzB,CAAA","sourcesContent":["import { FixedLegViewModel } from './FixedLegViewModel'\nimport { FloatingLegViewModel } from './FloatingLegViewModel'\nimport { CommonViewModel } from './CommonViewModel'\n\nexport class DealViewModel {\n constructor() {}\n\n fixedLeg = new FixedLegViewModel();\n floatingLeg = new FloatingLegViewModel();\n common = new CommonViewModel();\n}\n"]}
|
@ -17,4 +17,4 @@ var FixedLegViewModel = (function () {
|
||||
return FixedLegViewModel;
|
||||
}());
|
||||
exports.FixedLegViewModel = FixedLegViewModel;
|
||||
//# sourceMappingURL=FixedLegViewModel.js.map
|
||||
//# sourceMappingURL=FixedLegViewModel.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"FixedLegViewModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/viewmodel/FixedLegViewModel.ts"],"names":[],"mappings":";AAAA;IACE;QAEA,mBAAc,GAAG,QAAQ,CAAC;QAC1B,aAAQ,GAAW;YACf,QAAQ,EAAE,UAAU;SACvB,CAAC;QACF,qBAAgB,GAAG,YAAY,CAAC;QAGhC,cAAS,GAAG,OAAO,CAAC;QACpB,kBAAa,GAAG,SAAS,CAAC;QAC1B,mBAAc,GAAG,mBAAmB,CAAC;QACrC,eAAU,GAAW,EAAE,CAAC;QACxB,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,GAAG,CAAC;QACnB,6BAAwB,GAAG,UAAU,CAAC;IAftB,CAAC;IAgBnB,wBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,yBAAiB,oBAiB7B,CAAA","sourcesContent":["export class FixedLegViewModel {\r\n constructor() { }\r\n\r\n fixedRatePayer = \"Bank A\";\r\n notional: Object = {\r\n quantity: 2500000000\r\n };\r\n paymentFrequency = \"SemiAnnual\";\r\n effectiveDateAdjustment: any;\r\n terminationDateAdjustment: any;\r\n fixedRate = \"1.676\";\r\n dayCountBasis = \"ACT/360\";\r\n rollConvention = \"ModifiedFollowing\";\r\n dayInMonth: Number = 10;\r\n paymentRule = \"InArrears\";\r\n paymentDelay = \"0\";\r\n interestPeriodAdjustment = \"Adjusted\";\r\n}\r\n"]}
|
||||
{"version":3,"file":"FixedLegViewModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/viewmodel/FixedLegViewModel.ts"],"names":[],"mappings":";AAAA;IACE;QAEA,mBAAc,GAAG,kCAAkC,CAAC;QACpD,aAAQ,GAAW;YACf,QAAQ,EAAE,UAAU;SACvB,CAAC;QACF,qBAAgB,GAAG,YAAY,CAAC;QAGhC,cAAS,GAAG,OAAO,CAAC;QACpB,kBAAa,GAAG,SAAS,CAAC;QAC1B,mBAAc,GAAG,mBAAmB,CAAC;QACrC,eAAU,GAAW,EAAE,CAAC;QACxB,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,GAAG,CAAC;QACnB,6BAAwB,GAAG,UAAU,CAAC;IAftB,CAAC;IAgBnB,wBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,yBAAiB,oBAiB7B,CAAA","sourcesContent":["export class FixedLegViewModel {\n constructor() { }\n\n fixedRatePayer = \"CN=Bank A,O=Bank A,L=London,C=GB\";\n notional: Object = {\n quantity: 2500000000\n };\n paymentFrequency = \"SemiAnnual\";\n effectiveDateAdjustment: any;\n terminationDateAdjustment: any;\n fixedRate = \"1.676\";\n dayCountBasis = \"ACT/360\";\n rollConvention = \"ModifiedFollowing\";\n dayInMonth: Number = 10;\n paymentRule = \"InArrears\";\n paymentDelay = \"0\";\n interestPeriodAdjustment = \"Adjusted\";\n}\n"]}
|
@ -25,4 +25,4 @@ var FloatingLegViewModel = (function () {
|
||||
return FloatingLegViewModel;
|
||||
}());
|
||||
exports.FloatingLegViewModel = FloatingLegViewModel;
|
||||
//# sourceMappingURL=FloatingLegViewModel.js.map
|
||||
//# sourceMappingURL=FloatingLegViewModel.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"FloatingLegViewModel.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/app/viewmodel/FloatingLegViewModel.ts"],"names":[],"mappings":";AAAA;IACE;QAEA,sBAAiB,GAAG,QAAQ,CAAC;QAC7B,aAAQ,GAAW;YAChB,QAAQ,EAAE,UAAU;SACtB,CAAC;QACF,qBAAgB,GAAG,WAAW,CAAC;QAG/B,kBAAa,GAAG,SAAS,CAAC;QAC1B,mBAAc,GAAG,mBAAmB,CAAC;QACrC,yBAAoB,GAAG,mBAAmB,CAAC;QAC3C,eAAU,GAAW,EAAE,CAAC;QACxB,oBAAe,GAAW,EAAE,CAAC;QAC7B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,GAAG,CAAC;QACnB,6BAAwB,GAAG,UAAU,CAAC;QACtC,uBAAkB,GAAW,CAAC,CAAC;QAC/B,cAAS,GAAG,WAAW,CAAC;QACxB,sBAAiB,GAAG,WAAW,CAAC;QAChC,gBAAW,GAAG,wBAAwB,CAAC;QACvC,eAAU,GAAG;YACV,IAAI,EAAE,IAAI;SACZ,CAAC;IAvBc,CAAC;IAwBnB,2BAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,4BAAoB,uBAyBhC,CAAA","sourcesContent":["export class FloatingLegViewModel {\r\n constructor() { }\r\n\r\n floatingRatePayer = \"Bank B\";\r\n notional: Object = {\r\n quantity: 2500000000\r\n };\r\n paymentFrequency = \"Quarterly\";\r\n effectiveDateAdjustment: any;\r\n terminationDateAdjustment: any;\r\n dayCountBasis = \"ACT/360\";\r\n rollConvention = \"ModifiedFollowing\";\r\n fixingRollConvention = \"ModifiedFollowing\";\r\n dayInMonth: Number = 10;\r\n resetDayInMonth: Number = 10;\r\n paymentRule = \"InArrears\";\r\n paymentDelay = \"0\";\r\n interestPeriodAdjustment = \"Adjusted\";\r\n fixingPeriodOffset: Number = 2;\r\n resetRule = \"InAdvance\";\r\n fixingsPerPayment = \"Quarterly\";\r\n indexSource = \"Rates Service Provider\";\r\n indexTenor = {\r\n name: \"3M\"\r\n };\r\n}\r\n"]}
|
||||
{"version":3,"file":"FloatingLegViewModel.js","sourceRoot":"","sources":["../../home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/app/viewmodel/FloatingLegViewModel.ts"],"names":[],"mappings":";AAAA;IACE;QAEA,sBAAiB,GAAG,oCAAoC,CAAC;QACzD,aAAQ,GAAW;YAChB,QAAQ,EAAE,UAAU;SACtB,CAAC;QACF,qBAAgB,GAAG,WAAW,CAAC;QAG/B,kBAAa,GAAG,SAAS,CAAC;QAC1B,mBAAc,GAAG,mBAAmB,CAAC;QACrC,yBAAoB,GAAG,mBAAmB,CAAC;QAC3C,eAAU,GAAW,EAAE,CAAC;QACxB,oBAAe,GAAW,EAAE,CAAC;QAC7B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,GAAG,CAAC;QACnB,6BAAwB,GAAG,UAAU,CAAC;QACtC,uBAAkB,GAAW,CAAC,CAAC;QAC/B,cAAS,GAAG,WAAW,CAAC;QACxB,sBAAiB,GAAG,WAAW,CAAC;QAChC,gBAAW,GAAG,wBAAwB,CAAC;QACvC,eAAU,GAAG;YACV,IAAI,EAAE,IAAI;SACZ,CAAC;IAvBc,CAAC;IAwBnB,2BAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,4BAAoB,uBAyBhC,CAAA","sourcesContent":["export class FloatingLegViewModel {\n constructor() { }\n\n floatingRatePayer = \"CN=Bank B,O=Bank B,L=New York,C=US\";\n notional: Object = {\n quantity: 2500000000\n };\n paymentFrequency = \"Quarterly\";\n effectiveDateAdjustment: any;\n terminationDateAdjustment: any;\n dayCountBasis = \"ACT/360\";\n rollConvention = \"ModifiedFollowing\";\n fixingRollConvention = \"ModifiedFollowing\";\n dayInMonth: Number = 10;\n resetDayInMonth: Number = 10;\n paymentRule = \"InArrears\";\n paymentDelay = \"0\";\n interestPeriodAdjustment = \"Adjusted\";\n fixingPeriodOffset: Number = 2;\n resetRule = \"InAdvance\";\n fixingsPerPayment = \"Quarterly\";\n indexSource = \"Rates Service Provider\";\n indexTenor = {\n name: \"3M\"\n };\n}\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/main.ts"],"names":[],"mappings":";AAAA,yCAA0B,mCAAmC,CAAC,CAAA;AAC9D,qBAA+B,eAAe,CAAC,CAAA;AAC/C,qBAA+B,eAAe,CAAC,CAAA;AAC/C,sBAAmD,gBAAgB,CAAC,CAAA;AACpE,iBAA0C,QAAQ,CAAC,CAAA;AACnD,2BAAmC,kBAAkB,CAAC,CAAA;AAEtD,EAAE,CAAC,CAAC,cAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,qBAAc,EAAE,CAAC;AACnB,CAAC;AAED,oCAAS,CAAC,eAAY,EAAE;IACtB,+BAAkB;IAClB,qBAAc;IACd,+CAA+C;IAC/C,8BAAsB,EAAE;IACxB,oBAAY,EAAE;CACf,CAAC;KACD,KAAK,CAAC,UAAA,GAAG,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAlB,CAAkB,CAAC,CAAC","sourcesContent":["import { bootstrap } from '@angular/platform-browser-dynamic';\r\nimport { enableProdMode } from '@angular/core';\r\nimport { HTTP_PROVIDERS } from '@angular/http';\r\nimport {disableDeprecatedForms, provideForms} from '@angular/forms';\r\nimport { AppComponent, environment } from './app/';\r\nimport { appRouterProviders } from './app/app.routes';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nbootstrap(AppComponent, [\r\n appRouterProviders,\r\n HTTP_PROVIDERS,\r\n // magic to fix ngModel error on ng2-bootstrap:\r\n disableDeprecatedForms(),\r\n provideForms()\r\n])\r\n.catch(err => console.error(err));\r\n"]}
|
||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/main.ts"],"names":[],"mappings":";AAAA,yCAA0B,mCAAmC,CAAC,CAAA;AAC9D,qBAA+B,eAAe,CAAC,CAAA;AAC/C,qBAA+B,eAAe,CAAC,CAAA;AAC/C,sBAAmD,gBAAgB,CAAC,CAAA;AACpE,iBAA0C,QAAQ,CAAC,CAAA;AACnD,2BAAmC,kBAAkB,CAAC,CAAA;AAEtD,EAAE,CAAC,CAAC,cAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,qBAAc,EAAE,CAAC;AACnB,CAAC;AAED,oCAAS,CAAC,eAAY,EAAE;IACtB,+BAAkB;IAClB,qBAAc;IACd,+CAA+C;IAC/C,8BAAsB,EAAE;IACxB,oBAAY,EAAE;CACf,CAAC;KACD,KAAK,CAAC,UAAA,GAAG,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAlB,CAAkB,CAAC,CAAC","sourcesContent":["import { bootstrap } from '@angular/platform-browser-dynamic';\nimport { enableProdMode } from '@angular/core';\nimport { HTTP_PROVIDERS } from '@angular/http';\nimport {disableDeprecatedForms, provideForms} from '@angular/forms';\nimport { AppComponent, environment } from './app/';\nimport { appRouterProviders } from './app/app.routes';\n\nif (environment.production) {\n enableProdMode();\n}\n\nbootstrap(AppComponent, [\n appRouterProviders,\n HTTP_PROVIDERS,\n // magic to fix ngModel error on ng2-bootstrap:\n disableDeprecatedForms(),\n provideForms()\n])\n.catch(err => console.error(err));\n"]}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"system-config.js","sourceRoot":"","sources":["file:///C:/work/corda-samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-ZHoDtSjD.tmp/0/src/system-config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,8DAA8D;AAC9D,uCAAuC;AACvC,sEAAsE;AAEtE;;gGAEgG;AAChG,kCAAkC;AAClC,IAAM,GAAG,GAAQ;IACf,QAAQ,EAAE,yBAAyB;IACnC,YAAY,EAAE,iCAAiC;IAC/C,QAAQ,EAAE,uBAAuB;IACjC,YAAY,EAAE,oCAAoC;IAClD,eAAe,EAAE,sBAAsB;IACvC,aAAa,EAAE,oBAAoB;IACnC,YAAY,EAAE,mBAAmB;IACjC,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEF,mCAAmC;AACnC,IAAM,QAAQ,GAAQ;IACpB,QAAQ,EAAE;QACR,MAAM,EAAE,KAAK;KACd;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,KAAK;KACd;IACD,eAAe,EAAE;QACf,MAAM,EAAE,KAAK;QACb,gBAAgB,EAAE,IAAI;QACtB,IAAI,EAAE,kBAAkB;KACzB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,UAAU;QAChB,gBAAgB,EAAE,IAAI;KACvB;IACD,YAAY,EAAE;QACZ,gBAAgB,EAAE,IAAI;KACvB;IACD,WAAW,EAAE;QACX,gBAAgB,EAAE,IAAI;KACvB;CACF,CAAC;AAEF,gGAAgG;AAChG;;gGAEgG;AAChG,IAAM,OAAO,GAAa;IACxB,4BAA4B;IAC5B,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,2BAA2B;IAC3B,mCAAmC;IAEnC,sBAAsB;IACtB,MAAM;IAEN,wBAAwB;IACxB,KAAK;IACL,YAAY;IACZ,yBAAyB;IACzB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;CAEjB,CAAC;AAEF,IAAM,uBAAuB,GAAQ,EAAE,CAAC;AACxC,OAAO,CAAC,OAAO,CAAC,UAAC,UAAkB;IACjC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC1D,CAAC,CAAC,CAAC;AAKH,2BAA2B;AAE3B,wCAAwC;AACxC,MAAM,CAAC,MAAM,CAAC;IACZ,OAAO,EAAE,wBAAwB;IACjC,GAAG,EAAE;QACH,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE,uBAAuB;CAClC,CAAC,CAAC;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAA,GAAG,EAAE,UAAA,QAAQ,EAAE,CAAC,CAAC","sourcesContent":["\"use strict\";\r\n\r\n// SystemJS configuration file, see links for more information\r\n// https://github.com/systemjs/systemjs\r\n// https://github.com/systemjs/systemjs/blob/master/docs/config-api.md\r\n\r\n/***********************************************************************************************\r\n * User Configuration.\r\n **********************************************************************************************/\r\n/** Map relative paths to URLs. */\r\nconst map: any = {\r\n 'moment': 'vendor/moment/moment.js',\r\n 'underscore': 'vendor/underscore/underscore.js',\r\n 'jquery': 'vendor/dist/jquery.js',\r\n 'highcharts': 'vendor/highcharts/highstock.src.js',\r\n 'ng2-bootstrap': 'vendor/ng2-bootstrap',\r\n 'ng2-popover': 'vendor/ng2-popover',\r\n 'ng2-select': 'vendor/ng2-select',\r\n 'ng2-table': 'vendor/ng2-table'\r\n};\r\n\r\n/** User packages configuration. */\r\nconst packages: any = {\r\n 'moment': {\r\n format: 'cjs'\r\n },\r\n 'underscore': {\r\n format: 'cjs'\r\n },\r\n 'ng2-bootstrap': {\r\n format: 'cjs',\r\n defaultExtension: 'js',\r\n main: 'ng2-bootstrap.js'\r\n },\r\n 'ng2-popover': {\r\n main: 'index.js',\r\n defaultExtension: 'js'\r\n },\r\n 'ng2-select': {\r\n defaultExtension: 'js'\r\n },\r\n 'ng2-table': {\r\n defaultExtension: 'js'\r\n }\r\n};\r\n\r\n////////////////////////////////////////////////////////////////////////////////////////////////\r\n/***************************************httpWrapperService********************************************************\r\n * Everything underneath this line is managed by the CLI.\r\n **********************************************************************************************/\r\nconst barrels: string[] = [\r\n // Angular specific barrels.\r\n '@angular/core',\r\n '@angular/common',\r\n '@angular/compiler',\r\n '@angular/forms',\r\n '@angular/http',\r\n '@angular/router',\r\n '@angular/platform-browser',\r\n '@angular/platform-browser-dynamic',\r\n\r\n // Thirdparty barrels.\r\n 'rxjs',\r\n\r\n // App specific barrels.\r\n 'app',\r\n 'app/shared',\r\n 'app/portfolio-component',\r\n 'app/portfolio',\r\n 'app/valuations',\r\n 'app/create-trade',\r\n 'app/view-trade',\r\n /** @cli-barrel */\r\n];\r\n\r\nconst cliSystemConfigPackages: any = {};\r\nbarrels.forEach((barrelName: string) => {\r\n cliSystemConfigPackages[barrelName] = { main: 'index' };\r\n});\r\n\r\n/** Type declaration for ambient System. */\r\n/* beautify preserve:start */\r\ndeclare var System: any;\r\n/* beautify preserve:end */\r\n\r\n// Apply the CLI SystemJS configuration.\r\nSystem.config({\r\n baseURL: \"/web/simmvaluationdemo\",\r\n map: {\r\n '@angular': 'vendor/@angular',\r\n 'rxjs': 'vendor/rxjs',\r\n 'main': 'main.js'\r\n },\r\n packages: cliSystemConfigPackages\r\n});\r\n\r\n// Apply the user's configuration.\r\nSystem.config({ map, packages });\r\n"]}
|
||||
{"version":3,"file":"system-config.js","sourceRoot":"","sources":["home/arc/proj ects/corda/samples/simm-valuation-demo/src/main/web/tmp/broccoli_type_script_compiler-input_base_path-q9SObyK6.tmp/0/src/system-config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,8DAA8D;AAC9D,uCAAuC;AACvC,sEAAsE;AAEtE;;gGAEgG;AAChG,kCAAkC;AAClC,IAAM,GAAG,GAAQ;IACf,QAAQ,EAAE,yBAAyB;IACnC,YAAY,EAAE,iCAAiC;IAC/C,QAAQ,EAAE,uBAAuB;IACjC,YAAY,EAAE,oCAAoC;IAClD,eAAe,EAAE,sBAAsB;IACvC,aAAa,EAAE,oBAAoB;IACnC,YAAY,EAAE,mBAAmB;IACjC,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEF,mCAAmC;AACnC,IAAM,QAAQ,GAAQ;IACpB,QAAQ,EAAE;QACR,MAAM,EAAE,KAAK;KACd;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,KAAK;KACd;IACD,eAAe,EAAE;QACf,MAAM,EAAE,KAAK;QACb,gBAAgB,EAAE,IAAI;QACtB,IAAI,EAAE,kBAAkB;KACzB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,UAAU;QAChB,gBAAgB,EAAE,IAAI;KACvB;IACD,YAAY,EAAE;QACZ,gBAAgB,EAAE,IAAI;KACvB;IACD,WAAW,EAAE;QACX,gBAAgB,EAAE,IAAI;KACvB;CACF,CAAC;AAEF,gGAAgG;AAChG;;gGAEgG;AAChG,IAAM,OAAO,GAAa;IACxB,4BAA4B;IAC5B,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,2BAA2B;IAC3B,mCAAmC;IAEnC,sBAAsB;IACtB,MAAM;IAEN,wBAAwB;IACxB,KAAK;IACL,YAAY;IACZ,yBAAyB;IACzB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;CAEjB,CAAC;AAEF,IAAM,uBAAuB,GAAQ,EAAE,CAAC;AACxC,OAAO,CAAC,OAAO,CAAC,UAAC,UAAkB;IACjC,uBAAuB,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC1D,CAAC,CAAC,CAAC;AAKH,2BAA2B;AAE3B,wCAAwC;AACxC,MAAM,CAAC,MAAM,CAAC;IACZ,OAAO,EAAE,wBAAwB;IACjC,GAAG,EAAE;QACH,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE,uBAAuB;CAClC,CAAC,CAAC;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAA,GAAG,EAAE,UAAA,QAAQ,EAAE,CAAC,CAAC","sourcesContent":["\"use strict\";\n\n// SystemJS configuration file, see links for more information\n// https://github.com/systemjs/systemjs\n// https://github.com/systemjs/systemjs/blob/master/docs/config-api.md\n\n/***********************************************************************************************\n * User Configuration.\n **********************************************************************************************/\n/** Map relative paths to URLs. */\nconst map: any = {\n 'moment': 'vendor/moment/moment.js',\n 'underscore': 'vendor/underscore/underscore.js',\n 'jquery': 'vendor/dist/jquery.js',\n 'highcharts': 'vendor/highcharts/highstock.src.js',\n 'ng2-bootstrap': 'vendor/ng2-bootstrap',\n 'ng2-popover': 'vendor/ng2-popover',\n 'ng2-select': 'vendor/ng2-select',\n 'ng2-table': 'vendor/ng2-table'\n};\n\n/** User packages configuration. */\nconst packages: any = {\n 'moment': {\n format: 'cjs'\n },\n 'underscore': {\n format: 'cjs'\n },\n 'ng2-bootstrap': {\n format: 'cjs',\n defaultExtension: 'js',\n main: 'ng2-bootstrap.js'\n },\n 'ng2-popover': {\n main: 'index.js',\n defaultExtension: 'js'\n },\n 'ng2-select': {\n defaultExtension: 'js'\n },\n 'ng2-table': {\n defaultExtension: 'js'\n }\n};\n\n////////////////////////////////////////////////////////////////////////////////////////////////\n/***************************************httpWrapperService********************************************************\n * Everything underneath this line is managed by the CLI.\n **********************************************************************************************/\nconst barrels: string[] = [\n // Angular specific barrels.\n '@angular/core',\n '@angular/common',\n '@angular/compiler',\n '@angular/forms',\n '@angular/http',\n '@angular/router',\n '@angular/platform-browser',\n '@angular/platform-browser-dynamic',\n\n // Thirdparty barrels.\n 'rxjs',\n\n // App specific barrels.\n 'app',\n 'app/shared',\n 'app/portfolio-component',\n 'app/portfolio',\n 'app/valuations',\n 'app/create-trade',\n 'app/view-trade',\n /** @cli-barrel */\n];\n\nconst cliSystemConfigPackages: any = {};\nbarrels.forEach((barrelName: string) => {\n cliSystemConfigPackages[barrelName] = { main: 'index' };\n});\n\n/** Type declaration for ambient System. */\n/* beautify preserve:start */\ndeclare var System: any;\n/* beautify preserve:end */\n\n// Apply the CLI SystemJS configuration.\nSystem.config({\n baseURL: \"/web/simmvaluationdemo\",\n map: {\n '@angular': 'vendor/@angular',\n 'rxjs': 'vendor/rxjs',\n 'main': 'main.js'\n },\n packages: cliSystemConfigPackages\n});\n\n// Apply the user's configuration.\nSystem.config({ map, packages });\n"]}
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
//! moment.js
|
||||
//! version : 2.16.0
|
||||
//! version : 2.18.1
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
@ -41,8 +41,12 @@ function isObjectEmpty(obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function isUndefined(input) {
|
||||
return input === void 0;
|
||||
}
|
||||
|
||||
function isNumber(input) {
|
||||
return typeof value === 'number' || Object.prototype.toString.call(input) === '[object Number]';
|
||||
return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
|
||||
}
|
||||
|
||||
function isDate(input) {
|
||||
@ -97,7 +101,9 @@ function defaultParsingFlags() {
|
||||
userInvalidated : false,
|
||||
iso : false,
|
||||
parsedDateParts : [],
|
||||
meridiem : null
|
||||
meridiem : null,
|
||||
rfc2822 : false,
|
||||
weekdayMismatch : false
|
||||
};
|
||||
}
|
||||
|
||||
@ -173,10 +179,6 @@ function createInvalid (flags) {
|
||||
return m;
|
||||
}
|
||||
|
||||
function isUndefined(input) {
|
||||
return input === void 0;
|
||||
}
|
||||
|
||||
// Plugins that add properties should also add the key here (null value),
|
||||
// so we can properly clone ourselves.
|
||||
var momentProperties = hooks.momentProperties = [];
|
||||
@ -216,7 +218,7 @@ function copyConfig(to, from) {
|
||||
}
|
||||
|
||||
if (momentProperties.length > 0) {
|
||||
for (i in momentProperties) {
|
||||
for (i = 0; i < momentProperties.length; i++) {
|
||||
prop = momentProperties[i];
|
||||
val = from[prop];
|
||||
if (!isUndefined(val)) {
|
||||
@ -234,6 +236,9 @@ var updateInProgress = false;
|
||||
function Moment(config) {
|
||||
copyConfig(this, config);
|
||||
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
|
||||
if (!this.isValid()) {
|
||||
this._d = new Date(NaN);
|
||||
}
|
||||
// Prevent infinite loop in case updateOffset creates new moment
|
||||
// objects.
|
||||
if (updateInProgress === false) {
|
||||
@ -350,8 +355,11 @@ function set (config) {
|
||||
}
|
||||
this._config = config;
|
||||
// Lenient ordinal parsing accepts just a number in addition to
|
||||
// number + (possibly) stuff coming from _ordinalParseLenient.
|
||||
this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
|
||||
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
|
||||
// TODO: Remove "ordinalParse" fallback in next major release.
|
||||
this._dayOfMonthOrdinalParseLenient = new RegExp(
|
||||
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
|
||||
'|' + (/\d{1,2}/).source);
|
||||
}
|
||||
|
||||
function mergeConfigs(parentConfig, childConfig) {
|
||||
@ -449,7 +457,7 @@ function invalidDate () {
|
||||
}
|
||||
|
||||
var defaultOrdinal = '%d';
|
||||
var defaultOrdinalParse = /\d{1,2}/;
|
||||
var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
|
||||
|
||||
function ordinal (number) {
|
||||
return this._ordinal.replace('%d', number);
|
||||
@ -459,6 +467,7 @@ var defaultRelativeTime = {
|
||||
future : 'in %s',
|
||||
past : '%s ago',
|
||||
s : 'a few seconds',
|
||||
ss : '%d seconds',
|
||||
m : 'a minute',
|
||||
mm : '%d minutes',
|
||||
h : 'an hour',
|
||||
@ -641,7 +650,7 @@ function makeFormatFunction(format) {
|
||||
return function (mom) {
|
||||
var output = '', i;
|
||||
for (i = 0; i < length; i++) {
|
||||
output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
|
||||
output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
|
||||
}
|
||||
return output;
|
||||
};
|
||||
@ -844,7 +853,8 @@ var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
|
||||
var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
|
||||
function localeMonths (m, format) {
|
||||
if (!m) {
|
||||
return this._months;
|
||||
return isArray(this._months) ? this._months :
|
||||
this._months['standalone'];
|
||||
}
|
||||
return isArray(this._months) ? this._months[m.month()] :
|
||||
this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
|
||||
@ -853,7 +863,8 @@ function localeMonths (m, format) {
|
||||
var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
|
||||
function localeMonthsShort (m, format) {
|
||||
if (!m) {
|
||||
return this._monthsShort;
|
||||
return isArray(this._monthsShort) ? this._monthsShort :
|
||||
this._monthsShort['standalone'];
|
||||
}
|
||||
return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
|
||||
this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
|
||||
@ -1120,11 +1131,11 @@ function getIsLeapYear () {
|
||||
}
|
||||
|
||||
function createDate (y, m, d, h, M, s, ms) {
|
||||
//can't just apply() to create a date:
|
||||
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
|
||||
// can't just apply() to create a date:
|
||||
// https://stackoverflow.com/q/181348
|
||||
var date = new Date(y, m, d, h, M, s, ms);
|
||||
|
||||
//the date constructor remaps years 0-99 to 1900-1999
|
||||
// the date constructor remaps years 0-99 to 1900-1999
|
||||
if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
|
||||
date.setFullYear(y);
|
||||
}
|
||||
@ -1134,7 +1145,7 @@ function createDate (y, m, d, h, M, s, ms) {
|
||||
function createUTCDate (y) {
|
||||
var date = new Date(Date.UTC.apply(null, arguments));
|
||||
|
||||
//the Date.UTC function remaps years 0-99 to 1900-1999
|
||||
// the Date.UTC function remaps years 0-99 to 1900-1999
|
||||
if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
|
||||
date.setUTCFullYear(y);
|
||||
}
|
||||
@ -1151,7 +1162,7 @@ function firstWeekOffset(year, dow, doy) {
|
||||
return -fwdlw + fwd - 1;
|
||||
}
|
||||
|
||||
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
||||
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
||||
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
|
||||
var localWeekday = (7 + weekday - dow) % 7,
|
||||
weekOffset = firstWeekOffset(year, dow, doy),
|
||||
@ -1352,7 +1363,8 @@ function parseIsoWeekday(input, locale) {
|
||||
var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
|
||||
function localeWeekdays (m, format) {
|
||||
if (!m) {
|
||||
return this._weekdays;
|
||||
return isArray(this._weekdays) ? this._weekdays :
|
||||
this._weekdays['standalone'];
|
||||
}
|
||||
return isArray(this._weekdays) ? this._weekdays[m.day()] :
|
||||
this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
|
||||
@ -1672,8 +1684,10 @@ addRegexToken('a', matchMeridiem);
|
||||
addRegexToken('A', matchMeridiem);
|
||||
addRegexToken('H', match1to2);
|
||||
addRegexToken('h', match1to2);
|
||||
addRegexToken('k', match1to2);
|
||||
addRegexToken('HH', match1to2, match2);
|
||||
addRegexToken('hh', match1to2, match2);
|
||||
addRegexToken('kk', match1to2, match2);
|
||||
|
||||
addRegexToken('hmm', match3to4);
|
||||
addRegexToken('hmmss', match5to6);
|
||||
@ -1681,6 +1695,10 @@ addRegexToken('Hmm', match3to4);
|
||||
addRegexToken('Hmmss', match5to6);
|
||||
|
||||
addParseToken(['H', 'HH'], HOUR);
|
||||
addParseToken(['k', 'kk'], function (input, array, config) {
|
||||
var kInput = toInt(input);
|
||||
array[HOUR] = kInput === 24 ? 0 : kInput;
|
||||
});
|
||||
addParseToken(['a', 'A'], function (input, array, config) {
|
||||
config._isPm = config._locale.isPM(input);
|
||||
config._meridiem = input;
|
||||
@ -1751,7 +1769,7 @@ var baseConfig = {
|
||||
longDateFormat: defaultLongDateFormat,
|
||||
invalidDate: defaultInvalidDate,
|
||||
ordinal: defaultOrdinal,
|
||||
ordinalParse: defaultOrdinalParse,
|
||||
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
|
||||
relativeTime: defaultRelativeTime,
|
||||
|
||||
months: defaultLocaleMonths,
|
||||
@ -2062,6 +2080,77 @@ function configFromISO(config) {
|
||||
}
|
||||
}
|
||||
|
||||
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
||||
var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;
|
||||
|
||||
// date and time from ref 2822 format
|
||||
function configFromRFC2822(config) {
|
||||
var string, match, dayFormat,
|
||||
dateFormat, timeFormat, tzFormat;
|
||||
var timezones = {
|
||||
' GMT': ' +0000',
|
||||
' EDT': ' -0400',
|
||||
' EST': ' -0500',
|
||||
' CDT': ' -0500',
|
||||
' CST': ' -0600',
|
||||
' MDT': ' -0600',
|
||||
' MST': ' -0700',
|
||||
' PDT': ' -0700',
|
||||
' PST': ' -0800'
|
||||
};
|
||||
var military = 'YXWVUTSRQPONZABCDEFGHIKLM';
|
||||
var timezone, timezoneIndex;
|
||||
|
||||
string = config._i
|
||||
.replace(/\([^\)]*\)|[\n\t]/g, ' ') // Remove comments and folding whitespace
|
||||
.replace(/(\s\s+)/g, ' ') // Replace multiple-spaces with a single space
|
||||
.replace(/^\s|\s$/g, ''); // Remove leading and trailing spaces
|
||||
match = basicRfcRegex.exec(string);
|
||||
|
||||
if (match) {
|
||||
dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';
|
||||
dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');
|
||||
timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');
|
||||
|
||||
// TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
|
||||
if (match[1]) { // day of week given
|
||||
var momentDate = new Date(match[2]);
|
||||
var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];
|
||||
|
||||
if (match[1].substr(0,3) !== momentDay) {
|
||||
getParsingFlags(config).weekdayMismatch = true;
|
||||
config._isValid = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch (match[5].length) {
|
||||
case 2: // military
|
||||
if (timezoneIndex === 0) {
|
||||
timezone = ' +0000';
|
||||
} else {
|
||||
timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;
|
||||
timezone = ((timezoneIndex < 0) ? ' -' : ' +') +
|
||||
(('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';
|
||||
}
|
||||
break;
|
||||
case 4: // Zone
|
||||
timezone = timezones[match[5]];
|
||||
break;
|
||||
default: // UT or +/-9999
|
||||
timezone = timezones[' GMT'];
|
||||
}
|
||||
match[5] = timezone;
|
||||
config._i = match.splice(1).join('');
|
||||
tzFormat = ' ZZ';
|
||||
config._f = dayFormat + dateFormat + timeFormat + tzFormat;
|
||||
configFromStringAndFormat(config);
|
||||
getParsingFlags(config).rfc2822 = true;
|
||||
} else {
|
||||
config._isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
// date from iso format or fallback
|
||||
function configFromString(config) {
|
||||
var matched = aspNetJsonRegex.exec(config._i);
|
||||
@ -2074,13 +2163,24 @@ function configFromString(config) {
|
||||
configFromISO(config);
|
||||
if (config._isValid === false) {
|
||||
delete config._isValid;
|
||||
hooks.createFromInputFallback(config);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
configFromRFC2822(config);
|
||||
if (config._isValid === false) {
|
||||
delete config._isValid;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// Final attempt, use Input Fallback
|
||||
hooks.createFromInputFallback(config);
|
||||
}
|
||||
|
||||
hooks.createFromInputFallback = deprecate(
|
||||
'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +
|
||||
'which is not reliable across all browsers and versions. Non ISO date formats are ' +
|
||||
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
|
||||
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
|
||||
'discouraged and will be removed in an upcoming major release. Please refer to ' +
|
||||
'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
|
||||
function (config) {
|
||||
@ -2127,10 +2227,10 @@ function configFromArray (config) {
|
||||
}
|
||||
|
||||
//if the day of the year is set, figure out what it is
|
||||
if (config._dayOfYear) {
|
||||
if (config._dayOfYear != null) {
|
||||
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
|
||||
|
||||
if (config._dayOfYear > daysInYear(yearToUse)) {
|
||||
if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
|
||||
getParsingFlags(config)._overflowDayOfYear = true;
|
||||
}
|
||||
|
||||
@ -2234,6 +2334,9 @@ function dayOfYearFromWeekInfo(config) {
|
||||
// constant that refers to the ISO standard
|
||||
hooks.ISO_8601 = function () {};
|
||||
|
||||
// constant that refers to the RFC 2822 form
|
||||
hooks.RFC_2822 = function () {};
|
||||
|
||||
// date from string and format string
|
||||
function configFromStringAndFormat(config) {
|
||||
// TODO: Move this to another part of the creation flow to prevent circular deps
|
||||
@ -2241,7 +2344,10 @@ function configFromStringAndFormat(config) {
|
||||
configFromISO(config);
|
||||
return;
|
||||
}
|
||||
|
||||
if (config._f === hooks.RFC_2822) {
|
||||
configFromRFC2822(config);
|
||||
return;
|
||||
}
|
||||
config._a = [];
|
||||
getParsingFlags(config).empty = true;
|
||||
|
||||
@ -2433,7 +2539,7 @@ function prepareConfig (config) {
|
||||
|
||||
function configFromInput(config) {
|
||||
var input = config._i;
|
||||
if (input === undefined) {
|
||||
if (isUndefined(input)) {
|
||||
config._d = new Date(hooks.now());
|
||||
} else if (isDate(input)) {
|
||||
config._d = new Date(input.valueOf());
|
||||
@ -2444,7 +2550,7 @@ function configFromInput(config) {
|
||||
return parseInt(obj, 10);
|
||||
});
|
||||
configFromArray(config);
|
||||
} else if (typeof(input) === 'object') {
|
||||
} else if (isObject(input)) {
|
||||
configFromObject(config);
|
||||
} else if (isNumber(input)) {
|
||||
// from milliseconds
|
||||
@ -2545,6 +2651,38 @@ var now = function () {
|
||||
return Date.now ? Date.now() : +(new Date());
|
||||
};
|
||||
|
||||
var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
|
||||
|
||||
function isDurationValid(m) {
|
||||
for (var key in m) {
|
||||
if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var unitHasDecimal = false;
|
||||
for (var i = 0; i < ordering.length; ++i) {
|
||||
if (m[ordering[i]]) {
|
||||
if (unitHasDecimal) {
|
||||
return false; // only allow non-integers for smallest unit
|
||||
}
|
||||
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
|
||||
unitHasDecimal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function isValid$1() {
|
||||
return this._isValid;
|
||||
}
|
||||
|
||||
function createInvalid$1() {
|
||||
return createDuration(NaN);
|
||||
}
|
||||
|
||||
function Duration (duration) {
|
||||
var normalizedInput = normalizeObjectUnits(duration),
|
||||
years = normalizedInput.year || 0,
|
||||
@ -2557,6 +2695,8 @@ function Duration (duration) {
|
||||
seconds = normalizedInput.second || 0,
|
||||
milliseconds = normalizedInput.millisecond || 0;
|
||||
|
||||
this._isValid = isDurationValid(normalizedInput);
|
||||
|
||||
// representation for dateAddRemove
|
||||
this._milliseconds = +milliseconds +
|
||||
seconds * 1e3 + // 1000
|
||||
@ -2680,7 +2820,7 @@ hooks.updateOffset = function () {};
|
||||
// a second time. In case it wants us to change the offset again
|
||||
// _changeInProgress == true case, then we have to adjust, because
|
||||
// there is no such time in the given timezone.
|
||||
function getSetOffset (input, keepLocalTime) {
|
||||
function getSetOffset (input, keepLocalTime, keepMinutes) {
|
||||
var offset = this._offset || 0,
|
||||
localAdjust;
|
||||
if (!this.isValid()) {
|
||||
@ -2692,7 +2832,7 @@ function getSetOffset (input, keepLocalTime) {
|
||||
if (input === null) {
|
||||
return this;
|
||||
}
|
||||
} else if (Math.abs(input) < 16) {
|
||||
} else if (Math.abs(input) < 16 && !keepMinutes) {
|
||||
input = input * 60;
|
||||
}
|
||||
if (!this._isUTC && keepLocalTime) {
|
||||
@ -2750,7 +2890,7 @@ function setOffsetToLocal (keepLocalTime) {
|
||||
|
||||
function setOffsetToParsedOffset () {
|
||||
if (this._tzm != null) {
|
||||
this.utcOffset(this._tzm);
|
||||
this.utcOffset(this._tzm, false, true);
|
||||
} else if (typeof this._i === 'string') {
|
||||
var tZone = offsetFromString(matchOffset, this._i);
|
||||
if (tZone != null) {
|
||||
@ -2882,6 +3022,7 @@ function createDuration (input, key) {
|
||||
}
|
||||
|
||||
createDuration.fn = Duration.prototype;
|
||||
createDuration.invalid = createInvalid$1;
|
||||
|
||||
function parseIso (inp, sign) {
|
||||
// We'd normally use ~~inp for this, but unfortunately it also
|
||||
@ -3118,18 +3259,19 @@ function toString () {
|
||||
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
|
||||
}
|
||||
|
||||
function toISOString () {
|
||||
function toISOString() {
|
||||
if (!this.isValid()) {
|
||||
return null;
|
||||
}
|
||||
var m = this.clone().utc();
|
||||
if (0 < m.year() && m.year() <= 9999) {
|
||||
if (isFunction(Date.prototype.toISOString)) {
|
||||
// native implementation is ~50x faster, use it when we can
|
||||
return this.toDate().toISOString();
|
||||
} else {
|
||||
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
|
||||
}
|
||||
} else {
|
||||
if (m.year() < 0 || m.year() > 9999) {
|
||||
return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
|
||||
}
|
||||
if (isFunction(Date.prototype.toISOString)) {
|
||||
// native implementation is ~50x faster, use it when we can
|
||||
return this.toDate().toISOString();
|
||||
}
|
||||
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3149,7 +3291,7 @@ function inspect () {
|
||||
zone = 'Z';
|
||||
}
|
||||
var prefix = '[' + func + '("]';
|
||||
var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
|
||||
var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
|
||||
var datetime = '-MM-DD[T]HH:mm:ss.SSS';
|
||||
var suffix = zone + '[")]';
|
||||
|
||||
@ -3317,7 +3459,7 @@ function toJSON () {
|
||||
return this.isValid() ? this.toISOString() : null;
|
||||
}
|
||||
|
||||
function isValid$1 () {
|
||||
function isValid$2 () {
|
||||
return isValid(this);
|
||||
}
|
||||
|
||||
@ -3477,7 +3619,10 @@ addUnitPriority('date', 9);
|
||||
addRegexToken('D', match1to2);
|
||||
addRegexToken('DD', match1to2, match2);
|
||||
addRegexToken('Do', function (isStrict, locale) {
|
||||
return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
|
||||
// TODO: Remove "ordinalParse" fallback in next major release.
|
||||
return isStrict ?
|
||||
(locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
|
||||
locale._dayOfMonthOrdinalParseLenient;
|
||||
});
|
||||
|
||||
addParseToken(['D', 'DD'], DATE);
|
||||
@ -3657,7 +3802,7 @@ proto.isBetween = isBetween;
|
||||
proto.isSame = isSame;
|
||||
proto.isSameOrAfter = isSameOrAfter;
|
||||
proto.isSameOrBefore = isSameOrBefore;
|
||||
proto.isValid = isValid$1;
|
||||
proto.isValid = isValid$2;
|
||||
proto.lang = lang;
|
||||
proto.locale = locale;
|
||||
proto.localeData = localeData;
|
||||
@ -3882,7 +4027,7 @@ function listWeekdaysMin (localeSorted, format, index) {
|
||||
}
|
||||
|
||||
getSetGlobalLocale('en', {
|
||||
ordinalParse: /\d{1,2}(th|st|nd|rd)/,
|
||||
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
|
||||
ordinal : function (number) {
|
||||
var b = number % 10,
|
||||
output = (toInt(number % 100 / 10) === 1) ? 'th' :
|
||||
@ -4003,6 +4148,9 @@ function monthsToDays (months) {
|
||||
}
|
||||
|
||||
function as (units) {
|
||||
if (!this.isValid()) {
|
||||
return NaN;
|
||||
}
|
||||
var days;
|
||||
var months;
|
||||
var milliseconds = this._milliseconds;
|
||||
@ -4031,6 +4179,9 @@ function as (units) {
|
||||
|
||||
// TODO: Use this.as('ms')?
|
||||
function valueOf$1 () {
|
||||
if (!this.isValid()) {
|
||||
return NaN;
|
||||
}
|
||||
return (
|
||||
this._milliseconds +
|
||||
this._days * 864e5 +
|
||||
@ -4056,12 +4207,12 @@ var asYears = makeAs('y');
|
||||
|
||||
function get$2 (units) {
|
||||
units = normalizeUnits(units);
|
||||
return this[units + 's']();
|
||||
return this.isValid() ? this[units + 's']() : NaN;
|
||||
}
|
||||
|
||||
function makeGetter(name) {
|
||||
return function () {
|
||||
return this._data[name];
|
||||
return this.isValid() ? this._data[name] : NaN;
|
||||
};
|
||||
}
|
||||
|
||||
@ -4079,11 +4230,12 @@ function weeks () {
|
||||
|
||||
var round = Math.round;
|
||||
var thresholds = {
|
||||
s: 45, // seconds to minute
|
||||
m: 45, // minutes to hour
|
||||
h: 22, // hours to day
|
||||
d: 26, // days to month
|
||||
M: 11 // months to year
|
||||
ss: 44, // a few seconds to seconds
|
||||
s : 45, // seconds to minute
|
||||
m : 45, // minutes to hour
|
||||
h : 22, // hours to day
|
||||
d : 26, // days to month
|
||||
M : 11 // months to year
|
||||
};
|
||||
|
||||
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
||||
@ -4100,16 +4252,17 @@ function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
|
||||
var months = round(duration.as('M'));
|
||||
var years = round(duration.as('y'));
|
||||
|
||||
var a = seconds < thresholds.s && ['s', seconds] ||
|
||||
minutes <= 1 && ['m'] ||
|
||||
minutes < thresholds.m && ['mm', minutes] ||
|
||||
hours <= 1 && ['h'] ||
|
||||
hours < thresholds.h && ['hh', hours] ||
|
||||
days <= 1 && ['d'] ||
|
||||
days < thresholds.d && ['dd', days] ||
|
||||
months <= 1 && ['M'] ||
|
||||
months < thresholds.M && ['MM', months] ||
|
||||
years <= 1 && ['y'] || ['yy', years];
|
||||
var a = seconds <= thresholds.ss && ['s', seconds] ||
|
||||
seconds < thresholds.s && ['ss', seconds] ||
|
||||
minutes <= 1 && ['m'] ||
|
||||
minutes < thresholds.m && ['mm', minutes] ||
|
||||
hours <= 1 && ['h'] ||
|
||||
hours < thresholds.h && ['hh', hours] ||
|
||||
days <= 1 && ['d'] ||
|
||||
days < thresholds.d && ['dd', days] ||
|
||||
months <= 1 && ['M'] ||
|
||||
months < thresholds.M && ['MM', months] ||
|
||||
years <= 1 && ['y'] || ['yy', years];
|
||||
|
||||
a[2] = withoutSuffix;
|
||||
a[3] = +posNegDuration > 0;
|
||||
@ -4138,10 +4291,17 @@ function getSetRelativeTimeThreshold (threshold, limit) {
|
||||
return thresholds[threshold];
|
||||
}
|
||||
thresholds[threshold] = limit;
|
||||
if (threshold === 's') {
|
||||
thresholds.ss = limit - 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function humanize (withSuffix) {
|
||||
if (!this.isValid()) {
|
||||
return this.localeData().invalidDate();
|
||||
}
|
||||
|
||||
var locale = this.localeData();
|
||||
var output = relativeTime$1(this, !withSuffix, locale);
|
||||
|
||||
@ -4162,6 +4322,10 @@ function toISOString$1() {
|
||||
// This is because there is no context-free conversion between hours and days
|
||||
// (think of clock changes)
|
||||
// and also not between days and months (28-31 days per month)
|
||||
if (!this.isValid()) {
|
||||
return this.localeData().invalidDate();
|
||||
}
|
||||
|
||||
var seconds = abs$1(this._milliseconds) / 1000;
|
||||
var days = abs$1(this._days);
|
||||
var months = abs$1(this._months);
|
||||
@ -4206,6 +4370,7 @@ function toISOString$1() {
|
||||
|
||||
var proto$2 = Duration.prototype;
|
||||
|
||||
proto$2.isValid = isValid$1;
|
||||
proto$2.abs = abs;
|
||||
proto$2.add = add$1;
|
||||
proto$2.subtract = subtract$1;
|
||||
@ -4261,7 +4426,7 @@ addParseToken('x', function (input, array, config) {
|
||||
// Side effect imports
|
||||
|
||||
|
||||
hooks.version = '2.16.0';
|
||||
hooks.version = '2.18.1';
|
||||
|
||||
setHookCallback(createLocal);
|
||||
|
||||
|
@ -33,12 +33,28 @@ export class AppComponent {
|
||||
this.counterparty = this.httpWrapperService.setCounterparty(value.id);
|
||||
}
|
||||
|
||||
public renderX500Name(x500Name) {
|
||||
var name = x500Name;
|
||||
x500Name.split(',').forEach(function (element) {
|
||||
var keyValue = element.split('=');
|
||||
if (keyValue[0].toUpperCase() == 'CN') {
|
||||
name = keyValue[1];
|
||||
}
|
||||
});
|
||||
return name;
|
||||
}
|
||||
|
||||
private counterparty: any = null;
|
||||
|
||||
ngOnInit() {
|
||||
this.httpWrapperService.getAbsolute("whoami").toPromise().then((data) => {
|
||||
this.whoAmI = data.self.text;
|
||||
this.counterParties = data.counterparties;
|
||||
this.whoAmI = this.renderX500Name(data.self.text);
|
||||
this.counterParties = data.counterparties.map(function (x) {
|
||||
return {
|
||||
id: x.id,
|
||||
text: this.renderX500Name(x.text)
|
||||
};
|
||||
});
|
||||
if (this.counterParties.length == 0) {
|
||||
console.log("/whoami is returning no counterparties, the whole app won't run", data);
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ export class CommonModel {
|
||||
exposure: Object = null;
|
||||
localBusinessDay: Object = null;
|
||||
dailyInterestAmount: string = null;
|
||||
hashLegalDocs: string = null;
|
||||
tradeID: string = null;
|
||||
eligibleCurrency: string;
|
||||
}
|
||||
|
@ -27,10 +27,6 @@
|
||||
<td>Valuation Date</td>
|
||||
<td>{{deal.common.valuationDate}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Legal Document Hash</td>
|
||||
<td>{{deal.common.hashLegalDocs}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interest Rates</td>
|
||||
<td>
|
||||
|
@ -30,5 +30,4 @@ export class CommonViewModel {
|
||||
exposure = {};
|
||||
localBusinessDay = [ "London" , "NewYork" ];
|
||||
dailyInterestAmount = "(CashAmount * InterestRate ) / (fixedLeg.notional.token.currencyCode.equals('GBP')) ? 365 : 360";
|
||||
hashLegalDocs = "put hash here";
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
export class FixedLegViewModel {
|
||||
constructor() { }
|
||||
|
||||
fixedRatePayer = "Bank A";
|
||||
fixedRatePayer = "CN=Bank A,O=Bank A,L=London,C=GB";
|
||||
notional: Object = {
|
||||
quantity: 2500000000
|
||||
};
|
||||
|
@ -1,10 +0,0 @@
|
||||
package net.corda.testing
|
||||
|
||||
import net.corda.core.contracts.Contract
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
|
||||
class AlwaysSucceedContract(override val legalContractReference: SecureHash = SecureHash.sha256("Always succeed contract")) : Contract {
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package net.corda.testing.contracts
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
@ -11,7 +10,7 @@ import net.corda.core.transactions.TransactionBuilder
|
||||
|
||||
val DUMMY_PROGRAM_ID = DummyContract()
|
||||
|
||||
data class DummyContract(override val legalContractReference: SecureHash = SecureHash.sha256("")) : Contract {
|
||||
data class DummyContract(private val blank: Void? = null) : Contract {
|
||||
interface State : ContractState {
|
||||
val magicNumber: Int
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.corda.testing.contracts
|
||||
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.flows.ContractUpgradeFlow
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.transactions.LedgerTransaction
|
||||
@ -36,9 +35,6 @@ class DummyContractV2 : UpgradedContract<DummyContract.State, DummyContractV2.St
|
||||
if (tx.commands.any { it.value is UpgradeCommand }) ContractUpgradeFlow.verify(tx)
|
||||
// Other verifications.
|
||||
}
|
||||
|
||||
// The "empty contract"
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("")
|
||||
// DOCEND 1
|
||||
/**
|
||||
* Generate an upgrade transaction from [DummyContract].
|
||||
|
@ -3,7 +3,6 @@ package net.corda.testing.contracts
|
||||
import net.corda.contracts.DealState
|
||||
import net.corda.core.contracts.Contract
|
||||
import net.corda.core.contracts.UniqueIdentifier
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.containsAny
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
@ -16,8 +15,6 @@ import net.corda.testing.schemas.DummyDealStateSchemaV1
|
||||
import java.security.PublicKey
|
||||
|
||||
class DummyDealContract : Contract {
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("TestDeal")
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {}
|
||||
|
||||
data class State(
|
||||
|
@ -17,8 +17,6 @@ import java.time.LocalDateTime
|
||||
import java.time.ZoneOffset.UTC
|
||||
|
||||
class DummyLinearContract : Contract {
|
||||
override val legalContractReference: SecureHash = SecureHash.sha256("Test")
|
||||
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
val inputs = tx.inputs.map { it.state.data }.filterIsInstance<State>()
|
||||
val outputs = tx.outputs.map { it.data }.filterIsInstance<State>()
|
||||
|
Loading…
Reference in New Issue
Block a user