diff --git a/build/openrpc.json b/build/openrpc.json index e314207..11a590e 100644 --- a/build/openrpc.json +++ b/build/openrpc.json @@ -176,17 +176,17 @@ "title": "SaleId", "type": "string" }, - "offer_approval_id": { + "approval_id": { "title": "ApprovalId", "description": "expected approval ID. A number smaller than 2^53", "type": "number" }, - "offer_nft_contract_id": { + "contract_id": { "title": "AccountId", "type": "string", "description": "AccountId for the near account" }, - "offer_nft_token_id": { + "token_id": { "title": "TokenId", "description": "Token identifier that corresponds to an id", "type": "string" @@ -194,9 +194,8 @@ }, "required": [ "sale_id", - "offer_approval_id", - "offer_nft_contract_id", - "offer_nft_token_id" + "token_id", + "contract_id" ] }, "required": true @@ -223,130 +222,143 @@ ], "params": [ { - "name": "sale_conditions", + "name": "sale_args", "summary": "Sale conditions required for sale aka. what you're looking for", "description": "sale conditions required for sale", "schema": { - "title": "SaleConditions", - "type": "array", - "items": [ - { - "title": "SaleCondition", - "type": "object", - "properties": { - "ft": { - "title": "FtSaleConditions", + "title": "SaleArgs", + "type": "object", + "properties": { + "account_condition": { + "title": "AccountCondition", + "type": "string" + }, + "sale_conditions": { + "title": "SaleConditions", + "type": "array", + "items": [ + { + "title": "SaleCondition", "type": "object", - "properties": {}, - "additionalProperties": { - "title": "Bid", - "type": "object", - "properties": { - "owner_id": { - "title": "AccountId", - "type": "string", - "description": "AccountId for the near account" - }, - "amount": { - "title": "U128", - "type": "string", - "description": "U128 integer as string" + "properties": { + "ft": { + "title": "FtSaleConditions", + "type": "object", + "properties": {}, + "additionalProperties": { + "title": "Bid", + "type": "object", + "properties": { + "owner_id": { + "title": "AccountId", + "type": "string", + "description": "AccountId for the near account" + }, + "amount": { + "title": "U128", + "type": "string", + "description": "U128 integer as string" + } + } } - } - } - }, - "nft": { - "title": "NftSaleConditions", - "type": "object", - "properties": {}, - "patternProperties": { - ".*": { - "title": "NftMetadataFilter", + }, + "nft": { + "title": "NftSaleConditions", "type": "object", - "properties": { - "token_id": { - "title": "TokenId", - "description": "Token identifier that corresponds to an id", - "type": "string" - }, - "token_id_regex": { - "title": "TokenIdRegex", - "type": "string" - }, - "metadata": { - "title": "NFTTokenMetadata", + "properties": {}, + "patternProperties": { + ".*": { + "title": "NftMetadataFilter", "type": "object", "properties": { - "title": { - "type": "string", - "title": "NFTTokenMetadataTitle", - "description": "ex. Parcel #5055" + "token_id": { + "title": "TokenId", + "description": "Token identifier that corresponds to an id", + "type": "string" }, - "description": { - "type": "string", - "title": "NFTTokenMetadataDesc", - "description": "free-form description" - }, - "media": { - "type": "string", - "title": "NFTTokenMetadataMedia", - "description": "URL to associated media, preferably to decentralized, content-addressed storage" - }, - "media_hash": { - "type": "string", - "title": "NFTTokenMetadataMediaHash", - "description": "Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included." - }, - "issued_at": { - "type": "string", - "title": "NFTokenMetadataIssuedAt", - "description": "When token was issued or minted, Unix epoc in milliseconds" - }, - "expires_at": { - "type": "string", - "title": "NFTokenMetadataExpiresAt", - "description": "When token expires, Unix epoch in milliseconds" - }, - "starts_at": { - "type": "string", - "title": "NFTokenMetadataStartsAt", - "description": "When token starts being valid, Unix epoch in milliseconds" - }, - "updated_at": { - "type": "string", - "title": "NFTokenMetadataUpdatedAt", - "description": "When token was last updated, Unix epoch in milliseconds" - }, - "extra": { - "type": "string", - "title": "NFTokenMetadataExtra", - "description": "Anything extra the MT wants to store on-chain. Can be stringified JSON." + "token_id_regex": { + "title": "TokenIdRegex", + "type": "string" }, - "reference": { - "type": "string", - "title": "NFTokenMetadataReference", - "description": "URL to an off-chain JSON file with more info." + "metadata": { + "title": "NFTTokenMetadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "NFTTokenMetadataTitle", + "description": "ex. Parcel #5055" + }, + "description": { + "type": "string", + "title": "NFTTokenMetadataDesc", + "description": "free-form description" + }, + "media": { + "type": "string", + "title": "NFTTokenMetadataMedia", + "description": "URL to associated media, preferably to decentralized, content-addressed storage" + }, + "media_hash": { + "type": "string", + "title": "NFTTokenMetadataMediaHash", + "description": "Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included." + }, + "issued_at": { + "type": "string", + "title": "NFTokenMetadataIssuedAt", + "description": "When token was issued or minted, Unix epoc in milliseconds" + }, + "expires_at": { + "type": "string", + "title": "NFTokenMetadataExpiresAt", + "description": "When token expires, Unix epoch in milliseconds" + }, + "starts_at": { + "type": "string", + "title": "NFTokenMetadataStartsAt", + "description": "When token starts being valid, Unix epoch in milliseconds" + }, + "updated_at": { + "type": "string", + "title": "NFTokenMetadataUpdatedAt", + "description": "When token was last updated, Unix epoch in milliseconds" + }, + "extra": { + "type": "string", + "title": "NFTokenMetadataExtra", + "description": "Anything extra the MT wants to store on-chain. Can be stringified JSON." + }, + "reference": { + "type": "string", + "title": "NFTokenMetadataReference", + "description": "URL to an off-chain JSON file with more info." + }, + "reference_hash": { + "type": "string", + "title": "NFTokenMetadataReferenceHash", + "description": "Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included." + } + } }, - "reference_hash": { + "receiver": { + "title": "AccountId", "type": "string", - "title": "NFTokenMetadataReferenceHash", - "description": "Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included." + "description": "AccountId for the near account" } - } - }, - "receiver": { - "title": "AccountId", - "type": "string", - "description": "AccountId for the near account" + }, + "additionalProperties": false } }, "additionalProperties": false } - }, - "additionalProperties": false + } } - } + ] } + }, + "required": [ + "sale_conditions" ] }, "required": true diff --git a/generated-client/custom/typescript/src/index.ts b/generated-client/custom/typescript/src/index.ts index 3cb9237..4b8cec2 100644 --- a/generated-client/custom/typescript/src/index.ts +++ b/generated-client/custom/typescript/src/index.ts @@ -26,6 +26,7 @@ export type ApprovalId = number; * */ export type TokenId = string; +export type AccountCondition = string; /** * * U128 integer as string @@ -135,13 +136,13 @@ export interface SaleCondition { nft?: NftSaleConditions; [k: string]: any; } +export type SaleConditions = [SaleCondition]; export type BooleanVyG3AETh = boolean; export interface ItemForSale { contract_id: AccountId; token_id: TokenId; [k: string]: any; } -export type SaleConditions = [SaleCondition]; /** * * U64 integer as string @@ -161,9 +162,14 @@ export type AccountIds = [AccountId]; export type BidHistoryLength = number; export interface NftBuyOffer { sale_id: SaleId; - offer_approval_id: ApprovalId; - offer_nft_contract_id: AccountId; - offer_nft_token_id: TokenId; + approval_id?: ApprovalId; + contract_id: AccountId; + token_id: TokenId; + [k: string]: any; +} +export interface SaleArgs { + account_condition?: AccountCondition; + sale_conditions: SaleConditions; [k: string]: any; } export interface SaleItem { @@ -197,12 +203,12 @@ export type UnorderedSetOfBooleanVyG3AETheht2BVDp = [BooleanVyG3AETh]; * Generated! Represents an alias to any of the provided schemas * */ -export type AnyOfAccountIdAccountIdsBidHistoryLengthAccountIdsAccountIdTokenIdNftBuyOfferSaleConditionsSaleItemApprovalIdAccountIdTokenIdTokenIdAccountIdTokenIdAccountIdU128SaleIdSaleIdAccountIdU64LimitAccountIdU64LimitAccountIdTokenIdU64LimitAccountIdAccountIdAccountIdAccountIdBooleanVyG3AEThBooleanVyG3AEThTokenIdsU128NullQu0Arl1FBooleansNullQu0Arl1FNullQu0Arl1FSaleIdNullQu0Arl1FNullQu0Arl1FNullQu0Arl1FSaleSalesSalesSalesU64U64U64StorageBalanceBoundsObjectStorageBalanceStorageBalanceUnorderedSetOfBooleanVyG3AETheht2BVDpStorageBalance = AccountId | AccountIds | BidHistoryLength | TokenId | NftBuyOffer | SaleConditions | SaleItem | ApprovalId | U128 | SaleId | U64 | Limit | BooleanVyG3AETh | TokenIds | NullQu0Arl1F | Booleans | Sale | Sales | StorageBalanceBoundsObject | StorageBalance | UnorderedSetOfBooleanVyG3AETheht2BVDp; +export type AnyOfAccountIdAccountIdsBidHistoryLengthAccountIdsAccountIdTokenIdNftBuyOfferSaleArgsSaleItemApprovalIdAccountIdTokenIdTokenIdAccountIdTokenIdAccountIdU128SaleIdSaleIdAccountIdU64LimitAccountIdU64LimitAccountIdTokenIdU64LimitAccountIdAccountIdAccountIdAccountIdBooleanVyG3AEThBooleanVyG3AEThTokenIdsU128NullQu0Arl1FBooleansNullQu0Arl1FNullQu0Arl1FSaleIdNullQu0Arl1FNullQu0Arl1FNullQu0Arl1FSaleSalesSalesSalesU64U64U64StorageBalanceBoundsObjectStorageBalanceStorageBalanceUnorderedSetOfBooleanVyG3AETheht2BVDpStorageBalance = AccountId | AccountIds | BidHistoryLength | TokenId | NftBuyOffer | SaleArgs | SaleItem | ApprovalId | U128 | SaleId | U64 | Limit | BooleanVyG3AETh | TokenIds | NullQu0Arl1F | Booleans | Sale | Sales | StorageBalanceBoundsObject | StorageBalance | UnorderedSetOfBooleanVyG3AETheht2BVDp; export type New = (owner_id: AccountId, ft_token_ids?: AccountIds, bid_history_length?: BidHistoryLength) => Promise; export type AddFtTokenIds = (ft_token_ids: AccountIds) => Promise; export type Offer = (nft_contract_id: AccountId, token_id: TokenId) => Promise; export type NftOffer = (offer: NftBuyOffer) => Promise; -export type NftList = (sale_conditions: SaleConditions, sale_item: SaleItem, sale_approval_id?: ApprovalId) => Promise; +export type NftList = (sale_args: SaleArgs, sale_item: SaleItem, sale_approval_id?: ApprovalId) => Promise; export type AcceptOffer = (nft_contract_id: AccountId, token_id: TokenId, ft_token_id: TokenId) => Promise; export type UpdatePrice = (nft_contract_id: AccountId, token_id: TokenId, ft_token_id: AccountId, price: U128) => Promise; export type RemoveSale = (sale_id: SaleId) => Promise; @@ -378,7 +384,7 @@ const isMetaObject = (x: any): boolean => { } export class SwapplandMarket { - public static openrpcDocument: OpenRPC = {"openrpc":"1.0.0","info":{"title":"SwapplandMarket","version":"0.0.0-development"},"methods":[{"name":"new","summary":"Instantiate market contract","description":"Instantiate market contract","tags":[{"name":"change","description":"change method"}],"params":[{"name":"owner_id","summary":"The owner of the contract","description":"The owner of the contract","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"ft_token_ids","summary":"Fungible tokens to support","description":"Fungible tokens to support","schema":{"title":"AccountIds","type":"array","items":[{"title":"AccountId","type":"string","description":"AccountId for the near account"}]},"required":false},{"name":"bid_history_length","summary":"The bid history length","description":"The bid history length","schema":{"title":"BidHistoryLength","minimum":0,"maximum":255,"type":"integer"},"required":false}],"result":{"name":"MarketSimpleNewResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"add_ft_token_ids","summary":"Add tokens to accept as currency","description":"Add tokens to accept as currency","tags":[{"name":"change","description":"change method"}],"params":[{"name":"ft_token_ids","summary":"Fungible tokens to support","description":"Fungible tokens to support","schema":{"title":"AccountIds","type":"array","items":[{"title":"AccountId","type":"string","description":"AccountId for the near account"}]},"required":true}],"result":{"name":"MarketSimpleBoolsResult","summary":"Returns whether or not tokens were added","description":"Returns whether or not tokens were added","schema":{"title":"Booleans","type":"array","items":[{"type":"boolean","title":"boolean_vyG3AETh"}]}}},{"name":"offer","summary":"Offer a token id ","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true}],"result":{"name":"MarketSimpleOfferSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"nft_offer","summary":"NFT token offer","description":"Accept nft token offer","tags":[{"name":"change","description":"change method"}],"params":[{"name":"offer","summary":"Non fungible token offer","description":"Non fungible token offer","schema":{"title":"NftBuyOffer","type":"object","properties":{"sale_id":{"title":"SaleId","type":"string"},"offer_approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"offer_nft_contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"offer_nft_token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["sale_id","offer_approval_id","offer_nft_contract_id","offer_nft_token_id"]},"required":true}],"result":{"name":"MarketSimpleNftOfferResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"nft_list","summary":"List your nft/ft for sale for an nft/ft","description":"List your nft/ft for sale for an nft/ft","tags":[{"name":"change","description":"change method"}],"params":[{"name":"sale_conditions","summary":"Sale conditions required for sale aka. what you're looking for","description":"sale conditions required for sale","schema":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"required":true},{"name":"sale_item","summary":"The item being listed for sale","description":"The item being listed for sale","schema":{"title":"SaleItem","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["amount","contract_id","token_id"]},"required":true},{"name":"sale_approval_id","summary":"The approval id for the item being sold","description":"The approval id for the item being sold","schema":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"required":false}],"result":{"name":"MarketSimpleNftListResult","summary":"Returns the sales id ","description":"The sales_id for the listing","schema":{"title":"SaleId","type":"string"}}},{"name":"accept_offer","summary":"Accept a token offer","description":"Accept a token offer","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"ft_token_id","summary":"FT token id to accept offer from","description":"FT token id to accept offer from","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true}],"result":{"name":"MarketSimpleAcceptOfferSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"update_price","summary":"Update the price","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"ft_token_id","summary":"FT token id to support","description":"FT token id to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"price","summary":"Price in the denomination of the token","description":"Price in the denomination of the token","schema":{"title":"U128","type":"string","description":"U128 integer as string"},"required":true}],"result":{"name":"MarketSimpleUpdatePriceResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"remove_sale","summary":"Remove sale from market place","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"sale_id","summary":"Sale id for removal","description":"Sale id for removing the associated sale","schema":{"title":"SaleId","type":"string"},"required":true}],"result":{"name":"MarketSimpleRmSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"get_sale","summary":"Get sales by nft contract id","description":"Get sales by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"sale_id","summary":"SaleId sale id to retrieve sale","description":"sale id to retrieve sale","schema":{"title":"SaleId","type":"string"},"required":true}],"result":{"name":"MarketSimpleSalesByNFTContractResult","summary":"Sales","required":false,"description":"Sales by owner in a vector","schema":{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}}},{"name":"get_sales_by_owner_id","summary":"Get sales by owner id","description":"Get sales by owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Owner account id","description":"Owner account id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleSalesByOwnerResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_sales_by_nft_contract_id","summary":"Get sales by nft contract id","description":"Get sales by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"nft_contract_id","summary":"NFT contract id","description":"NFT contract id to query against","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleSalesByNFTContractResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_offers_by_contract_token_id","summary":"Get offers by contract and token id","description":"Get offers by contract and token id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"contract_id","summary":"NFT contract id","description":"NFT contract id to query against","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id","description":"NFT token id to query against","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleOfferByNFTContractTokenIdResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_supply_by_owner_id","summary":"Get supply of sales by owner id","description":"Get supply of sales by owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Owner account id","description":"Owner account id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":false}],"result":{"name":"MarketSimpleSupplySalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"get_supply_by_nft_contract_id","summary":"Get supply by nft contract id","description":"Get supply by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"nft_contract_id","summary":"Nft contract id","description":"Nft contract id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true}],"result":{"name":"MarketSimpleSupplySalesNFTResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"get_supply_sales","summary":"Get supply of sales ","description":"Get supply of sales ","tags":[{"name":"view","description":"View only methods"}],"params":[],"result":{"name":"MarketSimpleSupplySalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"storage_balance_bounds","summary":"Returns the minimum and maximum allowe balance amounts to interact with this contract","description":"Returns the minimum and maximum allowe balance amounts to interact with this contract","tags":[{"name":"view","description":"View only methods"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[],"result":{"name":"StorageBalanceBoundsResult","summary":"min` is the amount of tokens required to start","description":"This will be returned for the method `storage_balance_bounds`. Both `min` and `max` are string representations of unsigned 128-bit integers.`min` is the amount of tokens required to start using this contract at all (eg to register with the contract). If a new contract user attaches `min` NEAR to a `storage_deposit` call, subsequent calls to `storage_balance_of` for this user must show their `total` equal to `min` and `available=0` . A contract may implement `max` equal to `min` if it only charges for initial registration, and does not adjust per-user storage over time. A contract which implements `max` must refund deposits that would increase a user's storage balance beyond this amount.","schema":{"title":"StorageBalanceBoundsObject","type":"object","properties":{"min":{"title":"U128","type":"string","description":"U128 integer as string"},"max":{"title":"U128","type":"string","description":"U128 integer as string"}}}}},{"name":"storage_balance_of","summary":"Returns the storage balance of an account for set of token_ids","description":"Returns the storage balance of an account for set of token_ids. If the `account_id` is not registered it will return `null`","tags":[{"name":"view","description":"View only methods"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"account_id","summary":"Account to allocate storage for","description":"Account to allocate storage for","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true}],"result":{"name":"StorageBalanceOfResult","summary":"Storage balance of the `account_id`","description":"Storage balance of the `account_id`","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]},"required":false}},{"name":"storage_deposit","summary":"Payable method that receives an attached deposit of Ⓝ for a given account","description":"Payable method that receives an attached deposit of Ⓝ for a given account. ","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"account_id","summary":"Account to allocate storage for","description":"Account to allocate storage for","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":false},{"name":"registration_only","summary":"Registration flag that if true will refund above minimum balance if accound didn't exist and full deposit if it exists.","description":"Registration flag that if true will refund above minimum balance if accound didn't exist and full deposit if it exists.","schema":{"type":"boolean","title":"boolean_vyG3AETh"},"required":false}],"result":{"name":"StorageDepositResult","summary":"Returns the `StorageBalance` showing updated balances","description":"Returns the `StorageBalance` showing updated balances","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]}}},{"name":"storage_unregister","summary":"Unregister the predecessor account and return the storage NEAR deposit back","description":"Unregister the predecessor account and return the storage NEAR deposit back. Requires 1yoctoNEAR attached balance to prevent function-call access-key call","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"force","summary":"The force flag set to true will ignore account balances and burn the tokens and close the account","description":"The force flag set to true will ignore account balances and burn the tokens and close the account","schema":{"type":"boolean","title":"boolean_vyG3AETh"},"required":false}],"result":{"name":"StorageUnregisterResult","summary":"An array of booleans corresponding to the `token_ids`. `false` if token was already unregistered true other wise","schema":{"type":"array","items":[{"type":"boolean","title":"boolean_vyG3AETh"}],"title":"unorderedSetOf_boolean_vyG3AETheht2bVDp"}}},{"name":"storage_withdraw","summary":"Withdraw specified amount of available Ⓝ for predecessor account.","description":"Withdraw specified amount of available Ⓝ for predecessor account. ","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"token_ids","summary":"The tokens to withdraw storage from","description":"The tokens to withdraw storage from","schema":{"title":"TokenIds","type":"array","items":[{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}]}},{"name":"amount","summary":"The amount of balance to refund","description":"The amount of balance to refund, if not specified then it's the total amount. Must require exactly 1 yoctoNEAR attached balance to prevent restricted function-call access-key call for wallet security.","schema":{"title":"U128","type":"string","description":"U128 integer as string"}}],"result":{"name":"StorageWithdrawResult","summary":"Returns the StorageBalance structure showing updated balances","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]},"required":true}}]} ; + public static openrpcDocument: OpenRPC = {"openrpc":"1.0.0","info":{"title":"SwapplandMarket","version":"0.0.0-development"},"methods":[{"name":"new","summary":"Instantiate market contract","description":"Instantiate market contract","tags":[{"name":"change","description":"change method"}],"params":[{"name":"owner_id","summary":"The owner of the contract","description":"The owner of the contract","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"ft_token_ids","summary":"Fungible tokens to support","description":"Fungible tokens to support","schema":{"title":"AccountIds","type":"array","items":[{"title":"AccountId","type":"string","description":"AccountId for the near account"}]},"required":false},{"name":"bid_history_length","summary":"The bid history length","description":"The bid history length","schema":{"title":"BidHistoryLength","minimum":0,"maximum":255,"type":"integer"},"required":false}],"result":{"name":"MarketSimpleNewResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"add_ft_token_ids","summary":"Add tokens to accept as currency","description":"Add tokens to accept as currency","tags":[{"name":"change","description":"change method"}],"params":[{"name":"ft_token_ids","summary":"Fungible tokens to support","description":"Fungible tokens to support","schema":{"title":"AccountIds","type":"array","items":[{"title":"AccountId","type":"string","description":"AccountId for the near account"}]},"required":true}],"result":{"name":"MarketSimpleBoolsResult","summary":"Returns whether or not tokens were added","description":"Returns whether or not tokens were added","schema":{"title":"Booleans","type":"array","items":[{"type":"boolean","title":"boolean_vyG3AETh"}]}}},{"name":"offer","summary":"Offer a token id ","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true}],"result":{"name":"MarketSimpleOfferSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"nft_offer","summary":"NFT token offer","description":"Accept nft token offer","tags":[{"name":"change","description":"change method"}],"params":[{"name":"offer","summary":"Non fungible token offer","description":"Non fungible token offer","schema":{"title":"NftBuyOffer","type":"object","properties":{"sale_id":{"title":"SaleId","type":"string"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["sale_id","token_id","contract_id"]},"required":true}],"result":{"name":"MarketSimpleNftOfferResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"nft_list","summary":"List your nft/ft for sale for an nft/ft","description":"List your nft/ft for sale for an nft/ft","tags":[{"name":"change","description":"change method"}],"params":[{"name":"sale_args","summary":"Sale conditions required for sale aka. what you're looking for","description":"sale conditions required for sale","schema":{"title":"SaleArgs","type":"object","properties":{"account_condition":{"title":"AccountCondition","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]}},"required":["sale_conditions"]},"required":true},{"name":"sale_item","summary":"The item being listed for sale","description":"The item being listed for sale","schema":{"title":"SaleItem","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["amount","contract_id","token_id"]},"required":true},{"name":"sale_approval_id","summary":"The approval id for the item being sold","description":"The approval id for the item being sold","schema":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"required":false}],"result":{"name":"MarketSimpleNftListResult","summary":"Returns the sales id ","description":"The sales_id for the listing","schema":{"title":"SaleId","type":"string"}}},{"name":"accept_offer","summary":"Accept a token offer","description":"Accept a token offer","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"ft_token_id","summary":"FT token id to accept offer from","description":"FT token id to accept offer from","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true}],"result":{"name":"MarketSimpleAcceptOfferSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"update_price","summary":"Update the price","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"nft_contract_id","summary":"Non fungible contract id","description":"Fungible tokens to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id to support","description":"NFT token id to support","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"ft_token_id","summary":"FT token id to support","description":"FT token id to support","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"price","summary":"Price in the denomination of the token","description":"Price in the denomination of the token","schema":{"title":"U128","type":"string","description":"U128 integer as string"},"required":true}],"result":{"name":"MarketSimpleUpdatePriceResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"remove_sale","summary":"Remove sale from market place","description":"Remove sale from market place","tags":[{"name":"change","description":"change method"}],"params":[{"name":"sale_id","summary":"Sale id for removal","description":"Sale id for removing the associated sale","schema":{"title":"SaleId","type":"string"},"required":true}],"result":{"name":"MarketSimpleRmSalesResult","summary":"Void","description":"Void","schema":{"type":"null","title":"null_Qu0Arl1F"}}},{"name":"get_sale","summary":"Get sales by nft contract id","description":"Get sales by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"sale_id","summary":"SaleId sale id to retrieve sale","description":"sale id to retrieve sale","schema":{"title":"SaleId","type":"string"},"required":true}],"result":{"name":"MarketSimpleSalesByNFTContractResult","summary":"Sales","required":false,"description":"Sales by owner in a vector","schema":{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}}},{"name":"get_sales_by_owner_id","summary":"Get sales by owner id","description":"Get sales by owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Owner account id","description":"Owner account id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleSalesByOwnerResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_sales_by_nft_contract_id","summary":"Get sales by nft contract id","description":"Get sales by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"nft_contract_id","summary":"NFT contract id","description":"NFT contract id to query against","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleSalesByNFTContractResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_offers_by_contract_token_id","summary":"Get offers by contract and token id","description":"Get offers by contract and token id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"contract_id","summary":"NFT contract id","description":"NFT contract id to query against","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true},{"name":"token_id","summary":"NFT token id","description":"NFT token id to query against","schema":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"required":true},{"name":"from_index","summary":"From index value","description":"From index value","schema":{"title":"U64","type":"string","description":"U64 integer as string"},"required":true},{"name":"limit","summary":"Limit to set iteration to rel. to index ","description":"Limit to set iteration to rel. to index","schema":{"title":"Limit","description":"Limit for setting pagination u64 constrainted by 2^53 js limit","type":"integer"},"required":true}],"result":{"name":"MarketSimpleOfferByNFTContractTokenIdResult","summary":"Sales","description":"Sales by owner in a vector","schema":{"title":"Sales","type":"array","items":[{"title":"Sale","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"approval_id":{"title":"ApprovalId","description":"expected approval ID. A number smaller than 2^53","type":"number"},"item_for_sale":{"title":"ItemForSale","type":"object","properties":{"contract_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}},"required":["contract_id","token_id"]},"sale_id":{"title":"SaleId","type":"string"},"sale_conditions":{"title":"SaleConditions","type":"array","items":[{"title":"SaleCondition","type":"object","properties":{"ft":{"title":"FtSaleConditions","type":"object","properties":{},"additionalProperties":{"title":"Bid","type":"object","properties":{"owner_id":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"amount":{"title":"U128","type":"string","description":"U128 integer as string"}}}},"nft":{"title":"NftSaleConditions","type":"object","properties":{},"patternProperties":{".*":{"title":"NftMetadataFilter","type":"object","properties":{"token_id":{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"},"token_id_regex":{"title":"TokenIdRegex","type":"string"},"metadata":{"title":"NFTTokenMetadata","type":"object","properties":{"title":{"type":"string","title":"NFTTokenMetadataTitle","description":"ex. Parcel #5055"},"description":{"type":"string","title":"NFTTokenMetadataDesc","description":"free-form description"},"media":{"type":"string","title":"NFTTokenMetadataMedia","description":"URL to associated media, preferably to decentralized, content-addressed storage"},"media_hash":{"type":"string","title":"NFTTokenMetadataMediaHash","description":"Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included."},"issued_at":{"type":"string","title":"NFTokenMetadataIssuedAt","description":"When token was issued or minted, Unix epoc in milliseconds"},"expires_at":{"type":"string","title":"NFTokenMetadataExpiresAt","description":"When token expires, Unix epoch in milliseconds"},"starts_at":{"type":"string","title":"NFTokenMetadataStartsAt","description":"When token starts being valid, Unix epoch in milliseconds"},"updated_at":{"type":"string","title":"NFTokenMetadataUpdatedAt","description":"When token was last updated, Unix epoch in milliseconds"},"extra":{"type":"string","title":"NFTokenMetadataExtra","description":"Anything extra the MT wants to store on-chain. Can be stringified JSON."},"reference":{"type":"string","title":"NFTokenMetadataReference","description":"URL to an off-chain JSON file with more info."},"reference_hash":{"type":"string","title":"NFTokenMetadataReferenceHash","description":"Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included."}}},"receiver":{"title":"AccountId","type":"string","description":"AccountId for the near account"}},"additionalProperties":false}},"additionalProperties":false}}}]},"created_at":{"title":"U64","type":"string","description":"U64 integer as string"}},"required":["owner_id","item_for_sale","sale_id","sales_conditions","created_at"]}]}}},{"name":"get_supply_by_owner_id","summary":"Get supply of sales by owner id","description":"Get supply of sales by owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Owner account id","description":"Owner account id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":false}],"result":{"name":"MarketSimpleSupplySalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"get_supply_by_nft_contract_id","summary":"Get supply by nft contract id","description":"Get supply by nft contract id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"nft_contract_id","summary":"Nft contract id","description":"Nft contract id","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true}],"result":{"name":"MarketSimpleSupplySalesNFTResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"get_supply_sales","summary":"Get supply of sales ","description":"Get supply of sales ","tags":[{"name":"view","description":"View only methods"}],"params":[],"result":{"name":"MarketSimpleSupplySalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"title":"U64","type":"string","description":"U64 integer as string"}}},{"name":"storage_balance_bounds","summary":"Returns the minimum and maximum allowe balance amounts to interact with this contract","description":"Returns the minimum and maximum allowe balance amounts to interact with this contract","tags":[{"name":"view","description":"View only methods"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[],"result":{"name":"StorageBalanceBoundsResult","summary":"min` is the amount of tokens required to start","description":"This will be returned for the method `storage_balance_bounds`. Both `min` and `max` are string representations of unsigned 128-bit integers.`min` is the amount of tokens required to start using this contract at all (eg to register with the contract). If a new contract user attaches `min` NEAR to a `storage_deposit` call, subsequent calls to `storage_balance_of` for this user must show their `total` equal to `min` and `available=0` . A contract may implement `max` equal to `min` if it only charges for initial registration, and does not adjust per-user storage over time. A contract which implements `max` must refund deposits that would increase a user's storage balance beyond this amount.","schema":{"title":"StorageBalanceBoundsObject","type":"object","properties":{"min":{"title":"U128","type":"string","description":"U128 integer as string"},"max":{"title":"U128","type":"string","description":"U128 integer as string"}}}}},{"name":"storage_balance_of","summary":"Returns the storage balance of an account for set of token_ids","description":"Returns the storage balance of an account for set of token_ids. If the `account_id` is not registered it will return `null`","tags":[{"name":"view","description":"View only methods"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"account_id","summary":"Account to allocate storage for","description":"Account to allocate storage for","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":true}],"result":{"name":"StorageBalanceOfResult","summary":"Storage balance of the `account_id`","description":"Storage balance of the `account_id`","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]},"required":false}},{"name":"storage_deposit","summary":"Payable method that receives an attached deposit of Ⓝ for a given account","description":"Payable method that receives an attached deposit of Ⓝ for a given account. ","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"account_id","summary":"Account to allocate storage for","description":"Account to allocate storage for","schema":{"title":"AccountId","type":"string","description":"AccountId for the near account"},"required":false},{"name":"registration_only","summary":"Registration flag that if true will refund above minimum balance if accound didn't exist and full deposit if it exists.","description":"Registration flag that if true will refund above minimum balance if accound didn't exist and full deposit if it exists.","schema":{"type":"boolean","title":"boolean_vyG3AETh"},"required":false}],"result":{"name":"StorageDepositResult","summary":"Returns the `StorageBalance` showing updated balances","description":"Returns the `StorageBalance` showing updated balances","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]}}},{"name":"storage_unregister","summary":"Unregister the predecessor account and return the storage NEAR deposit back","description":"Unregister the predecessor account and return the storage NEAR deposit back. Requires 1yoctoNEAR attached balance to prevent function-call access-key call","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"force","summary":"The force flag set to true will ignore account balances and burn the tokens and close the account","description":"The force flag set to true will ignore account balances and burn the tokens and close the account","schema":{"type":"boolean","title":"boolean_vyG3AETh"},"required":false}],"result":{"name":"StorageUnregisterResult","summary":"An array of booleans corresponding to the `token_ids`. `false` if token was already unregistered true other wise","schema":{"type":"array","items":[{"type":"boolean","title":"boolean_vyG3AETh"}],"title":"unorderedSetOf_boolean_vyG3AETheht2bVDp"}}},{"name":"storage_withdraw","summary":"Withdraw specified amount of available Ⓝ for predecessor account.","description":"Withdraw specified amount of available Ⓝ for predecessor account. ","tags":[{"name":"change","description":"change method"},{"name":"StorageManagement","description":"Storage Management Extension Tag"}],"params":[{"name":"token_ids","summary":"The tokens to withdraw storage from","description":"The tokens to withdraw storage from","schema":{"title":"TokenIds","type":"array","items":[{"title":"TokenId","description":"Token identifier that corresponds to an id","type":"string"}]}},{"name":"amount","summary":"The amount of balance to refund","description":"The amount of balance to refund, if not specified then it's the total amount. Must require exactly 1 yoctoNEAR attached balance to prevent restricted function-call access-key call for wallet security.","schema":{"title":"U128","type":"string","description":"U128 integer as string"}}],"result":{"name":"StorageWithdrawResult","summary":"Returns the StorageBalance structure showing updated balances","schema":{"title":"StorageBalance","type":"object","properties":{"total":{"title":"U128","type":"string","description":"U128 integer as string"},"available":{"title":"U128","type":"string","description":"U128 integer as string"}},"required":["total","available"]},"required":true}}]} ; public contract: Contract; private validator: MethodCallValidator; @@ -511,10 +517,10 @@ export class SwapplandMarket { * */ // tslint:disable-next-line:max-line-length - public nft_list(sale_conditions: SaleConditions, sale_item: SaleItem, sale_approval_id?: ApprovalId, options?: ChangeMethodOptions): RTNftList { + public nft_list(sale_args: SaleArgs, sale_item: SaleItem, sale_approval_id?: ApprovalId, options?: ChangeMethodOptions): RTNftList { //return this.request("nft_list", params); const paramNames:string[] = [ - "sale_conditions", + "sale_args", "sale_item", "sale_approval_id", ] diff --git a/generated-client/custom/typescript/src/openrpc.json b/generated-client/custom/typescript/src/openrpc.json index c8b4ff6..b0d2df0 100644 --- a/generated-client/custom/typescript/src/openrpc.json +++ b/generated-client/custom/typescript/src/openrpc.json @@ -176,17 +176,17 @@ "title": "SaleId", "type": "string" }, - "offer_approval_id": { + "approval_id": { "title": "ApprovalId", "description": "expected approval ID. A number smaller than 2^53", "type": "number" }, - "offer_nft_contract_id": { + "contract_id": { "title": "AccountId", "type": "string", "description": "AccountId for the near account" }, - "offer_nft_token_id": { + "token_id": { "title": "TokenId", "description": "Token identifier that corresponds to an id", "type": "string" @@ -194,9 +194,8 @@ }, "required": [ "sale_id", - "offer_approval_id", - "offer_nft_contract_id", - "offer_nft_token_id" + "token_id", + "contract_id" ] }, "required": true @@ -223,130 +222,143 @@ ], "params": [ { - "name": "sale_conditions", + "name": "sale_args", "summary": "Sale conditions required for sale aka. what you're looking for", "description": "sale conditions required for sale", "schema": { - "title": "SaleConditions", - "type": "array", - "items": [ - { - "title": "SaleCondition", - "type": "object", - "properties": { - "ft": { - "title": "FtSaleConditions", + "title": "SaleArgs", + "type": "object", + "properties": { + "account_condition": { + "title": "AccountCondition", + "type": "string" + }, + "sale_conditions": { + "title": "SaleConditions", + "type": "array", + "items": [ + { + "title": "SaleCondition", "type": "object", - "properties": {}, - "additionalProperties": { - "title": "Bid", - "type": "object", - "properties": { - "owner_id": { - "title": "AccountId", - "type": "string", - "description": "AccountId for the near account" - }, - "amount": { - "title": "U128", - "type": "string", - "description": "U128 integer as string" + "properties": { + "ft": { + "title": "FtSaleConditions", + "type": "object", + "properties": {}, + "additionalProperties": { + "title": "Bid", + "type": "object", + "properties": { + "owner_id": { + "title": "AccountId", + "type": "string", + "description": "AccountId for the near account" + }, + "amount": { + "title": "U128", + "type": "string", + "description": "U128 integer as string" + } + } } - } - } - }, - "nft": { - "title": "NftSaleConditions", - "type": "object", - "properties": {}, - "patternProperties": { - ".*": { - "title": "NftMetadataFilter", + }, + "nft": { + "title": "NftSaleConditions", "type": "object", - "properties": { - "token_id": { - "title": "TokenId", - "description": "Token identifier that corresponds to an id", - "type": "string" - }, - "token_id_regex": { - "title": "TokenIdRegex", - "type": "string" - }, - "metadata": { - "title": "NFTTokenMetadata", + "properties": {}, + "patternProperties": { + ".*": { + "title": "NftMetadataFilter", "type": "object", "properties": { - "title": { - "type": "string", - "title": "NFTTokenMetadataTitle", - "description": "ex. Parcel #5055" + "token_id": { + "title": "TokenId", + "description": "Token identifier that corresponds to an id", + "type": "string" }, - "description": { - "type": "string", - "title": "NFTTokenMetadataDesc", - "description": "free-form description" - }, - "media": { - "type": "string", - "title": "NFTTokenMetadataMedia", - "description": "URL to associated media, preferably to decentralized, content-addressed storage" - }, - "media_hash": { - "type": "string", - "title": "NFTTokenMetadataMediaHash", - "description": "Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included." - }, - "issued_at": { - "type": "string", - "title": "NFTokenMetadataIssuedAt", - "description": "When token was issued or minted, Unix epoc in milliseconds" - }, - "expires_at": { - "type": "string", - "title": "NFTokenMetadataExpiresAt", - "description": "When token expires, Unix epoch in milliseconds" - }, - "starts_at": { - "type": "string", - "title": "NFTokenMetadataStartsAt", - "description": "When token starts being valid, Unix epoch in milliseconds" - }, - "updated_at": { - "type": "string", - "title": "NFTokenMetadataUpdatedAt", - "description": "When token was last updated, Unix epoch in milliseconds" - }, - "extra": { - "type": "string", - "title": "NFTokenMetadataExtra", - "description": "Anything extra the MT wants to store on-chain. Can be stringified JSON." + "token_id_regex": { + "title": "TokenIdRegex", + "type": "string" }, - "reference": { - "type": "string", - "title": "NFTokenMetadataReference", - "description": "URL to an off-chain JSON file with more info." + "metadata": { + "title": "NFTTokenMetadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "NFTTokenMetadataTitle", + "description": "ex. Parcel #5055" + }, + "description": { + "type": "string", + "title": "NFTTokenMetadataDesc", + "description": "free-form description" + }, + "media": { + "type": "string", + "title": "NFTTokenMetadataMedia", + "description": "URL to associated media, preferably to decentralized, content-addressed storage" + }, + "media_hash": { + "type": "string", + "title": "NFTTokenMetadataMediaHash", + "description": "Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included." + }, + "issued_at": { + "type": "string", + "title": "NFTokenMetadataIssuedAt", + "description": "When token was issued or minted, Unix epoc in milliseconds" + }, + "expires_at": { + "type": "string", + "title": "NFTokenMetadataExpiresAt", + "description": "When token expires, Unix epoch in milliseconds" + }, + "starts_at": { + "type": "string", + "title": "NFTokenMetadataStartsAt", + "description": "When token starts being valid, Unix epoch in milliseconds" + }, + "updated_at": { + "type": "string", + "title": "NFTokenMetadataUpdatedAt", + "description": "When token was last updated, Unix epoch in milliseconds" + }, + "extra": { + "type": "string", + "title": "NFTokenMetadataExtra", + "description": "Anything extra the MT wants to store on-chain. Can be stringified JSON." + }, + "reference": { + "type": "string", + "title": "NFTokenMetadataReference", + "description": "URL to an off-chain JSON file with more info." + }, + "reference_hash": { + "type": "string", + "title": "NFTokenMetadataReferenceHash", + "description": "Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included." + } + } }, - "reference_hash": { + "receiver": { + "title": "AccountId", "type": "string", - "title": "NFTokenMetadataReferenceHash", - "description": "Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included." + "description": "AccountId for the near account" } - } - }, - "receiver": { - "title": "AccountId", - "type": "string", - "description": "AccountId for the near account" + }, + "additionalProperties": false } }, "additionalProperties": false } - }, - "additionalProperties": false + } } - } + ] } + }, + "required": [ + "sale_conditions" ] }, "required": true diff --git a/methods/get_sales_by_contract_token_id.json b/methods/get_sales_by_contract_token_id.json new file mode 100644 index 0000000..6b3d3ed --- /dev/null +++ b/methods/get_sales_by_contract_token_id.json @@ -0,0 +1,56 @@ +{ + "name": "get_sales_by_contract_token_id", + "summary": "Get sales by contract and token id", + "description": "Get sales by contract and token id", + "tags": [ + { + "$ref": "../standards/tags/view.json" + } + ], + "params": [ + { + "name": "contract_id", + "summary": "NFT contract id", + "description": "NFT contract id to query against", + "schema": { + "$ref": "../standards/schemas/AccountId.json" + }, + "required": true + }, + { + "name": "token_id", + "summary": "NFT token id", + "description": "NFT token id to query against", + "schema": { + "$ref": "../standards/schemas/TokenId.json" + }, + "required": true + }, + { + "name": "from_index", + "summary": "From index value", + "description": "From index value", + "schema": { + "$ref": "../standards/schemas/U64.json" + }, + "required": true + }, + { + "name": "limit", + "summary": "Limit to set iteration to rel. to index ", + "description": "Limit to set iteration to rel. to index", + "schema": { + "$ref": "../standards/schemas/Limit.json" + }, + "required": true + } + ], + "result": { + "name": "MarketSimpleSalesByNFTContractTokenIdResult", + "summary": "Sales", + "description": "Sales by contract token id in a vector", + "schema": { + "$ref": "../schemas/Sales.json" + } + } +} \ No newline at end of file diff --git a/methods/nft_list.json b/methods/nft_list.json index 31ab41b..81e5750 100644 --- a/methods/nft_list.json +++ b/methods/nft_list.json @@ -9,11 +9,11 @@ ], "params": [ { - "name": "sale_conditions", + "name": "sale_args", "summary": "Sale conditions required for sale aka. what you're looking for", "description": "sale conditions required for sale", "schema": { - "$ref": "../schemas/SaleConditions.json" + "$ref": "../schemas/SaleArgs.json" }, "required": true }, diff --git a/schemas/AccountCondition.json b/schemas/AccountCondition.json new file mode 100644 index 0000000..9e3aa68 --- /dev/null +++ b/schemas/AccountCondition.json @@ -0,0 +1,4 @@ +{ + "title": "AccountCondition", + "type": "string" +} \ No newline at end of file diff --git a/schemas/NftBuyOffer.json b/schemas/NftBuyOffer.json index ad8d6a1..c093b35 100644 --- a/schemas/NftBuyOffer.json +++ b/schemas/NftBuyOffer.json @@ -5,21 +5,21 @@ "sale_id": { "$ref": "./SaleId.json" }, - "offer_approval_id": { + "approval_id": { "$ref": "../standards/schemas/ApprovalId.json" }, - "offer_nft_contract_id": { + "contract_id": { "$ref": "../standards/schemas/AccountId.json" }, - "offer_nft_token_id": { + "token_id": { "$ref": "../standards/schemas/TokenId.json" } }, "required": [ "sale_id", - "offer_approval_id", - "offer_nft_contract_id", - "offer_nft_token_id" + "token_id", + "contract_id" ] + } \ No newline at end of file diff --git a/schemas/SaleArgs.json b/schemas/SaleArgs.json new file mode 100644 index 0000000..987a503 --- /dev/null +++ b/schemas/SaleArgs.json @@ -0,0 +1,16 @@ +{ + "title": "SaleArgs", + "type": "object", + "properties": { + "account_condition": { + "$ref": "./AccountCondition.json" + }, + "sale_conditions": { + "$ref": "./SaleConditions.json" + } + }, + "required": [ + "sale_conditions" + ] + +} \ No newline at end of file