> For the complete documentation index, see [llms.txt](https://docs.zk.link/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zk.link/developer/sdk/changelog/transactions/8-funding.md).

# Funding

### type FundingBuilder

```go
type FundingBuilder struct {
	AccountId         AccountId
	SubAccountId      SubAccountId
	SubAccountNonce   Nonce
	FundingAccountIds []AccountId
	Fee               BigUint
	FeeToken          TokenId
}
```

Builder that used to build the [Funding](#type-funding) transaction.

### type Funding

[Funding](/developer/api-and-sdk/transaction/funding.md) transaction type, it's a opaque data type.

#### func NewFunding(builder FundingBuilder)

```go
func NewFunding(builder FundingBuilder) *Funding
```

Create a new [Funding](#type-funding) transaction.

#### func (\*Funding) GetBytes

```go
func (*Funding) GetBytes() []uint8
```

Get the encoded bytes to create the L3 signature. See more in [Private Key and Signature](/developer/api-and-sdk/private_key/funding.md)

#### func (\*Funding) TxHash

```go
func (*Funding) TxHash() []uint8
```

Get the transaction hash of the transaction.

#### func (\*Funding) JsonStr

```go
func (*Funding) JsonStr() string
```

Get the json string of the transaction.

#### func (\*Funding) IsValid

```go
func (*Funding) IsValid() bool
```

Check if the transaction is valid or not.

#### func (\*Funding) CreateSignedTx

```go
func (*Funding) CreateSignedTx(signer *ZkLinkSigner) (*Funding, error)
```

Create a new AutoDeleveraging transaction with L3 signature inside. **input:**

* signer: [ZkLinkSigner](/developer/sdk/changelog/signer.md#type-zklinksigner)

#### func (\*Funding) GetSignature

```go
func (*Funding) GetSignature() ZkLinkSignature
```

Get L3 signature of the transaction.

#### func (\*Funding) IsSignatureValid

```go
func (*Funding) IsSignatureValid() bool
```

Check if the inside L3 signature is valid or not.

#### func (\*Funding) ToZklinkTx

```go
func (*Funding) ToZklinkTx() ZkLinkTx
```

Change the transaction to the [ZkLinkTx](/developer/sdk/changelog/basic_types.md#zklinktx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zk.link/developer/sdk/changelog/transactions/8-funding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
