Skip to content

Commit 3a20a28

Browse files
committed
docs(sdk): add docs for changeApprovedBuilder
1 parent 061bba6 commit 3a20a28

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sdk/src/driftClient.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,16 @@ export class DriftClient {
13731373
});
13741374
}
13751375

1376+
/**
1377+
* Creates the transaction to add or update an approved builder.
1378+
* This allows the builder to receive revenue share from referrals.
1379+
*
1380+
* @param builder - The public key of the builder to add or update.
1381+
* @param maxFeeTenthBps - The maximum fee tenth bps to set for the builder.
1382+
* @param add - Whether to add or update the builder. If the builder already exists, `add = true` will update the `maxFeeTenthBps`, otherwise it will add the builder. If `add = false`, the builder's `maxFeeTenthBps` will be set to 0.
1383+
* @param txParams - The transaction parameters to use for the transaction.
1384+
* @returns The transaction to add or update an approved builder.
1385+
*/
13761386
public async changeApprovedBuilder(
13771387
builder: PublicKey,
13781388
maxFeeTenthBps: number,
@@ -1389,6 +1399,15 @@ export class DriftClient {
13891399
return txSig;
13901400
}
13911401

1402+
/**
1403+
* Creates the transaction instruction to add or update an approved builder.
1404+
* This allows the builder to receive revenue share from referrals.
1405+
*
1406+
* @param builder - The public key of the builder to add or update.
1407+
* @param maxFeeTenthBps - The maximum fee tenth bps to set for the builder.
1408+
* @param add - Whether to add or update the builder. If the builder already exists, `add = true` will update the `maxFeeTenthBps`, otherwise it will add the builder. If `add = false`, the builder's `maxFeeTenthBps` will be set to 0.
1409+
* @returns The transaction instruction to add or update an approved builder.
1410+
*/
13921411
public async getChangeApprovedBuilderIx(
13931412
builder: PublicKey,
13941413
maxFeeTenthBps: number,

0 commit comments

Comments
 (0)