From 3bf56382da80f6d152723e6abf40947b1d71d481 Mon Sep 17 00:00:00 2001 From: Zane Starr Date: Tue, 8 Mar 2022 20:09:02 -0800 Subject: [PATCH] fix: refactor salesid to just u64 v U64 --- build/openrpc.json | 40 +++++++++---------- .../custom/typescript/src/index.ts | 4 +- .../custom/typescript/src/openrpc.json | 40 +++++++++---------- schemas/SaleId.json | 4 +- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/build/openrpc.json b/build/openrpc.json index 8d760d5..155d8f1 100644 --- a/build/openrpc.json +++ b/build/openrpc.json @@ -173,8 +173,8 @@ "properties": { "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "approval_id": { "title": "ApprovalId", @@ -400,8 +400,8 @@ "description": "The sales_id for the listing", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" } } }, @@ -541,8 +541,8 @@ "description": "Sale id for removing the associated sale", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "required": true } @@ -608,8 +608,8 @@ "description": "sale id to retrieve sale", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "required": true } @@ -660,8 +660,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -885,8 +885,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1143,8 +1143,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1381,8 +1381,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1619,8 +1619,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1868,8 +1868,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", diff --git a/generated-client/custom/typescript/src/index.ts b/generated-client/custom/typescript/src/index.ts index b995d95..55d85e7 100644 --- a/generated-client/custom/typescript/src/index.ts +++ b/generated-client/custom/typescript/src/index.ts @@ -13,7 +13,7 @@ import BN from "bn.js" * */ export type AccountId = string; -export type SaleId = string; +export type SaleId = number; /** * * expected approval ID. A number smaller than 2^53 @@ -417,7 +417,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":"fee_account","summary":"The services fee account","description":"The services fee account 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}],"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","$comment":"U64 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."}}}},"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":["contract_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","$comment":"U64 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","$comment":"U64 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","$comment":"U64 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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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","summary":"Get sales with pagination","description":"Get sales with pagination","tags":[{"name":"view","description":"View only methods"}],"params":[{"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":"MarketSimpleSalesResult","summary":"Sales","description":"Sales by contract token id 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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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_num_sales","summary":"Get number of sales ","description":"Get number of sales ","tags":[{"name":"view","description":"View only methods"}],"params":[],"result":{"name":"MarketSimpleNumSalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"type":"number","title":"number_Ho1clIqD"}}},{"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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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_for_owner_id","summary":"Get sales for owner id","description":"Get sales for owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Potential Owner account id","description":"Potential 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":"MarketSimpleSalesForOwnerResult","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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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"},"account_condition":{"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","$comment":"U64 string"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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":"fee_account","summary":"The services fee account","description":"The services fee account 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}],"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":"integer","$comment":"u64 only 2^53 support"},"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."}}}},"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":["contract_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":"integer","$comment":"u64 only 2^53 support"}}},{"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":"integer","$comment":"u64 only 2^53 support"},"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":"integer","$comment":"u64 only 2^53 support"},"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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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","summary":"Get sales with pagination","description":"Get sales with pagination","tags":[{"name":"view","description":"View only methods"}],"params":[{"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":"MarketSimpleSalesResult","summary":"Sales","description":"Sales by contract token id 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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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_num_sales","summary":"Get number of sales ","description":"Get number of sales ","tags":[{"name":"view","description":"View only methods"}],"params":[],"result":{"name":"MarketSimpleNumSalesResult","summary":"Supply of sales","description":"Supply of sales","schema":{"type":"number","title":"number_Ho1clIqD"}}},{"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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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_for_owner_id","summary":"Get sales for owner id","description":"Get sales for owner id","tags":[{"name":"view","description":"View only methods"}],"params":[{"name":"account_id","summary":"Potential Owner account id","description":"Potential 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":"MarketSimpleSalesForOwnerResult","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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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"},"account_condition":{"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":"integer","$comment":"u64 only 2^53 support"},"service_fee":{"title":"U128","type":"string","description":"U128 integer as 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."}}}},"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 8ee1acf..a3825c8 100644 --- a/generated-client/custom/typescript/src/openrpc.json +++ b/generated-client/custom/typescript/src/openrpc.json @@ -173,8 +173,8 @@ "properties": { "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "approval_id": { "title": "ApprovalId", @@ -400,8 +400,8 @@ "description": "The sales_id for the listing", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" } } }, @@ -541,8 +541,8 @@ "description": "Sale id for removing the associated sale", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "required": true } @@ -608,8 +608,8 @@ "description": "sale id to retrieve sale", "schema": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "required": true } @@ -660,8 +660,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -885,8 +885,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1143,8 +1143,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1381,8 +1381,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1619,8 +1619,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", @@ -1868,8 +1868,8 @@ }, "sale_id": { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" }, "service_fee": { "title": "U128", diff --git a/schemas/SaleId.json b/schemas/SaleId.json index 6d1b93b..110568a 100644 --- a/schemas/SaleId.json +++ b/schemas/SaleId.json @@ -1,6 +1,6 @@ { "title": "SaleId", - "type": "string", - "$comment": "U64 string" + "type": "integer", + "$comment": "u64 only 2^53 support" } \ No newline at end of file