Open KallynGowdy opened 1 month ago
Name: xpCreateContract HTTP: POST /api/v2/xp/contract Authentication: REQUIRED - sessionKey Input:
xpCreateContract
POST /api/v2/xp/contract
REQUIRED - sessionKey
{ holdingUserId: z.string(), rate: z.number().int().nonnegative(), amount: z.numer().int().nonnegative(), description: z.string(), }
Operation: Create a contract with the given holdingUserId, rate, amount, and description with issuerUserId = sessionKey.userId. The returned information should be limited to the information specified below. Success Output:
holdingUserId
rate
amount
issuerUserId = sessionKey.userId
{ success: true, // Same contract output as xpGetUserIssuedContracts contract: { id: 'contract-id', issuerUserId: 'issuer-user-id', holdingUserId: 'holding-user-id', accountBalance: 123, accountCurrency: 'usd', accountEntries: [ { id: 'entry-id', amount: 123, balance: 456, timeMs: 123, transactionId: 'transaction-id', note: 'string' } ], rate: 123, description: 'desc', status: 'open', accountId: 'account-id', createdAtMs: 123, updatedAtMs: 123 } }
Name:
xpCreateContract
HTTP:POST /api/v2/xp/contract
Authentication:REQUIRED - sessionKey
Input:Operation: Create a contract with the given
holdingUserId
,rate
,amount
, and description withissuerUserId = sessionKey.userId
. The returned information should be limited to the information specified below. Success Output: