File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
docs/sdk-js/platform/identities Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Credit Transfer
2
+
3
+ ** Usage** : ` await client.platform.identities.creditTransfer(identity, recipientId, amount) `
4
+
5
+ ** Description** : Transfers credits from one identity to another within the Dash Platform.
6
+
7
+ Parameters:
8
+
9
+ | Parameters | Type | Required | Description |
10
+ | ------------ | ------------------- | -------- | --------------------------------------------------------------------------- |
11
+ | ** identity** | Identity | Yes | The identity object initiating the transfer. |
12
+ | ** recipientId** | Identifier \| string | Yes | The identifier of the recipient identity. Can be an Identifier object or a string. |
13
+ | ** amount** | number | Yes | The amount of credits to transfer. |
14
+
15
+ ** Example** :
16
+
17
+ ``` js
18
+ const identity = await client .platform .identities .get (' yourIdentityId' );
19
+ const recipientId = ' recipientIdentityId' ; // The recipient's identity ID.
20
+ const amount = 1000 ; // Amount of credits to transfer.
21
+
22
+ await client .platform .identities .creditTransfer (identity, recipientId, amount);
23
+ ```
24
+
25
+ ** Note** :
26
+
27
+ - Ensure both the sender and recipient identities are registered on Dash Platform.
28
+ - The amount must be less than the available balance of the identity initiating the transfer.
29
+ - Transfers are irreversible once broadcasted.
30
+
31
+ Returns: A promise that resolves to ` true ` upon successful execution of the credit transfer.
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Each identity contains a credit balance. The ratio is 1 duff = 1000 credits.
15
15
``` {toctree}
16
16
:maxdepth: 2
17
17
18
+ credit-transfer
18
19
get
19
20
register
20
21
topup
You can’t perform that action at this time.
0 commit comments