Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Oct 30, 2024
1 parent 8097d5a commit 39b6d34
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 42 deletions.
4 changes: 2 additions & 2 deletions packages/api/src/services/DataLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ export default class DataLayer extends Service {
return this.command<{}>('subscribe', args);
}

async subscriptions(args: { id: string; urls: string[] }) {
return this.command<{}>('subscriptions', args);
async subscriptions(args: {}) {
return this.command<{ storeIds: string[] }>('subscriptions', args);
}

async takeOffer(args: {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/wallets/DL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ export default class DLWallet extends Wallet {
return this.command<{}>('subscribe', args);
}

async subscriptions(args: { id: string; urls: string[] }) {
return this.command<{}>('subscriptions', args);
async subscriptions(args: {}) {
return this.command<{ storeIds: string[] }>('subscriptions', args);
}

async takeDataLayerOffer(args: {
Expand Down
30 changes: 25 additions & 5 deletions packages/api/src/wallets/NFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type CalculateRoyaltiesRequest from '../@types/CalculateRoyaltiesRequest'
import type Coin from '../@types/Coin';
import type NFTInfo from '../@types/NFTInfo';
import type SpendBundle from '../@types/SpendBundle';
import type Transaction from '../@types/Transaction';
import Wallet from '../services/WalletService';

export default class NFTWallet extends Wallet {
Expand Down Expand Up @@ -39,13 +40,22 @@ export default class NFTWallet extends Wallet {

async mintBulk(args: {
walletId: number;
metadataList: any[];
metadataList: Array<{
uris: string[];
metaUris: string[];
licenseUris: string[];
hash: string;
editionNumber?: number;
editionTotal?: number;
metaHash?: string;
licenseHash?: string;
}>;
royaltyPercentage?: number;
royaltyAddress?: string;
targetList?: string[];
mintNumberStart?: number;
mintTotal?: number;
xchCoins?: string[];
xchCoins?: Coin[];
xchChangeTarget?: string;
newInnerpuzhash?: string;
newP2Puzhash?: string;
Expand All @@ -55,9 +65,19 @@ export default class NFTWallet extends Wallet {
fee?: number;
reusePuzhash?: boolean;
}) {
return this.command<{
spendBundle: SpendBundle;
}>('nft_mint_bulk', args);
return this.command<
| {
success: true;
spendBundle: SpendBundle;
nftIdList: string[];
transactions: Transaction[];
signingResponse?: string;
}
| {
success: false;
error: string;
}
>('nft_mint_bulk', args);
}

async mintNFT(args: {
Expand Down
17 changes: 12 additions & 5 deletions packages/gui/src/@types/WalletConnectCommandParamName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ enum WalletConnectCommandParamName {
COMMANDS = 'commands',
COUNT = 'count',
DID = 'did',
DID_COIN_DICT = 'didCoinDict',
DID_COIN = 'didCoin',
DID_ID = 'didId',
DID_LINEAGE_PARENT_HEX = 'didLineageParentHex',
DID_LINEAGE_PARENT = 'didLineageParent',
DISABLE_JSON_FORMATTING = 'disableJSONFormatting',
DRIVER_DICT = 'driverDict',
EDITION_NUMBER = 'editionNumber',
Expand All @@ -24,7 +24,7 @@ enum WalletConnectCommandParamName {
FEE = 'fee',
FINGERPRINT = 'fingerprint',
FINGERPRINTS = 'fingerprints',
FOLDER_NAME = 'folderName',
FOLDER_NAME = 'foldername',
HASH = 'hash',
HASH1 = 'hash1',
HASH2 = 'hash2',
Expand Down Expand Up @@ -67,7 +67,9 @@ enum WalletConnectCommandParamName {
OFFER = 'offer',
OFFER_DATA = 'offerData',
OFFER_ID = 'offerId',
OVERRIDE = 'override',
OVERWRITE = 'overwrite',
PAGE = 'page',
MAX_PAGE_SIZE = 'maxPageSize',
PROOFS = 'proofs',
PROVIDER_INNER_PUZHASH = 'providerInnerPuzhash',
PUBKEY = 'pubkey',
Expand All @@ -76,6 +78,7 @@ enum WalletConnectCommandParamName {
PUZZLE_DECORATOR = 'puzzleDecorator',
RECOVERY_LIST_HASH = 'recoveryListHash',
REVERSE = 'reverse',
RETAIN = 'retain',
REUSE_PUZHASH = 'reusePuzhash',
ROOT = 'root',
ROOT_HASH = 'rootHash',
Expand All @@ -88,6 +91,9 @@ enum WalletConnectCommandParamName {
SPEND_BUNDLE = 'spendBundle',
START = 'start',
START_INDEX = 'startIndex',
STORE_ID = 'storeId',
SUBMIT_ON_CHAIN = 'submitOnChain',
TAKER = 'taker',
TARGET_ADDRESS = 'targetAddress',
TARGET_LIST = 'targetList',
TRADE_ID = 'tradeId',
Expand All @@ -100,12 +106,13 @@ enum WalletConnectCommandParamName {
VALUE = 'value',
VC_ID = 'vcId',
VC_PARENT_ID = 'vcParentId',
VERBOSE = 'verbose',
WAIT_FOR_CONFIRMATION = 'waitForConfirmation',
WALLET_ID = 'walletId',
WALLET_IDS = 'walletIds',
WALLET_IDS_AND_AMOUNTS = 'walletIdsAndAmounts',
WITH_RECOVERY_INFO = 'withRecoveryInfo',
XCH_COIN_LIST = 'xchCoinList',
XCH_COINS = 'xchCoins',
XCH_CHANGE_TARGET = 'xchChangeTarget',
SAFE_MODE = 'safeMode',
}
Expand Down
Loading

0 comments on commit 39b6d34

Please sign in to comment.