Skip to content

PaymentBuilder

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / PaymentBuilder

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6065

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-BYZbDjal.d.ts:6085

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-BYZbDjal.d.ts:6091

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-BYZbDjal.d.ts:6097

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-BYZbDjal.d.ts:6101

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

string

this


recipientDirect(address): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6105

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

string

this


privacy(level): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6109

Set the privacy level

PrivacyLevel

this


viewingKey(key): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6113

Set the viewing key (required for compliant mode)

`0x${string}`

this


destinationChain(chain): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6117

Set the destination chain (for cross-chain payments)

ChainId

this


purpose(purpose): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6121

Set the payment purpose

PaymentPurpose

this


memo(memo): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6125

Set an optional memo/reference

string

this


ttl(seconds): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6129

Set time-to-live in seconds

number

this


sender(address): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6133

Set the sender address

string

this


withProvider(provider): this

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6137

Set the proof provider

ProofProvider

this


build(): Promise<ShieldedPayment>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:6141

Build the shielded payment

Promise<ShieldedPayment>