From b86475b7f57f590304051a8dd37f685de62b2f20 Mon Sep 17 00:00:00 2001 From: Zane Starr Date: Tue, 8 Feb 2022 16:08:31 -0800 Subject: [PATCH] fix: make token_id and approval_id optional --- build/openrpc.json | 1 - generated-client/custom/typescript/src/index.ts | 4 ++-- generated-client/custom/typescript/src/openrpc.json | 1 - schemas/NftBuyOffer.json | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build/openrpc.json b/build/openrpc.json index a0eef1d..75c4e6d 100644 --- a/build/openrpc.json +++ b/build/openrpc.json @@ -194,7 +194,6 @@ }, "required": [ "sale_id", - "token_id", "contract_id" ] }, diff --git a/generated-client/custom/typescript/src/index.ts b/generated-client/custom/typescript/src/index.ts index 4df0aaf..e3c2b48 100644 --- a/generated-client/custom/typescript/src/index.ts +++ b/generated-client/custom/typescript/src/index.ts @@ -164,7 +164,7 @@ export interface NftBuyOffer { sale_id: SaleId; approval_id?: ApprovalId; contract_id: AccountId; - token_id: TokenId; + token_id?: TokenId; [k: string]: any; } export interface SaleArgs { @@ -392,7 +392,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"},"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_fee","summary":"Get fee associated with ft transfer","description":"Get fee associated with ft transfer","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"amount","summary":"Amount used to determine fee","description":"Amount used to determine fee","schema":{"title":"U128","type":"string","description":"U128 integer as string"},"required":true}],"result":{"name":"MarketSimpleFeeResult","summary":"Fee owed for contract deposit","description":"Fee owed for contract deposit","required":false,"schema":{"title":"U128","type":"string","description":"U128 integer as string"}}},{"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","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_fee","summary":"Get fee associated with ft transfer","description":"Get fee associated with ft transfer","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"amount","summary":"Amount used to determine fee","description":"Amount used to determine fee","schema":{"title":"U128","type":"string","description":"U128 integer as string"},"required":true}],"result":{"name":"MarketSimpleFeeResult","summary":"Fee owed for contract deposit","description":"Fee owed for contract deposit","required":false,"schema":{"title":"U128","type":"string","description":"U128 integer as string"}}},{"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; diff --git a/generated-client/custom/typescript/src/openrpc.json b/generated-client/custom/typescript/src/openrpc.json index 77b44e2..6d152f3 100644 --- a/generated-client/custom/typescript/src/openrpc.json +++ b/generated-client/custom/typescript/src/openrpc.json @@ -194,7 +194,6 @@ }, "required": [ "sale_id", - "token_id", "contract_id" ] }, diff --git a/schemas/NftBuyOffer.json b/schemas/NftBuyOffer.json index c093b35..1890811 100644 --- a/schemas/NftBuyOffer.json +++ b/schemas/NftBuyOffer.json @@ -17,9 +17,7 @@ }, "required": [ "sale_id", - "token_id", "contract_id" ] - } \ No newline at end of file