taler-docs

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

withdraw-test-balance.rst (1450B)


      1 .. ts:op:: withdrawTestBalance
      2 
      3   Make a withdrawal on a test deployment of the exchange and corebank.
      4 
      5   **Request:**
      6 
      7     The request must be a `WithdrawTestBalanceRequest` object.
      8 
      9   **Response:**
     10 
     11     On success, the result is a `WithdrawTestBalanceResult` object.
     12 
     13   **Side effects:**
     14 
     15     Registers a random bank user and performs a real withdrawal at the
     16     given test deployment over the network; creates a withdrawal
     17     transaction in the wallet.
     18 
     19   **Details:**
     20 
     21     The operation registers a random bank user via the corebank API,
     22     creates a withdrawal operation for the requested amount, accepts
     23     the resulting withdrawal URI as a bank-integrated withdrawal at the
     24     given exchange, and finally confirms the withdrawal operation at
     25     the bank.
     26 
     27 .. ts:def:: WithdrawTestBalanceRequest
     28 
     29   interface WithdrawTestBalanceRequest {
     30     // Amount to withdraw.
     31     amount: AmountString;
     32 
     33     // Corebank API base URL.
     34     corebankApiBaseUrl: string;
     35 
     36     // Exchange to use for withdrawal.
     37     exchangeBaseUrl: string;
     38 
     39     // Force the usage of a particular denomination selection.
     40     // Only useful for testing.
     41     forcedDenomSel?: ForcedDenomSel;
     42 
     43     // If set to true, treat the account created during
     44     // the withdrawal as a foreign withdrawal account.
     45     useForeignAccount?: boolean;
     46   }
     47 
     48 .. ts:def:: ForcedDenomSel
     49 
     50   interface ForcedDenomSel {
     51     denoms: {
     52       value: AmountString;
     53       count: number;
     54     }[];
     55   }