Skip to content

Commit bc60296

Browse files
Docs executetx (#739)
* docs: update executeTx and deploy* docs * add note about rekeyed accounts
1 parent d7bf7f8 commit bc60296

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

packages/algob/src/internal/deployer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,9 @@ export class DeployerDeployMode extends DeployerBasicMode implements Deployer {
866866
* Note: If passing transaction object a signer/s must be provided.
867867
* @param transactions transaction parameters or atomic transaction parameters
868868
* https://github.com/scale-it/algo-builder/blob/docs/docs/guide/execute-transaction.md
869-
* or TransactionAndSign object(SDK transaction object and signer parameters)
869+
* or TransactionAndSign object(SDK transaction object and signer parameters).
870+
* If `ExecParams` are used, the deployer will connect to appropriate accounts / wallets to sign
871+
* constructed transactions.
870872
*/
871873
async executeTx(
872874
transactions: wtypes.ExecParams[] | wtypes.TransactionAndSign[]

packages/algob/src/lib/tx.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ export function signTransactions(txnAndSign: wtypes.TransactionAndSign[]): Uint8
275275
* @param deployer Deployer
276276
* @param transactions transaction parameters or atomic transaction parameters
277277
* https://github.com/scale-it/algo-builder/blob/docs/docs/guide/execute-transaction.md
278-
* or TransactionAndSign object(SDK transaction object and signer parameters)
278+
* or TransactionAndSign object(SDK transaction object and signer parameters).
279+
* If `ExecParams` are used, the deployer will connect to appropriate deployer accounts / wallets
280+
* to sign constructed transactions.
279281
*/
280282
export async function executeTx(
281283
deployer: Deployer,

packages/algob/src/types.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ export interface Deployer {
443443
/**
444444
* Creates and deploys ASA defined in asa.yaml.
445445
* @name ASA name - deployer will search for the ASA in the /assets/asa.yaml file
446-
* @flags deployment flags */
446+
* @flags deployment flags. Required.
447+
* `flags.creator` must be defined - it's an account which will sign the constructed transaction.
448+
* NOTE: support for rekeyed accounts is limited (creator must have updated sk to properly sign transaction) */
447449
deployASA: (
448450
name: string,
449451
flags: rtypes.ASADeploymentFlags,
@@ -455,7 +457,8 @@ export interface Deployer {
455457
* @name ASA name
456458
* @asaDef ASA definitions
457459
* @flags deployment flags
458-
*/
460+
* `flags.creator` must be defined - it's an account which will sign the constructed transaction.
461+
* NOTE: support for rekeyed accounts is limited (creator must have updated sk to properly sign transaction) */
459462
deployASADef: (
460463
name: string,
461464
asaDef: wtypes.ASADef,
@@ -548,7 +551,8 @@ export interface Deployer {
548551

549552
/**
550553
* Deploys stateful smart contract.
551-
* @approvalProgram approval program filename (must be present in assets folder)
554+
* @creator is the signer of the transaction.
555+
* @appDefinition is an object providing details about approval and clear program.
552556
* @clearProgram clear program filename (must be present in assets folder)
553557
* @flags AppDeploymentFlags
554558
* @payFlags Transaction Parameters

packages/web/src/lib/web-mode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ export class WebMode {
147147
/**
148148
* Execute single transaction or group of transactions (atomic transaction)
149149
* @param transactions transaction parameters, atomic transaction parameters
150-
* or TransactionAndSign object(SDK transaction object and signer parameters)
150+
* or TransactionAndSign object(SDK transaction object and signer parameters).
151+
* When list of ExecParams is used, the function will request wallet to sign transactions.
151152
*/
152153
async executeTx(
153154
transactions: ExecParams[] | TransactionAndSign[]

0 commit comments

Comments
 (0)