@open-captable-protocol/canton 0.2.90 → 0.2.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/OcpClient.d.ts +24 -24
- package/dist/OcpClient.d.ts.map +1 -1
- package/dist/OcpClient.js +55 -55
- package/dist/OcpClient.js.map +1 -1
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/addFunds.d.ts +1 -1
- package/dist/functions/PaymentStreams/activePaymentStream/addFunds.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/addFunds.js +3 -3
- package/dist/functions/PaymentStreams/activePaymentStream/addFunds.js.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/archiveInactivePaymentStream.d.ts +7 -0
- package/dist/functions/PaymentStreams/activePaymentStream/archiveInactivePaymentStream.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/archiveInactivePaymentStream.js +17 -0
- package/dist/functions/PaymentStreams/activePaymentStream/archiveInactivePaymentStream.js.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/cancel.d.ts +10 -0
- package/dist/functions/PaymentStreams/activePaymentStream/cancel.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/cancel.js +21 -0
- package/dist/functions/PaymentStreams/activePaymentStream/cancel.js.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/changeParty.d.ts +10 -0
- package/dist/functions/PaymentStreams/activePaymentStream/changeParty.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/activePaymentStream/changeParty.js +19 -0
- package/dist/functions/PaymentStreams/activePaymentStream/changeParty.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/index.d.ts +5 -5
- package/dist/functions/PaymentStreams/activePaymentStream/index.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/index.js +4 -4
- package/dist/functions/PaymentStreams/activePaymentStream/index.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/processFreeTrial.d.ts +1 -1
- package/dist/functions/PaymentStreams/activePaymentStream/processFreeTrial.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/processFreeTrial.js +3 -3
- package/dist/functions/PaymentStreams/activePaymentStream/processFreeTrial.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/processPayment.d.ts +2 -1
- package/dist/functions/PaymentStreams/activePaymentStream/processPayment.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/processPayment.js +4 -3
- package/dist/functions/PaymentStreams/activePaymentStream/processPayment.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/proposeChanges.d.ts +8 -8
- package/dist/functions/PaymentStreams/activePaymentStream/proposeChanges.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/proposeChanges.js +10 -10
- package/dist/functions/PaymentStreams/activePaymentStream/proposeChanges.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/refund.d.ts +3 -3
- package/dist/functions/PaymentStreams/activePaymentStream/refund.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/refund.js +5 -5
- package/dist/functions/PaymentStreams/activePaymentStream/refund.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/replaceLockedAmulet.d.ts +1 -1
- package/dist/functions/PaymentStreams/activePaymentStream/replaceLockedAmulet.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/replaceLockedAmulet.js +3 -3
- package/dist/functions/PaymentStreams/activePaymentStream/replaceLockedAmulet.js.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/withdrawFunds.d.ts +1 -1
- package/dist/functions/PaymentStreams/activePaymentStream/withdrawFunds.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/activeSubscription → PaymentStreams/activePaymentStream}/withdrawFunds.js +3 -3
- package/dist/functions/PaymentStreams/activePaymentStream/withdrawFunds.js.map +1 -0
- package/dist/functions/PaymentStreams/index.d.ts +16 -0
- package/dist/functions/PaymentStreams/index.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/index.js +58 -0
- package/dist/functions/PaymentStreams/index.js.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/approve.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/partyMigrationProposal/approve.js +1 -1
- package/dist/functions/PaymentStreams/partyMigrationProposal/approve.js.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/archive.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/partyMigrationProposal/archive.js +1 -1
- package/dist/functions/PaymentStreams/partyMigrationProposal/archive.js.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/index.d.ts +5 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/index.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/partyMigrationProposal/index.js +2 -2
- package/dist/functions/PaymentStreams/partyMigrationProposal/index.js.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateActivePaymentStream.d.ts +8 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateActivePaymentStream.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateActivePaymentStream.js +18 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateActivePaymentStream.js.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateProposedPaymentStream.d.ts +8 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateProposedPaymentStream.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateProposedPaymentStream.js +18 -0
- package/dist/functions/PaymentStreams/partyMigrationProposal/migrateProposedPaymentStream.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/apply.d.ts +8 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/apply.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/apply.js +18 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/apply.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/approve.d.ts +7 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/approve.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/approve.js +17 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/approve.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/index.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/index.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/reject.d.ts +8 -0
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/reject.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/subscriptionChangeProposal → PaymentStreams/paymentStreamChangeProposal}/reject.js +4 -4
- package/dist/functions/PaymentStreams/paymentStreamChangeProposal/reject.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamFactory/createPaymentStreamProposal.d.ts +36 -0
- package/dist/functions/PaymentStreams/paymentStreamFactory/createPaymentStreamProposal.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/subscriptionFactory/createSubscriptionProposal.js → PaymentStreams/paymentStreamFactory/createPaymentStreamProposal.js} +14 -14
- package/dist/functions/PaymentStreams/paymentStreamFactory/createPaymentStreamProposal.js.map +1 -0
- package/dist/functions/PaymentStreams/paymentStreamFactory/index.d.ts +2 -0
- package/dist/functions/PaymentStreams/paymentStreamFactory/index.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/subscriptionFactory → PaymentStreams/paymentStreamFactory}/index.js +1 -1
- package/dist/functions/PaymentStreams/paymentStreamFactory/index.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/approve.d.ts +7 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/approve.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/approve.js +19 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/approve.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/changeParty.d.ts +10 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/changeParty.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/changeParty.js +19 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/changeParty.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/editPaymentStreamProposal.d.ts +27 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/editPaymentStreamProposal.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/proposedSubscription/editSubscriptionProposal.js → PaymentStreams/proposedPaymentStream/editPaymentStreamProposal.js} +14 -14
- package/dist/functions/PaymentStreams/proposedPaymentStream/editPaymentStreamProposal.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/index.d.ts +6 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/index.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/proposedSubscription → PaymentStreams/proposedPaymentStream}/index.js +2 -2
- package/dist/functions/PaymentStreams/proposedPaymentStream/index.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/startPaymentStream.d.ts +8 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/startPaymentStream.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/proposedSubscription/startSubscription.js → PaymentStreams/proposedPaymentStream/startPaymentStream.js} +6 -6
- package/dist/functions/PaymentStreams/proposedPaymentStream/startPaymentStream.js.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/withdraw.d.ts +8 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/withdraw.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/withdraw.js +19 -0
- package/dist/functions/PaymentStreams/proposedPaymentStream/withdraw.js.map +1 -0
- package/dist/functions/{Subscriptions/types/activeSubscription.d.ts → PaymentStreams/types/activePaymentStream.d.ts} +19 -19
- package/dist/functions/PaymentStreams/types/activePaymentStream.d.ts.map +1 -0
- package/dist/functions/{Subscriptions/types/activeSubscription.js → PaymentStreams/types/activePaymentStream.js} +10 -10
- package/dist/functions/PaymentStreams/types/activePaymentStream.js.map +1 -0
- package/dist/functions/PaymentStreams/types/index.d.ts +4 -0
- package/dist/functions/PaymentStreams/types/index.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/types/index.js +2 -2
- package/dist/functions/PaymentStreams/types/index.js.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/types/lockFundsInput.d.ts +1 -1
- package/dist/functions/PaymentStreams/types/lockFundsInput.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/types/lockFundsInput.js.map +1 -0
- package/dist/functions/{Subscriptions/types/proposedSubscription.d.ts → PaymentStreams/types/proposedPaymentStream.d.ts} +23 -23
- package/dist/functions/PaymentStreams/types/proposedPaymentStream.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/types/proposedPaymentStream.js +48 -0
- package/dist/functions/PaymentStreams/types/proposedPaymentStream.js.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/disclosedContracts.d.ts +3 -3
- package/dist/functions/PaymentStreams/utils/disclosedContracts.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/disclosedContracts.js +8 -8
- package/dist/functions/PaymentStreams/utils/disclosedContracts.js.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/factoryContractId.d.ts +3 -3
- package/dist/functions/PaymentStreams/utils/factoryContractId.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/factoryContractId.js +5 -5
- package/dist/functions/PaymentStreams/utils/factoryContractId.js.map +1 -0
- package/dist/functions/PaymentStreams/utils/index.d.ts.map +1 -0
- package/dist/functions/PaymentStreams/utils/index.js.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/paymentContext.d.ts +9 -9
- package/dist/functions/PaymentStreams/utils/paymentContext.d.ts.map +1 -0
- package/dist/functions/{Subscriptions → PaymentStreams}/utils/paymentContext.js +41 -29
- package/dist/functions/PaymentStreams/utils/paymentContext.js.map +1 -0
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +1 -1
- package/dist/functions/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/functions/Subscriptions/activeSubscription/addFunds.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/addFunds.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.d.ts +0 -7
- package/dist/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.js +0 -17
- package/dist/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/cancel.d.ts +0 -11
- package/dist/functions/Subscriptions/activeSubscription/cancel.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/cancel.js +0 -25
- package/dist/functions/Subscriptions/activeSubscription/cancel.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/changeParty.d.ts +0 -10
- package/dist/functions/Subscriptions/activeSubscription/changeParty.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/changeParty.js +0 -19
- package/dist/functions/Subscriptions/activeSubscription/changeParty.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/index.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/processFreeTrial.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/processFreeTrial.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/processPayment.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/processPayment.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/proposeChanges.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/proposeChanges.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/refund.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/refund.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/replaceLockedAmulet.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/replaceLockedAmulet.js.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/withdrawFunds.d.ts.map +0 -1
- package/dist/functions/Subscriptions/activeSubscription/withdrawFunds.js.map +0 -1
- package/dist/functions/Subscriptions/index.d.ts +0 -16
- package/dist/functions/Subscriptions/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/index.js +0 -58
- package/dist/functions/Subscriptions/index.js.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/approve.d.ts.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/approve.js.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/archive.d.ts.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/archive.js.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/index.d.ts +0 -5
- package/dist/functions/Subscriptions/partyMigrationProposal/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/index.js.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateActiveSubscription.d.ts +0 -8
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateActiveSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateActiveSubscription.js +0 -18
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateActiveSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateProposedSubscription.d.ts +0 -8
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateProposedSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateProposedSubscription.js +0 -18
- package/dist/functions/Subscriptions/partyMigrationProposal/migrateProposedSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/approve.d.ts +0 -7
- package/dist/functions/Subscriptions/proposedSubscription/approve.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/approve.js +0 -19
- package/dist/functions/Subscriptions/proposedSubscription/approve.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/changeParty.d.ts +0 -10
- package/dist/functions/Subscriptions/proposedSubscription/changeParty.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/changeParty.js +0 -19
- package/dist/functions/Subscriptions/proposedSubscription/changeParty.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/editSubscriptionProposal.d.ts +0 -27
- package/dist/functions/Subscriptions/proposedSubscription/editSubscriptionProposal.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/editSubscriptionProposal.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/index.d.ts +0 -6
- package/dist/functions/Subscriptions/proposedSubscription/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/index.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/startSubscription.d.ts +0 -8
- package/dist/functions/Subscriptions/proposedSubscription/startSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/startSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/withdraw.d.ts +0 -8
- package/dist/functions/Subscriptions/proposedSubscription/withdraw.d.ts.map +0 -1
- package/dist/functions/Subscriptions/proposedSubscription/withdraw.js +0 -19
- package/dist/functions/Subscriptions/proposedSubscription/withdraw.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/apply.d.ts +0 -8
- package/dist/functions/Subscriptions/subscriptionChangeProposal/apply.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/apply.js +0 -18
- package/dist/functions/Subscriptions/subscriptionChangeProposal/apply.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/approve.d.ts +0 -7
- package/dist/functions/Subscriptions/subscriptionChangeProposal/approve.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/approve.js +0 -17
- package/dist/functions/Subscriptions/subscriptionChangeProposal/approve.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/index.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/reject.d.ts +0 -8
- package/dist/functions/Subscriptions/subscriptionChangeProposal/reject.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionChangeProposal/reject.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionFactory/createSubscriptionProposal.d.ts +0 -36
- package/dist/functions/Subscriptions/subscriptionFactory/createSubscriptionProposal.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionFactory/createSubscriptionProposal.js.map +0 -1
- package/dist/functions/Subscriptions/subscriptionFactory/index.d.ts +0 -2
- package/dist/functions/Subscriptions/subscriptionFactory/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/subscriptionFactory/index.js.map +0 -1
- package/dist/functions/Subscriptions/types/activeSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/types/activeSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/types/index.d.ts +0 -4
- package/dist/functions/Subscriptions/types/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/types/index.js.map +0 -1
- package/dist/functions/Subscriptions/types/lockFundsInput.d.ts.map +0 -1
- package/dist/functions/Subscriptions/types/lockFundsInput.js.map +0 -1
- package/dist/functions/Subscriptions/types/proposedSubscription.d.ts.map +0 -1
- package/dist/functions/Subscriptions/types/proposedSubscription.js +0 -49
- package/dist/functions/Subscriptions/types/proposedSubscription.js.map +0 -1
- package/dist/functions/Subscriptions/utils/disclosedContracts.d.ts.map +0 -1
- package/dist/functions/Subscriptions/utils/disclosedContracts.js.map +0 -1
- package/dist/functions/Subscriptions/utils/factoryContractId.d.ts.map +0 -1
- package/dist/functions/Subscriptions/utils/factoryContractId.js.map +0 -1
- package/dist/functions/Subscriptions/utils/index.d.ts.map +0 -1
- package/dist/functions/Subscriptions/utils/index.js.map +0 -1
- package/dist/functions/Subscriptions/utils/paymentContext.d.ts.map +0 -1
- package/dist/functions/Subscriptions/utils/paymentContext.js.map +0 -1
- /package/dist/functions/{Subscriptions → PaymentStreams}/partyMigrationProposal/approve.d.ts +0 -0
- /package/dist/functions/{Subscriptions → PaymentStreams}/partyMigrationProposal/archive.d.ts +0 -0
- /package/dist/functions/{Subscriptions/subscriptionChangeProposal → PaymentStreams/paymentStreamChangeProposal}/index.d.ts +0 -0
- /package/dist/functions/{Subscriptions/subscriptionChangeProposal → PaymentStreams/paymentStreamChangeProposal}/index.js +0 -0
- /package/dist/functions/{Subscriptions → PaymentStreams}/types/lockFundsInput.js +0 -0
- /package/dist/functions/{Subscriptions → PaymentStreams}/utils/index.d.ts +0 -0
- /package/dist/functions/{Subscriptions → PaymentStreams}/utils/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./activePaymentStream"), exports);
|
|
18
18
|
__exportStar(require("./lockFundsInput"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./proposedPaymentStream"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,mDAAiC;AACjC,0DAAwC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PaymentContext } from '../utils/paymentContext';
|
|
2
|
-
/** Input for locking funds in a
|
|
2
|
+
/** Input for locking funds in a paymentStream Used when creating or adding funds to a paymentStream */
|
|
3
3
|
export interface LockFundsInput {
|
|
4
4
|
amuletInputs: string[];
|
|
5
5
|
amountToLock: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockFundsInput.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/lockFundsInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,uGAAuG;AACvG,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockFundsInput.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/lockFundsInput.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/** Type definitions for
|
|
2
|
-
export interface
|
|
3
|
-
|
|
1
|
+
/** Type definitions for ProposedPaymentStream contracts */
|
|
2
|
+
export interface PaymentStreamProposal {
|
|
3
|
+
payer: string;
|
|
4
4
|
recipient: string;
|
|
5
5
|
provider: string;
|
|
6
6
|
recipientPaymentPerDay: {
|
|
@@ -31,51 +31,51 @@ export interface SubscriptionProposal {
|
|
|
31
31
|
metadata?: Record<string, string>;
|
|
32
32
|
}
|
|
33
33
|
export interface Approvals {
|
|
34
|
-
|
|
34
|
+
payerApproved: boolean;
|
|
35
35
|
recipientApproved: boolean;
|
|
36
36
|
processorApproved: boolean;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
39
|
-
|
|
38
|
+
export interface ProposedPaymentStreamPayload {
|
|
39
|
+
paymentStreamProposal: PaymentStreamProposal;
|
|
40
40
|
processorContext: {
|
|
41
41
|
processor: string;
|
|
42
42
|
dso: string;
|
|
43
43
|
};
|
|
44
44
|
approvals: Approvals;
|
|
45
45
|
}
|
|
46
|
-
export interface
|
|
46
|
+
export interface ProposedPaymentStreamContract {
|
|
47
47
|
contractId: string;
|
|
48
|
-
payload:
|
|
48
|
+
payload: ProposedPaymentStreamPayload;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Check if a proposed
|
|
51
|
+
* Check if a proposed paymentStream is pending recipient approval
|
|
52
52
|
*
|
|
53
|
-
* @param proposal - The proposed
|
|
53
|
+
* @param proposal - The proposed paymentStream contract
|
|
54
54
|
* @param recipientPartyId - The recipient party ID to check
|
|
55
55
|
* @returns True if the proposal is pending the recipient's approval
|
|
56
56
|
*/
|
|
57
|
-
export declare function isProposalPendingRecipientApproval(proposal:
|
|
57
|
+
export declare function isProposalPendingRecipientApproval(proposal: ProposedPaymentStreamContract, recipientPartyId: string): boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Check if a proposed
|
|
59
|
+
* Check if a proposed paymentStream is pending payer approval
|
|
60
60
|
*
|
|
61
|
-
* @param proposal - The proposed
|
|
62
|
-
* @param
|
|
63
|
-
* @returns True if the proposal is pending the
|
|
61
|
+
* @param proposal - The proposed paymentStream contract
|
|
62
|
+
* @param payerPartyId - The payer party ID to check
|
|
63
|
+
* @returns True if the proposal is pending the payer's approval
|
|
64
64
|
*/
|
|
65
|
-
export declare function
|
|
65
|
+
export declare function isProposalPendingPayerApproval(proposal: ProposedPaymentStreamContract, payerPartyId: string): boolean;
|
|
66
66
|
/**
|
|
67
|
-
* Check if a proposed
|
|
67
|
+
* Check if a proposed paymentStream is pending processor approval
|
|
68
68
|
*
|
|
69
|
-
* @param proposal - The proposed
|
|
69
|
+
* @param proposal - The proposed paymentStream contract
|
|
70
70
|
* @param processorPartyId - The processor party ID to check
|
|
71
71
|
* @returns True if the proposal is pending the processor's approval
|
|
72
72
|
*/
|
|
73
|
-
export declare function isProposalPendingProcessorApproval(proposal:
|
|
73
|
+
export declare function isProposalPendingProcessorApproval(proposal: ProposedPaymentStreamContract, processorPartyId: string): boolean;
|
|
74
74
|
/**
|
|
75
|
-
* Check if all parties have approved the
|
|
75
|
+
* Check if all parties have approved the paymentStream proposal
|
|
76
76
|
*
|
|
77
|
-
* @param proposal - The proposed
|
|
77
|
+
* @param proposal - The proposed paymentStream contract
|
|
78
78
|
* @returns True if all parties have approved
|
|
79
79
|
*/
|
|
80
|
-
export declare function
|
|
81
|
-
//# sourceMappingURL=
|
|
80
|
+
export declare function areAllNonPayerPartiesApproved(proposal: ProposedPaymentStreamContract): boolean;
|
|
81
|
+
//# sourceMappingURL=proposedPaymentStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposedPaymentStream.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/proposedPaymentStream.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE;QACtB,GAAG,EAAE,cAAc,GAAG,WAAW,CAAC;QAClC,KAAK,EAAE,MAAM,CAAC;KACf,CA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AAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAErH;AAED;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,6BAA6B,EACvC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,6BAA6B,GAAG,OAAO,CAE9F"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Type definitions for ProposedPaymentStream contracts */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isProposalPendingRecipientApproval = isProposalPendingRecipientApproval;
|
|
5
|
+
exports.isProposalPendingPayerApproval = isProposalPendingPayerApproval;
|
|
6
|
+
exports.isProposalPendingProcessorApproval = isProposalPendingProcessorApproval;
|
|
7
|
+
exports.areAllNonPayerPartiesApproved = areAllNonPayerPartiesApproved;
|
|
8
|
+
/**
|
|
9
|
+
* Check if a proposed paymentStream is pending recipient approval
|
|
10
|
+
*
|
|
11
|
+
* @param proposal - The proposed paymentStream contract
|
|
12
|
+
* @param recipientPartyId - The recipient party ID to check
|
|
13
|
+
* @returns True if the proposal is pending the recipient's approval
|
|
14
|
+
*/
|
|
15
|
+
function isProposalPendingRecipientApproval(proposal, recipientPartyId) {
|
|
16
|
+
return (proposal.payload.paymentStreamProposal.recipient === recipientPartyId &&
|
|
17
|
+
!proposal.payload.approvals.recipientApproved);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a proposed paymentStream is pending payer approval
|
|
21
|
+
*
|
|
22
|
+
* @param proposal - The proposed paymentStream contract
|
|
23
|
+
* @param payerPartyId - The payer party ID to check
|
|
24
|
+
* @returns True if the proposal is pending the payer's approval
|
|
25
|
+
*/
|
|
26
|
+
function isProposalPendingPayerApproval(proposal, payerPartyId) {
|
|
27
|
+
return proposal.payload.paymentStreamProposal.payer === payerPartyId && !proposal.payload.approvals.payerApproved;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Check if a proposed paymentStream is pending processor approval
|
|
31
|
+
*
|
|
32
|
+
* @param proposal - The proposed paymentStream contract
|
|
33
|
+
* @param processorPartyId - The processor party ID to check
|
|
34
|
+
* @returns True if the proposal is pending the processor's approval
|
|
35
|
+
*/
|
|
36
|
+
function isProposalPendingProcessorApproval(proposal, processorPartyId) {
|
|
37
|
+
return (proposal.payload.processorContext.processor === processorPartyId && !proposal.payload.approvals.processorApproved);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if all parties have approved the paymentStream proposal
|
|
41
|
+
*
|
|
42
|
+
* @param proposal - The proposed paymentStream contract
|
|
43
|
+
* @returns True if all parties have approved
|
|
44
|
+
*/
|
|
45
|
+
function areAllNonPayerPartiesApproved(proposal) {
|
|
46
|
+
return proposal.payload.approvals.recipientApproved && proposal.payload.approvals.processorApproved;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=proposedPaymentStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposedPaymentStream.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/types/proposedPaymentStream.ts"],"names":[],"mappings":";AAAA,2DAA2D;;AAwD3D,gFAQC;AASD,wEAEC;AASD,gFAOC;AAQD,sEAEC;AApDD;;;;;;GAMG;AACH,SAAgB,kCAAkC,CAChD,QAAuC,EACvC,gBAAwB;IAExB,OAAO,CACL,QAAQ,CAAC,OAAO,CAAC,qBAAqB,CAAC,SAAS,KAAK,gBAAgB;QACrE,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAC9C,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,8BAA8B,CAAC,QAAuC,EAAE,YAAoB;IAC1G,OAAO,QAAQ,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;AACpH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kCAAkC,CAChD,QAAuC,EACvC,gBAAwB;IAExB,OAAO,CACL,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,KAAK,gBAAgB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAClH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAC,QAAuC;IACnF,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,IAAI,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC;AACtG,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Utilities for handling disclosed contracts in
|
|
1
|
+
/** Utilities for handling disclosed contracts in paymentStream workflows */
|
|
2
2
|
import type { DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
3
3
|
import type { OcpClient } from '../../../OcpClient';
|
|
4
4
|
/**
|
|
@@ -7,8 +7,8 @@ import type { OcpClient } from '../../../OcpClient';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function getFactoryDisclosedContracts(client: OcpClient): DisclosedContract[];
|
|
9
9
|
/**
|
|
10
|
-
* Get disclosed contracts for a
|
|
10
|
+
* Get disclosed contracts for a ProposedPaymentStream contract This allows parties to exercise choices on the proposal
|
|
11
11
|
* when needed
|
|
12
12
|
*/
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function getProposedPaymentStreamDisclosedContracts(client: OcpClient, proposedPaymentStreamContractId: string, readAs?: string[]): Promise<DisclosedContract[]>;
|
|
14
14
|
//# sourceMappingURL=disclosedContracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosedContracts.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/disclosedContracts.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAE1H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,iBAAiB,EAAE,CAqBnF;AAED;;;GAGG;AACH,wBAAsB,0CAA0C,CAC9D,MAAM,EAAE,SAAS,EACjB,+BAA+B,EAAE,MAAM,EACvC,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAoB9B"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/** Utilities for handling disclosed contracts in
|
|
2
|
+
/** Utilities for handling disclosed contracts in paymentStream workflows */
|
|
3
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.getFactoryDisclosedContracts = getFactoryDisclosedContracts;
|
|
8
|
-
exports.
|
|
9
|
-
const
|
|
8
|
+
exports.getProposedPaymentStreamDisclosedContracts = getProposedPaymentStreamDisclosedContracts;
|
|
9
|
+
const paymentStreams_factory_contract_id_json_1 = __importDefault(require("@fairmint/open-captable-protocol-daml-js/paymentStreams-factory-contract-id.json"));
|
|
10
10
|
/**
|
|
11
11
|
* Get disclosed contracts for the factory contract Reads from the pre-generated factory contract data for the client's
|
|
12
12
|
* network This allows parties that don't directly see the factory to exercise it
|
|
13
13
|
*/
|
|
14
14
|
function getFactoryDisclosedContracts(client) {
|
|
15
15
|
const network = client.client.getNetwork();
|
|
16
|
-
const networkData =
|
|
16
|
+
const networkData = paymentStreams_factory_contract_id_json_1.default[network];
|
|
17
17
|
if (!networkData) {
|
|
18
18
|
throw new Error(`Factory contract data not found for network "${network}". ` +
|
|
19
19
|
'Please run the factory deployment script for this network first.');
|
|
@@ -25,17 +25,17 @@ function getFactoryDisclosedContracts(client) {
|
|
|
25
25
|
return [networkData.disclosedContract];
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Get disclosed contracts for a
|
|
28
|
+
* Get disclosed contracts for a ProposedPaymentStream contract This allows parties to exercise choices on the proposal
|
|
29
29
|
* when needed
|
|
30
30
|
*/
|
|
31
|
-
async function
|
|
31
|
+
async function getProposedPaymentStreamDisclosedContracts(client, proposedPaymentStreamContractId, readAs) {
|
|
32
32
|
const proposalEventsResponse = await client.client.getEventsByContractId({
|
|
33
|
-
contractId:
|
|
33
|
+
contractId: proposedPaymentStreamContractId,
|
|
34
34
|
readAs: readAs ?? [client.client.getPartyId()],
|
|
35
35
|
});
|
|
36
36
|
const createdEvent = proposalEventsResponse.created?.createdEvent;
|
|
37
37
|
if (!createdEvent || !proposalEventsResponse.created) {
|
|
38
|
-
throw new Error(`
|
|
38
|
+
throw new Error(`ProposedPaymentStream contract ${proposedPaymentStreamContractId} not found`);
|
|
39
39
|
}
|
|
40
40
|
return [
|
|
41
41
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosedContracts.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/disclosedContracts.ts"],"names":[],"mappings":";AAAA,4EAA4E;;;;;AAW5E,oEAqBC;AAMD,gGAwBC;AA3DD,+JAA2H;AAI3H;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAC3C,MAAM,WAAW,GAAG,iDAA2B,CAAC,OAAmD,CAEtF,CAAC;IAEd,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,gDAAgD,OAAO,KAAK;YAC1D,kEAAkE,CACrE,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,kDAAkD,OAAO,KAAK;YAC5D,yFAAyF,CAC5F,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,0CAA0C,CAC9D,MAAiB,EACjB,+BAAuC,EACvC,MAAiB;IAEjB,MAAM,sBAAsB,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;QACvE,UAAU,EAAE,+BAA+B;QAC3C,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;KAC/C,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,EAAE,YAAY,CAAC;IAElE,IAAI,CAAC,YAAY,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,kCAAkC,+BAA+B,YAAY,CAAC,CAAC;IACjG,CAAC;IAED,OAAO;QACL;YACE,UAAU,EAAE,YAAY,CAAC,UAAU;YACnC,UAAU,EAAE,YAAY,CAAC,UAAU;YACnC,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;YAC/C,cAAc,EAAE,sBAAsB,CAAC,OAAO,CAAC,cAAc;SAC9D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/** Utilities for retrieving
|
|
1
|
+
/** Utilities for retrieving paymentStream factory contract IDs */
|
|
2
2
|
import type { DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
3
3
|
export type Network = 'devnet' | 'mainnet';
|
|
4
4
|
export interface FactoryContractInfo {
|
|
5
|
-
|
|
5
|
+
paymentStreamsFactoryContractId: string;
|
|
6
6
|
templateId: string;
|
|
7
7
|
disclosedContract?: DisclosedContract;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Get the
|
|
10
|
+
* Get the paymentStream factory contract ID for a given network
|
|
11
11
|
*
|
|
12
12
|
* @param network - The network to get the factory contract ID for ('devnet' or 'mainnet')
|
|
13
13
|
* @returns The factory contract information including contract ID and template ID
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factoryContractId.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/factoryContractId.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAG1H,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,+BAA+B,EAAE,MAAM,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB,CAQ1E"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/** Utilities for retrieving
|
|
2
|
+
/** Utilities for retrieving paymentStream factory contract IDs */
|
|
3
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.getFactoryContractId = getFactoryContractId;
|
|
8
|
-
const
|
|
8
|
+
const paymentStreams_factory_contract_id_json_1 = __importDefault(require("@fairmint/open-captable-protocol-daml-js/paymentStreams-factory-contract-id.json"));
|
|
9
9
|
/**
|
|
10
|
-
* Get the
|
|
10
|
+
* Get the paymentStream factory contract ID for a given network
|
|
11
11
|
*
|
|
12
12
|
* @param network - The network to get the factory contract ID for ('devnet' or 'mainnet')
|
|
13
13
|
* @returns The factory contract information including contract ID and template ID
|
|
14
14
|
* @throws Error if the network is not found in the configuration
|
|
15
15
|
*/
|
|
16
16
|
function getFactoryContractId(network) {
|
|
17
|
-
const config =
|
|
17
|
+
const config = paymentStreams_factory_contract_id_json_1.default[network];
|
|
18
18
|
if (!config) {
|
|
19
|
-
throw new Error(`
|
|
19
|
+
throw new Error(`PaymentStream factory contract ID not found for network: ${network}`);
|
|
20
20
|
}
|
|
21
21
|
return config;
|
|
22
22
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factoryContractId.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/factoryContractId.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;;;AAoBlE,oDAQC;AAzBD,+JAA2H;AAU3H;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,OAAgB;IACnD,MAAM,MAAM,GAAG,iDAA2B,CAAC,OAAO,CAAoC,CAAC;IAEvF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,4DAA4D,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,sDAAoC;AACpC,mDAAiC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Utilities for building payment context for
|
|
1
|
+
/** Utilities for building payment context for paymentStream payments */
|
|
2
2
|
import type { ValidatorApiClient } from '@fairmint/canton-node-sdk';
|
|
3
3
|
import type { DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
4
|
import type { OcpClient } from '../../../OcpClient';
|
|
@@ -12,7 +12,7 @@ export interface PaymentContextWithDisclosedContracts {
|
|
|
12
12
|
disclosedContracts: DisclosedContract[];
|
|
13
13
|
}
|
|
14
14
|
export interface PaymentContextWithAmulets {
|
|
15
|
-
|
|
15
|
+
payerAmulets: string[];
|
|
16
16
|
amuletRulesCid: string;
|
|
17
17
|
openMiningRoundCid: string;
|
|
18
18
|
featuredAppRight?: string | null;
|
|
@@ -22,7 +22,7 @@ export interface PaymentContextWithAmuletsAndDisclosed {
|
|
|
22
22
|
disclosedContracts: DisclosedContract[];
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Build payment context for processing
|
|
25
|
+
* Build payment context for processing paymentStream payments (no amulet inputs needed)
|
|
26
26
|
*
|
|
27
27
|
* Queries the ledger for:
|
|
28
28
|
*
|
|
@@ -37,24 +37,24 @@ export interface PaymentContextWithAmuletsAndDisclosed {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function buildPaymentContext(validatorClient: ValidatorApiClient, provider: string): Promise<PaymentContextWithDisclosedContracts>;
|
|
39
39
|
/**
|
|
40
|
-
* Build payment context with
|
|
40
|
+
* Build payment context with payer's amulets for initial paymentStream approval
|
|
41
41
|
*
|
|
42
42
|
* Queries the ledger for:
|
|
43
43
|
*
|
|
44
|
-
* -
|
|
44
|
+
* - Payer's Amulet contracts (via Validator API)
|
|
45
45
|
* - AmuletRules contract
|
|
46
46
|
* - OpenMiningRound contract
|
|
47
47
|
* - FeaturedAppRight contract (if provider specified)
|
|
48
48
|
*
|
|
49
49
|
* Returns both the payment context and the disclosed contracts needed
|
|
50
50
|
*
|
|
51
|
-
* NOTE: The validatorClient must be authenticated as the
|
|
51
|
+
* NOTE: The validatorClient must be authenticated as the payerParty
|
|
52
52
|
*
|
|
53
53
|
* @param ledgerClient - OCP client for querying contracts
|
|
54
|
-
* @param validatorClient - Validator API client authenticated as
|
|
55
|
-
* @param
|
|
54
|
+
* @param validatorClient - Validator API client authenticated as payer
|
|
55
|
+
* @param payerParty - Party ID of the payer (for validation only)
|
|
56
56
|
* @param maxAmuletInputs - Maximum number of Amulet contracts to use (default: 2)
|
|
57
57
|
* @param provider - Optional provider party ID to lookup featured app right
|
|
58
58
|
*/
|
|
59
|
-
export declare function buildPaymentContextWithAmulets(ledgerClient: OcpClient, validatorClient: ValidatorApiClient,
|
|
59
|
+
export declare function buildPaymentContextWithAmulets(ledgerClient: OcpClient, validatorClient: ValidatorApiClient, payerParty: string, maxAmuletInputs?: number, provider?: string): Promise<PaymentContextWithAmuletsAndDisclosed>;
|
|
60
60
|
//# sourceMappingURL=paymentContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentContext.d.ts","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/paymentContext.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAE1H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,oCAAoC;IACnD,cAAc,EAAE,cAAc,CAAC;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,qCAAqC;IACpD,cAAc,EAAE,yBAAyB,CAAC;IAC1C,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,kBAAkB,EACnC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,oCAAoC,CAAC,CAsD/C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,8BAA8B,CAClD,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,kBAAkB,EACnC,UAAU,EAAE,MAAM,EAClB,eAAe,SAAI,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,qCAAqC,CAAC,CAqFhD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/** Utilities for building payment context for
|
|
2
|
+
/** Utilities for building payment context for paymentStream payments */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.buildPaymentContext = buildPaymentContext;
|
|
5
5
|
exports.buildPaymentContextWithAmulets = buildPaymentContextWithAmulets;
|
|
6
6
|
const mining_rounds_1 = require("@fairmint/canton-node-sdk/build/src/utils/mining/mining-rounds");
|
|
7
7
|
/**
|
|
8
|
-
* Build payment context for processing
|
|
8
|
+
* Build payment context for processing paymentStream payments (no amulet inputs needed)
|
|
9
9
|
*
|
|
10
10
|
* Queries the ledger for:
|
|
11
11
|
*
|
|
@@ -39,14 +39,20 @@ async function buildPaymentContext(validatorClient, provider) {
|
|
|
39
39
|
try {
|
|
40
40
|
const featuredAppRight = await validatorClient.lookupFeaturedAppRight({ partyId: provider });
|
|
41
41
|
if (featuredAppRight.featured_app_right) {
|
|
42
|
-
|
|
42
|
+
// Extract the contract ID - it might be nested in the response
|
|
43
|
+
featuredAppRightCid =
|
|
44
|
+
typeof featuredAppRight.featured_app_right === 'string'
|
|
45
|
+
? featuredAppRight.featured_app_right
|
|
46
|
+
: (featuredAppRight.featured_app_right.contract_id ?? featuredAppRight.featured_app_right);
|
|
43
47
|
// Add disclosed contract with synchronizer from amulet rules
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
if (featuredAppRightCid) {
|
|
49
|
+
disclosedContracts.push({
|
|
50
|
+
templateId: featuredAppRight.featured_app_right.template_id,
|
|
51
|
+
contractId: featuredAppRightCid,
|
|
52
|
+
createdEventBlob: featuredAppRight.featured_app_right.created_event_blob,
|
|
53
|
+
synchronizerId: amuletRulesResponse.amulet_rules.domain_id,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
catch {
|
|
@@ -64,36 +70,36 @@ async function buildPaymentContext(validatorClient, provider) {
|
|
|
64
70
|
};
|
|
65
71
|
}
|
|
66
72
|
/**
|
|
67
|
-
* Build payment context with
|
|
73
|
+
* Build payment context with payer's amulets for initial paymentStream approval
|
|
68
74
|
*
|
|
69
75
|
* Queries the ledger for:
|
|
70
76
|
*
|
|
71
|
-
* -
|
|
77
|
+
* - Payer's Amulet contracts (via Validator API)
|
|
72
78
|
* - AmuletRules contract
|
|
73
79
|
* - OpenMiningRound contract
|
|
74
80
|
* - FeaturedAppRight contract (if provider specified)
|
|
75
81
|
*
|
|
76
82
|
* Returns both the payment context and the disclosed contracts needed
|
|
77
83
|
*
|
|
78
|
-
* NOTE: The validatorClient must be authenticated as the
|
|
84
|
+
* NOTE: The validatorClient must be authenticated as the payerParty
|
|
79
85
|
*
|
|
80
86
|
* @param ledgerClient - OCP client for querying contracts
|
|
81
|
-
* @param validatorClient - Validator API client authenticated as
|
|
82
|
-
* @param
|
|
87
|
+
* @param validatorClient - Validator API client authenticated as payer
|
|
88
|
+
* @param payerParty - Party ID of the payer (for validation only)
|
|
83
89
|
* @param maxAmuletInputs - Maximum number of Amulet contracts to use (default: 2)
|
|
84
90
|
* @param provider - Optional provider party ID to lookup featured app right
|
|
85
91
|
*/
|
|
86
|
-
async function buildPaymentContextWithAmulets(ledgerClient, validatorClient,
|
|
87
|
-
// Get
|
|
88
|
-
// Note: validatorClient must be authenticated as
|
|
92
|
+
async function buildPaymentContextWithAmulets(ledgerClient, validatorClient, payerParty, maxAmuletInputs = 2, provider) {
|
|
93
|
+
// Get payer's Amulet contracts via Validator API
|
|
94
|
+
// Note: validatorClient must be authenticated as payerParty
|
|
89
95
|
const amuletsResponse = await validatorClient.getAmulets();
|
|
90
|
-
const
|
|
96
|
+
const payerAmulets = amuletsResponse.amulets.map((amulet) => ({
|
|
91
97
|
contractId: amulet.contract.contract.contract_id,
|
|
92
98
|
templateId: amulet.contract.contract.template_id,
|
|
93
99
|
synchronizerId: amulet.contract.domain_id,
|
|
94
100
|
}));
|
|
95
|
-
if (
|
|
96
|
-
throw new Error(`
|
|
101
|
+
if (payerAmulets.length === 0) {
|
|
102
|
+
throw new Error(`Payer ${payerParty} has no Amulet contracts`);
|
|
97
103
|
}
|
|
98
104
|
// Get disclosed contracts for each Amulet (getAmulets already includes created_event_blob)
|
|
99
105
|
const amuletsToDisclose = amuletsResponse.amulets.slice(0, maxAmuletInputs);
|
|
@@ -117,7 +123,7 @@ async function buildPaymentContextWithAmulets(ledgerClient, validatorClient, sub
|
|
|
117
123
|
const openMiningRoundCid = miningRoundContext.openMiningRound;
|
|
118
124
|
const { openMiningRoundContract } = miningRoundContext;
|
|
119
125
|
// Build payment context with amulets
|
|
120
|
-
const amuletInputs =
|
|
126
|
+
const amuletInputs = payerAmulets.slice(0, maxAmuletInputs).map((a) => a.contractId);
|
|
121
127
|
// Get FeaturedAppRight contract if provider specified
|
|
122
128
|
let featuredAppRightCid = null;
|
|
123
129
|
const disclosedContracts = [
|
|
@@ -129,14 +135,20 @@ async function buildPaymentContextWithAmulets(ledgerClient, validatorClient, sub
|
|
|
129
135
|
try {
|
|
130
136
|
const featuredAppRight = await validatorClient.lookupFeaturedAppRight({ partyId: provider });
|
|
131
137
|
if (featuredAppRight.featured_app_right) {
|
|
132
|
-
|
|
138
|
+
// Extract the contract ID - it might be nested in the response
|
|
139
|
+
featuredAppRightCid =
|
|
140
|
+
typeof featuredAppRight.featured_app_right === 'string'
|
|
141
|
+
? featuredAppRight.featured_app_right
|
|
142
|
+
: (featuredAppRight.featured_app_right.contract_id ?? featuredAppRight.featured_app_right);
|
|
133
143
|
// Add disclosed contract with synchronizer from amulet rules
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
if (featuredAppRightCid) {
|
|
145
|
+
disclosedContracts.push({
|
|
146
|
+
templateId: featuredAppRight.featured_app_right.template_id,
|
|
147
|
+
contractId: featuredAppRightCid,
|
|
148
|
+
createdEventBlob: featuredAppRight.featured_app_right.created_event_blob,
|
|
149
|
+
synchronizerId: amuletRulesResponse.amulet_rules.domain_id,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
140
152
|
}
|
|
141
153
|
}
|
|
142
154
|
catch {
|
|
@@ -146,7 +158,7 @@ async function buildPaymentContextWithAmulets(ledgerClient, validatorClient, sub
|
|
|
146
158
|
}
|
|
147
159
|
return {
|
|
148
160
|
paymentContext: {
|
|
149
|
-
|
|
161
|
+
payerAmulets: amuletInputs,
|
|
150
162
|
amuletRulesCid,
|
|
151
163
|
openMiningRoundCid,
|
|
152
164
|
featuredAppRight: featuredAppRightCid,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentContext.js","sourceRoot":"","sources":["../../../../src/functions/PaymentStreams/utils/paymentContext.ts"],"names":[],"mappings":";AAAA,wEAAwE;;AA4CxE,kDAyDC;AAsBD,wEA2FC;AAlND,kGAA8G;AA0B9G;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,mBAAmB,CACvC,eAAmC,EACnC,QAAgB;IAEhB,2BAA2B;IAC3B,MAAM,mBAAmB,GAAG,MAAM,eAAe,CAAC,cAAc,EAAE,CAAC;IACnE,MAAM,cAAc,GAAG,mBAAmB,CAAC,YAAY,C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AAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC7F,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,CAAC;gBACxC,+DAA+D;gBAC/D,mBAAmB;oBACjB,OAAO,gBAAgB,CAAC,kBAAkB,KAAK,QAAQ;wBACrD,CAAC,CAAC,gBAAgB,CAAC,kBAAkB;wBACrC,CAAC,CAAC,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,WAAW,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;gBAE/F,6DAA6D;gBAC7D,IAAI,mBAAmB,EAAE,CAAC;oBACxB,kBAAkB,CAAC,IAAI,CAAC;wBACtB,UAAU,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,WAAW;wBAC3D,UAAU,EAAE,mBAAmB;wBAC/B,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,kBAAkB;wBACxE,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,SAAS;qBAC3D,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;YACpE,uEAAuE;QACzE,CAAC;IACH,CAAC;IAED,OAAO;QACL,cAAc,EAAE;YACd,YAAY,EAAE,YAAY;YAC1B,cAAc;YACd,kBAAkB;YAClB,gBAAgB,EAAE,mBAAmB;SACtC;QACD,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
package/dist/functions/index.js
CHANGED
|
@@ -16,5 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./OpenCapTable"), exports);
|
|
18
18
|
__exportStar(require("./OpenCapTableReports"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./PaymentStreams"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wDAAsC;AACtC,mDAAiC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-captable-protocol/canton",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.92",
|
|
4
4
|
"description": "A TypeScript SDK for interacting with the Open CapTable Protocol (OCP) Factory contract on Canton blockchain",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@daml/ledger": "2.10.2",
|
|
34
34
|
"@daml/types": "2.10.2",
|
|
35
35
|
"@fairmint/canton-node-sdk": "0.0.106",
|
|
36
|
-
"@fairmint/open-captable-protocol-daml-js": "0.2.
|
|
36
|
+
"@fairmint/open-captable-protocol-daml-js": "0.2.38"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addFunds.d.ts","sourceRoot":"","sources":["../../../../src/functions/Subscriptions/activeSubscription/addFunds.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,6BAA6B,CAyB1F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addFunds.js","sourceRoot":"","sources":["../../../../src/functions/Subscriptions/activeSubscription/addFunds.ts"],"names":[],"mappings":";;AAYA,oDAyBC;AApCD,6FAAoE;AAWpE,SAAgB,oBAAoB,CAAC,MAAsB;IACzD,MAAM,eAAe,GAAG;QACtB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,cAAc,EAAE;YACd,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,YAAY;YAChD,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,YAAY;YAChD,cAAc,EAAE;gBACd,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc;gBACnE,kBAAkB,EAAE,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,kBAAkB;gBAC3E,gBAAgB,EAAE,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,gBAAgB;aACxE;SACF;QACD,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,IAAI;KACxC,CAAC;IAEF,MAAM,OAAO,GAAY;QACvB,eAAe,EAAE;YACf,UAAU,EAAE,yCAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,UAAU;YACnF,UAAU,EAAE,MAAM,CAAC,sBAAsB;YACzC,MAAM,EAAE,6BAA6B;YACrC,cAAc,EAAE,eAAe;SAChC;KACF,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
2
|
-
export interface ArchiveInactiveSubscriptionParams {
|
|
3
|
-
subscriptionContractId: string;
|
|
4
|
-
actor: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function buildArchiveInactiveSubscriptionCommand(params: ArchiveInactiveSubscriptionParams): Command;
|
|
7
|
-
//# sourceMappingURL=archiveInactiveSubscription.d.ts.map
|
package/dist/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archiveInactiveSubscription.d.ts","sourceRoot":"","sources":["../../../../src/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kFAAkF,CAAC;AAGhH,MAAM,WAAW,iCAAiC;IAChD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,iCAAiC,GAAG,OAAO,CAW1G"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildArchiveInactiveSubscriptionCommand = buildArchiveInactiveSubscriptionCommand;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
function buildArchiveInactiveSubscriptionCommand(params) {
|
|
6
|
-
return {
|
|
7
|
-
ExerciseCommand: {
|
|
8
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.Subscriptions.ActiveSubscription.ActiveSubscription.templateId,
|
|
9
|
-
contractId: params.subscriptionContractId,
|
|
10
|
-
choice: 'ActiveSubscription_ArchiveInactiveSubscription',
|
|
11
|
-
choiceArgument: {
|
|
12
|
-
actor: params.actor,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=archiveInactiveSubscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archiveInactiveSubscription.js","sourceRoot":"","sources":["../../../../src/functions/Subscriptions/activeSubscription/archiveInactiveSubscription.ts"],"names":[],"mappings":";;AAQA,0FAWC;AAlBD,6FAAoE;AAOpE,SAAgB,uCAAuC,CAAC,MAAyC;IAC/F,OAAO;QACL,eAAe,EAAE;YACf,UAAU,EAAE,yCAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,UAAU;YACnF,UAAU,EAAE,MAAM,CAAC,sBAAsB;YACzC,MAAM,EAAE,gDAAgD;YACxD,cAAc,EAAE;gBACd,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB;SACF;KACF,CAAC;AACJ,CAAC"}
|