Skip to content

PaymentBuilder

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / PaymentBuilder

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9277

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-DXh2IGkz.d.ts:9297

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-DXh2IGkz.d.ts:9303

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-DXh2IGkz.d.ts:9309

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-DXh2IGkz.d.ts:9313

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

string

this


recipientDirect(address): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9317

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

string

this


privacy(level): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9321

Set the privacy level

PrivacyLevel

this


viewingKey(key): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9325

Set the viewing key (required for compliant mode)

`0x${string}`

this


destinationChain(chain): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9329

Set the destination chain (for cross-chain payments)

ChainId

this


purpose(purpose): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9333

Set the payment purpose

PaymentPurpose

this


memo(memo): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9337

Set an optional memo/reference

string

this


ttl(seconds): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9341

Set time-to-live in seconds

number

this


sender(address): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9345

Set the sender address

string

this


withProvider(provider): this

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9349

Set the proof provider

ProofProvider

this


build(): Promise<ShieldedPayment>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:9353

Build the shielded payment

Promise<ShieldedPayment>