Stellar methods handle addresses and transaction signing for the Stellar network.
stellarGetAddress
Retrieves a Stellar address from the device.
path
string | number[]
required
BIP32 derivation path (e.g., m/44'/148'/0').
Expected address for verification.
Display address on device screen.
Split large requests into chunks.
Stellar address (G… format).
Derivation path as integer array.
Derivation path as string.
const result = await TrezorConnect.stellarGetAddress({
path: "m/44'/148'/0'",
showOnTrezor: true,
});
if (result.success) {
console.log('Stellar address:', result.payload.address);
}
stellarSignTransaction
Signs a Stellar transaction. Supports all Stellar operations including payments, path payments, offers, account management, and more.
path
string | number[]
required
BIP32 derivation path for signing key.
Network passphrase (e.g., Stellar Public Network ; September 2015 for mainnet).
Stellar transaction object.
Transaction fee in stroops.
Transaction memo.
Memo type: 0=None, 1=Text, 2=ID, 3=Hash, 4=Return.
Text memo (max 28 bytes).
Array of operations (see below).
Public key used for signing.
Transaction signature (hex).
Supported Operations
Payment
{
type: 'payment',
source?: 'G...', // optional source account
destination: 'G...', // required
asset: {
type: 0, // 0=native, 1=alphanum4, 2=alphanum12
code?: 'USD',
issuer?: 'G...',
},
amount: '10.0000000', // required
}
Create Account
{
type: 'createAccount',
source?: 'G...',
destination: 'G...', // required
startingBalance: '10.0000000', // required
}
Path Payment Strict Receive
{
type: 'pathPaymentStrictReceive',
source?: 'G...',
sendAsset: { type: 0 },
sendMax: '100.0000000',
destination: 'G...',
destAsset: { type: 1, code: 'USD', issuer: 'G...' },
destAmount: '10.0000000',
path?: [{ type: 1, code: 'EUR', issuer: 'G...' }],
}
Manage Sell Offer
{
type: 'manageSellOffer',
source?: 'G...',
buying: { type: 1, code: 'USD', issuer: 'G...' },
selling: { type: 0 },
amount: '100.0000000',
price: { n: 1, d: 2 }, // price = 1/2 = 0.5
offerId?: 12345, // 0 for new offer
}
Create Passive Sell Offer
{
type: 'createPassiveSellOffer',
source?: 'G...',
buying: { type: 1, code: 'USD', issuer: 'G...' },
selling: { type: 0 },
amount: '100.0000000',
price: { n: 1, d: 2 },
}
Set Options
{
type: 'setOptions',
source?: 'G...',
inflationDest?: 'G...',
clearFlags?: 1,
setFlags?: 2,
masterWeight?: 1,
lowThreshold?: 0,
medThreshold?: 2,
highThreshold?: 3,
homeDomain?: 'example.com',
signer?: {
type: 0, // 0=account, 1=pre_auth, 2=hash
key: 'G...' or Buffer,
weight: 1,
},
}
Change Trust
{
type: 'changeTrust',
source?: 'G...',
line: { type: 1, code: 'USD', issuer: 'G...' },
limit: '1000.0000000', // 0 to remove trustline
}
Allow Trust
{
type: 'allowTrust',
source?: 'G...',
trustor: 'G...',
assetCode: 'USD',
assetType: 1,
authorize: true,
}
Account Merge
{
type: 'accountMerge',
source?: 'G...',
destination: 'G...',
}
Manage Data
{
type: 'manageData',
source?: 'G...',
name: 'mykey',
value: 'myvalue' or Buffer, // undefined to delete
}
Bump Sequence
{
type: 'bumpSequence',
source?: 'G...',
bumpTo: '123456789',
}
Complete Example
const result = await TrezorConnect.stellarSignTransaction({
path: "m/44'/148'/0'",
networkPassphrase: 'Stellar Public Network ; September 2015',
transaction: {
source: 'GAXSFOOGF4ELO5HT5PTN23T5XE6D5QWL3YBHSVQ2HWOFEJNYYMRJENBV',
fee: 100,
sequence: '123456789',
timebounds: {
minTime: 0,
maxTime: 1609459200,
},
memo: {
type: 1, // Text
text: 'Payment',
},
operations: [
{
type: 'payment',
destination: 'GBOVQKJYHXRR3DX6NOX2RRYFRCUMSADGDESTDNBDS6CDVLGVESRTAC47',
asset: {
type: 0, // Native XLM
},
amount: '10.0000000',
},
],
},
});
if (result.success) {
console.log('Public key:', result.payload.publicKey);
console.log('Signature:', result.payload.signature);
}