Transactions Scope
Source: src/sdk/transactions.ts
Use sdk.transactions for transaction retrieval, withdrawals, frozen-state actions, portfolio execution, and portfolio message signing.
Methods
findAll(filters?: TransactionFilters, pagination?: TransactionPaginationParams): Promise<Transaction[]>
Endpoint
GET /api/v1/core/transactions
How it works
Fetches transactions and forwards supported filter and pagination fields when they are provided.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
filters.status | TransactionStatus | No | Forwarded as status. |
filters.customerId | string | No | Forwarded as customerId. |
filters.accountType | AccountType | No | Forwarded as accountType. |
pagination.page | number | No | Forwarded as page. |
pagination.pageSize | number | No | Forwarded as pageSize. |
Returns
Promise<Transaction[]>
Behavior Notes
- The SDK can send
status,customerId,accountType,page, andpageSize. - It returns the response body directly as
Transaction[].
Request Examples
const filteredTransactions = await sdk.transactions.findAll({
status: TransactionStatus.PENDING,
accountType: AccountType.PORTFOLIO,
});
const paginatedTransactions = await sdk.transactions.findAll(undefined, {
page: 1,
pageSize: 10,
});
const filteredPaginatedTransactions = await sdk.transactions.findAll(
{
status: TransactionStatus.PENDING,
customerId: 'customer-1',
accountType: AccountType.PORTFOLIO,
},
{
page: 1,
pageSize: 10,
},
);
Response Example
[
{
id: 'tx-1',
assetId: 'asset-1',
type: 'deposit',
amount: '100.00',
status: 'PENDING',
network: 'ethereum',
participantId: 'participant-1',
reference: 'ref-1',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:00:00Z',
executedAt: null,
phases: [],
},
]
getById(id: string): Promise<Transaction>
Endpoint
GET /api/v1/core/transactions/:id
How it works
Fetches one transaction by identifier.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | Transaction identifier. |
Returns
Promise<Transaction>
Request Example
const tx = await sdk.transactions.getById('tx-id');
Response Example
{
id: 'tx-id',
assetId: 'asset-1',
type: 'withdrawal',
amount: '50.00',
status: 'PENDING',
network: 'ethereum',
participantId: 'participant-1',
reference: 'withdrawal-001',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:00:00Z',
executedAt: null,
phases: [],
}
createWithdrawal(dto: CreateWithdrawalDto): Promise<Transaction>
Endpoint
POST /api/v1/core/transactions/withdrawal
How it works
Creates a withdrawal transaction using the current withdrawal DTO.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
dto.accountId | string | Yes | Source account ID. |
dto.amount | string | Yes | Withdrawal amount. |
dto.assetCode | string | Yes | Asset code. |
dto.network | string | Yes | Network name string. |
dto.participantId | string | Yes | Participant identifier. |
dto.destinationAddress | string | Yes | Destination address. |
dto.reference | string | No | Optional reference string. |
Returns
Promise<Transaction>
Request Example
const tx = await sdk.transactions.createWithdrawal({
accountId: 'account-id',
amount: '50.00',
assetCode: 'USDC',
network: 'ethereum',
participantId: 'participant-id',
destinationAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
reference: 'withdrawal-001',
});
Response Example
{
id: 'tx-2',
assetId: 'asset-usdc',
type: 'withdrawal',
amount: '50.00',
status: 'PENDING',
network: 'ethereum',
participantId: 'participant-id',
reference: 'withdrawal-001',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:00:00Z',
executedAt: null,
phases: [],
}
rejectFrozenDeposit(id: string, reason?: string): Promise<Transaction>
Endpoint
POST /api/v1/core/transactions/:id/reject-frozen-deposit
How it works
Calls the deposit-specific frozen rejection endpoint currently implemented in the SDK.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | Transaction identifier. |
reason | string | No | Optional rejection reason. |
Returns
Promise<Transaction>
Behavior Notes
- This method reflects the current SDK path exactly, even if the public API docs now document a newer generic frozen-rejection route.
Request Example
const rejected = await sdk.transactions.rejectFrozenDeposit(
'tx-id',
'manual review failed',
);
Response Example
{
id: 'tx-id',
assetId: 'asset-1',
type: 'deposit',
amount: '100.00',
status: 'REJECTED',
network: 'ethereum',
participantId: 'participant-1',
reference: 'deposit-review',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:10:00Z',
executedAt: null,
phases: [],
}
approveFrozenDeposit(id: string): Promise<Transaction>
Endpoint
POST /api/v1/core/transactions/:id/approve-frozen-deposit
How it works
Calls the deposit-specific frozen approval endpoint currently implemented in the SDK.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | Transaction identifier. |
Returns
Promise<Transaction>
Behavior Notes
- This method documents the current SDK path, not the newer generic public route.
Request Example
const approved = await sdk.transactions.approveFrozenDeposit('tx-id');
Response Example
{
id: 'tx-id',
assetId: 'asset-1',
type: 'deposit',
amount: '100.00',
status: 'APPROVED',
network: 'ethereum',
participantId: 'participant-1',
reference: 'deposit-review',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:10:00Z',
executedAt: null,
phases: [],
}
rejectFrozenWithdrawal(id: string, reason?: string): Promise<Transaction>
Endpoint
POST /api/v1/core/transactions/:id/reject-frozen-withdrawal
How it works
Calls the withdrawal-specific frozen rejection endpoint currently implemented in the SDK.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | Transaction identifier. |
reason | string | No | Optional rejection reason. |
Returns
Promise<Transaction>
Behavior Notes
- This method documents the current SDK path, even if it differs from the newer public route naming.
Request Example
const rejected = await sdk.transactions.rejectFrozenWithdrawal(
'tx-id',
'risk policy',
);
Response Example
{
id: 'tx-id',
assetId: 'asset-1',
type: 'withdrawal',
amount: '50.00',
status: 'REJECTED',
network: 'ethereum',
participantId: 'participant-1',
reference: 'withdrawal-review',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:10:00Z',
executedAt: null,
phases: [],
}
approveFrozenWithdrawal(id: string): Promise<Transaction>
Endpoint
POST /api/v1/core/transactions/:id/approve-frozen-withdrawal
How it works
Calls the withdrawal-specific frozen approval endpoint currently implemented in the SDK.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
id | string | Yes | Transaction identifier. |
Returns
Promise<Transaction>
Request Example
const approved = await sdk.transactions.approveFrozenWithdrawal('tx-id');
Response Example
{
id: 'tx-id',
assetId: 'asset-1',
type: 'withdrawal',
amount: '50.00',
status: 'APPROVED',
network: 'ethereum',
participantId: 'participant-1',
reference: 'withdrawal-review',
transactionData: {},
createdAt: '2025-09-24T00:00:00Z',
updatedAt: '2025-09-24T00:10:00Z',
executedAt: null,
phases: [],
}
executePortfolioTransaction(dto: CreatePortfolioExecutionDto): Promise<PortfolioExecutionResponse>
Endpoint
POST /api/v1/core/transactions/portfolio/execute
How it works
Executes a portfolio web3 transaction using the current SDK execution DTO.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
dto.accountId | string | Yes | Portfolio account identifier. |
dto.chainId | number | Yes | Chain ID used by the backend to resolve the target network. |
dto.transactionData | Record<string, unknown> | Yes | Raw transaction payload forwarded as-is. |
Returns
Promise<PortfolioExecutionResponse>
Request Example
const result = await sdk.transactions.executePortfolioTransaction({
accountId: 'portfolio-account-id',
chainId: 1,
transactionData: {
to: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
data: '0x',
value: '0x0',
},
});
Response Example
{
transactionId: 'portfolio-tx-id',
txHash: '0x7d8c1f9b2f3e4a5c6d7e8f901234567890abcdef1234567890abcdef12345678',
}
signPortfolioMessage(dto: CreatePortfolioSignMessageDto): Promise<PortfolioSignMessageResponse>
Endpoint
POST /api/v1/core/transactions/portfolio/sign-message
How it works
Signs a portfolio message using the current signing DTO and returns the signature payload.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
dto.accountId | string | Yes | Portfolio account identifier. |
dto.chainId | number | Yes | Chain ID used to resolve the wallet network. |
dto.signMode | Web3SignMode | Yes | Signing mode enum. |
dto.message | string | No | Plain message payload. |
dto.messageEncoding | Web3SignMessageEncoding | No | Message encoding. |
dto.domain | Record<string, unknown> | No | EIP-712 domain object. |
dto.types | Record<string, unknown> | No | EIP-712 types object. |
dto.typedDataMessage | Record<string, unknown> | No | EIP-712 message object. |
Returns
Promise<PortfolioSignMessageResponse>
Behavior Notes
- Which fields are required in practice depends on the
signModechosen. - The SDK forwards the DTO as-is without local validation.
Request Example
import {
Web3SignMessageEncoding,
Web3SignMode,
} from '@ledgerlink/link-sdk';
const result = await sdk.transactions.signPortfolioMessage({
accountId: 'portfolio-account-id',
chainId: 1,
signMode: Web3SignMode.PERSONAL_SIGN,
message: 'Login challenge: 123456',
messageEncoding: Web3SignMessageEncoding.UTF8,
});
Response Example
{
signature: '0x4f3c...',
r: '0x1111',
s: '0x2222',
v: 27,
messageHash: '0xabc123',
message: 'Login challenge: 123456',
walletAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
network: 'ethereum',
signMode: 'personal_sign',
status: 'completed',
completedAt: '2026-04-02T09:00:00.000Z',
}