UNPKG

solana-framework-deno

Version:

solana-framework-deno is solana uni-tools for deno

66 lines 3.79 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Jupiter API v6 * The core of [jup.ag](https://jup.ag). Easily get a quote and swap through Jupiter API. ### Rate Limit We update our rate limit from time to time depending on the load of our servers. We recommend running your own instance of the API if you want to have high rate limit, here to learn how to run the [self-hosted API](https://station.jup.ag/docs/apis/self-hosted). ### API Wrapper - Typescript [@jup-ag/api](https://github.com/jup-ag/jupiter-quote-api-node) ### Data types - Public keys are base58 encoded strings - raw data such as Vec<u8\\> are base64 encoded strings * * The version of the OpenAPI document: 6.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SwapInstructionsResponseToJSON = exports.SwapInstructionsResponseFromJSONTyped = exports.SwapInstructionsResponseFromJSON = exports.instanceOfSwapInstructionsResponse = void 0; const runtime_1 = require("../runtime"); const Instruction_1 = require("./Instruction"); /** * Check if a given object implements the SwapInstructionsResponse interface. */ function instanceOfSwapInstructionsResponse(value) { let isInstance = true; isInstance = isInstance && "computeBudgetInstructions" in value; isInstance = isInstance && "setupInstructions" in value; isInstance = isInstance && "swapInstruction" in value; isInstance = isInstance && "addressLookupTableAddresses" in value; return isInstance; } exports.instanceOfSwapInstructionsResponse = instanceOfSwapInstructionsResponse; function SwapInstructionsResponseFromJSON(json) { return SwapInstructionsResponseFromJSONTyped(json, false); } exports.SwapInstructionsResponseFromJSON = SwapInstructionsResponseFromJSON; function SwapInstructionsResponseFromJSONTyped(json, _ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'tokenLedgerInstruction': !(0, runtime_1.exists)(json, 'tokenLedgerInstruction') ? undefined : (0, Instruction_1.InstructionFromJSON)(json['tokenLedgerInstruction']), 'computeBudgetInstructions': (json['computeBudgetInstructions'].map(Instruction_1.InstructionFromJSON)), 'setupInstructions': (json['setupInstructions'].map(Instruction_1.InstructionFromJSON)), 'swapInstruction': (0, Instruction_1.InstructionFromJSON)(json['swapInstruction']), 'cleanupInstruction': !(0, runtime_1.exists)(json, 'cleanupInstruction') ? undefined : (0, Instruction_1.InstructionFromJSON)(json['cleanupInstruction']), 'addressLookupTableAddresses': json['addressLookupTableAddresses'], }; } exports.SwapInstructionsResponseFromJSONTyped = SwapInstructionsResponseFromJSONTyped; function SwapInstructionsResponseToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'tokenLedgerInstruction': (0, Instruction_1.InstructionToJSON)(value.tokenLedgerInstruction), 'computeBudgetInstructions': (value.computeBudgetInstructions.map(Instruction_1.InstructionToJSON)), 'setupInstructions': (value.setupInstructions.map(Instruction_1.InstructionToJSON)), 'swapInstruction': (0, Instruction_1.InstructionToJSON)(value.swapInstruction), 'cleanupInstruction': (0, Instruction_1.InstructionToJSON)(value.cleanupInstruction), 'addressLookupTableAddresses': value.addressLookupTableAddresses, }; } exports.SwapInstructionsResponseToJSON = SwapInstructionsResponseToJSON; //# sourceMappingURL=SwapInstructionsResponse.js.map