Skip to content

Commit

Permalink
tensor-nft-buy-cheapest interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Baulore committed Apr 23, 2024
1 parent cf7da13 commit ff9da14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/blockchain-sdk-solana/examples/exmple-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// 2. Multiple actions should be later supported (e.g. both link and sign transaction), based on mockups e.g. https://www.figma.com/file/YMrtyevM6MlWYDZBO2fLb4/Use-Case-Examples?type=design&node-id=1-820&mode=dev
// 3. Single smart message should be produced if multiple actions exist, we should forbid using multiple tx-services in a context of single actionable notif
import { DappMessageActionType, type DappMessageSmartMessageAction } from '@dialectlabs/sdk/src';
import type { TensorNftBuySmartMessage } from '../../sdk-actions-spec';
import type { TensorNftBuyNowSmartMessage } from '../../sdk-actions-spec';
import type { DappMessages } from '../../sdk/src/';
// @ts-ignore

const dappMessages = (1 as DappMessages);
const tensorSmartMessage: TensorNftBuySmartMessage = {
const tensorSmartMessage: TensorNftBuyNowSmartMessage = {
transactionServiceId: 'tensor-nft-buy',
transactionParams: {
collectionId: 'foo',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SmartMessage, SmartMessageParams } from '@dialectlabs/sdk';

export interface TensorNftBuySmartMessage extends SmartMessage {
transactionServiceId: 'tensor-nft-buy';
export interface TensorNftBuyNowSmartMessage extends SmartMessage {
transactionServiceId: 'tensor-nft-buy-now';
transactionParams: NftBuyTransactionParams;
}

Expand All @@ -15,3 +15,14 @@ export interface NftBuyTransactionParams extends SmartMessageParams {
collectionName?: string;
nftName?: string;
}

export interface TensorNftBuyCheapestSmartMessage extends SmartMessage {
transactionServiceId: 'tensor-nft-buy-cheapest';
transactionParams: NftBuyTransactionParams;
}

export interface NftBuyCheapestTransactionParams extends SmartMessageParams {
collectionId: string;
collectionName: string;
imageUrl?: string;
}

0 comments on commit ff9da14

Please sign in to comment.