# StacksTransaction | Stacks.js 1.0.0 Library Reference
Documentation for Stacks.js 1.0.0 Library Reference

### Hierarchy

- StacksTransaction

## Index

### Constructors

- constructor

### Properties

- anchorMode
- auth
- chainId
- payload
- postConditionMode
- postConditions
- version

### Methods

- appendPubkey
- createTxWithSignature
- serialize
- setFee
- setNonce
- setSponsor
- setSponsorNonce
- signAndAppend
- signBegin
- signNextOrigin
- signNextSponsor
- txid
- verifyBegin
- verifyOrigin

## Constructors

### constructor

- new StacksTransaction(version: TransactionVersion, auth: Authorization, payload: Payload, postConditions?: LengthPrefixedList, postConditionMode?: PostConditionMode, anchorMode?: AnchorMode, chainId?: ChainID ): StacksTransaction

- - Defined in packages/transactions/src/transaction.ts:42

  #### Parameters

  - ##### version: TransactionVersion

  - ##### auth: Authorization

  - ##### payload: Payload

  - ##### Optional postConditions: LengthPrefixedList

  - ##### Optional postConditionMode: PostConditionMode

  - ##### Optional anchorMode: AnchorMode

  - ##### Optional chainId: ChainID

  #### Returns StacksTransaction

## Properties

### anchorMode

anchorMode: AnchorMode

- Defined in packages/transactions/src/transaction.ts:39

### auth

auth: Authorization

- Defined in packages/transactions/src/transaction.ts:38

### chainId

chainId: ChainID

- Defined in packages/transactions/src/transaction.ts:37

### payload

payload: Payload

- Defined in packages/transactions/src/transaction.ts:40

### postConditionMode

postConditionMode: PostConditionMode

- Defined in packages/transactions/src/transaction.ts:41

### postConditions

postConditions: LengthPrefixedList

- Defined in packages/transactions/src/transaction.ts:42

### version

version: TransactionVersion

- Defined in packages/transactions/src/transaction.ts:36

## Methods

### appendPubkey

- appendPubkey(publicKey: StacksPublicKey ): void

- - Defined in packages/transactions/src/transaction.ts:132

  #### Parameters

  - ##### publicKey: StacksPublicKey

  #### Returns void

### createTxWithSignature

- createTxWithSignature(signature: string | Buffer): StacksTransaction

- - Defined in packages/transactions/src/transaction.ts:91

  #### Parameters

  - ##### signature: string | Buffer

  #### Returns StacksTransaction

### serialize

- serialize(): Buffer

- - Defined in packages/transactions/src/transaction.ts:203

  #### Returns Buffer

### setFee

- setFee(amount: BigNum): void

- - Defined in packages/transactions/src/transaction.ts:181

  Set the total fee to be paid for this transaction

  #### Parameters

  - ##### amount: BigNum

  #### Returns void

### setNonce

- setNonce(nonce: BigNum): void

- - Defined in packages/transactions/src/transaction.ts:190

  Set the transaction nonce

  #### Parameters

  - ##### nonce: BigNum

    the nonce value

  #### Returns void

### setSponsor

- setSponsor(sponsorSpendingCondition: SpendingCondition ): void

- - Defined in packages/transactions/src/transaction.ts:168

  #### Parameters

  - ##### sponsorSpendingCondition: SpendingCondition

  #### Returns void

### setSponsorNonce

- setSponsorNonce(nonce: BigNum): void

- - Defined in packages/transactions/src/transaction.ts:199

  Set the transaction sponsor nonce

  #### Parameters

  - ##### nonce: BigNum

    the sponsor nonce value

  #### Returns void

### signAndAppend

- signAndAppend(condition: SpendingCondition, curSigHash: string, authType: AuthType, privateKey: StacksPrivateKey ): string

- - Defined in packages/transactions/src/transaction.ts:141

  #### Parameters

  - ##### condition: SpendingCondition

  - ##### curSigHash: string

  - ##### authType: AuthType

  - ##### privateKey: StacksPrivateKey

  #### Returns string

### signBegin

- signBegin(): string

- - Defined in packages/transactions/src/transaction.ts:79

  #### Returns string

### signNextOrigin

- signNextOrigin(sigHash: string, privateKey: StacksPrivateKey ): string

- - Defined in packages/transactions/src/transaction.ts:107

  #### Parameters

  - ##### sigHash: string

  - ##### privateKey: StacksPrivateKey

  #### Returns string

### signNextSponsor

- signNextSponsor(sigHash: string, privateKey: StacksPrivateKey ): string

- - Defined in packages/transactions/src/transaction.ts:117

  #### Parameters

  - ##### sigHash: string

  - ##### privateKey: StacksPrivateKey

  #### Returns string

### txid

- txid(): string

- - Defined in packages/transactions/src/transaction.ts:163

  #### Returns string

### verifyBegin

- verifyBegin(): string

- - Defined in packages/transactions/src/transaction.ts:85

  #### Returns string

### verifyOrigin

- verifyOrigin(): string

- - Defined in packages/transactions/src/transaction.ts:103

  #### Returns string

Generated using TypeDoc