Skip to content

PaymentBuilder

SIP Protocol API Reference v0.7.2


SIP Protocol API Reference / PaymentBuilder

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6128

Builder class for creating shielded payments

Provides a fluent interface for constructing privacy-preserving payments.

new PaymentBuilder(): PaymentBuilder

PaymentBuilder

token(tokenOrSymbol, chain?): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6148

Set the token to transfer

Asset object or stablecoin symbol

Asset | StablecoinSymbol

ChainId

Chain ID (required if using symbol)

this


amount(amount): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6154

Set the amount to transfer (in smallest units)

bigint

Amount in token’s smallest units

this


amountHuman(amount): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6160

Set the amount in human-readable format

number

Human-readable amount (e.g., 100.50)

this


recipient(metaAddress): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6164

Set the recipient’s stealth meta-address (for privacy modes)

string

this


recipientDirect(address): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6168

Set the recipient’s direct address (for transparent mode)

string

this


privacy(level): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6172

Set the privacy level

PrivacyLevel

this


viewingKey(key): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6176

Set the viewing key (required for compliant mode)

`0x${string}`

this


destinationChain(chain): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6180

Set the destination chain (for cross-chain payments)

ChainId

this


purpose(purpose): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6184

Set the payment purpose

PaymentPurpose

this


memo(memo): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6188

Set an optional memo/reference

string

this


ttl(seconds): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6192

Set time-to-live in seconds

number

this


sender(address): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6196

Set the sender address

string

this


withProvider(provider): this

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6200

Set the proof provider

ProofProvider

this


build(): Promise<ShieldedPayment>

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:6204

Build the shielded payment

Promise<ShieldedPayment>