taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit e803315dfcb4bd17038d5ddbae0af61066ad93f4
parent 87f052b40f32fa1a304cbde1b4d7a353766beaa2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 24 Dec 2024 10:09:19 +0100

-try link

Diffstat:
Mcore/api-merchant.rst | 2+-
Mdesign-documents/046-mumimo-contracts.rst | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/core/api-merchant.rst b/core/api-merchant.rst @@ -4401,7 +4401,7 @@ The contract terms must have the following structure: .. ts:def:: ContractTerms - type ContractTerms = (ContractTermsV1 | ContractTermsV0) & ContractTermsCommon; + type ContractTerms = (`ContractTermsV1` | ContractTermsV0) & ContractTermsCommon; .. ts:def:: ContractTermsV1 diff --git a/design-documents/046-mumimo-contracts.rst b/design-documents/046-mumimo-contracts.rst @@ -90,9 +90,9 @@ New Contract Terms Format The contract terms v1 will have the following structure: -.. ts:def:: ContractTermsV1 +.. ts:def:: DDContractTermsV1 - interface ContractTermsV1 { + interface DDContractTermsV1 { // This is version 1, the previous contract terms SHOULD // be indicated using "0", but in v0 specifying the version // is optional. @@ -197,7 +197,7 @@ The contract terms v1 will have the following structure: // Array of possible specific contracts the wallet/customer // may choose from by selecting the respective index when // signing the deposit confirmation. - choices: ContractChoice[]; + choices: DDContractChoice[]; // Map from token family slugs to meta data about the // respective token family. @@ -212,9 +212,9 @@ The contract terms v1 will have the following structure: exchanges: Exchange[]; } -.. ts:def:: ContractChoice +.. ts:def:: DDContractChoice - interface ContractChoice { + interface DDContractChoice { // Price to be paid for this choice. Could be 0. // The price is in addition to other instruments, // such as rations and tokens. @@ -224,25 +224,25 @@ The contract terms v1 will have the following structure: // List of inputs the wallet must provision (all of them) to // satisfy the conditions for the contract. - inputs: ContractInput[]; + inputs: DDContractInput[]; // List of outputs the merchant promises to yield (all of them) // once the contract is paid. - outputs: ContractOutput[]; + outputs: DDContractOutput[]; // Maximum total deposit fee accepted by the merchant for this contract. max_fee: Amount; } -.. ts:def:: ContractInput +.. ts:def:: DDContractInput - type ContractInput = - | ContractInputRation - | ContractInputToken; + type DDContractInput = + | DDContractInputRation + | DDContractInputToken; -.. ts:def:: ContractInputRation +.. ts:def:: DDContractInputRation - interface ContractInputRation { + interface DDContractInputRation { type: "coin"; // Price to be paid for the transaction. @@ -256,9 +256,9 @@ The contract terms v1 will have the following structure: ration_authority_url: string; }; -.. ts:def:: ContractInputToken +.. ts:def:: DDContractInputToken - interface ContractInputToken { + interface DDContractInputToken { type: "token"; // Slug of the token family in the @@ -274,16 +274,16 @@ The contract terms v1 will have the following structure: number?: Integer; }; -.. ts:def:: ContractOutput +.. ts:def:: DDContractOutput - type ContractOutput = - | ContractOutputCoin - | ContractOutputTaxReceipt - | ContractOutputToken; + type DDContractOutput = + | DDContractOutputCoin + | DDContractOutputTaxReceipt + | DDContractOutputToken; -.. ts:def:: ContractOutputCoin +.. ts:def:: DDContractOutputCoin - interface ContractOutputCoin { + interface DDContractOutputCoin { type: "coins"; // Amount of coins that will be yielded. @@ -295,9 +295,9 @@ The contract terms v1 will have the following structure: exchange_url: string; }; -.. ts:def:: ContractOutputTaxReceipt +.. ts:def:: DDContractOutputTaxReceipt - interface ContractOutputTaxReceipt { + interface DDContractOutputTaxReceipt { type: "tax-receipt"; // Base URL of the donation authority that will @@ -305,9 +305,9 @@ The contract terms v1 will have the following structure: donau_url: string; }; -.. ts:def:: ContractOutputToken +.. ts:def:: DDContractOutputToken - interface ContractOutputToken { + interface DDContractOutputToken { type: "token"; // Slug of the token family in the @@ -323,15 +323,15 @@ The contract terms v1 will have the following structure: number?: Integer; } -.. ts:def:: ContractTokenDetails +.. ts:def:: DDContractTokenDetails - type ContractTokenDetails = - | ContractSubscriptionTokenDetails - | ContractDiscountTokenDetails + type DDContractTokenDetails = + | DDContractSubscriptionTokenDetails + | DDContractDiscountTokenDetails -.. ts:def:: ContractSubscriptionTokenDetails +.. ts:def:: DDContractSubscriptionTokenDetails - interface ContractSubscriptionTokenDetails { + interface DDContractSubscriptionTokenDetails { class: "subscription"; // Array of domain names where this subscription @@ -342,9 +342,9 @@ The contract terms v1 will have the following structure: trusted_domains: string[]; }; -.. ts:def:: ContractDiscountTokenDetails +.. ts:def:: DDContractDiscountTokenDetails - interface ContractDiscountTokenDetails { + interface DDContractDiscountTokenDetails { class: "discount"; // Array of domain names where this discount token @@ -358,9 +358,9 @@ The contract terms v1 will have the following structure: expected_domains: string[]; }; -.. ts:def:: ContractTokenFamily +.. ts:def:: DDContractTokenFamily - interface ContractTokenFamily { + interface DDContractTokenFamily { // Human-readable name of the token family. name: string; @@ -395,15 +395,15 @@ The contract terms v1 will have the following structure: ass_sig?: EddsaSignature; }; -.. ts:def:: TokenIssuePublicKey +.. ts:def:: DDTokenIssuePublicKey - type TokenIssuePublicKey = - | TokenIssueRsaPublicKey - | TokenIssueCsPublicKey; + type DDTokenIssuePublicKey = + | DDTokenIssueRsaPublicKey + | DDTokenIssueCsPublicKey; -.. ts:def:: TokenIssueRsaPublicKey +.. ts:def:: DDTokenIssueRsaPublicKey - interface TokenIssueRsaPublicKey { + interface DDTokenIssueRsaPublicKey { cipher: "RSA"; // RSA public key. @@ -416,9 +416,9 @@ The contract terms v1 will have the following structure: valid_before: Timestamp; } -.. ts:def:: TokenIssueCsPublicKey +.. ts:def:: DDTokenIssueCsPublicKey - interface TokenIssueCsPublicKey { + interface DDTokenIssueCsPublicKey { cipher: "CS"; // CS public key.