Skip to content

PaymentBuilder

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / PaymentBuilder

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9350

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-GLbkPPho.d.ts:9370

Set the token to transfer

Asset | StablecoinSymbol

Asset object or stablecoin symbol

ChainId

Chain ID (required if using symbol)

this


amount(amount): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9376

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-GLbkPPho.d.ts:9382

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-GLbkPPho.d.ts:9386

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

string

this


recipientDirect(address): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9390

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

string

this


privacy(level): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9394

Set the privacy level

PrivacyLevel

this


viewingKey(key): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9398

Set the viewing key (required for compliant mode)

`0x${string}`

this


destinationChain(chain): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9402

Set the destination chain (for cross-chain payments)

ChainId

this


purpose(purpose): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9406

Set the payment purpose

PaymentPurpose

this


memo(memo): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9410

Set an optional memo/reference

string

this


ttl(seconds): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9414

Set time-to-live in seconds

number

this


sender(address): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9418

Set the sender address

string

this


withProvider(provider): this

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9422

Set the proof provider

ProofProvider

this


build(): Promise<ShieldedPayment>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:9426

Build the shielded payment

Promise<ShieldedPayment>