solana-framework
Version:
solana-framework is solana uni-tools for typescript
58 lines • 2.4 kB
JavaScript
;
/* 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.InstructionToJSON = exports.InstructionFromJSONTyped = exports.InstructionFromJSON = exports.instanceOfInstruction = void 0;
const AccountMeta_1 = require("./AccountMeta");
/**
* Check if a given object implements the Instruction interface.
*/
function instanceOfInstruction(value) {
let isInstance = true;
isInstance = isInstance && "programId" in value;
isInstance = isInstance && "accounts" in value;
isInstance = isInstance && "data" in value;
return isInstance;
}
exports.instanceOfInstruction = instanceOfInstruction;
function InstructionFromJSON(json) {
return InstructionFromJSONTyped(json, false);
}
exports.InstructionFromJSON = InstructionFromJSON;
function InstructionFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'programId': json['programId'],
'accounts': (json['accounts'].map(AccountMeta_1.AccountMetaFromJSON)),
'data': json['data'],
};
}
exports.InstructionFromJSONTyped = InstructionFromJSONTyped;
function InstructionToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'programId': value.programId,
'accounts': (value.accounts.map(AccountMeta_1.AccountMetaToJSON)),
'data': value.data,
};
}
exports.InstructionToJSON = InstructionToJSON;
//# sourceMappingURL=Instruction.js.map